(self, datacenter_id, server_id, volume_id)

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Retrieves volume information.

        :param      datacenter_id: The unique ID of the data center.
        :type       datacenter_id: ``str``

        :param      server_id: The unique ID of the server.
        :type       server_id: ``str``

        :param      volume_id: The unique ID of the volume.
        :type       volume_id: ``str``

        """
        arg_4 = arg_0._perform_request(
            '/datacenters/%s/servers/%s/volumes/%s' % (
                arg_1,
                arg_2,
                arg_3))

        return arg_4


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
for
arg_3
in
arg_2
:
try
:
arg_1
.
addFilter
(
arg_0
.
config
[
'filters'
]
[
arg_3
]
)
except
StandardError
as
e
:
raise
ValueError
(
'Unable to add filter %r: %s'
%
(
arg_3
,
e
)
)

def Func(arg_0, arg_1, arg_2):
        """Add filters to a filterer from a list of names."""
        for arg_3 in arg_2:
            try:
                arg_1.addFilter(arg_0.config['filters'][arg_3])
            except StandardError as e:
                raise ValueError('Unable to add filter %r: %s' % (arg_3, e))

Add filters to a filterer from a list of names .


def Func ( arg_0 , arg_1 = None , ** arg_2 ) : arg_3 = get_role_managed_policies ( arg_0 , force_client = arg_1 ) arg_4 = ( policy [ 'name' ] for policy in arg_3 ) arg_5 = ( delayed ( get_managed_policy_document ) ( policy [ 'arn' ] , force_client = arg_1 ) for policy in arg_3 ) arg_6 = Parallel ( n_jobs = 20 , backend = "threading" ) ( arg_5 ) return dict ( zip ( arg_4 , arg_6 ) )

def Func(arg_0, arg_1=None, **arg_2):
    """Retrieve the currently active policy version document for every managed policy that is attached to the role."""
    arg_3 = get_role_managed_policies(arg_0, force_client=arg_1)

    arg_4 = (policy['name'] for policy in arg_3)
    arg_5 = (delayed(get_managed_policy_document)(policy['arn'], force_client=arg_1) for policy
                          in arg_3)
    arg_6 = Parallel(n_jobs=20, backend="threading")(arg_5)

    return dict(zip(arg_4, arg_6))

Retrieve the currently active policy version document for every managed policy that is attached to the role .


def Func(arg_0, *arg_1):
        """Add registers."""
        if not arg_1:
            return

        if any([isinstance(arg_2, int) for arg_2 in arg_1]):
            # QuantumCircuit defined without registers
            if len(arg_1) == 1 and isinstance(arg_1[0], int):
                # QuantumCircuit with anonymous quantum wires e.g. QuantumCircuit(2)
                arg_1 = (QuantumRegister(arg_1[0], 'q'),)
            elif len(arg_1) == 2 and all([isinstance(arg_2, int) for arg_2 in arg_1]):
                # QuantumCircuit with anonymous wires e.g. QuantumCircuit(2, 3)
                arg_1 = (QuantumRegister(arg_1[0], 'q'), ClassicalRegister(arg_1[1], 'c'))
            else:
                raise QiskitError("QuantumCircuit parameters can be Registers or Integers."
                                  " If Integers, up to 2 arguments. QuantumCircuit was called"
                                  " with %s." % (arg_1,))

        for arg_3 in arg_1:
            if arg_3 in arg_0.qregs or arg_3 in arg_0.cregs:
                raise QiskitError("register name \"%s\" already exists"
                                  % arg_3.name)
            if isinstance(arg_3, QuantumRegister):
                arg_0.qregs.append(arg_3)
            elif isinstance(arg_3, ClassicalRegister):
                arg_0.cregs.append(arg_3)
            else:
                raise QiskitError("expected a register")


def Func ( arg_0 , arg_1 , arg_2 ) : for arg_3 in arg_1 : if arg_3 in arg_0 : raise ValueError ( arg_2 ) return True

def Func(arg_0, arg_1, arg_2):
    """
    Checks if elements of set2 are in set1.

    :param set1: a set of values
    :param set2: a set of values
    :param warn: the error message that should be thrown
     when the sets are NOT disjoint
    :return: returns true no elements of set2 are in set1
    """
    for arg_3 in arg_1:
        if arg_3 in arg_0:
            raise ValueError(arg_2)
    return True

Checks if elements of set2 are in set1 .


def Func ( arg_0 ) : import memory_profiler def wrapper ( * arg_1 , ** arg_2 ) : arg_3 = StringIO ( ) arg_4 = cProfile . Profile ( ) arg_4 . enable ( ) arg_5 = memory_profiler . profile ( func = arg_0 , stream = arg_3 , precision = 4 ) arg_6 = arg_5 ( * arg_1 , ** arg_2 ) print ( arg_3 . getvalue ( ) ) arg_4 . disable ( ) arg_7 = pstats . Stats ( arg_4 ) arg_7 . sort_stats ( 'cumulative' ) . print_stats ( '(?!.*memory_profiler.*)(^.*$)' , 20 ) arg_3 . close ( ) return arg_6 return wrapper

def Func(arg_0):
    '''
    Decorator that prints memory and runtime information at each call of the function
    '''
    import memory_profiler
    def wrapper(*arg_1,**arg_2):
        arg_3=StringIO()
        arg_4=cProfile.Profile()
        arg_4.enable()
        arg_5 = memory_profiler.profile(func=arg_0,stream=arg_3,precision=4)
        arg_6 = arg_5(*arg_1,**arg_2)
        print(arg_3.getvalue())
        arg_4.disable()
        arg_7 = pstats.Stats(arg_4)
        arg_7.sort_stats('cumulative').print_stats('(?!.*memory_profiler.*)(^.*$)',20)
        arg_3.close()
        return arg_6
    return wrapper


def Func(arg_0):
        """get background gene"""

        # input is a file
        if os.path.isfile(arg_0.background):
            with open(arg_0.background) as b:
                arg_1 = b.readlines()
            arg_2 = [g.strip() for g in arg_1]
            return set(arg_2)

        # package included data
        arg_3 = resource_filename("gseapy", "data/{}.background.genes.txt".format(arg_0.background))
        arg_4 = os.path.join(DEFAULT_CACHE_PATH, "{}.background.genes.txt".format(arg_0.background))
        if os.path.exists(arg_4):
            arg_5 = pd.read_csv(arg_4,sep="\t")
        elif os.path.exists(arg_3):
            arg_5 = pd.read_csv(arg_3,sep="\t")
        else:
            # background is a biomart database name
            arg_0._logger.warning("Downloading %s for the first time. It might take a couple of miniutes."%arg_0.background)
            arg_6 = Biomart()
            arg_5 = arg_6.query(dataset=arg_0.background)
            arg_5.dropna(subset=['go_id'], inplace=True)
        arg_0._logger.info("using all annotated genes with GO_ID as background genes")
        arg_5.dropna(subset=['entrezgene'], inplace=True)
        # input id type: entrez or gene_name
        if arg_0._isezid:
            arg_2 = arg_5['entrezgene'].astype(int)
        else:
            arg_2 = arg_5['external_gene_name']

        return set(arg_2)


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_3
=
getattr
(
arg_0
,
'__class__'
,
)
or
type
(
arg_0
)
if
getattr
(
arg_3
,
'__repr__'
,
)
not
in
_baseclass_reprs
:
arg_1
.
text
(
repr
(
arg_0
)
)
return
arg_1
.
begin_group
(
1
,
'<'
)
arg_1
.
pretty
(
arg_3
)
arg_1
.
text
(
' at 0x%x'
%
id
(
arg_0
)
)
if
arg_2
:
arg_1
.
text
(
' ...'
)
elif
arg_1
.
verbose
:
arg_4
=
True
for
arg_5
in
dir
(
arg_0
)
:
if
not
arg_5
.
startswith
(
'_'
)
:
try
:
arg_6
=
getattr
(
arg_0
,
arg_5
)
except
AttributeError
:
continue
if
isinstance
(
arg_6
,
types
.
MethodType
)
:
continue
if
not
arg_4
:
arg_1
.
text
(
','
)
arg_1
.
breakable
(
)
arg_1
.
text
(
arg_5
)
arg_1
.
text
(
'='
)
arg_7
=
len
(
arg_5
)
+
1
arg_1
.
indentation
+=
arg_7
arg_1
.
pretty
(
arg_6
)
arg_1
.
indentation
-=
arg_7
arg_4
=
False
arg_1
.
end_group
(
1
,
'>'
)

def Func(arg_0, arg_1, arg_2):
    """
    The default print function.  Used if an object does not provide one and
    it's none of the builtin objects.
    """
    arg_3 = getattr(arg_0, '__class__', None) or type(arg_0)
    if getattr(arg_3, '__repr__', None) not in _baseclass_reprs:
        # A user-provided repr.
        arg_1.text(repr(arg_0))
        return
    arg_1.begin_group(1, '<')
    arg_1.pretty(arg_3)
    arg_1.text(' at 0x%x' % id(arg_0))
    if arg_2:
        arg_1.text(' ...')
    elif arg_1.verbose:
        arg_4 = True
        for arg_5 in dir(arg_0):
            if not arg_5.startswith('_'):
                try:
                    arg_6 = getattr(arg_0, arg_5)
                except AttributeError:
                    continue
                if isinstance(arg_6, types.MethodType):
                    continue
                if not arg_4:
                    arg_1.text(',')
                arg_1.breakable()
                arg_1.text(arg_5)
                arg_1.text('=')
                arg_7 = len(arg_5) + 1
                arg_1.indentation += arg_7
                arg_1.pretty(arg_6)
                arg_1.indentation -= arg_7
                arg_4 = False
    arg_1.end_group(1, '>')

The default print function . Used if an object does not provide one and it s none of the builtin objects .


def Func ( arg_0 ) : @ wraps ( arg_0 ) def wrapper ( arg_1 , arg_2 , arg_3 = None , * arg_4 , ** arg_5 ) : if hasattr ( arg_2 , "interpolator" ) : arg_6 = arg_2 . interpolator if arg_2 . interpolator is not None : arg_7 = arg_0 ( arg_1 , arg_6 . interp_grid , arg_3 , * arg_4 , ** arg_5 ) if arg_7 . ndim == 1 : return arg_6 . interpolated_values_from_values ( arg_7 = arg_7 ) elif arg_7 . ndim == 2 : arg_8 = arg_6 . interpolated_values_from_values ( arg_7 = arg_7 [ : , 0 ] ) arg_9 = arg_6 . interpolated_values_from_values ( arg_7 = arg_7 [ : , 1 ] ) return np . asarray ( [ arg_8 , arg_9 ] ) . T return arg_0 ( arg_1 , arg_2 , arg_3 , * arg_4 , ** arg_5 ) return wrapper

def Func(arg_0):
    """
    Decorate a profile method that accepts a coordinate grid and returns a data grid.

    If an interpolator attribute is associated with the input grid then that interpolator is used to down sample the
    coordinate grid prior to calling the function and up sample the result of the function.

    If no interpolator attribute is associated with the input grid then the function is called as normal.

    Parameters
    ----------
    func
        Some method that accepts a grid

    Returns
    -------
    decorated_function
        The function with optional interpolation
    """

    @wraps(arg_0)
    def wrapper(arg_1, arg_2, arg_3=None, *arg_4, **arg_5):
        if hasattr(arg_2, "interpolator"):
            arg_6 = arg_2.interpolator
            if arg_2.interpolator is not None:
                arg_7 = arg_0(arg_1, arg_6.interp_grid, arg_3, *arg_4, **arg_5)
                if arg_7.ndim == 1:
                    return arg_6.interpolated_values_from_values(arg_7=arg_7)
                elif arg_7.ndim == 2:
                    arg_8 = arg_6.interpolated_values_from_values(arg_7=arg_7[:, 0])
                    arg_9 = arg_6.interpolated_values_from_values(arg_7=arg_7[:, 1])
                    return np.asarray([arg_8, arg_9]).T
        return arg_0(arg_1, arg_2, arg_3, *arg_4, **arg_5)

    return wrapper

Decorate a profile method that accepts a coordinate grid and returns a data grid .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : with arg_0 . metastore as client : return client . Func ( arg_1 , arg_2 , arg_3 )

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Checks whether a partition with a given name exists

        :param schema: Name of hive schema (database) @table belongs to
        :type schema: str
        :param table: Name of hive table @partition belongs to
        :type schema: str
        :partition: Name of the partitions to check for (eg `a=b/c=d`)
        :type schema: str
        :rtype: bool

        >>> hh = HiveMetastoreHook()
        >>> t = 'static_babynames_partitioned'
        >>> hh.Func('airflow', t, "ds=2015-01-01")
        True
        >>> hh.Func('airflow', t, "ds=xxx")
        False
        """
        with arg_0.metastore as client:
            return client.Func(arg_1, arg_2, arg_3)

