def
Func
(
arg_0
=
'questions-words.txt'
,
arg_1
=
)
:
if
arg_1
is
:
arg_1
=
{
}
arg_2
=
[
]
arg_3
=
0
with
open
(
arg_0
,
"rb"
)
as
analogy_f
:
for
arg_4
in
analogy_f
:
if
arg_4
.
startswith
(
b":"
)
:
continue
arg_5
=
arg_4
.
strip
(
)
.
lower
(
)
.
split
(
b" "
)
arg_6
=
[
arg_1
.
get
(
w
.
strip
(
)
)
for
w
in
arg_5
]
if
in
arg_6
or
len
(
arg_6
)
!=
4
:
arg_3
+=
1
else
:
arg_2
.
append
(
np
.
array
(
arg_6
)
)
tl
.
logging
.
info
(
"Eval analogy file: %s"
%
arg_0
)
tl
.
logging
.
info
(
"Questions: %d"
,
len
(
arg_2
)
)
tl
.
logging
.
info
(
"Skipped: %d"
,
arg_3
)
arg_7
=
np
.
array
(
arg_2
,
dtype
=
np
.
int32
)
return
arg_7

def Func(arg_0='questions-words.txt', arg_1=None):
    """Reads through an analogy question file, return its id format.

    Parameters
    ----------
    eval_file : str
        The file name.
    word2id : dictionary
        a dictionary that maps word to ID.

    Returns
    --------
    numpy.array
        A ``[n_examples, 4]`` numpy array containing the analogy question's word IDs.

    Examples
    ---------
    The file should be in this format

    >>> : capital-common-countries
    >>> Athens Greece Baghdad Iraq
    >>> Athens Greece Bangkok Thailand
    >>> Athens Greece Beijing China
    >>> Athens Greece Berlin Germany
    >>> Athens Greece Bern Switzerland
    >>> Athens Greece Cairo Egypt
    >>> Athens Greece Canberra Australia
    >>> Athens Greece Hanoi Vietnam
    >>> Athens Greece Havana Cuba

    Get the tokenized analogy question data

    >>> words = tl.files.load_matt_mahoney_text8_dataset()
    >>> data, count, dictionary, reverse_dictionary = tl.nlp.build_words_dataset(words, vocabulary_size, True)
    >>> analogy_questions = tl.nlp.Func(eval_file='questions-words.txt', word2id=dictionary)
    >>> print(analogy_questions)
    [[ 3068  1248  7161  1581]
    [ 3068  1248 28683  5642]
    [ 3068  1248  3878   486]
    ...,
    [ 1216  4309 19982 25506]
    [ 1216  4309  3194  8650]
    [ 1216  4309   140   312]]

    """
    if arg_1 is None:
        arg_1 = {}

    arg_2 = []
    arg_3 = 0
    with open(arg_0, "rb") as analogy_f:
        for arg_4 in analogy_f:
            if arg_4.startswith(b":"):  # Skip comments.
                continue
            arg_5 = arg_4.strip().lower().split(b" ")  # lowercase
            arg_6 = [arg_1.get(w.strip()) for w in arg_5]
            if None in arg_6 or len(arg_6) != 4:
                arg_3 += 1
            else:
                arg_2.append(np.array(arg_6))
    tl.logging.info("Eval analogy file: %s" % arg_0)
    tl.logging.info("Questions: %d", len(arg_2))
    tl.logging.info("Skipped: %d", arg_3)
    arg_7 = np.array(arg_2, dtype=np.int32)
    return arg_7

Reads through an analogy question file, return its id format.

    Parameters
    ----------
    eval_file : str
        The file name.
    word2id : dictionary
        a dictionary that maps word to ID.

    Returns
    --------
    numpy.array
        A ``[n_examples, 4]`` numpy array containing the analogy question's word IDs.

    Examples
    ---------
    The file should be in this format

    >>> : capital-common-countries
    >>> Athens Greece Baghdad Iraq
    >>> Athens Greece Bangkok Thailand
    >>> Athens Greece Beijing China
    >>> Athens Greece Berlin Germany
    >>> Athens Greece Bern Switzerland
    >>> Athens Greece Cairo Egypt
    >>> Athens Greece Canberra Australia
    >>> Athens Greece Hanoi Vietnam
    >>> Athens Greece Havana Cuba

    Get the tokenized analogy question data

    >>> words = tl.files.load_matt_mahoney_text8_dataset()
    >>> data, count, dictionary, reverse_dictionary = tl.nlp.build_words_dataset(words, vocabulary_size, True)
    >>> analogy_questions = tl.nlp.read_analogies_file(eval_file='questions-words.txt', word2id=dictionary)
    >>> print(analogy_questions)
    [[ 3068  1248  7161  1581]
    [ 3068  1248 28683  5642]
    [ 3068  1248  3878   486]
    ...,
    [ 1216  4309 19982 25506]
    [ 1216  4309  3194  8650]
    [ 1216  4309   140   312]]

Reads through an analogy question file return its id format .


def
Func
(
arg_0
)
:
with
open
(
arg_0
)
as
src_file
:
arg_1
=
re
.
search
(
r"^__version__ = ['\"]([^'\"]*)['\"]"
,
src_file
.
read
(
)
,
re
.
M
)
if
arg_1
:
return
arg_1
.
group
(
1
)
raise
RuntimeError
(
'Unable to find version info.'
)

def Func(arg_0):
    """Returns actual version specified in filename."""
    with open(arg_0) as src_file:
        arg_1 = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                                  src_file.read(), re.M)
        if arg_1:
            return arg_1.group(1)
        raise RuntimeError('Unable to find version info.')

Returns actual version specified in filename .


(self, x, iteration, conjugate, residual, squared_residual)

return next_x, next_iteration, next_conjugate, next_residual, next_squared_residual

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : arg_1 , arg_6 , arg_3 , arg_4 , arg_5 = super ( ConjugateGradient , arg_0 ) . Func ( arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) arg_7 = arg_0 . fn_x ( arg_3 ) if arg_0 . damping > 0.0 : arg_7 = [ A_conj + arg_0 . damping * conj for A_conj , conj in zip ( arg_7 , arg_3 ) ] arg_8 = tf . add_n ( inputs = [ tf . reduce_sum ( input_tensor = ( conj * A_conj ) ) for conj , A_conj in zip ( arg_3 , arg_7 ) ] ) arg_9 = arg_5 / tf . maximum ( arg_1 = arg_8 , y = util . epsilon ) arg_10 = [ t + arg_9 * conj for t , conj in zip ( arg_1 , arg_3 ) ] arg_11 = [ res - arg_9 * A_conj for res , A_conj in zip ( arg_4 , arg_7 ) ] arg_12 = tf . add_n ( inputs = [ tf . reduce_sum ( input_tensor = ( res * res ) ) for res in arg_11 ] ) arg_13 = arg_12 / tf . maximum ( arg_1 = arg_5 , y = util . epsilon ) arg_14 = [ res + arg_13 * conj for res , conj in zip ( arg_11 , arg_3 ) ] return arg_10 , arg_6 , arg_14 , arg_11 , arg_12

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5):
        """
        Iteration loop body of the conjugate gradient algorithm.

        Args:
            x: Current solution estimate $x_t$.
            iteration: Current iteration counter $t$.
            conjugate: Current conjugate $c_t$.
            residual: Current residual $r_t$.
            squared_residual: Current squared residual $r_t^2$.

        Returns:
            Updated arguments for next iteration.
        """
        arg_1, arg_6, arg_3, arg_4, arg_5 = super(ConjugateGradient, arg_0).Func(
            arg_1, arg_2, arg_3, arg_4, arg_5
        )

        # Ac := A * c_t
        arg_7 = arg_0.fn_x(arg_3)

        # TODO: reference?
        if arg_0.damping > 0.0:
            arg_7 = [A_conj + arg_0.damping * conj for A_conj, conj in zip(arg_7, arg_3)]

        # cAc := c_t^T * Ac
        arg_8 = tf.add_n(
            inputs=[tf.reduce_sum(input_tensor=(conj * A_conj)) for conj, A_conj in zip(arg_3, arg_7)]
        )

        # \alpha := r_t^2 / cAc
        arg_9 = arg_5 / tf.maximum(arg_1=arg_8, y=util.epsilon)

        # x_{t+1} := x_t + \alpha * c_t
        arg_10 = [t + arg_9 * conj for t, conj in zip(arg_1, arg_3)]

        # r_{t+1} := r_t - \alpha * Ac
        arg_11 = [res - arg_9 * A_conj for res, A_conj in zip(arg_4, arg_7)]

        # r_{t+1}^2 := r_{t+1}^T * r_{t+1}
        arg_12 = tf.add_n(inputs=[tf.reduce_sum(input_tensor=(res * res)) for res in arg_11])

        # \beta = r_{t+1}^2 / r_t^2
        arg_13 = arg_12 / tf.maximum(arg_1=arg_5, y=util.epsilon)

        # c_{t+1} := r_{t+1} + \beta * c_t
        arg_14 = [res + arg_13 * conj for res, conj in zip(arg_11, arg_3)]

        return arg_10, arg_6, arg_14, arg_11, arg_12

Iteration loop body of the conjugate gradient algorithm .


def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_2 . copy ( ) arg_3 [ 'api_key' ] = arg_0 . api_key arg_3 [ 'api_secret' ] = arg_0 . api_secret arg_4 = arg_3 . pop ( 'to' , None ) if arg_4 : if isinstance ( arg_4 , basestring ) : arg_3 [ 'to' ] = arg_4 else : for arg_5 , arg_6 in enumerate ( arg_4 ) : arg_3 [ 'to[%d]' % arg_5 ] = arg_6 arg_7 = arg_3 . pop ( 'files' , [ ] ) if not isinstance ( arg_7 , ( list , tuple ) ) : arg_7 = ( arg_7 , ) arg_8 = { } for arg_9 , arg_10 in enumerate ( arg_7 ) : if isinstance ( arg_10 , basestring ) : arg_8 [ 'filename[%d]' % arg_9 ] = open ( arg_10 , 'rb' ) else : arg_10 . seek ( 0 ) arg_8 [ 'filename[%d]' % arg_9 ] = arg_10 arg_11 = '%s/v%d/%s' % ( arg_0 . BASE_URL , arg_0 . VERSION , arg_1 ) arg_12 = requests . post ( arg_11 , data = arg_3 , arg_7 = arg_8 ) return arg_0 . parse_response ( arg_12 )

def Func(arg_0, arg_1, **arg_2):
        """Builds the url for the specified method and arguments and returns
        the response as a dictionary.
        """

        arg_3 = arg_2.copy()
        arg_3['api_key'] = arg_0.api_key
        arg_3['api_secret'] = arg_0.api_secret

        arg_4 = arg_3.pop('to', None)
        if arg_4:
            if isinstance(arg_4, basestring):
                arg_3['to'] = arg_4
            else:
                # Presumably it's a list or tuple
                for arg_5, arg_6 in enumerate(arg_4):
                    arg_3['to[%d]' % arg_5] = arg_6

        arg_7 = arg_3.pop('files', [])
        if not isinstance(arg_7, (list, tuple)): arg_7 = (arg_7,)

        arg_8 = {}
        for arg_9, arg_10 in enumerate(arg_7):
            if isinstance(arg_10, basestring):
                arg_8['filename[%d]' % arg_9] = open(arg_10, 'rb')
            else:
                arg_10.seek(0)
                arg_8['filename[%d]' % arg_9] = arg_10

        arg_11 = '%s/v%d/%s' % (arg_0.BASE_URL, arg_0.VERSION, arg_1)

        arg_12 = requests.post(arg_11, data=arg_3, arg_7=arg_8)

        return arg_0.parse_response(arg_12)

Builds the url for the specified method and arguments and returns the response as a dictionary .


return {'install_requires': names, 'dependency_links': links}

def Func ( ) : arg_0 = os . path . join ( __location__ , 'requirements.txt' ) with open ( arg_0 , encoding = 'utf8' ) as f : arg_1 = [ line . strip ( ) for line in f if not line . strip ( ) . startswith ( '#' ) ] arg_2 = [ ] arg_3 = [ ] for arg_4 in arg_1 : if '://' in arg_4 : arg_3 . append ( arg_4 ) else : arg_2 . append ( arg_4 ) return { 'install_requires' : arg_2 , 'dependency_links' : arg_3 }

def Func():
    """parses requirements from requirements.txt"""
    arg_0 = os.path.join(__location__, 'requirements.txt')
    with open(arg_0, encoding='utf8') as f:
        arg_1 = [line.strip() for line in f if not line.strip().startswith('#')]

    arg_2 = []
    arg_3 = []
    for arg_4 in arg_1:
        if '://' in arg_4:
            arg_3.append(arg_4)
        else:
            arg_2.append(arg_4)
    return {'install_requires': arg_2, 'dependency_links': arg_3}

