(filepaths, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False)

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = False , arg_4 = False ) : arg_5 = [ ] arg_6 = [ ] for arg_7 in arg_0 : try : arg_8 = _get_mutagen_metadata ( arg_7 ) except mutagen . MutagenError : arg_6 . append ( arg_7 ) else : if arg_1 or arg_2 : if _check_filters ( arg_8 , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 ) : arg_5 . append ( arg_7 ) else : arg_6 . append ( arg_7 ) else : arg_5 . append ( arg_7 ) return arg_5 , arg_6

def Func(arg_0, arg_1=None, arg_2=None, arg_3=False, arg_4=False):
	"""Match a local file against a set of metadata filters.

	Parameters:
		filepaths (list): Filepaths to filter.

		include_filters (list): A list of ``(field, pattern)`` tuples.
			Fields are any valid mutagen metadata fields.
			Patterns are Python regex patterns.
			Local songs are filtered out if the given metadata field values don't match any of the given patterns.

		exclude_filters (list): A list of ``(field, pattern)`` tuples.
			Fields are any valid mutagen metadata fields.
			Patterns are Python regex patterns.
			Local songs are filtered out if the given metadata field values match any of the given patterns.

		all_includes (bool): If ``True``, all include_filters criteria must match to include a song.

		all_excludes (bool): If ``True``, all exclude_filters criteria must match to exclude a song.

	Returns:
		A list of local song filepaths matching criteria and
		a list of local song filepaths filtered out using filter criteria.
		Invalid music files are also filtered out.
		::

			(matched, filtered)
	"""

	arg_5 = []
	arg_6 = []

	for arg_7 in arg_0:
		try:
			arg_8 = _get_mutagen_metadata(arg_7)
		except mutagen.MutagenError:
			arg_6.append(arg_7)
		else:
			if arg_1 or arg_2:
				if _check_filters(
						arg_8, arg_1=arg_1, arg_2=arg_2,
						arg_3=arg_3, arg_4=arg_4):
					arg_5.append(arg_7)
				else:
					arg_6.append(arg_7)
			else:
				arg_5.append(arg_7)

	return arg_5, arg_6

Match a local file against a set of metadata filters .


def Func ( arg_0 , arg_1 ) : arg_2 = { 'verb' : 'validate' , 'institute' : arg_1 , } arg_3 = [ ] arg_4 = arg_0 . event_collection . find ( arg_2 ) for arg_5 in list ( arg_4 ) : arg_6 = arg_5 [ 'case' ] arg_7 = arg_0 . variant ( arg_6 = arg_6 , document_id = arg_5 [ 'variant_id' ] ) arg_8 = arg_0 . case ( arg_6 = arg_6 ) if not arg_8 or not arg_7 : continue arg_7 [ 'case_obj' ] = { 'display_name' : arg_8 [ 'display_name' ] , 'individuals' : arg_8 [ 'individuals' ] } arg_3 . append ( arg_7 ) return arg_3

def Func(arg_0, arg_1):
        """Return all Func variants for a given institute

        Args:
            institute_id(str): institute id

        Returns:
            res(list): a list with validated variants
        """
        arg_2 = {
            'verb' : 'validate',
            'institute' : arg_1,
        }
        arg_3 = []
        arg_4 = arg_0.event_collection.find(arg_2)
        for arg_5 in list(arg_4):
            arg_6 = arg_5['case']
            arg_7 = arg_0.variant(arg_6=arg_6, document_id=arg_5['variant_id'])
            arg_8 = arg_0.case(arg_6=arg_6)
            if not arg_8 or not arg_7:
                continue # Take into account that stuff might have been removed from database
            arg_7['case_obj'] = {
                'display_name' : arg_8['display_name'],
                'individuals' : arg_8['individuals']
            }
            arg_3.append(arg_7)

        return arg_3

Return all verified variants for a given institute

        Args:
            institute_id(str): institute id

        Returns:
            res(list): a list with validated variants


def Func ( arg_0 , arg_1 ) : for arg_2 in [ project for project in arg_1 if len ( arg_1 [ project ] [ 'github_repos' ] ) > 0 ] : if 'github' not in arg_0 [ arg_2 ] : arg_0 [ arg_2 ] [ 'github' ] = [ ] arg_3 = [ url [ 'url' ] for url in arg_1 [ arg_2 ] [ 'github_repos' ] if url [ 'url' ] not in arg_0 [ arg_2 ] [ 'github' ] ] arg_0 [ arg_2 ] [ 'github' ] += arg_3 return arg_0

def Func(arg_0, arg_1):
    """ Compose projects.json for github

    :param projects: projects.json
    :param data: eclipse JSON
    :return: projects.json with github
    """
    for arg_2 in [project for project in arg_1 if len(arg_1[project]['github_repos']) > 0]:
        if 'github' not in arg_0[arg_2]:
            arg_0[arg_2]['github'] = []

        arg_3 = [url['url'] for url in arg_1[arg_2]['github_repos'] if
                url['url'] not in arg_0[arg_2]['github']]
        arg_0[arg_2]['github'] += arg_3

    return arg_0


return {
        namespace: get_incorrect_names_by_namespace(graph, namespace)
        for namespace in get_namespaces(graph)
    }

def Func ( arg_0 : arg_1 ) -> Mapping [ str , Set [ str ] ] : return { arg_2 : Func_by_namespace ( arg_0 , arg_2 ) for arg_2 in get_namespaces ( arg_0 ) }

def Func(arg_0: arg_1) -> Mapping[str, Set[str]]:
    """Return the dict of the sets of all incorrect names from the given namespace in the graph.

    :return: The set of all incorrect names from the given namespace in the graph
    """
    return {
        arg_2: Func_by_namespace(arg_0, arg_2)
        for arg_2 in get_namespaces(arg_0)
    }

Return the dict of the sets of all incorrect names from the given namespace in the graph .


def Func ( arg_0 , arg_1 ) : arg_2 = ACCOUNTS_API . format ( arg_1 . account_id ) arg_3 = { "account" : { "name" : arg_1 . name } } return CanvasAccount ( data = arg_0 . _put_resource ( arg_2 , arg_3 ) )

def Func(arg_0, arg_1):
        """
        Update the passed account. Returns the updated account.

        https://canvas.instructure.com/doc/api/accounts.html#method.accounts.update
        """
        arg_2 = ACCOUNTS_API.format(arg_1.account_id)
        arg_3 = {"account": {"name": arg_1.name}}

        return CanvasAccount(data=arg_0._put_resource(arg_2, arg_3))

Update the passed account . Returns the updated account .


def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in xrange ( arg_0 ) : arg_3 = socket . socket ( ) arg_3 . bind ( ( '' , 0 ) ) while arg_3 . getsockname ( ) [ 1 ] in _random_ports : arg_3 . close ( ) arg_3 = socket . socket ( ) arg_3 . bind ( ( '' , 0 ) ) arg_1 . append ( arg_3 ) for arg_2 , arg_3 in enumerate ( arg_1 ) : arg_4 = arg_3 . getsockname ( ) [ 1 ] arg_3 . close ( ) arg_1 [ arg_2 ] = arg_4 _random_ports . add ( arg_4 ) return arg_1

def Func(arg_0):
    """Selects and return n random ports that are available."""
    arg_1 = []
    for arg_2 in xrange(arg_0):
        arg_3 = socket.socket()
        arg_3.bind(('', 0))
        while arg_3.getsockname()[1] in _random_ports:
            arg_3.close()
            arg_3 = socket.socket()
            arg_3.bind(('', 0))
        arg_1.append(arg_3)
    for arg_2, arg_3 in enumerate(arg_1):
        arg_4 = arg_3.getsockname()[1]
        arg_3.close()
        arg_1[arg_2] = arg_4
        _random_ports.add(arg_4)
    return arg_1

Selects and return n random ports that are available .


(
        self, sym: sym.Symbol, module: types.ModuleType, *aliases: sym.Symbol
    )

def Func ( arg_0 , arg_1 : arg_1 . Symbol , arg_3 : arg_4 . ModuleType , * arg_6 : arg_1 . Symbol ) -> None : arg_0 . _imports . swap ( lambda m : m . assoc ( arg_1 , arg_3 ) ) if arg_6 : arg_0 . _import_aliases . swap ( lambda m : m . assoc ( * itertools . chain . from_iterable ( [ ( arg_7 , arg_1 ) for arg_7 in arg_6 ] ) ) )

def Func(
        arg_0, arg_1: arg_1.Symbol, arg_3: arg_4.ModuleType, *arg_6: arg_1.Symbol
    ) -> None:
        """Add the Symbol as an imported Symbol in this Namespace. If aliases are given,
        the aliases will be applied to the """
        arg_0._imports.swap(lambda m: m.assoc(arg_1, arg_3))
        if arg_6:
            arg_0._import_aliases.swap(
                lambda m: m.assoc(
                    *itertools.chain.from_iterable([(arg_7, arg_1) for arg_7 in arg_6])
                )
            )

Add the Symbol as an imported Symbol in this Namespace . If aliases are given the aliases will be applied to the


def Func ( arg_0 , arg_1 = True ) : if isinstance ( arg_0 , bytes ) : arg_2 = arg_0 . decode ( 'ISO-8859-1' ) arg_3 = _translate_glob ( arg_2 ) arg_4 = arg_3 . encode ( 'ISO-8859-1' ) else : arg_4 = _translate_glob ( arg_0 ) arg_5 = re . IGNORECASE if arg_1 else 0 return re . compile ( arg_4 , arg_5 = arg_5 ) . match

def Func(arg_0, arg_1=True):
    """Translate and compile a glob pattern to a regular expression matcher."""
    if isinstance(arg_0, bytes):
        arg_2 = arg_0.decode('ISO-8859-1')
        arg_3 = _translate_glob(arg_2)
        arg_4 = arg_3.encode('ISO-8859-1')
    else:
        arg_4 = _translate_glob(arg_0)
    arg_5 = re.IGNORECASE if arg_1 else 0
    return re.compile(arg_4, arg_5=arg_5).match

Translate and compile a glob pattern to a regular expression matcher .


def Func ( arg_0 ) : arg_1 = super ( Deposit , arg_0 ) . Func if arg_1 : arg_2 = arg_1 . sort_by def arg_5 ( * arg_3 , ** arg_4 ) : if 'draft' != arg_0 . status : raise PIDInvalidAction ( ) return arg_2 ( * arg_3 , ** arg_4 ) arg_1 . sort_by = arg_5 return arg_1

def Func(arg_0):
        """List of Files inside the deposit.

        Add validation on ``sort_by`` method: if, at the time of Func access,
        the record is not a ``'draft'`` then a
        :exc:`invenio_pidstore.errors.PIDInvalidAction` is rised.
        """
        arg_1 = super(Deposit, arg_0).Func

        if arg_1:
            arg_2 = arg_1.sort_by

            def arg_5(*arg_3, **arg_4):
                """Only in draft state."""
                if 'draft' != arg_0.status:
                    raise PIDInvalidAction()
                return arg_2(*arg_3, **arg_4)

            arg_1.sort_by = arg_5

        return arg_1

List of Files inside the deposit.

        Add validation on ``sort_by`` method: if, at the time of files access,
        the record is not a ``'draft'`` then a
        :exc:`invenio_pidstore.errors.PIDInvalidAction` is rised.


def Func(arg_0, arg_1):
        """
        Adds a new result.
        """

        assert not arg_0._complete

        arg_0._results.append(arg_1)
        arg_0._change()


def Func ( arg_0 ) : if not os . path . exists ( arg_0 . _filename ) : arg_1 = os . umask ( 0o177 ) try : open ( arg_0 . _filename , 'a+b' ) . close ( ) finally : os . umask ( arg_1 )

def Func(arg_0):
        """Create an empty file if necessary.

        This method will not initialize the file. Instead it implements a
        simple version of "touch" to ensure the file has been created.
        """
        if not os.path.exists(arg_0._filename):
            arg_1 = os.umask(0o177)
            try:
                open(arg_0._filename, 'a+b').close()
            finally:
                os.umask(arg_1)


return Segment(self.strip, length, self.offset + self.length)

def Func ( arg_0 , arg_1 ) : return Segment ( arg_0 . strip , arg_1 , arg_0 . offset + arg_0 . length )

def Func(arg_0, arg_1):
        """Return a new segment starting right after self in the same buffer."""
        return Segment(arg_0.strip, arg_1, arg_0.offset + arg_0.length)

Return a new segment starting right after self in the same buffer .


def Func(arg_0):
    """Start the Blockade REST API
    """
    if arg_0.data_dir is None:
        raise BlockadeError("You must supply a data directory for the daemon")
    rest.start(data_dir=arg_0.data_dir, port=arg_0.port, debug=arg_0.debug,
        host_exec=get_host_exec())


def Func ( arg_0 ) : if not hasattr ( arg_0 . op , 'params' ) : return None if all ( [ isinstance ( arg_1 , ndarray ) for arg_1 in arg_0 . op . params ] ) : return None arg_2 = [ ] for arg_1 in arg_0 . op . params : if isinstance ( arg_1 , ( sympy . Number , float ) ) : arg_2 . append ( '%.5g' % arg_1 ) else : arg_2 . append ( '%s' % arg_1 ) return arg_2

