def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Stores individual items to disk.

        This function is useful if you calculated very large results (or large derived parameters)
        during runtime and you want to write these to disk immediately and empty them afterwards
        to free some memory.

        Instead of storing individual parameters or results you can also store whole subtrees with
        :func:`~pypet.naturalnaming.NNGroupNode.f_store_child`.

        You can pass the following arguments to `Func`:

        :param iterator:

            An iterable containing the parameters or results to store, either their
            names or the instances. You can also pass group instances or names here
            to store the annotations of the groups.

        :param non_empties:

            Optional keyword argument (boolean),
            if `True` will only store the subset of provided items that are not empty.
            Empty parameters or results found in `iterator` are simply ignored.

        :param args: Additional arguments passed to the storage service

        :param kwargs:

            If you use the standard hdf5 storage service, you can pass the following additional
            keyword argument:

            :param overwrite:

                List names of parts of your item that should
                be erased and overwritten by the new data in your leaf.
                You can also set `overwrite=True`
                to overwrite all parts.

                For instance:

                    >>> traj.f_add_result('mygroup.myresult', partA=42, partB=44, partC=46)
                    >>> traj.f_store()
                    >>> traj.mygroup.myresult.partA = 333
                    >>> traj.mygroup.myresult.partB = 'I am going to change to a string'
                    >>> traj.f_store_item('mygroup.myresult', overwrite=['partA', 'partB'])

                Will store `'mygroup.myresult'` to disk again and overwrite the parts
                `'partA'` and `'partB'` with the new values `333` and
                `'I am going to change to a string'`.
                The data stored as `partC` is not changed.

                Be aware that you need to specify the names of parts as they were stored
                to HDF5. Depending on how your leaf construction works, this may differ
                from the names the data might have in your leaf in the trajectory container.

                Note that massive overwriting will fragment and blow up your HDF5 file.
                Try to avoid changing data on disk whenever you can.

        :raises:

            TypeError:

                If the (parent) trajectory has never been stored to disk. In this case
                use :func:`pypet.trajectory.f_store` first.

            ValueError: If no item could be found to be stored.

        Note if you use the standard hdf5 storage service, there are no additional arguments
        or keyword arguments to pass!

        """

        if not arg_0._stored:
            raise TypeError('Cannot store stuff for a trajectory that has never been '
                            'stored to disk. Please call traj.f_store(only_init=True) first.')

        arg_4 = arg_0._nn_interface._fetch_items(STORE, arg_1, arg_2, arg_3)

        if arg_4:
            arg_0._storage_service.store(pypetconstants.LIST, arg_4,
                                        trajectory_name=arg_0.v_name)
        else:
            raise ValueError('Your storage was not successful, could not find a single item '
                             'to store.')

Stores individual items to disk.

        This function is useful if you calculated very large results (or large derived parameters)
        during runtime and you want to write these to disk immediately and empty them afterwards
        to free some memory.

        Instead of storing individual parameters or results you can also store whole subtrees with
        :func:`~pypet.naturalnaming.NNGroupNode.f_store_child`.

        You can pass the following arguments to `f_store_items`:

        :param iterator:

            An iterable containing the parameters or results to store, either their
            names or the instances. You can also pass group instances or names here
            to store the annotations of the groups.

        :param non_empties:

            Optional keyword argument (boolean),
            if `True` will only store the subset of provided items that are not empty.
            Empty parameters or results found in `iterator` are simply ignored.

        :param args: Additional arguments passed to the storage service

        :param kwargs:

            If you use the standard hdf5 storage service, you can pass the following additional
            keyword argument:

            :param overwrite:

                List names of parts of your item that should
                be erased and overwritten by the new data in your leaf.
                You can also set `overwrite=True`
                to overwrite all parts.

                For instance:

                    >>> traj.f_add_result('mygroup.myresult', partA=42, partB=44, partC=46)
                    >>> traj.f_store()
                    >>> traj.mygroup.myresult.partA = 333
                    >>> traj.mygroup.myresult.partB = 'I am going to change to a string'
                    >>> traj.f_store_item('mygroup.myresult', overwrite=['partA', 'partB'])

                Will store `'mygroup.myresult'` to disk again and overwrite the parts
                `'partA'` and `'partB'` with the new values `333` and
                `'I am going to change to a string'`.
                The data stored as `partC` is not changed.

                Be aware that you need to specify the names of parts as they were stored
                to HDF5. Depending on how your leaf construction works, this may differ
                from the names the data might have in your leaf in the trajectory container.

                Note that massive overwriting will fragment and blow up your HDF5 file.
                Try to avoid changing data on disk whenever you can.

        :raises:

            TypeError:

                If the (parent) trajectory has never been stored to disk. In this case
                use :func:`pypet.trajectory.f_store` first.

            ValueError: If no item could be found to be stored.

        Note if you use the standard hdf5 storage service, there are no additional arguments
        or keyword arguments to pass!


(self, opr, *, ignore_whitespace, **kwargs)

def
Func
(
arg_0
,
arg_1
,
*
,
arg_2
,
**
arg_3
)
:
arg_4
=
OP_CONCAT
if
arg_2
else
OP_WS_CONCAT
arg_5
=
arg_0
.
_hoist_operands
(
arg_1
.
operands
,
lambda
t
:
isinstance
(
t
,
OptreeNode
)
and
t
.
opnode
.
operator
is
arg_4
)
arg_6
=
[
"concatenation(["
]
for
arg_7
in
arg_5
:
arg_6
.
extend
(
arg_0
.
_indent
(
arg_0
.
_ast_to_code
(
arg_7
,
arg_2
=
arg_2
)
)
)
arg_6
[
1
]
+=
","
arg_6
.
append
(
"], ignore_whitespace={})"
.
format
(
bool
(
arg_2
)
)
)
return
arg_6

def Func(arg_0, arg_1, *, arg_2, **arg_3):
    """Convert an AST concatenate op to python source code."""
    arg_4 = OP_CONCAT if arg_2 else OP_WS_CONCAT
    arg_5 = arg_0._hoist_operands(arg_1.operands, lambda t: isinstance(t, OptreeNode) and t.opnode.operator is arg_4)

    arg_6 = ["concatenation(["]
    for arg_7 in arg_5:
      arg_6.extend(arg_0._indent(arg_0._ast_to_code(arg_7, arg_2=arg_2)))
      arg_6[-1] += ","
    arg_6.append("], ignore_whitespace={})".format(bool(arg_2)))
    return arg_6

Convert an AST concatenate op to python source code .


return check_nonce(request, oauth_request, oauth_nonce, oauth_timestamp)

def Func(arg_0, arg_1, arg_2):
        """
        Checks nonce of request, and return True if valid.
        """
        arg_3 = arg_2['oauth_nonce']
        arg_4 = arg_2['oauth_timestamp']
        return Func(arg_1, arg_2, arg_3, arg_4)

Checks nonce of request and return True if valid .


def Func ( arg_0 ) : super ( MemoryModel , arg_0 ) . Func ( ) arg_0 . optimizer_spec = dict ( type = 'global_optimizer' , optimizer = arg_0 . optimizer_spec )

def Func(arg_0):
        """
        Makes sure our optimizer is wrapped into the global_optimizer meta. This is only relevant for distributed RL.
        """
        super(MemoryModel, arg_0).Func()
        arg_0.optimizer_spec = dict(
            type='global_optimizer',
            optimizer=arg_0.optimizer_spec
        )

Makes sure our optimizer is wrapped into the global_optimizer meta . This is only relevant for distributed RL .


def Func ( arg_0 ) : arg_1 = Rule ( ) arg_2 = arg_0 . find ( './atom:content/sb:RuleDescription' , _etree_sb_feed_namespaces ) if arg_2 is not None : arg_3 = arg_2 . find ( './sb:Filter' , _etree_sb_feed_namespaces ) if arg_3 is not None : arg_1 . filter_type = arg_3 . attrib . get ( _make_etree_ns_attr_name ( _etree_sb_feed_namespaces [ 'i' ] , 'type' ) , None ) arg_5 = arg_3 . find ( './sb:SqlExpression' , _etree_sb_feed_namespaces ) if arg_5 is not None : arg_1 . filter_expression = arg_5 . text arg_7 = arg_2 . find ( './sb:Action' , _etree_sb_feed_namespaces ) if arg_7 is not None : arg_1 . action_type = arg_7 . attrib . get ( _make_etree_ns_attr_name ( _etree_sb_feed_namespaces [ 'i' ] , 'type' ) , None ) arg_5 = arg_7 . find ( './sb:SqlExpression' , _etree_sb_feed_namespaces ) if arg_5 is not None : arg_1 . action_expression = arg_5 . text for arg_10 , arg_11 in _ETreeXmlToObject . get_entry_properties_from_element ( arg_0 , True , '/rules' ) . items ( ) : setattr ( arg_1 , arg_10 , arg_11 ) return arg_1

def Func(arg_0):
    ''' Converts entry element to rule object.

    The format of xml for rule:
<entry xmlns='http://www.w3.org/2005/Atom'>
<content type='application/xml'>
<RuleDescription
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect">
    <Filter i:type="SqlFilterExpression">
        <SqlExpression>MyProperty='XYZ'</SqlExpression>
    </Filter>
    <Action i:type="SqlFilterAction">
        <SqlExpression>set MyProperty2 = 'ABC'</SqlExpression>
    </Action>
</RuleDescription>
</content>
</entry>
    '''
    arg_1 = Rule()

    arg_2 = arg_0.find('./atom:content/sb:RuleDescription', _etree_sb_feed_namespaces)
    if arg_2 is not None:
        arg_3 = arg_2.find('./sb:Filter', _etree_sb_feed_namespaces)
        if arg_3 is not None:
            arg_1.filter_type = arg_3.attrib.get(
                _make_etree_ns_attr_name(_etree_sb_feed_namespaces['i'], 'type'), None)
            arg_5 = arg_3.find('./sb:SqlExpression', _etree_sb_feed_namespaces)
            if arg_5 is not None:
                arg_1.filter_expression = arg_5.text

        arg_7 = arg_2.find('./sb:Action', _etree_sb_feed_namespaces)
        if arg_7 is not None:
            arg_1.action_type = arg_7.attrib.get(
                _make_etree_ns_attr_name(_etree_sb_feed_namespaces['i'], 'type'), None)
            arg_5 = arg_7.find('./sb:SqlExpression', _etree_sb_feed_namespaces)
            if arg_5 is not None:
                arg_1.action_expression = arg_5.text

    # extract id, updated and name value from feed entry and set them of rule.
    for arg_10, arg_11 in _ETreeXmlToObject.get_entry_properties_from_element(
            arg_0, True, '/rules').items():
        setattr(arg_1, arg_10, arg_11)

    return arg_1


(
        self, values, target_language, format_=None, source_language=None, model=None
    )

return client.translate(
            values=values,
            target_language=target_language,
            format_=format_,
            source_language=source_language,
            model=model,
        )

def Func(
        arg_0, arg_1, arg_2, arg_3=None, arg_4=None, arg_5=None
    ):
        """Translate a string or list of strings.

        See https://cloud.google.com/Func/docs/translating-text

        :type values: str or list
        :param values: String or list of strings to Func.

        :type target_language: str
        :param target_language: The language to Func results into. This
                                is required by the API and defaults to
                                the target language of the current instance.

        :type format_: str
        :param format_: (Optional) One of ``text`` or ``html``, to specify
                        if the input text is plain text or HTML.

        :type source_language: str or None
        :param source_language: (Optional) The language of the text to
                                be Funcd.

        :type model: str or None
        :param model: (Optional) The model used to Func the text, such
                      as ``'base'`` or ``'nmt'``.

        :rtype: str or list
        :returns: A list of dictionaries for each queried value. Each
                  dictionary typically contains three keys (though not
                  all will be present in all cases)

                  * ``detectedSourceLanguage``: The detected language (as an
                    ISO 639-1 language code) of the text.
                  * ``FuncdText``: The translation of the text into the
                    target language.
                  * ``input``: The corresponding input value.
                  * ``model``: The model used to Func the text.

                  If only a single value is passed, then only a single
                  dictionary will be returned.
        :raises: :class:`~exceptions.ValueError` if the number of
                 values and translations differ.
        """
        arg_6 = arg_0.get_conn()

        return arg_6.Func(
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5,
        )

Translate a string or list of strings.

        See https://cloud.google.com/translate/docs/translating-text

        :type values: str or list
        :param values: String or list of strings to translate.

        :type target_language: str
        :param target_language: The language to translate results into. This
                                is required by the API and defaults to
                                the target language of the current instance.

        :type format_: str
        :param format_: (Optional) One of ``text`` or ``html``, to specify
                        if the input text is plain text or HTML.

        :type source_language: str or None
        :param source_language: (Optional) The language of the text to
                                be translated.

        :type model: str or None
        :param model: (Optional) The model used to translate the text, such
                      as ``'base'`` or ``'nmt'``.

        :rtype: str or list
        :returns: A list of dictionaries for each queried value. Each
                  dictionary typically contains three keys (though not
                  all will be present in all cases)

                  * ``detectedSourceLanguage``: The detected language (as an
                    ISO 639-1 language code) of the text.
                  * ``translatedText``: The translation of the text into the
                    target language.
                  * ``input``: The corresponding input value.
                  * ``model``: The model used to translate the text.

                  If only a single value is passed, then only a single
                  dictionary will be returned.
        :raises: :class:`~exceptions.ValueError` if the number of
                 values and translations differ.


def Func ( arg_0 = 20 , arg_1 = 0 , arg_2 = None ) : if arg_2 is not None : arg_3 = dict ( arg_0 = arg_0 , arg_2 = arg_2 ) else : arg_3 = dict ( arg_0 = arg_0 , arg_1 = arg_1 ) print ( OFFSET_WARNING ) try : arg_4 = _pybossa_req ( 'get' , 'category' , arg_3 = arg_3 ) if type ( arg_4 ) . __name__ == 'list' : return [ Category ( arg_5 ) for arg_5 in arg_4 ] else : raise TypeError except : raise

def Func(arg_0=20, arg_1=0, arg_2=None):
    """Return a list of registered categories.

    :param limit: Number of returned items, default 20
    :type limit: integer
    :param offset: Offset for the query, default 0
    :type offset: integer
    :param last_id: id of the last category, used for pagination. If provided, offset is ignored
    :type last_id: integer
    :rtype: list
    :returns: A list of PYBOSSA Categories

    """
    if arg_2 is not None:
        arg_3 = dict(arg_0=arg_0, arg_2=arg_2)
    else:
        arg_3 = dict(arg_0=arg_0, arg_1=arg_1)
        print(OFFSET_WARNING)
    try:
        arg_4 = _pybossa_req('get', 'category',
                           arg_3=arg_3)
        if type(arg_4).__name__ == 'list':
            return [Category(arg_5) for arg_5 in arg_4]
        else:
            raise TypeError
    except:
        raise

Return a list of registered categories .


def Func(arg_0, arg_1, arg_2=100):

        """ Returns intermediary colors for given list of colors.
        """

        arg_3 = []
        for arg_4 in _range(arg_2):
            arg_5 = len(arg_1) - 1
            arg_6 = int(1.0 * arg_4 / arg_2 * arg_5)
            arg_6 = min(arg_6 + 0, arg_5)
            arg_7 = min(arg_6 + 1, arg_5)

            arg_8 = 1.0 * arg_2 / arg_5 * arg_6
            arg_9 = (arg_4 - arg_8) / (1.0 * arg_2 / arg_5)
            arg_10 = arg_1[arg_6].r * (1 - arg_9) + arg_1[arg_7].r * arg_9
            arg_11 = arg_1[arg_6].g * (1 - arg_9) + arg_1[arg_7].g * arg_9
            arg_12 = arg_1[arg_6].b * (1 - arg_9) + arg_1[arg_7].b * arg_9
            arg_13 = arg_1[arg_6].a * (1 - arg_9) + arg_1[arg_7].a * arg_9

            arg_3.append(color(arg_10, arg_11, arg_12, arg_13, mode="rgb"))

        arg_3.append(arg_1[-1])
        return arg_3

Returns intermediary colors for given list of colors .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 1.0 ) : try : from web import _ctx except : pass arg_0 = re . sub ( "</{0,1}math>" , "" , arg_0 . strip ( ) ) arg_4 = mimetex . gif ( arg_0 ) arg_5 , arg_6 = _ctx . imagesize ( arg_4 ) _ctx . image ( arg_4 , arg_1 , arg_2 , arg_3 = arg_3 ) return arg_5 , arg_6

def Func(arg_0, arg_1, arg_2, arg_3=1.0):

    """ Uses mimetex to generate a GIF-image from the LaTeX equation.
    """

    try: from web import _ctx
    except: pass

    arg_0 = re.sub("</{0,1}math>", "", arg_0.strip())
    arg_4 = mimetex.gif(arg_0)
    arg_5, arg_6 = _ctx.imagesize(arg_4)
    _ctx.image(arg_4, arg_1, arg_2, arg_3=arg_3)
    return arg_5, arg_6

Uses mimetex to generate a GIF - image from the LaTeX equation .


return Constraint(func, configurations, variables, vartype=vartype, name=name)

def Func(arg_0, arg_1=arg_2.BINARY, arg_4='AND'):
    """AND gate.

    Args:
        variables (list): Variable labels for the and gate as `[in1, in2, out]`,
            where `in1, in2` are inputs and `out` the gate's output.
        vartype (Vartype, optional, default='BINARY'): Variable type. Accepted
            input values:

            * Vartype.SPIN, 'SPIN', {-1, 1}
            * Vartype.BINARY, 'BINARY', {0, 1}
        name (str, optional, default='AND'): Name for the constraint.

    Returns:
        Constraint(:obj:`.Constraint`): Constraint that is satisfied when its variables are
        assigned values that match the valid states of an AND gate.

    Examples:
        >>> import dwavebinarycsp
        >>> import dwavebinarycsp.factories.constraint.gates as gates
        >>> csp = dwavebinarycsp.ConstraintSatisfactionProblem(dwavebinarycsp.BINARY)
        >>> csp.add_constraint(gates.Func(['a', 'b', 'c'], name='AND1'))
        >>> csp.check({'a': 1, 'b': 0, 'c': 0})
        True
    """

    arg_0 = tuple(arg_0)

    if arg_1 is arg_2.BINARY:
        arg_5 = frozenset([(0, 0, 0),
                                    (0, 1, 0),
                                    (1, 0, 0),
                                    (1, 1, 1)])

        def func(arg_6, arg_7, arg_8): return (arg_6 and arg_7) == arg_8

    else:
        # SPIN, vartype is checked by the decorator
        arg_5 = frozenset([(-1, -1, -1),
                                    (-1, +1, -1),
                                    (+1, -1, -1),
                                    (+1, +1, +1)])

        def func(arg_6, arg_7, arg_8): return ((arg_6 > 0) and (arg_7 > 0)) == (arg_8 > 0)

    return Constraint(func, arg_5, arg_0, arg_1=arg_1, arg_4=arg_4)

AND gate.

    Args:
        variables (list): Variable labels for the and gate as `[in1, in2, out]`,
            where `in1, in2` are inputs and `out` the gate's output.
        vartype (Vartype, optional, default='BINARY'): Variable type. Accepted
            input values:

            * Vartype.SPIN, 'SPIN', {-1, 1}
            * Vartype.BINARY, 'BINARY', {0, 1}
        name (str, optional, default='AND'): Name for the constraint.

    Returns:
        Constraint(:obj:`.Constraint`): Constraint that is satisfied when its variables are
        assigned values that match the valid states of an AND gate.

    Examples:
        >>> import dwavebinarycsp
        >>> import dwavebinarycsp.factories.constraint.gates as gates
        >>> csp = dwavebinarycsp.ConstraintSatisfactionProblem(dwavebinarycsp.BINARY)
        >>> csp.add_constraint(gates.and_gate(['a', 'b', 'c'], name='AND1'))
        >>> csp.check({'a': 1, 'b': 0, 'c': 0})
        True


(self, algorithm, length, operation_policy_name=None, name=None,
               cryptographic_usage_mask=None)

def Func(arg_0, arg_1, arg_2, arg_3=None, arg_4=None,
               arg_5=None):
        """
        Create a symmetric key on a KMIP appliance.

        Args:
            algorithm (CryptographicAlgorithm): An enumeration defining the
                algorithm to use to generate the symmetric key.
            length (int): The length in bits for the symmetric key.
            operation_policy_name (string): The name of the operation policy
                to use for the new symmetric key. Optional, defaults to None
            name (string): The name to give the key. Optional, defaults to None
            cryptographic_usage_mask (list): list of enumerations of crypto
                usage mask passing to the symmetric key. Optional, defaults to
                None

        Returns:
            string: The uid of the newly Funcd symmetric key.

        Raises:
            ClientConnectionNotOpen: if the client connection is unusable
            KmipOperationFailure: if the operation result is a failure
            TypeError: if the input arguments are invalid
        """
        # Check inputs
        if not isinstance(arg_1, enums.CryptographicAlgorithm):
            raise TypeError(
                "algorithm must be a CryptographicAlgorithm enumeration")
        elif not isinstance(arg_2, six.integer_types) or arg_2 <= 0:
            raise TypeError("length must be a positive integer")
        if arg_5 is not None:
            if not isinstance(arg_5, list) or \
                all(isinstance(arg_6, enums.CryptographicUsageMask)
                    for arg_6 in arg_5) is False:
                raise TypeError(
                    "cryptographic_usage_mask must be a list of "
                    "CryptographicUsageMask enumerations")

        # Create the template containing the attributes
        arg_7 = arg_0._build_common_attributes(
            arg_3
        )
        arg_8 = arg_0._build_key_attributes(
                            arg_1, arg_2, arg_5)
        arg_8.extend(arg_7)

        if arg_4:
            arg_8.extend(arg_0._build_name_attribute(arg_4))

        arg_9 = cobjects.TemplateAttribute(attributes=arg_8)

        # Create the symmetric key and handle the results
        arg_10 = arg_0.proxy.Func(enums.ObjectType.SYMMETRIC_KEY, arg_9)

        arg_11 = arg_10.result_status.value
        if arg_11 == enums.ResultStatus.SUCCESS:
            return arg_10.uuid
        else:
            arg_12 = arg_10.result_reason.value
            arg_13 = arg_10.result_message.value
            raise exceptions.KmipOperationFailure(arg_11, arg_12, arg_13)

Create a symmetric key on a KMIP appliance.

        Args:
            algorithm (CryptographicAlgorithm): An enumeration defining the
                algorithm to use to generate the symmetric key.
            length (int): The length in bits for the symmetric key.
            operation_policy_name (string): The name of the operation policy
                to use for the new symmetric key. Optional, defaults to None
            name (string): The name to give the key. Optional, defaults to None
            cryptographic_usage_mask (list): list of enumerations of crypto
                usage mask passing to the symmetric key. Optional, defaults to
                None

        Returns:
            string: The uid of the newly created symmetric key.

        Raises:
            ClientConnectionNotOpen: if the client connection is unusable
            KmipOperationFailure: if the operation result is a failure
            TypeError: if the input arguments are invalid

Create a symmetric key on a KMIP appliance .


def Func(arg_0):
	"""
	return the number of seconds in the specified period

	>>> Func('day')
	86400
	>>> Func(86400)
	86400
	>>> Func(datetime.timedelta(hours=24))
	86400
	>>> Func('day + os.system("rm -Rf *")')
	Traceback (most recent call last):
	...
	ValueError: period not in (second, minute, hour, day, month, year)
	"""
	if isinstance(arg_0, six.string_types):
		try:
			arg_1 = 'seconds_per_' + arg_0.lower()
			arg_2 = globals()[arg_1]
		except KeyError:
			arg_3 = "period not in (second, minute, hour, day, month, year)"
			raise ValueError(arg_3)
	elif isinstance(arg_0, numbers.Number):
		arg_2 = arg_0
	elif isinstance(arg_0, datetime.timedelta):
		arg_2 = arg_0.days * Func('day') + arg_0.seconds
	else:
		raise TypeError('period must be a string or integer')
	return arg_2

return the number of seconds in the specified period

	>>> get_period_seconds('day')
	86400
	>>> get_period_seconds(86400)
	86400
	>>> get_period_seconds(datetime.timedelta(hours=24))
	86400
	>>> get_period_seconds('day + os.system("rm -Rf *")')
	Traceback (most recent call last):
	...
	ValueError: period not in (second, minute, hour, day, month, year)


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : try : _check_field_validity ( arg_2 ) except InvenioBibRecordFieldError : raise for arg_4 , arg_5 in enumerate ( arg_0 . get ( arg_1 , [ ] ) ) : if _compare_fields ( arg_2 , arg_5 , arg_3 ) : return ( arg_5 [ 4 ] , arg_4 ) return ( None , None )

def Func(arg_0, arg_1, arg_2, arg_3=False):
    """
    Return the global and local positions of the first occurrence of the field.

    :param rec:    A record dictionary structure
    :type  rec:    dictionary
    :param tag:    The tag of the field to search for
    :type  tag:    string
    :param field:  A field tuple as returned by create_field()
    :type  field:  tuple
    :param strict: A boolean describing the search method. If strict
                   is False, then the order of the subfields doesn't
                   matter. Default search method is strict.
    :type  strict: boolean
    :return:       A tuple of (global_position, local_position) or a
                   tuple (None, None) if the field is not present.
    :rtype:        tuple
    :raise InvenioBibRecordFieldError: If the provided field is invalid.
    """
    try:
        _check_field_validity(arg_2)
    except InvenioBibRecordFieldError:
        raise

    for arg_4, arg_5 in enumerate(arg_0.get(arg_1, [])):
        if _compare_fields(arg_2, arg_5, arg_3):
            return (arg_5[4], arg_4)

    return (None, None)

Return the global and local positions of the first occurrence of the field .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_0
.
problem
.
nullspace
arg_3
=
arg_0
.
problem
.
equalities
if
np
.
allclose
(
arg_3
.
dot
(
arg_1
)
,
arg_0
.
problem
.
b
,
rtol
=
0
,
atol
=
arg_0
.
feasibility_tol
)
:
arg_4
=
arg_1
else
:
LOGGER
.
info
(
"feasibility violated in sample"
" %d, trying to reproject"
%
arg_0
.
n_samples
)
arg_4
=
arg_2
.
dot
(
arg_2
.
T
.
dot
(
arg_1
)
)
if
any
(
arg_4
!=
arg_1
)
:
LOGGER
.
info
(
"reprojection failed in sample"
" %d, using random point in space"
%
arg_0
.
n_samples
)
arg_4
=
arg_0
.
_random_point
(
)
return
arg_4

def Func(arg_0, arg_1):
        """Reproject a point into the feasibility region.

        This function is guaranteed to return a new feasible point. However,
        no guarantees in terms of proximity to the original point can be made.

        Parameters
        ----------
        p : numpy.array
            The current sample point.

        Returns
        -------
        numpy.array
            A new feasible point. If `p` was feasible it wil return p.

        """

        arg_2 = arg_0.problem.nullspace
        arg_3 = arg_0.problem.equalities

        # don't reproject if point is feasible
        if np.allclose(arg_3.dot(arg_1), arg_0.problem.b,
                       rtol=0, atol=arg_0.feasibility_tol):
            arg_4 = arg_1
        else:
            LOGGER.info("feasibility violated in sample"
                        " %d, trying to reproject" % arg_0.n_samples)
            arg_4 = arg_2.dot(arg_2.T.dot(arg_1))

        # Projections may violate bounds
        # set to random point in space in that case
        if any(arg_4 != arg_1):
            LOGGER.info("reprojection failed in sample"
                        " %d, using random point in space" % arg_0.n_samples)
            arg_4 = arg_0._random_point()

        return arg_4

Reproject a point into the feasibility region .


def Func(arg_0, arg_1, arg_2, arg_3):
  """Check for unsafe global or static objects.

  Args:
    filename: The name of the current file.
    clean_lines: A CleansedLines instance containing the file.
    linenum: The number of the line to check.
    error: The function to call with any errors found.
  """
  arg_4 = arg_1.elided[arg_2]

  # Match two lines at a time to support multiline declarations
  if arg_2 + 1 < arg_1.NumLines() and not Search(r'[;({]', arg_4):
    arg_4 += arg_1.elided[arg_2 + 1].strip()

  # Check for people declaring static/global STL strings at the top level.
  # This is dangerous because the C++ language does not guarantee that
  # globals with constructors are initialized before the first access, and
  # also because globals can be destroyed when some threads are still running.
  # TODO(unknown): Generalize this to also find static unique_ptr instances.
  # TODO(unknown): File bugs for clang-tidy to find these.
  arg_5 = Match(
      r'((?:|static +)(?:|const +))(?::*std::)?string( +const)? +'
      r'([a-zA-Z0-9_:]+)\b(.*)',
      arg_4)

  # Remove false positives:
  # - String pointers (as opposed to values).
  #    string *pointer
  #    const string *pointer
  #    string const *pointer
  #    string *const pointer
  #
  # - Functions and template specializations.
  #    string Function<Type>(...
  #    string Class<Type>::Method(...
  #
  # - Operators.  These are matched separately because operator names
  #   cross non-word boundaries, and trying to match both operators
  #   and functions at the same time would decrease accuracy of
  #   matching identifiers.
  #    string Class::operator*()
  if (arg_5 and
      not Search(r'\bstring\b(\s+const)?\s*[\*\&]\s*(const\s+)?\w', arg_4) and
      not Search(r'\boperator\W', arg_4) and
      not Match(r'\s*(<.*>)?(::[a-zA-Z0-9_]+)*\s*\(([^"]|$)', arg_5.group(4))):
    if Search(r'\bconst\b', arg_4):
      arg_3(arg_0, arg_2, 'runtime/string', 4,
            'For a static/global string constant, use a C style string '
            'instead: "%schar%s %s[]".' %
            (arg_5.group(1), arg_5.group(2) or '', arg_5.group(3)))
    else:
      arg_3(arg_0, arg_2, 'runtime/string', 4,
            'Static/global string variables are not permitted.')

  if (Search(r'\b([A-Za-z0-9_]*_)\(\1\)', arg_4) or
      Search(r'\b([A-Za-z0-9_]*_)\(CHECK_NOTNULL\(\1\)\)', arg_4)):
    arg_3(arg_0, arg_2, 'runtime/init', 4,
          'You seem to be initializing a member variable with itself.')

Check for unsafe global or static objects .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
json
.
loads
(
arg_1
)
arg_3
=
[
]
arg_4
=
arg_0
.
_metric_name
for
arg_5
in
arg_2
[
'result'
]
[
'aggregates'
]
[
'key'
]
:
arg_6
=
arg_0
.
_format_timestamp
(
arg_5
[
0
]
[
0
]
)
for
arg_7
in
arg_5
[
1
]
:
arg_3
.
append
(
{
"timestamp"
:
arg_6
,
"metric"
:
arg_4
,
"aggregate"
:
arg_0
.
aggregate
,
"source"
:
arg_7
[
0
]
,
"value"
:
arg_7
[
1
]
,
}
)
arg_2
=
{
"data"
:
arg_3
}
arg_8
=
json
.
dumps
(
arg_2
,
indent
=
arg_0
.
_indent
,
separators
=
(
','
,
': '
)
)
print
(
arg_0
.
colorize_json
(
arg_8
)
)

def Func(arg_0, arg_1):
        """
        Output results in structured JSON format
        """
        arg_2 = json.loads(arg_1)
        arg_3 = []
        arg_4 = arg_0._metric_name
        for arg_5 in arg_2['result']['aggregates']['key']:
            arg_6 = arg_0._format_timestamp(arg_5[0][0])
            for arg_7 in arg_5[1]:
                arg_3.append({
                    "timestamp": arg_6,
                    "metric": arg_4,
                    "aggregate": arg_0.aggregate,
                    "source": arg_7[0],
                    "value": arg_7[1],
                })
        arg_2 = {"data": arg_3}
        arg_8 = json.dumps(arg_2, indent=arg_0._indent, separators=(',', ': '))
        print(arg_0.colorize_json(arg_8))


def Func ( arg_0 , arg_1 , arg_2 = None ) : assert arg_1 . name . startswith ( arg_0 . base ) arg_3 = arg_1 . name [ len ( arg_0 . base ) : ] . lstrip ( '/' ) arg_4 = Relationship ( arg_0 , arg_3 , arg_1 . rel_type , arg_2 = arg_2 ) arg_0 . relationships . add ( arg_4 ) return arg_4

def Func(arg_0, arg_1, arg_2=None):
		"""Relate this package component to the supplied part."""
		assert arg_1.name.startswith(arg_0.base)
		arg_3 = arg_1.name[len(arg_0.base):].lstrip('/')
		arg_4 = Relationship(arg_0, arg_3, arg_1.rel_type, arg_2=arg_2)
		arg_0.relationships.add(arg_4)
		return arg_4

Relate this package component to the supplied part .


def Func ( arg_0 , arg_1 = False ) : if isinstance ( arg_0 , unicode ) : return arg_0 . encode ( "utf-8" ) if isinstance ( arg_0 , list ) : return [ Func ( arg_2 , arg_1 = True ) for arg_2 in arg_0 ] if isinstance ( arg_0 , dict ) and not arg_1 : return { Func ( arg_3 , arg_1 = True ) : Func ( arg_4 , arg_1 = True ) for arg_3 , arg_4 in arg_0 . iteritems ( ) } return arg_0

def Func(arg_0, arg_1=False):
    """
    converts unicode to utf-8 when reading in json files
    """
    if isinstance(arg_0, unicode):
        return arg_0.encode("utf-8")

    if isinstance(arg_0, list):
        return [Func(arg_2, arg_1=True) for arg_2 in arg_0]

    if isinstance(arg_0, dict) and not arg_1:
        return {
            Func(arg_3, arg_1=True): Func(arg_4, arg_1=True)
            for arg_3, arg_4 in arg_0.iteritems()
        }
    return arg_0

converts unicode to utf - 8 when reading in json files


def Func ( arg_0 ) : arg_1 = [ ls_clipped for ls in arg_0 . line_strings for ls_clipped in ls . Func ( arg_0 . shape ) ] return LineStringsOnImage ( arg_1 , shape = arg_0 . shape )

def Func(arg_0):
        """
        Clip off all parts of the line strings that are outside of the image.

        Returns
        -------
        imgaug.augmentables.lines.LineStringsOnImage
            Line strings, clipped to fall within the image dimensions.

        """
        arg_1 = [ls_clipped
                   for ls in arg_0.line_strings
                   for ls_clipped in ls.Func(arg_0.shape)]
        return LineStringsOnImage(arg_1, shape=arg_0.shape)

Clip off all parts of the line strings that are outside of the image .


Records locations of labels and compiles the code

def Func ( arg_0 , arg_1 = 0 ) : arg_0 . label_locs = { } if arg_0 . label_locs is None else arg_0 . label_locs arg_3 = arg_1 while arg_3 < len ( arg_0 . tape ) : if type ( arg_0 . tape [ arg_3 ] ) == LABEL : arg_0 . label_locs [ arg_0 . tape [ arg_3 ] . num ] = arg_3 del arg_0 . tape [ arg_3 ] continue arg_3 += 1 arg_0 . Funcd = True

def Func(arg_0, arg_1=0):
        ''' Records locations of labels and Funcs the code '''
        arg_0.label_locs = {} if arg_0.label_locs is None else arg_0.label_locs
        arg_3 = arg_1
        while arg_3 < len(arg_0.tape):
            if type(arg_0.tape[arg_3]) == LABEL:
                arg_0.label_locs[arg_0.tape[arg_3].num] = arg_3
                del arg_0.tape[arg_3]
                continue
            arg_3 += 1
        arg_0.Funcd = True


def
Func
(
arg_0
)
:
arg_1
,
arg_2
,
arg_3
,
arg_4
=
arg_0
try
:
return
runcp
(
arg_1
,
arg_2
,
arg_3
,
**
arg_4
)
except
Exception
as
e
:
LOGEXCEPTION
(
' could not make checkplots for %s: %s'
%
(
arg_1
,
e
)
)
return

def Func(arg_0):
    '''
    This is the worker for running checkplots.

    Parameters
    ----------

    task : tuple
        This is of the form: (pfpickle, outdir, lcbasedir, kwargs).

    Returns
    -------

    list of str
        The list of checkplot pickles returned by the `runcp` function.

    '''

    arg_1, arg_2, arg_3, arg_4 = arg_0

    try:

        return runcp(arg_1, arg_2, arg_3, **arg_4)

    except Exception as e:

        LOGEXCEPTION(' could not make checkplots for %s: %s' % (arg_1, e))
        return None

This is the worker for running checkplots .


(get_transition_matrix_for_timestep,
                           get_transition_noise_for_timestep,
                           get_observation_matrix_for_timestep,
                           get_observation_noise_for_timestep)

def Func(arg_0,
                           arg_1,
                           arg_2,
                           arg_3):
  """Build a callable that performs one step of Kalman mean recursion.

  Args:
    get_transition_matrix_for_timestep: callable taking a timestep
      as an integer `Tensor` argument, and returning a `LinearOperator`
      of shape `[latent_size, latent_size]`.
    get_transition_noise_for_timestep: callable taking a timestep as
      an integer `Tensor` argument, and returning a
      `MultivariateNormalLinearOperator` of event shape
      `[latent_size]`.
    get_observation_matrix_for_timestep: callable taking a timestep
      as an integer `Tensor` argument, and returning a `LinearOperator`
      of shape `[observation_size, observation_size]`.
    get_observation_noise_for_timestep: callable taking a timestep as
      an integer `Tensor` argument, and returning a
      `MultivariateNormalLinearOperator` of event shape
      `[observation_size]`.

  Returns:
    kalman_mean_step: a callable that computes latent state and
      observation means at time `t`, given latent mean at time `t-1`.
  """

  def mean_step(arg_4, arg_5):
    """Single step of prior mean recursion."""
    arg_6, arg_7 = arg_4

    arg_8 = _propagate_mean(arg_6,
                                  arg_0(arg_5 - 1),
                                  arg_1(arg_5 - 1))
    arg_9 = _propagate_mean(arg_8,
                                       arg_2(arg_5),
                                       arg_3(arg_5))
    return (arg_8, arg_9)

  return mean_step

Build a callable that performs one step of Kalman mean recursion .


def Func ( ) : from . import arg_0 arg_0 . pickle = arg_0 . _stdlib_pickle arg_2 [ arg_3 ] = _original_can_map [ arg_3 ]

def Func():
    """Revert to using stdlib pickle.

    Reverts custom serialization enabled by use_dill|cloudpickle.
    """
    from . import arg_0
    arg_0.pickle = arg_0._stdlib_pickle

    # restore special function handling
    arg_2[arg_3] = _original_can_map[arg_3]


def
Func
(
arg_0
,
arg_1
,
arg_2
=
)
:
LOG
.
info
(
"Func %s for tenant %s with fields %s"
%
(
arg_1
,
arg_0
.
tenant_id
,
arg_2
)
)
arg_3
=
db_api
.
subnet_find
(
arg_0
=
arg_0
,
limit
=
,
page_reverse
=
False
,
sorts
=
[
'id'
]
,
marker_obj
=
,
arg_2
=
,
arg_1
=
arg_1
,
join_dns
=
True
,
join_routes
=
True
,
scope
=
db_api
.
ONE
)
if
not
arg_3
:
raise
n_exc
.
SubnetNotFound
(
subnet_id
=
arg_1
)
arg_4
=
arg_3
.
get
(
"_allocation_pool_cache"
)
if
not
arg_4
:
arg_5
=
arg_3
.
allocation_pools
db_api
.
subnet_update_set_alloc_pool_cache
(
arg_0
,
arg_3
,
arg_5
)
return
v
.
_make_subnet_dict
(
arg_3
)

def Func(arg_0, arg_1, arg_2=None):
    """Retrieve a subnet.

    : param context: neutron api request context
    : param id: UUID representing the subnet to fetch.
    : param fields: a list of strings that are valid keys in a
        subnet dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
        object in neutron/api/v2/attributes.py. Only these fields
        will be returned.
    """
    LOG.info("Func %s for tenant %s with fields %s" %
             (arg_1, arg_0.tenant_id, arg_2))
    arg_3 = db_api.subnet_find(arg_0=arg_0, limit=None,
                                page_reverse=False, sorts=['id'],
                                marker_obj=None, arg_2=None, arg_1=arg_1,
                                join_dns=True, join_routes=True,
                                scope=db_api.ONE)
    if not arg_3:
        raise n_exc.SubnetNotFound(subnet_id=arg_1)

    arg_4 = arg_3.get("_allocation_pool_cache")
    if not arg_4:
        arg_5 = arg_3.allocation_pools
        db_api.subnet_update_set_alloc_pool_cache(arg_0, arg_3, arg_5)
    return v._make_subnet_dict(arg_3)


def Func ( arg_0 : arg_1 . node_classes . NodeNG ) -> bool : arg_4 = arg_0 . scope ( ) if isinstance ( arg_4 , ( arg_1 . FunctionDef , arg_1 . Lambda ) ) : for arg_5 in arg_4 . args . defaults : for arg_6 in arg_5 . nodes_of_class ( arg_1 . Name ) : if arg_6 is arg_0 : return True return False

def Func(arg_0: arg_1.node_classes.NodeNG) -> bool:
    """return true if the given Name node is used in function or lambda
    default argument's value
    """
    arg_4 = arg_0.scope()
    if isinstance(arg_4, (arg_1.FunctionDef, arg_1.Lambda)):
        for arg_5 in arg_4.args.defaults:
            for arg_6 in arg_5.nodes_of_class(arg_1.Name):
                if arg_6 is arg_0:
                    return True
    return False

return true if the given Name node is used in function or lambda default argument s value


(backend_class, backend_args, manager,
                       category, archived_after)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
)
:
arg_5
=
find_signature_parameters
(
arg_0
.
__init__
,
arg_1
)
arg_6
=
arg_0
(
**
arg_5
)
arg_7
=
arg_2
.
search
(
arg_6
.
origin
,
arg_6
.
__class__
.
__name__
,
arg_3
,
arg_4
)
for
arg_8
in
arg_7
:
arg_6
.
archive
=
Archive
(
arg_8
)
arg_10
=
arg_6
.
Func
(
)
try
:
for
arg_11
in
arg_10
:
yield
arg_11
except
ArchiveError
as
e
:
logger
.
warning
(
"Ignoring %s archive due to: %s"
,
arg_8
,
str
(
e
)
)

def Func(arg_0, arg_1, arg_2,
                       arg_3, arg_4):
    """Fetch items from an archive manager.

    Generator to get the items of a category (previously fetched
    by the given backend class) from an archive manager. Only those
    items archived after the given date will be returned.

    The parameters needed to initialize `backend` and get the
    items are given using `backend_args` dict parameter.

    :param backend_class: backend class to retrive items
    :param backend_args: dict of arguments needed to retrieve the items
    :param manager: archive manager where the items will be retrieved
    :param category: category of the items to retrieve
    :param archived_after: return items archived after this date

    :returns: a generator of archived items
    """
    arg_5 = find_signature_parameters(arg_0.__init__,
                                          arg_1)
    arg_6 = arg_0(**arg_5)

    arg_7 = arg_2.search(arg_6.origin,
                               arg_6.__class__.__name__,
                               arg_3,
                               arg_4)

    for arg_8 in arg_7:
        arg_6.archive = Archive(arg_8)
        arg_10 = arg_6.Func()

        try:
            for arg_11 in arg_10:
                yield arg_11
        except ArchiveError as e:
            logger.warning("Ignoring %s archive due to: %s", arg_8, str(e))


def Func(arg_0, *arg_1):
        """
        Shutdown the running process and the monitor
        """
        try:
            arg_0._Func()
            if arg_0.process:
                arg_0.process.wait()
                arg_0.process.stdout.close()
                arg_0.process.stdin.close()
                arg_0.process.stderr.close()
            arg_0.finished = True
            arg_0.send_testcase('', '127.0.0.1', arg_0.config.ports["servers"]["TCASE_PORT"])
            arg_0.logger.debug("[{0}] - PJFProcessMonitor successfully completed".format(time.strftime("%H:%M:%S")))
        except Exception as e:
            raise PJFBaseException(e.message if hasattr(e, "message") else str(e))


return self._ctx.sig(name, dtype=dtype, defVal=defVal)

def Func ( arg_0 , arg_1 , arg_2 = arg_3 , arg_4 = None ) : if isinstance ( arg_2 , HStruct ) : if arg_4 is not None : raise NotImplementedError ( ) arg_5 = arg_2 . fromPy ( None ) for arg_6 in arg_2 . fields : if arg_6 . name is not None : arg_7 = arg_0 . Func ( "%s_%s" % ( arg_1 , arg_6 . name ) , arg_6 . dtype ) setattr ( arg_5 , arg_6 . name , arg_7 ) return arg_5 return arg_0 . _ctx . sig ( arg_1 , arg_2 = arg_2 , arg_4 = arg_4 )

def Func(arg_0, arg_1, arg_2=arg_3, arg_4=None):
        """
        Create signal in this unit
        """
        if isinstance(arg_2, HStruct):
            if arg_4 is not None:
                raise NotImplementedError()
            arg_5 = arg_2.fromPy(None)
            for arg_6 in arg_2.fields:
                if arg_6.name is not None:
                    arg_7 = arg_0.Func("%s_%s" % (arg_1, arg_6.name), arg_6.dtype)
                    setattr(arg_5, arg_6.name, arg_7)

            return arg_5

        return arg_0._ctx.sig(arg_1, arg_2=arg_2, arg_4=arg_4)


def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in arg_0 : arg_1 . append ( arg_2 . split ( '#' ) [ 0 ] . strip ( ) ) return arg_1

def Func(arg_0):
    """Strip whitespaces and comments from asm lines."""
    arg_1 = []
    for arg_2 in arg_0:
        # Strip comments and whitespaces
        arg_1.append(arg_2.split('#')[0].strip())
    return arg_1

Strip whitespaces and comments from asm lines .


(wave, npoints=None, indep_min=None, indep_max=None)

return real(ifft(wave, npoints, indep_min, indep_max))

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : return real ( ifft ( arg_0 , arg_1 , arg_2 , arg_3 ) )

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
    r"""
    Return the real part of the inverse Fast Fourier Transform of a waveform.

    :param wave: Waveform
    :type  wave: :py:class:`peng.eng.Waveform`

    :param npoints: Number of points to use in the transform. If **npoints**
                    is less than the size of the independent variable vector
                    the waveform is truncated; if **npoints** is greater than
                    the size of the independent variable vector, the waveform
                    is zero-padded
    :type  npoints: positive integer

    :param indep_min: Independent vector start point of computation
    :type  indep_min: integer or float

    :param indep_max: Independent vector stop point of computation
    :type  indep_max: integer or float

    :rtype: :py:class:`peng.eng.Waveform`

    .. [[[cog cog.out(exobj_eng.get_sphinx_autodoc(raised=True)) ]]]
    .. Auto-generated exceptions documentation for
    .. peng.wave_functions.Func

    :raises:
     * RuntimeError (Argument \`indep_max\` is not valid)

     * RuntimeError (Argument \`indep_min\` is not valid)

     * RuntimeError (Argument \`npoints\` is not valid)

     * RuntimeError (Argument \`wave\` is not valid)

     * RuntimeError (Incongruent \`indep_min\` and \`indep_max\`
       arguments)

     * RuntimeError (Non-uniform frequency spacing)

    .. [[[end]]]
    """
    return real(ifft(arg_0, arg_1, arg_2, arg_3))

r"""
    Return the real part of the inverse Fast Fourier Transform of a waveform.

    :param wave: Waveform
    :type  wave: :py:class:`peng.eng.Waveform`

    :param npoints: Number of points to use in the transform. If **npoints**
                    is less than the size of the independent variable vector
                    the waveform is truncated; if **npoints** is greater than
                    the size of the independent variable vector, the waveform
                    is zero-padded
    :type  npoints: positive integer

    :param indep_min: Independent vector start point of computation
    :type  indep_min: integer or float

    :param indep_max: Independent vector stop point of computation
    :type  indep_max: integer or float

    :rtype: :py:class:`peng.eng.Waveform`

    .. [[[cog cog.out(exobj_eng.get_sphinx_autodoc(raised=True)) ]]]
    .. Auto-generated exceptions documentation for
    .. peng.wave_functions.ifftr

    :raises:
     * RuntimeError (Argument \`indep_max\` is not valid)

     * RuntimeError (Argument \`indep_min\` is not valid)

     * RuntimeError (Argument \`npoints\` is not valid)

     * RuntimeError (Argument \`wave\` is not valid)

     * RuntimeError (Incongruent \`indep_min\` and \`indep_max\`
       arguments)

     * RuntimeError (Non-uniform frequency spacing)

    .. [[[end]]]

r Return the real part of the inverse Fast Fourier Transform of a waveform .


def
Func
(
arg_0
)
:
arg_0
=
Color
(
arg_0
)
if
arg_0
.
is_transparent
:
return
"transparent"
if
arg_0
.
is_black
:
return
"black"
if
arg_0
.
is_white
:
return
"white"
if
arg_0
.
is_black
:
return
"black"
for
arg_1
in
named_colors
:
try
:
arg_2
,
arg_3
,
arg_4
=
named_colors
[
arg_1
]
except
:
continue
if
arg_2
==
arg_0
.
r
and
arg_3
==
arg_0
.
g
and
arg_4
==
arg_0
.
b
:
return
arg_1
for
arg_5
in
shades
:
if
arg_0
in
arg_5
:
return
arg_5
.
name
+
" "
+
arg_0
.
nearest_hue
(
)
break
return
arg_0
.
nearest_hue
(
)

def Func(arg_0):
    """
    Guesses the shade and hue name of a color.

    If the given color is named in the named_colors list, return that name.
    Otherwise guess its nearest hue and shade range.
    """
    arg_0 = Color(arg_0)

    if arg_0.is_transparent: return "transparent"
    if arg_0.is_black: return "black"
    if arg_0.is_white: return "white"
    if arg_0.is_black: return "black"

    for arg_1 in named_colors:
        try:
            arg_2, arg_3, arg_4 = named_colors[arg_1]
        except:
            continue
        if arg_2 == arg_0.r and arg_3 == arg_0.g and arg_4 == arg_0.b:
            return arg_1

    for arg_5 in shades:
        if arg_0 in arg_5:
            return arg_5.name + " " + arg_0.nearest_hue()
            break

    return arg_0.nearest_hue()

Guesses the shade and hue name of a color .


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . dx_regex . finditer ( arg_1 . strip ( ) ) : arg_3 = arg_2 . lastgroup arg_4 = arg_2 . group ( arg_2 . lastgroup ) arg_5 = Token ( arg_3 , arg_4 ) if not arg_5 . iscode ( 'WHITESPACE' ) : arg_0 . tokens . append ( arg_5 )

def Func(arg_0,arg_1):
        """Split s into tokens and update the token buffer.

        Func(string)

        New tokens are appended to the token buffer, discarding white
        space.  Based on http://effbot.org/zone/xml-scanner.htm
        """
        for arg_2 in arg_0.dx_regex.finditer(arg_1.strip()):
            arg_3 = arg_2.lastgroup
            arg_4 = arg_2.group(arg_2.lastgroup)
            arg_5 = Token(arg_3,arg_4)
            if not arg_5.iscode('WHITESPACE'):
                 arg_0.tokens.append(arg_5)

Split s into tokens and update the token buffer.

        __tokenize(string)

        New tokens are appended to the token buffer, discarding white
        space.  Based on http://effbot.org/zone/xml-scanner.htm

Split s into tokens and update the token buffer .


def Func(arg_0):
        """Publish the deposit after for editing."""
        arg_1, arg_2 = arg_0.fetch_published()
        if arg_2.revision_id == arg_0['_deposit']['pid']['revision_id']:
            arg_3 = dict(arg_0.dumps())
        else:
            arg_3 = arg_0.merge_with_published()

        arg_3['$schema'] = arg_0.record_schema
        arg_3['_deposit'] = arg_0['_deposit']
        arg_2 = arg_2.__class__(arg_3, model=arg_2.model)
        return arg_2


def Func ( arg_0 , arg_1 = None ) : arg_0 . _teColumns = list ( map ( lambda i : arg_1 . names [ i ] , arg_0 . _teColumns ) ) if all ( isinstance ( n , int ) for n in arg_0 . _teColumns ) else arg_0 . _teColumns arg_0 . _responseColumnName = arg_1 . names [ arg_0 . _responseColumnName ] if isinstance ( arg_0 . _responseColumnName , int ) else arg_0 . _responseColumnName arg_0 . _foldColumnName = arg_1 . names [ arg_0 . _foldColumnName ] if isinstance ( arg_0 . _foldColumnName , int ) else arg_0 . _foldColumnName arg_0 . _encodingMap = ExprNode ( "target.encoder.Func" , arg_1 , arg_0 . _teColumns , arg_0 . _responseColumnName , arg_0 . _foldColumnName ) . _eager_map_frame ( ) return arg_0 . _encodingMap

def Func(arg_0, arg_1 = None):
        """
        Returns encoding map as an object that maps 'column_name' -> 'frame_with_encoding_map_for_this_column_name'

        :param frame frame: An H2OFrame object with which to create the target encoding map
        """
        arg_0._teColumns = list(map(lambda i: arg_1.names[i], arg_0._teColumns)) if all(isinstance(n, int) for n in arg_0._teColumns) else arg_0._teColumns
        arg_0._responseColumnName = arg_1.names[arg_0._responseColumnName] if isinstance(arg_0._responseColumnName, int) else arg_0._responseColumnName
        arg_0._foldColumnName = arg_1.names[arg_0._foldColumnName] if isinstance(arg_0._foldColumnName, int) else arg_0._foldColumnName

        arg_0._encodingMap = ExprNode("target.encoder.Func", arg_1, arg_0._teColumns, arg_0._responseColumnName,
                                     arg_0._foldColumnName)._eager_map_frame()

        return arg_0._encodingMap


def Func ( arg_0 ) : arg_1 = os . path . realpath ( arg_0 . paramsdict [ "project_dir" ] ) arg_0 . dirs . clusts = os . path . join ( arg_1 , "{}_clust_{}" . format ( arg_0 . name , arg_0 . paramsdict [ "clust_threshold" ] ) ) if not os . path . exists ( arg_0 . dirs . clusts ) : os . mkdir ( arg_0 . dirs . clusts ) arg_0 . tmpdir = os . path . abspath ( os . path . expanduser ( os . path . join ( arg_1 , arg_0 . name + '-tmpalign' ) ) ) if not os . path . exists ( arg_0 . tmpdir ) : os . mkdir ( arg_0 . tmpdir ) if not arg_0 . paramsdict [ "assembly_method" ] == "denovo" : arg_0 . dirs . refmapping = os . path . join ( arg_1 , "{}_refmapping" . format ( arg_0 . name ) ) if not os . path . exists ( arg_0 . dirs . refmapping ) : os . mkdir ( arg_0 . dirs . refmapping )

def Func(arg_0):
    """ sets up directories for step3 data """
    ## make output folder for clusters
    arg_1 = os.path.realpath(arg_0.paramsdict["project_dir"])
    arg_0.dirs.clusts = os.path.join(arg_1, "{}_clust_{}"\
                       .format(arg_0.name, arg_0.paramsdict["clust_threshold"]))
    if not os.path.exists(arg_0.dirs.clusts):
        os.mkdir(arg_0.dirs.clusts)

    ## make a tmpdir for align files
    arg_0.tmpdir = os.path.abspath(os.path.expanduser(
        os.path.join(arg_1, arg_0.name+'-tmpalign')))
    if not os.path.exists(arg_0.tmpdir):
        os.mkdir(arg_0.tmpdir)

    ## If ref mapping, init samples and make the refmapping output directory.
    if not arg_0.paramsdict["assembly_method"] == "denovo":
        ## make output directory for read mapping process
        arg_0.dirs.refmapping = os.path.join(arg_1, "{}_refmapping".format(arg_0.name))
        if not os.path.exists(arg_0.dirs.refmapping):
            os.mkdir(arg_0.dirs.refmapping)


Customize the message format based on the log level.

def
Func
(
arg_0
,
arg_1
)
:
if
isinstance
(
arg_0
.
fmt
,
dict
)
:
arg_0
.
_fmt
=
arg_0
.
fmt
[
arg_1
.
levelname
]
if
sys
.
version_info
>
(
3
,
2
)
:
if
arg_0
.
style
not
in
logging
.
_STYLES
:
raise
ValueError
(
'Style must be one of: %s'
%
','
.
join
(
list
(
logging
.
_STYLES
.
keys
(
)
)
)
)
arg_0
.
_style
=
logging
.
_STYLES
[
arg_0
.
style
]
[
0
]
(
arg_0
.
_fmt
)
if
sys
.
version_info
>
(
2
,
7
)
:
arg_4
=
super
(
LevelFormatter
,
arg_0
)
.
Func
(
arg_1
)
else
:
arg_4
=
ColoredFormatter
.
Func
(
arg_0
,
arg_1
)
return
arg_4

def Func(arg_0, arg_1):
        """Customize the message Func based on the log level."""
        if isinstance(arg_0.fmt, dict):
            arg_0._fmt = arg_0.fmt[arg_1.levelname]
            if sys.version_info > (3, 2):
                # Update self._style because we've changed self._fmt
                # (code based on stdlib's logging.Formatter.__init__())
                if arg_0.style not in logging._STYLES:
                    raise ValueError('Style must be one of: %s' % ','.join(
                        list(logging._STYLES.keys())))
                arg_0._style = logging._STYLES[arg_0.style][0](arg_0._fmt)

        if sys.version_info > (2, 7):
            arg_4 = super(LevelFormatter, arg_0).Func(arg_1)
        else:
            arg_4 = ColoredFormatter.Func(arg_0, arg_1)

        return arg_4

Customize the message format based on the log level .


def Func ( arg_0 ) : if not arg_0 . _sharedInstance . instance : arg_1 = arg_0 . get_instance_class ( ) arg_0 . _sharedInstance . instance = arg_1 ( ** arg_0 . _sharedInstance . config ) return arg_0 . _sharedInstance . instance

def Func(arg_0):
        """ This method will initialize ``SharedInstance.instance`` and return it.
            The purpose of this method is to have offer single default
            instance that can be reused by multiple classes.
        """
        if not arg_0._sharedInstance.instance:
            arg_1 = arg_0.get_instance_class()
            arg_0._sharedInstance.instance = arg_1(**arg_0._sharedInstance.config)
        return arg_0._sharedInstance.instance

This method will initialize SharedInstance . instance and return it . The purpose of this method is to have offer single default instance that can be reused by multiple classes .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
[
]
arg_3
=
arg_1
.
get
(
arg_0
.
header_range
,
''
)
.
replace
(
' '
,
''
)
.
lower
(
)
if
arg_3
:
arg_4
=
arg_3
.
split
(
'='
)
if
len
(
arg_4
)
==
2
:
arg_5
,
arg_6
=
tuple
(
arg_4
)
if
arg_5
==
'bytes'
and
arg_6
:
arg_7
=
(
tuple
(
rng
.
split
(
'-'
)
)
for
rng
in
arg_6
.
split
(
','
)
if
'-'
in
rng
)
for
arg_8
,
arg_9
in
arg_7
:
if
arg_8
or
arg_9
:
arg_2
.
append
(
(
int
(
arg_8
)
if
arg_8
else
,
int
(
arg_9
)
if
arg_9
else
)
)
return
arg_2

def Func(arg_0, arg_1):
        """
        Outputs a list of tuples with ranges or the empty list
        According to the rfc, start or end values can be omitted
        """
        arg_2 = []
        arg_3 = arg_1.get(arg_0.header_range, '').replace(' ','').lower()
        if arg_3:
            arg_4 = arg_3.split('=')
            if len(arg_4) == 2:
                arg_5, arg_6 = tuple(arg_4)
                if arg_5 == 'bytes' and arg_6:
                    arg_7 = ( tuple(rng.split('-')) for rng in arg_6.split(',') if '-' in rng )
                    for arg_8, arg_9 in arg_7:
                        if arg_8 or arg_9:
                            arg_2.append( (int(arg_8) if arg_8 else None, int(arg_9) if arg_9 else None) )
        return arg_2

Outputs a list of tuples with ranges or the empty list According to the rfc start or end values can be omitted


(key, app=None, default=None, prefix='hive_')

return get_config(app, prefix=prefix).get(key.upper(), default)

def Func(arg_0, arg_1=None, arg_2=None, arg_3='hive_'):
    """Get a Flask-Security configuration value.

    :param key: The configuration key without the prefix `SECURITY_`
    :param app: An optional specific application to inspect. Defaults to
                Flask's `current_app`
    :param default: An optional default value if the value is not set
    """
    arg_1 = arg_1 or current_app
    return get_config(arg_1, arg_3=arg_3).get(arg_0.upper(), arg_2)

Get a Flask - Security configuration value .


def Func ( arg_0 ) : arg_1 = [ PlainTextFormatter , HTMLFormatter , SVGFormatter , PNGFormatter , JPEGFormatter , LatexFormatter , JSONFormatter , JavascriptFormatter ] arg_2 = { } for arg_3 in arg_1 : arg_4 = arg_3 ( config = arg_0 . config ) arg_2 [ arg_4 . format_type ] = arg_4 return arg_2

def Func(arg_0):
        """Activate the default formatters."""
        arg_1 = [
            PlainTextFormatter,
            HTMLFormatter,
            SVGFormatter,
            PNGFormatter,
            JPEGFormatter,
            LatexFormatter,
            JSONFormatter,
            JavascriptFormatter
        ]
        arg_2 = {}
        for arg_3 in arg_1:
            arg_4 = arg_3(config=arg_0.config)
            arg_2[arg_4.format_type] = arg_4
        return arg_2


def Func(arg_0=''):
    """
    Load all the thermochemical data auxi files located at a path.

    :param path: Path at which the data files are located.
    """

    arg_4.clear()

    if arg_0 == '':
        arg_0 = default_data_path
    if not os.path.exists(arg_0):
        warnings.warn('The specified data file path does not exist. (%s)' % arg_0)
        return

    arg_1 = glob.glob(os.path.join(arg_0, 'Compound_*.json'))

    for arg_2 in arg_1:
        arg_3 = Compound.read(arg_2)
        arg_4[arg_3.formula] = arg_3

Load all the thermochemical data auxi files located at a path .


(self, project_id, dataset_id, table_id)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_0 . get_service ( ) try : arg_4 . tables ( ) . get ( projectId = arg_1 , datasetId = arg_2 , tableId = arg_3 ) . execute ( num_retries = arg_0 . num_retries ) return True except HttpError as e : if e . resp [ 'status' ] == '404' : return False raise

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Checks for the existence of a table in Google BigQuery.

        :param project_id: The Google cloud project in which to look for the
            table. The connection supplied to the hook must provide access to
            the specified project.
        :type project_id: str
        :param dataset_id: The name of the dataset in which to look for the
            table.
        :type dataset_id: str
        :param table_id: The name of the table to check the existence of.
        :type table_id: str
        """
        arg_4 = arg_0.get_service()
        try:
            arg_4.tables().get(
                projectId=arg_1, datasetId=arg_2,
                tableId=arg_3).execute(num_retries=arg_0.num_retries)
            return True
        except HttpError as e:
            if e.resp['status'] == '404':
                return False
            raise

Checks for the existence of a table in Google BigQuery .


return all([match(matcher) for matcher in self]), errors

def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
[
]
def
Func
(
arg_3
)
:
try
:
return
arg_3
.
Func
(
arg_1
)
except
Exception
as
arg_4
:
arg_4
=
'{}: {}'
.
format
(
type
(
arg_3
)
.
__name__
,
arg_4
)
arg_2
.
append
(
arg_4
)
return
False
return
all
(
[
Func
(
arg_3
)
for
arg_3
in
arg_0
]
)
,
arg_2

def Func(arg_0, arg_1):
        """
        Match the given HTTP request instance against the registered
        Funcer functions in the current engine.

        Arguments:
            request (pook.Request): outgoing request to Func.

        Returns:
            tuple(bool, list[Exception]): ``True`` if all Funcer tests
                passes, otherwise ``False``. Also returns an optional list
                of error exceptions.
        """
        arg_2 = []

        def Func(arg_3):
            try:
                return arg_3.Func(arg_1)
            except Exception as arg_4:
                arg_4 = '{}: {}'.format(type(arg_3).__name__, arg_4)
                arg_2.append(arg_4)
                return False

        return all([Func(arg_3) for arg_3 in arg_0]), arg_2

Match the given HTTP request instance against the registered
        matcher functions in the current engine.

        Arguments:
            request (pook.Request): outgoing request to match.

        Returns:
            tuple(bool, list[Exception]): ``True`` if all matcher tests
                passes, otherwise ``False``. Also returns an optional list
                of error exceptions.

Match the given HTTP request instance against the registered matcher functions in the current engine .


def Func ( arg_0 , arg_1 = True ) : if arg_1 : while True : arg_2 = arg_0 . dispatch ( False ) if arg_2 in ( None , QUIT ) : return arg_2 else : while True : try : arg_0 . queue . get ( False ) except Queue . Empty : return None

def Func(arg_0, arg_1 = True):
        """Read all events currently in the queue and dispatch them to the
        handlers unless `dispatch` is `False`.

        Note: If the queue contains `QUIT` the events after it won't be
        removed.

        :Parameters:
            - `dispatch`: if the events should be handled (`True`) or ignored
              (`False`)

        :Return: `QUIT` if the `QUIT` event was reached.
        """
        if arg_1:
            while True:
                arg_2 = arg_0.dispatch(False)
                if arg_2 in (None, QUIT):
                    return arg_2
        else:
            while True:
                try:
                    arg_0.queue.get(False)
                except Queue.Empty:
                    return None

Read all events currently in the queue and dispatch them to the handlers unless dispatch is False .


def Func(arg_0, arg_1=None):
    """Return an Alea ID for the given object."""
    if arg_0 is None:
        return None
    # Django model._meta is now public API -> pylint: disable=W0212
    arg_2 = arg_0._meta
    arg_3 = arg_2.model
    if arg_3 is ObjectMapping:
        # this doesn't make sense - raise TypeError
        raise TypeError("Can't map ObjectMapping instances through self.")

    # try getting value of AleaIdField straight from instance if possible
    if isinstance(arg_0, arg_3):
        # obj_or_model is an instance, not a model.
        if isinstance(arg_2.pk, AleaIdField):
            return arg_0.pk
        if arg_1 is None:
            # fall back to primary key, but coerce as string type for lookup.
            arg_1 = str(arg_0.pk)
    arg_4 = [
        field
        for field in arg_2.local_fields
        if isinstance(field, AleaIdField) and field.unique
    ]
    if len(arg_4) == 1:
        # found an AleaIdField with unique=True, assume it's got the value.
        arg_5 = arg_4[0].attname
        if isinstance(arg_0, arg_3):
            arg_6 = getattr(arg_0, arg_5)
        elif arg_1 is None:
            arg_6 = None
        else:
            arg_6 = arg_3.objects.values_list(arg_5, flat=True).get(
                pk=arg_1,
            )
        if arg_6:
            return arg_6

    if arg_1 is None:
        # bail out if args are (model, pk) but pk is None.
        return None

    # fallback to using AleaIdField from ObjectMapping model.
    arg_7 = ContentType.objects.get_for_model(arg_3)
    try:
        return ObjectMapping.objects.values_list(
            'meteor_id', flat=True,
        ).get(
            arg_7=arg_7,
            object_id=arg_1,
        )
    except ObjectDoesNotExist:
        return ObjectMapping.objects.create(
            arg_7=arg_7,
            object_id=arg_1,
            meteor_id=meteor_random_id('/collection/%s' % arg_2),
        ).meteor_id

Return an Alea ID for the given object .


def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_3 = { } if arg_2 : arg_2 = int ( arg_2 ) arg_3 [ 'phenotypes' ] = list ( arg_0 . Func ( text = arg_1 , arg_2 = arg_2 ) ) return arg_3

def Func(arg_0, arg_1 = None, arg_2 = None):
    """Retrieves a list of HPO terms from scout database

    Args:
        store (obj): an adapter to the scout database
        query (str): the term to search in the database
        limit (str): the number of desired results

    Returns:
        hpo_phenotypes (dict): the complete list of HPO objects stored in scout

    """
    arg_3 = {}
    if arg_2:
        arg_2=int(arg_2)

    arg_3['phenotypes'] = list(arg_0.Func(text=arg_1, arg_2=arg_2))
    return arg_3


return ([self._name, 'run', os.path.join(workdir_path, 'jobStore'),
                 '--config', config_path,
                 '--workDir', workdir_path, '--retryCount', '1']
                 + (['--restart'] if args.restart else []))

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : return ( [ arg_0 . _name , 'run' , os . path . join ( arg_2 , 'jobStore' ) , '--config' , arg_3 , '--workDir' , arg_2 , '--retryCount' , '1' ] + ( [ '--restart' ] if arg_1 . restart else [ ] ) )

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Creates and returns a list that represents a command for running the pipeline.
        """
        return ([arg_0._name, 'run', os.path.join(arg_2, 'jobStore'),
                 '--config', arg_3,
                 '--workDir', arg_2, '--retryCount', '1']
                 + (['--restart'] if arg_1.restart else []))

Creates and returns a list that represents a command for running the pipeline .


def Func ( arg_0 ) : arg_0 . clock . reset ( ) for arg_1 in arg_0 . entities : arg_1 . Func ( arg_0 . clock , arg_0 . period_count )

def Func(arg_0):
        """
        Prepare the model for execution.
        """

        arg_0.clock.reset()
        for arg_1 in arg_0.entities:
            arg_1.Func(arg_0.clock, arg_0.period_count)


return email, enterprise_name, number_of_codes

def Func ( arg_0 , arg_1 ) : arg_2 = get_request_value ( arg_1 , arg_0 . REQUIRED_PARAM_EMAIL , '' ) arg_3 = get_request_value ( arg_1 , arg_0 . REQUIRED_PARAM_ENTERPRISE_NAME , '' ) arg_4 = get_request_value ( arg_1 , arg_0 . OPTIONAL_PARAM_NUMBER_OF_CODES , '' ) if not ( arg_2 and arg_3 ) : raise CodesAPIRequestError ( arg_0 . get_missing_params_message ( [ ( arg_0 . REQUIRED_PARAM_EMAIL , bool ( arg_2 ) ) , ( arg_0 . REQUIRED_PARAM_ENTERPRISE_NAME , bool ( arg_3 ) ) , ] ) ) return arg_2 , arg_3 , arg_4

def Func(arg_0, arg_1):
        """
        Gets ``email``, ``enterprise_name``, and ``number_of_codes``,
        which are the relevant parameters for this API endpoint.

        :param request: The request to this endpoint.
        :return: The ``email``, ``enterprise_name``, and ``number_of_codes`` from the request.
        """
        arg_2 = get_request_value(arg_1, arg_0.REQUIRED_PARAM_EMAIL, '')
        arg_3 = get_request_value(arg_1, arg_0.REQUIRED_PARAM_ENTERPRISE_NAME, '')
        arg_4 = get_request_value(arg_1, arg_0.OPTIONAL_PARAM_NUMBER_OF_CODES, '')
        if not (arg_2 and arg_3):
            raise CodesAPIRequestError(
                arg_0.get_missing_params_message([
                    (arg_0.REQUIRED_PARAM_EMAIL, bool(arg_2)),
                    (arg_0.REQUIRED_PARAM_ENTERPRISE_NAME, bool(arg_3)),
                ])
            )
        return arg_2, arg_3, arg_4

Gets email enterprise_name and number_of_codes which are the relevant parameters for this API endpoint .


def Func(arg_0, arg_1, arg_2=None, **arg_3):
        """
        Perform a Func.

        :param: method:
            The HTTP method to use (example is `GET`).
        :param: url:
            The URL to use. The default value is the URL this client was
            created with (`self.url`) (example is `http://localhost:8080`)
        :param: kwargs:
            Any other parameters that will be passed to `treq.Func`, for
            example headers. Or any URL parameters to override, for example
            path, query or fragment.
        """
        arg_2 = arg_0._compose_url(arg_2, arg_3)

        arg_3.setdefault('timeout', arg_0._timeout)

        arg_4 = arg_0._client.Func(arg_1, arg_2, reactor=arg_0._reactor, **arg_3)

        arg_4.addCallback(arg_0._log_Func_response, arg_1, arg_2, arg_3)
        arg_4.addErrback(arg_0._log_Func_error, arg_2)

        return arg_4

Perform a request.

        :param: method:
            The HTTP method to use (example is `GET`).
        :param: url:
            The URL to use. The default value is the URL this client was
            created with (`self.url`) (example is `http://localhost:8080`)
        :param: kwargs:
            Any other parameters that will be passed to `treq.request`, for
            example headers. Or any URL parameters to override, for example
            path, query or fragment.


Transform hyphens to various kinds of dashes


(filename, scope,
                                       message=None, cache=None)

return OAuth2DecoratorFromClientSecrets(filename, scope,
                                            message=message, cache=cache)

def Func(arg_0, arg_1,
                                       arg_2=None, arg_3=None):
    """Creates an OAuth2Decorator populated from a clientsecrets file.

    Args:
        filename: string, File name of client secrets.
        scope: string or list of strings, scope(s) of the credentials being
               requested.
        message: string, A friendly string to display to the user if the
                 clientsecrets file is missing or invalid. The message may
                 contain HTML and will be presented on the web interface for
                 any method that uses the decorator.
        cache: An optional cache service client that implements get() and set()
               methods. See clientsecrets.loadfile() for details.

    Returns: An OAuth2Decorator
    """
    return OAuth2DecoratorFromClientSecrets(arg_0, arg_1,
                                            arg_2=arg_2, arg_3=arg_3)

Creates an OAuth2Decorator populated from a clientsecrets file .


def Func ( arg_0 , arg_1 ) : arg_2 = copy . deepcopy ( arg_1 ) for arg_3 in arg_1 : if arg_3 [ "name" ] not in arg_0 . options . exclude_tags : arg_0 . warn_if_tag_not_found ( arg_3 , "exclude-tags" ) else : arg_2 . remove ( arg_3 ) return arg_2

def Func(arg_0, arg_1):
        """
        Filter tags according exclude_tags option.

        :param list(dict) all_tags: Pre-filtered tags.
        :rtype: list(dict)
        :return: Filtered tags.
        """
        arg_2 = copy.deepcopy(arg_1)
        for arg_3 in arg_1:
            if arg_3["name"] not in arg_0.options.exclude_tags:
                arg_0.warn_if_tag_not_found(arg_3, "exclude-tags")
            else:
                arg_2.remove(arg_3)
        return arg_2

Filter tags according exclude_tags option .


def Func ( arg_0 , arg_1 ) : arg_1 . endlexpos = arg_1 . lexpos + len ( arg_1 . value ) return arg_1

def Func(arg_0, arg_1):
        r"\>\="
        arg_1.endlexpos = arg_1.lexpos + len(arg_1.value)
        return arg_1


def Func(arg_0, arg_1):
    """Read configuration file options into a dictionary."""

    arg_0 = os.path.abspath(arg_0)

    if not os.path.exists(arg_0):
        raise RuntimeError("Couldn't open configuration file '{}'.".format(arg_0))

    if arg_0.endswith(".json"):
        with io.open(arg_0, mode="r", encoding="utf-8") as json_file:
            # Minify the JSON file to strip embedded comments
            arg_2 = jsmin(json_file.read())
        arg_3 = json.loads(arg_2)

    elif arg_0.endswith(".yaml"):
        with io.open(arg_0, mode="r", encoding="utf-8") as yaml_file:
            arg_3 = yaml.safe_load(yaml_file)

    else:
        try:
            import imp

            arg_3 = {}
            arg_4 = imp.load_source("configuration_module", arg_0)

            for arg_5, arg_6 in vars(arg_4).items():
                if arg_5.startswith("__"):
                    continue
                elif isfunction(arg_6):
                    continue
                arg_3[arg_5] = arg_6
        except Exception:
            arg_7, arg_8 = sys.exc_info()[:2]
            arg_9 = traceback.format_exception_only(arg_7, arg_8)
            arg_10 = "\n".join(arg_9)
            print(
                "Failed to read configuration file: "
                + arg_0
                + "\nDue to "
                + arg_10,
                file=sys.stderr,
            )
            raise

    arg_3["_config_file"] = arg_0
    return arg_3

Read configuration file options into a dictionary .


def Func ( arg_0 ) : arg_1 = _app_ctx_stack . top if arg_1 is not None : if not hasattr ( arg_1 , 'mysql_db' ) : arg_1 . mysql_db = arg_0 . connect return arg_1 . mysql_db

def Func(arg_0):
        """Attempts to connect to the MySQL server.

        :return: Bound MySQL Func object if successful or ``None`` if
            unsuccessful.
        """

        arg_1 = _app_ctx_stack.top
        if arg_1 is not None:
            if not hasattr(arg_1, 'mysql_db'):
                arg_1.mysql_db = arg_0.connect
            return arg_1.mysql_db

Attempts to connect to the MySQL server.

        :return: Bound MySQL connection object if successful or ``None`` if
            unsuccessful.

Attempts to connect to the MySQL server .


def Func(arg_0):
    """Return True if valid, raise ValueError if not"""
    try:
        if int(arg_0) < 0:
            return True
    except ValueError:
        pass

    try:
        datetime.strptime(arg_0, '%Y-%m-%d')
        return True
    except ValueError:
        pass

    raise ValueError('Dates must be negative integers or YYYY-MM-DD in the past.')

Return True if valid raise ValueError if not


def
Func
(
arg_0
)
:
if
not
prerequisites_ok
(
)
:
return
subprocess
.
call
(
[
'make'
,
'zip'
]
)
for
arg_1
in
glob
.
glob
(
'*.zip'
)
:
arg_2
=
arg_1
.
split
(
'.'
)
[
0
]
arg_3
=
"%s.%s.zip"
%
(
arg_2
,
arg_0
[
'version'
]
)
arg_4
=
os
.
path
.
join
(
arg_0
[
'workingdir'
]
,
arg_3
)
shutil
.
copy
(
arg_1
,
arg_4
)
print
(
"Copied %s to %s"
%
(
arg_1
,
arg_4
)
)

def Func(arg_0):
    """This is the actual zest.releaser entry point

    Relevant items in the context dict:

    name
        Name of the project being released

    tagdir
        Directory where the tag checkout is placed (*if* a tag
        checkout has been made)

    version
        Version we're releasing

    workingdir
        Original working directory

    """
    if not prerequisites_ok():
        return
    # Create a zipfile.
    subprocess.call(['make', 'zip'])
    for arg_1 in glob.glob('*.zip'):
        arg_2 = arg_1.split('.')[0]
        arg_3 = "%s.%s.zip" % (arg_2, arg_0['version'])
        arg_4 = os.path.join(arg_0['workingdir'], arg_3)
        shutil.copy(arg_1, arg_4)
        print("Copied %s to %s" % (arg_1, arg_4))

This is the actual zest . releaser entry point


def
Func
(
arg_0
,
arg_1
)
:
arg_1
=
_text_to_bytes_and_warn
(
"cipher_list"
,
arg_1
)
if
not
isinstance
(
arg_1
,
bytes
)
:
raise
TypeError
(
"cipher_list must be a byte string."
)
_openssl_assert
(
_lib
.
SSL_CTX_Func
(
arg_0
.
_context
,
arg_1
)
==
1
)
arg_2
=
Connection
(
arg_0
,
)
if
(
arg_2
.
get_cipher_list
(
)
==
[
'TLS_AES_256_GCM_SHA384'
,
'TLS_CHACHA20_POLY1305_SHA256'
,
'TLS_AES_128_GCM_SHA256'
]
)
:
raise
Error
(
[
(
'SSL routines'
,
'SSL_CTX_Func'
,
'no cipher match'
,
)
,
]
,
)

def Func(arg_0, arg_1):
        """
        Set the list of ciphers to be used in this context.

        See the OpenSSL manual for more information (e.g.
        :manpage:`ciphers(1)`).

        :param bytes cipher_list: An OpenSSL cipher string.
        :return: None
        """
        arg_1 = _text_to_bytes_and_warn("cipher_list", arg_1)

        if not isinstance(arg_1, bytes):
            raise TypeError("cipher_list must be a byte string.")

        _openssl_assert(
            _lib.SSL_CTX_Func(arg_0._context, arg_1) == 1
        )
        # In OpenSSL 1.1.1 setting the cipher list will always return TLS 1.3
        # ciphers even if you pass an invalid cipher. Applications (like
        # Twisted) have tests that depend on an error being raised if an
        # invalid cipher string is passed, but without the following check
        # for the TLS 1.3 specific cipher suites it would never error.
        arg_2 = Connection(arg_0, None)
        if (
            arg_2.get_cipher_list() == [
                'TLS_AES_256_GCM_SHA384',
                'TLS_CHACHA20_POLY1305_SHA256',
                'TLS_AES_128_GCM_SHA256'
            ]
        ):
            raise Error(
                [
                    (
                        'SSL routines',
                        'SSL_CTX_Func',
                        'no cipher match',
                    ),
                ],
            )

Set the list of ciphers to be used in this context .


(self, entrypoint, params=None, schema=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
)
:
arg_4
=
arg_0
.
_api_url
.
format
(
arg_1
)
arg_2
=
arg_2
or
{
}
if
arg_0
.
session_id
:
arg_2
.
update
(
{
"session_id"
:
arg_0
.
session_id
}
)
else
:
arg_2
.
update
(
{
"device_id"
:
arg_0
.
device_id
,
"device_type"
:
arg_0
.
_access_type
,
"access_token"
:
arg_0
.
_access_token
,
"version"
:
arg_0
.
_version_code
}
)
arg_2
.
update
(
{
"locale"
:
arg_0
.
locale
.
replace
(
'_'
,
''
)
,
}
)
if
arg_0
.
session_id
:
arg_2
[
"session_id"
]
=
arg_0
.
session_id
arg_5
=
arg_0
.
session
.
http
.
post
(
arg_4
,
arg_9
=
arg_2
,
headers
=
arg_0
.
headers
,
verify
=
False
)
arg_6
=
arg_0
.
session
.
http
.
json
(
arg_5
,
arg_3
=
_api_schema
)
if
arg_6
[
"error"
]
:
arg_7
=
arg_6
.
get
(
"message"
,
"Unknown error"
)
arg_8
=
arg_6
.
get
(
"code"
,
"unknown_error"
)
raise
CrunchyrollAPIError
(
arg_7
,
arg_8
)
arg_9
=
arg_6
.
get
(
"data"
)
if
arg_3
:
arg_9
=
arg_3
.
validate
(
arg_9
,
name
=
"API response"
)
return
arg_9

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """Makes a call against the api.

        :param entrypoint: API method to call.
        :param params: parameters to include in the request data.
        :param schema: schema to use to validate the data
        """
        arg_4 = arg_0._api_url.format(arg_1)

        # Default params
        arg_2 = arg_2 or {}
        if arg_0.session_id:
            arg_2.update({
                "session_id": arg_0.session_id
            })
        else:
            arg_2.update({
                "device_id": arg_0.device_id,
                "device_type": arg_0._access_type,
                "access_token": arg_0._access_token,
                "version": arg_0._version_code
            })
        arg_2.update({
            "locale": arg_0.locale.replace('_', ''),
        })

        if arg_0.session_id:
            arg_2["session_id"] = arg_0.session_id

        # The certificate used by Crunchyroll cannot be verified in some environments.
        arg_5 = arg_0.session.http.post(arg_4, arg_9=arg_2, headers=arg_0.headers, verify=False)
        arg_6 = arg_0.session.http.json(arg_5, arg_3=_api_schema)

        if arg_6["error"]:
            arg_7 = arg_6.get("message", "Unknown error")
            arg_8 = arg_6.get("code", "unknown_error")
            raise CrunchyrollAPIError(arg_7, arg_8)

        arg_9 = arg_6.get("data")
        if arg_3:
            arg_9 = arg_3.validate(arg_9, name="API response")

        return arg_9


(self, stanza, res_handler, err_handler,
                                    timeout_handler = None, timeout = None)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None , arg_5 = None ) : arg_0 . lock . acquire ( ) try : arg_0 . _Func ( arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) finally : arg_0 . lock . release ( )

def Func(arg_0, arg_1, arg_2, arg_3,
                                    arg_4 = None, arg_5 = None):
        """Set response handler for an IQ "get" or "set" stanza.

        This should be called before the stanza is sent.

        :Parameters:
            - `stanza`: an IQ stanza
            - `res_handler`: result handler for the stanza. Will be called
              when matching <iq type="result"/> is received. Its only
              argument will be the stanza received. The handler may return
              a stanza or list of stanzas which should be sent in response.
            - `err_handler`: error handler for the stanza. Will be called
              when matching <iq type="error"/> is received. Its only
              argument will be the stanza received. The handler may return
              a stanza or list of stanzas which should be sent in response
              but this feature should rather not be used (it is better not to
              respond to 'error' stanzas).
            - `timeout_handler`: timeout handler for the stanza. Will be called
              (with no arguments) when no matching <iq type="result"/> or <iq
              type="error"/> is received in next `timeout` seconds.
            - `timeout`: timeout value for the stanza. After that time if no
              matching <iq type="result"/> nor <iq type="error"/> stanza is
              received, then timeout_handler (if given) will be called.
        """
        # pylint: disable-msg=R0913
        arg_0.lock.acquire()
        try:
            arg_0._Func(arg_1, arg_2, arg_3,
                                                    arg_4, arg_5)
        finally:
            arg_0.lock.release()

Set response handler for an IQ get or set stanza .


def Func ( arg_0 , arg_1 ) : arg_0 . events . append ( arg_1 ) arg_0 . event_notify ( arg_1 )

def Func(arg_0, arg_1):
        """
        Add a new event and notify subscribers.

        event -- the event that occurred
        """
        arg_0.events.append(arg_1)
        arg_0.event_notify(arg_1)

Add a new event and notify subscribers .


(self, model_str, position=1, file_id=None)

def Func(arg_0, arg_1, arg_2=1, arg_3=None):
        """Add a kappa model given in a string to the project."""
        if arg_3 is None:
            arg_3 = arg_0.make_unique_id('inlined_input')
        arg_4 = arg_0.file_create(File.from_string(arg_1, arg_2,
                                                     arg_3))
        return arg_4

Add a kappa model given in a string to the project .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
.
decode
(
formatter
=
)
arg_2
=
re
.
sub
(
'\s+'
,
' '
,
arg_2
)
arg_2
=
re
.
sub
(
'\n'
,
''
,
arg_2
)
return
arg_2

def Func(arg_0, arg_1):
        """
        get unicode string without any other content transformation.
        and clean extra spaces
        """
        arg_2 = arg_1.decode(formatter=None)
        arg_2 = re.sub('\s+', ' ', arg_2)
        arg_2 = re.sub('\n', '', arg_2)
        return arg_2

get unicode string without any other content transformation . and clean extra spaces


def Func ( arg_0 ) -> str : arg_1 = arg_0 . __get_user_path ( ) arg_2 = arg_1 + "/" + config_filename return arg_2

def Func(arg_0) -> str:
        """
        Returns the path where the active config file is expected.
        This is the user's profile folder.
        """
        arg_1 = arg_0.__get_user_path()
        arg_2 = arg_1 + "/" + config_filename
        return arg_2

Returns the path where the active config file is expected . This is the user s profile folder .


def Func ( arg_0 ) : def getter ( arg_1 ) : return "***obfuscated***" def setter ( arg_1 , arg_2 ) : arg_3 = "_" + arg_0 arg_1 . __dict__ [ arg_3 ] = arg_2 return property ( fget = getter , fset = setter )

def Func(arg_0):
    """
    A credential property factory for each message class that will set
    private attributes and return obfuscated credentials when requested.
    """

    def getter(arg_1):
        return "***obfuscated***"

    def setter(arg_1, arg_2):
        arg_3 = "_" + arg_0
        arg_1.__dict__[arg_3] = arg_2

    return property(fget=getter, fset=setter)

A credential property factory for each message class that will set private attributes and return obfuscated credentials when requested .


def Func ( arg_0 ) : arg_1 , arg_2 = arg_0 . shape [ : 3 ] , arg_0 . affine arg_3 = np . array ( np . meshgrid ( * ( range ( i ) for i in arg_1 ) , indexing = 'ij' ) ) arg_3 = np . rollaxis ( arg_3 , 0 , len ( arg_1 ) + 1 ) arg_4 = nib . affines . apply_affine ( arg_2 , arg_3 ) return arg_4

def Func(arg_0):
    """ Return a grid with coordinates in 3D physical space for `img`."""
    arg_1, arg_2 = arg_0.shape[:3], arg_0.affine
    arg_3 = np.array(np.meshgrid(*(range(i) for i in arg_1), indexing='ij'))
    arg_3 = np.rollaxis(arg_3, 0, len(arg_1) + 1)
    arg_4 = nib.affines.apply_affine(arg_2, arg_3)

    return arg_4

Return a grid with coordinates in 3D physical space for img .


(self, source, target, mpi=None, pos=0, chunk=0, part=0, delete_source=False)

def Func(arg_0, arg_1, arg_2, arg_3=None, arg_4=0, arg_5=0, arg_6=0, arg_7=False):
    '''Copy a single file from source to target using boto S3 library.'''

    if arg_0.opt.dry_run:
      message('%s => %s' % (arg_1, arg_2))
      return

    arg_8 = S3URL(arg_1)
    arg_9 = S3URL(arg_2)

    if not arg_3:
      arg_10 = arg_0.lookup(arg_8)
      arg_11 = int(arg_10['ContentLength'])

      if arg_11 < arg_0.opt.max_singlepart_Func_size:
        arg_0.s3.Func_object(Bucket=arg_9.bucket, Key=arg_9.path,
                            CopySource={'Bucket': arg_8.bucket, 'Key': arg_8.path})

        message('%s => %s' % (arg_1, arg_2))
        if arg_7:
          arg_0.delete(arg_1)

        return

      arg_12 = arg_0.s3.create_multipart_upload(Bucket=arg_9.bucket,
                                                 Key=arg_9.path,
                                                 Metadata=arg_10['Metadata'])
      arg_13 = arg_12['UploadId']

      for arg_14 in arg_0.get_file_splits(arg_13, arg_1, arg_2, arg_11, arg_0.opt.multipart_split_size):
        arg_0.pool.Func(*arg_14, arg_7=arg_7)
      return

    arg_12 = arg_0.s3.upload_part_Func(Bucket=arg_9.bucket,
                                        Key=arg_9.path,
                                        CopySource={'Bucket': arg_8.bucket, 'Key': arg_8.path},
                                        CopySourceRange='bytes=%d-%d' % (arg_4, arg_4 + arg_5 - 1),
                                        UploadId=arg_3.id,
                                        PartNumber=arg_6)

    if arg_3.complete({'ETag': arg_12['CopyPartResult']['ETag'], 'PartNumber': arg_6}):
      try:
        # Finalize Func operation.
        arg_0.s3.complete_multipart_upload(Bucket=arg_9.bucket, Key=arg_9.path, UploadId=arg_3.id, MultipartUpload={'Parts': arg_3.sorted_parts()})

        if arg_7:
          arg_0.delete(arg_1)

        message('%s => %s' % (arg_1, arg_2))
      except Exception as e:
        message('Unable to complete upload: %s', str(e))
        arg_0.s3.abort_multipart_upload(Bucket=arg_8.bucket, Key=arg_8.path, UploadId=arg_3.id)
        raise RetryFailure('Copy failed: Unable to complete Func %s.' % arg_1)

Copy a single file from source to target using boto S3 library .


def Func ( arg_0 ) : arg_1 = load_config ( arg_0 . config ) arg_2 = get_blockade ( arg_1 , arg_0 ) arg_3 = arg_2 . create ( verbose = arg_0 . verbose , force = arg_0 . force ) print_containers ( arg_3 , arg_0 . json )

def Func(arg_0):
    """Start the containers and link them together
    """
    arg_1 = load_config(arg_0.config)
    arg_2 = get_blockade(arg_1, arg_0)
    arg_3 = arg_2.create(verbose=arg_0.verbose, force=arg_0.force)
    print_containers(arg_3, arg_0.json)


Implements the missing operator for finding missing variables.

def Func ( arg_0 , * arg_1 ) : arg_2 = object ( ) if arg_1 and isinstance ( arg_1 [ 0 ] , list ) : arg_1 = arg_1 [ 0 ] arg_3 = [ ] for arg_4 in arg_1 : if get_var ( arg_0 , arg_4 , arg_2 ) is arg_2 : arg_3 . append ( arg_4 ) return arg_3

def Func(arg_0, *arg_1):
    """Implements the Func operator for finding Func variables."""
    arg_2 = object()
    if arg_1 and isinstance(arg_1[0], list):
        arg_1 = arg_1[0]
    arg_3 = []
    for arg_4 in arg_1:
        if get_var(arg_0, arg_4, arg_2) is arg_2:
            arg_3.append(arg_4)
    return arg_3

Implements the missing operator for finding missing variables .


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_1 [ 'hero_slider.SliderItemTitle' ] . objects . all ( ) : arg_2 . is_published = True arg_2 . save ( )

def Func(arg_0, arg_1):
        "Write your Func methods here."
        # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..."
        for arg_2 in arg_1['hero_slider.SliderItemTitle'].objects.all():
            arg_2.is_published = True
            arg_2.save()


(indir, outdir='GSEA_Replot', weighted_score_type=1,
           min_size=3, max_size=1000, figsize=(6.5,6), graph_num=20, format='pdf', verbose=False)

def Func(arg_0, arg_1='GSEA_Replot', arg_2=1,
           arg_3=3, arg_4=1000, arg_5=(6.5,6), arg_6=20, arg_7='pdf', arg_8=False):
    """The main function to reproduce GSEA desktop outputs.

    :param indir: GSEA desktop results directory. In the sub folder, you must contain edb file folder.
    :param outdir: Output directory.
    :param float weighted_score_type: weighted score type. choose from {0,1,1.5,2}. Default: 1.
    :param list figsize: Matplotlib output figure figsize. Default: [6.5,6].
    :param str format: Matplotlib output figure format. Default: 'pdf'.
    :param int min_size: Min size of input genes presented in Gene Sets. Default: 3.
    :param int max_size: Max size of input genes presented in Gene Sets. Default: 5000.
                     You are not encouraged to use min_size, or max_size argument in :func:`Func` function.
                     Because gmt file has already been filtered.
    :param verbose: Bool, increase output verbosity, print out progress of your job, Default: False.

    :return: Generate new figures with selected figure format. Default: 'pdf'.

    """
    arg_9 = Replot(arg_0, arg_1, arg_2,
                 arg_3, arg_4, arg_5, arg_6, arg_7, arg_8)
    arg_9.run()

    return

The main function to reproduce GSEA desktop outputs.

    :param indir: GSEA desktop results directory. In the sub folder, you must contain edb file folder.
    :param outdir: Output directory.
    :param float weighted_score_type: weighted score type. choose from {0,1,1.5,2}. Default: 1.
    :param list figsize: Matplotlib output figure figsize. Default: [6.5,6].
    :param str format: Matplotlib output figure format. Default: 'pdf'.
    :param int min_size: Min size of input genes presented in Gene Sets. Default: 3.
    :param int max_size: Max size of input genes presented in Gene Sets. Default: 5000.
                     You are not encouraged to use min_size, or max_size argument in :func:`replot` function.
                     Because gmt file has already been filtered.
    :param verbose: Bool, increase output verbosity, print out progress of your job, Default: False.

    :return: Generate new figures with selected figure format. Default: 'pdf'.

The main function to reproduce GSEA desktop outputs .


def Func ( arg_0 ) : arg_1 = import_item ( str ( arg_0 . kernel_class ) ) arg_0 . kernel = arg_1 ( config = arg_0 . config , session = arg_0 . session , shell_socket = arg_0 . shell_socket , iopub_socket = arg_0 . iopub_socket , stdin_socket = arg_0 . stdin_socket , log = arg_0 . log ) arg_0 . kernel . record_ports ( arg_0 . ports )

def Func(arg_0):
        """Create the Kernel object itself"""
        arg_1 = import_item(str(arg_0.kernel_class))
        arg_0.kernel = arg_1(config=arg_0.config, session=arg_0.session,
                                shell_socket=arg_0.shell_socket,
                                iopub_socket=arg_0.iopub_socket,
                                stdin_socket=arg_0.stdin_socket,
                                log=arg_0.log
        )
        arg_0.kernel.record_ports(arg_0.ports)


(
    input_file=None,
    indexes=None,
    dst_bounds=None,
    dst_shape=None,
    dst_crs=None,
    resampling=None,
    src_nodata=None,
    dst_nodata=None
)

def
Func
(
arg_0
=
,
arg_1
=
,
arg_2
=
,
arg_3
=
,
arg_4
=
,
arg_5
=
,
arg_6
=
,
arg_7
=
)
:
try
:
return
_rasterio_read
(
arg_0
=
arg_0
,
arg_1
=
arg_1
,
arg_2
=
arg_2
,
arg_3
=
arg_3
,
arg_4
=
arg_4
,
arg_5
=
arg_5
,
arg_6
=
arg_6
,
arg_7
=
arg_7
)
except
Exception
as
e
:
logger
.
exception
(
"error while reading file %s: %s"
,
arg_0
,
e
)
raise

def Func(
    arg_0=None,
    arg_1=None,
    arg_2=None,
    arg_3=None,
    arg_4=None,
    arg_5=None,
    arg_6=None,
    arg_7=None
):
    """Extract a numpy array from a raster file."""
    try:
        return _rasterio_read(
            arg_0=arg_0,
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5,
            arg_6=arg_6,
            arg_7=arg_7
        )
    except Exception as e:
        logger.exception("error while reading file %s: %s", arg_0, e)
        raise

Extract a numpy array from a raster file .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 . type is NUMBER : arg_0 . bot . _namespace [ arg_2 . name ] = arg_1 . get_value ( ) arg_0 . bot . _vars [ arg_2 . name ] . value = arg_1 . get_value ( ) publish_event ( VARIABLE_UPDATED_EVENT , arg_2 ) elif arg_2 . type is BOOLEAN : arg_0 . bot . _namespace [ arg_2 . name ] = arg_1 . get_active ( ) arg_0 . bot . _vars [ arg_2 . name ] . value = arg_1 . get_active ( ) publish_event ( VARIABLE_UPDATED_EVENT , arg_2 ) elif arg_2 . type is TEXT : arg_0 . bot . _namespace [ arg_2 . name ] = arg_1 . get_text ( ) arg_0 . bot . _vars [ arg_2 . name ] . value = arg_1 . get_text ( ) publish_event ( VARIABLE_UPDATED_EVENT , arg_2 )

def Func(arg_0, arg_1, arg_2):
        ''' Called when a slider is adjusted. '''
        # set the appropriate bot var
        if arg_2.type is NUMBER:
            arg_0.bot._namespace[arg_2.name] = arg_1.get_value()
            arg_0.bot._vars[arg_2.name].value = arg_1.get_value()  ## Not sure if this is how to do this - stu
            publish_event(VARIABLE_UPDATED_EVENT, arg_2)  # pretty dumb for now
        elif arg_2.type is BOOLEAN:
            arg_0.bot._namespace[arg_2.name] = arg_1.get_active()
            arg_0.bot._vars[arg_2.name].value = arg_1.get_active()  ## Not sure if this is how to do this - stu
            publish_event(VARIABLE_UPDATED_EVENT, arg_2)  # pretty dumb for now
        elif arg_2.type is TEXT:
            arg_0.bot._namespace[arg_2.name] = arg_1.get_text()
            arg_0.bot._vars[arg_2.name].value = arg_1.get_text()  ## Not sure if this is how to do this - stu
            publish_event(VARIABLE_UPDATED_EVENT, arg_2)


def Func ( arg_0 , arg_1 = 0 , arg_2 = 0 ) : arg_3 = [ keypoint . Func ( arg_1 = arg_1 , arg_2 = arg_2 ) for keypoint in arg_0 . keypoints ] return arg_0 . deepcopy ( arg_3 )

def Func(arg_0, arg_1=0, arg_2=0):
        """
        Move the keypoints around on an image.

        Parameters
        ----------
        x : number, optional
            Move each keypoint by this value on the x axis.

        y : number, optional
            Move each keypoint by this value on the y axis.

        Returns
        -------
        out : KeypointsOnImage
            Keypoints after moving them.

        """
        arg_3 = [keypoint.Func(arg_1=arg_1, arg_2=arg_2) for keypoint in arg_0.keypoints]
        return arg_0.deepcopy(arg_3)


def Func():
    '''get default build template.
    '''
    arg_0 = get_installdir()
    arg_1 = "%s/main/templates/build/singularity-cloudbuild.json" % arg_0

    if os.path.exists(arg_1):
        bot.debug("Found template %s" %arg_1)
        return read_json(arg_1)

    bot.warning("Template %s not found." % arg_1)