parses requirements from requirements . txt


def Func ( arg_0 ) : arg_1 = arg_0 . get_doc ( ) arg_2 = arg_1 ( 'table#game_info' ) arg_3 = sportsref . utils . parse_info_table ( arg_2 ) return arg_3 . get ( 'Func' , np . nan )

def Func(arg_0):
        """The playing Func on which the game was played.

        :returns: string representing the type of Func. Returns np.nan if
        not avaiable.
        """
        arg_1 = arg_0.get_doc()
        arg_2 = arg_1('table#game_info')
        arg_3 = sportsref.utils.parse_info_table(arg_2)
        return arg_3.get('Func', np.nan)

The playing surface on which the game was played.

        :returns: string representing the type of surface. Returns np.nan if
        not avaiable.

The playing surface on which the game was played .


def Func(arg_0):
    """Returns Func of this GlobalStreamId

    Note that if HeronComponentSpec is specified as componentId and its name is not yet
    available (i.e. when ``name`` argument was not given in ``spec()`` method in Bolt or Spout),
    this property returns a message with uuid. However, this is provided only for safety
    with __eq__(), __str__(), and __hash__() methods, and not meant to be called explicitly
    before TopologyType class finally sets the name attribute of HeronComponentSpec.
    """
    if isinstance(arg_0._Func, HeronComponentSpec):
      if arg_0._Func.name is None:
        # HeronComponentSpec instance's name attribute might not be available until
        # TopologyType metaclass finally sets it. This statement is to support __eq__(),
        # __hash__() and __str__() methods with safety, as raising Exception is not
        # appropriate this case.
        return "<No name available for HeronComponentSpec yet, uuid: %s>" % arg_0._Func.uuid
      return arg_0._Func.name
    elif isinstance(arg_0._Func, str):
      return arg_0._Func
    else:
      raise ValueError("Component Id for this GlobalStreamId is not properly set: <%s:%s>"
                       % (str(type(arg_0._Func)), str(arg_0._Func)))

Returns component_id of this GlobalStreamId

    Note that if HeronComponentSpec is specified as componentId and its name is not yet
    available (i.e. when ``name`` argument was not given in ``spec()`` method in Bolt or Spout),
    this property returns a message with uuid. However, this is provided only for safety
    with __eq__(), __str__(), and __hash__() methods, and not meant to be called explicitly
    before TopologyType class finally sets the name attribute of HeronComponentSpec.


def
Func
(
arg_0
,
arg_1
,
arg_2
=
0
)
:
if
isinstance
(
arg_0
,
np
.
ndarray
)
:
return
np
.
Func
(
arg_0
,
arg_1
,
arg_2
)
if
arg_1
not
in
range
(
arg_0
.
ndim
)
:
raise
ValueError
(
'Func: axis (%d) must be >=0 and < %d'
%
(
arg_1
,
arg_0
.
ndim
)
)
if
arg_2
not
in
range
(
arg_0
.
ndim
+
1
)
:
raise
ValueError
(
'Func: start (%d) must be >=0 and < %d'
%
(
arg_1
,
arg_0
.
ndim
+
1
)
)
arg_3
=
list
(
range
(
arg_0
.
ndim
)
)
arg_3
.
remove
(
arg_1
)
arg_3
.
insert
(
arg_2
,
arg_1
)
return
transpose
(
arg_0
,
arg_3
)

def Func(arg_0, arg_1, arg_2=0):
    """Roll the specified axis backwards, until it lies in a given position.

    Args:
      a (array_like): Input array.
      axis (int): The axis to roll backwards.  The positions of the other axes
        do not change relative to one another.
      start (int, optional): The axis is rolled until it lies before this
        position.  The default, 0, results in a "complete" roll.

    Returns:
      res (ndarray)
    """
    if isinstance(arg_0, np.ndarray):
        return np.Func(arg_0, arg_1, arg_2)
    if arg_1 not in range(arg_0.ndim):
        raise ValueError(
                'Func: axis (%d) must be >=0 and < %d' % (arg_1, arg_0.ndim))
    if arg_2 not in range(arg_0.ndim + 1):
        raise ValueError(
                'Func: start (%d) must be >=0 and < %d' % (arg_1, arg_0.ndim+1))
    arg_3 = list(range(arg_0.ndim))
    arg_3.remove(arg_1)
    arg_3.insert(arg_2, arg_1)
    return transpose(arg_0, arg_3)

Roll the specified axis backwards until it lies in a given position .


def Func ( arg_0 ) : arg_1 = inspect . stack ( ) _NO_INDEX_CHECK_NEEDED . add ( '%s.%s.%s' % ( arg_0 . __module__ , arg_1 [ 1 ] [ 3 ] , arg_0 . __name__ ) ) del arg_1 return arg_0

def Func(arg_0):
    """Decorate test methods with this if you don't require strict index checking"""
    arg_1 = inspect.stack()
    _NO_INDEX_CHECK_NEEDED.add('%s.%s.%s' % (arg_0.__module__, arg_1[1][3], arg_0.__name__))
    del arg_1
    return arg_0

Decorate test methods with this if you don t require strict index checking


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . elements . surfaces [ arg_1 ] for arg_3 in arg_2 . keys ( ) : if arg_2 [ arg_3 ] . sum ( ) != 0 : arg_0 . elements [ ( "sets" , "_SURF_{0}_FACE{1}" . format ( arg_1 , arg_3 [ 1 : ] ) , "" ) ] = arg_2 [ arg_3 ]

def Func(arg_0, arg_1):
    """
    Creates elements sets corresponding to a surface.
    """
    arg_2 = arg_0.elements.surfaces[arg_1]
    for arg_3 in arg_2.keys():
      if arg_2[arg_3].sum() != 0:
        arg_0.elements[("sets", "_SURF_{0}_FACE{1}"
                     .format(arg_1, arg_3[1:]), "")] = arg_2[arg_3]

Creates elements sets corresponding to a surface .


def Func ( arg_0 , arg_1 ) : def _requires_decorator ( arg_2 ) : if not arg_0 : @ wraps ( arg_2 ) def explode ( * arg_3 , ** arg_4 ) : raise NotImplementedError ( arg_1 ) return explode else : return arg_2 return _requires_decorator

def Func(arg_0, arg_1):
    """
    Builds a decorator that ensures that functions that rely on OpenSSL
    functions that are not present in this build raise NotImplementedError,
    rather than AttributeError coming out of cryptography.

    :param flag: A cryptography flag that guards the functions, e.g.
        ``Cryptography_HAS_NEXTPROTONEG``.
    :param error: The string to be used in the exception if the flag is false.
    """
    def _requires_decorator(arg_2):
        if not arg_0:
            @wraps(arg_2)
            def explode(*arg_3, **arg_4):
                raise NotImplementedError(arg_1)
            return explode
        else:
            return arg_2

    return _requires_decorator

Builds a decorator that ensures that functions that rely on OpenSSL functions that are not present in this build raise NotImplementedError rather than AttributeError coming out of cryptography .


def Func ( arg_0 , arg_1 ) : if not os . path . exists ( arg_1 ) : os . mkdir ( arg_1 ) arg_2 = arg_0 . discover_modules ( ) arg_0 . write_modules_api ( arg_2 , arg_1 )

def Func(arg_0, arg_1):
        """Generate API reST files.

        Parameters
        ----------
        outdir : string
            Directory name in which to store files
            We create automatic filenames for each module

        Returns
        -------
        None

        Notes
        -----
        Sets self.written_modules to list of written modules
        """
        if not os.path.exists(arg_1):
            os.mkdir(arg_1)
        # compose list of modules
        arg_2 = arg_0.discover_modules()
        arg_0.write_modules_api(arg_2,arg_1)


def Func(arg_0, arg_1, arg_2):
        """ Creates a backup of file """
        arg_3 = arg_0.quilt_pc + arg_2.get_name()
        arg_4 = arg_1.get_directory()
        if arg_4:
            #TODO get relative path
            arg_3 = arg_3 + arg_4
        arg_5 = Backup()
        arg_5.backup_file(arg_1, arg_3, copy_empty=True)


def Func(arg_0, arg_1, arg_2):
    """Starts an internal match or a match against one or all MME external nodes"""
    arg_3, arg_4 = institute_and_case(store, arg_0, arg_1)

    # check that only authorized users can run matches
    arg_5 = store.user(current_user.email)
    if 'mme_submitter' not in arg_5['roles']:
        flash('unauthorized request', 'warning')
        return redirect(request.referrer)

    # Required params for sending an add request to MME:
    arg_6 = current_app.config.get('MME_URL')
    arg_7 = current_app.config.get('MME_ACCEPTS')
    arg_8 = current_app.config.get('MME_TOKEN')
    arg_9 = current_app.mme_nodes

    if not arg_6 or not arg_8 or not arg_7:
        flash('An error occurred reading matchmaker connection parameters. Please check config file!', 'danger')
        return redirect(request.referrer)

    arg_10 = controllers.mme_match(arg_4, arg_2, arg_6, arg_8, arg_9, arg_7)
    arg_11 = 0
    for arg_10 in arg_10:
        arg_10['status_code'] == 200
        arg_11 +=1
    if arg_11:
        flash("Match request sent. Look for eventual matches in 'Matches' page.", 'info')
    else:
        flash('An error occurred while sending match request.', 'danger')

    return redirect(request.referrer)


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
find_path
(
arg_1
,
arg_0
.
config
)
if
len
(
arg_2
)
==
0
:
arg_0
.
logger
.
error
(
"No matches for `%s`"
%
arg_1
)
return
False
for
arg_1
,
arg_3
in
arg_2
.
items
(
)
:
arg_0
.
print_status
(
arg_1
,
arg_3
)

def Func(arg_0, arg_1):
        """Print workspace status."""
        arg_2 = find_path(arg_1, arg_0.config)

        if len(arg_2) == 0:
            arg_0.logger.error("No matches for `%s`" % arg_1)
            return False

        for arg_1, arg_3 in arg_2.items():
            arg_0.print_status(arg_1, arg_3)


def Func ( arg_0 , arg_1 = 1. ) : def scoreatpercentile ( arg_2 , arg_3 ) : return [ stats . scoreatpercentile ( arg_4 , arg_3 ) for arg_4 in arg_2 . T ] arg_2 = np . cumprod ( arg_0 + 1 , 1 ) * arg_1 arg_5 = { arg_3 : scoreatpercentile ( arg_2 , arg_3 ) for arg_3 in ( 5 , 25 , 75 , 95 ) } return arg_5

def Func(arg_0, arg_1=1.):
    """
    Compute 5, 25, 75 and 95 percentiles of cumulative returns, used
    for the Bayesian cone.

    Parameters
    ----------
    preds : numpy.array
        Multiple (simulated) cumulative returns.
    starting_value : int (optional)
        Have cumulative returns start around this value.
        Default = 1.

    Returns
    -------
    dict of percentiles over time
        Dictionary mapping percentiles (5, 25, 75, 95) to a
        timeseries.
    """

    def scoreatpercentile(arg_2, arg_3):
        return [stats.scoreatpercentile(
            arg_4, arg_3) for arg_4 in arg_2.T]

    arg_2 = np.cumprod(arg_0 + 1, 1) * arg_1
    arg_5 = {arg_3: scoreatpercentile(arg_2, arg_3) for arg_3 in (5, 25, 75, 95)}

    return arg_5

Compute 5 25 75 and 95 percentiles of cumulative returns used for the Bayesian cone .


(
        image, classes, coords, scores, classes_list, is_center=True, is_rescale=True, save_name=None
)