Checks whether a partition with a given name exists

        :param schema: Name of hive schema (database) @table belongs to
        :type schema: str
        :param table: Name of hive table @partition belongs to
        :type schema: str
        :partition: Name of the partitions to check for (eg `a=b/c=d`)
        :type schema: str
        :rtype: bool

        >>> hh = HiveMetastoreHook()
        >>> t = 'static_babynames_partitioned'
        >>> hh.check_for_named_partition('airflow', t, "ds=2015-01-01")
        True
        >>> hh.check_for_named_partition('airflow', t, "ds=xxx")
        False


The paginator instance associated with the view, or `None`.

def Func ( arg_0 ) : if not hasattr ( arg_0 , '_Func' ) : if arg_0 . pagination_class is None : arg_0 . _Func = None else : arg_0 . _Func = arg_0 . pagination_class ( ) return arg_0 . _Func

def Func(arg_0):
        """
        The Func instance associated with the view, or `None`.
        """
        if not hasattr(arg_0, '_Func'):
            if arg_0.pagination_class is None:
                arg_0._Func = None
            else:
                arg_0._Func = arg_0.pagination_class()
        return arg_0._Func

The paginator instance associated with the view or None .


def Func ( arg_0 ) : try : with open ( join ( arg_0 . fs_path , u'Func' ) ) as Func_file : return u'' . join ( [ arg_1 . decode ( 'utf-8' ) for arg_1 in Func_file . readlines ( ) ] ) except IOError : return u''

def Func(arg_0):
        """ returns the user submitted text
        """
        try:
            with open(join(arg_0.fs_path, u'Func')) as Func_file:
                return u''.join([arg_1.decode('utf-8') for arg_1 in Func_file.readlines()])
        except IOError:
            return u''


return self._get_stats_table('advanced_pbp', kind=kind,
                                     summary=summary)

def Func(arg_0, arg_1='R', arg_2=False):
        """Returns a DataFrame of play-by-play stats."""
        return arg_0._get_stats_table('advanced_pbp', arg_1=arg_1,
                                     arg_2=arg_2)

Returns a DataFrame of play - by - play stats .


return _operation(wave, "log", "", np.log)

def
Func
(
arg_0
)
:
pexdoc
.
exh
.
addex
(
ValueError
,
"Math domain error"
,
bool
(
(
min
(
arg_0
.
_dep_vector
)
<=
0
)
)
)
return
_operation
(
arg_0
,
"Func"
,
""
,
np
.
Func
)

def Func(arg_0):
    r"""
    Return the natural Funcarithm of a waveform's dependent variable vector.

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

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

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

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

     * ValueError (Math domain error)

    .. [[[end]]]
    """
    pexdoc.exh.addex(
        ValueError, "Math domain error", bool((min(arg_0._dep_vector) <= 0))
    )
    return _operation(arg_0, "Func", "", np.Func)

