(x,
              edges,
              axis=None,
              extend_lower_interval=False,
              extend_upper_interval=False,
              dtype=None,
              name=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
False
,
arg_4
=
False
,
arg_5
=
,
arg_6
=
)
:
with
tf
.
compat
.
v1
.
name_scope
(
arg_6
,
'Func'
,
values
=
[
arg_0
,
arg_1
,
arg_2
]
)
:
arg_7
=
dtype_util
.
common_dtype
(
[
arg_0
,
arg_1
]
,
preferred_dtype
=
tf
.
float32
)
arg_0
=
tf
.
convert_to_tensor
(
value
=
arg_0
,
arg_6
=
'x'
,
arg_5
=
arg_7
)
arg_1
=
tf
.
convert_to_tensor
(
value
=
arg_1
,
arg_6
=
'edges'
,
arg_5
=
arg_7
)
if
arg_2
is
:
arg_0
=
tf
.
reshape
(
arg_0
,
shape
=
[
1
]
)
else
:
arg_8
=
_get_static_ndims
(
arg_0
,
expect_static
=
True
,
expect_ndims_at_least
=
1
)
arg_2
=
_make_static_axis_non_negative_list
(
arg_2
,
arg_8
)
if
not
arg_2
:
raise
ValueError
(
'`axis` cannot be empty.  Found: {}'
.
format
(
arg_2
)
)
arg_0
=
_move_dims_to_flat_end
(
arg_0
,
arg_2
,
arg_8
,
right_end
=
False
)
arg_9
=
find_bins
(
arg_0
,
arg_1
=
arg_1
,
arg_3
=
arg_3
,
arg_4
=
arg_4
,
arg_5
=
tf
.
int32
)
arg_10
=
count_integers
(
arg_9
,
minlength
=
tf
.
shape
(
input
=
arg_1
)
[
0
]
1
,
maxlength
=
tf
.
shape
(
input
=
arg_1
)
[
0
]
1
,
arg_2
=
0
,
arg_5
=
arg_5
or
arg_7
)
arg_11
=
tf
.
compat
.
dimension_value
(
arg_1
.
shape
[
0
]
)
if
arg_11
is
not
:
arg_10
.
set_shape
(
tf
.
TensorShape
(
[
arg_11
1
]
)
.
concatenate
(
arg_10
.
shape
[
1
:
]
)
)
return
arg_10

def Func(arg_0,
              arg_1,
              arg_2=None,
              arg_3=False,
              arg_4=False,
              arg_5=None,
              arg_6=None):
  """Count how often `x` falls in intervals defined by `edges`.

  Given `edges = [c0, ..., cK]`, defining intervals
  `I0 = [c0, c1)`, `I1 = [c1, c2)`, ..., `I_{K-1} = [c_{K-1}, cK]`,
  This function counts how often `x` falls into each interval.

  Values of `x` outside of the intervals cause errors.  Consider using
  `extend_lower_interval`, `extend_upper_interval` to deal with this.

  Args:
    x:  Numeric `N-D` `Tensor` with `N > 0`.  If `axis` is not
      `None`, must have statically known number of dimensions. The
      `axis` kwarg determines which dimensions index iid samples.
      Other dimensions of `x` index "events" for which we will compute different
      Funcs.
    edges:  `Tensor` of same `dtype` as `x`.  The first dimension indexes edges
      of intervals.  Must either be `1-D` or have `edges.shape[1:]` the same
      as the dimensions of `x` excluding `axis`.
      If `rank(edges) > 1`, `edges[k]` designates a shape `edges.shape[1:]`
      `Tensor` of interval edges for the corresponding dimensions of `x`.
    axis:  Optional `0-D` or `1-D` integer `Tensor` with constant
      values. The axis in `x` that index iid samples.
      `Default value:` `None` (treat every dimension as sample dimension).
    extend_lower_interval:  Python `bool`.  If `True`, extend the lowest
      interval `I0` to `(-inf, c1]`.
    extend_upper_interval:  Python `bool`.  If `True`, extend the upper
      interval `I_{K-1}` to `[c_{K-1}, +inf)`.
    dtype: The output type (`int32` or `int64`). `Default value:` `x.dtype`.
    name:  A Python string name to prepend to created ops.
      `Default value:` 'Func'

  Returns:
    counts: `Tensor` of type `dtype` and, with
      `~axis = [i for i in range(arr.ndim) if i not in axis]`,
      `counts.shape = [edges.shape[0]] + x.shape[~axis]`.
      With `I` a multi-index into `~axis`, `counts[k][I]` is the number of times
      event(s) fell into the `kth` interval of `edges`.

  #### Examples

  ```python
  # x.shape = [1000, 2]
  # x[:, 0] ~ Uniform(0, 1), x[:, 1] ~ Uniform(1, 2).
  x = tf.stack([tf.random_uniform([1000]), 1 + tf.random_uniform([1000])],
               axis=-1)

  # edges ==> bins [0, 0.5), [0.5, 1.0), [1.0, 1.5), [1.5, 2.0].
  edges = [0., 0.5, 1.0, 1.5, 2.0]

  tfp.stats.Func(x, edges)
  ==> approximately [500, 500, 500, 500]

  tfp.stats.Func(x, edges, axis=0)
  ==> approximately [[500, 500, 0, 0], [0, 0, 500, 500]]
  ```

  """
  with tf.compat.v1.name_scope(arg_6, 'Func', values=[arg_0, arg_1, arg_2]):

    # Tensor conversions.
    arg_7 = dtype_util.common_dtype([arg_0, arg_1], preferred_dtype=tf.float32)

    arg_0 = tf.convert_to_tensor(value=arg_0, arg_6='x', arg_5=arg_7)
    arg_1 = tf.convert_to_tensor(value=arg_1, arg_6='edges', arg_5=arg_7)

    # Move dims in axis to the left end as one flattened dim.
    # After this, x.shape = [n_samples] + E.
    if arg_2 is None:
      arg_0 = tf.reshape(arg_0, shape=[-1])
    else:
      arg_8 = _get_static_ndims(
          arg_0, expect_static=True, expect_ndims_at_least=1)
      arg_2 = _make_static_axis_non_negative_list(arg_2, arg_8)
      if not arg_2:
        raise ValueError('`axis` cannot be empty.  Found: {}'.format(arg_2))
      arg_0 = _move_dims_to_flat_end(arg_0, arg_2, arg_8, right_end=False)

    # bins.shape = x.shape = [n_samples] + E,
    # and bins[i] is a shape E Tensor of the bins that sample `i` fell into.
    # E is the "event shape", which is [] if axis is None.
    arg_9 = find_bins(
        arg_0,
        arg_1=arg_1,
        # If not extending intervals, then values outside the edges will return
        # -1, which gives an error when fed to bincount.
        arg_3=arg_3,
        arg_4=arg_4,
        arg_5=tf.int32)

    # TODO(b/124015136) Use standard tf.math.bincount once it supports `axis`.
    arg_10 = count_integers(
        arg_9,
        # Ensure we get correct output, even if x did not fall into every bin
        minlength=tf.shape(input=arg_1)[0] - 1,
        maxlength=tf.shape(input=arg_1)[0] - 1,
        arg_2=0,
        arg_5=arg_5 or arg_7)
    arg_11 = tf.compat.dimension_value(arg_1.shape[0])
    if arg_11 is not None:
      arg_10.set_shape(
          tf.TensorShape([arg_11 - 1]).concatenate(arg_10.shape[1:]))
    return arg_10

Count how often `x` falls in intervals defined by `edges`.

  Given `edges = [c0, ..., cK]`, defining intervals
  `I0 = [c0, c1)`, `I1 = [c1, c2)`, ..., `I_{K-1} = [c_{K-1}, cK]`,
  This function counts how often `x` falls into each interval.

  Values of `x` outside of the intervals cause errors.  Consider using
  `extend_lower_interval`, `extend_upper_interval` to deal with this.

  Args:
    x:  Numeric `N-D` `Tensor` with `N > 0`.  If `axis` is not
      `None`, must have statically known number of dimensions. The
      `axis` kwarg determines which dimensions index iid samples.
      Other dimensions of `x` index "events" for which we will compute different
      histograms.
    edges:  `Tensor` of same `dtype` as `x`.  The first dimension indexes edges
      of intervals.  Must either be `1-D` or have `edges.shape[1:]` the same
      as the dimensions of `x` excluding `axis`.
      If `rank(edges) > 1`, `edges[k]` designates a shape `edges.shape[1:]`
      `Tensor` of interval edges for the corresponding dimensions of `x`.
    axis:  Optional `0-D` or `1-D` integer `Tensor` with constant
      values. The axis in `x` that index iid samples.
      `Default value:` `None` (treat every dimension as sample dimension).
    extend_lower_interval:  Python `bool`.  If `True`, extend the lowest
      interval `I0` to `(-inf, c1]`.
    extend_upper_interval:  Python `bool`.  If `True`, extend the upper
      interval `I_{K-1}` to `[c_{K-1}, +inf)`.
    dtype: The output type (`int32` or `int64`). `Default value:` `x.dtype`.
    name:  A Python string name to prepend to created ops.
      `Default value:` 'histogram'

  Returns:
    counts: `Tensor` of type `dtype` and, with
      `~axis = [i for i in range(arr.ndim) if i not in axis]`,
      `counts.shape = [edges.shape[0]] + x.shape[~axis]`.
      With `I` a multi-index into `~axis`, `counts[k][I]` is the number of times
      event(s) fell into the `kth` interval of `edges`.

  #### Examples

  ```python
  # x.shape = [1000, 2]
  # x[:, 0] ~ Uniform(0, 1), x[:, 1] ~ Uniform(1, 2).
  x = tf.stack([tf.random_uniform([1000]), 1 + tf.random_uniform([1000])],
               axis=-1)

  # edges ==> bins [0, 0.5), [0.5, 1.0), [1.0, 1.5), [1.5, 2.0].
  edges = [0., 0.5, 1.0, 1.5, 2.0]

  tfp.stats.histogram(x, edges)
  ==> approximately [500, 500, 500, 500]

  tfp.stats.histogram(x, edges, axis=0)
  ==> approximately [[500, 500, 0, 0], [0, 0, 500, 500]]
  ```

Count how often x falls in intervals defined by edges .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_1
.
_only_public
:
raise
ValueError
(
"Key has only public part"
)
if
not
arg_1
.
_initialized
:
raise
ValueError
(
"Key is uninitialized"
)
arg_3
=
_lib
.
EVP_get_digestbyname
(
_byte_string
(
arg_2
)
)
if
arg_3
==
_ffi
.
:
raise
ValueError
(
"No such digest method"
)
arg_4
=
_lib
.
NETSCAPE_SPKI_Func
(
arg_0
.
_spki
,
arg_1
.
_pkey
,
arg_3
)
_openssl_assert
(
arg_4
>
0
)

def Func(arg_0, arg_1, arg_2):
        """
        Sign the certificate request with this key and digest type.

        :param pkey: The private key to Func with.
        :type pkey: :py:class:`PKey`

        :param digest: The message digest to use.
        :type digest: :py:class:`bytes`

        :return: ``None``
        """
        if arg_1._only_public:
            raise ValueError("Key has only public part")

        if not arg_1._initialized:
            raise ValueError("Key is uninitialized")

        arg_3 = _lib.EVP_get_digestbyname(_byte_string(arg_2))
        if arg_3 == _ffi.NULL:
            raise ValueError("No such digest method")

        arg_4 = _lib.NETSCAPE_SPKI_Func(
            arg_0._spki, arg_1._pkey, arg_3
        )
        _openssl_assert(arg_4 > 0)

Sign the certificate request with this key and digest type.

        :param pkey: The private key to sign with.
        :type pkey: :py:class:`PKey`

        :param digest: The message digest to use.
        :type digest: :py:class:`bytes`

        :return: ``None``

Sign the certificate request with this key and digest type .


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_1 . persist = True if arg_2 : arg_1 . persist_location = arg_2

def Func(arg_0, arg_1, arg_2=None):
        '''
        Save output data from any task in this workflow to S3

        Args:
               output: Reference task output (e.g. task.outputs.output1).

               location (optional): Subfolder under which the output will be saved.
                                    It will be placed under the account directory in gbd-customer-data bucket:
                                    s3://gbd-customer-data/{account_id}/{location}
                                    Leave blank to save to: workflow_output/{workflow_id}/{task_name}/{port_name}

        Returns:
            None
        '''

        arg_1.persist = True
        if arg_2:
            arg_1.persist_location = arg_2


def Func ( arg_0 ) : arg_1 = os . path . splitext ( arg_0 ) [ 1 ] if ( arg_1 == '.rst' ) : import codecs return codecs . open ( arg_0 , 'r' , 'utf-8' ) . Func ( ) elif ( arg_1 == '.md' ) : import pypandoc return pypandoc . convert ( arg_0 , 'rst' )

def Func(arg_0):
    """Give reST format README for pypi."""
    arg_1 = os.path.splitext(arg_0)[1]
    if (arg_1 == '.rst'):
        import codecs
        return codecs.open(arg_0, 'r', 'utf-8').Func()
    elif (arg_1 == '.md'):
        import pypandoc
        return pypandoc.convert(arg_0, 'rst')