def Func(
        arg_0, arg_1, arg_2, arg_3, arg_4, arg_5=True, arg_6=True, arg_7=None
):
    """Draw bboxes and class labels on image. Return or save the image with bboxes, example in the docs of ``tl.prepro``.

    Parameters
    -----------
    image : numpy.array
        The RGB image [height, width, channel].
    classes : list of int
        A list of class ID (int).
    coords : list of int
        A list of list for coordinates.
            - Should be [x, y, x2, y2] (up-left and botton-right format)
            - If [x_center, y_center, w, h] (set is_center to True).
    scores : list of float
        A list of score (float). (Optional)
    classes_list : list of str
        for converting ID to string on image.
    is_center : boolean
        Whether the coordinates is [x_center, y_center, w, h]
            - If coordinates are [x_center, y_center, w, h], set it to True for converting it to [x, y, x2, y2] (up-left and botton-right) internally.
            - If coordinates are [x1, x2, y1, y2], set it to False.
    is_rescale : boolean
        Whether to rescale the coordinates from pixel-unit format to ratio format.
            - If True, the input coordinates are the portion of width and high, this API will scale the coordinates to pixel unit internally.
            - If False, feed the coordinates with pixel unit format.
    save_name : None or str
        The name of image file (i.e. image.png), if None, not to save image.

    Returns
    -------
    numpy.array
        The saved image.

    References
    -----------
    - OpenCV rectangle and putText.
    - `scikit-image <http://scikit-image.org/docs/dev/api/skimage.draw.html#skimage.draw.rectangle>`__.

    """
    if len(arg_2) != len(arg_1):
        raise AssertionError("number of coordinates and classes are equal")

    if len(arg_3) > 0 and len(arg_3) != len(arg_1):
        raise AssertionError("number of scores and classes are equal")

    # don't change the original image, and avoid error https://stackoverflow.com/questions/30249053/python-opencv-drawing-errors-after-manipulating-array-with-numpy
    arg_0 = arg_0.copy()

    arg_8, arg_9 = arg_0.shape[0:2]
    arg_10 = int((arg_8 + arg_9) // 430)

    for arg_11, arg_12 in enumerate(arg_2):
        if arg_5:
            arg_13, arg_14, arg_15, arg_16 = tl.prepro.obj_box_coord_centroid_to_upleft_butright(arg_2[arg_11])
        else:
            arg_13, arg_14, arg_15, arg_16 = arg_2[arg_11]

        if arg_6:  # scale back to pixel unit if the coords are the portion of width and high
            arg_13, arg_14, arg_15, arg_16 = tl.prepro.obj_box_coord_scale_to_pixelunit([arg_13, arg_14, arg_15, arg_16], (arg_8, arg_9))

        cv2.rectangle(
            arg_0,
            (int(arg_13), int(arg_14)),
            (int(arg_15), int(arg_16)),  # up-left and botton-right
            [0, 255, 0],
            arg_10
        )

        cv2.putText(
            arg_0,
            arg_4[arg_1[arg_11]] + ((" %.2f" % (arg_3[arg_11])) if (len(arg_3) != 0) else " "),
            (int(arg_13), int(arg_14)),  # button left
            0,
            1.5e-3 * arg_8,  # bigger = larger font
            [0, 0, 256],  # self.meta['colors'][max_indx],
            int(arg_10 / 2) + 1
        )  # bold

    if arg_7 is not None:
        # cv2.imwrite('_my.png', image)
        save_image(arg_0, arg_7)
    # if len(coords) == 0:
    #     tl.logging.info("Func: no bboxes exist, cannot draw !")
    return arg_0

Draw bboxes and class labels on image . Return or save the image with bboxes example in the docs of tl . prepro .


(data_url: str, data_path: str, **kwargs)

def Func ( arg_0 : arg_1 , arg_2 : arg_1 , ** arg_3 ) -> Callable [ [ arg_6 [ arg_1 ] , arg_8 , arg_8 ] , pd . DataFrame ] : arg_4 = make_downloader ( arg_0 , arg_2 ) def get_df ( arg_5 : arg_6 [ arg_1 ] = None , arg_7 : arg_8 = True , arg_9 : arg_8 = False ) -> pd . DataFrame : if arg_5 is None and arg_7 : arg_5 = arg_4 ( arg_9 = arg_9 ) return pd . read_csv ( arg_5 or arg_0 , ** arg_3 ) return get_df

def Func(arg_0: arg_1, arg_2: arg_1, **arg_3) -> Callable[[arg_6[arg_1], arg_8, arg_8], pd.DataFrame]:
    """Build a function that handles downloading tabular data and parsing it into a pandas DataFrame.

    :param data_url: The URL of the data
    :param data_path: The path where the data should get stored
    :param kwargs: Any other arguments to pass to :func:`pandas.read_csv`
    """
    arg_4 = make_downloader(arg_0, arg_2)

    def get_df(arg_5: arg_6[arg_1] = None, arg_7: arg_8 = True, arg_9: arg_8 = False) -> pd.DataFrame:
        """Get the data as a pandas DataFrame.

        :param url: The URL (or file path) to download.
        :param cache: If true, the data is downloaded to the file system, else it is loaded from the internet
        :param force_download: If true, overwrites a previously cached file
        """
        if arg_5 is None and arg_7:
            arg_5 = arg_4(arg_9=arg_9)

        return pd.read_csv(
            arg_5 or arg_0,
            **arg_3
        )

    return get_df

Build a function that handles downloading tabular data and parsing it into a pandas DataFrame .


def
Func
(
)
:
if
DDBST_UNIFAC_assignments
:
return
with
open
(
os
.
path
.
join
(
folder
,
'DDBST UNIFAC assignments.tsv'
)
)
as
f
:
arg_0
=
[
DDBST_UNIFAC_assignments
,
DDBST_MODIFIED_UNIFAC_assignments
,
DDBST_PSRK_assignments
]
for
arg_1
in
f
.
readlines
(
)
:
arg_2
,
arg_3
,
arg_4
,
arg_5
,
arg_6
=
arg_1
.
split
(
'\t'
)
arg_3
=
[
True
if
arg_11
==
'1'
else
False
for
arg_11
in
arg_3
.
split
(
' '
)
]
for
arg_7
,
arg_8
,
arg_9
in
zip
(
[
arg_4
,
arg_5
,
arg_6
]
,
arg_0
,
arg_3
)
:
if
arg_9
:
arg_7
=
arg_7
.
rstrip
(
)
.
split
(
' '
)
arg_10
=
{
}
for
arg_11
in
range
(
arg_12
(
len
(
arg_7
)
/
2
)
)
:
arg_10
[
arg_12
(
arg_7
[
arg_11
*
2
]
)
]
=
arg_12
(
arg_7
[
arg_11
*
2
+
1
]
)
arg_8
[
arg_2
]
=
arg_10

def Func():
    '''Data is stored in the format
    InChI key\tbool bool bool \tsubgroup count ...\tsubgroup count \tsubgroup count...
    where the bools refer to whether or not the original UNIFAC, modified
    UNIFAC, and PSRK group assignments were completed correctly.
    The subgroups and their count have an indefinite length.
    '''
    # Do not allow running multiple times
    if DDBST_UNIFAC_assignments:
        return None
    with open(os.path.join(folder, 'DDBST UNIFAC assignments.tsv')) as f:
        arg_0 = [DDBST_UNIFAC_assignments, DDBST_MODIFIED_UNIFAC_assignments, DDBST_PSRK_assignments]
        for arg_1 in f.readlines():
            arg_2, arg_3, arg_4, arg_5, arg_6 = arg_1.split('\t')
            # list of whether or not each method was correctly identified or not
            arg_3 = [True if arg_11 == '1' else False for arg_11 in arg_3.split(' ')]
            for arg_7, arg_8, arg_9 in zip([arg_4, arg_5, arg_6], arg_0, arg_3):
                if arg_9:
                    arg_7 = arg_7.rstrip().split(' ')
                    arg_10 = {}
                    for arg_11 in range(arg_12(len(arg_7)/2)):
                        arg_10[arg_12(arg_7[arg_11*2])] = arg_12(arg_7[arg_11*2+1])
                    arg_8[arg_2] = arg_10

Data is stored in the format InChI key \ tbool bool bool \ tsubgroup count ... \ tsubgroup count \ tsubgroup count ... where the bools refer to whether or not the original UNIFAC modified UNIFAC and PSRK group assignments were completed correctly . The subgroups and their count have an indefinite length .


(self, queues=None, edge=None, edge_type=None)

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
        """Tells the queues to collect data on agents' arrival, service
        start, and departure times.

        If none of the parameters are given then every
        :class:`.QueueServer` will start collecting data.

        Parameters
        ----------
        queues : :any:`int`, *array_like* (optional)
            The edge index (or an iterable of edge indices) identifying
            the :class:`QueueServer(s)<.QueueServer>` that will start
            collecting data.
        edge : 2-tuple of int or *array_like* (optional)
            Explicitly specify which queues will collect data. Must be
            either:

            * A 2-tuple of the edge's source and target vertex
              indices, or
            * An iterable of 2-tuples of the edge's source and
              target vertex indices.

        edge_type : int or an iterable of int (optional)
            A integer, or a collection of integers identifying which
            edge types will be set active.
        """
        arg_1 = _get_queues(arg_0.g, arg_1, arg_2, arg_3)

        for arg_4 in arg_1:
            arg_0.edge2queue[arg_4].collect_data = True

Tells the queues to collect data on agents arrival service start and departure times .


(
        src,
        tar,
        mat=None,
        mismatch_cost=0,
        match_cost=1,
        symmetric=True,
        alphabet=None,
    )

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
0
,
arg_4
=
1
,
arg_5
=
True
,
arg_6
=
,
)
:
if
arg_6
:
arg_6
=
tuple
(
arg_6
)
for
arg_7
in
arg_0
:
if
arg_7
not
in
arg_6
:
raise
ValueError
(
'src value not in alphabet'
)
for
arg_7
in
arg_1
:
if
arg_7
not
in
arg_6
:
raise
ValueError
(
'tar value not in alphabet'
)
if
arg_0
==
arg_1
:
if
arg_2
and
(
arg_0
,
arg_0
)
in
arg_2
:
return
arg_2
[
(
arg_0
,
arg_0
)
]
return
arg_4
if
arg_2
and
(
arg_0
,
arg_1
)
in
arg_2
:
return
arg_2
[
(
arg_0
,
arg_1
)
]
elif
arg_5
and
arg_2
and
(
arg_1
,
arg_0
)
in
arg_2
:
return
arg_2
[
(
arg_1
,
arg_0
)
]
return
arg_3

def Func(
        arg_0,
        arg_1,
        arg_2=None,
        arg_3=0,
        arg_4=1,
        arg_5=True,
        arg_6=None,
    ):
        """Return the matrix similarity of two strings.

        With the default parameters, this is identical to sim_ident.
        It is possible for Func to return values outside of the range
        :math:`[0, 1]`, if values outside that range are present in mat,
        mismatch_cost, or match_cost.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison
        mat : dict
            A dict mapping tuples to costs; the tuples are (src, tar) pairs of
            symbols from the alphabet parameter
        mismatch_cost : float
            The value returned if (src, tar) is absent from mat when src does
            not equal tar
        match_cost : float
            The value returned if (src, tar) is absent from mat when src equals
            tar
        symmetric : bool
            True if the cost of src not matching tar is identical to the cost
            of tar not matching src; in this case, the values in mat need only
            contain (src, tar) or (tar, src), not both
        alphabet : str
            A collection of tokens from which src and tar are drawn; if this is
            defined a ValueError is raised if either tar or src is not found in
            alphabet

        Returns
        -------
        float
            Matrix similarity

        Raises
        ------
        ValueError
            src value not in alphabet
        ValueError
            tar value not in alphabet

        Examples
        --------
        >>> NeedlemanWunsch.Func('cat', 'hat')
        0
        >>> NeedlemanWunsch.Func('hat', 'hat')
        1

        """
        if arg_6:
            arg_6 = tuple(arg_6)
            for arg_7 in arg_0:
                if arg_7 not in arg_6:
                    raise ValueError('src value not in alphabet')
            for arg_7 in arg_1:
                if arg_7 not in arg_6:
                    raise ValueError('tar value not in alphabet')

        if arg_0 == arg_1:
            if arg_2 and (arg_0, arg_0) in arg_2:
                return arg_2[(arg_0, arg_0)]
            return arg_4
        if arg_2 and (arg_0, arg_1) in arg_2:
            return arg_2[(arg_0, arg_1)]
        elif arg_5 and arg_2 and (arg_1, arg_0) in arg_2:
            return arg_2[(arg_1, arg_0)]
        return arg_3

Return the matrix similarity of two strings.

        With the default parameters, this is identical to sim_ident.
        It is possible for sim_matrix to return values outside of the range
        :math:`[0, 1]`, if values outside that range are present in mat,
        mismatch_cost, or match_cost.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison
        mat : dict
            A dict mapping tuples to costs; the tuples are (src, tar) pairs of
            symbols from the alphabet parameter
        mismatch_cost : float
            The value returned if (src, tar) is absent from mat when src does
            not equal tar
        match_cost : float
            The value returned if (src, tar) is absent from mat when src equals
            tar
        symmetric : bool
            True if the cost of src not matching tar is identical to the cost
            of tar not matching src; in this case, the values in mat need only
            contain (src, tar) or (tar, src), not both
        alphabet : str
            A collection of tokens from which src and tar are drawn; if this is
            defined a ValueError is raised if either tar or src is not found in
            alphabet

        Returns
        -------
        float
            Matrix similarity

        Raises
        ------
        ValueError
            src value not in alphabet
        ValueError
            tar value not in alphabet

        Examples
        --------
        >>> NeedlemanWunsch.sim_matrix('cat', 'hat')
        0
        >>> NeedlemanWunsch.sim_matrix('hat', 'hat')
        1