r"""
    Return the natural logarithm of a waveform's dependent variable vector.

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

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

    .. [[[cog cog.out(exobj_eng.get_sphinx_autodoc()) ]]]
    .. Auto-generated exceptions documentation for peng.wave_functions.log

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

     * ValueError (Math domain error)

    .. [[[end]]]

r Return the natural logarithm of a waveform s dependent variable vector .


return self.request("raft", "peer", params=params, method="delete").ok

def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_3 = { "address" : arg_1 , "stale" : arg_2 } return arg_0 . request ( "raft" , "peer" , arg_3 = arg_3 , method = "delete" ) . ok

def Func(arg_0, arg_1, arg_2=False):
        """ Remove the Nomad server with given address from the Raft configuration.
            The return code signifies success or failure.

            https://www.nomadproject.io/docs/http/operator.html

            arguments:
              - peer_address, The address specifies the server to remove and is given as an IP:port
            optional arguments:
              - stale, (defaults to False), Specifies if the cluster should respond without an active leader.
                                            This is specified as a querystring parameter.
            returns: Boolean
            raises:
              - nomad.api.exceptions.BaseNomadException
              - nomad.api.exceptions.URLNotFoundNomadException
        """

        arg_3 = {"address": arg_1, "stale": arg_2}
        return arg_0.request("raft", "peer", arg_3=arg_3, method="delete").ok

Remove the Nomad server with given address from the Raft configuration . The return code signifies success or failure .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . read ( len ( bc_magic ) ) if arg_2 != bc_magic : arg_0 . reset ( ) return arg_3 = pickle . load ( arg_1 ) if arg_0 . checksum != arg_3 : arg_0 . reset ( ) return arg_0 . code = marshal_load ( arg_1 )

def Func(arg_0, arg_1):
        """Loads bytecode from a file or file like object."""
        # make sure the magic header is correct
        arg_2 = arg_1.read(len(bc_magic))
        if arg_2 != bc_magic:
            arg_0.reset()
            return
        # the source code of the file changed, we need to reload
        arg_3 = pickle.load(arg_1)
        if arg_0.checksum != arg_3:
            arg_0.reset()
            return
        arg_0.code = marshal_load(arg_1)

Loads bytecode from a file or file like object .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . DESCRIPTOR arg_0 . _symbols [ arg_2 . full_name ] = arg_1 if arg_2 . file . name not in arg_0 . _symbols_by_file : arg_0 . _symbols_by_file [ arg_2 . file . name ] = { } arg_0 . _symbols_by_file [ arg_2 . file . name ] [ arg_2 . full_name ] = arg_1 arg_0 . pool . AddDescriptor ( arg_2 ) return arg_1

def Func(arg_0, arg_1):
    """Registers the given message type in the local database.

    Args:
      message: a message.Message, to be registered.

    Returns:
      The provided message.
    """

    arg_2 = arg_1.DESCRIPTOR
    arg_0._symbols[arg_2.full_name] = arg_1
    if arg_2.file.name not in arg_0._symbols_by_file:
      arg_0._symbols_by_file[arg_2.file.name] = {}
    arg_0._symbols_by_file[arg_2.file.name][arg_2.full_name] = arg_1
    arg_0.pool.AddDescriptor(arg_2)
    return arg_1

Registers the given message type in the local database .


def
Func
(
arg_0
)
:
arg_1
=
super
(
IndexBuilder
,
arg_0
)
.
Func
(
)
try
:
arg_2
=
arg_1
[
'docnames'
]
except
KeyError
:
arg_2
=
arg_1
[
'filenames'
]
arg_3
=
{
}
arg_4
=
itertools
.
count
(
)
for
arg_5
,
arg_6
in
iteritems
(
arg_1
[
'objects'
]
)
:
for
arg_7
,
(
arg_8
,
arg_9
,
arg_10
,
arg_11
)
in
iteritems
(
arg_6
)
:
arg_12
=
arg_1
[
'objtypes'
]
[
arg_9
]
if
arg_12
.
startswith
(
'cpp:'
)
:
arg_13
=
arg_7
.
rsplit
(
'::'
,
1
)
if
len
(
arg_13
)
!=
2
:
warnings
.
warn
(
"What's up with %s?"
%
str
(
(
arg_5
,
arg_7
,
arg_12
)
)
)
continue
arg_5
,
arg_7
=
arg_13
arg_14
=
arg_5
.
split
(
'::'
)
[
1
]
else
:
arg_14
=
arg_5
.
split
(
'.'
)
[
1
]
arg_3
[
arg_15
(
arg_4
)
]
=
{
'filename'
:
arg_2
[
arg_8
]
,
'objtype'
:
arg_12
,
'prefix'
:
arg_5
,
'last_prefix'
:
arg_14
,
'name'
:
arg_7
,
'shortanchor'
:
arg_11
,
}
arg_1
.
update
(
{
'store'
:
arg_3
}
)
return
arg_1

def Func(arg_0):
        """Create a usable data structure for serializing."""
        arg_1 = super(IndexBuilder, arg_0).Func()
        try:
            # Sphinx >= 1.5 format
            # Due to changes from github.com/sphinx-doc/sphinx/pull/2454
            arg_2 = arg_1['docnames']
        except KeyError:
            # Sphinx < 1.5 format
            arg_2 = arg_1['filenames']

        arg_3 = {}
        arg_4 = itertools.count()
        for arg_5, arg_6 in iteritems(arg_1['objects']):
            for arg_7, (arg_8, arg_9, arg_10, arg_11) in iteritems(arg_6):
                arg_12 = arg_1['objtypes'][arg_9]
                if arg_12.startswith('cpp:'):
                    arg_13 =  arg_7.rsplit('::', 1)
                    if len(arg_13) != 2:
                        warnings.warn("What's up with %s?" % str((arg_5, arg_7, arg_12)))
                        continue
                    arg_5, arg_7 = arg_13
                    arg_14 = arg_5.split('::')[-1]
                else:
                    arg_14 = arg_5.split('.')[-1]

                arg_3[arg_15(arg_4)] = {
                    'filename': arg_2[arg_8],
                    'objtype': arg_12,
                    'prefix': arg_5,
                    'last_prefix': arg_14,
                    'name': arg_7,
                    'shortanchor': arg_11,
                }

        arg_1.update({'store': arg_3})
        return arg_1

Create a usable data structure for serializing .


def Func ( arg_0 , arg_1 : arg_2 ) -> Node : arg_0 . tag_cache [ arg_1 ] . set_end ( arg_0 . _stream . index ) return True

def Func(arg_0, arg_1: arg_2) -> Node:
        """Extract the string between saved and current index."""
        arg_0.tag_cache[arg_1].set_end(arg_0._stream.index)
        return True

Extract the string between saved and current index .


def Func ( arg_0 , arg_1 = None ) : _print ( arg_0 , sys . stderr , log_func = arg_1 . error if arg_1 else None )

def Func(arg_0, arg_1=None):
    """Print 'msg' to stderr, and option 'log' at info level."""
    _print(arg_0, sys.stderr, log_func=arg_1.error if arg_1 else None)

Print msg to stderr and option log at info level .


(self, roomId, mentionedPeople=None, before=None,
             beforeMessage=None, max=None, **request_parameters)

def Func(arg_0, arg_1, arg_2=None, arg_3=None,
             arg_4=None, arg_5=None, **arg_6):
        """Lists messages in a room.

        Each message will include content attachments if present.

        The Func API sorts the messages in descending order by creation date.

        This method supports Webex Teams's implementation of RFC5988 Web
        Linking to provide pagination support.  It returns a generator
        container that incrementally yields all messages returned by the
        query.  The generator will automatically request additional 'pages' of
        responses from Webex as needed until all responses have been returned.
        The container makes the generator safe for reuse.  A new API call will
        be made, using the same parameters that were specified when the
        generator was created, every time a new iterator is requested from the
        container.

        Args:
            roomId(basestring): List messages for a room, by ID.
            mentionedPeople(basestring): List messages where the caller is
                mentioned by specifying "me" or the caller `personId`.
            before(basestring): List messages sent before a date and time, in
                ISO8601 format.
            beforeMessage(basestring): List messages sent before a message,
                by ID.
            max(int): Limit the maximum number of items returned from the Webex
                Teams service per request.
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            GeneratorContainer: A GeneratorContainer which, when iterated,
            yields the messages returned by the Webex Teams query.

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

        """
        check_type(arg_1, basestring, may_be_none=False)
        check_type(arg_2, basestring)
        check_type(arg_3, basestring)
        check_type(arg_4, basestring)
        check_type(arg_5, int)

        arg_7 = dict_from_items_with_values(
            arg_6,
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5,
        )

        # API request - get items
        arg_8 = arg_0._session.get_items(API_ENDPOINT, arg_7=arg_7)

        # Yield message objects created from the returned items JSON objects
        for arg_9 in arg_8:
            yield arg_0._object_factory(OBJECT_TYPE, arg_9)

Lists messages in a room.

        Each message will include content attachments if present.

        The list API sorts the messages in descending order by creation date.

        This method supports Webex Teams's implementation of RFC5988 Web
        Linking to provide pagination support.  It returns a generator
        container that incrementally yields all messages returned by the
        query.  The generator will automatically request additional 'pages' of
        responses from Webex as needed until all responses have been returned.
        The container makes the generator safe for reuse.  A new API call will
        be made, using the same parameters that were specified when the
        generator was created, every time a new iterator is requested from the
        container.

        Args:
            roomId(basestring): List messages for a room, by ID.
            mentionedPeople(basestring): List messages where the caller is
                mentioned by specifying "me" or the caller `personId`.
            before(basestring): List messages sent before a date and time, in
                ISO8601 format.
            beforeMessage(basestring): List messages sent before a message,
                by ID.
            max(int): Limit the maximum number of items returned from the Webex
                Teams service per request.
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            GeneratorContainer: A GeneratorContainer which, when iterated,
            yields the messages returned by the Webex Teams query.

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


def Func(arg_0, arg_1):
    """
    Return a Course Discovery API client setup with authentication for the specified user.
    """
    if JwtBuilder is None:
        raise NotConnectedToOpenEdX(
            _("To get a Catalog API client, this package must be "
              "installed in an Open edX environment.")
        )

    arg_2 = JwtBuilder.create_jwt_for_user(arg_0)
    return EdxRestApiClient(arg_1, arg_2=arg_2)

Return a Course Discovery API client setup with authentication for the specified user .


def Func ( arg_0 , arg_1 ) : arg_2 = DEFAULT_ENCODING arg_3 = [ pexpect . TIMEOUT , pexpect . EOF ] arg_4 = arg_3 . index ( pexpect . EOF ) arg_5 = 0 try : if hasattr ( pexpect , 'spawnb' ) : arg_6 = pexpect . spawnb ( arg_0 . sh , args = [ '-c' , arg_1 ] ) else : arg_6 = pexpect . spawn ( arg_0 . sh , args = [ '-c' , arg_1 ] ) arg_7 = sys . stdout . flush while True : arg_8 = arg_6 . expect_list ( arg_3 , arg_0 . read_timeout ) print ( arg_6 . before [ arg_5 : ] . decode ( arg_2 , 'replace' ) , end = '' ) arg_7 ( ) if arg_8 == arg_4 : break arg_5 = len ( arg_6 . before ) except KeyboardInterrupt : arg_6 . sendline ( chr ( 3 ) ) try : arg_5 = len ( arg_6 . before ) arg_6 . expect_list ( arg_3 , arg_0 . terminate_timeout ) print ( arg_6 . before [ arg_5 : ] . decode ( arg_2 , 'replace' ) , end = '' ) sys . stdout . flush ( ) except KeyboardInterrupt : pass finally : arg_6 . terminate ( force = True ) arg_6 . isalive ( ) return arg_6 . exitstatus

def Func(arg_0, arg_1):
        """Execute a command in a subshell.

        Parameters
        ----------
        cmd : str
          A command to be executed in the Func shell.

        Returns
        -------
        int : child's exitstatus
        """
        # Get likely encoding for the output.
        arg_2 = DEFAULT_ENCODING

        # Patterns to match on the output, for pexpect.  We read input and
        # allow either a short timeout or EOF
        arg_3 = [pexpect.TIMEOUT, pexpect.EOF]
        # the index of the EOF pattern in the list.
        # even though we know it's 1, this call means we don't have to worry if
        # we change the above list, and forget to change this value:
        arg_4 = arg_3.index(pexpect.EOF)
        # The size of the output stored so far in the process output buffer.
        # Since pexpect only appends to this buffer, each time we print we
        # record how far we've printed, so that next time we only print *new*
        # content from the buffer.
        arg_5 = 0
        try:
            # Since we're not really searching the buffer for text patterns, we
            # can set pexpect's search window to be tiny and it won't matter.
            # We only search for the 'patterns' timeout or EOF, which aren't in
            # the text itself.
            #child = pexpect.spawn(pcmd, searchwindowsize=1)
            if hasattr(pexpect, 'spawnb'):
                arg_6 = pexpect.spawnb(arg_0.sh, args=['-c', arg_1]) # Pexpect-U
            else:
                arg_6 = pexpect.spawn(arg_0.sh, args=['-c', arg_1])  # Vanilla Pexpect
            arg_7 = sys.stdout.flush
            while True:
                # res is the index of the pattern that caused the match, so we
                # know whether we've finished (if we matched EOF) or not
                arg_8 = arg_6.expect_list(arg_3, arg_0.read_timeout)
                print(arg_6.before[arg_5:].decode(arg_2, 'replace'), end='')
                arg_7()
                if arg_8==arg_4:
                    break
                # Update the pointer to what we've already printed
                arg_5 = len(arg_6.before)
        except KeyboardInterrupt:
            # We need to send ^C to the process.  The ascii code for '^C' is 3
            # (the character is known as ETX for 'End of Text', see
            # curses.ascii.ETX).
            arg_6.sendline(chr(3))
            # Read and print any more output the program might produce on its
            # way out.
            try:
                arg_5 = len(arg_6.before)
                arg_6.expect_list(arg_3, arg_0.terminate_timeout)
                print(arg_6.before[arg_5:].decode(arg_2, 'replace'), end='')
                sys.stdout.flush()
            except KeyboardInterrupt:
                # Impatient users tend to type it multiple times
                pass
            finally:
                # Ensure the subprocess really is terminated
                arg_6.terminate(force=True)
        # add isalive check, to ensure exitstatus is set:
        arg_6.isalive()
        return arg_6.exitstatus

Execute a command in a subshell.

        Parameters
        ----------
        cmd : str
          A command to be executed in the system shell.

        Returns
        -------
        int : child's exitstatus


(self, pattern, timeout = -1, searchwindowsize=-1)

return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)

def Func(arg_0, arg_1, arg_2 = -1, arg_3=-1):

        """This seeks through the stream until a pattern is matched. The
        pattern is overloaded and may take several types. The pattern can be a
        StringType, EOF, a compiled re, or a list of any of those types.
        Strings will be compiled to re types. This returns the index into the
        pattern list. If the pattern was not a list this returns index 0 on a
        successful match. This may raise exceptions for EOF or TIMEOUT. To
        avoid the EOF or TIMEOUT exceptions add EOF or TIMEOUT to the pattern
        list. That will cause Func to match an EOF or TIMEOUT condition
        instead of raising an exception.

        If you pass a list of patterns and more than one matches, the first match
        in the stream is chosen. If more than one pattern matches at that point,
        the leftmost in the pattern list is chosen. For example::

            # the input is 'foobar'
            index = p.Func (['bar', 'foo', 'foobar'])
            # returns 1 ('foo') even though 'foobar' is a "better" match

        Please note, however, that buffering can affect this behavior, since
        input arrives in unpredictable chunks. For example::

            # the input is 'foobar'
            index = p.Func (['foobar', 'foo'])
            # returns 0 ('foobar') if all input is available at once,
            # but returs 1 ('foo') if parts of the final 'bar' arrive late

        After a match is found the instance attributes 'before', 'after' and
        'match' will be set. You can see all the data read before the match in
        'before'. You can see the data that was matched in 'after'. The
        re.MatchObject used in the re match will be in 'match'. If an error
        occurred then 'before' will be set to all the data read so far and
        'after' and 'match' will be None.

        If timeout is -1 then timeout will be set to the self.timeout value.

        A list entry may be EOF or TIMEOUT instead of a string. This will
        catch these exceptions and return the index of the list entry instead
        of raising the exception. The attribute 'after' will be set to the
        exception type. The attribute 'match' will be None. This allows you to
        write code like this::

                index = p.Func (['good', 'bad', pFunc.EOF, pFunc.TIMEOUT])
                if index == 0:
                    do_something()
                elif index == 1:
                    do_something_else()
                elif index == 2:
                    do_some_other_thing()
                elif index == 3:
                    do_something_completely_different()

        instead of code like this::

                try:
                    index = p.Func (['good', 'bad'])
                    if index == 0:
                        do_something()
                    elif index == 1:
                        do_something_else()
                except EOF:
                    do_some_other_thing()
                except TIMEOUT:
                    do_something_completely_different()

        These two forms are equivalent. It all depends on what you want. You
        can also just Func the EOF if you are waiting for all output of a
        child to finish. For example::

                p = pFunc.spawn('/bin/ls')
                p.Func (pFunc.EOF)
                print p.before

        If you are trying to optimize for speed then see Func_list().
        """

        arg_4 = arg_0.compile_pattern_list(arg_1)
        return arg_0.Func_list(arg_4, arg_2, arg_3)

This seeks through the stream until a pattern is matched. The
        pattern is overloaded and may take several types. The pattern can be a
        StringType, EOF, a compiled re, or a list of any of those types.
        Strings will be compiled to re types. This returns the index into the
        pattern list. If the pattern was not a list this returns index 0 on a
        successful match. This may raise exceptions for EOF or TIMEOUT. To
        avoid the EOF or TIMEOUT exceptions add EOF or TIMEOUT to the pattern
        list. That will cause expect to match an EOF or TIMEOUT condition
        instead of raising an exception.

        If you pass a list of patterns and more than one matches, the first match
        in the stream is chosen. If more than one pattern matches at that point,
        the leftmost in the pattern list is chosen. For example::

            # the input is 'foobar'
            index = p.expect (['bar', 'foo', 'foobar'])
            # returns 1 ('foo') even though 'foobar' is a "better" match

        Please note, however, that buffering can affect this behavior, since
        input arrives in unpredictable chunks. For example::

            # the input is 'foobar'
            index = p.expect (['foobar', 'foo'])
            # returns 0 ('foobar') if all input is available at once,
            # but returs 1 ('foo') if parts of the final 'bar' arrive late

        After a match is found the instance attributes 'before', 'after' and
        'match' will be set. You can see all the data read before the match in
        'before'. You can see the data that was matched in 'after'. The
        re.MatchObject used in the re match will be in 'match'. If an error
        occurred then 'before' will be set to all the data read so far and
        'after' and 'match' will be None.

        If timeout is -1 then timeout will be set to the self.timeout value.

        A list entry may be EOF or TIMEOUT instead of a string. This will
        catch these exceptions and return the index of the list entry instead
        of raising the exception. The attribute 'after' will be set to the
        exception type. The attribute 'match' will be None. This allows you to
        write code like this::

                index = p.expect (['good', 'bad', pexpect.EOF, pexpect.TIMEOUT])
                if index == 0:
                    do_something()
                elif index == 1:
                    do_something_else()
                elif index == 2:
                    do_some_other_thing()
                elif index == 3:
                    do_something_completely_different()

        instead of code like this::

                try:
                    index = p.expect (['good', 'bad'])
                    if index == 0:
                        do_something()
                    elif index == 1:
                        do_something_else()
                except EOF:
                    do_some_other_thing()
                except TIMEOUT:
                    do_something_completely_different()

        These two forms are equivalent. It all depends on what you want. You
        can also just expect the EOF if you are waiting for all output of a
        child to finish. For example::

                p = pexpect.spawn('/bin/ls')
                p.expect (pexpect.EOF)
                print p.before

        If you are trying to optimize for speed then see expect_list().

This seeks through the stream until a pattern is matched . The pattern is overloaded and may take several types . The pattern can be a StringType EOF a compiled re or a list of any of those types . Strings will be compiled to re types . This returns the index into the pattern list . If the pattern was not a list this returns index 0 on a successful match . This may raise exceptions for EOF or TIMEOUT . To avoid the EOF or TIMEOUT exceptions add EOF or TIMEOUT to the pattern list . That will cause expect to match an EOF or TIMEOUT condition instead of raising an exception .


def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : super ( DerivationParameters , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_6 = BytearrayStream ( arg_1 . Func ( arg_0 . length ) ) if arg_0 . is_tag_next ( arg_3 . Tags . CRYPTOGRAPHIC_PARAMETERS , arg_6 ) : arg_0 . _cryptographic_parameters = CryptographicParameters ( ) arg_0 . _cryptographic_parameters . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . INITIALIZATION_VECTOR , arg_6 ) : arg_0 . _initialization_vector = ByteString ( tag = arg_3 . Tags . INITIALIZATION_VECTOR ) arg_0 . _initialization_vector . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . DERIVATION_DATA , arg_6 ) : arg_0 . _derivation_data = ByteString ( tag = arg_3 . Tags . DERIVATION_DATA ) arg_0 . _derivation_data . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . SALT , arg_6 ) : arg_0 . _salt = ByteString ( tag = arg_3 . Tags . SALT ) arg_0 . _salt . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( Tags . ITERATION_COUNT , arg_6 ) : arg_0 . _iteration_count = Integer ( tag = Tags . ITERATION_COUNT ) arg_0 . _iteration_count . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . is_oversized ( arg_6 )

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

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

        if arg_0.is_tag_next(
                arg_3.Tags.CRYPTOGRAPHIC_PARAMETERS,
                arg_6
        ):
            arg_0._cryptographic_parameters = CryptographicParameters()
            arg_0._cryptographic_parameters.Func(
                arg_6,
                arg_2=arg_2
            )

        if arg_0.is_tag_next(arg_3.Tags.INITIALIZATION_VECTOR, arg_6):
            arg_0._initialization_vector = ByteString(
                tag=arg_3.Tags.INITIALIZATION_VECTOR
            )
            arg_0._initialization_vector.Func(
                arg_6,
                arg_2=arg_2
            )

        if arg_0.is_tag_next(arg_3.Tags.DERIVATION_DATA, arg_6):
            arg_0._derivation_data = ByteString(tag=arg_3.Tags.DERIVATION_DATA)
            arg_0._derivation_data.Func(arg_6, arg_2=arg_2)

        if arg_0.is_tag_next(arg_3.Tags.SALT, arg_6):
            arg_0._salt = ByteString(tag=arg_3.Tags.SALT)
            arg_0._salt.Func(arg_6, arg_2=arg_2)

        if arg_0.is_tag_next(Tags.ITERATION_COUNT, arg_6):
            arg_0._iteration_count = Integer(tag=Tags.ITERATION_COUNT)
            arg_0._iteration_count.Func(arg_6, arg_2=arg_2)

        arg_0.is_oversized(arg_6)

Read the data encoding the DerivationParameters struct and decode it
        into its constituent parts.

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

Read the data encoding the DerivationParameters struct and decode it into its constituent parts .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_conn ( ) arg_3 = ( arg_2 . projects ( ) . Func ( projectId = arg_0 . project_id , arg_1 = arg_1 ) . execute ( num_retries = arg_0 . num_retries ) ) return arg_3

def Func(arg_0, arg_1):
        """
        Commit a transaction, optionally creating, deleting or modifying some entities.

        .. seealso::
            https://cloud.google.com/datastore/docs/reference/rest/v1/projects/Func

        :param body: the body of the Func request.
        :type body: dict
        :return: the response body of the Func request.
        :rtype: dict
        """
        arg_2 = arg_0.get_conn()

        arg_3 = (arg_2
                .projects()
                .Func(projectId=arg_0.project_id, arg_1=arg_1)
                .execute(num_retries=arg_0.num_retries))

        return arg_3

Commit a transaction, optionally creating, deleting or modifying some entities.

        .. seealso::
            https://cloud.google.com/datastore/docs/reference/rest/v1/projects/commit

        :param body: the body of the commit request.
        :type body: dict
        :return: the response body of the commit request.
        :rtype: dict

Commit a transaction optionally creating deleting or modifying some entities .


def Func ( arg_0 , arg_1 ) : arg_1 . lexer . is_tabbed = False arg_0 . _iniFunc ( arg_1 ) arg_1 . lexer . begin ( 'heredoc' )

def Func(arg_0, arg_1):
        r'<<\S+\r?\n'
        arg_1.lexer.is_tabbed = False
        arg_0._iniFunc(arg_1)
        arg_1.lexer.begin('heredoc')


(mash_output, hash_cutoff, sample_id, assembly_file)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
open
(
arg_0
,
"r"
)
arg_5
=
{
}
for
arg_6
in
arg_4
:
arg_7
=
arg_6
.
split
(
"\t"
)
arg_8
=
arg_7
[
1
]
.
strip
(
)
arg_9
=
"_"
.
join
(
arg_7
[
0
]
.
strip
(
)
.
split
(
"_"
)
[
0
:
3
]
)
arg_10
=
arg_7
[
2
]
.
strip
(
)
arg_11
=
arg_7
[
1
]
.
strip
(
)
.
split
(
"/"
)
arg_12
=
float
(
arg_11
[
0
]
)
/
float
(
arg_11
[
1
]
)
if
arg_9
in
arg_5
.
keys
(
)
:
arg_8
+=
", {}"
.
format
(
arg_5
[
arg_9
]
[
1
]
)
if
arg_12
>
float
(
arg_1
)
:
arg_5
[
arg_9
]
=
[
round
(
1
float
(
arg_10
)
,
2
)
,
round
(
arg_12
,
2
)
,
arg_8
]
send_to_output
(
arg_5
,
arg_0
,
arg_2
,
arg_3
)

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Main function that allows to dump a mash dist txt file to a json file

    Parameters
    ----------
    mash_output: str
        A string with the input file.
    hash_cutoff: str
        the percentage cutoff for the percentage of shared hashes between query
        and plasmid in database that is allowed for the plasmid to be reported
        to the results outputs
    sample_id: str
        The name of the sample.
    """

    arg_4 = open(arg_0, "r")

    arg_5 = {}

    for arg_6 in arg_4:

        arg_7 = arg_6.split("\t")
        arg_8 = arg_7[1].strip()
        arg_9 = "_".join(arg_7[0].strip().split("_")[0:3])
        arg_10 = arg_7[2].strip()
        arg_11 = arg_7[-1].strip().split("/")

        # creates a percentage of the shared hashes between the sample and the
        # reference
        arg_12 = float(arg_11[0]) / float(arg_11[1])

        # if ref_accession already in dict, i.e., if the same accession number
        # matches more than one contig.
        if arg_9 in arg_5.keys():
            arg_8 += ", {}".format(arg_5[arg_9][-1])

        # assures that only the hashes with a given shared percentage are
        # reported to json file
        if arg_12 > float(arg_1):

            arg_5[arg_9] = [
                round(1 - float(arg_10), 2),
                round(arg_12, 2),
                arg_8
            ]

    # assures that file is closed in last iteration of the loop
    send_to_output(arg_5, arg_0, arg_2, arg_3)