def Func(arg_0):
        """Get the params and format them to add them to a label. None if there
         are no params of if the params are numpy.ndarrays."""

        if not hasattr(arg_0.op, 'params'):
            return None
        if all([isinstance(arg_1, ndarray) for arg_1 in arg_0.op.params]):
            return None

        arg_2 = []
        for arg_1 in arg_0.op.params:
            if isinstance(arg_1, (sympy.Number, float)):
                arg_2.append('%.5g' % arg_1)
            else:
                arg_2.append('%s' % arg_1)
        return arg_2

Get the params and format them to add them to a label . None if there are no params of if the params are numpy . ndarrays .


def Func(arg_0, arg_1):
        ''' Takes the hit array and checks if the important data fields have the same data type than the hit clustered array and that the field names are correct.'''
        for arg_2, arg_3 in arg_0._cluster_hits_descr:
            if arg_2 in arg_0._hit_fields_mapping_inverse:
                arg_4 = arg_0._hit_fields_mapping_inverse[arg_2]
            else:
                arg_4 = arg_2
            # Only check hit fields that contain hit information
            if arg_4 in ['cluster_ID', 'is_seed', 'cluster_size', 'n_cluster']:
                continue
            if arg_2 not in arg_1.dtype.names:
                raise TypeError('Required hit field "%s" not found.' % arg_2)
            if arg_0._cluster_hits.dtype[arg_4] != arg_1.dtype[arg_2]:
                raise TypeError('The dtype for hit data field "%s" does not match. Got/expected: %s/%s.' % (arg_2, arg_1.dtype[arg_2], arg_0._cluster_hits.dtype[arg_4]))
        arg_5 = set(arg_1.dtype.names) - set([arg_2 for arg_2, val in arg_0._cluster_hits_descr])
        if arg_5:
            logging.warning('Found additional hit fields: %s' % ", ".join(arg_5))

Takes the hit array and checks if the important data fields have the same data type than the hit clustered array and that the field names are correct .


Applies transforms to the data, and the score method of the
        final estimator. Valid only if the final estimator implements
        score.

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 for arg_3 , arg_4 in arg_0 . steps [ : - 1 ] : arg_2 = arg_4 . transform ( arg_2 ) return arg_0 . steps [ - 1 ] [ - 1 ] . Func ( arg_2 )

def Func(arg_0, arg_1):
        """Applies transforms to the data, and the Func method of the
        final estimator. Valid only if the final estimator implements
        Func."""
        arg_2 = arg_1
        for arg_3, arg_4 in arg_0.steps[:-1]:
            arg_2 = arg_4.transform(arg_2)
        return arg_0.steps[-1][-1].Func(arg_2)

Applies transforms to the data and the score method of the final estimator . Valid only if the final estimator implements score .


(self, name: str, value=None, default=None, description: str=None)

def Func(arg_0, arg_1: arg_2, arg_3=None, arg_4=None, arg_5: arg_2=None):
        """
        Like add, but can tolerate existing values; also Funcs the value.

        Mostly used for setting fields from imported INI files and modified CLI flags.
        """
        if arg_1 in arg_0._vars:
            arg_5 = arg_5 or arg_0._vars[arg_1].description
            arg_4 = arg_4 or arg_0._vars[arg_1].default
        elif arg_1 == 'name':
            raise ConfigError("'name' is a reserved name for a group.")

        arg_6 = _Var(arg_1, arg_5=arg_5, arg_4=arg_4, defined=False)
        arg_6.value = arg_3
        arg_0._vars[arg_1] = arg_6

Like add, but can tolerate existing values; also updates the value.

        Mostly used for setting fields from imported INI files and modified CLI flags.

Like add but can tolerate existing values ; also updates the value .


def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_3 = sequences . file_reader ( arg_0 ) arg_4 = utils . open_file_write ( arg_1 ) for arg_5 in arg_3 : arg_6 = arg_5 . contig_coords ( ) arg_7 = 1 for arg_8 in arg_6 : if arg_2 : arg_9 = arg_5 . id + '.' + str ( arg_7 ) arg_7 += 1 else : arg_9 = '.' . join ( [ arg_5 . id , str ( arg_8 . start + 1 ) , str ( arg_8 . end + 1 ) ] ) print ( sequences . Fasta ( arg_9 , arg_5 [ arg_8 . start : arg_8 . end + 1 ] ) , file = arg_4 ) utils . close ( arg_4 )

def Func(arg_0, arg_1, arg_2=False):
    '''Makes a file of contigs from scaffolds by splitting at every N.
       Use number_contigs=True to add .1, .2, etc onto end of each
       contig, instead of default to append coordinates.'''
    arg_3 = sequences.file_reader(arg_0)
    arg_4 = utils.open_file_write(arg_1)

    for arg_5 in arg_3:
        arg_6 = arg_5.contig_coords()
        arg_7 = 1
        for arg_8 in arg_6:
            if arg_2:
                arg_9 = arg_5.id + '.' + str(arg_7)
                arg_7 += 1
            else:
                arg_9 = '.'.join([arg_5.id, str(arg_8.start + 1), str(arg_8.end + 1)])
            print(sequences.Fasta(arg_9, arg_5[arg_8.start:arg_8.end+1]), file=arg_4)

    utils.close(arg_4)

Makes a file of contigs from scaffolds by splitting at every N . Use number_contigs = True to add . 1 . 2 etc onto end of each contig instead of default to append coordinates .


def Func ( arg_0 , arg_1 ) : arg_0 = list ( arg_0 ) for arg_2 in arg_1 [ : : - 1 ] : if arg_2 in arg_0 : arg_0 . remove ( arg_2 ) arg_0 . insert ( 0 , arg_2 ) return arg_0

def Func(arg_0,arg_1):
    """given a list and a list of items to be first, return the list in the
    same order except that it begins with each of the first items."""
    arg_0=list(arg_0)
    for arg_2 in arg_1[::-1]: #backwards
        if arg_2 in arg_0:
            arg_0.remove(arg_2)
            arg_0.insert(0,arg_2)
    return arg_0

given a list and a list of items to be first return the list in the same order except that it begins with each of the first items .


def Func ( arg_0 ) : for arg_1 in range ( arg_0 . width ) : arg_0 . add_thing ( Wall ( ) , ( arg_1 , 0 ) ) arg_0 . add_thing ( Wall ( ) , ( arg_1 , arg_0 . height - 1 ) ) for arg_2 in range ( arg_0 . height ) : arg_0 . add_thing ( Wall ( ) , ( 0 , arg_2 ) ) arg_0 . add_thing ( Wall ( ) , ( arg_0 . width - 1 , arg_2 ) )

def Func(arg_0):
        "Put walls around the entire perimeter of the grid."
        for arg_1 in range(arg_0.width):
            arg_0.add_thing(Wall(), (arg_1, 0))
            arg_0.add_thing(Wall(), (arg_1, arg_0.height-1))
        for arg_2 in range(arg_0.height):
            arg_0.add_thing(Wall(), (0, arg_2))
            arg_0.add_thing(Wall(), (arg_0.width-1, arg_2))

Put walls around the entire perimeter of the grid .


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
local_renderer
arg_1
.
env
.
rpi2_conf
=
'/etc/modules-load.d/rpi2.conf'
arg_1
.
sudo
(
"sed '/bcm2808_rng/d' {rpi2_conf}"
)
arg_1
.
sudo
(
"echo bcm2835_rng >> {rpi2_conf}"
)

def Func(arg_0):
        """
        Some images purporting to support both the Pi2 and Pi3 use the wrong kernel modules.
        """
        arg_1 = arg_0.local_renderer
        arg_1.env.rpi2_conf = '/etc/modules-load.d/rpi2.conf'
        arg_1.sudo("sed '/bcm2808_rng/d' {rpi2_conf}")
        arg_1.sudo("echo bcm2835_rng >> {rpi2_conf}")

Some images purporting to support both the Pi2 and Pi3 use the wrong kernel modules .


(T, P, Tm=None, Tb=None, Tc=None, Psat=None)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None ) : if arg_2 and arg_0 <= arg_2 : return 's' elif arg_4 and arg_0 >= arg_4 : return 'g' elif arg_5 : if arg_1 <= arg_5 : return 'g' elif arg_1 > arg_5 : return 'l' elif arg_3 : if 9E4 < arg_1 < 1.1E5 : if arg_0 < arg_3 : return 'l' else : return 'g' elif arg_1 > 1.1E5 and arg_0 <= arg_3 : return 'l' else : return None else : return None

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None, arg_5=None):
    r'''Determines the phase of a one-species chemical system according to
    basic rules, using whatever information is available. Considers only the
    phases liquid, solid, and gas; does not consider two-phase
    scenarios, as should occurs between phase boundaries.

    * If the melting temperature is known and the temperature is under or equal
      to it, consider it a solid.
    * If the critical temperature is known and the temperature is greater or
      equal to it, consider it a gas.
    * If the vapor pressure at `T` is known and the pressure is under or equal
      to it, consider it a gas. If the pressure is greater than the vapor
      pressure, consider it a liquid.
    * If the melting temperature, critical temperature, and vapor pressure are
      not known, attempt to use the boiling point to provide phase information.
      If the pressure is between 90 kPa and 110 kPa (approximately normal),
      consider it a liquid if it is under the boiling temperature and a gas if
      above the boiling temperature.
    * If the pressure is above 110 kPa and the boiling temperature is known,
      consider it a liquid if the temperature is under the boiling temperature.
    * Return None otherwise.

    Parameters
    ----------
    T : float
        Temperature, [K]
    P : float
        Pressure, [Pa]
    Tm : float, optional
        Normal melting temperature, [K]
    Tb : float, optional
        Normal boiling point, [K]
    Tc : float, optional
        Critical temperature, [K]
    Psat : float, optional
        Vapor pressure of the fluid at `T`, [Pa]

    Returns
    -------
    phase : str
        Either 's', 'l', 'g', or None if the phase cannot be determined

    Notes
    -----
    No special attential is paid to any phase transition. For the case where
    the melting point is not provided, the possibility of the fluid being solid
    is simply ignored.

    Examples
    --------
    >>> Func(T=280, P=101325, Tm=273.15, Psat=991)
    'l'
    '''
    if arg_2 and arg_0 <= arg_2:
        return 's'
    elif arg_4 and arg_0 >= arg_4:
        # No special return value for the critical point
        return 'g'
    elif arg_5:
        # Do not allow co-existence of phases; transition to 'l' directly under
        if arg_1 <= arg_5:
            return 'g'
        elif arg_1 > arg_5:
            return 'l'
    elif arg_3:
        # Crude attempt to model phases without Psat
        # Treat Tb as holding from 90 kPa to 110 kPa
        if 9E4 < arg_1 < 1.1E5:
            if arg_0 < arg_3:
                return  'l'
            else:
                return 'g'
        elif arg_1 > 1.1E5 and arg_0 <= arg_3:
            # For the higher-pressure case, it is definitely liquid if under Tb
            # Above the normal boiling point, impossible to say - return None
            return 'l'
        else:
            return None
    else:
        return None