Return the matrix similarity of two strings .


def Func ( arg_0 , arg_1 = False , arg_2 = '' ) : arg_0 . _Func ( arg_1 , arg_1 , arg_2 )

def Func(arg_0, arg_1=False, arg_2=''):
        """Shutdown the TransferManager

        It will wait till all transfers complete before it completely shuts
        down.

        :type cancel: boolean
        :param cancel: If True, calls TransferFuture.cancel() for
            all in-progress in transfers. This is useful if you want the
            Func to happen quicker.

        :type cancel_msg: str
        :param cancel_msg: The message to specify if canceling all in-progress
            transfers.
        """
        arg_0._Func(arg_1, arg_1, arg_2)

Shutdown the TransferManager

        It will wait till all transfers complete before it completely shuts
        down.

        :type cancel: boolean
        :param cancel: If True, calls TransferFuture.cancel() for
            all in-progress in transfers. This is useful if you want the
            shutdown to happen quicker.

        :type cancel_msg: str
        :param cancel_msg: The message to specify if canceling all in-progress
            transfers.


return impad(img, (pad_h, pad_w), pad_val)

def Func ( arg_0 , arg_1 , arg_2 = 0 ) : arg_3 = int ( np . ceil ( arg_0 . shape [ 0 ] / arg_1 ) ) * arg_1 arg_4 = int ( np . ceil ( arg_0 . shape [ 1 ] / arg_1 ) ) * arg_1 return impad ( arg_0 , ( arg_3 , arg_4 ) , arg_2 )

def Func(arg_0, arg_1, arg_2=0):
    """Pad an image to ensure each edge to be multiple to some number.

    Args:
        img (ndarray): Image to be padded.
        divisor (int): Padded image edges will be multiple to divisor.
        pad_val (number or sequence): Same as :func:`impad`.

    Returns:
        ndarray: The padded image.
    """
    arg_3 = int(np.ceil(arg_0.shape[0] / arg_1)) * arg_1
    arg_4 = int(np.ceil(arg_0.shape[1] / arg_1)) * arg_1
    return impad(arg_0, (arg_3, arg_4), arg_2)

Pad an image to ensure each edge to be multiple to some number .


def Func(arg_0):
        """ Create and return new frontend attached to new kernel, launched on localhost.
        """
        arg_1 = arg_0.ip if arg_0.ip in LOCAL_IPS else LOCALHOST
        arg_2 = arg_0.kernel_manager_class(
                                arg_1=arg_1,
                                connection_file=arg_0._new_connection_file(),
                                config=arg_0.config,
        )
        # start the kernel
        arg_3 = dict()
        arg_3['extra_arguments'] = arg_0.kernel_argv
        arg_2.start_kernel(**arg_3)
        arg_2.start_channels()
        arg_4 = arg_0.widget_factory(config=arg_0.config,
                                   local_kernel=True)
        arg_0.init_colors(arg_4)
        arg_4.kernel_manager = arg_2
        arg_4._existing = False
        arg_4._may_close = True
        arg_4._confirm_exit = arg_0.confirm_exit
        return arg_4

Create and return new frontend attached to new kernel launched on localhost .


(objective_function,
                                       initial_simplex,
                                       objective_at_initial_simplex,
                                       batch_evaluate_objective)

return (dim,
          num_vertices,
          initial_simplex,
          objective_at_initial_simplex,
          num_evaluations)

def Func(arg_0,
                                       arg_1,
                                       arg_2,
                                       arg_3):
  """Evaluates the objective function at the specified initial simplex."""
  arg_1 = tf.convert_to_tensor(value=arg_1)

  # If d is the dimension of the problem, the number of vertices in the
  # simplex should be d+1. From this, we can infer the number of dimensions
  # as n - 1 where n is the number of vertices specified.
  arg_4 = tf.shape(input=arg_1)[0]
  arg_5 = arg_4 - 1
  arg_6 = 0

  if arg_2 is None:
    arg_2, arg_7 = _evaluate_objective_multiple(
        arg_0, arg_1, arg_3)
    arg_6 += arg_7
  arg_2 = tf.convert_to_tensor(
      value=arg_2)
  return (arg_5,
          arg_4,
          arg_1,
          arg_2,
          arg_6)

Evaluates the objective function at the specified initial simplex .


(lcdir,
                               outdir,
                               fileglob=None,
                               maxobjects=None,
                               timecols=None,
                               magcols=None,
                               errcols=None,
                               recursive=True,
                               mindet=1000,
                               lcformat='hat-sql',
                               lcformatdir=None,
                               nworkers=NCPUS)

def Func(arg_0,
                               arg_1,
                               arg_2=None,
                               arg_3=None,
                               arg_4=None,
                               arg_5=None,
                               arg_6=None,
                               arg_7=True,
                               arg_8=1000,
                               arg_9='hat-sql',
                               arg_10=None,
                               arg_11=arg_12):
    '''This runs parallel variable feature extraction for a directory of LCs.

    Parameters
    ----------

    lcdir : str
        The directory of light curve files to process.

    outdir : str
        The directory where the output varfeatures pickle files will be written.

    fileglob : str or None
        The file glob to use when looking for light curve files in `lcdir`. If
        None, the default file glob associated for this LC format will be used.

    maxobjects : int
        The number of LCs to process from `lclist`.

    timecols : list of str or None
        The timecol keys to use from the lcdict in calculating the features.

    magcols : list of str or None
        The magcol keys to use from the lcdict in calculating the features.

    errcols : list of str or None
        The errcol keys to use from the lcdict in calculating the features.

    mindet : int
        The minimum number of LC points required to generate variability
        features.

    lcformat : str
        This is the `formatkey` associated with your light curve format, which
        you previously passed in to the `lcproc.register_lcformat`
        function. This will be used to look up how to find and read the light
        curves specified in `basedir` or `use_list_of_filenames`.

    lcformatdir : str or None
        If this is provided, gives the path to a directory when you've stored
        your lcformat description JSONs, other than the usual directories lcproc
        knows to search for them in. Use this along with `lcformat` to specify
        an LC format JSON file that's not currently registered with lcproc.

    nworkers : int
        The number of parallel workers to launch.

    Returns
    -------

    dict
        A dict with key:val pairs of input LC file name : the generated
        variability features pickles for each of the input LCs, with results for
        each magcol in the input `magcol` or light curve format's default
        `magcol` list.

    '''

    try:
        arg_13 = get_lcformat(arg_9,
                                  use_lcformat_dir=arg_10)
        if arg_13:
            (arg_14, arg_15,
             arg_16, arg_17, arg_18,
             arg_19, arg_20) = arg_13
        else:
            LOGERROR("can't figure out the light curve format")
            return None
    except Exception as e:
        LOGEXCEPTION("can't figure out the light curve format")
        return None

    if not arg_2:
        arg_2 = arg_14

    # now find the files
    LOGINFO('searching for %s light curves in %s ...' % (arg_9, arg_0))

    if arg_7 is False:
        arg_21 = glob.glob(os.path.join(arg_0, arg_2))

    else:
        # use recursive glob for Python 3.5+
        if sys.version_info[:2] > (3,4):

            arg_21 = glob.glob(os.path.join(arg_0,
                                              '**',
                                              arg_2),
                                 arg_7=True)

        # otherwise, use os.walk and glob
        else:

            # use os.walk to go through the directories
            arg_22 = os.walk(arg_0)
            arg_21 = []

            for arg_23, arg_24, arg_25 in arg_22:
                for arg_26 in arg_24:
                    arg_27 = os.path.join(arg_23,
                                              arg_26,
                                              arg_2)
                    arg_28 = glob.glob(arg_27)

                    if arg_28:
                        arg_21.extend(arg_28)

    # now that we have all the files, process them
    if arg_21 and len(arg_21) > 0:

        LOGINFO('found %s light curves, getting varfeatures...' %
                len(arg_21))

        return parallel_varfeatures(arg_21,
                                    arg_1,
                                    arg_3=arg_3,
                                    arg_4=arg_4,
                                    arg_5=arg_5,
                                    arg_6=arg_6,
                                    arg_8=arg_8,
                                    arg_9=arg_9,
                                    arg_10=arg_10,
                                    arg_11=arg_11)

    else:

        LOGERROR('no light curve files in %s format found in %s' % (arg_9,
                                                                    arg_0))
        return None

This runs parallel variable feature extraction for a directory of LCs .


def
Func
(
arg_0
,
arg_1
=
)
:
if
not
arg_1
:
arg_1
=
MAGIC_DICT
arg_2
=
max
(
len
(
x
)
for
x
in
arg_1
)
with
open
(
arg_0
,
"rb"
)
as
f
:
arg_3
=
f
.
read
(
arg_2
)
logger
.
debug
(
"Binary signature start: {}"
.
format
(
arg_3
)
)
for
arg_4
,
arg_5
in
arg_1
.
items
(
)
:
if
arg_3
.
startswith
(
arg_4
)
:
return
arg_5
return

def Func(arg_0, arg_1=None):
    """Guesses the compression of an input file.

    This function guesses the compression of a given file by checking for
    a binary signature at the beginning of the file. These signatures are
    stored in the :py:data:`MAGIC_DICT` dictionary. The supported compression
    formats are gzip, bzip2 and zip. If none of the signatures in this
    dictionary are found at the beginning of the file, it returns ``None``.

    Parameters
    ----------
    file_path : str
        Path to input file.
    magic_dict : dict, optional
        Dictionary containing the signatures of the compression types. The
        key should be the binary signature and the value should be the
        compression format. If left ``None``, it falls back to
        :py:data:`MAGIC_DICT`.

    Returns
    -------
    file_type : str or None
        If a compression type is detected, returns a string with the format.
        If not, returns ``None``.
    """

    if not arg_1:
        arg_1 = MAGIC_DICT

    arg_2 = max(len(x) for x in arg_1)

    with open(arg_0, "rb") as f:
        arg_3 = f.read(arg_2)

    logger.debug("Binary signature start: {}".format(arg_3))

    for arg_4, arg_5 in arg_1.items():
        if arg_3.startswith(arg_4):
            return arg_5

    return None

Guesses the compression of an input file .


def Func ( arg_0 = None , arg_1 = None ) : if arg_1 : arg_2 = store . hgnc_Funcs ( arg_1 ) if arg_2 . count ( ) == 1 : arg_0 = arg_2 . first ( ) [ 'hgnc_id' ] else : return redirect ( url_for ( '.Funcs' , arg_2 = arg_1 ) ) try : arg_3 = controllers . Func ( store , arg_0 ) except ValueError as error : return abort ( 404 ) return arg_3

def Func(arg_0=None, arg_1=None):
    """Render information about a Func."""
    if arg_1:
        arg_2 = store.hgnc_Funcs(arg_1)
        if arg_2.count() == 1:
            arg_0 = arg_2.first()['hgnc_id']
        else:
            return redirect(url_for('.Funcs', arg_2=arg_1))
    try:
        arg_3 = controllers.Func(store, arg_0)
    except ValueError as error:
        return abort(404)

    return arg_3


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . lookup ( arg_1 ) if arg_3 : arg_3 [ 'callback' ] ( arg_2 ) else : arg_0 . cmdproc . undefined_cmd ( arg_3 . __class__ . name , arg_1 ) pass return

def Func(arg_0, arg_1, arg_2):
        """Run subcmd_name with args using obj for the environent"""
        arg_3=arg_0.lookup(arg_1)
        if arg_3:
            arg_3['callback'](arg_2)
        else:
            arg_0.cmdproc.undefined_cmd(arg_3.__class__.name, arg_1)
            pass
        return


def
Func
(
arg_0
)
:
arg_0
.
_set_state
(
"resolving-hostname"
)
arg_1
=
arg_0
.
settings
[
"dns_resolver"
]
logger
.
debug
(
"_dst_nameports: {0!r}"
.
format
(
arg_0
.
_dst_nameports
)
)
arg_2
,
arg_3
=
arg_0
.
_dst_nameports
.
pop
(
0
)
arg_0
.
_dst_hostname
=
arg_2
arg_1
.
resolve_address
(
arg_2
,
callback
=
partial
(
arg_0
.
_got_addresses
,
arg_2
,
arg_3
)
,
allow_cname
=
arg_0
.
_dst_service
is
)
arg_0
.
event
(
ResolvingAddressEvent
(
arg_2
)
)

def Func(arg_0):
        """Start hostname resolution for the next name to try.

        [called with `lock` acquired]
        """
        arg_0._set_state("resolving-hostname")
        arg_1 = arg_0.settings["dns_resolver"] # pylint: disable=W0621
        logger.debug("_dst_nameports: {0!r}".format(arg_0._dst_nameports))
        arg_2, arg_3 = arg_0._dst_nameports.pop(0)
        arg_0._dst_hostname = arg_2
        arg_1.resolve_address(arg_2, callback = partial(
                                arg_0._got_addresses, arg_2, arg_3),
                                allow_cname = arg_0._dst_service is None)
        arg_0.event(ResolvingAddressEvent(arg_2))