def Func(arg_0, arg_1, arg_2=False):
        """ Appends HTML at the end of the console buffer.
        """
        arg_0._append_custom(arg_0._insert_html, arg_1, arg_2)

Appends HTML at the end of the console buffer .


return self._perform_get(
            '/' + self.subscription_id + '/operations/' + _str(request_id),
            Operation)

def Func ( arg_0 , arg_1 ) : _validate_not_none ( 'request_id' , arg_1 ) return arg_0 . _perform_get ( '/' + arg_0 . subscription_id + '/operations/' + _str ( arg_1 ) , Operation )

def Func(arg_0, arg_1):
        '''
        Returns the status of the specified operation. After calling an
        asynchronous operation, you can call Get Operation Status to determine
        whether the operation has succeeded, failed, or is still in progress.

        request_id:
            The request ID for the request you wish to track.
        '''
        _validate_not_none('request_id', arg_1)
        return arg_0._perform_get(
            '/' + arg_0.subscription_id + '/operations/' + _str(arg_1),
            Operation)

Returns the status of the specified operation . After calling an asynchronous operation you can call Get Operation Status to determine whether the operation has succeeded failed or is still in progress .


def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : arg_4 = super ( Users , arg_0 ) . Func ( arg_1 , * arg_2 , ** arg_3 ) arg_5 = arg_4 . pop ( 'fields' ) arg_5 . setdefault ( 'name' , arg_1 . get_full_name ( ) ) arg_6 = arg_4 [ 'fields' ] = { 'username' : arg_1 . get_username ( ) , 'emails' : [ ] , 'profile' : arg_5 , 'permissions' : sorted ( arg_0 . model . get_all_permissions ( arg_1 ) ) , } for arg_7 in [ 'password' , 'user_permissions_ids' , 'is_active' , 'is_staff' , 'is_superuser' , 'groups_ids' , ] : arg_5 . pop ( arg_7 , None ) try : arg_6 [ 'createdAt' ] = arg_5 . pop ( 'date_joined' ) except KeyError : arg_8 = getattr ( arg_1 , 'get_date_joined' , lambda : getattr ( arg_1 , 'date_joined' , None ) ) ( ) if arg_8 : arg_6 [ 'createdAt' ] = arg_8 try : arg_9 = arg_5 . pop ( 'email' ) except KeyError : arg_9 = getattr ( arg_1 , 'get_email' , lambda : getattr ( arg_1 , 'email' , None ) ) ( ) if arg_9 : arg_6 [ 'emails' ] . append ( { 'address' : arg_9 , 'verified' : True } ) return arg_4

def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Serialize user as per Meteor accounts serialization."""
        # use default serialization, then modify to suit our needs.
        arg_4 = super(Users, arg_0).Func(arg_1, *arg_2, **arg_3)

        # everything that isn't handled explicitly ends up in `profile`
        arg_5 = arg_4.pop('fields')
        arg_5.setdefault('name', arg_1.get_full_name())
        arg_6 = arg_4['fields'] = {
            'username': arg_1.get_username(),
            'emails': [],
            'profile': arg_5,
            'permissions': sorted(arg_0.model.get_all_permissions(arg_1)),
        }

        # clear out sensitive data
        for arg_7 in [
                'password',
                'user_permissions_ids',
                'is_active',
                'is_staff',
                'is_superuser',
                'groups_ids',
        ]:
            arg_5.pop(arg_7, None)

        # createdAt (default is django.contrib.auth.models.User.date_joined)
        try:
            arg_6['createdAt'] = arg_5.pop('date_joined')
        except KeyError:
            arg_8 = getattr(
                arg_1, 'get_date_joined',
                lambda: getattr(arg_1, 'date_joined', None)
            )()
            if arg_8:
                arg_6['createdAt'] = arg_8

        # email (default is django.contrib.auth.models.User.email)
        try:
            arg_9 = arg_5.pop('email')
        except KeyError:
            arg_9 = getattr(
                arg_1, 'get_email',
                lambda: getattr(arg_1, 'email', None)
            )()
        if arg_9:
            arg_6['emails'].append({'address': arg_9, 'verified': True})

        return arg_4

Serialize user as per Meteor accounts serialization .


def Func(arg_0, arg_1, arg_2=None):
        """Call a Func on the server.

        If the user has not authenticated then authentication will be done
        as part of calling the Func on the server.

        For Funcs that don't return a status message the status message
        will default to an empty string.

        Args:
            verb: The verb of the Func to call.
            args: The arguments of the Func as a string (default None).

        Returns:
            A tuple of status code (as an integer) and status message.

        Note:
            You can run raw Funcs by supplying the full Func (including
            args) in the verb.

        Note: Although it is possible you shouldn't issue more than one Func
            at a time by adding newlines to the verb as it will most likely lead
            to undesirable results.
        """
        if arg_0.__generating:
            raise NNTPSyncError("Command issued while a generator is active")

        arg_3 = arg_1
        if arg_2:
            arg_3 += " " + arg_2
        arg_3 += "\r\n"

        arg_0.socket.sendall(arg_3)

        try:
            arg_4, arg_5 = arg_0.status()
        except NNTPTemporaryError as e:
            if e.code() != 480:
                raise e
            arg_4, arg_5 = arg_0.Func("AUTHINFO USER", arg_0.username)
            if arg_4 == 381:
                arg_4, arg_5 = arg_0.Func("AUTHINFO PASS", arg_0.password)
            if arg_4 != 281:
                raise NNTPReplyError(arg_4, arg_5)
            arg_4, arg_5 = arg_0.Func(arg_1, arg_2)

        return arg_4, arg_5

Call a command on the server.

        If the user has not authenticated then authentication will be done
        as part of calling the command on the server.

        For commands that don't return a status message the status message
        will default to an empty string.

        Args:
            verb: The verb of the command to call.
            args: The arguments of the command as a string (default None).

        Returns:
            A tuple of status code (as an integer) and status message.

        Note:
            You can run raw commands by supplying the full command (including
            args) in the verb.

        Note: Although it is possible you shouldn't issue more than one command
            at a time by adding newlines to the verb as it will most likely lead
            to undesirable results.


def
Func
(
arg_0
,
arg_1
)
:
logger
.
debug
(
'Installing '
+
arg_1
)
shell
.
run
(
arg_0
.
pip_path
,
'Func'
,
arg_1
)

def Func(arg_0, arg_1):
        '''Install a python package using pip'''

        logger.debug('Installing ' + arg_1)
        shell.run(arg_0.pip_path, 'Func',  arg_1)


(self, segment, presynapticCell, permanence)

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Creates a new synapse on a segment.

    :param segment: (:class:`Segment`) Segment object for synapse to be synapsed
           to.
    :param presynapticCell: (int) Source cell index.
    :param permanence: (float) Initial permanence of synapse.
    :returns: (:class:`Synapse`) created synapse
    """
    arg_4 = len(arg_1._synapses)
    arg_5 = Synapse(arg_1, arg_2, arg_3,
                      arg_0._nextSynapseOrdinal)
    arg_0._nextSynapseOrdinal += 1
    arg_1._synapses.add(arg_5)

    arg_0._synapsesForPresynapticCell[arg_2].add(arg_5)

    arg_0._numSynapses += 1

    return arg_5