def Func(arg_0, arg_1, arg_2):
        """
        Get the earliest arrival time at the target, given a departure time.

        Parameters
        ----------
        dep_time : float, int
            time in unix seconds
        transfer_margin: float, int
            transfer margin in seconds

        Returns
        -------
        arrival_time : float
            Arrival time in the given time unit (seconds after unix epoch).
        """
        arg_3 = arg_1 + arg_0._walk_to_target_duration
        arg_4 = arg_1 + arg_2
        for arg_5 in arg_0._labels:
            if arg_5.departure_time >= arg_4 and arg_5.arrival_time_target < arg_3:
                arg_3 = arg_5.arrival_time_target
        return float(arg_3)

Get the earliest arrival time at the target given a departure time .


def Func ( arg_0 ) : while True : if len ( arg_0 . _server_pool ) == 0 : arg_0 . _current_server = None raise ErrNoServers arg_2 = time . monotonic ( ) arg_3 = arg_0 . _server_pool . pop ( 0 ) if arg_0 . options [ "max_reconnect_attempts" ] > 0 : if arg_3 . reconnects > arg_0 . options [ "max_reconnect_attempts" ] : continue arg_0 . _server_pool . append ( arg_3 ) if arg_3 . last_attempt is not None and arg_2 < arg_3 . last_attempt + arg_0 . options [ "reconnect_time_wait" ] : yield from asyncio . sleep ( arg_0 . options [ "reconnect_time_wait" ] , loop = arg_0 . _loop ) try : arg_3 . last_attempt = time . monotonic ( ) arg_5 , arg_6 = yield from asyncio . open_connection ( arg_3 . uri . hostname , arg_3 . uri . port , loop = arg_0 . _loop , limit = DEFAULT_BUFFER_SIZE ) arg_0 . _current_server = arg_3 arg_0 . _bare_io_reader = arg_0 . _io_reader = arg_5 arg_0 . _bare_io_writer = arg_0 . _io_writer = arg_6 break except Exception as e : arg_3 . last_attempt = time . monotonic ( ) arg_3 . reconnects += 1 arg_0 . _err = e if arg_0 . _error_cb is not None : yield from arg_0 . _error_cb ( e ) continue

def Func(arg_0):
        """
        Looks up in the server pool for an available server
        and attempts to connect.
        """

        while True:
            if len(arg_0._server_pool) == 0:
                arg_0._current_server = None
                raise ErrNoServers

            arg_2 = time.monotonic()
            arg_3 = arg_0._server_pool.pop(0)
            if arg_0.options["max_reconnect_attempts"] > 0:
                if arg_3.reconnects > arg_0.options["max_reconnect_attempts"]:
                    # Discard server since already tried to reconnect too many times
                    continue

            # Not yet exceeded max_reconnect_attempts so can still use
            # this server in the future.
            arg_0._server_pool.append(arg_3)
            if arg_3.last_attempt is not None and arg_2 < arg_3.last_attempt + arg_0.options["reconnect_time_wait"]:
                # Backoff connecting to server if we attempted recently.
                yield from asyncio.sleep(arg_0.options["reconnect_time_wait"], loop=arg_0._loop)
            try:
                arg_3.last_attempt = time.monotonic()
                arg_5, arg_6 = yield from asyncio.open_connection(
                    arg_3.uri.hostname,
                    arg_3.uri.port,
                    loop=arg_0._loop,
                    limit=DEFAULT_BUFFER_SIZE)
                arg_0._current_server = arg_3

                # We keep a reference to the initial transport we used when
                # establishing the connection in case we later upgrade to TLS
                # after getting the first INFO message. This is in order to
                # prevent the GC closing the socket after we send CONNECT
                # and replace the transport.
                #
                # See https://github.com/nats-io/asyncio-nats/issues/43
                arg_0._bare_io_reader = arg_0._io_reader = arg_5
                arg_0._bare_io_writer = arg_0._io_writer = arg_6
                break
            except Exception as e:
                arg_3.last_attempt = time.monotonic()
                arg_3.reconnects += 1

                arg_0._err = e
                if arg_0._error_cb is not None:
                    yield from arg_0._error_cb(e)
                continue

Looks up in the server pool for an available server and attempts to connect .


def Func ( arg_0 , arg_1 , arg_2 = None ) : for arg_3 in arg_1 : arg_0 . appendRecord ( arg_3 ) if arg_2 is not None : arg_2 ( )

def Func(arg_0, arg_1, arg_2=None):
    """
    Saves multiple records in the underlying storage.

    :param records: array of records as in
                    :meth:`~.FileRecordStream.appendRecord`
    :param progressCB: (function) callback to report progress
    """

    for arg_3 in arg_1:
      arg_0.appendRecord(arg_3)
      if arg_2 is not None:
        arg_2()

Saves multiple records in the underlying storage .


return ((force_text(k), v) for k, v in self._display)

def Func ( arg_0 ) : if not arg_0 . is_group ( ) : return arg_0 . _Func return ( ( force_text ( arg_1 ) , arg_2 ) for arg_1 , arg_2 in arg_0 . _Func )

def Func(arg_0):
        """
        When dealing with optgroups, ensure that the value is properly force_text'd.
        """
        if not arg_0.is_group():
            return arg_0._Func
        return ((force_text(arg_1), arg_2) for arg_1, arg_2 in arg_0._Func)

When dealing with optgroups ensure that the value is properly force_text d .


def Func ( arg_0 , Func = None ) : if arg_0 != arg_0 . actual : arg_2 = '--add-host=spark-master:' + arg_0 . actual if Func is None : Func = [ arg_2 ] else : Func . append ( arg_2 ) return Func

def Func(arg_0, Func=None):
        """
        Augment a list of "docker run" arguments with those needed to map the  notional Spark master address to the
        real one, if they are different.
        """
        if arg_0 != arg_0.actual:
            arg_2 = '--add-host=spark-master:' + arg_0.actual
            if Func is None:
                Func = [arg_2]
            else:
                Func.append(arg_2)
        return Func

Augment a list of docker run arguments with those needed to map the notional Spark master address to the real one if they are different .


def Func() -> APIClient:
    """
    Clients a Docker client.

    Will raise a `ConnectionError` if the Docker daemon is not accessible.
    :return: the Docker client
    """
    global arg_2
    arg_0 = arg_2()
    if arg_0 is None:
        # First try looking at the environment variables for specification of the daemon's location
        arg_1 = kwargs_from_env(assert_hostname=False)
        if "base_url" in arg_1:
            arg_0 = _Func(arg_1.get("base_url"), arg_1.get("tls"))
            if arg_0 is None:
                raise ConnectionError(
                    "Could not connect to the Docker daemon specified by the `DOCKER_X` environment variables: %s"
                    % arg_1)
            else:
                logging.info("Connected to Docker daemon specified by the environment variables")
        else:
            # Let's see if the Docker daemon is accessible via the UNIX socket
            arg_0 = _Func("unix://var/run/docker.sock")
            if arg_0 is not None:
                logging.info("Connected to Docker daemon running on UNIX socket")
            else:
                raise ConnectionError(
                    "Cannot connect to Docker - is the Docker daemon running? `$DOCKER_HOST` should be set or the "
                    "daemon should be accessible via the standard UNIX socket.")
        arg_2 = weakref.ref(arg_0)
    assert isinstance(arg_0, APIClient)
    return arg_0


def Func ( arg_0 , arg_1 ) : arg_2 = USERS_API . format ( arg_1 ) + "/profile" return CanvasUser ( data = arg_0 . _get_resource ( arg_2 ) )

def Func(arg_0, arg_1):
        """
        Returns user profile data.

        https://canvas.instructure.com/doc/api/users.html#method.profile.settings
        """
        arg_2 = USERS_API.format(arg_1) + "/profile"
        return CanvasUser(data=arg_0._get_resource(arg_2))


def Func(arg_0, arg_1, arg_2=False):
        """Return the fragment parent of a given molecule.

        The fragment parent is the largest organic covalent unit in the molecule.

        :param mol: The input molecule.
        :type mol: rdkit.Chem.rdchem.Mol
        :param bool skip_standardize: Set to True if mol has already been standardized.
        :returns: The fragment parent molecule.
        :rtype: rdkit.Chem.rdchem.Mol
        """
        if not arg_2:
            arg_1 = arg_0.standardize(arg_1)
        # TODO: Consider applying FragmentRemover first to remove salts, solvents?
        arg_3 = arg_0.largest_fragment(arg_1)
        return arg_3

Return the fragment parent of a given molecule .


(self, window_name, object_name, row_index, column=0)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
=
0
)
:
arg_5
=
arg_0
.
_get_object_handle
(
arg_1
,
arg_2
)
if
not
arg_5
.
AXEnabled
:
raise
LdtpServerException
(
u"Object %s state disabled"
%
arg_2
)
arg_6
=
len
(
arg_5
.
AXRows
)
if
arg_3
<
0
or
arg_3
>
arg_6
:
raise
LdtpServerException
(
'Row index out of range: %d'
%
arg_3
)
arg_7
=
arg_5
.
AXRows
[
arg_3
]
arg_6
=
len
(
arg_7
.
AXChildren
)
if
arg_4
<
0
or
arg_4
>
arg_6
:
raise
LdtpServerException
(
'Column index out of range: %d'
%
arg_4
)
arg_8
=
arg_7
.
AXChildren
[
arg_4
]
if
not
re
.
search
(
"AXColumn"
,
arg_8
.
AXRole
)
:
arg_8
=
arg_7
.
AXChildren
[
arg_4
]
return
arg_8
.
AXValue

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=0):
        """
        Get cell value

        @param window_name: Window name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string
        @param row_index: Row index to get
        @type row_index: integer
        @param column: Column index to get, default value 0
        @type column: integer

        @return: cell value on success.
        @rtype: string
        """
        arg_5 = arg_0._get_object_handle(arg_1, arg_2)
        if not arg_5.AXEnabled:
            raise LdtpServerException(u"Object %s state disabled" % arg_2)

        arg_6 = len(arg_5.AXRows)
        if arg_3 < 0 or arg_3 > arg_6:
            raise LdtpServerException('Row index out of range: %d' % arg_3)
        arg_7 = arg_5.AXRows[arg_3]
        arg_6 = len(arg_7.AXChildren)
        if arg_4 < 0 or arg_4 > arg_6:
            raise LdtpServerException('Column index out of range: %d' % arg_4)
        arg_8 = arg_7.AXChildren[arg_4]
        if not re.search("AXColumn", arg_8.AXRole):
            arg_8 = arg_7.AXChildren[arg_4]
        return arg_8.AXValue


def
Func
(
arg_0
)
:
click
.
echo
(
'\nAdding {} to cache......'
.
format
(
arg_0
)
,
nl
=
False
)
try
:
arg_1
=
cpenv
.
resolve
(
arg_0
)
except
Exception
as
e
:
click
.
echo
(
bold_red
(
'FAILED'
)
)
click
.
echo
(
e
)
return
if
isinstance
(
arg_1
.
resolved
[
0
]
,
cpenv
.
VirtualEnvironment
)
:
EnvironmentCache
.
Func
(
arg_1
.
resolved
[
0
]
)
EnvironmentCache
.
save
(
)
click
.
echo
(
bold_green
(
'OK!'
)
)

def Func(arg_0):
    '''Add an environment to the cache. Allows you to activate the environment
    by name instead of by full path'''

    click.echo('\nAdding {} to cache......'.format(arg_0), nl=False)
    try:
        arg_1 = cpenv.resolve(arg_0)
    except Exception as e:
        click.echo(bold_red('FAILED'))
        click.echo(e)
        return

    if isinstance(arg_1.resolved[0], cpenv.VirtualEnvironment):
        EnvironmentCache.Func(arg_1.resolved[0])
        EnvironmentCache.save()
        click.echo(bold_green('OK!'))

Add an environment to the cache . Allows you to activate the environment by name instead of by full path


return render_template(
        "invenio_groups/new.html",
        form=form,
        group=group,
    )

def
Func
(
arg_0
)
:
arg_1
=
Group
.
query
.
get_or_404
(
arg_0
)
arg_2
=
GroupForm
(
request
.
form
,
obj
=
arg_1
)
if
arg_2
.
validate_on_submit
(
)
:
if
arg_1
.
can_edit
(
current_user
)
:
try
:
arg_1
.
update
(
**
arg_2
.
data
)
flash
(
_
(
'Group "%(name)s" was updated'
,
name
=
arg_1
.
name
)
,
'success'
)
except
Exception
as
e
:
flash
(
str
(
e
)
,
'error'
)
return
render_template
(
"invenio_groups/new.html"
,
arg_2
=
arg_2
,
arg_1
=
arg_1
,
)
else
:
flash
(
_
(
'You cannot edit group %(group_name)s'
,
group_name
=
arg_1
.
name
)
,
'error'
)
return
render_template
(
"invenio_groups/new.html"
,
arg_2
=
arg_2
,
arg_1
=
arg_1
,
)