r'''Determines the phase of a one-species chemical system according to
    basic rules, using whatever information is available. Considers only the
    phases liquid, solid, and gas; does not consider two-phase
    scenarios, as should occurs between phase boundaries.

    * If the melting temperature is known and the temperature is under or equal
      to it, consider it a solid.
    * If the critical temperature is known and the temperature is greater or
      equal to it, consider it a gas.
    * If the vapor pressure at `T` is known and the pressure is under or equal
      to it, consider it a gas. If the pressure is greater than the vapor
      pressure, consider it a liquid.
    * If the melting temperature, critical temperature, and vapor pressure are
      not known, attempt to use the boiling point to provide phase information.
      If the pressure is between 90 kPa and 110 kPa (approximately normal),
      consider it a liquid if it is under the boiling temperature and a gas if
      above the boiling temperature.
    * If the pressure is above 110 kPa and the boiling temperature is known,
      consider it a liquid if the temperature is under the boiling temperature.
    * Return None otherwise.

    Parameters
    ----------
    T : float
        Temperature, [K]
    P : float
        Pressure, [Pa]
    Tm : float, optional
        Normal melting temperature, [K]
    Tb : float, optional
        Normal boiling point, [K]
    Tc : float, optional
        Critical temperature, [K]
    Psat : float, optional
        Vapor pressure of the fluid at `T`, [Pa]

    Returns
    -------
    phase : str
        Either 's', 'l', 'g', or None if the phase cannot be determined

    Notes
    -----
    No special attential is paid to any phase transition. For the case where
    the melting point is not provided, the possibility of the fluid being solid
    is simply ignored.

    Examples
    --------
    >>> identify_phase(T=280, P=101325, Tm=273.15, Psat=991)
    'l'

r Determines the phase of a one - species chemical system according to basic rules using whatever information is available . Considers only the phases liquid solid and gas ; does not consider two - phase scenarios as should occurs between phase boundaries .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_1 . get ( "authzid" ) if not arg_3 : return True try : arg_4 = JID ( arg_3 ) except ValueError : return False if "username" not in arg_1 : arg_5 = False elif arg_4 . local != arg_1 [ "username" ] : arg_5 = False elif arg_4 . domain != arg_2 . me . domain : arg_5 = False elif arg_4 . resource : arg_5 = False else : arg_5 = True return arg_5

def Func(arg_0, arg_1, arg_2):
        """Check authorization id and other properties returned by the
        authentication mechanism.

        [receiving entity only]

        Allow only no authzid or authzid equal to current username@domain

        FIXME: other rules in s2s

        :Parameters:
            - `properties`: data obtained during authentication
        :Types:
            - `properties`: mapping

        :return: `True` if user is authorized to use a provided authzid
        :returntype: `bool`
        """
        arg_3 = arg_1.get("authzid")
        if not arg_3:
            return True
        try:
            arg_4 = JID(arg_3)
        except ValueError:
            return False

        if "username" not in arg_1:
            arg_5 = False
        elif arg_4.local != arg_1["username"]:
            arg_5 = False
        elif arg_4.domain != arg_2.me.domain:
            arg_5 = False
        elif arg_4.resource:
            arg_5 = False
        else:
            arg_5 = True
        return arg_5

Check authorization id and other properties returned by the authentication mechanism .


def Func(arg_0, arg_1):
        """
        Check for message on subscribed channels and write to xcom the message with key ``message``

        An example of message ``{'type': 'message', 'pattern': None, 'channel': b'test', 'data': b'hello'}``

        :param context: the context object
        :type context: dict
        :return: ``True`` if message (with type 'message') is available or ``False`` if not
        """
        arg_0.log.info('RedisPubSubSensor checking for message on channels: %s', arg_0.channels)

        arg_2 = arg_0.pubsub.get_message()
        arg_0.log.info('Message %s from channel %s', arg_2, arg_0.channels)

        # Process only message types
        if arg_2 and arg_2['type'] == 'message':

            arg_1['ti'].xcom_push(key='message', value=arg_2)
            arg_0.pubsub.unsubscribe(arg_0.channels)

            return True

        return False

Check for message on subscribed channels and write to xcom the message with key message


def Func ( arg_0 , * arg_1 , ** arg_2 ) : arg_3 = string . Template ( * arg_1 , ** arg_2 ) for arg_4 in arg_0 : yield arg_3 . Func ( arg_4 )

def Func(arg_0, *arg_1, **arg_2):
    '''alias of string.Template.Func'''
    arg_3 = string.Template(*arg_1, **arg_2)
    for arg_4 in arg_0:
        yield arg_3.Func(arg_4)


return self._constructor(rdd, shape=shape, split=split).__finalize__(self)

def Func(arg_0, arg_1=None):
        """
        Remove one or more single-dimensional axes from the array.

        Parameters
        ----------
        axis : tuple or int
            One or more singleton axes to remove.
        """
        if not any([arg_2 == 1 for arg_2 in arg_0.shape]):
            return arg_0

        if arg_1 is None:
            arg_3 = where(asarray(arg_0.shape) == 1)[0]
        elif isinstance(arg_1, int):
            arg_3 = asarray((arg_1,))
        elif isinstance(arg_1, tuple):
            arg_3 = asarray(arg_1)
        else:
            raise ValueError("an integer or tuple is required for the axis")

        if any([arg_0.shape[arg_4] > 1 for arg_4 in arg_3]):
            raise ValueError("cannot select an axis to Func out which has size greater than one")

        if any(asarray(arg_3) < arg_0.split):
            arg_5 = set([arg_2 for arg_2 in arg_3 if arg_2 < arg_0.split])
            arg_6 = lambda k: tuple([kk for ii, kk in enumerate(k) if ii not in arg_5])
        else:
            arg_6 = lambda k: k

        if any(asarray(arg_3) >= arg_0.split):
            arg_7 = tuple([arg_2 - arg_0.split for arg_2 in arg_3 if arg_2 >= arg_0.split])
            arg_8 = lambda v: v.Func(arg_7)
        else:
            arg_8 = lambda v: v

        arg_9 = arg_0._rdd.map(lambda kv: (arg_6(kv[0]), arg_8(kv[1])))
        arg_10 = tuple([ss for ii, ss in enumerate(arg_0.shape) if ii not in arg_3])
        arg_11 = len([arg_2 for arg_2 in range(arg_0.keys.ndim) if arg_2 not in arg_3])
        return arg_0._constructor(arg_9, arg_10=arg_10, arg_11=arg_11).__finalize__(arg_0)

Remove one or more single - dimensional axes from the array .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . rpc . get_account ( arg_1 ) arg_3 = arg_0 . getPrivateKeyForPublicKey ( arg_2 [ "options" ] [ "memo_key" ] ) if arg_3 : return arg_3 return False

def Func(arg_0, arg_1):
        """ Obtain owner Memo Key for an account from the wallet database
        """
        arg_2 = arg_0.rpc.get_account(arg_1)
        arg_3 = arg_0.getPrivateKeyForPublicKey(arg_2["options"]["memo_key"])
        if arg_3:
            return arg_3
        return False


def
Func
(
arg_0
)
:
arg_1
=
list
(
map
(
str
,
list
(
arg_0
.
capabilities
(
)
)
)
)
for
arg_2
in
range
(
len
(
arg_1
)
)
:
arg_1
[
arg_2
]
=
str
(
arg_1
[
arg_2
]
)
.
replace
(
"b'"
,
""
)
.
replace
(
"'"
,
""
)
logger
.
debug
(
"IMAP server supports: {0}"
.
format
(
arg_1
)
)
return
arg_1

def Func(arg_0):
    """
    Returns a list of an IMAP server's capabilities

    Args:
        server (imapclient.IMAPClient): An instance of imapclient.IMAPClient

    Returns (list): A list of capabilities
    """

    arg_1 = list(map(str, list(arg_0.capabilities())))
    for arg_2 in range(len(arg_1)):
        arg_1[arg_2] = str(arg_1[arg_2]).replace("b'",
                                                       "").replace("'",
                                                                   "")
    logger.debug("IMAP server supports: {0}".format(arg_1))

    return arg_1

Returns a list of an IMAP server s capabilities


def Func ( arg_0 ) : assert arg_0 [ 'Content-Type' ] . startswith ( "text/markdown" ) del arg_0 [ 'Content-Type' ] arg_0 = make_message_multipart ( arg_0 ) for arg_1 in set ( arg_0 . get_payload ( ) ) : if arg_1 [ 'Content-Type' ] . startswith ( 'text/plain' ) : arg_2 = arg_1 . get_payload ( ) arg_3 = markdown . markdown ( arg_2 ) arg_4 = future . backports . email . mime . text . MIMEText ( "{}" . format ( arg_3 ) , "html" , ) arg_0 . attach ( arg_4 ) return arg_0

def Func(arg_0):
    """Convert markdown in message text to HTML."""
    assert arg_0['Content-Type'].startswith("text/markdown")
    del arg_0['Content-Type']
    # Convert the text from markdown and then make the message multipart
    arg_0 = make_message_multipart(arg_0)
    for arg_1 in set(arg_0.get_payload()):
        # Assume the plaintext item is formatted with markdown.
        # Add corresponding HTML version of the item as the last part of
        # the multipart message (as per RFC 2046)
        if arg_1['Content-Type'].startswith('text/plain'):
            arg_2 = arg_1.get_payload()
            arg_3 = markdown.markdown(arg_2)
            arg_4 = future.backports.email.mime.text.MIMEText(
                "{}".format(arg_3),
                "html",
            )
            arg_0.attach(arg_4)
    return arg_0

Convert markdown in message text to HTML .


(y, top_db=60, ref=np.max, frame_length=2048, hop_length=512)

def Func(arg_0, arg_1=60, arg_2=arg_3.max, arg_5=2048, arg_6=512):
    '''Split an audio signal into non-silent intervals.

    Parameters
    ----------
    y : np.ndarray, shape=(n,) or (2, n)
        An audio signal

    top_db : number > 0
        The threshold (in decibels) below reference to consider as
        silence

    ref : number or callable
        The reference power.  By default, it uses `np.max` and compares
        to the peak power in the signal.

    frame_length : int > 0
        The number of samples per analysis frame

    hop_length : int > 0
        The number of samples between analysis frames

    Returns
    -------
    intervals : np.ndarray, shape=(m, 2)
        `intervals[i] == (start_i, end_i)` are the start and end time
        (in samples) of non-silent interval `i`.

    '''

    arg_7 = _signal_to_frame_nonsilent(arg_0,
                                            arg_5=arg_5,
                                            arg_6=arg_6,
                                            arg_2=arg_2,
                                            arg_1=arg_1)

    # Interval slicing, adapted from
    # https://stackoverflow.com/questions/2619413/efficiently-finding-the-interval-with-non-zeros-in-scipy-numpy-in-python
    # Find points where the sign flips
    arg_8 = arg_3.flatnonzero(arg_3.diff(arg_7.astype(int)))

    # Pad back the sample lost in the diff
    arg_8 = [arg_8 + 1]

    # If the first frame had high energy, count it
    if arg_7[0]:
        arg_8.insert(0, [0])

    # Likewise for the last frame
    if arg_7[-1]:
        arg_8.append([len(arg_7)])

    # Convert from frames to samples
    arg_8 = core.frames_to_samples(arg_3.concatenate(arg_8),
                                   arg_6=arg_6)

    # Clip to the signal duration
    arg_8 = arg_3.minimum(arg_8, arg_0.shape[-1])

    # Stack the results back as an ndarray
    return arg_8.reshape((-1, 2))

Split an audio signal into non - silent intervals .


def Func ( arg_0 ) : arg_1 = EmailConfirmation . objects . create ( email = arg_0 ) arg_1 . send ( )

def Func(arg_0):
        """
        Send a verification email for the email address.
        """
        arg_1 = EmailConfirmation.objects.create(email=arg_0)
        arg_1.send()

Send a verification email for the email address .


def Func(arg_0, arg_1):
        """Handle updating and scrolling when a new event is added.

        Automatically scroll down to show the new text if the bottom is
        showing. This allows the user to scroll up to read previous messages
        while new messages are arriving.
        """
        if not arg_0._is_scrolling:
            arg_0.set_focus(arg_1.id_)
        else:
            arg_0._modified()

Handle updating and scrolling when a new event is added .


def Func ( arg_0 ) : if arg_0 . Func_with : return substrings ( arg_0 . regex , arg_0 . Func_with , arg_0 . data , arg_0 . occurences , ) return arg_0 . data

def Func(arg_0):
        """
        Used to Func a matched string with another.

        :return: The data after Funcment.
        :rtype: str
        """

        if arg_0.Func_with:  # pylint: disable=no-member
            return substrings(
                arg_0.regex,
                arg_0.Func_with,  # pylint: disable=no-member
                arg_0.data,
                arg_0.occurences,  # pylint: disable=no-member
            )

        return arg_0.data

Used to replace a matched string with another.

        :return: The data after replacement.
        :rtype: str

Used to replace a matched string with another .


Delegate the actions specified in 'arg' to another
        method.

def
Func
(
arg_0
,
arg_1
)
:
if
not
arg_1
:
arg_0
.
info_signal
(
[
'handle'
]
)
return
True
arg_2
=
arg_1
.
split
(
)
arg_3
=
arg_2
[
0
]
arg_3
=
arg_0
.
is_name_or_number
(
arg_2
[
0
]
)
if
not
arg_3
:
return
if
len
(
arg_2
)
==
1
:
arg_0
.
info_signal
(
[
arg_3
]
)
return
True
if
arg_3
in
fatal_signals
:
return
if
arg_3
not
in
list
(
arg_0
.
sigs
.
keys
(
)
)
:
if
not
arg_0
.
initialize_handler
(
arg_3
)
:
return
pass
for
arg_4
in
arg_2
[
1
:
]
:
if
arg_4
.
startswith
(
'no'
)
:
arg_5
=
False
arg_4
=
arg_4
[
2
:
]
else
:
arg_5
=
True
if
'stop'
.
startswith
(
arg_4
)
:
arg_0
.
handle_stop
(
arg_3
,
arg_5
)
elif
'print'
.
startswith
(
arg_4
)
and
len
(
arg_4
)
>=
2
:
arg_0
.
handle_print
(
arg_3
,
arg_5
)
elif
'pass'
.
startswith
(
arg_4
)
:
arg_0
.
handle_pass
(
arg_3
,
arg_5
)
elif
'ignore'
.
startswith
(
arg_4
)
:
arg_0
.
handle_ignore
(
arg_3
,
arg_5
)
elif
'stack'
.
startswith
(
arg_4
)
:
arg_0
.
handle_print_stack
(
arg_3
,
arg_5
)
else
:
arg_0
.
dbgr
.
intf
[
1
]
.
errmsg
(
'Invalid arguments'
)
pass
pass
return
arg_0
.
check_and_adjust_sighandler
(
arg_3
,
arg_0
.
sigs
)

def Func(arg_0, arg_1):
        """Delegate the Funcs specified in 'arg' to another
        method.
        """
        if not arg_1:
            arg_0.info_signal(['handle'])
            return True
        arg_2 = arg_1.split()
        arg_3 = arg_2[0]
        arg_3 = arg_0.is_name_or_number(arg_2[0])
        if not arg_3: return

        if len(arg_2) == 1:
            arg_0.info_signal([arg_3])
            return True
        # We can display information about 'fatal' signals, but not
        # change their Funcs.
        if arg_3 in fatal_signals:
            return None

        if arg_3 not in list(arg_0.sigs.keys()):
            if not arg_0.initialize_handler(arg_3): return None
            pass

        # multiple commands might be specified, i.e. 'nopass nostop'
        for arg_4 in arg_2[1:]:
            if arg_4.startswith('no'):
                arg_5 = False
                arg_4 = arg_4[2:]
            else:
                arg_5 = True
            if 'stop'.startswith(arg_4):
                arg_0.handle_stop(arg_3, arg_5)
            elif 'print'.startswith(arg_4) and len(arg_4) >= 2:
                arg_0.handle_print(arg_3, arg_5)
            elif 'pass'.startswith(arg_4):
                arg_0.handle_pass(arg_3, arg_5)
            elif 'ignore'.startswith(arg_4):
                arg_0.handle_ignore(arg_3, arg_5)
            elif 'stack'.startswith(arg_4):
                arg_0.handle_print_stack(arg_3, arg_5)
            else:
                arg_0.dbgr.intf[-1].errmsg('Invalid arguments')
                pass
            pass
        return arg_0.check_and_adjust_sighandler(arg_3, arg_0.sigs)

Delegate the actions specified in arg to another method .


def Func(arg_0, **arg_1):
    """Declare a function or method to be a Yaz Func

    @yaz.Func
    def talk(message: str = "Hello World!"):
        return message

    Or... group multiple Funcs together

    class Tools(yaz.Plugin):
        @yaz.Func
        def say(self, message: str = "Hello World!"):
            return message

        @yaz.Func(option__choices=["A", "B", "C"])
        def choose(self, option: str = "A"):
            return option
    """
    if arg_0.__name__ == arg_0.__qualname__:
        assert not arg_0.__qualname__ in arg_2, "Can not define the same Func \"{}\" twice".format(arg_0.__qualname__)
        logger.debug("Found Func %s", arg_0)
        arg_2[arg_0.__qualname__] = Task(plugin_class=None, arg_0=arg_0, arg_1=arg_1)
    else:
        arg_0.yaz_Func_config = arg_1

    return arg_0

Declare a function or method to be a Yaz task

    @yaz.task
    def talk(message: str = "Hello World!"):
        return message

    Or... group multiple tasks together

    class Tools(yaz.Plugin):
        @yaz.task
        def say(self, message: str = "Hello World!"):
            return message

        @yaz.task(option__choices=["A", "B", "C"])
        def choose(self, option: str = "A"):
            return option


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . _control . textCursor ( ) arg_3 . setPosition ( arg_1 ) arg_3 . setPosition ( arg_2 , QtGui . QTextCursor . KeepAnchor ) return arg_3

def Func(arg_0, arg_1, arg_2):
        """ Convenience method that returns a cursor with text selected between
            the positions 'start' and 'end'.
        """
        arg_3 = arg_0._control.textCursor()
        arg_3.setPosition(arg_1)
        arg_3.setPosition(arg_2, QtGui.QTextCursor.KeepAnchor)
        return arg_3

Convenience method that returns a cursor with text selected between the positions start and end .


def Func ( arg_0 , arg_1 = False ) : arg_2 = [ ] arg_3 = [ ] for arg_4 in arg_0 : with open ( arg_4 ) as infile : arg_5 = infile . read ( ) arg_6 = arg_5 . split ( ".mcmc.txt\n\n" ) [ 1 : ] arg_7 = arg_6 [ 0 ] . split ( "\n\n" ) [ 0 ] . split ( ) arg_8 = ( ( ( len ( arg_7 ) - 3 ) / 4 ) , 4 ) arg_5 = np . array ( arg_7 [ 3 : ] ) . reshape ( arg_8 ) arg_2 . append ( arg_5 [ : , 3 ] . astype ( float ) ) if not arg_1 : arg_2 = np . array ( arg_2 ) arg_2 = arg_2 . sum ( axis = 0 ) / len ( arg_0 ) arg_5 [ : , 3 ] = arg_2 . astype ( str ) arg_9 = pd . DataFrame ( arg_5 [ : , 1 : ] ) arg_9 . columns = [ "delim" , "prior" , "posterior" ] arg_11 = 1 + np . array ( [ list ( arg_13 ) for arg_13 in arg_5 [ : , 1 ] ] , dtype = int ) . sum ( axis = 1 ) arg_9 [ "nspecies" ] = arg_11 return arg_9 else : arg_12 = [ ] for arg_13 in xrange ( len ( arg_2 ) ) : arg_14 = arg_5 arg_14 [ : , 3 ] = arg_2 [ arg_13 ] . astype ( str ) arg_14 = pd . DataFrame ( arg_14 [ : , 1 : ] ) arg_14 . columns = [ 'delim' , 'prior' , 'posterior' ] arg_11 = 1 + np . array ( [ list ( arg_13 ) for arg_13 in arg_5 [ : , 1 ] ] , dtype = int ) . sum ( axis = 1 ) arg_14 [ "nspecies" ] = arg_11 arg_12 . append ( arg_14 ) return arg_12

def Func(arg_0, arg_1=False):
    """
    a subfunction for summarizing results
    """

    ## parse results from outfiles
    arg_2 = []
    arg_3 = []
    for arg_4 in arg_0:

        ## parse file
        with open(arg_4) as infile:
            arg_5  = infile.read()
        arg_6 = arg_5.split(".mcmc.txt\n\n")[1:]
        arg_7 = arg_6[0].split("\n\n")[0].split()

        ## get shape from ...
        arg_8 = (((len(arg_7) - 3) / 4), 4)
        arg_5 = np.array(arg_7[3:]).reshape(arg_8)
        arg_2.append(arg_5[:, 3].astype(float))

    if not arg_1:
        ## get mean results across reps
        arg_2 = np.array(arg_2)
        arg_2 = arg_2.sum(axis=0) / len(arg_0) #10.
        arg_5[:, 3] = arg_2.astype(str)

        ## format as a DF
        arg_9 = pd.DataFrame(arg_5[:, 1:])
        arg_9.columns = ["delim", "prior", "posterior"]
        arg_11 = 1 + np.array([list(arg_13) for arg_13 in arg_5[:, 1]], dtype=int).sum(axis=1)
        arg_9["nspecies"] = arg_11
        return arg_9

    else:
        ## get mean results across reps
        #return cols
        arg_12 = []
        for arg_13 in xrange(len(arg_2)):
            arg_14 = arg_5
            arg_14[:, 3] = arg_2[arg_13].astype(str)
            arg_14 = pd.DataFrame(arg_14[:, 1:])
            arg_14.columns = ['delim', 'prior', 'posterior']
            arg_11 = 1 + np.array([list(arg_13) for arg_13 in arg_5[:, 1]], dtype=int).sum(axis=1)
            arg_14["nspecies"] = arg_11
            arg_12.append(arg_14)
        return arg_12


def Func(arg_0, arg_1, arg_2, arg_3):
        '''Generate and return PBKDF2 key'''

        if arg_0 not in arg_1:
            raise Exception('Passphrase not defined for id: %d' % arg_0)

        arg_4 = arg_1[arg_0]

        if len(arg_4) < 32:
            raise Exception('Passphrase less than 32 characters long')

        arg_5 = EncryptedPickle._get_hashlib(arg_3['pbkdf2_algorithm'])

        arg_6 = PBKDF2(arg_4, arg_2,
                         iterations=arg_3['pbkdf2_iterations'],
                         digestmodule=arg_5)

        return arg_6.read(arg_3['key_size'])


def Func ( arg_0 ) : for arg_1 in arg_0 : if isinstance ( arg_1 , Iterable ) and not isinstance ( arg_1 , string_types ) : for arg_2 in Func ( arg_1 ) : yield arg_2 else : yield arg_1

def Func(arg_0):
    """
    Given an iterable with nested iterables, generate a flat iterable
    """
    for arg_1 in arg_0:
        if isinstance(arg_1, Iterable) and not isinstance(arg_1, string_types):
            for arg_2 in Func(arg_1):
                yield arg_2
        else:
            yield arg_1

Given an iterable with nested iterables generate a flat iterable


def Func(arg_0, arg_1, arg_2):
        """
        Add new promo rule to a store

        :param store_id: The store id
        :type store_id: :py:class:`str`
        :param data: The request body parameters
        :type data: :py:class:`dict'
        data = {
            "id": string*,
            "title": string,
            "description": string*,
            "starts_at": string,
            "ends_at": string,
            "amount": number*,
            "type": string*,
            "target": string*,
            "enabled": boolean,
            "Funcd_at_foreign": string,
            "updated_at_foreign": string,
        }
        """
        arg_0.store_id = arg_1
        if 'id' not in arg_2:
            raise KeyError('The promo rule must have an id')
        if 'description' not in arg_2:
            raise KeyError('This promo rule must have a description')
        if 'amount' not in arg_2:
            raise KeyError('This promo rule must have an amount')
        if 'target' not in arg_2:
            raise KeyError('This promo rule must apply to a target (example per_item, total, or shipping')
        arg_3 = arg_0._mc_client._post(url=arg_0._build_path(arg_1, 'promo-rules'), arg_2=arg_2)

        if arg_3 is not None:
            return arg_3

Add new promo rule to a store

        :param store_id: The store id
        :type store_id: :py:class:`str`
        :param data: The request body parameters
        :type data: :py:class:`dict'
        data = {
            "id": string*,
            "title": string,
            "description": string*,
            "starts_at": string,
            "ends_at": string,
            "amount": number*,
            "type": string*,
            "target": string*,
            "enabled": boolean,
            "created_at_foreign": string,
            "updated_at_foreign": string,
        }


(self, start=None, end=None, labelFilter=None)

def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
,
arg_3
=
)
:
if
len
(
arg_0
.
_recordsCache
)
==
0
:
raise
HTMPredictionModelInvalidRangeError
(
"Invalid supplied range for "
"'Func'. Model has no saved records."
)
try
:
arg_1
=
int
(
arg_1
)
except
Exception
:
arg_1
=
0
try
:
arg_2
=
int
(
arg_2
)
except
Exception
:
arg_2
=
arg_0
.
_recordsCache
[
1
]
.
ROWID
arg_4
=
arg_0
.
_recordsCache
[
0
]
.
ROWID
arg_5
=
0
if
arg_1
is
else
max
(
0
,
arg_1
arg_4
)
arg_6
=
len
(
arg_0
.
_recordsCache
)
if
arg_2
is
else
max
(
0
,
min
(
len
(
arg_0
.
_recordsCache
)
,
arg_2
arg_4
)
)
if
arg_6
<=
arg_5
:
raise
HTMPredictionModelInvalidRangeError
(
"Invalid supplied range for "
"'Func'."
,
debugInfo
=
{
'requestRange'
:
{
'startRecordID'
:
arg_1
,
'endRecordID'
:
arg_2
}
,
'clippedRequestRange'
:
{
'startRecordID'
:
arg_5
,
'endRecordID'
:
arg_6
}
,
'validRange'
:
{
'startRecordID'
:
arg_4
,
'endRecordID'
:
arg_0
.
_recordsCache
[
len
(
arg_0
.
_recordsCache
)
1
]
.
ROWID
}
,
'numRecordsStored'
:
len
(
arg_0
.
_recordsCache
)
}
)
arg_7
=
[
]
for
arg_8
in
arg_0
.
_recordsCache
[
arg_5
:
arg_6
]
:
if
arg_3
is
not
:
if
arg_3
in
arg_8
.
anomalyLabel
:
arg_8
.
anomalyLabel
.
remove
(
arg_3
)
else
:
arg_8
.
anomalyLabel
=
[
]
arg_8
.
setByUser
=
False
arg_7
.
append
(
arg_8
)
arg_0
.
_deleteRecordsFromKNN
(
arg_7
)
arg_0
.
_deleteRangeFromKNN
(
arg_1
,
arg_2
)
for
arg_8
in
arg_0
.
_recordsCache
[
arg_6
:
]
:
arg_0
.
_classifyState
(
arg_8
)

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
    """
    Remove labels from each record with record ROWID in range from
    ``start`` to ``end``, noninclusive of end. Removes all records if
    ``labelFilter`` is None, otherwise only removes the labels equal to
    ``labelFilter``.

    This will recalculate all points from end to the last record stored in the
    internal cache of this classifier.

    :param start: (int) start index
    :param end: (int) end index (noninclusive)
    :param labelFilter: (string) label filter
    """
    if len(arg_0._recordsCache) == 0:
      raise HTMPredictionModelInvalidRangeError("Invalid supplied range for "
        "'Func'. Model has no saved records.")

    try:
      arg_1 = int(arg_1)
    except Exception:
      arg_1 = 0

    try:
      arg_2 = int(arg_2)
    except Exception:
      arg_2 = arg_0._recordsCache[-1].ROWID

    arg_4 = arg_0._recordsCache[0].ROWID

    arg_5 = 0 if arg_1 is None else max(0, arg_1 - arg_4)
    arg_6 = len(arg_0._recordsCache) if arg_2 is None else \
      max(0, min( len( arg_0._recordsCache) , arg_2 - arg_4))

    if arg_6 <= arg_5:
      raise HTMPredictionModelInvalidRangeError("Invalid supplied range for "
        "'Func'.", debugInfo={
          'requestRange': {
            'startRecordID': arg_1,
            'endRecordID': arg_2
          },
          'clippedRequestRange': {
            'startRecordID': arg_5,
            'endRecordID': arg_6
          },
          'validRange': {
            'startRecordID': arg_4,
            'endRecordID': arg_0._recordsCache[len(arg_0._recordsCache)-1].ROWID
          },
          'numRecordsStored': len(arg_0._recordsCache)
        })

    # Remove records within the cache
    arg_7 = []
    for arg_8 in arg_0._recordsCache[arg_5:arg_6]:
      if arg_3 is not None:
        if arg_3 in arg_8.anomalyLabel:
          arg_8.anomalyLabel.remove(arg_3)
      else:
        arg_8.anomalyLabel = []
      arg_8.setByUser = False
      arg_7.append(arg_8)
    arg_0._deleteRecordsFromKNN(arg_7)

    # Remove records not in cache
    arg_0._deleteRangeFromKNN(arg_1, arg_2)

    # Recompute [clippedEnd, ...)
    for arg_8 in arg_0._recordsCache[arg_6:]:
      arg_0._classifyState(arg_8)

Remove labels from each record with record ROWID in range from start to end noninclusive of end . Removes all records if labelFilter is None otherwise only removes the labels equal to labelFilter .


"""\SELECT row_to_json(combined_rows) FROM (  SELECT id, created, publisher, publication_message,         (select array_agg(row_to_json(pd))          from pending_documents as pd          where pd.publication_id = p.id) AS models  FROM publications AS p  WHERE state = 'Waiting for moderation') AS combined_rows"""

def Func(arg_0):
    """Return the list of publications that need moderation."""
    with db_connect() as db_conn:
        with db_conn.cursor() as cursor:
            cursor.execute("""\
SELECT row_to_json(combined_rows) FROM (
  SELECT id, created, publisher, publication_message,
         (select array_agg(row_to_json(pd))
          from pending_documents as pd
          where pd.publication_id = p.id) AS models
  FROM publications AS p
  WHERE state = 'Waiting for moderation') AS combined_rows""")
            arg_1 = [x[0] for x in cursor.fetchall()]

    return arg_1

Return the list of publications that need moderation .


return self.call_method(method_name, packet, *args)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
*
arg_3
)
:
if
not
arg_0
.
is_method_allowed
(
arg_1
)
:
arg_0
.
error
(
'method_access_denied'
,
'You do not have access to method "%s"'
%
arg_1
)
return
return
arg_0
.
call_method
(
arg_1
,
arg_2
,
*
arg_3
)

def Func(arg_0, arg_1, arg_2, *arg_3):
        """You should always use this function to call the methods,
        as it checks if the user is allowed according to the ACLs.

        If you override :meth:`process_packet` or
        :meth:`process_event`, you should definitely want to use this
        instead of ``getattr(self, 'my_method')()``
        """
        if not arg_0.is_method_allowed(arg_1):
            arg_0.error('method_access_denied',
                       'You do not have access to method "%s"' % arg_1)
            return

        return arg_0.call_method(arg_1, arg_2, *arg_3)

You should always use this function to call the methods as it checks if the user is allowed according to the ACLs .


def Func ( arg_0 , arg_1 ) : super ( WebComponent , arg_0 ) . Func ( arg_1 ) if arg_1 . widget is not None : for arg_2 , arg_3 in enumerate ( arg_0 . children ( ) ) : if arg_3 == arg_1 : arg_0 . widget . insert ( arg_2 , arg_1 . widget ) break

def Func(arg_0, arg_1):
        """ Handle the child added event from the declaration.

        This handler will insert the child toolkit widget in the correct.
        position. Subclasses which need more control should reimplement this
        method.

        """
        super(WebComponent, arg_0).Func(arg_1)
        if arg_1.widget is not None:
            # Use insert to put in the correct spot
            for arg_2, arg_3 in enumerate(arg_0.children()):
                if arg_3 == arg_1:
                    arg_0.widget.insert(arg_2, arg_1.widget)
                    break

Handle the child added event from the declaration .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
{
}
for
arg_3
,
arg_4
in
arg_1
.
items
(
)
:
arg_5
=
{
}
if
arg_4
.
description
:
arg_5
[
'description'
]
=
arg_4
.
description
else
:
raise
CorniceSwaggerException
(
'Responses must have a description.'
)
for
arg_6
in
arg_4
.
children
:
arg_7
=
arg_6
.
name
if
arg_7
==
'body'
:
arg_8
=
arg_6
.
__class__
.
__name__
if
arg_8
==
'body'
:
arg_8
=
arg_4
.
__class__
.
__name__
+
'Body'
arg_6
.
title
=
arg_8
arg_5
[
'schema'
]
=
arg_0
.
definitions
.
from_schema
(
arg_6
)
elif
arg_7
in
(
'header'
,
'headers'
)
:
arg_9
=
arg_0
.
type_converter
(
arg_6
)
arg_10
=
arg_9
.
get
(
'properties'
)
if
arg_10
:
for
arg_11
in
arg_10
.
values
(
)
:
arg_11
.
pop
(
'title'
)
arg_5
[
'headers'
]
=
arg_10
arg_12
=
arg_4
.
__class__
.
__name__
if
arg_0
.
ref
:
arg_5
=
arg_0
.
_ref
(
arg_5
,
arg_12
)
arg_2
[
arg_3
]
=
arg_5
return
arg_2

def Func(arg_0, arg_1):
        """
        Creates a Swagger response object from a dict of response schemas.

        :param schema_mapping:
            Dict with entries matching ``{status_code: response_schema}``.
        :rtype: dict
        :returns: Response schema.
        """

        arg_2 = {}

        for arg_3, arg_4 in arg_1.items():

            arg_5 = {}
            if arg_4.description:
                arg_5['description'] = arg_4.description
            else:
                raise CorniceSwaggerException('Responses must have a description.')

            for arg_6 in arg_4.children:
                arg_7 = arg_6.name

                if arg_7 == 'body':
                    arg_8 = arg_6.__class__.__name__
                    if arg_8 == 'body':
                        arg_8 = arg_4.__class__.__name__ + 'Body'
                    arg_6.title = arg_8
                    arg_5['schema'] = arg_0.definitions.from_schema(arg_6)

                elif arg_7 in ('header', 'headers'):
                    arg_9 = arg_0.type_converter(arg_6)
                    arg_10 = arg_9.get('properties')
                    if arg_10:
                        # Response headers doesn't accept titles
                        for arg_11 in arg_10.values():
                            arg_11.pop('title')

                        arg_5['headers'] = arg_10

            arg_12 = arg_4.__class__.__name__
            if arg_0.ref:
                arg_5 = arg_0._ref(arg_5, arg_12)
            arg_2[arg_3] = arg_5

        return arg_2

Creates a Swagger response object from a dict of response schemas .


def Func ( arg_0 , arg_1 = None ) : arg_2 = arg_0 . _json_request ( 'get' , arg_0 . root_url + '/user/tokens/' ) arg_3 = [ arg_5 [ 'type' ] == 'long_lived' for arg_5 in arg_2 ] if any ( arg_3 ) : arg_4 = arg_2 [ arg_3 . index ( True ) ] else : arg_4 = arg_0 . _json_request ( 'post' , arg_0 . root_url + '/user/tokens/' ) arg_5 = arg_4 [ 'token' ] arg_1 = arg_1 or get_token_filename ( ) if os . path . exists ( arg_1 ) : arg_6 = json . load ( open ( arg_1 ) ) else : arg_6 = { } arg_6 [ arg_7 ( arg_0 . root_url ) . netloc ] = arg_5 arg_10 , arg_11 = os . path . split ( arg_1 ) if arg_10 and not os . path . exists ( arg_10 ) : os . makedirs ( arg_10 ) with open ( arg_1 , 'w' ) as f : json . dump ( arg_6 , f ) return arg_5

def Func(arg_0, arg_1=None):
        """
        Obtain the user's long-lived API token and save it in a local file.
        If the user has no long-lived API token, one will be created.
        Returns the token that was saved.
        """
        arg_2 = arg_0._json_request('get', arg_0.root_url + '/user/tokens/')
        arg_3 = [arg_5['type'] == 'long_lived' for arg_5 in arg_2]
        if any(arg_3):
            arg_4 = arg_2[arg_3.index(True)]
        else:
            # User doesn't have a long-lived token, so create one
            arg_4 = arg_0._json_request('post', arg_0.root_url + '/user/tokens/')
        arg_5 = arg_4['token']
        arg_1 = arg_1 or get_token_filename()
        if os.path.exists(arg_1):
            arg_6 = json.load(open(arg_1))
        else:
            arg_6 = {}
        arg_6[arg_7(arg_0.root_url).netloc] = arg_5
        arg_10, arg_11 = os.path.split(arg_1)
        if arg_10 and not os.path.exists(arg_10):
            os.makedirs(arg_10)
        with open(arg_1, 'w') as f:
            json.dump(arg_6, f)
        return arg_5

Obtain the user s long - lived API token and save it in a local file . If the user has no long - lived API token one will be created . Returns the token that was saved .


def Func(arg_0, arg_1):
        """
        Build and return an ExtractedLicense or None.
        Note that this function adds the license to the document.
        """
        arg_2 = arg_0.parse_only_extr_license(arg_1)
        if arg_2 is not None:
            arg_0.doc.add_extr_lic(arg_2)
        return arg_2

Build and return an ExtractedLicense or None . Note that this function adds the license to the document .


def Func ( ) : try : arg_0 = logging . StreamHandler ( stream = sys . stdout ) except TypeError : arg_0 = logging . StreamHandler ( strm = sys . stdout ) arg_1 = get_log ( ) arg_1 . addHandler ( arg_0 ) arg_1 . setLevel ( logging . INFO ) arg_1 . propagate = False

def Func():
    """Configure root logger.
    """
    try:
        arg_0 = logging.StreamHandler(stream=sys.stdout)
    except TypeError:  # pragma: no cover
        arg_0 = logging.StreamHandler(strm=sys.stdout)

    arg_1 = get_log()
    arg_1.addHandler(arg_0)
    arg_1.setLevel(logging.INFO)
    arg_1.propagate = False


return self.generate_log_for_tag(
            filtered_pull_requests, filtered_issues,
            newer_tag, older_tag_name)

def Func(arg_0, arg_1, arg_2):
        """
        Generate log between 2 specified tags.

        :param dict older_tag: All issues before this tag's date will be
                               excluded. May be special value, if new tag is
                               the first tag. (Means **older_tag** is when
                               the repo was created.)
        :param dict newer_tag: All issues after this tag's date  will be
                               excluded. May be title of unreleased section.
        :rtype: str
        :return: Generated ready-to-add tag section for newer tag.
        """

        arg_3, arg_4 = \
            arg_0.filter_issues_for_tags(arg_2, arg_1)

        arg_5 = arg_1["name"] if arg_1 \
            else arg_0.detect_since_tag()

        if not arg_3 and not arg_4:
            # do not generate an unreleased section if it would be empty
            return ""
        return arg_0.generate_log_for_tag(
            arg_4, arg_3,
            arg_2, arg_5)


def Func(arg_0):
        """Run the linter."""
        arg_1 = 'pep8radius {branch} {{fix: --in-place}}{{verbose: -vv}}'
        arg_1 = arg_1.format(branch=arg_0.branch)
        arg_0.call_and_exit(arg_0.apply_options(arg_1, ('fix', )))


def
Func
(
arg_0
,
arg_1
=
)
:
if
not
hasattr
(
arg_0
,
'document'
)
or
arg_0
.
document
is
:
arg_0
.
document
=
arg_0
.
document_type
(
)
arg_0
.
form
=
MongoModelForm
(
model
=
arg_0
.
document_type
,
instance
=
arg_0
.
document
,
form_post_data
=
arg_0
.
request
.
POST
)
.
get_form
(
)
arg_0
.
form
.
is_bound
=
True
if
arg_0
.
form
.
is_valid
(
)
:
arg_0
.
document_map_dict
=
MongoModelForm
(
model
=
arg_0
.
document_type
)
.
create_document_dictionary
(
arg_0
.
document_type
)
arg_0
.
new_document
=
arg_0
.
document_type
arg_0
.
embedded_list_docs
=
{
}
if
arg_0
.
new_document
is
:
messages
.
error
(
arg_0
.
request
,
u"Failed to save document"
)
else
:
arg_0
.
new_document
=
arg_0
.
new_document
(
)
for
arg_8
in
arg_0
.
form
.
cleaned_data
.
keys
(
)
:
if
arg_8
==
'id'
and
hasattr
(
arg_0
,
'document'
)
:
arg_0
.
new_document
.
id
=
arg_0
.
document
.
id
continue
arg_0
.
process_document
(
arg_0
.
new_document
,
arg_8
,
)
arg_0
.
new_document
.
save
(
)
if
arg_1
:
messages
.
success
(
arg_0
.
request
,
arg_1
)
return
arg_0
.
form

def Func(arg_0, arg_1=None):
        """
        As long as the form is set on the view this method will validate the form
        and save the submitted data.  Only call this if you are posting data.
        The given success_message will be used with the djanog messages framework
        if the posted data sucessfully submits.
        """

        # When on initial args are given we need to set the base document.
        if not hasattr(arg_0, 'document') or arg_0.document is None:
            arg_0.document = arg_0.document_type()
        arg_0.form = MongoModelForm(model=arg_0.document_type, instance=arg_0.document,
                                   form_post_data=arg_0.request.POST).get_form()
        arg_0.form.is_bound = True
        if arg_0.form.is_valid():

            arg_0.document_map_dict = MongoModelForm(model=arg_0.document_type).create_document_dictionary(arg_0.document_type)
            arg_0.new_document = arg_0.document_type

            # Used to keep track of embedded documents in lists.  Keyed by the list and the number of the
            # document.
            arg_0.embedded_list_docs = {}

            if arg_0.new_document is None:
                messages.error(arg_0.request, u"Failed to save document")
            else:
                arg_0.new_document = arg_0.new_document()

                for arg_8 in arg_0.form.cleaned_data.keys():
                    if arg_8 == 'id' and hasattr(arg_0, 'document'):
                        arg_0.new_document.id = arg_0.document.id
                        continue
                    arg_0.process_document(arg_0.new_document, arg_8, None)

                arg_0.new_document.save()
                if arg_1:
                    messages.success(arg_0.request, arg_1)

        return arg_0.form

As long as the form is set on the view this method will validate the form and save the submitted data . Only call this if you are posting data . The given success_message will be used with the djanog messages framework if the posted data sucessfully submits .


def
Func
(
arg_0
)
:
for
arg_1
in
arg_0
.
_potential_wins
(
)
:
if
arg_1
==
tuple
(
'XXX'
)
:
return
Outcome
.
win_for_crosses
elif
arg_1
==
tuple
(
'OOO'
)
:
return
Outcome
.
win_for_naughts
if
arg_0
.
_count
(
' '
)
==
0
:
return
Outcome
.
draw
return
Outcome
.
ongoing

def Func(arg_0):
        'The Func of this board if one exists.'
        for arg_1 in arg_0._potential_wins():
            if arg_1 == tuple('XXX'):
                return Outcome.win_for_crosses
            elif arg_1 == tuple('OOO'):
                return Outcome.win_for_naughts
        if arg_0._count(' ') == 0:
            return Outcome.draw
        return Outcome.ongoing

The winner of this board if one exists .


return H2OFrame._expr(expr=ExprNode("var", self, y, use, symmetric))._frame()

def Func ( arg_0 , arg_1 = None , arg_2 = False , arg_3 = None ) : arg_4 = False if arg_1 is None : arg_1 = arg_0 arg_4 = True if arg_3 is None : arg_3 = "complete.obs" if arg_2 else "everything" if arg_0 . nrow == 1 or ( arg_0 . ncol == 1 and arg_1 . ncol == 1 ) : return ExprNode ( "Func" , arg_0 , arg_1 , arg_3 , arg_4 ) . _eager_scalar ( ) return H2OFrame . _expr ( expr = ExprNode ( "Func" , arg_0 , arg_1 , arg_3 , arg_4 ) ) . _frame ( )

def Func(arg_0, arg_1=None, arg_2=False, arg_3=None):
        """
        Compute the Funciance-coFunciance matrix of one or two H2OFrames.

        :param H2OFrame y: If this parameter is given, then a coFunciance  matrix between the columns of the target
            frame and the columns of ``y`` is computed. If this parameter is not provided then the coFunciance matrix
            of the target frame is returned. If target frame has just a single column, then return the scalar Funciance
            instead of the matrix. Single rows are treated as single columns.
        :param str use: A string indicating how to handle missing values. This could be one of the following:

            - ``"everything"``: outputs NaNs whenever one of its contributing observations is missing
            - ``"all.obs"``: presence of missing observations will throw an error
            - ``"complete.obs"``: discards missing values along with all observations in their rows so that only
              complete observations are used
        :param bool na_rm: an alternative to ``use``: when this is True then default value for ``use`` is
            ``"everything"``; and if False then default ``use`` is ``"complete.obs"``. This parameter has no effect
            if ``use`` is given explicitly.

        :returns: An H2OFrame of the coFunciance matrix of the columns of this frame (if ``y`` is not given),
            or with the columns of ``y`` (if ``y`` is given). However when this frame and ``y`` are both single rows
            or single columns, then the Funciance is returned as a scalar.
        """
        arg_4 = False
        if arg_1 is None:
            arg_1 = arg_0
            arg_4 = True
        if arg_3 is None: arg_3 = "complete.obs" if arg_2 else "everything"
        if arg_0.nrow == 1 or (arg_0.ncol == 1 and arg_1.ncol == 1):
            return ExprNode("Func", arg_0, arg_1, arg_3, arg_4)._eager_scalar()
        return H2OFrame._expr(expr=ExprNode("Func", arg_0, arg_1, arg_3, arg_4))._frame()

Compute the variance-covariance matrix of one or two H2OFrames.

        :param H2OFrame y: If this parameter is given, then a covariance  matrix between the columns of the target
            frame and the columns of ``y`` is computed. If this parameter is not provided then the covariance matrix
            of the target frame is returned. If target frame has just a single column, then return the scalar variance
            instead of the matrix. Single rows are treated as single columns.
        :param str use: A string indicating how to handle missing values. This could be one of the following:

            - ``"everything"``: outputs NaNs whenever one of its contributing observations is missing
            - ``"all.obs"``: presence of missing observations will throw an error
            - ``"complete.obs"``: discards missing values along with all observations in their rows so that only
              complete observations are used
        :param bool na_rm: an alternative to ``use``: when this is True then default value for ``use`` is
            ``"everything"``; and if False then default ``use`` is ``"complete.obs"``. This parameter has no effect
            if ``use`` is given explicitly.

        :returns: An H2OFrame of the covariance matrix of the columns of this frame (if ``y`` is not given),
            or with the columns of ``y`` (if ``y`` is given). However when this frame and ``y`` are both single rows
            or single columns, then the variance is returned as a scalar.

Compute the variance - covariance matrix of one or two H2OFrames .


def Func ( arg_0 ) : with jsonconfig . Config ( "messages" , indent = 4 ) as cfg : verify_profile_name ( arg_0 , cfg ) retrieve_data_from_config ( arg_0 , cfg ) if arg_0 . _auth is None : retrieve_pwd_from_config ( arg_0 , cfg ) if arg_0 . save : update_config_data ( arg_0 , cfg ) update_config_pwd ( arg_0 , cfg )

def Func(arg_0):
    """
    Checks the config.json file for default settings and auth values.

    Args:
        :msg: (Message class) an instance of a message class.
    """
    with jsonconfig.Config("messages", indent=4) as cfg:
        verify_profile_name(arg_0, cfg)

        retrieve_data_from_config(arg_0, cfg)

        if arg_0._auth is None:
            retrieve_pwd_from_config(arg_0, cfg)

        if arg_0.save:
            update_config_data(arg_0, cfg)
            update_config_pwd(arg_0, cfg)

Checks the config . json file for default settings and auth values .


return '%s%s?temp_url_sig=%s&temp_url_expires=%s' % (
        base_url, object_path, sig, expires)

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Returns a TempURL good for the given request method, url, and
    number of seconds from now, signed by the given key.
    """
    arg_0 = arg_0.upper()
    arg_4, arg_5 = arg_1.split('/v1/')
    arg_5 = '/v1/' + arg_5
    arg_6 = int(time.time() + arg_2)
    arg_7 = '%s\n%s\n%s' % (arg_0, arg_6, arg_5)
    arg_8 = hmac.new(arg_3, arg_7, hashlib.sha1).hexdigest()
    return '%s%s?temp_url_sig=%s&temp_url_expires=%s' % (
        arg_4, arg_5, arg_8, arg_6)

Returns a TempURL good for the given request method url and number of seconds from now signed by the given key .


def Func ( arg_0 = None ) : if arg_0 and ( arg_0 in themes or arg_0 == '__common__' ) : return arg_0 arg_1 = request . args . get ( 'theme' , request . preferences . get_value ( 'theme' ) ) if arg_1 not in themes : arg_1 = default_theme return arg_1

def Func(arg_0=None):
    """Returns theme name.

    Checks in this order:
    1. override
    2. cookies
    3. settings"""

    if arg_0 and (arg_0 in themes or arg_0 == '__common__'):
        return arg_0
    arg_1 = request.args.get('theme', request.preferences.get_value('theme'))
    if arg_1 not in themes:
        arg_1 = default_theme
    return arg_1


return get_matches(egg_or_sperm_word, pool, 23)

def Func(arg_0, arg_1):
        """Extract 23 'chromosomes' aka words from 'gene pool' aka list of tokens
        by searching the list of tokens for words that are related to the given
        egg_or_sperm_word.
        """
        arg_2 = [0.9, 0.1]
        arg_3 = (npchoice([0,1], 1, p=arg_2)[0] == 1)
        if arg_3:
            arg_4 = tokens.secondary_tokens
        else:
            arg_4 = tokens.primary_tokens

        return get_matches(arg_1, arg_4, 23)

Extract 23 chromosomes aka words from gene pool aka list of tokens by searching the list of tokens for words that are related to the given egg_or_sperm_word .


def Func(arg_0, arg_1):
        """Explores the parameter according to the iterable and appends to the exploration range.

        Raises ParameterLockedException if the parameter is locked.
        Raises TypeError if the parameter does not support the data,
        the types of the data in the iterable are not the same as the type of the default value,
        or the parameter did not have an array before.

        Note that the parameter will iterate over the whole iterable once and store
        the individual data values into a tuple. Thus, the whole exploration range is
        explicitly stored in memory.

        :param explore_iterable: An iterable specifying the exploration range

         For example:

         >>> param = Parameter('Im.an.example', data=33.33, comment='Wooohoo!')
         >>> param._explore([3.0,2.0,1.0])
         >>> param.Func([42.0, 43.42])
         >>> param.f_get_range()
         >>> [3.0, 2.0, 1.0, 42.0, 43.42]

        :raises TypeError, ParameterLockedException

        """
        if arg_0.v_locked:
            raise pex.ParameterLockedException('Parameter `%s` is locked!' % arg_0.v_full_name)

        if not arg_0.f_has_range():
            raise TypeError('Your Parameter `%s` is not an array and can therefore '
                            'not be expanded.' % arg_0._name)

        arg_2 = arg_0._data_sanity_checks(arg_1)

        arg_0._explored_range.extend(arg_2)
        arg_0.f_lock()

Explores the parameter according to the iterable and appends to the exploration range.

        Raises ParameterLockedException if the parameter is locked.
        Raises TypeError if the parameter does not support the data,
        the types of the data in the iterable are not the same as the type of the default value,
        or the parameter did not have an array before.

        Note that the parameter will iterate over the whole iterable once and store
        the individual data values into a tuple. Thus, the whole exploration range is
        explicitly stored in memory.

        :param explore_iterable: An iterable specifying the exploration range

         For example:

         >>> param = Parameter('Im.an.example', data=33.33, comment='Wooohoo!')
         >>> param._explore([3.0,2.0,1.0])
         >>> param._expand([42.0, 43.42])
         >>> param.f_get_range()
         >>> [3.0, 2.0, 1.0, 42.0, 43.42]

        :raises TypeError, ParameterLockedException

Explores the parameter according to the iterable and appends to the exploration range .


def Func(arg_0, arg_1):
        """Receive ACK in RENEWING state."""
        logger.debug("C3. Received ACK?, in RENEWING state.")
        if arg_0.process_received_ack(arg_1):
            logger.debug("C3: T. Received ACK, in RENEWING state, "
                         "raise BOUND.")
            raise arg_0.BOUND()


(self, min_size=0, max_size=1 << 40, recursive=True)

def Func ( arg_0 , arg_1 = 0 , arg_2 = 1 << 40 , arg_3 = True ) : def filters ( arg_4 ) : return arg_1 <= arg_4 . size <= arg_2 return arg_0 . select_file ( filters , arg_3 )

def Func(arg_0, arg_1=0, arg_2=1 << 40, arg_3=True):
        """
        Select file path by size.

        **中文文档**

        选择所有文件大小在一定范围内的文件。
        """

        def filters(arg_4): return arg_1 <= arg_4.size <= arg_2

        return arg_0.select_file(filters, arg_3)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_2 . read ( ) if arg_2 . size == 64 and arg_1 . size == 128 : arg_3 = ( arg_1 . read ( ) & 0xffffffffffffffff0000000000000000 ) | Operators . ZEXTEND ( arg_3 , 128 ) arg_1 . write ( arg_3 )

def Func(arg_0, arg_1, arg_2):
        """
        Moves low packed double-precision floating-point value.

        Moves a double-precision floating-point value from the source operand (second operand) and the
        destination operand (first operand). The source and destination operands can be an XMM register
        or a 64-bit memory location. This instruction allows double-precision floating-point values to be moved
        to and from the low quadword of an XMM register and memory. It cannot be used for register to register
        or memory to memory moves. When the destination operand is an XMM register, the high quadword of the
        register remains unchanged.

        :param cpu: current CPU.
        :param dest: destination operand.
        :param src: source operand.
        """
        arg_3 = arg_2.read()
        if arg_2.size == 64 and arg_1.size == 128:
            arg_3 = (arg_1.read() & 0xffffffffffffffff0000000000000000) | Operators.ZEXTEND(arg_3, 128)
        arg_1.write(arg_3)

Moves low packed double - precision floating - point value .


(script, radius=1, pitch=0, taper=0, angle=0, straght_start=True,
         straght_end=False, radius_limit=None, outside_limit_end=True)

def Func(arg_0, arg_1=1, arg_2=0, arg_3=0, arg_4=0, arg_5=True,
         arg_6=False, arg_7=None, arg_8=True):
    """Bends mesh around cylinder of radius radius and axis z to a certain angle

    straight_ends: Only apply twist (pitch) over the area that is bent

    outside_limit_end (bool): should values outside of the Func radius_limit be considered part
        of the end (True) or the start (False)?
    """
    if arg_7 is None:
        arg_7 = 2 * arg_1
    # TODO: add limit so Func only applies over y<2*radius; add option to set
    # larger limit
    arg_4 = math.radians(arg_4)
    arg_9 = arg_1 * arg_4
    """vert_function(s=s, x='if(x<%s and x>-%s, (%s+y)*sin(x/%s), (%s+y)*sin(%s/%s)+(x-%s)*cos(%s/%s))'
                        % (segment, segment,  radius, radius,  radius, segment, radius, segment, segment, radius),
                     y='if(x<%s*%s/2 and x>-%s*%s/2, (%s+y)*cos(x/%s), (%s+y)*cos(%s)-(x-%s*%s)*sin(%s))'
                        % (radius, angle, radius, angle, radius, radius, radius, angle/2, radius, angle/2, angle/2),"""
    arg_10 = '-(pitch)*x/(2*pi*(radius))'.replace(
        'pitch', str(arg_2)).replace(
            'pi', str(math.pi)).replace(
                'radius', str(arg_1))
    arg_11 = '(taper)*(pitch_func)'.replace(
        'taper', str(arg_3)).replace(
            'pitch_func', str(arg_10)).replace(
                'pi', str(math.pi))
    # y<radius_limit

    if arg_8:
        arg_12 = 'if(x<(segment) and y<(radius_limit), if(x>0, (y+(radius)+(taper_func))*sin(x/(radius)), x), (y+(radius)+(taper_func))*sin(angle)+(x-(segment))*cos(angle))'
    else:
        arg_12 = 'if(x<(segment), if(x>0 and y<(radius_limit), (y+(radius)+(taper_func))*sin(x/(radius)), x), if(y<(radius_limit), (y+(radius)+(taper_func))*sin(angle)+(x-(segment))*cos(angle), x))'

    arg_12 = arg_12.replace(
        # x_func = 'if(x<segment, if(x>0, (y+radius)*sin(x/radius), x),
        # (y+radius)*sin(angle)-segment)'.replace(
        'segment', str(arg_9)).replace(
            'radius_limit', str(arg_7)).replace(
                'radius', str(arg_1)).replace(
                    'taper_func', str(arg_11)).replace(
                        'angle', str(arg_4))

    if arg_8:
        arg_13 = 'if(x<(segment) and y<(radius_limit), if(x>0, (y+(radius)+(taper_func))*cos(x/(radius))-(radius), y), (y+(radius)+(taper_func))*cos(angle)-(x-(segment))*sin(angle)-(radius))'
    else:
        arg_13 = 'if(x<(segment), if(x>0 and y<(radius_limit), (y+(radius)+(taper_func))*cos(x/(radius))-(radius), y), if(y<(radius_limit), (y+(radius)+(taper_func))*cos(angle)-(x-(segment))*sin(angle)-(radius), y))'

    arg_13 = arg_13.replace(
        'segment', str(arg_9)).replace(
            'radius_limit', str(arg_7)).replace(
                'radius', str(arg_1)).replace(
                    'taper_func', str(arg_11)).replace(
                        'angle', str(arg_4))

    if arg_5:
        arg_14 = 'z'
    else:
        arg_14 = 'z+(pitch_func)'
    if arg_6:
        arg_15 = 'z-(pitch)*(angle)/(2*pi)'
    else:
        arg_15 = 'z+(pitch_func)'

    if arg_8:
        arg_16 = 'if(x<(segment) and y<(radius_limit), if(x>0, z+(pitch_func), (start)), (end))'
    else:
        arg_16 = 'if(x<(segment), if(x>0 and y<(radius_limit), z+(pitch_func), (start)), if(y<(radius_limit), (end), z))'
    arg_16 = arg_16.replace(
        'start', str(arg_14)).replace(
            'end', str(arg_15)).replace(
                'segment', str(arg_9)).replace(
                    'radius_limit', str(arg_7)).replace(
                        'radius', str(arg_1)).replace(
                            'angle', str(arg_4)).replace(
                                'pitch_func', str(arg_10)).replace(
                                    'pitch', str(arg_2)).replace(
                                        'pi', str(math.pi))

    """
    if straight_ends:
        z_func = 'if(x<segment, if(x>0, z+(pitch_func), z), z-pitch*angle/(2*pi))'.replace(
            'segment', str(segment)).replace(
            'radius', str(radius)).replace(
            'angle', str(angle)).replace(
            'pitch_func', str(pitch_func)).replace(
            'pitch', str(pitch)).replace(
            'pi', str(math.pi))
    else:
        #z_func = 'if(x<segment, z+(pitch_func), z-(taper)*(pitch)*(x)/(2*pi*(radius)))'.replace(
        #z_func = 'if(x<segment, z+(pitch_func), z+(pitch_func))'.replace(
        #bestz_func = 'if(x<segment, z+(pitch_func), z+(pitch_func)+(-(taper)*(pitch)*(x-segment)/(2*pi*(radius))))'.replace(
        #z_func = 'if(x<segment, z+(pitch_func), z+(pitch_func)+(-(taper)*(pitch)*x/(2*pi*(radius))))'.replace(
        #z_func = 'if(x<segment, z+(pitch_func), z+(pitch_func)+((taper)*pitch*angle/(2*pi)))'.replace(
        z_func = 'z+(pitch_func)'.replace(
            'radius', str(radius)).replace(
            'segment', str(segment)).replace(
            'angle', str(angle)).replace(
            'taper', str(taper)).replace(
            'pitch_func', str(pitch_func)).replace(
            'pitch', str(pitch)).replace(
            'pi', str(math.pi))
    """
    """
    x_func = 'if(x<%s, if(x>-%s, (%s+y)*sin(x/%s), (%s+y)*sin(-%s)+(x+%s)*cos(-%s)), (%s+y)*sin(%s)+(x-%s)*cos(%s))' % (
        segment, segment, radius, radius, radius, angle, segment, angle, radius, angle, segment, angle)
    y_func = 'if(x<%s, if(x>-%s, (%s+y)*cos(x/%s), (%s+y)*cos(-%s)-(x+%s)*sin(-%s)), (%s+y)*cos(%s)-(x-%s)*sin(%s))' % (
        segment, segment, radius, radius, radius, angle, segment, angle, radius, angle, segment, angle)
    if straight_ends:
        z_func = 'if(x<%s, if(x>-%s, z-%s*x/(2*%s*%s), z+%s*%s/(2*%s)), z-%s*%s/(2*%s))' % (
            segment, segment, pitch, math.pi, radius, pitch, angle, math.pi, pitch, angle, math.pi)
    else:
        z_func = 'z-%s*x/(2*%s*%s)' % (pitch, math.pi, radius)
    """
    vert_function(arg_0, arg_12=arg_12, arg_13=arg_13, arg_16=arg_16)
    return None

Bends mesh around cylinder of radius radius and axis z to a certain angle

    straight_ends: Only apply twist (pitch) over the area that is bent

    outside_limit_end (bool): should values outside of the bend radius_limit be considered part
        of the end (True) or the start (False)?


def Func(arg_0, arg_1):
        """Apply a reset instruction to a qubit.

        Args:
            qubit (int): the qubit being rest

        This is done by doing a simulating a measurement
        outcome and projecting onto the outcome state while
        renormalizing.
        """
        # get measure outcome
        arg_2, arg_3 = arg_0._get_measure_outcome(arg_1)
        # update quantum state
        if arg_2 == '0':
            arg_4 = [[1 / np.sqrt(arg_3), 0], [0, 0]]
            arg_0._add_unitary_single(arg_4, arg_1)
        else:
            arg_4 = [[0, 1 / np.sqrt(arg_3)], [0, 0]]
            arg_0._add_unitary_single(arg_4, arg_1)


(returns, positions, transactions,
                                slippage_bps)

def Func(arg_0, arg_1, arg_2,
                                arg_3):
    """
    Apply a slippage penalty for every dollar traded.

    Parameters
    ----------
    returns : pd.Series
        Daily returns of the strategy, noncumulative.
         - See full explanation in create_full_tear_sheet.
    positions : pd.DataFrame
        Daily net position values.
         - See full explanation in create_full_tear_sheet.
    transactions : pd.DataFrame
        Prices and amounts of executed trades. One row per trade.
         - See full explanation in create_full_tear_sheet.
    slippage_bps: int/float
        Basis points of slippage to apply.

    Returns
    -------
    pd.Series
        Time series of daily returns, adjusted for slippage.
    """

    arg_4 = 0.0001 * arg_3
    arg_5 = arg_1.sum(axis=1)
    arg_6 = arg_5 * arg_0
    arg_7 = get_txn_vol(arg_2).txn_volume
    arg_8 = arg_7 * arg_4
    arg_9 = arg_6.add(-arg_8, fill_value=0)
    arg_10 = arg_0 * arg_9 / arg_6

    return arg_10

Apply a slippage penalty for every dollar traded .


def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in arg_0 . name_index . values ( ) : arg_1 . append ( Service ( arg_2 ) ) return arg_1

def Func(arg_0):
        """
        Lists all services in memory storage.
        """
        arg_1 = []
        for arg_2 in arg_0.name_index.values():
            arg_1.append(Service(arg_2))
        return arg_1


def Func ( arg_0 , arg_1 ) : if type ( arg_1 ) is c_ast . ID : return symbol_pos_int ( arg_1 . name ) elif type ( arg_1 ) is c_ast . Constant : return sympy . Integer ( arg_1 . value ) else : arg_2 = { '*' : operator . mul , '+' : operator . add , '-' : operator . sub } return arg_2 [ arg_1 . op ] ( arg_0 . Func ( arg_1 . left ) , arg_0 . Func ( arg_1 . right ) )

def Func(arg_0, arg_1):
        """
        Convert mathematical expressions to a sympy representation.

        May only contain paranthesis, addition, subtraction and multiplication from AST.
        """
        if type(arg_1) is c_ast.ID:
            return symbol_pos_int(arg_1.name)
        elif type(arg_1) is c_ast.Constant:
            return sympy.Integer(arg_1.value)
        else:  # elif type(dim) is c_ast.BinaryOp:
            arg_2 = {
                '*': operator.mul,
                '+': operator.add,
                '-': operator.sub
            }

            return arg_2[arg_1.op](
                arg_0.Func(arg_1.left),
                arg_0.Func(arg_1.right))

Convert mathematical expressions to a sympy representation .


def Func ( arg_0 , arg_1 ) : arg_2 = [ ] arg_3 = set ( ) arg_4 = [ ( node , 0 ) for node in arg_0 ] while arg_4 : arg_5 , arg_6 = arg_4 . pop ( ) if arg_6 == 0 : if arg_5 not in arg_3 : arg_3 . add ( arg_5 ) arg_4 . append ( ( arg_5 , 1 ) ) arg_4 . extend ( ( arg_7 , 0 ) for arg_7 in arg_1 ( arg_5 ) ) else : assert ( arg_5 in arg_3 ) arg_2 . append ( arg_5 ) return arg_2

def Func(arg_0, arg_1):
    """Return a topological sorting of nodes in a graph.

    roots - list of root nodes to search from
    getParents - function which returns the parents of a given node
    """

    arg_2 = []
    arg_3 = set()

    # Use iterative version to avoid stack limits for large datasets
    arg_4 = [(node, 0) for node in arg_0]
    while arg_4:
        arg_5, arg_6 = arg_4.pop()
        if arg_6 == 0:
            # before recursing
            if arg_5 not in arg_3:
                arg_3.add(arg_5)
                arg_4.append((arg_5, 1))
                arg_4.extend((arg_7, 0) for arg_7 in arg_1(arg_5))
        else:
            # after recursing
            assert(arg_5 in arg_3)
            arg_2.append(arg_5)
    return arg_2

Return a topological sorting of nodes in a graph .


def Func(arg_0):
        """
        Send Dingding message
        """
        arg_1 = ['text', 'link', 'markdown', 'actionCard', 'feedCard']
        if arg_0.message_type not in arg_1:
            raise ValueError('DingdingWebhookHook only support {} '
                             'so far, but receive {}'.format(arg_1, arg_0.message_type))

        arg_2 = arg_0._build_message()
        arg_0.log.info('Sending Dingding type %s message %s', arg_0.message_type, arg_2)
        arg_3 = arg_0.run(endpoint=arg_0._get_endpoint(),
                        arg_2=arg_2,
                        headers={'Content-Type': 'application/json'})

        # Dingding success Func message will with errcode equal to 0
        if int(arg_3.json().get('errcode')) != 0:
            raise AirflowException('Send Dingding message failed, receive error '
                                   'message %s', arg_3.text)
        arg_0.log.info('Success Send Dingding message')


return convert_constants(jmag,hmag,kmag,
                             IJHK,
                             IJH, IJK, IHK,
                             IJ, IH, IK)

def Func ( arg_0 , arg_1 , arg_2 ) : return convert_constants ( arg_0 , arg_1 , arg_2 , IJHK , IJH , IJK , IHK , IJ , IH , IK )

def Func(arg_0,arg_1,arg_2):
    '''Converts given J, H, Ks mags to an I magnitude value.

    Parameters
    ----------

    jmag,hmag,kmag : float
        2MASS J, H, Ks mags of the object.

    Returns
    -------

    float
        The converted I band magnitude.

    '''

    return convert_constants(arg_0,arg_1,arg_2,
                             IJHK,
                             IJH, IJK, IHK,
                             IJ, IH, IK)

Converts given J H Ks mags to an I magnitude value .


def Func(arg_0, arg_1, arg_2):
    """Run a combine Func interface."""
    from bio2bel.Func.application import create_application
    arg_3 = create_application(arg_0=arg_0)
    arg_3.run(arg_1=arg_1, arg_2=arg_2)


def
Func
(
arg_0
)
:
Func
=
[
]
arg_2
=
0
for
arg_3
in
SQUARES
:
arg_4
=
arg_0
.
piece_at
(
arg_3
)
if
not
arg_4
:
arg_2
+=
1
else
:
if
arg_2
:
Func
.
append
(
str
(
arg_2
)
)
arg_2
=
0
Func
.
append
(
arg_4
.
symbol
(
)
)
if
BB_SQUARES
[
arg_3
]
&
BB_FILE_1
:
if
arg_2
:
Func
.
append
(
str
(
arg_2
)
)
arg_2
=
0
if
arg_3
!=
I1
:
Func
.
append
(
'/'
)
Func
.
append
(
' '
)
if
arg_0
.
turn
==
WHITE
:
Func
.
append
(
'w'
)
else
:
Func
.
append
(
'b'
)
Func
.
append
(
' '
)
arg_5
=
0
for
arg_6
in
COLORS
:
arg_7
=
arg_0
.
pieces_in_hand
[
arg_6
]
arg_5
+=
len
(
arg_7
)
for
arg_8
in
sorted
(
arg_7
.
keys
(
)
,
reverse
=
True
)
:
if
arg_7
[
arg_8
]
>=
1
:
if
arg_7
[
arg_8
]
>
1
:
Func
.
append
(
str
(
arg_7
[
arg_8
]
)
)
arg_4
=
Piece
(
arg_8
,
arg_6
)
Func
.
append
(
arg_4
.
symbol
(
)
)
if
arg_5
==
0
:
Func
.
append
(
'-'
)
Func
.
append
(
' '
)
Func
.
append
(
str
(
arg_0
.
move_number
)
)
return
''
.
join
(
Func
)

def Func(arg_0):
        '''
        Gets an SFEN representation of the current position.
        '''
        Func = []
        arg_2 = 0

        # Position part.
        for arg_3 in SQUARES:
            arg_4 = arg_0.piece_at(arg_3)

            if not arg_4:
                arg_2 += 1
            else:
                if arg_2:
                    Func.append(str(arg_2))
                    arg_2 = 0
                Func.append(arg_4.symbol())

            if BB_SQUARES[arg_3] & BB_FILE_1:
                if arg_2:
                    Func.append(str(arg_2))
                    arg_2 = 0

                if arg_3 != I1:
                    Func.append('/')

        Func.append(' ')

        # Side to move.
        if arg_0.turn == WHITE:
            Func.append('w')
        else:
            Func.append('b')

        Func.append(' ')

        # Pieces in hand
        arg_5 = 0
        for arg_6 in COLORS:
            arg_7 = arg_0.pieces_in_hand[arg_6]
            arg_5 += len(arg_7)
            for arg_8 in sorted(arg_7.keys(), reverse=True):
                if arg_7[arg_8] >= 1:
                    if arg_7[arg_8] > 1:
                        Func.append(str(arg_7[arg_8]))
                    arg_4 = Piece(arg_8, arg_6)
                    Func.append(arg_4.symbol())
        if arg_5 == 0:
            Func.append('-')

        Func.append(' ')

        # Move count
        Func.append(str(arg_0.move_number))

        return ''.join(Func)

Gets an SFEN representation of the current position .


(self, sample_shape=(), seed=None, value=None)

def Func ( arg_0 , arg_1 = ( ) , arg_2 = None , arg_3 = None ) : arg_4 = [ ] arg_5 = [ ] arg_2 = seed_stream . SeedStream ( 'JointDistributionCoroutine' , arg_2 ) arg_6 = arg_0 . _model ( ) arg_7 = 0 arg_8 = next ( arg_6 ) try : while True : arg_9 = arg_8 . distribution if isinstance ( arg_8 , arg_0 . Root ) else arg_8 arg_4 . append ( arg_9 ) if ( arg_3 is not None and len ( arg_3 ) > arg_7 and arg_3 [ arg_7 ] is not None ) : arg_2 ( ) arg_10 = arg_3 [ arg_7 ] else : arg_10 = arg_9 . sample ( arg_1 = arg_1 if isinstance ( arg_8 , arg_0 . Root ) else ( ) , arg_2 = arg_2 ( ) ) arg_5 . append ( arg_10 ) arg_7 += 1 arg_8 = arg_6 . send ( arg_10 ) except StopIteration : pass return arg_4 , arg_5

def Func(arg_0, arg_1=(), arg_2=None, arg_3=None):
    """Executes `model`, creating both samples and distributions."""
    arg_4 = []
    arg_5 = []
    arg_2 = seed_stream.SeedStream('JointDistributionCoroutine', arg_2)
    arg_6 = arg_0._model()
    arg_7 = 0
    arg_8 = next(arg_6)
    try:
      while True:
        arg_9 = arg_8.distribution if isinstance(arg_8, arg_0.Root) else arg_8
        arg_4.append(arg_9)
        if (arg_3 is not None and len(arg_3) > arg_7 and
            arg_3[arg_7] is not None):
          arg_2()
          arg_10 = arg_3[arg_7]
        else:
          arg_10 = arg_9.sample(
              arg_1=arg_1 if isinstance(arg_8, arg_0.Root) else (),
              arg_2=arg_2())
        arg_5.append(arg_10)
        arg_7 += 1
        arg_8 = arg_6.send(arg_10)
    except StopIteration:
      pass
    return arg_4, arg_5

Executes model creating both samples and distributions .


def Func ( arg_0 , arg_1 ) : arg_0 . signature_passphrases = arg_0 . _update_dict ( arg_1 , { } , replace_data = True )

def Func(arg_0, arg_1):
        '''Set signature passphrases'''
        arg_0.signature_passphrases = arg_0._update_dict(arg_1,
                                                       {}, replace_data=True)


def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_0 . _call ( JSONRPCMethods . INVOKE_SCRIPT . value , [ arg_1 , ] , ** arg_2 ) return decode_invocation_result ( arg_3 )

def Func(arg_0, arg_1, **arg_2):
        """ Invokes a script on the VM and returns the result.

        :param script: script runnable by the VM
        :type script: str
        :return: result of the invocation
        :rtype: dictionary

        """
        arg_3 = arg_0._call(JSONRPCMethods.INVOKE_SCRIPT.value, [arg_1, ], **arg_2)
        return decode_invocation_result(arg_3)

Invokes a script on the VM and returns the result .


def Func ( arg_0 ) : global arg_2 arg_1 = arg_0 . registry . settings arg_2 = CacheManager ( ** parse_cache_config_options ( arg_1 ) )

def Func(arg_0):
    """Configures the caching manager"""
    global arg_2
    arg_1 = arg_0.registry.settings
    arg_2 = CacheManager(**parse_cache_config_options(arg_1))


def
Func
(
arg_0
,
arg_1
)
:
if
arg_0
.
bot
.
_vars
:
arg_2
=
max
(
[
len
(
arg_4
)
for
arg_4
in
arg_0
.
bot
.
_vars
]
)
for
arg_3
,
(
arg_4
,
arg_5
)
in
enumerate
(
arg_0
.
bot
.
_vars
.
items
(
)
)
:
arg_6
=
arg_3
<
len
(
arg_0
.
bot
.
_vars
)
1
arg_0
.
print_response
(
"%s = %s"
%
(
arg_4
.
ljust
(
arg_2
)
,
arg_5
.
value
)
,
arg_6
=
arg_6
)
else
:
arg_0
.
print_response
(
"No vars"
)

def Func(arg_0, arg_1):
        """
        List bot variables and values
        """
        if arg_0.bot._vars:
            arg_2 = max([len(arg_4) for arg_4 in arg_0.bot._vars])
            for arg_3, (arg_4, arg_5) in enumerate(arg_0.bot._vars.items()):
                arg_6 = arg_3 < len(arg_0.bot._vars) - 1
                arg_0.print_response("%s = %s" % (arg_4.ljust(arg_2), arg_5.value), arg_6=arg_6)
        else:
            arg_0.print_response("No vars")


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

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

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

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

Get the translations for a specific movie id.

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

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

Get the translations for a specific movie id .


def Func(arg_0, arg_1, arg_2):
    """Run WsgiDAV using paste.httpserver, if Paste is installed.

    See http://pythonpaste.org/modules/httpserver.html for more options
    """
    from paste import httpserver

    arg_3 = "WsgiDAV/{} {} Python {}".format(
        __version__, httpserver.WSGIHandler.server_version, util.PYTHON_VERSION
    )
    _logger.info("Running {}...".format(arg_3))

    # See http://pythonpaste.org/modules/httpserver.html for more options
    arg_4 = httpserver.serve(
        arg_0,
        arg_9=arg_1["host"],
        arg_10=arg_1["port"],
        server_version=arg_3,
        # This option enables handling of keep-alive
        # and expect-100:
        protocol_version="HTTP/1.1",
        start_loop=False,
    )

    if arg_1["verbose"] >= 5:
        arg_5 = arg_4.RequestHandlerClass.handle_one_request

        def arg_8(arg_6):
            arg_5(arg_6)
            if arg_6.close_connection == 1:
                _logger.debug("HTTP Connection : close")
            else:
                _logger.debug("HTTP Connection : continue")

        arg_4.RequestHandlerClass.handle_one_request = arg_8

        # __handle = server.RequestHandlerClass.handle

        # def handle(self):
        #     _logger.debug("open HTTP connection")
        #     __handle(self)

        arg_4.RequestHandlerClass.handle_one_request = arg_8

    arg_9, arg_10 = arg_4.server_address
    if arg_9 == "0.0.0.0":
        _logger.info(
            "Serving on 0.0.0.0:{} view at {}://127.0.0.1:{}".format(arg_10, "http", arg_10)
        )
    else:
        _logger.info("Serving on {}://{}:{}".format("http", arg_9, arg_10))
    try:
        arg_4.serve_forever()
    except KeyboardInterrupt:
        _logger.warning("Caught Ctrl-C, shutting down...")
    return

Run WsgiDAV using paste . httpserver if Paste is installed .


return int(
            self.block_class(block_num, blockchain_instance=self.blockchain)
            .time()
            .timestamp()
        )

def Func ( arg_0 , arg_1 ) : return int ( arg_0 . block_class ( arg_1 , blockchain_instance = arg_0 . blockchain ) . time ( ) . timestamp ( ) )

def Func(arg_0, arg_1):
        """ Returns the timestamp of the block with the given block
            number.

            :param int block_num: Block number
        """
        return int(
            arg_0.block_class(arg_1, blockchain_instance=arg_0.blockchain)
            .time()
            .timestamp()
        )

Returns the timestamp of the block with the given block number .


def Func ( arg_0 , arg_1 = None ) : if not hasattr ( arg_0 , 'encoding' ) or not arg_0 . encoding : return arg_1 else : return arg_0 . encoding

def Func(arg_0, arg_1=None):
    """Return the given stream's encoding or a default.

    There are cases where sys.std* might not actually be a stream, so
    check for the encoding attribute prior to returning it, and return
    a default if it doesn't exist or evaluates as False. `default'
    is None if not provided.
    """
    if not hasattr(arg_0, 'encoding') or not arg_0.encoding:
        return arg_1
    else:
        return arg_0.encoding

Return the given stream s encoding or a default .