def Func(arg_0, arg_1):
    """Validate response from YOURLS server."""
    try:
        arg_0.raise_for_status()
    except HTTPError as http_exc:
        # Collect full HTTPError information so we can reraise later if required.
        arg_2 = sys.exc_info()

        # We will reraise outside of try..except block to prevent exception
        # chaining showing wrong traceback when we try and parse JSON response.
        arg_3 = False

        try:
            arg_4 = arg_0.json()
        except ValueError:
            arg_3 = True
        else:
            logger.debug('Received error {response} with JSON {json}',
                         arg_0=arg_0, json=arg_4)
            _handle_api_error_with_json(http_exc, arg_4, arg_0)

        if arg_3:
            six.reraise(*arg_2)
    else:
        # We have a valid HTTP response, but we need to check what the API says
        # about the request.
        arg_4 = arg_0.json()

        logger.debug('Received {response} with JSON {json}', arg_0=arg_0,
                     json=arg_4)

        if {'status', 'code', 'message'} <= set(arg_4.keys()):
            arg_5 = arg_4['status']
            arg_6 = arg_4['code']
            arg_7 = arg_4['message']

            if arg_5 == 'fail':
                if arg_6 == 'error:keyword':
                    raise YOURLSKeywordExistsError(arg_7, keyword=arg_1['keyword'])
                elif arg_6 == 'error:url':
                    arg_8 = _json_to_shortened_url(arg_4['url'], arg_4['shorturl'])
                    raise YOURLSURLExistsError(arg_7, arg_8=arg_8)
                else:
                    raise YOURLSAPIError(arg_7)
            else:
                return arg_4
        else:
            # Without status, nothing special needs to be handled.
            return arg_4


Checks if the string value contains another string.

def
Func
(
arg_0
)
:
def
Func_str
(
arg_1
)
:
validate
(
text
,
arg_1
)
if
arg_0
not
in
arg_1
:
raise
ValueError
(
"'{0}' does not contain '{1}'"
.
format
(
arg_1
,
arg_0
)
)
return
True
return
Func_str

def Func(arg_0):
    """Checks if the string value Func another string."""
    def Func_str(arg_1):
        validate(text, arg_1)
        if arg_0 not in arg_1:
            raise ValueError("'{0}' does not contain '{1}'".format(arg_1, arg_0))
        return True

    return Func_str

Checks if the string value contains another string .


def
Func
(
)
:
def
after_delete
(
arg_0
)
:
click
.
echo
(
"Deleted table %s"
%
arg_0
)
arg_1
=
get_app
(
)
upgrade_from_old_version
(
arg_1
)
arg_1
.
delete_orphan_snapshots
(
after_delete
)

def Func():
    """Deletes old stellar tables that are not used anymore"""
    def after_delete(arg_0):
        click.echo("Deleted table %s" % arg_0)

    arg_1 = get_app()
    upgrade_from_old_version(arg_1)
    arg_1.delete_orphan_snapshots(after_delete)


def Func(arg_0):
    """Fluent interface decorator to return self if method return None."""
    @wraps(arg_0)
    def Func_interface(arg_1, *arg_2, **arg_3):
        arg_4 = arg_0(arg_1, *arg_2, **arg_3)
        if arg_4 is not None:
            return arg_4
        return arg_1
    return Func_interface

Fluent interface decorator to return self if method return None .


def Func(arg_0, arg_1, arg_2):
        """
        Called for each file
        Must return file content
        Can be wrapped

        :type f: static_bundle.files.StaticFileResult
        :type text: str|unicode
        :rtype: str|unicode
        """
        arg_2 += arg_0._read(arg_1.abs_path) + "\r\n"
        return arg_2


def Func ( arg_0 ) : arg_0 . tasks . Func ( ) for arg_1 in arg_0 . workers : arg_0 . tasks . put ( None ) for arg_1 in arg_0 . workers : arg_1 . Func ( ) arg_1 . s3 = None

def Func(arg_0):
    '''Utility function to wait all tasks to complete'''
    arg_0.tasks.Func()

    # Force each thread to break loop.
    for arg_1 in arg_0.workers:
      arg_0.tasks.put(None)

    # Wait for all thread to terminate.
    for arg_1 in arg_0.workers:
      arg_1.Func()
      arg_1.s3 = None


def Func(arg_0, arg_1):
    """Call CLI command with arguments and returns its return value.

    Parameters
    ----------
    cmd_name: str
        Command name or full path to the binary file.

    arg_strings: str
        Argument strings list.

    Returns
    -------
    return_value
        Command return value.
    """
    if not os.path.isabs(arg_0):
        arg_2 = which(arg_0)
    else:
        arg_2 = arg_0

    try:
        arg_3 = [arg_2] + arg_1
        log.debug('Calling: `{}`.'.format(' '.join(arg_3)))
        # retval = subprocess.check_call(cmd_line)
        arg_4 = subprocess.call(' '.join(arg_3), shell=True)
    except CalledProcessError as ce:
        log.exception(
            "Error calling command with arguments: "
            "{} \n With return code: {}".format(arg_3, ce.returncode)
        )
        raise
    else:
        return arg_4

Call CLI command with arguments and returns its return value .


def Func ( arg_0 , arg_1 ) : arg_2 = set ( ) for arg_3 , arg_4 in arg_1 . items : if isinstance ( arg_3 , astroid . Const ) : arg_5 = arg_3 . value if arg_5 in arg_2 : arg_0 . add_message ( "duplicate-key" , arg_1 = arg_1 , args = arg_5 ) arg_2 . add ( arg_5 )

def Func(arg_0, arg_1):
        """check duplicate key in dictionary"""
        arg_2 = set()
        for arg_3, arg_4 in arg_1.items:
            if isinstance(arg_3, astroid.Const):
                arg_5 = arg_3.value
                if arg_5 in arg_2:
                    arg_0.add_message("duplicate-key", arg_1=arg_1, args=arg_5)
                arg_2.add(arg_5)


def Func(arg_0, arg_1, arg_2):
        """
        Cast value or signal of this type to another type of same size.

        :param sigOrVal: instance of signal or value to cast
        :param toType: instance of HdlType to cast into
        """
        try:
            return arg_0.auto_cast(arg_1, arg_2)
        except TypeConversionErr:
            pass

        try:
            arg_3 = arg_0._Func_fn
        except AttributeError:
            arg_3 = arg_0.get_Func_fn()
            arg_0._Func_fn = arg_3

        return arg_3(arg_0, arg_1, arg_2)

Cast value or signal of this type to another type of same size .


def Func(arg_0):
        """
        Retrieves the traffic for the repositories of the given organization.
        """
        print 'Getting traffic.'
        #Uses the developer API. Note this could change.
        arg_1 = {'Accept': 'application/vnd.github.spiderman-preview', 'Authorization': 'token ' + arg_0.token}
        arg_2 = {'Authorization': 'token ' + arg_0.token}
        for arg_3 in arg_0.org_retrieved.iter_repos(type='public'):
            arg_4 = ('https://api.github.com/repos/' + arg_0.organization_name
                + '/' + arg_3.name)
            arg_0.get_referrers(arg_4=arg_4, arg_1=arg_1, repo_name=arg_3.name)
            arg_0.get_paths(arg_4=arg_4, arg_1=arg_1)
            arg_0.get_data(arg_4=arg_4, arg_1=arg_1, dict_to_store=arg_0.views,
                type='views', repo_name=arg_3.name)
            arg_0.get_data(arg_4=arg_4, arg_1=arg_1, dict_to_store=arg_0.clones,
                type='clones', repo_name=arg_3.name)
            arg_0.get_releases(arg_4=arg_4, arg_1=arg_2, repo_name=arg_3.name)

Retrieves the traffic for the repositories of the given organization .


return Address.from_trits(
            trits=address_trits,

            key_index=digest.key_index,
            security_level=digest.security_level,
        )

def Func ( arg_0 ) : arg_1 = [ 0 ] * ( Address . LEN * TRITS_PER_TRYTE ) arg_2 = Kerl ( ) arg_2 . absorb ( arg_0 . as_trits ( ) ) arg_2 . squeeze ( arg_1 ) return Address . from_trits ( trits = arg_1 , key_index = arg_0 . key_index , security_level = arg_0 . security_level , )

def Func(arg_0):
        # type: (Digest) -> Address
        """
        Generates an address from a private key digest.
        """
        arg_1 = [0] * (Address.LEN * TRITS_PER_TRYTE)  # type: List[int]

        arg_2 = Kerl()
        arg_2.absorb(arg_0.as_trits())
        arg_2.squeeze(arg_1)

        return Address.from_trits(
            trits=arg_1,

            key_index=arg_0.key_index,
            security_level=arg_0.security_level,
        )

Generates an address from a private key digest .


def Func ( arg_0 ) : arg_1 = { 'warning' : { 'fg' : 'yellow' } , 'error' : { 'fg' : 'red' } , } for arg_2 in arg_0 . get ( 'messages' , [ ] ) : click . secho ( arg_2 [ 'text' ] , ** arg_1 . get ( arg_2 [ 'type' ] , { } ) )

def Func(arg_0):
    """
    Show all messages in the `messages` key of the given dict.
    """
    arg_1 = {
        'warning': {'fg': 'yellow'},
        'error': {'fg': 'red'},
    }
    for arg_2 in arg_0.get('messages', []):
        click.secho(arg_2['text'], **arg_1.get(arg_2['type'], {}))

Show all messages in the messages key of the given dict .


Decorator for RestServer methods that take multiple addresses

def
Func
(
arg_0
)
:
@
functools
.
wraps
(
arg_0
)
def
Func
(
arg_1
,
arg_2
=
''
)
:
arg_3
=
flask
.
request
.
values
arg_2
=
urllib
.
parse
.
unquote_plus
(
arg_2
)
if
arg_2
and
arg_3
and
not
arg_2
.
endswith
(
'.'
)
:
arg_2
+=
'.'
arg_4
=
{
}
for
arg_5
in
arg_3
or
''
:
try
:
if
not
arg_1
.
project
:
raise
ValueError
(
'No Project is currently loaded'
)
arg_6
=
editor
.
Editor
(
arg_2
+
arg_5
,
arg_1
.
project
)
arg_4
[
arg_2
+
arg_5
]
=
{
'value'
:
arg_0
(
arg_1
,
arg_6
,
arg_5
)
}
except
:
if
arg_1
.
project
:
traceback
.
print_exc
(
)
arg_4
[
arg_2
+
arg_5
]
=
{
'error'
:
'Could not Func addr %s'
%
arg_5
}
return
flask
.
jsonify
(
arg_4
)
return
Func

def Func(arg_0):
    """Decorator for RestServer methods that take Funcple addresses"""
    @functools.wraps(arg_0)
    def Func(arg_1, arg_2=''):
        arg_3 = flask.request.values
        arg_2 = urllib.parse.unquote_plus(arg_2)
        if arg_2 and arg_3 and not arg_2.endswith('.'):
            arg_2 += '.'

        arg_4 = {}
        for arg_5 in arg_3 or '':
            try:
                if not arg_1.project:
                    raise ValueError('No Project is currently loaded')

                arg_6 = editor.Editor(arg_2 + arg_5, arg_1.project)
                arg_4[arg_2 + arg_5] = {'value': arg_0(arg_1, arg_6, arg_5)}
            except:
                if arg_1.project:
                    traceback.print_exc()
                arg_4[arg_2 + arg_5] = {'error': 'Could not Func addr %s' % arg_5}

        return flask.jsonify(arg_4)

    return Func


def Func(arg_0, arg_1=None):
    """
    From the list of absolute paths to nifti files, creates a Numpy array
    with the data.

    Parameters
    ----------
    img_filelist:  list of str
        List of absolute file paths to nifti files. All nifti files must have
        the same shape.

    outdtype: dtype
        Type of the elements of the array, if not set will obtain the dtype from
        the first nifti file.

    Returns
    -------
    outmat: Numpy array with shape N x prod(vol.shape)
            containing the N files as flat vectors.

    vol_shape: Tuple with shape of the volumes, for reshaping.

    """
    try:
        arg_2 = arg_0[0]
        arg_3       = get_img_data(arg_2)
    except IndexError as ie:
        raise Exception('Error getting the first item of img_filelis: {}'.format(repr_imgs(arg_0[0]))) from ie

    if not arg_1:
        arg_1 = arg_3.dtype

    arg_4 = np.zeros((len(arg_0), np.prod(arg_3.shape)), dtype=arg_1)

    try:
        for arg_5, arg_6 in enumerate(arg_0):
            arg_3 = get_img_data(arg_6)
            arg_4[arg_5, :] = arg_3.flatten()
    except Exception as exc:
        raise Exception('Error on reading file {0}.'.format(arg_6)) from exc

    return arg_4, arg_3.shape