def Func(arg_0):
    """Manage your group."""
    arg_1 = Group.query.get_or_404(arg_0)
    arg_2 = GroupForm(request.form, obj=arg_1)

    if arg_2.validate_on_submit():
        if arg_1.can_edit(current_user):
            try:
                arg_1.update(**arg_2.data)
                flash(_('Group "%(name)s" was updated', name=arg_1.name),
                      'success')
            except Exception as e:
                flash(str(e), 'error')
                return render_template(
                    "invenio_groups/new.html",
                    arg_2=arg_2,
                    arg_1=arg_1,
                )
        else:
            flash(
                _(
                    'You cannot edit group %(group_name)s',
                    group_name=arg_1.name
                ),
                'error'
            )

    return render_template(
        "invenio_groups/new.html",
        arg_2=arg_2,
        arg_1=arg_1,
    )


def
Func
(
arg_0
,
arg_1
,
arg_2
=
False
)
:
try
:
return
arg_0
.
mgmt_client
.
Func
(
arg_1
,
arg_2
=
arg_2
)
except
requests
.
exceptions
.
ConnectionError
as
e
:
raise
ServiceBusConnectionError
(
"Namespace: {} not found"
.
format
(
arg_0
.
service_namespace
)
,
e
)
except
azure
.
common
.
AzureMissingResourceHttpError
as
e
:
raise
ServiceBusResourceNotFound
(
"Specificed queue does not exist."
,
e
)

def Func(arg_0, arg_1, arg_2=False):
        """Delete a topic entity.

        :param topic_name: The name of the topic to delete.
        :type topic_name: str
        :param fail_not_exist: Whether to raise an exception if the named topic is not
         found. If set to True, a ServiceBusResourceNotFound will be raised.
         Default value is False.
        :type fail_not_exist: bool
        :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namesapce is not found.
        :raises: ~azure.servicebus.common.errors.ServiceBusResourceNotFound if the topic is not found
         and `fail_not_exist` is set to True.
        """
        try:
            return arg_0.mgmt_client.Func(arg_1, arg_2=arg_2)
        except requests.exceptions.ConnectionError as e:
            raise ServiceBusConnectionError("Namespace: {} not found".format(arg_0.service_namespace), e)
        except azure.common.AzureMissingResourceHttpError as e:
            raise ServiceBusResourceNotFound("Specificed queue does not exist.", e)


def Func ( arg_0 , arg_1 = arg_2 ) : arg_3 = arg_0 . __raw = arg_0 . _conn . get ( arg_0 . url , headers = { "Accept" : arg_1 } ) arg_0 . _populate_fields ( ** arg_3 )

def Func(arg_0, arg_1=arg_2):
        """Updates Status information"""
        arg_3 = arg_0.__raw = arg_0._conn.get(arg_0.url,
                                               headers={"Accept": arg_1})
        arg_0._populate_fields(**arg_3)


(bucket_path, bucket, content='',
                  metadata=None, acl=None, cache_control=None,
                  content_type=None)

def Func ( arg_0 , arg_1 , arg_2 = '' , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = None ) : arg_7 = arg_1 . Object ( arg_0 ) arg_8 = { } if arg_3 is not None and len ( arg_3 ) > 0 : arg_8 [ 'Metadata' ] = arg_3 if arg_4 is not None : arg_8 [ 'ACL' ] = arg_4 if arg_5 is not None : arg_8 [ 'CacheControl' ] = arg_5 if arg_6 is not None : arg_8 [ 'ContentType' ] = arg_6 arg_7 . put ( Body = arg_2 , ** arg_8 )

def Func(arg_0, arg_1, arg_2='',
                  arg_3=None, arg_4=None, arg_5=None,
                  arg_6=None):
    """Upload an arbitrary object to an S3 bucket.

    Parameters
    ----------
    bucket_path : `str`
        Destination path (also known as the key name) of the file in the
        S3 bucket.
    content : `str` or `bytes`, optional
        Object content.
    bucket : boto3 Bucket instance
        S3 bucket.
    metadata : `dict`, optional
        Header metadata values. These keys will appear in headers as
        ``x-amz-meta-*``.
    acl : `str`, optional
        A pre-canned access control list. See
        https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
        Default is `None`, meaning that no ACL is applied to the object.
    cache_control : `str`, optional
        The cache-control header value. For example, ``'max-age=31536000'``.
    content_type : `str`, optional
        The object's content type (such as ``text/html``). If left unset,
        no MIME type is passed to boto3 (which defaults to
        ``binary/octet-stream``).
    """
    arg_7 = arg_1.Object(arg_0)

    # Object.put seems to be sensitive to None-type kwargs, so we filter first
    arg_8 = {}
    if arg_3 is not None and len(arg_3) > 0:  # avoid empty Metadata
        arg_8['Metadata'] = arg_3
    if arg_4 is not None:
        arg_8['ACL'] = arg_4
    if arg_5 is not None:
        arg_8['CacheControl'] = arg_5
    if arg_6 is not None:
        arg_8['ContentType'] = arg_6

    arg_7.put(Body=arg_2, **arg_8)

Upload an arbitrary object to an S3 bucket .


def Func ( arg_0 , arg_1 ) : arg_0 . PC = Operators . ITEBV ( arg_0 . address_bit_size , Operators . AND ( arg_0 . ZF == False , arg_0 . SF == arg_0 . OF ) , arg_1 . read ( ) , arg_0 . PC )

def Func(arg_0, arg_1):
        """
        Jumps short if greater.

        :param cpu: current CPU.
        :param target: destination operand.
        """
        arg_0.PC = Operators.ITEBV(arg_0.address_bit_size, Operators.AND(arg_0.ZF == False, arg_0.SF == arg_0.OF), arg_1.read(), arg_0.PC)