Start hostname resolution for the next name to try .


return _cputimes_ntuple(user, nice, system, idle, irq)

def Func():
    """Return system per-CPU times as a named tuple"""
    arg_0, arg_1, arg_2, arg_3, arg_4 = _psutil_bsd.Func()
    return _cputimes_ntuple(arg_0, arg_1, arg_2, arg_3, arg_4)

Return system per - CPU times as a named tuple


(self, filename, bucket, key,
                    callback=None, extra_args=None)

def Func(arg_0, arg_1, arg_2, arg_3,
                    arg_4=None, arg_5=None):
        """Upload a file to an S3 object.

        Variants have also been injected into S3 client, Bucket and Object.
        You don't have to use S3Transfer.Func() directly.
        """
        if arg_5 is None:
            arg_5 = {}
        arg_0._validate_all_known_args(arg_5, arg_0.ALLOWED_UPLOAD_ARGS)
        arg_6 = arg_0._client.meta.events
        arg_6.register_first('request-created.s3',
                              disable_upload_callbacks,
                              unique_id='s3upload-callback-disable')
        arg_6.register_last('request-created.s3',
                             enable_upload_callbacks,
                             unique_id='s3upload-callback-enable')
        if arg_0._osutil.get_file_size(arg_1) >= \
                arg_0._config.multipart_threshold:
            arg_0._multipart_upload(arg_1, arg_2, arg_3, arg_4, arg_5)
        else:
            arg_0._put_object(arg_1, arg_2, arg_3, arg_4, arg_5)

Upload a file to an S3 object.

        Variants have also been injected into S3 client, Bucket and Object.
        You don't have to use S3Transfer.upload_file() directly.


def Func ( arg_0 , arg_1 ) : def modifier ( arg_2 ) : return arg_0 . _optic . over ( arg_2 , arg_1 ) return modifier

def Func(arg_0, arg_1):
        # type: (Callable[[A], B]) -> Callable[[S], T]
        '''Apply a function to the focus.

            >>> from lenses import lens
            >>> convert_item_one_to_string = lens[1].Func(str)
            >>> convert_item_one_to_string([1, 2, 3])
            [1, '2', 3]
            >>> add_ten_to_item_one = lens[1].Func(lambda n: n + 10)
            >>> add_ten_to_item_one([1, 2, 3])
            [1, 12, 3]
        '''

        def modifier(arg_2):
            return arg_0._optic.over(arg_2, arg_1)

        return modifier

Apply a function to the focus.

            >>> from lenses import lens
            >>> convert_item_one_to_string = lens[1].modify(str)
            >>> convert_item_one_to_string([1, 2, 3])
            [1, '2', 3]
            >>> add_ten_to_item_one = lens[1].modify(lambda n: n + 10)
            >>> add_ten_to_item_one([1, 2, 3])
            [1, 12, 3]


def Func ( arg_0 ) : arg_1 = 0. arg_2 = sorted ( arg_0 ) for arg_3 , arg_4 in zip ( arg_2 [ : - 1 ] , arg_2 [ 1 : ] ) : arg_5 = arg_4 - arg_3 if bool ( arg_5 ) : arg_1 += np . log ( np . abs ( arg_5 ) ) arg_1 = arg_1 / ( len ( arg_0 ) - 1 ) + psi ( len ( arg_0 ) ) - psi ( 1 ) return arg_1

def Func(arg_0):
    """Evaluate the entropy of the input variable.

    :param x: input variable 1D
    :return: entropy of x
    """
    arg_1 = 0.
    arg_2 = sorted(arg_0)
    for arg_3, arg_4 in zip(arg_2[:-1], arg_2[1:]):
        arg_5 = arg_4-arg_3
        if bool(arg_5):
            arg_1 += np.log(np.abs(arg_5))
    arg_1 = arg_1 / (len(arg_0) - 1) + psi(len(arg_0)) - psi(1)

    return arg_1

Evaluate the entropy of the input variable .


def Func(arg_0, arg_1):
    """Adds an EnumDescriptor to the pool.

    This method also registers the FileDescriptor associated with the message.

    Args:
      enum_desc: An EnumDescriptor.
    """

    if not isinstance(arg_1, descriptor.EnumDescriptor):
      raise TypeError('Expected instance of descriptor.EnumDescriptor.')

    arg_0._enum_descriptors[arg_1.full_name] = arg_1
    arg_0.AddFileDescriptor(arg_1.file)


def Func(arg_0, arg_1):
        """
        Extend list from object, if object is list.
        """
        if arg_0.meta_type == 'dict':
            raise AssertionError('Cannot Func to object of `dict` base type!')
        if arg_0.meta_type == 'list':
            arg_0._list.Func(arg_1)
        return

Extend list from object if object is list .


def Func ( arg_0 ) : if type ( arg_0 ) is str : return datetime . strptime ( arg_0 , '%Y-%m-%d' ) . date ( ) else : return arg_0

def Func(arg_0):
    """
    Get the date from a value that could be a date object or a string.

    :param date: The date object or string.

    :returns: The date object.
    """
    if type(arg_0) is str:
        return datetime.strptime(arg_0, '%Y-%m-%d').date()
    else:
        return arg_0

Get the date from a value that could be a date object or a string .


return plugin.streams(stream_types=args.stream_types,
                          sorting_excludes=args.stream_sorting_excludes)

def Func ( arg_0 ) : return arg_0 . streams ( stream_types = args . stream_types , sorting_excludes = args . stream_sorting_excludes )

def Func(arg_0):
    """Fetches streams using correct parameters."""

    return arg_0.streams(stream_types=args.stream_types,
                          sorting_excludes=args.stream_sorting_excludes)

Fetches streams using correct parameters .


def Func ( arg_0 , arg_1 ) : if len ( arg_1 [ 'futures' ] ) > 1 : concurrent . futures . wait ( arg_1 [ 'futures' ] ) elif arg_1 [ 'futures' ] : arg_1 [ 'futures' ] [ 0 ] . result ( ) return arg_0 . result ( arg_1 )

def Func(arg_0, arg_1):
        """Wait for all PSD threads to finish and return result"""
        if len(arg_1['futures']) > 1:
            concurrent.futures.wait(arg_1['futures'])
        elif arg_1['futures']:
            arg_1['futures'][0].result()
        return arg_0.result(arg_1)


def Func(arg_0, arg_1):
        """Remove all of the descendant operation nodes of node."""
        if isinstance(arg_1, int):
            warnings.warn('Calling Func() with a node id is deprecated,'
                          ' use a DAGNode instead',
                          DeprecationWarning, 2)
            arg_1 = arg_0._id_to_node[arg_1]

        arg_2 = nx.descendants(arg_0._multi_graph, arg_1)
        for arg_3 in arg_2:
            if arg_3.type == "op":
                arg_0.remove_op_node(arg_3)

Remove all of the descendant operation nodes of node .


(self, item_name, insert_dict, table, index=None, condition=None,
                               condvars=None,
                               flags=(ADD_ROW, MODIFY_ROW,))

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None, arg_5=None,
                               arg_6=None,
                               arg_7=(arg_8, arg_9,)):
        """Adds or changes a row in a pytable.

        :param item_name: Name of item, the row is about, only important for throwing errors.

        :param insert_dict:

            Dictionary of data that is about to be inserted into the pytables row.

        :param table:

            The table to insert or modify a row in

        :param index:

            Index of row to be modified. Instead of an index a search condition can be
            used as well, see below.

        :param condition:

            Condition to search for in the table

        :param condvars:

            Variables for the search condition

        :param flags:

            Flags whether to add, modify, or remove a row in the table

        """
        if len(arg_7) == 0:
            # No flags means no-op
            return

        # You can only specify either an index or a condition not both
        if arg_4 is not None and arg_5 is not None:
            raise ValueError('Please give either a condition or an index or none!')
        elif arg_5 is not None:
            arg_10 = arg_3.where(arg_5, arg_6=arg_6)
        elif arg_4 is not None:
            arg_10 = arg_3.iterrows(arg_4, arg_4 + 1)
        else:
            arg_10 = None

        try:
            arg_11 = next(arg_10)
        except TypeError:
            arg_11 = None
        except StopIteration:
            arg_11 = None

        # multiple_entries = []

        if ((HDF5StorageService.MODIFY_ROW in arg_7 or HDF5StorageService.ADD_ROW in arg_7) and
                    HDF5StorageService.REMOVE_ROW in arg_7):
            # You cannot remove and modify or add at the same time
            raise ValueError('You cannot add or modify and remove a row at the same time.')

        if arg_11 is None and HDF5StorageService.ADD_ROW in arg_7:
            # Here we add a new row

            arg_11 = arg_3.row

            arg_0._all_insert_into_row(arg_11, arg_2)

            arg_11.append()

        elif arg_11 is not None and HDF5StorageService.MODIFY_ROW in arg_7:
            # Here we modify an existing row

            arg_0._all_insert_into_row(arg_11, arg_2)

            arg_11.update()

        elif HDF5StorageService.REMOVE_ROW in arg_7:
            # Here we delete an existing row

            if arg_11 is not None:
                # Only delete if the row does exist otherwise we do not have to do anything
                arg_12 = arg_11.nrow
                try:
                    arg_3.remove_rows(start=arg_12, stop=arg_12+1)
                except NotImplementedError:
                    pass
                    # We get here if we try to remove the last row of a table
                    # there is nothing we can do but keep it :-(
        else:
            raise ValueError('Something is wrong, you might not have found '
                             'a row, or your flags are not set appropriately')

        arg_0._all_kill_iterator(arg_10)
        arg_3.flush()

        if HDF5StorageService.REMOVE_ROW not in arg_7 and arg_11 is None:
            raise RuntimeError('Could not add or modify entries of `%s` in '
                               'table %s' % (arg_1, arg_3._v_name))


def Func ( arg_0 ) : try : return json . loads ( arg_0 ) except ( OverflowError , TypeError , ValueError ) : pass try : return ElementTree . fromstring ( arg_0 ) except ( ElementTree . ParseError , TypeError , ValueError ) : pass return dict ( parse . parse_qsl ( arg_0 ) )

def Func(arg_0):
    """
    Parses response body from JSON, XML or query string.

    :param body:
        string

    :returns:
        :class:`dict`, :class:`list` if input is JSON or query string,
        :class:`xml.etree.ElementTree.Element` if XML.

    """
    try:
        # Try JSON first.
        return json.loads(arg_0)
    except (OverflowError, TypeError, ValueError):
        pass

    try:
        # Then XML.
        return ElementTree.fromstring(arg_0)
    except (ElementTree.ParseError, TypeError, ValueError):
        pass

    # Finally query string.
    return dict(parse.parse_qsl(arg_0))

Parses response body from JSON XML or query string .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] for arg_4 in arg_1 : if arg_4 is not None : arg_4 = arg_0 . patternMachine . addNoise ( arg_4 , arg_2 ) arg_3 . append ( arg_4 ) return arg_3

def Func(arg_0, arg_1, arg_2):
    """
    Add spatial noise to each pattern in the sequence.

    @param sequence (list)  Sequence
    @param amount   (float) Amount of spatial noise

    @return (list) Sequence with spatial noise
    """
    arg_3 = []

    for arg_4 in arg_1:
      if arg_4 is not None:
        arg_4 = arg_0.patternMachine.addNoise(arg_4, arg_2)
      arg_3.append(arg_4)

    return arg_3

Add spatial noise to each pattern in the sequence .


def Func(arg_0, arg_1, arg_2):
        """Asserts that val is numeric and is close to other within tolerance."""
        arg_0._validate_close_to_args(arg_0.val, arg_1, arg_2)

        if arg_0.val < (arg_1-arg_2) or arg_0.val > (arg_1+arg_2):
            if type(arg_0.val) is datetime.datetime:
                arg_3 = arg_2.days * 86400 + arg_2.seconds + arg_2.microseconds / 1000000
                arg_4, arg_5 = divmod(arg_3, 3600)
                arg_6, arg_7 = divmod(arg_5, 60)
                arg_0._err('Expected <%s> to be close to <%s> within tolerance <%d:%02d:%02d>, but was not.' % (arg_0.val.strftime('%Y-%m-%d %H:%M:%S'), arg_1.strftime('%Y-%m-%d %H:%M:%S'), arg_4, arg_6, arg_7))
            else:
                arg_0._err('Expected <%s> to be close to <%s> within tolerance <%s>, but was not.' % (arg_0.val, arg_1, arg_2))
        return arg_0