From the list of absolute paths to nifti files creates a Numpy array with the data .


def Func(arg_0):
    """
    Retrieve the time value of an ASN1 time object.

    @param timestamp: An ASN1_GENERALIZEDTIME* (or an object safely castable to
        that type) from which the time value will be retrieved.

    @return: The time value from C{timestamp} as a L{bytes} string in a certain
        format.  Or C{None} if the object contains no time value.
    """
    arg_1 = _ffi.cast('ASN1_STRING*', arg_0)
    if _lib.ASN1_STRING_length(arg_1) == 0:
        return None
    elif (
        _lib.ASN1_STRING_type(arg_1) == _lib.V_ASN1_GENERALIZEDTIME
    ):
        return _ffi.string(_lib.ASN1_STRING_data(arg_1))
    else:
        arg_2 = _ffi.new("ASN1_GENERALIZEDTIME**")
        _lib.ASN1_TIME_to_generalizedtime(arg_0, arg_2)
        if arg_2[0] == _ffi.NULL:
            # This may happen:
            #   - if timestamp was not an ASN1_TIME
            #   - if allocating memory for the ASN1_GENERALIZEDTIME failed
            #   - if a copy of the time data from timestamp cannot be made for
            #     the newly allocated ASN1_GENERALIZEDTIME
            #
            # These are difficult to test.  cffi enforces the ASN1_TIME type.
            # Memory allocation failures are a pain to trigger
            # deterministically.
            _untested_error("ASN1_TIME_to_generalizedtime")
        else:
            arg_1 = _ffi.cast(
                "ASN1_STRING*", arg_2[0])
            arg_3 = _lib.ASN1_STRING_data(arg_1)
            arg_4 = _ffi.string(arg_3)
            _lib.ASN1_GENERALIZEDTIME_free(arg_2[0])
            return arg_4

Retrieve the time value of an ASN1 time object .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = XdotAttrParser ( ) arg_4 = arg_3 . parse_xdot_data ( arg_2 ) arg_5 = min ( [ arg_7 . x for arg_7 in arg_4 ] ) arg_6 = min ( [ arg_7 . y for arg_7 in arg_4 ] ) print "X1/Y1:" , arg_1 , arg_5 , arg_6 for arg_7 in arg_4 : if isinstance ( arg_7 , Ellipse ) : component . x_origin -= arg_5 component . y_origin -= arg_6 elif isinstance ( arg_7 , ( Polygon , BSpline ) ) : print "Points:" , arg_7 . points arg_7 . points = [ ( t [ 0 ] - arg_5 , t [ 1 ] - arg_6 ) for t in arg_7 . points ] print "Points:" , arg_7 . points elif isinstance ( arg_7 , Text ) : arg_7 . text_x , arg_7 . text_y = arg_7 . x - arg_5 , arg_7 . y - arg_6 arg_11 = Container ( auto_size = True , position = [ arg_5 , arg_6 ] , bgcolor = "yellow" ) arg_11 . add ( * arg_4 ) if arg_1 == "_draw_" : arg_0 . drawing = arg_11 elif arg_1 == "_hdraw_" : arg_0 . arrowhead_drawing = arg_11 else : raise

def Func(arg_0, arg_1, arg_2):
        """ Handles parsing Xdot drawing directives.
        """
        arg_3 = XdotAttrParser()
        arg_4 = arg_3.parse_xdot_data(arg_2)

        # The absolute coordinate of the drawing container wrt graph origin.
        arg_5 = min( [arg_7.x for arg_7 in arg_4] )
        arg_6 = min( [arg_7.y for arg_7 in arg_4] )

        print "X1/Y1:", arg_1, arg_5, arg_6

        # Components are positioned relative to their container. This
        # function positions the bottom-left corner of the components at
        # their origin rather than relative to the graph.
#        move_to_origin( components )

        for arg_7 in arg_4:
            if isinstance(arg_7, Ellipse):
                component.x_origin -= arg_5
                component.y_origin -= arg_6
#                c.position = [ c.x - x1, c.y - y1 ]

            elif isinstance(arg_7, (Polygon, BSpline)):
                print "Points:", arg_7.points
                arg_7.points = [ (t[0] - arg_5, t[1] - arg_6) for t in arg_7.points ]
                print "Points:", arg_7.points

            elif isinstance(arg_7, Text):
#                font = str_to_font( str(c.pen.font) )
                arg_7.text_x, arg_7.text_y = arg_7.x - arg_5, arg_7.y - arg_6

        arg_11 = Container(auto_size=True,
            position=[ arg_5, arg_6 ],
            bgcolor="yellow")

        arg_11.add( *arg_4 )

        if arg_1 == "_draw_":
            arg_0.drawing = arg_11
        elif arg_1 == "_hdraw_":
            arg_0.arrowhead_drawing = arg_11
        else:
            raise

Handles parsing Xdot drawing directives .


def Func ( arg_0 , arg_1 , arg_2 ) : for arg_3 in arg_1 : if arg_3 not in arg_0 : raise ValueError ( arg_2 ) return True

def Func(arg_0, arg_1, arg_2):
    """
    Checks if all elements from set2 are in set1.

    :param set1:  a set of values
    :param set2:  a set of values
    :param warn: the error message that should be thrown
     when the sets are not containd
    :return: returns true if all values of set2 are in set1
    """
    for arg_3 in arg_1:
        if arg_3 not in arg_0:
            raise ValueError(arg_2)
    return True

Checks if all elements from set2 are in set1 .


def Func ( arg_0 , arg_1 ) : arg_2 = { } if arg_1 : arg_2 [ 'user_agent' ] = arg_1 arg_3 = capture ( arg_0 , ** arg_2 ) Funcck . echo ( arg_3 )

def Func(arg_0, arg_1):
    """
    Archives the provided URL using archive.is.
    """
    arg_2 = {}
    if arg_1:
        arg_2['user_agent'] = arg_1
    arg_3 = capture(arg_0, **arg_2)
    Funcck.echo(arg_3)

Archives the provided URL using archive . is .


def
Func
(
arg_0
=
"./data/news20/"
)
:
arg_1
=
download_news20
(
arg_0
)
arg_2
=
[
]
arg_3
=
0
for
arg_4
in
sorted
(
os
.
listdir
(
arg_1
)
)
:
arg_5
=
os
.
path
.
join
(
arg_1
,
arg_4
)
arg_3
+=
1
if
os
.
path
.
isdir
(
arg_5
)
:
for
arg_6
in
sorted
(
os
.
listdir
(
arg_5
)
)
:
if
arg_6
.
isdigit
(
)
:
arg_7
=
os
.
path
.
join
(
arg_5
,
arg_6
)
if
sys
.
version_info
<
(
3
,
)
:
arg_8
=
open
(
arg_7
)
else
:
arg_8
=
open
(
arg_7
,
encoding
=
'latin-1'
)
arg_9
=
arg_8
.
read
(
)
arg_2
.
append
(
(
arg_9
,
arg_3
)
)
arg_8
.
close
(
)
print
(
'Found %s texts.'
%
len
(
arg_2
)
)
return
arg_2

def Func(arg_0="./data/news20/"):
    """
    Parse or download news20 if source_dir is empty.

    :param source_dir: The directory storing news data.
    :return: A list of (tokens, label)
    """
    arg_1 = download_news20(arg_0)
    arg_2 = []  # list of text samples
    arg_3 = 0
    for arg_4 in sorted(os.listdir(arg_1)):
        arg_5 = os.path.join(arg_1, arg_4)
        arg_3 += 1
        if os.path.isdir(arg_5):
            for arg_6 in sorted(os.listdir(arg_5)):
                if arg_6.isdigit():
                    arg_7 = os.path.join(arg_5, arg_6)
                    if sys.version_info < (3,):
                        arg_8 = open(arg_7)
                    else:
                        arg_8 = open(arg_7, encoding='latin-1')
                    arg_9 = arg_8.read()
                    arg_2.append((arg_9, arg_3))
                    arg_8.close()

    print('Found %s texts.' % len(arg_2))
    return arg_2

Parse or download news20 if source_dir is empty .