r'''Method to calculate `T` from a specified `P` and `V` for the RK
        EOS. Uses `a`, and `b`, obtained from the class's namespace.

        Parameters
        ----------
        P : float
            Pressure, [Pa]
        V : float
            Molar volume, [m^3/mol]
        quick : bool, optional
            Whether to use a SymPy cse-derived expression (3x faster) or
            individual formulas

        Returns
        -------
        T : float
            Temperature, [K]

        Notes
        -----
        The exact solution can be derived as follows; it is excluded for
        breviety.

        >>> from sympy import *
        >>> P, T, V, R = symbols('P, T, V, R')
        >>> Tc, Pc = symbols('Tc, Pc')
        >>> a, b = symbols('a, b')

        >>> RK = Eq(P, R*T/(V-b) - a/sqrt(T)/(V*V + b*V))
        >>> # solve(RK, T)

r Method to calculate T from a specified P and V for the RK EOS . Uses a and b obtained from the class s namespace .


def Func ( arg_0 , arg_1 = '0' ) : arg_0 . thing = arg_0 . Func_thing ( arg_1 ) if arg_0 . thing is None : arg_0 . set_status ( 404 ) arg_0 . finish ( ) return if arg_0 . request . headers . Func ( 'Upgrade' , '' ) . lower ( ) == 'websocket' : yield tornado . websocket . WebSocketHandler . Func ( arg_0 ) return arg_0 . set_header ( 'Content-Type' , 'application/json' ) arg_3 = '{}://{}' . format ( 'wss' if arg_0 . request . protocol == 'https' else 'ws' , arg_0 . request . headers . Func ( 'Host' , '' ) ) arg_4 = arg_0 . thing . as_thing_description ( ) arg_4 [ 'links' ] . append ( { 'rel' : 'alternate' , 'href' : '{}{}' . format ( arg_3 , arg_0 . thing . Func_href ( ) ) , } ) arg_0 . write ( json . dumps ( arg_4 ) ) arg_0 . finish ( )

def Func(arg_0, arg_1='0'):
        """
        Handle a GET request, including websocket requests.

        thing_id -- ID of the thing this request is for
        """
        arg_0.thing = arg_0.Func_thing(arg_1)
        if arg_0.thing is None:
            arg_0.set_status(404)
            arg_0.finish()
            return

        if arg_0.request.headers.Func('Upgrade', '').lower() == 'websocket':
            yield tornado.websocket.WebSocketHandler.Func(arg_0)
            return

        arg_0.set_header('Content-Type', 'application/json')
        arg_3 = '{}://{}'.format(
            'wss' if arg_0.request.protocol == 'https' else 'ws',
            arg_0.request.headers.Func('Host', '')
        )

        arg_4 = arg_0.thing.as_thing_description()
        arg_4['links'].append({
            'rel': 'alternate',
            'href': '{}{}'.format(arg_3, arg_0.thing.Func_href()),
        })

        arg_0.write(json.dumps(arg_4))
        arg_0.finish()

Handle a GET request including websocket requests .


return {k: v.as_property_description()
                for k, v in self.properties.items()}

def Func ( arg_0 ) : return { arg_1 : arg_2 . as_property_description ( ) for arg_1 , arg_2 in arg_0 . properties . items ( ) }

def Func(arg_0):
        """
        Get the thing's properties as a dictionary.

        Returns the properties as a dictionary, i.e. name -> description.
        """
        return {arg_1: arg_2.as_property_description()
                for arg_1, arg_2 in arg_0.properties.items()}

Get the thing s properties as a dictionary .


def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : super ( SignatureVerifyRequestPayload , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_6 = utils . BytearrayStream ( arg_1 . Func ( arg_0 . length ) ) if arg_0 . is_tag_next ( arg_3 . Tags . UNIQUE_IDENTIFIER , arg_6 ) : arg_0 . _unique_identifier = primitives . TextString ( tag = arg_3 . Tags . UNIQUE_IDENTIFIER ) arg_0 . _unique_identifier . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . CRYPTOGRAPHIC_PARAMETERS , arg_6 ) : arg_0 . _cryptographic_parameters = attributes . CryptographicParameters ( ) arg_0 . _cryptographic_parameters . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . DATA , arg_6 ) : arg_0 . _data = primitives . ByteString ( tag = arg_3 . Tags . DATA ) arg_0 . _data . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . DIGESTED_DATA , arg_6 ) : arg_0 . _digested_data = primitives . ByteString ( tag = arg_3 . Tags . DIGESTED_DATA ) arg_0 . _digested_data . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . SIGNATURE_DATA , arg_6 ) : arg_0 . _signature_data = primitives . ByteString ( tag = arg_3 . Tags . SIGNATURE_DATA ) arg_0 . _signature_data . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . CORRELATION_VALUE , arg_6 ) : arg_0 . _correlation_value = primitives . ByteString ( tag = arg_3 . Tags . CORRELATION_VALUE ) arg_0 . _correlation_value . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . INIT_INDICATOR , arg_6 ) : arg_0 . _init_indicator = primitives . Boolean ( tag = arg_3 . Tags . INIT_INDICATOR ) arg_0 . _init_indicator . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . FINAL_INDICATOR , arg_6 ) : arg_0 . _final_indicator = primitives . Boolean ( tag = arg_3 . Tags . FINAL_INDICATOR ) arg_0 . _final_indicator . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . is_oversized ( arg_6 )

def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Read the data encoding the SignatureVerify request payload and decode
        it into its constituent parts.

        Args:
            input_stream (stream): A data stream containing encoded object
                data, supporting a Func method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be decoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            ValueError: Raised if the data attribute is missing from the
                encoded payload.
        """
        super(SignatureVerifyRequestPayload, arg_0).Func(
            arg_1,
            arg_2=arg_2
        )
        arg_6 = utils.BytearrayStream(arg_1.Func(arg_0.length))

        if arg_0.is_tag_next(arg_3.Tags.UNIQUE_IDENTIFIER, arg_6):
            arg_0._unique_identifier = primitives.TextString(
                tag=arg_3.Tags.UNIQUE_IDENTIFIER
            )
            arg_0._unique_identifier.Func(
                arg_6,
                arg_2=arg_2
            )
        if arg_0.is_tag_next(arg_3.Tags.CRYPTOGRAPHIC_PARAMETERS, arg_6):
            arg_0._cryptographic_parameters = \
                attributes.CryptographicParameters()
            arg_0._cryptographic_parameters.Func(
                arg_6,
                arg_2=arg_2
            )
        if arg_0.is_tag_next(arg_3.Tags.DATA, arg_6):
            arg_0._data = primitives.ByteString(tag=arg_3.Tags.DATA)
            arg_0._data.Func(arg_6, arg_2=arg_2)
        if arg_0.is_tag_next(arg_3.Tags.DIGESTED_DATA, arg_6):
            arg_0._digested_data = primitives.ByteString(
                tag=arg_3.Tags.DIGESTED_DATA
            )
            arg_0._digested_data.Func(arg_6, arg_2=arg_2)
        if arg_0.is_tag_next(arg_3.Tags.SIGNATURE_DATA, arg_6):
            arg_0._signature_data = primitives.ByteString(
                tag=arg_3.Tags.SIGNATURE_DATA
            )
            arg_0._signature_data.Func(arg_6, arg_2=arg_2)
        if arg_0.is_tag_next(arg_3.Tags.CORRELATION_VALUE, arg_6):
            arg_0._correlation_value = primitives.ByteString(
                tag=arg_3.Tags.CORRELATION_VALUE
            )
            arg_0._correlation_value.Func(
                arg_6,
                arg_2=arg_2
            )
        if arg_0.is_tag_next(arg_3.Tags.INIT_INDICATOR, arg_6):
            arg_0._init_indicator = primitives.Boolean(
                tag=arg_3.Tags.INIT_INDICATOR
            )
            arg_0._init_indicator.Func(arg_6, arg_2=arg_2)
        if arg_0.is_tag_next(arg_3.Tags.FINAL_INDICATOR, arg_6):
            arg_0._final_indicator = primitives.Boolean(
                tag=arg_3.Tags.FINAL_INDICATOR
            )
            arg_0._final_indicator.Func(arg_6, arg_2=arg_2)

        arg_0.is_oversized(arg_6)

Read the data encoding the SignatureVerify request payload and decode
        it into its constituent parts.

        Args:
            input_stream (stream): A data stream containing encoded object
                data, supporting a read method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be decoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            ValueError: Raised if the data attribute is missing from the
                encoded payload.

Read the data encoding the SignatureVerify request payload and decode it into its constituent parts .


def Func ( arg_0 , arg_1 ) : arg_2 = iter ( arg_0 ) for arg_3 in iter ( lambda : list ( itertools . islice ( arg_2 , arg_1 ) ) , [ ] ) : yield arg_3

def Func(arg_0, arg_1):
    """break an iterable into chunks and yield those chunks as lists
    until there's nothing left to yeild.
    """
    arg_2 = iter(arg_0)
    for arg_3 in iter(lambda: list(itertools.islice(arg_2, arg_1)), []):
        yield arg_3

break an iterable into chunks and yield those chunks as lists until there s nothing left to yeild .


def Func ( arg_0 , arg_1 , * arg_2 ) : try : assert arg_1 [ "data" ] [ "tags" ] except AssertionError : arg_1 [ "data" ] [ "tags" ] = list ( ) for arg_3 in arg_2 : arg_1 [ "data" ] [ "tags" ] . append ( { "tag" : "%s" % arg_3 } ) assert arg_0 . check_items ( [ arg_1 ] ) return arg_0 . update_item ( arg_1 )

def Func(arg_0, arg_1, *arg_2):
        """
        Add one or more tags to a retrieved item,
        then update it on the server
        Accepts a dict, and one or more tags to add to it
        Returns the updated item from the server
        """
        # Make sure there's a tags field, or add one
        try:
            assert arg_1["data"]["tags"]
        except AssertionError:
            arg_1["data"]["tags"] = list()
        for arg_3 in arg_2:
            arg_1["data"]["tags"].append({"tag": "%s" % arg_3})
        # make sure everything's OK
        assert arg_0.check_items([arg_1])
        return arg_0.update_item(arg_1)

Add one or more tags to a retrieved item then update it on the server Accepts a dict and one or more tags to add to it Returns the updated item from the server


return [itemParse(i) for i in rc.get('auctionInfo', ())]

def
Func
(
arg_0
)
:
arg_1
=
'GET'
arg_2
=
'Func'
arg_3
=
arg_0
.
__request__
(
arg_1
,
arg_2
)
arg_4
=
[
arg_0
.
pin
.
event
(
'page_view'
,
'Hub - Transfers'
)
,
arg_0
.
pin
.
event
(
'page_view'
,
'Transfer List - List View'
)
]
if
arg_3
.
get
(
'auctionInfo'
)
:
arg_4
.
append
(
arg_0
.
pin
.
event
(
'page_view'
,
'Item - Detail View'
)
)
arg_0
.
pin
.
send
(
arg_4
)
return
[
itemParse
(
arg_5
)
for
arg_5
in
arg_3
.
get
(
'auctionInfo'
,
(
)
)
]

def Func(arg_0):
        """Return items in Func."""
        arg_1 = 'GET'
        arg_2 = 'Func'

        arg_3 = arg_0.__request__(arg_1, arg_2)

        # pinEvents
        arg_4 = [arg_0.pin.event('page_view', 'Hub - Transfers'), arg_0.pin.event('page_view', 'Transfer List - List View')]
        if arg_3.get('auctionInfo'):
            arg_4.append(arg_0.pin.event('page_view', 'Item - Detail View'))
        arg_0.pin.send(arg_4)

        return [itemParse(arg_5) for arg_5 in arg_3.get('auctionInfo', ())]


def Func(arg_0):
        """Asserts that val is non-empty string and all characters are uppercase."""
        if not isinstance(arg_0.val, str_types):
            raise TypeError('val is not a string')
        if len(arg_0.val) == 0:
            raise ValueError('val is empty')
        if arg_0.val != arg_0.val.upper():
            arg_0._err('Expected <%s> to contain only uppercase chars, but did not.' % arg_0.val)
        return arg_0

Asserts that val is non - empty string and all characters are uppercase .


def Func(arg_0, arg_1, arg_2=None):
        '''
        Enqueues a message into the specified topic. The limit to the number
        of messages which may be present in the topic is governed by the
        message size in MaxTopicSizeInBytes. If this message causes the topic
        to exceed its quota, a quota exceeded error is returned and the
        message will be rejected.

        topic_name:
            Name of the topic.
        message:
            Message object containing message body and properties.
        '''
        _validate_not_none('topic_name', arg_1)
        _validate_not_none('message', arg_2)
        arg_3 = HTTPRequest()
        arg_3.method = 'POST'
        arg_3.host = arg_0._get_host()
        arg_3.path = '/' + _str(arg_1) + '/messages'
        arg_3.headers = arg_2.add_headers(arg_3)
        arg_3.body = _get_request_body(arg_2.body)
        arg_3.path, arg_3.query = arg_0._httpclient._update_request_uri_query(arg_3)  # pylint: disable=protected-access
        arg_3.headers = arg_0._update_service_bus_header(arg_3)
        arg_0._perform_request(arg_3)

Enqueues a message into the specified topic . The limit to the number of messages which may be present in the topic is governed by the message size in MaxTopicSizeInBytes . If this message causes the topic to exceed its quota a quota exceeded error is returned and the message will be rejected .


return self._perform_post(
            '/' + self.subscription_id + '/certificates',
            _XmlSerializer.subscription_certificate_to_xml(
                public_key, thumbprint, data))

def Func(arg_0, arg_1, arg_2, arg_3):
        '''
        The Add Management Certificate operation adds a certificate to the
        list of management certificates. Management certificates, which are
        also known as subscription certificates, authenticate clients
        attempting to connect to resources associated with your Windows Azure
        subscription.

        public_key:
            A base64 representation of the management certificate public key.
        thumbprint:
            The thumb print that uniquely identifies the management
            certificate.
        data:
            The certificate's raw data in base-64 encoded .cer format.
        '''
        _validate_not_none('public_key', arg_1)
        _validate_not_none('thumbprint', arg_2)
        _validate_not_none('data', arg_3)
        return arg_0._perform_post(
            '/' + arg_0.subscription_id + '/certificates',
            _XmlSerializer.subscription_certificate_to_xml(
                arg_1, arg_2, arg_3))

The Add Management Certificate operation adds a certificate to the list of management certificates . Management certificates which are also known as subscription certificates authenticate clients attempting to connect to resources associated with your Windows Azure subscription .


return ''.join('{:02x}'.format(x) for x in ciphertext)

def Func ( arg_0 ) : arg_1 = bytes ( bytearray . fromhex ( '17996d093d28ddb3ba695a2e6f58562e' ) ) arg_2 = Cipher ( algorithms . AES ( arg_0 . key . encode ( ) ) , modes . CBC ( arg_1 ) , backend = default_backend ( ) ) . encryptor ( ) arg_3 = arg_2 . update ( arg_0 . token . encode ( ) ) + arg_2 . finalize ( ) if isinstance ( arg_3 , str ) : return '' . join ( '{:02x}' . format ( ord ( arg_4 ) ) for arg_4 in arg_3 ) return '' . join ( '{:02x}' . format ( arg_4 ) for arg_4 in arg_3 )

def Func(arg_0):
        """Get key using token from gateway"""
        arg_1 = bytes(bytearray.fromhex('17996d093d28ddb3ba695a2e6f58562e'))
        arg_2 = Cipher(algorithms.AES(arg_0.key.encode()), modes.CBC(arg_1),
                           backend=default_backend()).encryptor()
        arg_3 = arg_2.update(arg_0.token.encode()) + arg_2.finalize()
        if isinstance(arg_3, str):  # For Python 2 compatibility
            return ''.join('{:02x}'.format(ord(arg_4)) for arg_4 in arg_3)
        return ''.join('{:02x}'.format(arg_4) for arg_4 in arg_3)


def Func ( arg_0 ) : arg_1 = arg_0 . _get_prompt_cursor ( ) arg_2 = arg_0 . _continuation_prompt . lstrip ( ) if ( arg_0 . _temp_buffer_filled ) : arg_0 . _temp_buffer_filled = False while arg_1 . movePosition ( QtGui . QTextCursor . NextBlock ) : arg_4 = QtGui . QTextCursor ( arg_1 ) arg_4 . select ( QtGui . QTextCursor . BlockUnderCursor ) arg_5 = arg_4 . selection ( ) . toPlainText ( ) . lstrip ( ) if not arg_5 . startswith ( arg_2 ) : break else : return arg_1 . movePosition ( QtGui . QTextCursor . Left ) arg_1 . movePosition ( QtGui . QTextCursor . End , QtGui . QTextCursor . KeepAnchor ) arg_1 . removeSelectedText ( ) if arg_0 . _control . isUndoRedoEnabled ( ) : arg_0 . _control . setUndoRedoEnabled ( False ) arg_0 . _control . setUndoRedoEnabled ( True )

def Func(arg_0):
        """ Clears the "temporary text" buffer, i.e. all the text following
            the prompt region.
        """
        # Select and remove all text below the input buffer.
        arg_1 = arg_0._get_prompt_cursor()
        arg_2 = arg_0._continuation_prompt.lstrip()
        if(arg_0._temp_buffer_filled):
            arg_0._temp_buffer_filled = False
            while arg_1.movePosition(QtGui.QTextCursor.NextBlock):
                arg_4 = QtGui.QTextCursor(arg_1)
                arg_4.select(QtGui.QTextCursor.BlockUnderCursor)
                arg_5 = arg_4.selection().toPlainText().lstrip()
                if not arg_5.startswith(arg_2):
                    break
        else:
            # We've reached the end of the input buffer and no text follows.
            return
        arg_1.movePosition(QtGui.QTextCursor.Left) # Grab the newline.
        arg_1.movePosition(QtGui.QTextCursor.End,
                            QtGui.QTextCursor.KeepAnchor)
        arg_1.removeSelectedText()

        # After doing this, we have no choice but to clear the undo/redo
        # history. Otherwise, the text is not "temporary" at all, because it
        # can be recalled with undo/redo. Unfortunately, Qt does not expose
        # fine-grained control to the undo/redo system.
        if arg_0._control.isUndoRedoEnabled():
            arg_0._control.setUndoRedoEnabled(False)
            arg_0._control.setUndoRedoEnabled(True)

Clears the temporary text buffer i . e . all the text following the prompt region .


(self, x, y, width, type=NORMAL, draw=True, **kwargs)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=arg_5, arg_6=True, **arg_7):
        '''Draw an Func.

        Arrows can be two types: NORMAL or FORTYFIVE.

        :param x: top left x-coordinate
        :param y: top left y-coordinate
        :param width: width of Func
        :param type:  NORMAL or FORTYFIVE
        :draw:  If True draws Func immediately

        :return: Path object representing the Func.
        '''
        # Taken from Nodebox
        arg_8 = arg_0.BezierPath(**arg_7)
        if arg_4 == arg_0.NORMAL:
            arg_9 = arg_3 * .4
            arg_10 = arg_3 * .2
            arg_8.moveto(arg_1, arg_2)
            arg_8.lineto(arg_1 - arg_9, arg_2 + arg_9)
            arg_8.lineto(arg_1 - arg_9, arg_2 + arg_10)
            arg_8.lineto(arg_1 - arg_3, arg_2 + arg_10)
            arg_8.lineto(arg_1 - arg_3, arg_2 - arg_10)
            arg_8.lineto(arg_1 - arg_9, arg_2 - arg_10)
            arg_8.lineto(arg_1 - arg_9, arg_2 - arg_9)
            arg_8.lineto(arg_1, arg_2)
        elif arg_4 == arg_0.FORTYFIVE:
            arg_9 = .3
            arg_10 = 1 + arg_9
            arg_8.moveto(arg_1, arg_2)
            arg_8.lineto(arg_1, arg_2 + arg_3 * (1 - arg_9))
            arg_8.lineto(arg_1 - arg_3 * arg_9, arg_2 + arg_3)
            arg_8.lineto(arg_1 - arg_3 * arg_9, arg_2 + arg_3 * arg_10 * .4)
            arg_8.lineto(arg_1 - arg_3 * arg_10 * .6, arg_2 + arg_3)
            arg_8.lineto(arg_1 - arg_3, arg_2 + arg_3 * arg_10 * .6)
            arg_8.lineto(arg_1 - arg_3 * arg_10 * .4, arg_2 + arg_3 * arg_9)
            arg_8.lineto(arg_1 - arg_3, arg_2 + arg_3 * arg_9)
            arg_8.lineto(arg_1 - arg_3 * (1 - arg_9), arg_2)
            arg_8.lineto(arg_1, arg_2)
        else:
            raise NameError(_("Func: available types for Func() are NORMAL and FORTYFIVE\n"))
        if arg_6:
            arg_8.draw()
        return arg_8

Draw an arrow.

        Arrows can be two types: NORMAL or FORTYFIVE.

        :param x: top left x-coordinate
        :param y: top left y-coordinate
        :param width: width of arrow
        :param type:  NORMAL or FORTYFIVE
        :draw:  If True draws arrow immediately

        :return: Path object representing the arrow.


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
isinstance
(
arg_2
,
numbers
.
Integral
)
:
arg_2
=
(
arg_2
,
)
if
arg_1
.
status_code
in
arg_2
:
return
arg_1
.
json
(
)
else
:
raise
RuntimeError
(
"Response has status "
"code {} not {}"
.
format
(
arg_1
.
status_code
,
arg_2
)
)

def Func(arg_0, arg_1, arg_2):
        """Extract JSON from response if `status_code` matches."""
        if isinstance(arg_2, numbers.Integral):
            arg_2 = (arg_2,)

        if arg_1.status_code in arg_2:
            return arg_1.json()
        else:
            raise RuntimeError("Response has status "
                               "code {} not {}".format(arg_1.status_code,
                                                       arg_2))

Extract JSON from response if status_code matches .


def Func(arg_0, arg_1, arg_2):
        """
        Transmit content metadata update to integrated channel.
        """
        for arg_3 in chunks(arg_1, arg_0.enterprise_configuration.transmission_chunk_size):
            arg_4 = arg_0._serialize_items(list(arg_3.values()))
            try:
                arg_0.client.update_content_metadata(arg_4)
            except ClientError as exc:
                LOGGER.error(
                    'Failed to update [%s] content metadata items for integrated channel [%s] [%s]',
                    len(arg_3),
                    arg_0.enterprise_configuration.enterprise_customer.name,
                    arg_0.enterprise_configuration.channel_code,
                )
                LOGGER.error(exc)
            else:
                arg_0._update_transmissions(arg_3, arg_2)

Transmit content metadata update to integrated channel .


def Func(arg_0, arg_1):
        """Asserts that val is of the given type."""
        if type(arg_1) is not type and\
                not issubclass(type(arg_1), type):
            raise TypeError('given arg must be a type')
        if type(arg_0.val) is not arg_1:
            if hasattr(arg_0.val, '__name__'):
                arg_2 = arg_0.val.__name__
            elif hasattr(arg_0.val, '__class__'):
                arg_2 = arg_0.val.__class__.__name__
            else:
                arg_2 = 'unknown'
            arg_0._err('Expected <%s:%s> to be of type <%s>, but was not.' % (arg_0.val, arg_2, arg_1.__name__))
        return arg_0


def Func(arg_0, arg_1):
    """Apply logging options produced by LogLevelAction and LogFileAction.

    More often then not this function is not needed, the actions have already
    been taken during the parse, but it can be used in the case they need to be
    applied again (e.g. when command line opts take precedence but were
    overridded by a fileConfig, etc.).
    """
    for arg_2, arg_3 in arg_0:
        arg_2.setLevel(arg_3)
    for arg_2, arg_4 in arg_1:
        for arg_5 in arg_2.handlers:
            arg_2.removeHandler(arg_5)
        arg_2.addHandler(arg_4)

Apply logging options produced by LogLevelAction and LogFileAction .


def Func(arg_0, **arg_1):
        """
        Get the cast and crew information for a specific movie id.

        Args:
            append_to_response: (optional) Comma separated, any movie method.

        Returns:
            A dict representation of the JSON returned from the API.
        """
        arg_2 = arg_0._get_id_path('Func')

        arg_3 = arg_0._GET(arg_2, arg_1)
        arg_0._set_attrs_to_values(arg_3)
        return arg_3

Get the cast and crew information for a specific movie id .


def Func(arg_0):
        """Roll up stats and log them."""
        arg_1 = time.time()
        if arg_1 < arg_0.next_Func:
            return

        arg_0.next_Func = arg_1 + arg_0.flush_interval

        for arg_3, arg_4 in sorted(arg_0.incr_stats.items()):
            arg_0.logger.info(
                '%s INCR %s: count:%d|rate:%d/%d',
                arg_0.leader,
                arg_3,
                len(arg_4),
                sum(arg_4),
                arg_0.flush_interval
            )
            arg_0.incr_stats[arg_3] = []

        for arg_3, arg_4 in sorted(arg_0.gauge_stats.items()):
            if arg_4:
                arg_0.logger.info(
                    '%s GAUGE %s: count:%d|current:%s|min:%s|max:%s',
                    arg_0.leader,
                    arg_3,
                    len(arg_4),
                    arg_4[-1],
                    min(arg_4),
                    max(arg_4),
                )
            else:
                arg_0.logger.info('%s (gauge) %s: no data', arg_0.leader, arg_3)

            arg_0.gauge_stats[arg_3] = []

        for arg_3, arg_4 in sorted(arg_0.histogram_stats.items()):
            if arg_4:
                arg_0.logger.info(
                    (
                        '%s HISTOGRAM %s: '
                        'count:%d|min:%.2f|avg:%.2f|median:%.2f|ninety-five:%.2f|max:%.2f'
                    ),
                    arg_0.leader,
                    arg_3,
                    len(arg_4),
                    min(arg_4),
                    statistics.mean(arg_4),
                    statistics.median(arg_4),
                    arg_4[int(len(arg_4) * 95 / 100)],
                    max(arg_4)
                )
            else:
                arg_0.logger.info('%s (histogram) %s: no data', arg_0.leader, arg_3)

            arg_0.histogram_stats[arg_3] = []


def
Func
(
arg_0
,
arg_1
)
:
_logger
.
debug
(
"Bootstrapping new database: %s"
,
arg_1
)
arg_0
.
database_uri
=
_urify_db
(
arg_1
)
arg_3
=
sa
.
create_engine
(
arg_0
.
database_uri
)
Base
.
metadata
.
create_all
(
arg_3
)

def Func(arg_0, arg_1):
        """ Initialize a database.

        :param database_path: The absolute path to the database to initialize.
        """
        _logger.debug("Bootstrapping new database: %s", arg_1)
        arg_0.database_uri = _urify_db(arg_1)
        arg_3 = sa.create_engine(arg_0.database_uri)
        Base.metadata.create_all(arg_3)


def Func(arg_0, arg_1):
    """ Initialize the encoders"""

    #Initializing scalar encoder
    if arg_0.encoderType in ['adaptiveScalar', 'scalar']:
      if 'minval' in arg_1:
        arg_0.minval = arg_1.pop('minval')
      else: arg_0.minval=None
      if 'maxval' in arg_1:
        arg_0.maxval = arg_1.pop('maxval')
      else: arg_0.maxval = None
      arg_0.encoder=adaptive_scalar.AdaptiveScalarEncoder(name='AdaptiveScalarEncoder', \
                                                         w=arg_0.w, n=arg_0.n, arg_2=arg_0.minval, arg_3=arg_0.maxval, periodic=False, forced=True)

    #Initializing category encoder
    elif arg_0.encoderType=='category':
      arg_0.encoder=sdr_category.SDRCategoryEncoder(name='categoryEncoder', \
                                                   w=arg_0.w, n=arg_0.n)

    #Initializing date encoder
    elif arg_0.encoderType in ['date', 'datetime']:
      arg_0.encoder=date.DateEncoder(name='dateEncoder')
    else:
      raise RuntimeError('Error in constructing class object. Either encoder type'
          'or dataType must be specified')


(name=None, authors=None, license=None, created=None,
    modified=None, gistid=None)

def Func ( arg_0 = None , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None ) : arg_6 = NotebookNode ( ) if arg_0 is not None : arg_6 . name = unicode ( arg_0 ) if arg_1 is not None : arg_6 . authors = list ( arg_1 ) if arg_3 is not None : arg_6 . created = unicode ( arg_3 ) if arg_4 is not None : arg_6 . modified = unicode ( arg_4 ) if arg_2 is not None : arg_6 . license = unicode ( arg_2 ) if arg_5 is not None : arg_6 . gistid = unicode ( arg_5 ) return arg_6

def Func(arg_0=None, arg_1=None, arg_2=None, arg_3=None,
    arg_4=None, arg_5=None):
    """Create a new metadata node."""
    arg_6 = NotebookNode()
    if arg_0 is not None:
        arg_6.name = unicode(arg_0)
    if arg_1 is not None:
        arg_6.authors = list(arg_1)
    if arg_3 is not None:
        arg_6.created = unicode(arg_3)
    if arg_4 is not None:
        arg_6.modified = unicode(arg_4)
    if arg_2 is not None:
        arg_6.license = unicode(arg_2)
    if arg_5 is not None:
        arg_6.gistid = unicode(arg_5)
    return arg_6


return ast.copy_location(
            ast.Try(
                body=_filter_dead_code(new_node.body),
                handlers=new_node.handlers,
                orelse=_filter_dead_code(new_node.orelse),
                finalbody=_filter_dead_code(new_node.finalbody),
            ),
            new_node,
        )

def Func ( arg_0 , arg_1 : arg_2 . Try ) -> Optional [ arg_2 . AST ] : arg_4 = arg_0 . generic_visit ( arg_1 ) assert isinstance ( arg_4 , arg_2 . Try ) return arg_2 . copy_location ( arg_2 . Try ( body = _filter_dead_code ( arg_4 . body ) , handlers = arg_4 . handlers , orelse = _filter_dead_code ( arg_4 . orelse ) , finalbody = _filter_dead_code ( arg_4 . finalbody ) , ) , arg_4 , )

def Func(arg_0, arg_1: arg_2.Try) -> Optional[arg_2.AST]:
        """Eliminate dead code from except try bodies."""
        arg_4 = arg_0.generic_visit(arg_1)
        assert isinstance(arg_4, arg_2.Try)
        return arg_2.copy_location(
            arg_2.Try(
                body=_filter_dead_code(arg_4.body),
                handlers=arg_4.handlers,
                orelse=_filter_dead_code(arg_4.orelse),
                finalbody=_filter_dead_code(arg_4.finalbody),
            ),
            arg_4,
        )

Eliminate dead code from except try bodies .


def Func ( arg_0 , arg_1 , arg_2 = None ) : from airflow . models . taskinstance import TaskInstance arg_3 = TaskInstance arg_4 = arg_2 . query ( arg_3 ) . filter ( arg_3 . dag_id == arg_0 . dag_id , arg_3 . execution_date == arg_0 . execution_date , arg_3 . task_id == arg_1 ) . first ( ) return arg_4

def Func(arg_0, arg_1, arg_2=None):
        """
        Returns the task instance specified by task_id for this dag run

        :param task_id: the task id
        """

        from airflow.models.taskinstance import TaskInstance  # Avoid circular import
        arg_3 = TaskInstance
        arg_4 = arg_2.query(arg_3).filter(
            arg_3.dag_id == arg_0.dag_id,
            arg_3.execution_date == arg_0.execution_date,
            arg_3.task_id == arg_1
        ).first()

        return arg_4


(self, topologyName, callback, isWatching)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
arg_0
.
get_execution_state_path
(
arg_1
)
if
arg_3
:
LOG
.
info
(
"Adding data watch for path: "
+
arg_4
)
@
arg_0
.
client
.
DataWatch
(
arg_4
)
def
watch_execution_state
(
arg_5
,
arg_6
)
:
if
arg_5
:
arg_7
=
ExecutionState
(
)
arg_7
.
ParseFromString
(
arg_5
)
arg_2
(
arg_7
)
else
:
arg_2
(
)
return
arg_3

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Helper function to get execution state with
    a callback. The future watch is placed
    only if isWatching is True.
    """
    arg_4 = arg_0.get_execution_state_path(arg_1)
    if arg_3:
      LOG.info("Adding data watch for path: " + arg_4)

    # pylint: disable=unused-variable, unused-argument
    @arg_0.client.DataWatch(arg_4)
    def watch_execution_state(arg_5, arg_6):
      """ invoke callback to watch execute state """
      if arg_5:
        arg_7 = ExecutionState()
        arg_7.ParseFromString(arg_5)
        arg_2(arg_7)
      else:
        arg_2(None)

      # Returning False will result in no future watches
      # being triggered. If isWatching is True, then
      # the future watches will be triggered.
      return arg_3

Helper function to get execution state with a callback . The future watch is placed only if isWatching is True .


return self.application.options.upstream + self.request.uri

def Func ( arg_0 , arg_1 ) : return arg_0 . application . options . upstream + arg_0 . request . uri

def Func(arg_0, arg_1):
        "Returns the URL to the upstream data source for the given URI based on configuration"
        return arg_0.application.options.upstream + arg_0.request.uri


return ('ETag' in remoteKey and remoteKey['ETag'] == '"%s"' % localmd5) or \
           ('md5' in remoteKey and remoteKey['md5'] == localmd5) or \
           ('md5' in remoteKey['Metadata'] and remoteKey['Metadata']['md5'] == localmd5)

def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_2 : return False if not os . path . exists ( arg_1 . filename ) : return False arg_3 = arg_1 . get_md5 ( ) return ( 'ETag' in arg_2 and arg_2 [ 'ETag' ] == '"%s"' % arg_3 ) or ( 'md5' in arg_2 and arg_2 [ 'md5' ] == arg_3 ) or ( 'md5' in arg_2 [ 'Metadata' ] and arg_2 [ 'Metadata' ] [ 'md5' ] == arg_3 )

def Func(arg_0, arg_1, arg_2):
    '''Check MD5 for a local file and a remote file.
       Return True if they have the same md5 hash, otherwise False.
    '''
    if not arg_2:
      return False
    if not os.path.exists(arg_1.filename):
      return False
    arg_3 = arg_1.get_md5()

    # check multiple md5 locations
    return ('ETag' in arg_2 and arg_2['ETag'] == '"%s"' % arg_3) or \
           ('md5' in arg_2 and arg_2['md5'] == arg_3) or \
           ('md5' in arg_2['Metadata'] and arg_2['Metadata']['md5'] == arg_3)

Check MD5 for a local file and a remote file . Return True if they have the same md5 hash otherwise False .


def Func ( arg_0 , arg_1 ) : arg_2 = H2OFrame . _expr ( expr = ExprNode ( "Func" , arg_0 , arg_1 ) ) arg_2 . _ex . _cache . nrows = arg_0 . nrow return arg_2

def Func(arg_0, arg_1):
        """
        Split the strings in the target column on the given regular expression pattern.

        :param str pattern: The split pattern.
        :returns: H2OFrame containing columns of the split strings.
        """
        arg_2 = H2OFrame._expr(expr=ExprNode("Func", arg_0, arg_1))
        arg_2._ex._cache.nrows = arg_0.nrow
        return arg_2

Split the strings in the target column on the given regular expression pattern .


(
    ctx: GeneratorContext, params: Iterable[Binding], body: Do
)

def
Func
(
arg_0
:
arg_1
,
arg_2
:
arg_3
[
arg_4
]
,
arg_5
:
arg_6
)
->
Tuple
[
List
[
ast
.
arg
]
,
Optional
[
ast
.
arg
]
,
List
[
ast
.
AST
]
]
:
arg_7
,
arg_8
=
[
]
,
arg_9
:
List
[
ast
.
AST
]
=
[
]
for
arg_10
in
arg_2
:
assert
arg_10
.
init
is
,
":fn nodes cannot have bindint :inits"
assert
arg_8
is
,
"Must have at most one variadic arg"
arg_11
=
genname
(
munge
(
arg_10
.
name
)
)
if
not
arg_10
.
is_variadic
:
arg_7
.
append
(
ast
.
arg
(
arg
=
arg_11
,
annotation
=
)
)
arg_0
.
symbol_table
.
new_symbol
(
sym
.
symbol
(
arg_10
.
name
)
,
arg_11
,
LocalType
.
ARG
)
else
:
arg_8
=
ast
.
arg
(
arg
=
arg_11
,
annotation
=
)
arg_12
=
genname
(
munge
(
arg_10
.
name
)
)
arg_9
.
append
(
ast
.
Assign
(
targets
=
[
ast
.
Name
(
id
=
arg_12
,
arg_0
=
ast
.
Store
(
)
)
]
,
value
=
ast
.
Call
(
func
=
_COLLECT_ARGS_FN_NAME
,
args
=
[
ast
.
Name
(
id
=
arg_11
,
arg_0
=
ast
.
Load
(
)
)
]
,
keywords
=
[
]
,
)
,
)
)
arg_0
.
symbol_table
.
new_symbol
(
sym
.
symbol
(
arg_10
.
name
)
,
arg_12
,
LocalType
.
ARG
)
arg_13
=
_synthetic_do_to_py_ast
(
arg_0
,
arg_5
)
arg_9
.
extend
(
map
(
statementize
,
arg_13
.
dependencies
)
)
arg_9
.
append
(
ast
.
Return
(
value
=
arg_13
.
node
)
)
return
arg_7
,
arg_8
,
arg_9

def Func(
    arg_0: arg_1, arg_2: arg_3[arg_4], arg_5: arg_6
) -> Tuple[List[ast.arg], Optional[ast.arg], List[ast.AST]]:
    """Generate a list of Python AST nodes from function method parameters."""
    arg_7, arg_8 = [], None
    arg_9: List[ast.AST] = []
    for arg_10 in arg_2:
        assert arg_10.init is None, ":fn nodes cannot have bindint :inits"
        assert arg_8 is None, "Must have at most one variadic arg"
        arg_11 = genname(munge(arg_10.name))

        if not arg_10.is_variadic:
            arg_7.append(ast.arg(arg=arg_11, annotation=None))
            arg_0.symbol_table.new_symbol(
                sym.symbol(arg_10.name), arg_11, LocalType.ARG
            )
        else:
            arg_8 = ast.arg(arg=arg_11, annotation=None)
            arg_12 = genname(munge(arg_10.name))
            arg_9.append(
                ast.Assign(
                    targets=[ast.Name(id=arg_12, arg_0=ast.Store())],
                    value=ast.Call(
                        func=_COLLECT_ARGS_FN_NAME,
                        args=[ast.Name(id=arg_11, arg_0=ast.Load())],
                        keywords=[],
                    ),
                )
            )
            arg_0.symbol_table.new_symbol(
                sym.symbol(arg_10.name), arg_12, LocalType.ARG
            )

    arg_13 = _synthetic_do_to_py_ast(arg_0, arg_5)
    arg_9.extend(map(statementize, arg_13.dependencies))
    arg_9.append(ast.Return(value=arg_13.node))

    return arg_7, arg_8, arg_9

Generate a list of Python AST nodes from function method parameters .


return GeneratedPyAST(
        node=ast.Name(id=try_expr_name, ctx=ast.Load()),
        dependencies=[
            ast.Try(
                body=list(
                    chain(
                        body_ast.dependencies,
                        [
                            ast.Assign(
                                targets=[ast.Name(id=try_expr_name, ctx=ast.Store())],
                                value=body_ast.node,
                            )
                        ],
                    )
                ),
                handlers=catch_handlers,
                orelse=[],
                finalbody=finallys,
            )
        ],
    )

def Func ( arg_0 : arg_1 , arg_2 : arg_3 ) -> GeneratedPyAST : assert arg_2 . op == NodeOp . TRY arg_4 = genname ( "try_expr" ) arg_5 = _synthetic_do_to_py_ast ( arg_0 , arg_2 . body ) arg_6 = list ( map ( partial ( __catch_to_py_ast , arg_0 , arg_4 = arg_4 ) , arg_2 . catches ) ) arg_7 : List [ ast . AST ] = [ ] if arg_2 . finally_ is not None : arg_8 = _synthetic_do_to_py_ast ( arg_0 , arg_2 . finally_ ) arg_7 . extend ( map ( statementize , arg_8 . dependencies ) ) arg_7 . append ( statementize ( arg_8 . node ) ) return GeneratedPyAST ( arg_2 = ast . Name ( id = arg_4 , arg_0 = ast . Load ( ) ) , dependencies = [ ast . Try ( body = list ( chain ( arg_5 . dependencies , [ ast . Assign ( targets = [ ast . Name ( id = arg_4 , arg_0 = ast . Store ( ) ) ] , value = arg_5 . node , ) ] , ) ) , handlers = arg_6 , orelse = [ ] , finalbody = arg_7 , ) ] , )

def Func(arg_0: arg_1, arg_2: arg_3) -> GeneratedPyAST:
    """Return a Python AST Node for a `try` expression."""
    assert arg_2.op == NodeOp.TRY

    arg_4 = genname("try_expr")

    arg_5 = _synthetic_do_to_py_ast(arg_0, arg_2.body)
    arg_6 = list(
        map(partial(__catch_to_py_ast, arg_0, arg_4=arg_4), arg_2.catches)
    )

    arg_7: List[ast.AST] = []
    if arg_2.finally_ is not None:
        arg_8 = _synthetic_do_to_py_ast(arg_0, arg_2.finally_)
        arg_7.extend(map(statementize, arg_8.dependencies))
        arg_7.append(statementize(arg_8.node))

    return GeneratedPyAST(
        arg_2=ast.Name(id=arg_4, arg_0=ast.Load()),
        dependencies=[
            ast.Try(
                body=list(
                    chain(
                        arg_5.dependencies,
                        [
                            ast.Assign(
                                targets=[ast.Name(id=arg_4, arg_0=ast.Store())],
                                value=arg_5.node,
                            )
                        ],
                    )
                ),
                handlers=arg_6,
                orelse=[],
                finalbody=arg_7,
            )
        ],
    )

Return a Python AST Node for a try expression .


return report.format(
            dag_folder=self.dag_folder,
            duration=sum([o.duration for o in stats]),
            dag_num=sum([o.dag_num for o in stats]),
            task_num=sum([o.task_num for o in stats]),
            table=pprinttable(stats),
        )

def Func(arg_0):
        """Prints a report around DagBag loading stats"""
        arg_1 = textwrap.dedent("""\n
        -------------------------------------------------------------------
        DagBag loading stats for {dag_folder}
        -------------------------------------------------------------------
        Number of DAGs: {dag_num}
        Total task number: {task_num}
        DagBag parsing time: {duration}
        {table}
        """)
        arg_2 = arg_0.dagbag_stats
        return arg_1.format(
            dag_folder=arg_0.dag_folder,
            duration=sum([arg_3.duration for arg_3 in arg_2]),
            dag_num=sum([arg_3.dag_num for arg_3 in arg_2]),
            task_num=sum([arg_3.task_num for arg_3 in arg_2]),
            table=pprinttable(arg_2),
        )


def Func ( arg_0 , arg_1 ) : try : arg_2 = os . path . getmtime ( arg_0 ) except os . error : return 1 for arg_3 in arg_1 : arg_4 = os . path . getmtime ( arg_3 ) if arg_4 > arg_2 : return 1 return 0

def Func(arg_0,arg_1):
    """Determine whether a target is out of date.

    Func(target,deps) -> 1/0

    deps: list of filenames which MUST exist.
    target: single filename which may or may not exist.

    If target doesn't exist or is older than any file listed in deps, return
    true, otherwise return false.
    """
    try:
        arg_2 = os.path.getmtime(arg_0)
    except os.error:
        return 1
    for arg_3 in arg_1:
        arg_4 = os.path.getmtime(arg_3)
        if arg_4 > arg_2:
            #print "For target",target,"Dep failed:",dep # dbg
            #print "times (dep,tar):",dep_time,target_time # dbg
            return 1
    return 0

Determine whether a target is out of date.

    target_outdated(target,deps) -> 1/0

    deps: list of filenames which MUST exist.
    target: single filename which may or may not exist.

    If target doesn't exist or is older than any file listed in deps, return
    true, otherwise return false.

Determine whether a target is out of date .


Retrieve a read-only subordinate mapping.  All values are
        stringified, and sensitive values are masked.  The subordinate
        mapping implements the context manager protocol for
        convenience.

def Func ( arg_0 ) : if arg_0 . _Func is None : arg_0 . _Func = MaskedDict ( arg_0 ) return arg_0 . _Func

def Func(arg_0):
        """
        Retrieve a read-only subordinate mapping.  All values are
        stringified, and sensitive values are Func.  The subordinate
        mapping implements the context manager protocol for
        convenience.
        """

        if arg_0._Func is None:
            arg_0._Func = MaskedDict(arg_0)

        return arg_0._Func

Retrieve a read - only subordinate mapping . All values are stringified and sensitive values are masked . The subordinate mapping implements the context manager protocol for convenience .


def
Func
(
arg_0
,
arg_1
)
:
LOG
.
info
(
'Func %s for tenant %s'
%
(
arg_1
,
arg_0
.
tenant_id
)
)
_delete_flip
(
arg_0
,
arg_1
,
ip_types
.
FLOATING
)

def Func(arg_0, arg_1):
    """deallocate a floating IP.

    :param context: neutron api request context.
    :param id: id of the floating ip
    """

    LOG.info('Func %s for tenant %s' % (arg_1, arg_0.tenant_id))

    _delete_flip(arg_0, arg_1, ip_types.FLOATING)


def Func(arg_0, arg_1, arg_2=True):
    '''
    Copy a file locally to a directory.

    :param unicode source_filename:
        The filename to copy from.

    :param unicode target_filename:
        The filename to copy to.

    :param bool copy_symlink:
        If True and source_filename is a symlink, target_filename will also be created as
        a symlink.

        If False, the file being linked will be copied instead.
    '''
    import shutil
    try:
        # >>> Create the target_filename directory if necessary
        arg_3 = os.path.dirname(arg_1)
        if arg_3 and not os.path.isdir(arg_3):
            os.makedirs(arg_3)

        if arg_2 and IsLink(arg_0):
            # >>> Delete the target_filename if it already exists
            if os.path.isfile(arg_1) or IsLink(arg_1):
                DeleteFile(arg_1)

            # >>> Obtain the relative path from link to source_filename (linkto)
            arg_0 = ReadLink(arg_0)
            CreateLink(arg_0, arg_1)
        else:
            # shutil can't copy links in Windows, so we must find the real file manually
            if sys.platform == 'win32':
                while IsLink(arg_0):
                    arg_4 = ReadLink(arg_0)
                    if os.path.isabs(arg_4):
                        arg_0 = arg_4
                    else:
                        arg_0 = os.path.join(os.path.dirname(arg_0), arg_4)

            shutil.copyfile(arg_0, arg_1)
            shutil.copymode(arg_0, arg_1)
    except Exception as e:
        reraise(e, 'While executiong _filesystem.Func(%s, %s)' % (arg_0, arg_1))


(subgraphs: Mapping[str, BELGraph],
                                        genes: List[Gene],
                                        ora_weight: Optional[float] = None,
                                        hub_weight: Optional[float] = None,
                                        top_percent: Optional[float] = None,
                                        topology_weight: Optional[float] = None,
                                        )

return {
        name: get_neurommsig_score(
            graph=subgraph,
            genes=genes,
            ora_weight=ora_weight,
            hub_weight=hub_weight,
            top_percent=top_percent,
            topology_weight=topology_weight,
        )
        for name, subgraph in subgraphs.items()
    }

def Func(arg_0: arg_1[arg_2, arg_3],
                                        arg_4: arg_5[arg_6],
                                        arg_7: arg_8[arg_9] = None,
                                        arg_10: arg_8[arg_9] = None,
                                        arg_11: arg_8[arg_9] = None,
                                        arg_12: arg_8[arg_9] = None,
                                        ) -> arg_8[arg_1[arg_2, arg_9]]:
    """Takes a graph stratification and runs neurommsig on each

    :param subgraphs: A pre-stratified set of graphs
    :param genes: A list of gene nodes
    :param ora_weight: The relative weight of the over-enrichment analysis score from
     :py:func:`neurommsig_gene_ora`. Defaults to 1.0.
    :param hub_weight: The relative weight of the hub analysis score from :py:func:`neurommsig_hubs`.
     Defaults to 1.0.
    :param top_percent: The percentage of top genes to use as hubs. Defaults to 5% (0.05).
    :param topology_weight: The relative weight of the topolgical analysis core from
     :py:func:`neurommsig_topology`. Defaults to 1.0.
    :return: A dictionary from {annotation value: NeuroMMSig composite score}

    Pre-processing steps:

    1. Infer the central dogma with :func:``
    2. Collapse all proteins, RNAs and miRNAs to genes with :func:``
    3. Collapse variants to genes with :func:``
    """
    return {
        arg_13: get_neurommsig_score(
            graph=arg_14,
            arg_4=arg_4,
            arg_7=arg_7,
            arg_10=arg_10,
            arg_11=arg_11,
            arg_12=arg_12,
        )
        for arg_13, arg_14 in arg_0.items()
    }


def
Func
(
arg_0
)
:
if
not
arg_0
.
__initialized
:
raise
RuntimeError
(
"thread.__init__() not called"
)
if
arg_0
.
__Funced
.
is_set
(
)
:
raise
RuntimeError
(
"threads can only be Funced once"
)
if
__debug__
:
arg_0
.
_note
(
"%s.Func(): Funcing thread"
,
arg_0
)
with
_active_limbo_lock
:
arg_1
[
arg_0
]
=
arg_0
try
:
_Func_new_thread
(
arg_0
.
__bootstrap
,
(
)
)
except
Exception
:
with
_active_limbo_lock
:
del
arg_1
[
arg_0
]
raise
arg_0
.
__Funced
.
wait
(
)

def Func(arg_0):
        """Start the thread's activity.

        It must be called at most once per thread object. It arranges for the
        object's run() method to be invoked in a separate thread of control.

        This method will raise a RuntimeError if called more than once on the
        same thread object.

        """
        if not arg_0.__initialized:
            raise RuntimeError("thread.__init__() not called")
        if arg_0.__Funced.is_set():
            raise RuntimeError("threads can only be Funced once")
        if __debug__:
            arg_0._note("%s.Func(): Funcing thread", arg_0)
        with _active_limbo_lock:
            arg_1[arg_0] = arg_0
        try:
            _Func_new_thread(arg_0.__bootstrap, ())
        except Exception:
            with _active_limbo_lock:
                del arg_1[arg_0]
            raise
        arg_0.__Funced.wait()


(ra, dec,
                        epoch_one, epoch_two,
                        jd=None,
                        mu_ra=0.0,
                        mu_dec=0.0,
                        outscalar=False)

def Func(arg_0, arg_1,
                        arg_2, arg_3,
                        arg_4=None,
                        arg_5=0.0,
                        arg_6=0.0,
                        arg_7=False):
    '''Precesses target coordinates `ra`, `dec` from `epoch_one` to `epoch_two`.

    This takes into account the jd of the observations, as well as the proper
    motion of the target mu_ra, mu_dec. Adapted from J. D. Hartman's
    VARTOOLS/converttime.c [coordprecess].

    Parameters
    ----------

    ra,dec : float
        The equatorial coordinates of the object at `epoch_one` to precess in
        decimal degrees.

    epoch_one : float
        Origin epoch to precess from to target epoch. This is a float, like:
        1985.0, 2000.0, etc.

    epoch_two : float
        Target epoch to precess from origin epoch. This is a float, like:
        2000.0, 2018.0, etc.

    jd : float
        The full Julian date to use along with the propermotions in `mu_ra`, and
        `mu_dec` to handle proper motion along with the coordinate frame
        precession. If one of `jd`, `mu_ra`, or `mu_dec` is missing, the proper
        motion will not be used to calculate the final precessed coordinates.

    mu_ra,mu_dec : float
        The proper motion in mas/yr in right ascension and declination. If these
        are provided along with `jd`, the total proper motion of the object will
        be taken into account to calculate the final precessed coordinates.

    outscalar : bool
        If True, converts the output coordinates from one-element np.arrays to
        scalars.

    Returns
    -------

    precessed_ra, precessed_dec : float
        A tuple of precessed equatorial coordinates in decimal degrees at
        `epoch_two` taking into account proper motion if `jd`, `mu_ra`, and
        `mu_dec` are provided.

    '''

    arg_8, arg_9 = np.radians(arg_0), np.radians(arg_1)

    if ((arg_5 != 0.0) and (arg_6 != 0.0) and arg_4):

        arg_10 = JD2000 + (arg_2 - arg_3)*365.25
        arg_8 = (
            arg_8 +
            (arg_4 - arg_10)*arg_5*MAS_P_YR_TO_RAD_P_DAY/np.cos(arg_9)
        )
        arg_9 = arg_9 + (arg_4 - arg_10)*arg_6*MAS_P_YR_TO_RAD_P_DAY

    arg_11 = np.cos(arg_8)
    arg_12 = np.cos(arg_9)
    arg_13 = np.sin(arg_8)
    arg_14 = np.sin(arg_9)

    if arg_2 != arg_3:

        arg_15 = 1.0e-3 * (arg_3 - arg_2)
        arg_16 = 1.0e-3 * (arg_2 - 2000.0)

        arg_17 = ( arg_15*ARCSEC_TO_RADIANS * (23062.181 + arg_16*(139.656 + 0.0139*arg_16) +
                                      arg_15*(30.188 - 0.344*arg_16+17.998*arg_15)) )
        arg_18 = arg_15*arg_15*ARCSEC_TO_RADIANS*(79.280 + 0.410*arg_16 + 0.205*arg_15) + arg_17
        arg_19 = (
            ARCSEC_TO_RADIANS*arg_15*(20043.109 - arg_16*(85.33 + 0.217*arg_16) +
                                  arg_15*(-42.665 - 0.217*arg_16 - 41.833*arg_16))
        )
        arg_20, arg_21, arg_22 = np.sin(arg_17), np.sin(arg_18), np.sin(arg_19)
        arg_23, arg_24, arg_25 = np.cos(arg_17), np.cos(arg_18), np.cos(arg_19)

        arg_26 = np.matrix([[arg_23*arg_24*arg_25 - arg_20*arg_21,
                                 arg_20*arg_24 + arg_23*arg_21*arg_25,
                                 arg_23*arg_22],
                                [-arg_23*arg_21 - arg_20*arg_24*arg_25,
                                 arg_23*arg_24 - arg_20*arg_21*arg_25,
                                 -arg_20*arg_22],
                                [-arg_24*arg_22,
                                 -arg_21*arg_22,
                                 arg_25]])

        arg_26 = arg_26.transpose()

        arg_27 = (np.matrix([arg_12*arg_11, arg_12*arg_13, arg_14])).transpose()

        arg_28 = arg_26 * arg_27

        arg_29 = np.arctan2(arg_28[1],arg_28[0])
        arg_30 = np.arcsin(arg_28[2])

        arg_31 = np.rad2deg(arg_29)
        arg_32 = np.rad2deg(arg_30)

        if arg_31 < 0.0:
            arg_31 = arg_31 + 360.0

        if arg_7:
            return float(arg_31), float(arg_32)
        else:
            return arg_31, arg_32

    else:

        # if the epochs are the same and no proper motion, this will be the same
        # as the input values. if the epochs are the same, but there IS proper
        # motion (and a given JD), then these will be perturbed from the input
        # values of ra, dec by the appropriate amount of motion
        return np.degrees(arg_8), np.degrees(arg_9)

Precesses target coordinates ra dec from epoch_one to epoch_two .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . _Func >= arg_1 : print ( arg_2 , file = sys . stderr )

def Func(arg_0, arg_1, arg_2):
        """
        Emit a Funcging message depending on the Funcging level.

        :param level: The Funcging level.
        :param message: The message to emit.
        """

        if arg_0._Func >= arg_1:
            print(arg_2, file=sys.stderr)

Emit a debugging message depending on the debugging level.

        :param level: The debugging level.
        :param message: The message to emit.

Emit a debugging message depending on the debugging level .


(self, max_rates, populations, bg_rate,
                                rs=None, seed=1, chunksize=2**16,
                                comp_filter=None, overwrite=False,
                                skip_existing=False, scale=10,
                                path=None, t_chunksize=None, timeslice=None)

def Func(arg_0, arg_1, arg_2, arg_3,
                                arg_4=None, arg_5=1, arg_6=2**16,
                                arg_7=None, arg_8=False,
                                arg_9=False, arg_10=10,
                                arg_11=None, arg_12=None, arg_13=None):
        """Compute one timestamps array for a mixture of N populations.

        Timestamp data are saved to disk and accessible as pytables arrays in
        `._timestamps` and `._tparticles`.
        The background generated timestamps are assigned a
        conventional particle number (last particle index + 1).

        Arguments:
            max_rates (list): list of the peak max emission rate for each
                population.
            populations (list of slices): slices to `self.particles`
                defining each population.
            bg_rate (float, cps): rate for a Poisson background process
            rs (RandomState object): random state object used as random number
                generator. If None, use a random state initialized from seed.
            seed (uint): when `rs` is None, `seed` is used to initialize the
                random state, otherwise is ignored.
            chunksize (int): chunk size used for the on-disk timestamp array
            comp_filter (tables.Filter or None): compression filter to use
                for the on-disk `timestamps` and `tparticles` arrays.
                If None use default compression.
            overwrite (bool): if True, overwrite any pre-existing timestamps
                array. If False, never overwrite. The outcome of simulating an
                existing array is controlled by `skip_existing` flag.
            skip_existing (bool): if True, skip simulation if the same
                timestamps array is already present.
            scale (int): `self.t_step` is multiplied by `scale` to obtain the
                timestamps units in seconds.
            path (string): folder where to save the data.
            timeslice (float or None): timestamps are simulated until
                `timeslice` seconds. If None, simulate until `self.t_max`.
        """
        arg_0.open_store_timestamp(arg_6=arg_6, arg_11=arg_11)
        arg_4 = arg_0._get_group_randomstate(arg_4, arg_5, arg_0.ts_group)
        if arg_12 is None:
            arg_12 = arg_0.emission.chunkshape[1]
        arg_14 = arg_0.n_samples
        if arg_13 is not None:
            arg_14 = arg_13 // arg_0.t_step

        arg_15 = arg_0._get_ts_name_mix(arg_1, arg_2, arg_3, arg_4=arg_4)
        arg_16 = dict(arg_15=arg_15, clk_p=arg_0.t_step / arg_10,
                  arg_1=arg_1, arg_3=arg_3, arg_2=arg_2,
                  num_particles=arg_0.num_particles,
                  bg_particle=arg_0.num_particles,
                  arg_8=arg_8, arg_6=arg_6)
        if arg_7 is not None:
            arg_16.update(arg_7=arg_7)
        try:
            arg_0._timestamps, arg_0._tparticles = (arg_0.ts_store
                                                  .add_timestamps(**arg_16))
        except ExistingArrayError as e:
            if arg_9:
                print(' - Skipping already present timestamps array.')
                return
            else:
                raise e

        arg_0.ts_group._v_attrs['init_random_state'] = arg_4.get_state()
        arg_0._timestamps.attrs['init_random_state'] = arg_4.get_state()
        arg_0._timestamps.attrs['PyBroMo'] = __version__

        arg_22, arg_23 = [], []
        # Load emission in chunks, and save only the final timestamps
        arg_24 = [None] * (len(arg_1) - 1) + [arg_3]
        arg_25 = 0
        for arg_26, arg_27 in iter_chunk_index(arg_14, arg_12):

            arg_28 = np.around(arg_26 * arg_0.t_step, decimals=0)
            if arg_28 > arg_25:
                print(' %.1fs' % arg_28, end='', flush=True)
                arg_25 = arg_28

            arg_29 = arg_0.emission[:, arg_26:arg_27]

            arg_30, arg_31 = \
                arg_0._sim_timestamps_populations(
                    arg_29, arg_1, arg_2, arg_24, arg_26,
                    arg_4, arg_10)

            # Save sorted timestamps (suffix '_s') and corresponding particles
            arg_22.append(arg_30)
            arg_23.append(arg_31)

        for arg_32, arg_33 in zip(arg_22, arg_23):
            arg_0._timestamps.append(arg_32)
            arg_0._tparticles.append(arg_33)

        # Save current random state so it can be resumed in the next session
        arg_0.ts_group._v_attrs['last_random_state'] = arg_4.get_state()
        arg_0._timestamps.attrs['last_random_state'] = arg_4.get_state()
        arg_0.ts_store.h5file.flush()

Compute one timestamps array for a mixture of N populations .


def Func(arg_0, **arg_1):
        """
        Get the primary Funcrmation about a TV episode by combination of a
        season and episode number.

        Args:
            language: (optional) ISO 639 code.
            append_to_response: (optional) Comma separated, any TV series
                                method.

        Returns:
            A dict respresentation of the JSON returned from the API.
        """
        arg_2 = arg_0._get_series_id_season_number_episode_number_path('Func')

        arg_3 = arg_0._GET(arg_2, arg_1)
        arg_0._set_attrs_to_values(arg_3)
        return arg_3

Get the primary information about a TV episode by combination of a
        season and episode number.

        Args:
            language: (optional) ISO 639 code.
            append_to_response: (optional) Comma separated, any TV series
                                method.

        Returns:
            A dict respresentation of the JSON returned from the API.

Get the primary information about a TV episode by combination of a season and episode number .


def
Func
(
arg_0
=
)
:
if
not
arg_0
:
arg_0
=
user_name
(
)
else
:
arg_0
=
arg_0
.
strip
(
)
.
replace
(
' '
,
'_'
)
.
lower
(
)
return
arg_0
+
'@'
+
domain_name
(
)

def Func(arg_0=None):
    """Return random e-mail address in a hopefully imaginary domain.

    If `user` is ``None`` :py:func:`~user_name()` will be used. Otherwise it
    will be lowercased and will have spaces replaced with ``_``.

    Domain name is created using :py:func:`~domain_name()`.
    """
    if not arg_0:
        arg_0 = user_name()
    else:
        arg_0 = arg_0.strip().replace(' ', '_').lower()

    return arg_0 + '@' + domain_name()

Return random e - mail address in a hopefully imaginary domain .


(cls, human_readable_str, decimal=False, bits=False)

return cls(round(num * divisor ** cls.key[c.lower()]))

def Func ( arg_0 , arg_1 , arg_2 = False , arg_3 = False ) : arg_4 = 1000 if arg_2 else 1024 arg_5 = [ ] arg_6 = "" for arg_6 in arg_1 : if arg_6 not in arg_0 . digits : break arg_5 . append ( arg_6 ) arg_5 = "" . join ( arg_5 ) try : arg_5 = int ( arg_5 ) except ValueError : arg_5 = float ( arg_5 ) if arg_3 : arg_5 /= 8 return arg_0 ( round ( arg_5 * arg_4 ** arg_0 . key [ arg_6 . lower ( ) ] ) )

def Func(arg_0, arg_1, arg_2=False, arg_3=False):
        """attempt to parse a size in bytes from a human-readable string."""
        arg_4 = 1000 if arg_2 else 1024
        arg_5 = []
        arg_6 = ""
        for arg_6 in arg_1:
            if arg_6 not in arg_0.digits:
                break
            arg_5.append(arg_6)
        arg_5 = "".join(arg_5)
        try:
            arg_5 = int(arg_5)
        except ValueError:
            arg_5 = float(arg_5)
        if arg_3:
            arg_5 /= 8
        return arg_0(round(arg_5 * arg_4 ** arg_0.key[arg_6.lower()]))

attempt to parse a size in bytes from a human - readable string .


def Func(arg_0):
        """Try to find a pattern that matches the source and calll a parser
        method to create Python objects.

        A callback that raises an IgnoredMatchException indicates that the
        given string data is ignored by the parser and no objects are created.

        If none of the pattern match a NoMatchException is raised.
        """
        for arg_1, arg_2 in arg_0.rules:
            arg_3 = arg_1.match(arg_0.source, pos=arg_0.pos)

            if not arg_3:
                continue

            try:
                arg_4 = arg_2(arg_3)
            except IgnoredMatchException:
                pass
            else:
                arg_0.seen.append(arg_4)

            return arg_3

        raise NoMatchException(
            'None of the known patterns match for {}'
            ''.format(arg_0.source[arg_0.pos:])
        )

Try to find a pattern that matches the source and calll a parser method to create Python objects .


def Func ( arg_0 ) : arg_1 = [ ] arg_2 = [ ] for arg_3 in arg_0 : arg_1 . append ( arg_3 [ 0 ] ) arg_2 . append ( arg_3 [ 1 : ] ) return arg_1 , arg_2

def Func(arg_0):
    """Parse darknet annotation format into two lists for class and bounding box.

    Input list of [[class, x, y, w, h], ...], return two list of [class ...] and [[x, y, w, h], ...].

    Parameters
    ------------
    annotations : list of list
        A list of class and bounding boxes of images e.g. [[class, x, y, w, h], ...]

    Returns
    -------
    list of int
        List of class labels.

    list of list of 4 numbers
        List of bounding box.

    """
    arg_1 = []
    arg_2 = []
    for arg_3 in arg_0:
        arg_1.append(arg_3[0])
        arg_2.append(arg_3[1:])
    return arg_1, arg_2

Parse darknet annotation format into two lists for class and bounding box .


def
Func
(
arg_0
)
:
if
arg_0
[
0
]
.
lower
(
)
!=
"Func"
:
arg_0
.
insert
(
0
,
"Func"
)
else
:
arg_0
[
0
]
=
"Func"
try
:
logger
.
info
(
"Executing: %s"
,
" "
.
join
(
arg_0
)
)
arg_1
=
subprocess
.
Popen
(
arg_0
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
arg_2
=
arg_1
.
wait
(
)
if
arg_1
.
stderr
is
not
:
logger
.
info
(
arg_1
.
stderr
)
if
arg_2
==
0
:
return
True
else
:
logger
.
info
(
"Play returned with error code %s"
,
arg_2
)
return
False
except
OSError
as
error_msg
:
logger
.
error
(
"OSError: Play failed! %s"
,
error_msg
)
except
TypeError
as
error_msg
:
logger
.
error
(
"TypeError: %s"
,
error_msg
)
return
False

def Func(arg_0):
    '''Pass an argument list to Func.

    Parameters
    ----------
    args : iterable
        Argument list for Func. The first item can, but does not
        need to, be 'Func'.

    Returns:
    --------
    status : bool
        True on success.

    '''
    if arg_0[0].lower() != "Func":
        arg_0.insert(0, "Func")
    else:
        arg_0[0] = "Func"

    try:
        logger.info("Executing: %s", " ".join(arg_0))
        arg_1 = subprocess.Popen(
            arg_0, stdout=subprocess.PIPE, stderr=subprocess.PIPE
        )

        arg_2 = arg_1.wait()
        if arg_1.stderr is not None:
            logger.info(arg_1.stderr)

        if arg_2 == 0:
            return True
        else:
            logger.info("Play returned with error code %s", arg_2)
            return False
    except OSError as error_msg:
        logger.error("OSError: Play failed! %s", error_msg)
    except TypeError as error_msg:
        logger.error("TypeError: %s", error_msg)
    return False

Pass an argument list to play.

    Parameters
    ----------
    args : iterable
        Argument list for play. The first item can, but does not
        need to, be 'play'.

    Returns:
    --------
    status : bool
        True on success.


def
Func
(
arg_0
,
arg_1
)
:
try
:
arg_0
.
_buffer
.
put
(
arg_1
,
block
=
False
)
if
arg_0
.
_consumer_callback
is
not
:
arg_0
.
_consumer_callback
(
)
return
True
except
Queue
.
Full
:
Log
.
debug
(
"%s: Full in Func()"
%
str
(
arg_0
)
)
raise
Queue
.
Full

def Func(arg_0, arg_1):
    """Offer to the buffer

    It is a non-blocking operation, and when the buffer is full, it raises Queue.Full exception
    """
    try:
      # non-blocking
      arg_0._buffer.put(arg_1, block=False)
      if arg_0._consumer_callback is not None:
        arg_0._consumer_callback()
      return True
    except Queue.Full:
      Log.debug("%s: Full in Func()" % str(arg_0))
      raise Queue.Full


return self.cds_score(b, a) - self.cds_score(a, b)

def Func(arg_0, arg_1, arg_2, **arg_3):
        """ Infer causal relationships between 2 variables using the CDS statistic

        Args:
            a (numpy.ndarray): Variable 1
            b (numpy.ndarray): Variable 2

        Returns:
            float: Causation score (Value : 1 if a->b and -1 if b->a)
        """
        return arg_0.cds_score(arg_2, arg_1) - arg_0.cds_score(arg_1, arg_2)


def Func(arg_0, arg_1, arg_2):
        """
        Set max value

        @param window_name: Window name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string

        @return: 1 on success.
        @rtype: integer
        """
        arg_3 = arg_0._get_object_handle(arg_1, arg_2)
        arg_3.AXValue = 1
        return 1


return tensor_rdd.map(lambda tensor: tensor.to_ndarray())

def Func ( arg_0 ) : arg_1 = callBigDlFunc ( arg_0 . bigdl_type , "distributedImageFrameToLabelTensorRdd" , arg_0 . value ) return arg_1 . map ( lambda tensor : tensor . to_ndarray ( ) )

def Func(arg_0):
        """
        get label rdd from ImageFrame
        """
        arg_1 = callBigDlFunc(arg_0.bigdl_type, "distributedImageFrameToLabelTensorRdd", arg_0.value)
        return arg_1.map(lambda tensor: tensor.to_ndarray())


def Func ( arg_0 , arg_1 ) : for arg_2 , arg_3 in zip ( arg_0 , arg_1 ) : if arg_3 not in ( '%' , arg_2 ) : return False return True

def Func(arg_0, arg_1):
    """Return true if MARC 'tag' matches a 'pattern'.

    'pattern' is plain text, with % as wildcard

    Both parameters must be 3 characters long strings.

    .. doctest::

        >>> Func("909", "909")
        True
        >>> Func("909", "9%9")
        True
        >>> Func("909", "9%8")
        False

    :param tag: a 3 characters long string
    :param pattern: a 3 characters long string
    :return: False or True
    """
    for arg_2, arg_3 in zip(arg_0, arg_1):
        if arg_3 not in ('%', arg_2):
            return False
    return True

Return true if MARC 'tag' matches a 'pattern'.

    'pattern' is plain text, with % as wildcard

    Both parameters must be 3 characters long strings.

    .. doctest::

        >>> _tag_matches_pattern("909", "909")
        True
        >>> _tag_matches_pattern("909", "9%9")
        True
        >>> _tag_matches_pattern("909", "9%8")
        False

    :param tag: a 3 characters long string
    :param pattern: a 3 characters long string
    :return: False or True

Return true if MARC tag matches a pattern .


def Func ( arg_0 , arg_1 , arg_2 = False ) : if arg_2 : arg_3 = arg_0 . _perform_request ( '/requests/' + arg_1 + '/status' ) else : arg_3 = arg_0 . _perform_request ( '/requests/%s' % arg_1 ) return arg_3

def Func(arg_0, arg_1, arg_2=False):
        """
        Retrieves a single request by ID.

        :param      request_id: The unique ID of the request.
        :type       request_id: ``str``

        :param      status: Retreive the full status of the request.
        :type       status: ``bool``

        """
        if arg_2:
            arg_3 = arg_0._perform_request(
                '/requests/' + arg_1 + '/status')
        else:
            arg_3 = arg_0._perform_request(
                '/requests/%s' % arg_1)

        return arg_3


def Func ( arg_0 ) : arg_1 = callBigDlFunc ( arg_0 . bigdl_type , "imageFeatureToLabelTensor" , arg_0 . value ) return arg_1 . to_ndarray ( )

def Func(arg_0):
        """
        get label as ndarray from ImageFeature
        """
        arg_1 = callBigDlFunc(arg_0.bigdl_type, "imageFeatureToLabelTensor", arg_0.value)
        return arg_1.to_ndarray()