Asserts that val is numeric and is close to other within tolerance .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : for arg_4 in arg_0 . get_dep_statuses ( arg_1 , arg_2 , arg_3 ) : if not arg_4 . passed : yield arg_4 . reason

def Func(arg_0, arg_1, arg_2, arg_3=None):
        """
        Returns an iterable of strings that explain why this dependency wasn't met.

        :param ti: the task instance to see if this dependency is met for
        :type ti: airflow.models.TaskInstance
        :param session: database session
        :type session: sqlalchemy.orm.session.Session
        :param dep_context: The context this dependency is being checked under that stores
            state that can be used by this dependency.
        :type dep_context: BaseDepContext
        """
        for arg_4 in arg_0.get_dep_statuses(arg_1, arg_2, arg_3):
            if not arg_4.passed:
                yield arg_4.reason

Returns an iterable of strings that explain why this dependency wasn t met .


def Func ( arg_0 ) : global arg_1 arg_1 = os . path . join ( os . getcwd ( ) , "jacquard.log" ) if arg_0 . log_file : _validate_log_file ( arg_0 . log_file ) arg_1 = arg_0 . log_file logging . basicConfig ( format = _FILE_LOG_FORMAT , level = "DEBUG" , datefmt = _DATE_FORMAT , filename = arg_1 ) global arg_2 if arg_0 . verbose : arg_2 = arg_0 . verbose arg_3 = datetime . now ( ) . strftime ( _DATE_FORMAT ) global arg_4 arg_4 = { 'user' : getpass . getuser ( ) , 'host' : socket . gethostname ( ) , 'start_time' : arg_3 , 'tool' : arg_0 . subparser_name }

def Func(arg_0):
    """Sets command name and formatting for subsequent calls to logger"""

    global arg_1
    arg_1 = os.path.join(os.getcwd(), "jacquard.log")
    if arg_0.log_file:
        _validate_log_file(arg_0.log_file)
        arg_1 = arg_0.log_file

    logging.basicConfig(format=_FILE_LOG_FORMAT,
                        level="DEBUG",
                        datefmt=_DATE_FORMAT,
                        filename=arg_1)

    global arg_2
    if arg_0.verbose:
        arg_2 = arg_0.verbose

    arg_3 = datetime.now().strftime(_DATE_FORMAT)
    global arg_4
    arg_4 = {'user': getpass.getuser(),
                     'host': socket.gethostname(),
                     'start_time': arg_3,
                     'tool': arg_0.subparser_name}


(
            self, resource_group_name, workspace_name, table, filters, custom_headers=None, raw=False, polling=True, **operation_config)

return LROPoller(self._client, raw_result, get_long_running_output, polling_method)

def Func(
            arg_0, arg_1, arg_2, arg_3, arg_4, arg_5=None, arg_6=False, arg_7=True, **arg_8):
        """Purges data in an Log Analytics workspace by a set of user-defined
        filters.

        :param resource_group_name: The name of the resource group to get. The
         name is case insensitive.
        :type resource_group_name: str
        :param workspace_name: Log Analytics workspace name
        :type workspace_name: str
        :param table: Table from which to Func data.
        :type table: str
        :param filters: The set of columns and filters (queries) to run over
         them to Func the resulting data.
        :type filters:
         list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns object or
         ClientRawResponse<object> if raw==True
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        arg_9 = arg_0._Func_initial(
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5,
            arg_6=True,
            **arg_8
        )

        def get_long_running_output(arg_10):
            arg_11 = arg_0._deserialize('object', arg_10)

            if arg_6:
                arg_12 = ClientRawResponse(arg_11, arg_10)
                return arg_12

            return arg_11

        arg_13 = arg_8.get(
            'long_running_operation_timeout',
            arg_0.config.long_running_operation_timeout)
        if arg_7 is True: arg_14 = ARMPolling(arg_13, **arg_8)
        elif arg_7 is False: arg_14 = NoPolling()
        else: arg_14 = arg_7
        return LROPoller(arg_0._client, arg_9, get_long_running_output, arg_14)

Purges data in an Log Analytics workspace by a set of user-defined
        filters.

        :param resource_group_name: The name of the resource group to get. The
         name is case insensitive.
        :type resource_group_name: str
        :param workspace_name: Log Analytics workspace name
        :type workspace_name: str
        :param table: Table from which to purge data.
        :type table: str
        :param filters: The set of columns and filters (queries) to run over
         them to purge the resulting data.
        :type filters:
         list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns object or
         ClientRawResponse<object> if raw==True
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`

Purges data in an Log Analytics workspace by a set of user - defined filters .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . template_context_processors [ None ] arg_3 = _request_ctx_stack . top if arg_3 is not None : arg_4 = arg_3 . request . blueprint if arg_4 is not None and arg_4 in arg_0 . template_context_processors : arg_2 = chain ( arg_2 , arg_0 . template_context_processors [ arg_4 ] ) arg_5 = arg_1 . copy ( ) for arg_6 in arg_2 : arg_1 . update ( arg_6 ( ) ) arg_1 . update ( arg_5 )

def Func(arg_0, arg_1):
        """Update the template context with some commonly used variables.
        This injects request, session, config and g into the template
        context as well as everything template context processors want
        to inject.  Note that the as of Flask 0.6, the original values
        in the context will not be overridden if a context processor
        decides to return a value with the same key.

        :param context: the context as a dictionary that is updated in place
                        to add extra variables.
        """
        arg_2 = arg_0.template_context_processors[None]
        arg_3 = _request_ctx_stack.top
        if arg_3 is not None:
            arg_4 = arg_3.request.blueprint
            if arg_4 is not None and arg_4 in arg_0.template_context_processors:
                arg_2 = chain(arg_2, arg_0.template_context_processors[arg_4])
        arg_5 = arg_1.copy()
        for arg_6 in arg_2:
            arg_1.update(arg_6())
        # make sure the original values win.  This makes it possible to
        # easier add new variables in context processors without breaking
        # existing views.
        arg_1.update(arg_5)

Update the template context with some commonly used variables . This injects request session config and g into the template context as well as everything template context processors want to inject . Note that the as of Flask 0 . 6 the original values in the context will not be overridden if a context processor decides to return a value with the same key .


def Func ( arg_0 , arg_1 ) : for arg_2 , arg_3 in enumerate ( arg_0 ) : arg_4 = _ymd . find_potential_year_tokens ( arg_3 , arg_1 ) if len ( arg_4 ) == 1 and len ( arg_4 [ 0 ] ) > 2 : return arg_2

def Func(arg_0, arg_1):
        """
        attempt to deduce if a pre 100 year was lost
         due to padded zeros being taken off
        """
        for arg_2, arg_3 in enumerate(arg_0):
            arg_4 = _ymd.find_potential_year_tokens(
                arg_3, arg_1)
            if len(arg_4) == 1 and len(arg_4[0]) > 2:
                return arg_2


return zipkin_core.BinaryAnnotation(
        key=key,
        value=value,
        annotation_type=annotation_type,
        host=host,
    )

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Create a zipkin binary annotation object

    :param key: name of the annotation, such as 'http.uri'
    :param value: value of the annotation, such as a URI
    :param annotation_type: type of annotation, such as AnnotationType.I32
    :param host: zipkin endpoint object

    :returns: zipkin binary annotation object
    """
    return zipkin_core.BinaryAnnotation(
        arg_0=arg_0,
        arg_1=arg_1,
        arg_2=arg_2,
        arg_3=arg_3,
    )


def Func(arg_0, arg_1):
        """Retrieve all the questions from a given date.

        :param from_date: obtain questions updated since this date
        """

        arg_2 = 1
        arg_3 = urijoin(arg_0.base_url, arg_0.VERSION_API, "questions")

        arg_4 = arg_0.fetch(arg_3, payload=arg_0.__build_payload(arg_2, arg_1))
        arg_5 = arg_4.text

        arg_6 = arg_4.json()
        arg_7 = arg_6['total']
        arg_8 = arg_6['page_size']

        arg_0.__log_status(arg_6['quota_remaining'],
                          arg_6['quota_max'],
                          arg_8,
                          arg_7)

        while arg_5:
            yield arg_5
            arg_5 = None

            if arg_6['has_more']:
                arg_2 += 1

                arg_9 = arg_6.get('backoff', None)
                if arg_9:
                    logger.debug("Expensive query. Wait %s secs to send a new request",
                                 arg_9)
                    time.sleep(float(arg_9))

                arg_4 = arg_0.fetch(arg_3, payload=arg_0.__build_payload(arg_2, arg_1))
                arg_6 = arg_4.json()
                arg_5 = arg_4.text
                arg_8 += arg_6['page_size']
                arg_0.__log_status(arg_6['quota_remaining'],
                                  arg_6['quota_max'],
                                  arg_8,
                                  arg_7)

Retrieve all the questions from a given date .


return tuple(reversed(self.output_dims())) + tuple(
            reversed(self.input_dims()))

def Func ( arg_0 ) : return tuple ( reversed ( arg_0 . output_dims ( ) ) ) + tuple ( reversed ( arg_0 . input_dims ( ) ) )

def Func(arg_0):
        """Return the tensor shape of the matrix operator"""
        return tuple(reversed(arg_0.output_dims())) + tuple(
            reversed(arg_0.input_dims()))


def Func ( arg_0 , arg_1 ) : check_type ( arg_1 , basestring , may_be_none = False ) arg_0 . _session . Func ( API_ENDPOINT + '/' + arg_1 )

def Func(arg_0, arg_1):
        """Delete a team membership, by ID.

        Args:
            membershipId(basestring): The team membership ID.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.

        """
        check_type(arg_1, basestring, may_be_none=False)

        # API request
        arg_0._session.Func(API_ENDPOINT + '/' + arg_1)


def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = ( 'book' , arg_1 ) arg_0 . _subscribe ( 'book' , arg_3 , symbol = arg_1 , ** arg_2 )

def Func(arg_0, arg_1, **arg_2):
        """Subscribe to the passed pair's order book channel.

        :param pair: str, Symbol pair to request data for
        :param kwargs:
        :return:
        """
        arg_3 = ('book', arg_1)
        arg_0._subscribe('book', arg_3, symbol=arg_1, **arg_2)