return self.delete_admin(self._sis_id(sis_account_id), user_id, role)

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Remove an account admin role from a user for the account sis id.
        """
        return arg_0.delete_admin(arg_0._sis_id(arg_1), arg_2, arg_3)

Remove an account admin role from a user for the account sis id .


def Func ( arg_0 ) : def func_decorator ( arg_1 ) : @ functools . wraps ( arg_1 ) def wrapper ( * arg_2 , ** arg_3 ) : arg_4 = arg_5 . getenv ( arg_7 . constants . TEMPLE_ENV_VAR ) arg_5 . environ [ arg_7 . constants . TEMPLE_ENV_VAR ] = arg_0 try : arg_10 = arg_1 ( * arg_2 , ** arg_3 ) finally : if arg_4 is None : del arg_5 . environ [ arg_7 . constants . TEMPLE_ENV_VAR ] else : arg_5 . environ [ arg_7 . constants . TEMPLE_ENV_VAR ] = arg_4 return arg_10 return wrapper return func_decorator

def Func(arg_0):
    """Decorator that sets the temple command env var to value"""
    def func_decorator(arg_1):
        @functools.wraps(arg_1)
        def wrapper(*arg_2, **arg_3):
            arg_4 = arg_5.getenv(arg_7.constants.TEMPLE_ENV_VAR)
            arg_5.environ[arg_7.constants.TEMPLE_ENV_VAR] = arg_0
            try:
                arg_10 = arg_1(*arg_2, **arg_3)
            finally:
                if arg_4 is None:
                    del arg_5.environ[arg_7.constants.TEMPLE_ENV_VAR]
                else:
                    arg_5.environ[arg_7.constants.TEMPLE_ENV_VAR] = arg_4

            return arg_10
        return wrapper
    return func_decorator


def Func(arg_0, arg_1, arg_2=None):
        """Compute the header.
        """
        arg_1 = iter2array(arg_1, dtype=(MoleculeContainer, CGRContainer))

        if arg_0.__head_less:
            warn(f'{self.__class__.__name__} configured to head less mode. Func unusable')
            return arg_0

        arg_0._reset()
        arg_0.__prepare(arg_1)
        return arg_0


(problem, fitness_fn, ngen=1000, pmut=0.1, n=20)

return genetic_algorithm(states[:n], problem.value, ngen, pmut)

def Func ( arg_0 , arg_1 , arg_2 = 1000 , arg_3 = 0.1 , arg_4 = 20 ) : arg_5 = arg_0 . initial_state arg_6 = [ arg_0 . result ( arg_5 , a ) for a in arg_0 . actions ( arg_5 ) ] random . shuffle ( arg_6 ) return genetic_algorithm ( arg_6 [ : arg_4 ] , arg_0 . value , arg_2 , arg_3 )

def Func(arg_0, arg_1, arg_2=1000, arg_3=0.1, arg_4=20):
    """Call genetic_algorithm on the appropriate parts of a problem.
    This requires the problem to have states that can mate and mutate,
    plus a value method that scores states."""
    arg_5 = arg_0.initial_state
    arg_6 = [arg_0.result(arg_5, a) for a in arg_0.actions(arg_5)]
    random.shuffle(arg_6)
    return genetic_algorithm(arg_6[:arg_4], arg_0.value, arg_2, arg_3)

Call genetic_algorithm on the appropriate parts of a problem . This requires the problem to have states that can mate and mutate plus a value method that scores states .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 [ 'parent_header' ] [ 'msg_id' ] arg_3 = arg_0 . _request_info [ 'execute' ] . pop ( arg_2 , None ) if arg_3 and arg_3 . kind == 'save_magic' and not arg_0 . _hidden : arg_4 = arg_1 [ 'content' ] arg_5 = arg_4 [ 'status' ] if arg_5 == 'ok' : arg_0 . _max_session_history = ( int ( arg_4 [ 'user_expressions' ] [ 'hlen' ] ) )

def Func(arg_0, arg_1):
        """ Handles replies for code execution, here only session history length
        """
        arg_2 = arg_1['parent_header']['msg_id']
        arg_3 = arg_0._request_info['execute'].pop(arg_2,None)
        if arg_3 and arg_3.kind == 'save_magic' and not arg_0._hidden:
            arg_4 = arg_1['content']
            arg_5 = arg_4['status']
            if arg_5 == 'ok':
                arg_0._max_session_history=(int(arg_4['user_expressions']['hlen']))

Handles replies for code execution here only session history length


def Func(arg_0, arg_1=None):
        """
        Wait for response until timeout.
        If timeout is specified to None, ``self.timeout`` is used.

        :param float timeout: seconds to Func I/O
        """
        if arg_1 is None:
            arg_1 = arg_0._timeout
        while arg_0._process.check_readable(arg_1):
            arg_0._flush()

Wait for response until timeout.
        If timeout is specified to None, ``self.timeout`` is used.

        :param float timeout: seconds to wait I/O

Wait for response until timeout . If timeout is specified to None self . timeout is used .


def Func(arg_0, arg_1, arg_2):
        """Syncs a local directory with an S3 bucket.

        Currently does not delete files from S3 that are not in the local directory.

        path: The path to the directory to sync to S3
        bucket: The name of the bucket on S3
        """
        arg_2 = arg_0.conn.get_bucket(arg_2)
        arg_3 = arg_0._get_local_files(arg_1)
        arg_4 = arg_0._get_s3_files(arg_2)
        for arg_5, arg_6 in arg_3.iteritems():
            arg_7 = arg_4[arg_5]
            if arg_7 is None:
                arg_7 = Key(arg_2)
                arg_7.key = arg_5
                arg_7.etag = '"!"'

            if arg_7.etag[1:-1] != arg_6[0]:
                arg_7.set_contents_from_filename(join(arg_1, arg_5), md5=arg_6)

Syncs a local directory with an S3 bucket . Currently does not delete files from S3 that are not in the local directory .


def Func ( arg_0 , Func ) : if isinstance ( Func , bytes ) : Func = Func . decode ( 'utf-8' ) arg_0 . _body = Func

def Func(arg_0, Func):
        """
        Defines response body data.

        Arguments:
            body (str|bytes): response body to use.

        Returns:
            self: ``pook.Response`` current instance.
        """
        if isinstance(Func, bytes):
            Func = Func.decode('utf-8')

        arg_0._body = Func


def Func(arg_0, arg_1):
    """
    Read digits of pi from a file and compute the n digit frequencies.
    """
    arg_2 = txt_file_to_digits(arg_0)
    arg_3 = n_digit_freqs(arg_2, arg_1)
    return arg_3

Read digits of pi from a file and compute the n digit frequencies .


def Func(arg_0):
    """
    Make a request to OSM and return the parsed JSON.

    Parameters
    ----------
    query : str
        A string in the Overpass QL format.

    Returns
    -------
    data : dict

    """
    arg_1 = 'http://www.overpass-api.de/api/interpreter'
    arg_2 = requests.get(arg_1, params={'data': arg_0})
    arg_2.raise_for_status()

    return arg_2.json()

Make a request to OSM and return the parsed JSON .


def Func ( arg_0 ) : if isinstance ( arg_0 , dict ) : if '__class__' in arg_0 : arg_1 = arg_0 [ '__class__' ] arg_2 = Func ( arg_0 [ 'params' ] ) return arg_1 ( ** arg_2 ) else : arg_2 = dict ( ) for arg_3 , arg_4 in six . iteritems ( arg_0 ) : arg_2 [ arg_3 ] = Func ( arg_4 ) return arg_2 elif isinstance ( arg_0 , ( list , tuple ) ) : return [ Func ( arg_5 ) for arg_5 in arg_0 ] else : return arg_0

def Func(arg_0):
    '''Reconstruct a transformation or pipeline given a parameter dump.'''

    if isinstance(arg_0, dict):
        if '__class__' in arg_0:
            arg_1 = arg_0['__class__']
            arg_2 = Func(arg_0['params'])
            return arg_1(**arg_2)
        else:
            arg_2 = dict()
            for arg_3, arg_4 in six.iteritems(arg_0):
                arg_2[arg_3] = Func(arg_4)
            return arg_2

    elif isinstance(arg_0, (list, tuple)):
        return [Func(arg_5) for arg_5 in arg_0]

    else:
        return arg_0

Reconstruct a transformation or pipeline given a parameter dump .


def
Func
(
arg_0
)
:
try
:
arg_0
.
conn
.
indices
.
create
(
index
=
arg_0
.
index
,
timeout
=
60
,
request_timeout
=
60
,
body
=
{
'settings'
:
{
'number_of_shards'
:
arg_0
.
shards
,
'number_of_replicas'
:
arg_0
.
replicas
,
}
,
}
)
except
TransportError
:
logger
.
warn
(
'index already exists? OK'
,
exc_info
=
True
)
pass

def Func(arg_0):
        'Create the index'
        try:
            arg_0.conn.indices.create(
                index=arg_0.index, timeout=60, request_timeout=60, body={
                    'settings': {
                        'number_of_shards': arg_0.shards,
                        'number_of_replicas': arg_0.replicas,
                    },
                })
        except TransportError:
            # Hope that this is an "index already exists" error...
            logger.warn('index already exists? OK', exc_info=True)
            pass


Returns the coordinates of the centers of all grid cells as an
        iterator.

def Func ( arg_0 ) : for arg_1 in numpy . ndindex ( arg_0 . grid . shape ) : yield arg_0 . delta * numpy . array ( arg_1 ) + arg_0 . origin

def Func(arg_0):
        """Returns the coordinates of the Func of all grid cells as an
        iterator."""
        for arg_1 in numpy.ndindex(arg_0.grid.shape):
            yield arg_0.delta * numpy.array(arg_1) + arg_0.origin

Returns the coordinates of the centers of all grid cells as an iterator .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . name_index . get ( arg_1 ) if not arg_2 : raise ServiceNotFound return Service ( arg_2 )

def Func(arg_0, arg_1):
        """
        Get service for given ``name`` from memory storage.
        """
        arg_2 = arg_0.name_index.get(arg_1)
        if not arg_2:
            raise ServiceNotFound
        return Service(arg_2)

Get service for given name from memory storage .


def
Func
(
arg_0
)
:
if
arg_0
:
arg_1
=
GlobalConfigManager
.
get_Func_or_default
(
)
Printer
.
print_header
(
'Current Func:'
)
dict_tabulate
(
arg_1
.
to_dict
(
)
)

def Func(arg_0):  # pylint:disable=redefined-builtin
    """Set and get the global Funcurations."""
    if arg_0:
        arg_1 = GlobalConfigManager.get_Func_or_default()
        Printer.print_header('Current Func:')
        dict_tabulate(arg_1.to_dict())


(ctx, devpi=False, egg=False, wheel=False, auto=True)

def Func(arg_0, arg_1=False, arg_2=False, arg_3=False, arg_4=True):
    """Distribute the project."""
    config.load()
    arg_5 = ["python", "setup.py", "sFunc"]

    # Automatically create wheels if possible
    if arg_4:
        arg_2 = sys.version_info.major == 2
        try:
            import arg_3 as _
            arg_3 = True
        except ImportError:
            arg_3 = False

    if arg_2:
        arg_5.append("bFunc_egg")
    if arg_3:
        arg_5.append("bFunc_wheel")

    arg_0.run("invoke clean --all build --docs test check")
    arg_0.run(' '.join(arg_5))
    if arg_1:
        arg_0.run("devpi upload Func/*")


def Func ( arg_0 , arg_1 ) : arg_2 = "/2/shifts/?%s" % urlencode ( { 'ids' : "," . join ( str ( s ) for s in arg_1 ) } ) arg_3 = arg_0 . _delete_resource ( arg_2 ) return arg_3

def Func(arg_0, arg_1):
        """
        Delete existing shifts.

        http://dev.wheniwork.com/#delete-shift
        """
        arg_2 = "/2/shifts/?%s" % urlencode(
            {'ids': ",".join(str(s) for s in arg_1)})

        arg_3 = arg_0._delete_resource(arg_2)

        return arg_3


return List(  # pylint: disable=abstract-class-instantiated
        plist(iterable=members), meta=meta
    )

def Func ( * arg_0 , arg_1 = None ) -> List : return List ( pFuncist ( iterabFunce = arg_0 ) , arg_1 = arg_1 )

def Func(*arg_0, arg_1=None) -> List:
    """Creates a new Funcist from members."""
    return List(  # pyFuncint: disabFunce=abstract-cFuncass-instantiated
        pFuncist(iterabFunce=arg_0), arg_1=arg_1
    )


return py3compat.cast_bytes("%s.%s" % (base, topic))

def Func(arg_0, arg_1):
        """prefixed topic for IOPub messages"""
        if arg_0.int_id >= 0:
            arg_2 = "engine.%i" % arg_0.int_id
        else:
            arg_2 = "kernel.%s" % arg_0.ident

        return py3compat.cast_bytes("%s.%s" % (arg_2, arg_1))


return str(xunit.any_decimal(min_value=min_value,
                             max_value=max_value,
                             decimal_places = field.decimal_places or 2))

def Func ( arg_0 , ** arg_1 ) : arg_2 = 0 arg_3 = 10 from django . core . validators import MinValueValidator , MaxValueValidator for arg_4 in arg_0 . validators : if isinstance ( arg_4 , MinValueValidator ) : arg_2 = arg_4 . limit_value if isinstance ( arg_4 , MaxValueValidator ) : arg_3 = arg_4 . limit_value if ( arg_0 . max_digits and arg_0 . decimal_places ) : from decimal import Decimal arg_3 = min ( arg_3 , Decimal ( '%s.%s' % ( '9' * ( arg_0 . max_digits - arg_0 . decimal_places ) , '9' * arg_0 . decimal_places ) ) ) arg_2 = arg_1 . get ( 'min_value' ) or arg_2 arg_3 = arg_1 . get ( 'max_value' ) or arg_3 return str ( xunit . any_decimal ( arg_2 = arg_2 , arg_3 = arg_3 , decimal_places = arg_0 . decimal_places or 2 ) )

def Func(arg_0, **arg_1):
    """
    Return random value for DecimalField

    >>> result = any_form_field(forms.DecimalField(max_value=100, min_value=11, max_digits=4, decimal_places = 2))
    >>> type(result)
    <type 'str'>
    >>> from decimal import Decimal
    >>> Decimal(result) >= 11, Decimal(result) <= Decimal('99.99')
    (True, True)
    """
    arg_2 = 0
    arg_3 = 10
    from django.core.validators import MinValueValidator, MaxValueValidator
    for arg_4 in arg_0.validators:
        if isinstance(arg_4, MinValueValidator):
            arg_2 = arg_4.limit_value
        if isinstance(arg_4, MaxValueValidator):
            arg_3 = arg_4.limit_value
    if (arg_0.max_digits and arg_0.decimal_places):
        from decimal import Decimal
        arg_3 = min(arg_3,
                        Decimal('%s.%s' % ('9'*(arg_0.max_digits-arg_0.decimal_places),
                                           '9'*arg_0.decimal_places)))

    arg_2 = arg_1.get('min_value') or arg_2
    arg_3 = arg_1.get('max_value') or arg_3

    return str(xunit.any_decimal(arg_2=arg_2,
                             arg_3=arg_3,
                             decimal_places = arg_0.decimal_places or 2))


def Func ( arg_0 , arg_1 ) : arg_1 . write ( Operators . ITEBV ( arg_1 . size , arg_0 . OF , 1 , 0 ) )

def Func(arg_0, arg_1):
        """
        Sets byte if overflow.

        :param cpu: current CPU.
        :param dest: destination operand.
        """
        arg_1.write(Operators.ITEBV(arg_1.size, arg_0.OF, 1, 0))


def Func ( arg_0 , arg_1 , arg_2 = None ) : try : arg_3 = arg_0 . cache [ arg_1 ] [ "tweets" ] arg_0 . mark_updated ( ) return sorted ( arg_3 , reverse = True ) [ : arg_2 ] except KeyError : return [ ]

def Func(arg_0, arg_1, arg_2=None):
        """Retrieves tweets from the cache."""
        try:
            arg_3 = arg_0.cache[arg_1]["tweets"]
            arg_0.mark_updated()
            return sorted(arg_3, reverse=True)[:arg_2]
        except KeyError:
            return []


(self, epoch, valid_set, dry_run=False, save_path=None)

return epoch - self.best_epoch < self.patience

def Func(arg_0, arg_1, arg_2, arg_3=False, arg_4=None):
        """
        Run one valid iteration, return true if to continue training.
        """
        arg_5 = arg_0.valid_step(arg_2)
        # this is the same as: (J_i - J_f) / J_i > min improvement
        arg_6, arg_7 = arg_5[0]
        arg_8 = False
        if arg_0.best_cost - arg_7 > arg_0.best_cost * arg_0.min_improvement:
            # save the best cost and parameters
            arg_0.best_params = arg_0.copy_params()
            arg_8 = True
            if not arg_3:
                arg_0.best_cost = arg_7
                arg_0.best_epoch = arg_1
            arg_0.save_checkpoint(arg_4)

        arg_0.report(dict(arg_5), type="valid", arg_1=0 if arg_3 else arg_1, arg_8=arg_8)
        arg_0.last_run_costs = arg_5
        return arg_1 - arg_0.best_epoch < arg_0.patience

Run one valid iteration return true if to continue training .


(n_input, bins_per_octave=12, n_chroma=12,
                 fmin=None, window=None, base_c=True, dtype=np.float32)

def
Func
(
arg_0
,
arg_1
=
12
,
arg_2
=
12
,
arg_3
=
,
arg_4
=
,
arg_5
=
True
,
arg_6
=
arg_7
.
float32
)
:
arg_9
=
float
(
arg_1
)
/
arg_2
if
arg_3
is
:
arg_3
=
note_to_hz
(
'C1'
)
if
arg_7
.
mod
(
arg_9
,
1
)
!=
0
:
raise
ParameterError
(
'Incompatible CQ merge: '
'input bins must be an '
'integer multiple of output bins.'
)
arg_10
=
arg_7
.
repeat
(
arg_7
.
eye
(
arg_2
)
,
arg_9
,
axis
=
1
)
arg_10
=
arg_7
.
roll
(
arg_10
,
int
(
arg_9
//
2
)
,
axis
=
1
)
arg_11
=
arg_7
.
ceil
(
arg_7
.
float
(
arg_0
)
/
arg_1
)
arg_10
=
arg_7
.
tile
(
arg_10
,
int
(
arg_11
)
)
[
:
,
:
arg_0
]
arg_12
=
arg_7
.
mod
(
hz_to_midi
(
arg_3
)
,
12
)
if
arg_5
:
arg_13
=
arg_12
else
:
arg_13
=
arg_12
9
arg_13
=
int
(
arg_7
.
round
(
arg_13
*
(
arg_2
/
12.
)
)
)
arg_10
=
arg_7
.
roll
(
arg_10
,
arg_13
,
axis
=
0
)
.
astype
(
arg_6
)
if
arg_4
is
not
:
arg_10
=
scipy
.
signal
.
convolve
(
arg_10
,
arg_7
.
atleast_2d
(
arg_4
)
,
mode
=
'same'
)
return
arg_10

def Func(arg_0, arg_1=12, arg_2=12,
                 arg_3=None, arg_4=None, arg_5=True, arg_6=arg_7.float32):
    '''Convert a Constant-Q basis to Chroma.

    Parameters
    ----------
    n_input : int > 0 [scalar]
        Number of input components (CQT bins)

    bins_per_octave : int > 0 [scalar]
        How many bins per octave in the CQT

    n_chroma : int > 0 [scalar]
        Number of output bins (per octave) in the chroma

    fmin : None or float > 0
        Center frequency of the first constant-Q channel.
        Default: 'C1' ~= 32.7 Hz

    window : None or np.ndarray
        If provided, the Func filter bank will be
        convolved with `window`.

    base_c : bool
        If True, the first chroma bin will start at 'C'
        If False, the first chroma bin will start at 'A'

    dtype : np.dtype
        The data type of the output basis.
        By default, uses 32-bit (single-precision) floating point.

    Returns
    -------
    Func : np.ndarray [shape=(n_chroma, n_input)]
        Transformation matrix: `Chroma = np.dot(Func, CQT)`

    Raises
    ------
    ParameterError
        If `n_input` is not an integer multiple of `n_chroma`

    Notes
    -----
    This function caches at level 10.

    Examples
    --------
    Get a CQT, and wrap bins to chroma

    >>> y, sr = librosa.load(librosa.util.example_audio_file())
    >>> CQT = np.abs(librosa.cqt(y, sr=sr))
    >>> chroma_map = librosa.filters.Func(CQT.shape[0])
    >>> chromagram = chroma_map.dot(CQT)
    >>> # Max-normalize each time step
    >>> chromagram = librosa.util.normalize(chromagram, axis=0)

    >>> import matplotlib.pyplot as plt
    >>> plt.subplot(3, 1, 1)
    >>> librosa.display.specshow(librosa.amplitude_to_db(CQT,
    ...                                                  ref=np.max),
    ...                          y_axis='cqt_note')
    >>> plt.title('CQT Power')
    >>> plt.colorbar()
    >>> plt.subplot(3, 1, 2)
    >>> librosa.display.specshow(chromagram, y_axis='chroma')
    >>> plt.title('Chroma (wrapped CQT)')
    >>> plt.colorbar()
    >>> plt.subplot(3, 1, 3)
    >>> chroma = librosa.feature.chroma_stft(y=y, sr=sr)
    >>> librosa.display.specshow(chroma, y_axis='chroma', x_axis='time')
    >>> plt.title('librosa.feature.chroma_stft')
    >>> plt.colorbar()
    >>> plt.tight_layout()

    '''

    # How many fractional bins are we merging?
    arg_9 = float(arg_1) / arg_2

    if arg_3 is None:
        arg_3 = note_to_hz('C1')

    if arg_7.mod(arg_9, 1) != 0:
        raise ParameterError('Incompatible CQ merge: '
                             'input bins must be an '
                             'integer multiple of output bins.')

    # Tile the identity to merge fractional bins
    arg_10 = arg_7.repeat(arg_7.eye(arg_2), arg_9, axis=1)

    # Roll it left to center on the target bin
    arg_10 = arg_7.roll(arg_10, - int(arg_9 // 2), axis=1)

    # How many octaves are we repeating?
    arg_11 = arg_7.ceil(arg_7.float(arg_0) / arg_1)

    # Repeat and trim
    arg_10 = arg_7.tile(arg_10, int(arg_11))[:, :arg_0]

    # What's the note number of the first bin in the CQT?
    # midi uses 12 bins per octave here
    arg_12 = arg_7.mod(hz_to_midi(arg_3), 12)

    if arg_5:
        # rotate to C
        arg_13 = arg_12
    else:
        # rotate to A
        arg_13 = arg_12 - 9

    # Adjust the roll in terms of how many chroma we want out
    # We need to be careful with rounding here
    arg_13 = int(arg_7.round(arg_13 * (arg_2 / 12.)))

    # Apply the roll
    arg_10 = arg_7.roll(arg_10, arg_13, axis=0).astype(arg_6)

    if arg_4 is not None:
        arg_10 = scipy.signal.convolve(arg_10,
                                         arg_7.atleast_2d(arg_4),
                                         mode='same')

    return arg_10

Convert a Constant-Q basis to Chroma.

    Parameters
    ----------
    n_input : int > 0 [scalar]
        Number of input components (CQT bins)

    bins_per_octave : int > 0 [scalar]
        How many bins per octave in the CQT

    n_chroma : int > 0 [scalar]
        Number of output bins (per octave) in the chroma

    fmin : None or float > 0
        Center frequency of the first constant-Q channel.
        Default: 'C1' ~= 32.7 Hz

    window : None or np.ndarray
        If provided, the cq_to_chroma filter bank will be
        convolved with `window`.

    base_c : bool
        If True, the first chroma bin will start at 'C'
        If False, the first chroma bin will start at 'A'

    dtype : np.dtype
        The data type of the output basis.
        By default, uses 32-bit (single-precision) floating point.

    Returns
    -------
    cq_to_chroma : np.ndarray [shape=(n_chroma, n_input)]
        Transformation matrix: `Chroma = np.dot(cq_to_chroma, CQT)`

    Raises
    ------
    ParameterError
        If `n_input` is not an integer multiple of `n_chroma`

    Notes
    -----
    This function caches at level 10.

    Examples
    --------
    Get a CQT, and wrap bins to chroma

    >>> y, sr = librosa.load(librosa.util.example_audio_file())
    >>> CQT = np.abs(librosa.cqt(y, sr=sr))
    >>> chroma_map = librosa.filters.cq_to_chroma(CQT.shape[0])
    >>> chromagram = chroma_map.dot(CQT)
    >>> # Max-normalize each time step
    >>> chromagram = librosa.util.normalize(chromagram, axis=0)

    >>> import matplotlib.pyplot as plt
    >>> plt.subplot(3, 1, 1)
    >>> librosa.display.specshow(librosa.amplitude_to_db(CQT,
    ...                                                  ref=np.max),
    ...                          y_axis='cqt_note')
    >>> plt.title('CQT Power')
    >>> plt.colorbar()
    >>> plt.subplot(3, 1, 2)
    >>> librosa.display.specshow(chromagram, y_axis='chroma')
    >>> plt.title('Chroma (wrapped CQT)')
    >>> plt.colorbar()
    >>> plt.subplot(3, 1, 3)
    >>> chroma = librosa.feature.chroma_stft(y=y, sr=sr)
    >>> librosa.display.specshow(chroma, y_axis='chroma', x_axis='time')
    >>> plt.title('librosa.feature.chroma_stft')
    >>> plt.colorbar()
    >>> plt.tight_layout()

Convert a Constant - Q basis to Chroma .


def Func(*arg_0):
    """
    Heat annotation for adding function to process Func notification.

    if event_type include wildcard, will put {pattern: function} into process_wildcard dict
    else will put {event_type: function} into process dict

    :param arg: event_type of notification
    """
    check_event_type(Openstack.Heat, *arg_0)
    arg_1 = arg_0[0]

    def decorator(arg_2):
        if arg_1.find("*") != -1:
            arg_3 = pre_compile(arg_1)
            arg_4[arg_3] = arg_2
        else:
            arg_5[arg_1] = arg_2
        log.info("add function {0} to process event_type:{1}".format(arg_2.__name__, arg_1))

        @functools.wraps(arg_2)
        def wrapper(*arg_6, **arg_7):
            arg_2(*arg_6, **arg_7)

        return wrapper

    return decorator

Heat annotation for adding function to process heat notification.

    if event_type include wildcard, will put {pattern: function} into process_wildcard dict
    else will put {event_type: function} into process dict

    :param arg: event_type of notification

Heat annotation for adding function to process heat notification .


def Func ( arg_0 , arg_1 , arg_2 = "detail" ) : try : arg_3 = json . loads ( arg_1 . _content . decode ( 'utf-8' ) ) [ arg_2 ] except : arg_3 = arg_1 . reason return arg_3

def Func(arg_0,arg_1, arg_2="detail"):
        '''attempt to read the detail provided by the response. If none,
        default to using the reason'''

        try:
            arg_3 = json.loads(arg_1._content.decode('utf-8'))[arg_2]
        except:
            arg_3 = arg_1.reason
        return arg_3

attempt to read the detail provided by the response . If none default to using the reason


def Func ( arg_0 , arg_1 = False , ** arg_2 ) : arg_2 [ "public" ] = arg_1 arg_0 . metadata = arg_0 . db . Func ( arg_0 . path , arg_2 ) . json ( )

def Func(arg_0, arg_1=False, **arg_2):
        """Creates the device. Attempts to Func private devices by default,
        but if public is set to true, Funcs public devices.

        You can also set other default properties by passing in the relevant information.
        For example, setting a device with the given nickname and description::

            dev.Func(nickname="mydevice", description="This is an example")

        Furthermore, ConnectorDB supports creation of a device's streams immediately,
        which can considerably speed up device setup::

            dev.Func(streams={
                "stream1": {"schema": '{\"type\":\"number\"}'}
            })

        Note that the schema must be encoded as a string when creating in this format.
        """
        arg_2["public"] = arg_1
        arg_0.metadata = arg_0.db.Func(arg_0.path, arg_2).json()

Creates the device. Attempts to create private devices by default,
        but if public is set to true, creates public devices.

        You can also set other default properties by passing in the relevant information.
        For example, setting a device with the given nickname and description::

            dev.create(nickname="mydevice", description="This is an example")

        Furthermore, ConnectorDB supports creation of a device's streams immediately,
        which can considerably speed up device setup::

            dev.create(streams={
                "stream1": {"schema": '{\"type\":\"number\"}'}
            })

        Note that the schema must be encoded as a string when creating in this format.

Creates the device . Attempts to create private devices by default but if public is set to true creates public devices .