!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/local/lib/python3.8/dist-packages/tensorboard/plugins/distribution/   drwxr-sr-x
Free 13.08 GB of 57.97 GB (22.56%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     distributions_plugin.py (3.52 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""The TensorBoard Distributions (a.k.a. compressed histograms) plugin.

See `http_api.md` in this directory for specifications of the routes for
this plugin.
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from werkzeug import wrappers

from tensorboard.backend import http_util
from tensorboard.plugins import base_plugin
from tensorboard.plugins.distribution import compressor
from tensorboard.plugins.histogram import histograms_plugin


class DistributionsPlugin(base_plugin.TBPlugin):
  """Distributions Plugin for TensorBoard.

  This supports both old-style summaries (created with TensorFlow ops
  that output directly to the `histo` field of the proto) and new-style
  summaries (as created by the `tensorboard.plugins.histogram.summary`
  module).
  """

  plugin_name = 'distributions'

  # Use a round number + 1 since sampling includes both start and end steps,
  # so N+1 samples corresponds to dividing the step sequence into N intervals.
  SAMPLE_SIZE = 501

  def __init__(self, context):
    """Instantiates DistributionsPlugin via TensorBoard core.

    Args:
      context: A base_plugin.TBContext instance.
    """
    self._histograms_plugin = histograms_plugin.HistogramsPlugin(context)
    self._multiplexer = context.multiplexer

  def get_plugin_apps(self):
    return {
        '/distributions': self.distributions_route,
        '/tags': self.tags_route,
    }

  def is_active(self):
    """This plugin is active iff any run has at least one histogram tag.

    (The distributions plugin uses the same data source as the histogram
    plugin.)
    """
    return self._histograms_plugin.is_active()

  def distributions_impl(self, tag, run):
    """Result of the form `(body, mime_type)`, or `ValueError`."""
    (histograms, mime_type) = self._histograms_plugin.histograms_impl(
        tag, run, downsample_to=self.SAMPLE_SIZE)
    return ([self._compress(histogram) for histogram in histograms],
            mime_type)

  def _compress(self, histogram):
    (wall_time, step, buckets) = histogram
    converted_buckets = compressor.compress_histogram(buckets)
    return [wall_time, step, converted_buckets]

  def index_impl(self):
    return self._histograms_plugin.index_impl()

  @wrappers.Request.application
  def tags_route(self, request):
    index = self.index_impl()
    return http_util.Respond(request, index, 'application/json')

  @wrappers.Request.application
  def distributions_route(self, request):
    """Given a tag and single run, return an array of compressed histograms."""
    tag = request.args.get('tag')
    run = request.args.get('run')
    try:
      (body, mime_type) = self.distributions_impl(tag, run)
      code = 200
    except ValueError as e:
      (body, mime_type) = (str(e), 'text/plain')
      code = 400
    return http_util.Respond(request, body, mime_type, code=code)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0388 ]--