Subscribe to the passed pair s order book channel .


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Update tags for a specific subscriber.

        The documentation lists only the tags request body parameter so it is
        being documented and error-checked as if it were required based on the
        description of the method.

        The data list needs to include a "status" key. This determines if the
        tag should be added or removed from the user:

        data = {
            'tags': [
                {'name': 'foo', 'status': 'active'},
                {'name': 'bar', 'status': 'inactive'}
            ]
        }

        :param list_id: The unique id for the list.
        :type list_id: :py:class:`str`
        :param subscriber_hash: The MD5 hash of the lowercase version of the
          list member’s email address.
        :type subscriber_hash: :py:class:`str`
        :param data: The request body parameters
        :type data: :py:class:`dict`
        data = {
            "tags": list*
        }
        """
        arg_2 = check_subscriber_hash(arg_2)
        arg_0.list_id = arg_1
        arg_0.subscriber_hash = arg_2
        if 'tags' not in arg_3:
            raise KeyError('The list member tags must have a tag')
        arg_4 = arg_0._mc_client._post(url=arg_0._build_path(arg_1, 'members', arg_2, 'tags'), arg_3=arg_3)
        return arg_4


def Func ( arg_0 , arg_1 = True ) : arg_2 = arg_0 . _dtype if isinstance ( arg_2 , Bits ) : yield arg_0 elif isinstance ( arg_2 , HUnion ) : yield from Func ( arg_0 . _val , arg_1 = arg_1 ) elif isinstance ( arg_2 , HStruct ) : for arg_3 in arg_2 . fields : arg_4 = arg_3 . name is None if not arg_4 or not arg_1 : if arg_4 : arg_5 = arg_3 . dtype . fromPy ( None ) else : arg_5 = getattr ( arg_0 , arg_3 . name ) yield from Func ( arg_5 ) elif isinstance ( arg_2 , HArray ) : for arg_6 in arg_0 : yield from Func ( arg_6 ) else : raise NotImplementedError ( arg_2 )

def Func(arg_0, arg_1=True):
    """
    Walk all simple values in HStruct or HArray
    """
    arg_2 = arg_0._dtype
    if isinstance(arg_2, Bits):
        yield arg_0
    elif isinstance(arg_2, HUnion):
        yield from Func(arg_0._val, arg_1=arg_1)
    elif isinstance(arg_2, HStruct):
        for arg_3 in arg_2.fields:
            arg_4 = arg_3.name is None
            if not arg_4 or not arg_1:
                if arg_4:
                    arg_5 = arg_3.dtype.fromPy(None)
                else:
                    arg_5 = getattr(arg_0, arg_3.name)

                yield from Func(arg_5)

    elif isinstance(arg_2, HArray):
        for arg_6 in arg_0:
            yield from Func(arg_6)
    else:
        raise NotImplementedError(arg_2)


def Func(arg_0, arg_1, arg_2, arg_3):
        """Handles data and returns `True` or `False` if everything is done."""
        arg_4 = False
        try:
            if arg_1 == 'DONE':
                arg_4 = True
            elif arg_1 == 'STORE':
                if 'msg' in arg_3:
                    arg_5 = arg_3.pop('msg')
                else:
                    arg_5 = arg_2[0]
                    arg_2 = arg_2[1:]
                if 'stuff_to_store' in arg_3:
                    arg_6 = arg_3.pop('stuff_to_store')
                else:
                    arg_6 = arg_2[0]
                    arg_2 = arg_2[1:]
                arg_7 = arg_3['trajectory_name']
                if arg_0._trajectory_name != arg_7:
                    if arg_0._storage_service.is_open:
                        arg_0._close_file()
                    arg_0._trajectory_name = arg_7
                    arg_0._open_file()
                arg_0._storage_service.store(arg_5, arg_6, *arg_2, **arg_3)
                arg_0._storage_service.store(pypetconstants.FLUSH, None)
                arg_0._check_and_collect_garbage()
            else:
                raise RuntimeError('You queued something that was not '
                                   'intended to be queued. I did not understand message '
                                   '`%s`.' % arg_1)
        except Exception:
            arg_0._logger.exception('ERROR occurred during storing!')
            time.sleep(0.01)
            pass  # We don't want to kill the queue process in case of an error

        return arg_4

Handles data and returns True or False if everything is done .


(self, path, use_sudo=False, user=None, force=False)

def Func(arg_0, arg_1, arg_2=False, arg_3=None, arg_4=False):
        """
        Fetch changes from the default remote repository and merge them.

        :param path: Path of the working copy directory.  This directory must exist
                     and be a Git working copy with a default remote to Func from.
        :type path: str

        :param use_sudo: If ``True`` execute ``git`` with
                         :func:`fabric.operations.sudo`, else with
                         :func:`fabric.operations.run`.
        :type use_sudo: bool

        :param user: If ``use_sudo is True``, run :func:`fabric.operations.sudo`
                     with the given user.  If ``use_sudo is False`` this parameter
                     has no effect.
        :type user: str
        :param force: If ``True``, append the ``--force`` option to the command.
        :type force: bool
        """

        if arg_1 is None:
            raise ValueError("Path to the working copy is needed to Func from a remote repository.")

        arg_5 = []
        if arg_4:
            arg_5.append('--force')
        arg_5 = ' '.join(arg_5)

        arg_6 = 'git Func %s' % arg_5

        with cd(arg_1):
            if arg_2 and arg_3 is None:
                run_as_root(arg_6)
            elif arg_2:
                sudo(arg_6, arg_3=arg_3)
            else:
                run(arg_6)

Fetch changes from the default remote repository and merge them.

        :param path: Path of the working copy directory.  This directory must exist
                     and be a Git working copy with a default remote to pull from.
        :type path: str

        :param use_sudo: If ``True`` execute ``git`` with
                         :func:`fabric.operations.sudo`, else with
                         :func:`fabric.operations.run`.
        :type use_sudo: bool

        :param user: If ``use_sudo is True``, run :func:`fabric.operations.sudo`
                     with the given user.  If ``use_sudo is False`` this parameter
                     has no effect.
        :type user: str
        :param force: If ``True``, append the ``--force`` option to the command.
        :type force: bool

Fetch changes from the default remote repository and merge them .


def Func ( arg_0 , arg_1 ) : arg_0 . data [ arg_1 ] = '' arg_0 . workers . Func ( arg_1 )

def Func(arg_0, arg_1):
        """\
        Indicate that the worker with given nick is performing this task
        """
        arg_0.data[arg_1] = ''
        arg_0.workers.Func(arg_1)


return (method_name, filename, arg_class)

def Func(arg_0=2):
  """Utility function to get information about function callers

  The information is the tuple (function/method name, filename, class)
  The class will be None if the caller is just a function and not an object
  method.

  :param depth: (int) how far back in the callstack to go to extract the caller
         info

  """
  arg_1 = sys._getframe(arg_0)
  arg_2 = arg_1.f_code.co_name
  arg_3 = arg_1.f_code.co_filename

  arg_4 = None
  arg_5 = inspect.getargvalues(arg_1)
  if len(arg_5[0]) > 0:
    arg_6 = arg_5[0][0] # potentially the 'self' arg if its a method
    arg_4 = arg_5[3][arg_6].__class__.__name__
  return (arg_2, arg_3, arg_4)


def Func(arg_0, arg_1):
        """
        Return configuration parameters snapshot for zoom as dictionary.

        Parameters
        ----------
        zoom : int
            zoom level

        Returns
        -------
        configuration snapshot : dictionary
        zoom level dependent process configuration
        """
        if arg_1 not in arg_0.init_zoom_levels:
            raise ValueError(
                "zoom level not available with current configuration")
        arg_2 = dict(arg_0._Func[arg_1], input={}, output=arg_0.output)
        if "input" in arg_0._Func[arg_1]:
            arg_3 = {}
            for arg_4, arg_5 in _flatten_tree(arg_0._Func[arg_1]["input"]):
                if arg_5 is None:
                    arg_3[arg_4] = None
                else:
                    arg_3[arg_4] = arg_0.input[get_hash(arg_5)]
            arg_2["input"] = _unflatten_tree(arg_3)
        else:
            arg_2["input"] = {}
        return arg_2

Return configuration parameters snapshot for zoom as dictionary .


def Func(arg_0, arg_1):
  """Check that a shape Tensor is int-type and otherwise sane."""
  if not dtype_util.is_integer(arg_0.dtype):
    raise TypeError('{} dtype ({}) should be `int`-like.'.format(
        arg_0, dtype_util.name(arg_0.dtype)))

  arg_2 = []

  arg_3 = '`{}` rank should be <= 1.'
  if tensorshape_util.rank(arg_0.shape) is not None:
    if tensorshape_util.rank(arg_0.shape) > 1:
      raise ValueError(arg_3.format(arg_0))
  elif arg_1:
    arg_2.append(assert_util.assert_less(
        tf.rank(arg_0), 2, arg_3=arg_3.format(arg_0)))

  arg_4 = tf.get_static_value(arg_0)

  arg_3 = '`{}` elements must have at most one `-1`.'
  if arg_4 is not None:
    if sum(arg_4 == -1) > 1:
      raise ValueError(arg_3.format(arg_0))
  elif arg_1:
    arg_2.append(assert_util.assert_less(
        tf.reduce_sum(input_tensor=tf.cast(tf.equal(arg_0, -1), tf.int32)),
        2,
        arg_3=arg_3.format(arg_0)))

  arg_3 = '`{}` elements must be either positive integers or `-1`.'
  if arg_4 is not None:
    if np.any(arg_4 < -1):
      raise ValueError(arg_3.format(arg_0))
  elif arg_1:
    arg_2.append(assert_util.assert_greater(
        arg_0, -2, arg_3=arg_3.format(arg_0)))

  return arg_2

Check that a shape Tensor is int - type and otherwise sane .


def
Func
(
arg_0
)
:
@
functools
.
wraps
(
arg_0
)
def
func_wrapped
(
*
arg_1
,
**
arg_2
)
:
arg_3
,
arg_4
=
arg_0
(
*
arg_1
,
**
arg_2
)
if
any
(
arg_5
is
for
arg_5
in
arg_4
)
:
raise
ValueError
(
"Gradient is None for a state."
)
return
arg_3
,
arg_4
return
func_wrapped

def Func(arg_0):
  """Wraps value and gradients function to assist with None gradients."""
  @functools.wraps(arg_0)
  def func_wrapped(*arg_1, **arg_2):
    """Wrapped function which checks for None gradients."""
    arg_3, arg_4 = arg_0(*arg_1, **arg_2)
    if any(arg_5 is None for arg_5 in arg_4):
      raise ValueError("Gradient is None for a state.")
    return arg_3, arg_4
  return func_wrapped

Wraps value and gradients function to assist with None gradients .


(dat, keys=None, bins=25, logy=False, cmap=None, ncol=4)

def Func(arg_0, arg_1=None, arg_2=25, arg_3=False, arg_4=None, arg_5=4):
    """
    Plot Func of all items in dat.

    Parameters
    ----------
    dat : dict
        Data in {key: array} pairs.
    keys : arra-like
        The keys in dat that you want to plot. If None,
        all are plotted.
    bins : int
        The number of bins in each histogram (default = 25)
    logy : bool
        If true, y axis is a log scale.
    cmap : dict
        The colours that the different items should be. If None,
        all are grey.

    Returns
    -------
    fig, axes
    """
    if arg_1 is None:
        arg_1 = arg_0.keys()

    arg_5 = int(arg_5)
    arg_6 = calc_nrow(len(arg_1), arg_5)

    arg_7, arg_8 = plt.subplots(arg_6, 4, figsize=[arg_5 * 2, arg_6 * 2])

    arg_9 = 0
    for arg_10, arg_11 in zip(arg_1, arg_8.flat):
        arg_12 = nominal_values(arg_0[arg_10])
        arg_13 = arg_12[~np.isnan(arg_12)]

        if arg_4 is not None:
            arg_14 = arg_4[arg_10]
        else:
            arg_14 = (0, 0, 0, 0.5)
        arg_11.hist(arg_13, arg_2=arg_2, color=arg_14)

        if arg_3:
            arg_11.set_yscale('log')
            arg_15 = '$log_{10}(n)$'
        else:
            arg_15 = 'n'

        arg_11.set_ylim(1, arg_11.get_ylim()[1])

        if arg_11.is_first_col():
            arg_11.set_ylabel(arg_15)

        arg_11.set_yticklabels([])

        arg_11.text(.95, .95, arg_10, ha='right', va='top', transform=arg_11.transAxes)

        arg_9 += 1

    for arg_11 in arg_8.flat[arg_9:]:
        arg_11.set_visible(False)
    arg_7.tight_layout()

    return arg_7, arg_8

Plot histograms of all items in dat.

    Parameters
    ----------
    dat : dict
        Data in {key: array} pairs.
    keys : arra-like
        The keys in dat that you want to plot. If None,
        all are plotted.
    bins : int
        The number of bins in each histogram (default = 25)
    logy : bool
        If true, y axis is a log scale.
    cmap : dict
        The colours that the different items should be. If None,
        all are grey.

    Returns
    -------
    fig, axes


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
if
not
isinstance
(
arg_1
,
str
)
:
raise
RuntimeError
(
"Name has to be a string type"
)
if
not
isinstance
(
arg_2
,
Config
)
:
raise
RuntimeError
(
"config has to be a Config type"
)
if
not
isinstance
(
arg_3
,
Builder
)
:
raise
RuntimeError
(
"builder has to be a Builder type"
)
arg_4
=
TopologyBuilder
(
arg_1
=
arg_1
)
arg_3
.
build
(
arg_4
)
arg_4
.
set_config
(
arg_2
.
_api_config
)
arg_4
.
build_and_submit
(
)

def Func(arg_0, arg_1, arg_2, arg_3):
    """Builds the topology and submits it"""
    if not isinstance(arg_1, str):
      raise RuntimeError("Name has to be a string type")
    if not isinstance(arg_2, Config):
      raise RuntimeError("config has to be a Config type")
    if not isinstance(arg_3, Builder):
      raise RuntimeError("builder has to be a Builder type")
    arg_4 = TopologyBuilder(arg_1=arg_1)
    arg_3.build(arg_4)
    arg_4.set_config(arg_2._api_config)
    arg_4.build_and_submit()


def Func(arg_0, arg_1):
        """Get a person's details, by ID.

        Args:
            personId(basestring): The ID of the person to be retrieved.

        Returns:
            Person: A Person object with the details of the requested person.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.

        """
        check_type(arg_1, basestring, may_be_none=False)

        # API request
        arg_2 = arg_0._session.Func(API_ENDPOINT + '/' + arg_1)

        # Return a person object created from the response JSON data
        return arg_0._object_factory(OBJECT_TYPE, arg_2)


def Func ( arg_0 , arg_1 ) : arg_2 = [ trim_range ( x ) for x in [ arg_0 , arg_1 ] ] arg_3 = max ( [ x [ 0 ] for x in arg_2 ] ) arg_4 = min ( [ x [ 1 ] for x in arg_2 ] ) return arg_3 , arg_4

def Func(arg_0, arg_1):
    """Get the optimal read trim range from data files of paired FastQ reads.

    Given the FastQC data report files for paired-end FastQ reads, this
    function will assess the optimal trim range for the 3' and 5' ends of
    the paired-end reads. This assessment will be based on the *'Per sequence
    GC content'*.

    Parameters
    ----------
    p1_data: str
        Path to FastQC data report file from pair 1
    p2_data: str
        Path to FastQC data report file from pair 2

    Returns
    -------
    optimal_5trim: int
        Optimal trim index for the 5' end of the reads
    optima_3trim: int
        Optimal trim index for the 3' end of the reads

    See Also
    --------
    trim_range

    """

    arg_2 = [trim_range(x) for x in [arg_0, arg_1]]

    # Get the optimal trim position for 5' end
    arg_3 = max([x[0] for x in arg_2])
    # Get optimal trim position for 3' end
    arg_4 = min([x[1] for x in arg_2])

    return arg_3, arg_4

Get the optimal read trim range from data files of paired FastQ reads .


def Func(arg_0, arg_1):
        "called when adding a control to the window"
        if arg_0.sizer:
            if DEBUG: print "adding to sizer:", arg_1.name
            arg_2 = None
            if not arg_2:
                arg_2 = arg_1.sizer_border
            arg_3 = arg_1._sizer_flags
            if arg_1.sizer_align:
                arg_3 |= arg_1._sizer_align
            if arg_1.sizer_expand:
                arg_3 |= wx.EXPAND
            if 'grid' in arg_0.sizer:
                arg_0._sizer.Add(arg_1.wx_obj, flag=arg_3, arg_2=arg_2,
                                pos=(arg_1.sizer_row, arg_1.sizer_col),
                                span=(arg_1.sizer_rowspan, arg_1.sizer_colspan))
            else:
                arg_0._sizer.Add(arg_1.wx_obj, 0, arg_3, arg_2)


def
Func
(
arg_0
,
arg_1
)
->
str
:
arg_2
=
'\n'
.
join
(
[
f'tickers: {tickers[:8]}'
]
+
[
f'         {tickers[n:(n + 8)]}'
for
n
in
range
(
8
,
len
(
arg_0
)
,
8
)
]
)
return
f'{full_list}\nfields:  {flds}'

def Func(arg_0, arg_1) -> str:
    """
    Logging info for given tickers and fields

    Args:
        tickers: tickers
        flds: fields

    Returns:
        str

    Examples:
        >>> print(Func(
        ...     tickers=['NVDA US Equity'], flds=['Name', 'Security_Name']
        ... ))
        tickers: ['NVDA US Equity']
        fields:  ['Name', 'Security_Name']
    """
    arg_2 = '\n'.join([f'tickers: {tickers[:8]}'] + [
        f'         {tickers[n:(n + 8)]}' for n in range(8, len(arg_0), 8)
    ])
    return f'{full_list}\nfields:  {flds}'

Logging info for given tickers and fields

    Args:
        tickers: tickers
        flds: fields

    Returns:
        str

    Examples:
        >>> print(info_qry(
        ...     tickers=['NVDA US Equity'], flds=['Name', 'Security_Name']
        ... ))
        tickers: ['NVDA US Equity']
        fields:  ['Name', 'Security_Name']


def Func(arg_0, arg_1, arg_2, arg_3):
        """The number of conflicts, as recorded with each assignment.
        Count conflicts in row and in up, down diagonals. If there
        is a queen there, it can't conflict with itself, so subtract 3."""
        arg_4 = len(arg_0.vars)
        arg_5 = arg_0.rows[arg_2] + arg_0.downs[arg_1+arg_2] + arg_0.ups[arg_1-arg_2+arg_4-1]
        if arg_3.get(arg_1, None) == arg_2:
            arg_5 -= 3
        return arg_5

The number of conflicts as recorded with each assignment . Count conflicts in row and in up down diagonals . If there is a queen there it can t conflict with itself so subtract 3 .


def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
)
:
from
burlap
.
common
import
(
required_system_packages
,
required_python_packages
,
required_ruby_packages
,
)
arg_2
=
(
arg_2
or
''
)
.
strip
(
)
.
upper
(
)
arg_1
=
(
arg_1
or
''
)
.
lower
(
)
.
strip
(
)
assert
not
arg_1
or
arg_1
in
PACKAGE_TYPES
,
'Unknown package type: %s'
%
(
arg_1
,
)
arg_3
=
set
(
)
arg_4
=
[
]
arg_5
=
arg_0
.
os_version
for
arg_6
,
arg_7
in
arg_0
.
all_other_enabled_satchels
.
items
(
)
:
arg_6
=
arg_6
.
strip
(
)
.
upper
(
)
if
arg_2
and
arg_2
!=
arg_6
:
continue
arg_8
=
[
]
if
not
arg_1
or
arg_1
==
SYSTEM
:
arg_8
.
extend
(
required_system_packages
.
get
(
arg_6
,
{
}
)
.
get
(
(
arg_5
.
distro
,
arg_5
.
release
)
,
[
]
)
)
try
:
arg_9
=
arg_7
.
packager_system_packages
if
arg_0
.
verbose
:
print
(
'pkgs:'
)
pprint
(
arg_9
,
indent
=
4
)
for
arg_10
in
[
(
arg_5
.
distro
,
arg_5
.
release
)
,
arg_5
.
distro
]
:
if
arg_0
.
verbose
:
print
(
'checking key:'
,
arg_10
)
if
arg_10
in
arg_9
:
if
arg_0
.
verbose
:
print
(
'satchel %s requires:'
%
arg_7
,
arg_9
[
arg_10
]
)
arg_8
.
extend
(
arg_9
[
arg_10
]
)
break
except
AttributeError
:
pass
if
not
arg_1
or
arg_1
==
PYTHON
:
arg_8
.
extend
(
required_python_packages
.
get
(
arg_6
,
{
}
)
.
get
(
(
arg_5
.
distro
,
arg_5
.
release
)
,
[
]
)
)
try
:
arg_9
=
arg_7
.
packager_python_packages
for
arg_10
in
[
(
arg_5
.
distro
,
arg_5
.
release
)
,
arg_5
.
distro
]
:
if
arg_10
in
arg_9
:
arg_8
.
extend
(
arg_9
[
arg_10
]
)
except
AttributeError
:
pass
print
(
'_new:'
,
arg_8
)
if
not
arg_1
or
arg_1
==
RUBY
:
arg_8
.
extend
(
required_ruby_packages
.
get
(
arg_6
,
{
}
)
.
get
(
(
arg_5
.
distro
,
arg_5
.
release
)
,
[
]
)
)
for
arg_11
in
arg_8
:
if
arg_11
in
arg_3
:
continue
arg_3
.
add
(
arg_11
)
arg_4
.
append
(
arg_11
)
if
arg_0
.
verbose
:
for
arg_12
in
sorted
(
arg_4
)
:
print
(
'package:'
,
arg_12
)
return
arg_4

def Func(arg_0, arg_1=None, arg_2=None): # pylint: disable=redefined-builtin
        """
        Displays all packages required by the current role
        based on the documented services provided.
        """
        from burlap.common import (
            required_system_packages,
            required_python_packages,
            required_ruby_packages,
        )
        arg_2 = (arg_2 or '').strip().upper()
        arg_1 = (arg_1 or '').lower().strip()
        assert not arg_1 or arg_1 in PACKAGE_TYPES, 'Unknown package type: %s' % (arg_1,)
        arg_3 = set()
        arg_4 = []
        arg_5 = arg_0.os_version

        for arg_6, arg_7 in arg_0.all_other_enabled_satchels.items():

            arg_6 = arg_6.strip().upper()
            if arg_2 and arg_2 != arg_6:
                continue

            arg_8 = []

            if not arg_1 or arg_1 == SYSTEM:

                #TODO:deprecated, remove
                arg_8.extend(required_system_packages.get(
                    arg_6, {}).get((arg_5.distro, arg_5.release), []))

                try:
                    arg_9 = arg_7.packager_system_packages
                    if arg_0.verbose:
                        print('pkgs:')
                        pprint(arg_9, indent=4)
                    for arg_10 in [(arg_5.distro, arg_5.release), arg_5.distro]:
                        if arg_0.verbose:
                            print('checking key:', arg_10)
                        if arg_10 in arg_9:
                            if arg_0.verbose:
                                print('satchel %s requires:' % arg_7, arg_9[arg_10])
                            arg_8.extend(arg_9[arg_10])
                            break
                except AttributeError:
                    pass

            if not arg_1 or arg_1 == PYTHON:

                #TODO:deprecated, remove
                arg_8.extend(required_python_packages.get(
                    arg_6, {}).get((arg_5.distro, arg_5.release), []))

                try:
                    arg_9 = arg_7.packager_python_packages
                    for arg_10 in [(arg_5.distro, arg_5.release), arg_5.distro]:
                        if arg_10 in arg_9:
                            arg_8.extend(arg_9[arg_10])
                except AttributeError:
                    pass
                print('_new:', arg_8)

            if not arg_1 or arg_1 == RUBY:

                #TODO:deprecated, remove
                arg_8.extend(required_ruby_packages.get(
                    arg_6, {}).get((arg_5.distro, arg_5.release), []))

            for arg_11 in arg_8:
                if arg_11 in arg_3:
                    continue
                arg_3.add(arg_11)
                arg_4.append(arg_11)
        if arg_0.verbose:
            for arg_12 in sorted(arg_4):
                print('package:', arg_12)
        return arg_4

Displays all packages required by the current role based on the documented services provided .


return any(req_man.check(*checked) for checked in self.checked)

def Func ( arg_0 , arg_1 ) : arg_2 = RequirementsManager ( [ arg_1 ] ) return any ( arg_2 . check ( * arg_3 ) for arg_3 in arg_0 . checked )

def Func(arg_0, arg_1):
        """
        Check if requirement is already satisfied by what was previously checked

        :param Requirement req: Requirement to check
        """
        arg_2 = RequirementsManager([arg_1])

        return any(arg_2.check(*arg_3) for arg_3 in arg_0.checked)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = requests . get ( arg_1 , params = arg_2 , auth = arg_0 . auth , verify = arg_0 . verify ) try : arg_3 . raise_for_status ( ) except requests . exceptions . HTTPError as e : raise e return arg_3

def Func(arg_0, arg_1, arg_2):
        """Fetch requests from groupsio API"""

        arg_3 = requests.get(arg_1, params=arg_2, auth=arg_0.auth, verify=arg_0.verify)
        try:
            arg_3.raise_for_status()
        except requests.exceptions.HTTPError as e:
            raise e

        return arg_3


def Func():
    """Verify LNVM variables and construct exported variables"""

    if cij.ssh.Func():
        cij.err("cij.lnvm.Func: invalid SSH Funcironment")
        return 1

    arg_0 = cij.Func_to_dict(PREFIX, REQUIRED)
    arg_1 = cij.Func_to_dict("NVME", ["DEV_NAME"])

    if "BGN" not in arg_0.keys():
        cij.err("cij.lnvm.Func: invalid LNVM_BGN")
        return 1
    if "END" not in arg_0.keys():
        cij.err("cij.lnvm.Func: invalid LNVM_END")
        return 1
    if "DEV_TYPE" not in arg_0.keys():
        cij.err("cij.lnvm.Func: invalid LNVM_DEV_TYPE")
        return 1

    arg_0["DEV_NAME"] = "%sb%03de%03d" % (arg_1["DEV_NAME"], int(arg_0["BGN"]), int(arg_0["END"]))
    arg_0["DEV_PATH"] = "/dev/%s" % arg_0["DEV_NAME"]

    cij.Func_export(PREFIX, EXPORTED, arg_0)

    return 0


def Func ( arg_0 ) : arg_0 . thread = threading . currentThread ( ) sys . settrace ( arg_0 . _trace ) return arg_0 . _trace

def Func(arg_0):
        """Start this Tracer.

        Return a Python function suitable for use with sys.settrace().

        """
        arg_0.thread = threading.currentThread()
        sys.settrace(arg_0._trace)
        return arg_0._trace


(self, seq_p, seq_ch, pattern_multiplicity=None, ignore_gaps=False)

def Func(arg_0, arg_1, arg_2, arg_3=None, arg_4=False):
        '''
        Find the optimal distance between the two sequences

        Parameters
        ----------

         seq_p : character array
            Parent sequence

         seq_c : character array
            Child sequence

         pattern_multiplicity : numpy array
            If sequences are reduced by combining identical alignment patterns,
            these multplicities need to be accounted for when counting the number
            of mutations across a branch. If None, all pattern are assumed to
            occur exactly once.

         ignore_gaps : bool
            If True, ignore gaps in distance calculations

        '''
        arg_5, arg_6 = arg_0.compress_sequence_pair(arg_1, arg_2,
                                                            arg_3 = arg_3,
                                                            arg_4=arg_4)
        return arg_0.Func_compressed(arg_5, arg_6)