def Func(arg_0, arg_1=None):
        """Returns details of either the first or specified device

        :param int id: Identifier of desired device. If not given, first device
            found will be returned

        :returns tuple: Device ID, Device Address, Firmware Version
        """
        if arg_1 is None:
            if not arg_0.devices:
                raise ValueError('No default device for %s' % arg_0.hardware_id)
            arg_1, (arg_2, arg_3) = sorted(arg_0.devices.items())[0]

        elif arg_1 in arg_0.devices:
            arg_2, arg_3 = arg_0.devices[arg_1]

        else:
            arg_4 = 'Unable to find device with ID %s' % arg_1
            log.error(arg_4)
            raise ValueError(arg_4)

        log.info("Using COM Port: %s, Device ID: %s, Device Ver: %s",
                 arg_2, arg_1, arg_3)
        return arg_1, arg_2, arg_3


def Func(arg_0, arg_1, arg_2):
        """ Validate generic options for a particular target """
        if arg_1.has_option(arg_2, 'only_if_assigned'):
            die("[%s] has an 'only_if_assigned' option.  Should be "
                "'%s.only_if_assigned'." % (arg_2, arg_0.CONFIG_PREFIX))
        if arg_1.has_option(arg_2, 'also_unassigned'):
            die("[%s] has an 'also_unassigned' option.  Should be "
                "'%s.also_unassigned'." % (arg_2, arg_0.CONFIG_PREFIX))
        if arg_1.has_option(arg_2, 'default_priority'):
            die("[%s] has a 'default_priority' option.  Should be "
                "'%s.default_priority'." % (arg_2, arg_0.CONFIG_PREFIX))
        if arg_1.has_option(arg_2, 'add_tags'):
            die("[%s] has an 'add_tags' option.  Should be "
                "'%s.add_tags'." % (arg_2, arg_0.CONFIG_PREFIX))


def Func ( arg_0 , arg_1 ) : arg_1 = _splitPath ( arg_1 ) for arg_2 in arg_0 . configs . values ( ) : arg_3 = arg_2 for arg_4 in arg_1 : if arg_4 in arg_3 : arg_3 = arg_3 [ arg_4 ] else : arg_3 = None break if arg_3 is not None : return arg_3 return None

def Func(arg_0, arg_1):
        ''' return a configuration value

            usage:
                Func('section.property')

            Note that currently array indexes are not supported. You must
            Func the whole array.

            returns None if any path element or the property is missing
        '''
        arg_1 = _splitPath(arg_1)
        for arg_2 in arg_0.configs.values():
            arg_3 = arg_2
            for arg_4 in arg_1:
                if arg_4 in arg_3:
                    arg_3 = arg_3[arg_4]
                else:
                    arg_3 = None
                    break
            if arg_3 is not None:
                return arg_3
        return None

return a configuration value

            usage:
                get('section.property')

            Note that currently array indexes are not supported. You must
            get the whole array.

            returns None if any path element or the property is missing


def Func ( arg_0 ) : from six . moves . urllib . parse import urlparse arg_1 = urlparse ( arg_0 ) if _UrlIsLocal ( arg_1 ) : if not os . path . exists ( arg_0 ) : os . makedirs ( arg_0 ) return arg_0 elif arg_1 . scheme == 'ftp' : from . _exceptions import NotImplementedProtocol raise NotImplementedProtocol ( arg_1 . scheme ) else : from . _exceptions import NotImplementedProtocol raise NotImplementedProtocol ( arg_1 . scheme )

def Func(arg_0):
    '''
    Create directory including any missing intermediate directory.

    :param unicode directory:

    :return unicode|urlparse.ParseResult:
        Returns the created directory or url (see urlparse).

    :raises NotImplementedProtocol:
        If protocol is not local or FTP.

    .. seealso:: FTP LIMITATIONS at this module's doc for performance issues information
    '''
    from six.moves.urllib.parse import urlparse
    arg_1 = urlparse(arg_0)

    # Handle local
    if _UrlIsLocal(arg_1):
        if not os.path.exists(arg_0):
            os.makedirs(arg_0)
        return arg_0

    # Handle FTP
    elif arg_1.scheme == 'ftp':
        from ._exceptions import NotImplementedProtocol
        raise NotImplementedProtocol(arg_1.scheme)
    else:
        from ._exceptions import NotImplementedProtocol
        raise NotImplementedProtocol(arg_1.scheme)

Create directory including any missing intermediate directory .


def Func ( arg_0 , * arg_1 ) : clear_progress ( ) arg_2 = ( arg_0 % arg_1 ) sys . stdout . write ( arg_2 + '\n' )

def Func(arg_0, *arg_1):
  '''Program Func output.'''
  clear_progress()
  arg_2 = (arg_0 % arg_1)
  sys.stdout.write(arg_2 + '\n')


(bnf: str, entry=None, *optional_inherit)

def Func ( arg_0 : arg_1 , arg_2 = None , * arg_3 ) -> Grammar : arg_4 = [ Grammar ] + list ( arg_3 ) arg_5 = { 'grammar' : arg_0 , 'entry' : arg_2 } return build_grammar ( tuple ( arg_4 ) , arg_5 )

def Func(arg_0: arg_1, arg_2=None, *arg_3) -> Grammar:
    """
    Create a Grammar from a string
    """
    arg_4 = [Grammar] + list(arg_3)
    arg_5 = {'grammar': arg_0, 'entry': arg_2}
    return build_grammar(tuple(arg_4), arg_5)


def Func ( arg_0 ) : arg_1 . argv [ : ] = [ arg_0 . _run_object ] if arg_0 . _run_args : arg_1 . argv += arg_0 . _run_args . split ( )

def Func(arg_0):
        """Replaces sys.argv with proper args to pass to script."""
        arg_1.argv[:] = [arg_0._run_object]
        if arg_0._run_args:
            arg_1.argv += arg_0._run_args.split()

Replaces sys . argv with proper args to pass to script .


return [c for c in self.components if c.name == name][0]

def Func ( arg_0 , arg_1 ) : return [ arg_2 for arg_2 in arg_0 . components if arg_2 . name == arg_1 ] [ 0 ]

def Func(arg_0, arg_1):
        """
        Retrieve a child component given its name.

        :param name: The name of the component.

        :returns: The component.
        """

        return [arg_2 for arg_2 in arg_0.components if arg_2.name == arg_1][0]

Retrieve a child component given its name .


def
Func
(
arg_0
)
:
arg_1
=
[
'git'
,
'symbolic-ref'
,
'HEAD'
]
try
:
arg_0
.
_exec
(
arg_1
,
cwd
=
arg_0
.
dirpath
,
env
=
arg_0
.
gitenv
)
except
RepositoryError
as
e
:
if
e
.
msg
.
find
(
"ref HEAD is not a symbolic ref"
)
==
1
:
raise
e
return
True
else
:
return
False

def Func(arg_0):
        """Check if the repo is in a detached state.

        The repository is in a detached state when HEAD is not a symbolic
        reference.

        :returns: whether the repository is detached or not

        :raises RepositoryError: when an error occurs checking the state
            of the repository
        """
        arg_1 = ['git', 'symbolic-ref', 'HEAD']

        try:
            arg_0._exec(arg_1, cwd=arg_0.dirpath, env=arg_0.gitenv)
        except RepositoryError as e:
            if e.msg.find("ref HEAD is not a symbolic ref") == -1:
                raise e
            return True
        else:
            return False

Check if the repo is in a detached state .


unescapes html entities. the opposite of escape.

def Func ( arg_0 ) : arg_1 = re . compile ( r'&(?:(?:#(\d+))|([^;]+));' ) arg_2 = [ ] arg_3 = arg_1 . search ( arg_0 ) while arg_3 : arg_2 . append ( arg_0 [ 0 : arg_3 . start ( ) ] ) arg_4 = arg_3 . group ( 1 ) if arg_4 : arg_4 = int ( arg_4 ) arg_2 . append ( unichr ( arg_4 ) ) else : arg_4 = _Func . get ( arg_3 . group ( 2 ) , ord ( '?' ) ) arg_2 . append ( unichr ( arg_4 ) ) arg_0 = arg_0 [ arg_3 . end ( ) : ] arg_3 = arg_1 . search ( arg_0 ) arg_2 . append ( arg_0 ) return '' . join ( arg_2 )

def Func(arg_0):
  '''
  Funcs html entities. the opposite of escape.
  '''
  arg_1 = re.compile(r'&(?:(?:#(\d+))|([^;]+));')

  arg_2 = []
  arg_3 = arg_1.search(arg_0)
  while arg_3:
    arg_2.append(arg_0[0:arg_3.start()])
    arg_4 = arg_3.group(1)
    if arg_4:
      arg_4 = int(arg_4)
      arg_2.append(unichr(arg_4))
    else:
      arg_4 = _Func.get(arg_3.group(2), ord('?'))
      arg_2.append(unichr(arg_4))

    arg_0 = arg_0[arg_3.end():]
    arg_3 = arg_1.search(arg_0)

  arg_2.append(arg_0)
  return ''.join(arg_2)

unescapes html entities . the opposite of escape .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
)
:
if
arg_5
==
MIXING_LOG_MOLAR
:
arg_6
=
[
i
(
arg_1
,
arg_2
)
for
i
in
arg_0
.
ViscosityLiquids
]
return
mixing_logarithmic
(
arg_3
,
arg_6
)
elif
arg_5
==
MIXING_LOG_MASS
:
arg_6
=
[
i
(
arg_1
,
arg_2
)
for
i
in
arg_0
.
ViscosityLiquids
]
return
mixing_logarithmic
(
arg_4
,
arg_6
)
elif
arg_5
==
LALIBERTE_MU
:
arg_4
=
list
(
arg_4
)
arg_4
.
pop
(
arg_0
.
index_w
)
return
Laliberte_viscosity
(
arg_1
,
arg_4
,
arg_0
.
wCASs
)
else
:
raise
Exception
(
'Method not valid'
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5):
        r'''Method to Func viscosity of a liquid mixture at
        temperature `T`, pressure `P`, mole fractions `zs` and weight fractions
        `ws` with a given method.

        This method has no exception handling; see `mixture_property`
        for that.

        Parameters
        ----------
        T : float
            Temperature at which to Func the property, [K]
        P : float
            Pressure at which to Func the property, [Pa]
        zs : list[float]
            Mole fractions of all species in the mixture, [-]
        ws : list[float]
            Weight fractions of all species in the mixture, [-]
        method : str
            Name of the method to use

        Returns
        -------
        mu : float
            Viscosity of the liquid mixture, [Pa*s]
        '''
        if arg_5 == MIXING_LOG_MOLAR:
            arg_6 = [i(arg_1, arg_2) for i in arg_0.ViscosityLiquids]
            return mixing_logarithmic(arg_3, arg_6)
        elif arg_5 == MIXING_LOG_MASS:
            arg_6 = [i(arg_1, arg_2) for i in arg_0.ViscosityLiquids]
            return mixing_logarithmic(arg_4, arg_6)
        elif arg_5 == LALIBERTE_MU:
            arg_4 = list(arg_4) ; arg_4.pop(arg_0.index_w)
            return Laliberte_viscosity(arg_1, arg_4, arg_0.wCASs)
        else:
            raise Exception('Method not valid')

r'''Method to calculate viscosity of a liquid mixture at
        temperature `T`, pressure `P`, mole fractions `zs` and weight fractions
        `ws` with a given method.

        This method has no exception handling; see `mixture_property`
        for that.

        Parameters
        ----------
        T : float
            Temperature at which to calculate the property, [K]
        P : float
            Pressure at which to calculate the property, [Pa]
        zs : list[float]
            Mole fractions of all species in the mixture, [-]
        ws : list[float]
            Weight fractions of all species in the mixture, [-]
        method : str
            Name of the method to use

        Returns
        -------
        mu : float
            Viscosity of the liquid mixture, [Pa*s]

r Method to calculate viscosity of a liquid mixture at temperature T pressure P mole fractions zs and weight fractions ws with a given method .


(self, client_id, code, client, request, *args, **kwargs)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, *arg_5, **arg_6):
        """Ensure the grant code is valid."""
        arg_3 = arg_3 or arg_0._clientgetter(arg_1)
        log.debug(
            'Validate code for client %r and code %r', arg_3.client_id, arg_2
        )
        arg_7 = arg_0._grantgetter(arg_1=arg_3.client_id, arg_2=arg_2)
        if not arg_7:
            log.debug('Grant not found.')
            return False
        if hasattr(arg_7, 'expires') and \
           datetime.datetime.utcnow() > arg_7.expires:
            log.debug('Grant is expired.')
            return False

        arg_4.state = arg_6.get('state')
        arg_4.user = arg_7.user
        arg_4.scopes = arg_7.scopes
        return True


def Func(arg_0):
        """
        Creates and returns an ArgumentParser object prepopulated with 'no clean', 'cores' and
        'restart' arguments.
        """
        arg_1 = argparse.ArgumentParser(description=arg_0._desc,
                                         formatter_class=argparse.RawTextHelpFormatter)
        arg_1.add_argument('--no-clean', action='store_true',
                            help='If this flag is used, temporary work directory is not cleaned.')
        arg_1.add_argument('--restart', action='store_true',
                            help='If this flag is used, a previously uncleaned workflow in the same'
                                 ' directory will be resumed')
        arg_1.add_argument('--cores', type=int, default=None,
                            help='Will set a cap on number of cores to use, default is all '
                                 'available cores.')
        return arg_1

Creates and returns an ArgumentParser object prepopulated with no clean cores and restart arguments .


def Func ( arg_0 ) : Func = Setting . objects . all ( ) . as_dict ( default = '' ) arg_2 = { 'SETTINGS' : Func , } return arg_2

def Func(arg_0):
    """
    Adds a ``SettingDict`` object for the ``Setting`` model to the context as
    ``SETTINGS``. Automatically creates non-existent settings with an empty
    string as the default value.
    """
    Func = Setting.objects.all().as_dict(default='')
    arg_2 = {
        'SETTINGS': Func,
    }
    return arg_2

Adds a SettingDict object for the Setting model to the context as SETTINGS . Automatically creates non - existent settings with an empty string as the default value .


def Func(arg_0):
        """Returns the actula node of the underlying data.

        In case one uses HDF5 this will be the HDF5 leaf node.

        """
        if not arg_0._storage_service.is_open:
            warnings.warn('You requesting the data item but your store is not open, '
                          'the item itself will be closed, too!',
                          category=RuntimeWarning)
        return arg_0._request_data('__thenode__')

Returns the actula node of the underlying data .


def Func ( arg_0 ) : if arg_0 . help : return arg_0 . help elif arg_0 . __doc__ and arg_0 . __doc__ . strip ( ) : return arg_0 . __doc__ . strip ( ) else : return ''

def Func(arg_0):
        """
        Gets the help text for the command. If its not supplied the doc string is used.
        """
        if arg_0.help:
            return arg_0.help
        elif arg_0.__doc__ and arg_0.__doc__.strip():
            return arg_0.__doc__.strip()
        else:
            return ''

Gets the help text for the command . If its not supplied the doc string is used .


(self, role, method, resource, with_children=False)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=False):
        """Add Funcing rules.

        :param role: Role of this rule.
        :param method: Method to Func in rule, include GET, POST, PUT etc.
        :param resource: Resource also view function.
        :param with_children: Deny role's children in rule as well
                              if with_children is `True`
        """
        if arg_4:
            for arg_5 in arg_1.get_children():
                arg_6 = (arg_5.get_name(), arg_2, arg_3)
                if arg_6 not in arg_0._denied:
                    arg_0._denied.append(arg_6)
        arg_6 = (arg_1.get_name(), arg_2, arg_3)
        if arg_6 not in arg_0._denied:
            arg_0._denied.append(arg_6)

Add denying rules.

        :param role: Role of this rule.
        :param method: Method to deny in rule, include GET, POST, PUT etc.
        :param resource: Resource also view function.
        :param with_children: Deny role's children in rule as well
                              if with_children is `True`


(self, panel_obj, version=None, date_obj=None)

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """Replace a existing gene panel with a new one

        Keeps the object id

        Args:
            panel_obj(dict)
            version(float)
            date_obj(datetime.datetime)

        Returns:
            updated_panel(dict)
        """
        LOG.info("Updating panel %s", arg_1['panel_name'])
        # update date of panel to "today"
        arg_4 = arg_1['date']
        if arg_2:
            LOG.info("Updating version from {0} to version {1}".format(
                arg_1['version'], arg_2))
            arg_1['version'] = arg_2
            # Updating version should not update date
            if arg_3:
                arg_4 = arg_3
        else:
            arg_4 = arg_3 or dt.datetime.now()
        arg_1['date'] = arg_4

        arg_5 = arg_0.panel_collection.find_one_and_replace(
            {'_id': arg_1['_id']},
            arg_1,
            return_document=pymongo.ReturnDocument.AFTER
        )

        return arg_5


def Func ( ) : _check_old_config_root ( ) arg_0 = os . path . expanduser ( '~/.local/share' ) arg_1 = 'XDG_CONFIG_HOME' arg_2 = os . environ . get ( arg_1 , None ) or arg_0 return os . path . join ( arg_2 , 'python_keyring' )

def Func():
    """
    Use freedesktop.org Base Dir Specfication to determine config
    location.
    """
    _check_old_config_root()
    arg_0 = os.path.expanduser('~/.local/share')
    arg_1 = 'XDG_CONFIG_HOME'
    arg_2 = os.environ.get(arg_1, None) or arg_0
    return os.path.join(arg_2, 'python_keyring')

Use freedesktop . org Base Dir Specfication to determine config location .


(pipe, parent_pipe, env_fn_wrapper, obs_bufs, obs_shapes, obs_dtypes, keys)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6):
    """
    Control a single environment instance using IPC and
    shared memory.
    """
    def _write_obs(arg_7):
        arg_8 = obs_to_dict(arg_7)
        for arg_9 in arg_6:
            arg_10 = arg_3[arg_9].get_obj()
            arg_11 = np.frombuffer(arg_10, dtype=arg_5[arg_9]).reshape(arg_4[arg_9])  # pylint: disable=W0212
            np.copyto(arg_11, arg_8[arg_9])

    arg_12 = arg_2.x()
    arg_1.close()
    try:
        while True:
            arg_13, arg_14 = arg_0.recv()
            if arg_13 == 'reset':
                arg_0.send(_write_obs(arg_12.reset()))
            elif arg_13 == 'step':
                arg_15, arg_16, arg_17, arg_18 = arg_12.step(arg_14)
                if arg_17:
                    arg_15 = arg_12.reset()
                arg_0.send((_write_obs(arg_15), arg_16, arg_17, arg_18))
            elif arg_13 == 'render':
                arg_0.send(arg_12.render(mode='rgb_array'))
            elif arg_13 == 'close':
                arg_0.send(None)
                break
            else:
                raise RuntimeError('Got unrecognized cmd %s' % arg_13)
    except KeyboardInterrupt:
        print('ShmemVecEnv worker: got KeyboardInterrupt')
    finally:
        arg_12.close()

Control a single environment instance using IPC and shared memory .


(self, features, append=True, merge='outer',
                     duplicates='ignore', min_studies=0.0, threshold=0.001)

def Func(arg_0, arg_1, arg_2=True, arg_3='outer',
                     arg_4='ignore', arg_5=0.0, arg_6=0.001):
        """ Construct a new FeatureTable from file.

        Args:
            features: Feature data to add. Can be:
                (a) A text file containing the feature data, where each row is
                a study in the database, with features in columns. The first
                column must contain the IDs of the studies to match up with the
                image data.
                (b) A pandas DataFrame, where studies are in rows, features are
                in columns, and the index provides the study IDs.
            append (bool): If True, adds new features to existing ones
                incrementally. If False, replaces old features.
            merge, duplicates, min_studies, threshold: Additional arguments
                passed to FeatureTable.Func().
         """
        if (not arg_2) or not hasattr(arg_0, 'feature_table'):
            arg_0.feature_table = FeatureTable(arg_0)

        arg_0.feature_table.Func(arg_1, arg_3=arg_3,
                                        arg_4=arg_4,
                                        arg_5=arg_5,
                                        arg_6=arg_6)

Construct a new FeatureTable from file.

        Args:
            features: Feature data to add. Can be:
                (a) A text file containing the feature data, where each row is
                a study in the database, with features in columns. The first
                column must contain the IDs of the studies to match up with the
                image data.
                (b) A pandas DataFrame, where studies are in rows, features are
                in columns, and the index provides the study IDs.
            append (bool): If True, adds new features to existing ones
                incrementally. If False, replaces old features.
            merge, duplicates, min_studies, threshold: Additional arguments
                passed to FeatureTable.add_features().

Construct a new FeatureTable from file .


def Func(arg_0, arg_1):
        """Undo the scaling of X according to feature_range.

        Note that if truncate is true, any truncated points will not
        be restored exactly.

        Parameters
        ----------
        X : array-like with shape [n_samples, n_features]
            Input data that will be transformed.
        """
        arg_1 = check_array(arg_1, copy=arg_0.copy)
        arg_1 -= arg_0.min_
        arg_1 /= arg_0.scale_
        return arg_1

Undo the scaling of X according to feature_range .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . assert_package_exists ( ) if not arg_0 . package_license_comment_set : arg_0 . package_license_comment_set = True if validations . validate_pkg_lics_comment ( arg_2 ) : arg_1 . package . license_comment = str_from_text ( arg_2 ) return True else : raise SPDXValueError ( 'Package::LicenseComment' ) else : raise CardinalityError ( 'Package::LicenseComment' )

def Func(arg_0, arg_1, arg_2):
        """Sets the package's license comment.
        Raises OrderError if no package previously defined.
        Raises CardinalityError if already set.
        Raises SPDXValueError if text is not free form text.
        """
        arg_0.assert_package_exists()
        if not arg_0.package_license_comment_set:
            arg_0.package_license_comment_set = True
            if validations.validate_pkg_lics_comment(arg_2):
                arg_1.package.license_comment = str_from_text(arg_2)
                return True
            else:
                raise SPDXValueError('Package::LicenseComment')
        else:
            raise CardinalityError('Package::LicenseComment')

Sets the package s license comment . Raises OrderError if no package previously defined . Raises CardinalityError if already set . Raises SPDXValueError if text is not free form text .


return pd.Series({'mean': np.mean(x),
                      'median': np.median(x),
                      'std': np.std(x),
                      '5%': np.percentile(x, 5),
                      '25%': np.percentile(x, 25),
                      '75%': np.percentile(x, 75),
                      '95%': np.percentile(x, 95),
                      'IQR': np.subtract.reduce(
                          np.percentile(x, [75, 25])),
                      })

def Func ( arg_0 ) : return pd . Series ( { 'mean' : np . mean ( arg_0 ) , 'median' : np . median ( arg_0 ) , 'std' : np . std ( arg_0 ) , '5%' : np . percentile ( arg_0 , 5 ) , '25%' : np . percentile ( arg_0 , 25 ) , '75%' : np . percentile ( arg_0 , 75 ) , '95%' : np . percentile ( arg_0 , 95 ) , 'IQR' : np . subtract . reduce ( np . percentile ( arg_0 , [ 75 , 25 ] ) ) , } )

def Func(arg_0):
    """Calculate various summary statistics of data.

    Parameters
    ----------
    x : numpy.ndarray or pandas.Series
        Array to compute summary statistics for.

    Returns
    -------
    pandas.Series
        Series containing mean, median, std, as well as 5, 25, 75 and
        95 percentiles of passed in values.
    """

    return pd.Series({'mean': np.mean(arg_0),
                      'median': np.median(arg_0),
                      'std': np.std(arg_0),
                      '5%': np.percentile(arg_0, 5),
                      '25%': np.percentile(arg_0, 25),
                      '75%': np.percentile(arg_0, 75),
                      '95%': np.percentile(arg_0, 95),
                      'IQR': np.subtract.reduce(
                          np.percentile(arg_0, [75, 25])),
                      })

Calculate various summary statistics of data .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
LOG
.
info
(
"Add incomplete penetrance info"
)
for
arg_3
in
get_incomplete_penetrance_genes
(
arg_2
)
:
for
arg_4
in
get_correct_ids
(
arg_3
,
arg_1
)
:
arg_0
[
arg_4
]
[
'incomplete_penetrance'
]
=
True

def Func(arg_0, arg_1, arg_2):
    """Add information of incomplete penetrance"""
    LOG.info("Add incomplete penetrance info")
    for arg_3 in get_incomplete_penetrance_genes(arg_2):
        for arg_4 in get_correct_ids(arg_3, arg_1):
            arg_0[arg_4]['incomplete_penetrance'] = True


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Create an external tool using the passed json_data.

        context is either COURSES_API or ACCOUNTS_API.
        context_id is the Canvas course_id or account_id, depending on context.

        https://canvas.instructure.com/doc/api/external_tools.html#method.external_tools.create
        """
        arg_4 = arg_1.format(arg_2) + "/external_tools"
        return arg_0._post_resource(arg_4, body=arg_3)

Create an external tool using the passed json_data .


return "{} examples, {} errors, {} failures\n".format(
            result.testsRun, len(result.errors), len(result.failures),
        )

def
Func
(
arg_0
,
arg_1
)
:
return
"{} examples, {} errors, {} failures\n"
.
format
(
arg_1
.
testsRun
,
len
(
arg_1
.
errors
)
,
len
(
arg_1
.
failures
)
,
)

def Func(arg_0, arg_1):
        """
        Return a summary of the results.

        """

        return "{} examples, {} errors, {} failures\n".format(
            arg_1.testsRun, len(arg_1.errors), len(arg_1.failures),
        )


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 0 , arg_4 = 0 ) : if isinstance ( arg_1 , Counter ) and isinstance ( arg_2 , Counter ) : return arg_1 , arg_2 if arg_3 > 0 : return QGrams ( arg_1 , arg_3 , '$#' , arg_4 ) , QGrams ( arg_2 , arg_3 , '$#' , arg_4 ) return Counter ( arg_1 . strip ( ) . split ( ) ) , Counter ( arg_2 . strip ( ) . split ( ) )

def Func(arg_0, arg_1, arg_2, arg_3=0, arg_4=0):
        """Return the Q-Grams in src & tar.

        Parameters
        ----------
        src : str
            Source string (or QGrams/Counter objects) for comparison
        tar : str
            Target string (or QGrams/Counter objects) for comparison
        qval : int
            The length of each q-gram; 0 for non-q-gram version
        skip : int
            The number of characters to skip (only works when src and tar are
            strings)

        Returns
        -------
        tuple of Counters
            Q-Grams

        Examples
        --------
        >>> pe = _TokenDistance()
        >>> pe.Func('AT', 'TT', qval=2)
        (QGrams({'$A': 1, 'AT': 1, 'T#': 1}),
         QGrams({'$T': 1, 'TT': 1, 'T#': 1}))

        """
        if isinstance(arg_1, Counter) and isinstance(arg_2, Counter):
            return arg_1, arg_2
        if arg_3 > 0:
            return QGrams(arg_1, arg_3, '$#', arg_4), QGrams(arg_2, arg_3, '$#', arg_4)
        return Counter(arg_1.strip().split()), Counter(arg_2.strip().split())

Return the Q-Grams in src & tar.

        Parameters
        ----------
        src : str
            Source string (or QGrams/Counter objects) for comparison
        tar : str
            Target string (or QGrams/Counter objects) for comparison
        qval : int
            The length of each q-gram; 0 for non-q-gram version
        skip : int
            The number of characters to skip (only works when src and tar are
            strings)

        Returns
        -------
        tuple of Counters
            Q-Grams

        Examples
        --------
        >>> pe = _TokenDistance()
        >>> pe._get_qgrams('AT', 'TT', qval=2)
        (QGrams({'$A': 1, 'AT': 1, 'T#': 1}),
         QGrams({'$T': 1, 'TT': 1, 'T#': 1}))


def Func(arg_0):
    """
    Import a png file into a numpy array.

    Arguments:
        png_filename (str): A string filename of a png datafile

    Returns:
        A numpy array with data from the png file
    """
    # Expand filename to be absolute
    arg_0 = os.path.expanduser(arg_0)

    try:
        arg_1 = Image.open(arg_0)
    except Exception as e:
        raise ValueError("Could not Func file {0} for conversion."
                         .format(arg_0))
        raise

    return numpy.array(arg_1)


def Func ( arg_0 ) : if WINDOWS : arg_1 = os . path . join ( user_data_dir ( arg_0 ) , "Logs" ) elif sys . platform == "darwin" : arg_1 = os . path . join ( os . path . expanduser ( '~/Library/Logs' ) , arg_0 ) else : arg_1 = os . path . join ( user_cache_dir ( arg_0 ) , "log" ) return arg_1

def Func(arg_0):
    """
    Return full path to the user-specific log dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.

    Typical user cache directories are:
        Mac OS X:   ~/Library/Logs/<AppName>
        Unix:       ~/.cache/<AppName>/log  # or under $XDG_CACHE_HOME if
                    defined
        Win XP:     C:\Documents and Settings\<username>\Local Settings\ ...
                    ...Application Data\<AppName>\Logs
        Vista:      C:\\Users\<username>\AppData\Local\<AppName>\Logs

    On Windows the only suggestion in the MSDN docs is that local settings
    go in the `CSIDL_LOCAL_APPDATA` directory. (Note: I'm interested in
    examples of what some windows apps use for a logs dir.)

    OPINION: This function appends "Logs" to the `CSIDL_LOCAL_APPDATA`
    value for Windows and appends "log" to the user cache dir for Unix.
    """
    if WINDOWS:
        arg_1 = os.path.join(user_data_dir(arg_0), "Logs")
    elif sys.platform == "darwin":
        arg_1 = os.path.join(os.path.expanduser('~/Library/Logs'), arg_0)
    else:
        arg_1 = os.path.join(user_cache_dir(arg_0), "log")

    return arg_1

Return full path to the user - specific log dir for this application .


(
        self, component_info=None, data=None, component_position=None
    )

return self._get_3d_markers(
            RT3DMarkerPositionNoLabel, component_info, data, component_position
        )

def Func(
        arg_0, arg_1=None, arg_2=None, arg_3=None
    ):
        """Get 3D markers without label."""
        return arg_0._get_3d_markers(
            RT3DMarkerPositionNoLabel, arg_1, arg_2, arg_3
        )


def Func(arg_0, arg_1, arg_2, arg_3):
        '''Upload local file content to a storage service destination folder.

            Args:
                local_file(str)
                dest_path(str):
                    absolute Storage service path '/project' prefix is essential
                    suffix should be the name the file will have on in the destination folder
                    i.e.: /project/folder/.../file_name
                mimetype(str): set the contentType attribute

            Returns:
                The uuid of created file entity as string

            Raises:
                StorageArgumentException: Invalid arguments
                StorageForbiddenException: Server response code 403
                StorageNotFoundException: Server response code 404
                StorageException: other 400-600 error codes
        '''

        arg_0.__validate_storage_path(arg_2)
        # get the paths of the target dir and the target file name
        if arg_2.endswith('/'):
            raise StorageArgumentException('Must specify target file name in dest_path argument')
        if arg_1.endswith(os.path.sep):
            raise StorageArgumentException('Must specify source file name in local_file'
                                           ' argument, directory upload not supported')

        # create the file container
        arg_4 = arg_0.api_client.create_file(
            name=arg_2.split('/').pop(),
            content_type=arg_3,
            parent=arg_0.get_parent(arg_2)['uuid']
        )

        arg_5 = arg_0.api_client.Func_content(arg_4['uuid'], source=arg_1)
        arg_4['etag'] = arg_5

        return arg_4

Upload local file content to a storage service destination folder .


send a message from one to one-or-more engines.

(client, sender, targets, msg_name, dest_name=None, block=None)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None, arg_5=None):
    """Func a message from one to one-or-more engines."""
    arg_4 = arg_3 if arg_4 is None else arg_4
    def _Func(arg_2, arg_6):
        arg_7 = globals()[arg_6]
        return com.Func(arg_2, arg_7)

    arg_0[arg_1].apply_async(_Func, arg_2, arg_3)

    return arg_0[arg_2].execute('%s=com.recv()'%arg_4, arg_5=None)

send a message from one to one - or - more engines .


def Func ( arg_0 ) : for arg_1 , arg_2 in arg_0 . _initial_vals . items ( ) : if getattr ( arg_0 , arg_1 ) != arg_2 : return True return False

def Func(arg_0):
        """
        Determines whether this record set has been modified since the
        last retrieval or save.

        :rtype: bool
        :returns: ``True` if the record set has been modified,
            and ``False`` if not.
        """

        for arg_1, arg_2 in arg_0._initial_vals.items():
            if getattr(arg_0, arg_1) != arg_2:
                # One of the initial values doesn't match, we know
                # this object has been touched.
                return True

        return False

Determines whether this record set has been modified since the last retrieval or save .


(odb, path, label, argiope_class, variable, instance, output_position,
                       step = -1, frame = -1, sortItem='Node Label')

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
,
arg_6
,
arg_7
=
1
,
arg_8
=
1
,
arg_9
=
'Node Label'
)
:
arg_10
=
get_steps
(
arg_0
)
arg_7
=
xrange
(
len
(
arg_10
)
)
[
arg_7
]
arg_8
=
xrange
(
get_frames
(
arg_0
,
arg_10
[
arg_7
]
)
)
[
arg_8
]
arg_11
=
NumberFormat
(
numDigits
=
9
,
precision
=
0
,
format
=
SCIENTIFIC
)
session
.
fieldReportOptions
.
setValues
(
printTotal
=
OFF
,
printMinMax
=
OFF
,
numberFormat
=
arg_11
)
arg_12
=
dgo
.
LeafFromPartInstance
(
partInstanceName
=
arg_5
)
session
.
viewports
[
'Viewport: 1'
]
.
odbDisplay
.
displayGroup
.
replace
(
arg_12
=
arg_12
)
session
.
writeFieldReport
(
fileName
=
arg_1
,
append
=
OFF
,
arg_9
=
arg_9
,
arg_0
=
arg_0
,
arg_7
=
arg_7
,
arg_8
=
arg_8
,
outputPosition
=
arg_6
,
arg_4
=
arg_4
)
arg_13
=
[
arg_16
.
strip
(
)
for
arg_16
in
open
(
arg_1
)
.
readlines
(
)
]
arg_14
=
1
arg_15
=
[
]
for
arg_16
in
arg_13
:
if
arg_14
==
1
:
if
len
(
arg_16
)
==
0
:
arg_14
-=
1
else
:
arg_15
.
append
(
arg_16
)
elif
arg_14
<
1
:
if
arg_16
.
startswith
(
"--"
)
:
arg_14
+=
1
arg_15
=
"\n"
.
join
(
[
","
.
join
(
arg_16
.
split
(
)
)
for
arg_16
in
arg_15
if
len
(
arg_16
)
!=
0
]
)
arg_17
=
str
(
arg_6
)
.
lower
(
)
+
","
arg_17
+=
","
.
join
(
[
arg_18
[
1
]
for
arg_18
in
arg_4
[
0
]
[
2
]
]
)
+
"\n"
arg_19
=
(
(
"label"
,
arg_2
)
,
(
"argiope_class"
,
arg_3
)
,
(
"odb"
,
arg_0
.
path
)
,
(
"instance"
,
arg_5
)
,
(
"position"
,
arg_6
)
,
(
"step_num"
,
arg_7
)
,
(
"step_label"
,
arg_10
[
arg_7
]
)
,
(
"frame"
,
arg_8
)
,
(
"frame_value"
,
arg_0
.
steps
[
arg_10
[
arg_7
]
]
.
frames
[
arg_8
]
.
frameValue
)
)
arg_20
=
"*METADATA\n{0}\n*DATA\n{1}"
.
format
(
"\n"
.
join
(
[
"{0}={1}"
.
format
(
k
,
arg_18
)
for
k
,
arg_18
in
arg_19
]
)
,
arg_17
+
arg_15
)
open
(
arg_1
,
"w"
)
.
write
(
arg_20
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6,
                       arg_7 = -1, arg_8 = -1, arg_9='Node Label'):
  """
  Writes a field report and rewrites it in a cleaner format.
  """
  arg_10 = get_steps(arg_0)
  arg_7 = xrange(len(arg_10))[arg_7]
  arg_8 = xrange(get_frames(arg_0, arg_10[arg_7]))[arg_8]
  arg_11 = NumberFormat(numDigits=9,
                    precision=0,
                    format=SCIENTIFIC)
  session.fieldReportOptions.setValues(
          printTotal=OFF,
          printMinMax=OFF,
          numberFormat=arg_11)
  arg_12 = dgo.LeafFromPartInstance(
          partInstanceName = arg_5)
  session.viewports['Viewport: 1'].odbDisplay.displayGroup.replace(arg_12=arg_12)
  session.writeFieldReport(
          fileName       = arg_1,
          append         = OFF,
          arg_9       = arg_9,
          arg_0            = arg_0,
          arg_7           = arg_7,
          arg_8          = arg_8,
          outputPosition = arg_6,
          arg_4       = arg_4)
  arg_13 = [arg_16.strip() for arg_16 in open(arg_1).readlines()]
  arg_14 = -1
  arg_15 = []
  for arg_16 in arg_13:
   if arg_14 == 1:
     if len(arg_16) == 0:
       arg_14 -= 1
     else:
       arg_15.append(arg_16)
   elif arg_14 < 1:
     if arg_16.startswith("--"):
       arg_14 += 1
  arg_15 = "\n".join([",".join(arg_16.split()) for arg_16 in arg_15 if len(arg_16) != 0])
  # HEADER
  arg_17 = str(arg_6).lower() + ","
  arg_17 += ",".join([arg_18[1] for arg_18 in arg_4[0][2]]) + "\n"
  # METADATA
  arg_19 = (
          ("label", arg_2),
          ("argiope_class", arg_3) ,
          ("odb", arg_0.path),
          ("instance", arg_5),
          ("position", arg_6),
          ("step_num", arg_7),
          ("step_label", arg_10[arg_7]),
          ("frame", arg_8),
          ("frame_value", arg_0.steps[arg_10[arg_7]].frames[arg_8].frameValue)
              )
  arg_20 = "*METADATA\n{0}\n*DATA\n{1}".format(
        "\n".join(["{0}={1}".format(k, arg_18) for k, arg_18 in arg_19]),
        arg_17 + arg_15)
  open(arg_1, "w").write(arg_20)

Writes a field report and rewrites it in a cleaner format .


def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Performs the actual evaluation of Sanic-CORS options and actually
    modifies the response object.

    This function is used both in the decorator and the after_request
    callback
    :param sanic.request.Request req:

    """
    try:
        arg_4 = arg_2.request[id(arg_0)]
    except AttributeError:
        LOG.debug("Cannot find the request context. Is request already finished?")
        return arg_1
    # If CORS has already been evaluated via the decorator, skip
    arg_5 = arg_4.get(SANIC_CORS_EVALUATED, False)
    if arg_5:
        LOG.debug('CORS have been already evaluated, skipping')
        return arg_1

    # `resp` can be None in the case of using Websockets
    # however this case should have been handled in the `extension` and `decorator` methods
    # before getting here. This is a final failsafe check to prevent crashing
    if arg_1 is None:
        return None

    if arg_1.headers is None:
        arg_1.headers = CIMultiDict()

    arg_7 = get_cors_headers(arg_3, arg_0.headers, arg_0.method)

    LOG.debug('Settings CORS headers: %s', str(arg_7))

    # dict .extend() does not work on CIDict so
    # iterate over them and add them individually.
    try:
        arg_1.headers.extend(arg_7)
    except Exception as e1:
        for arg_8, arg_9 in arg_7.items():
            try:
                arg_1.headers.add(arg_8, arg_9)
            except Exception as e2:
                arg_1.headers[arg_8] = arg_9
        return arg_1

Performs the actual evaluation of Sanic - CORS options and actually modifies the response object .


return [{'id': p.get_vocabulary_id(), 'concepts': p.get_all(**kwarguments)}
                for p in self.providers.values()]

def Func ( arg_0 , ** arg_1 ) : arg_2 = { } if 'language' in arg_1 : arg_2 [ 'language' ] = arg_1 [ 'language' ] return [ { 'id' : arg_3 . get_vocabulary_id ( ) , 'concepts' : arg_3 . Func ( ** arg_2 ) } for arg_3 in arg_0 . providers . values ( ) ]

def Func(arg_0, **arg_1):
        '''Get all concepts from all providers.

        .. code-block:: python

            # get all concepts in all providers.
            registry.Func()

            # get all concepts in all providers.
            # If possible, display the results with a Dutch label.
            registry.Func(language='nl')

        :param string language: Optional. If present, it should be a
            :term:`language-tag`. This language-tag is passed on to the
            underlying providers and used when selecting the label to display
            for each concept.

        :returns: a list of :class:`dict`.
            Each dict has two keys: id and concepts.
        '''
        arg_2 = {}
        if 'language' in arg_1:
            arg_2['language'] = arg_1['language']
        return [{'id': arg_3.get_vocabulary_id(), 'concepts': arg_3.Func(**arg_2)}
                for arg_3 in arg_0.providers.values()]

Get all concepts from all providers.

        .. code-block:: python

            # get all concepts in all providers.
            registry.get_all()

            # get all concepts in all providers.
            # If possible, display the results with a Dutch label.
            registry.get_all(language='nl')

        :param string language: Optional. If present, it should be a
            :term:`language-tag`. This language-tag is passed on to the
            underlying providers and used when selecting the label to display
            for each concept.

        :returns: a list of :class:`dict`.
            Each dict has two keys: id and concepts.


def Func ( arg_0 , arg_1 = True ) : if arg_1 : arg_0 = get_percent_alloc ( arg_0 ) arg_0 = arg_0 . drop ( 'cash' , axis = 'columns' ) arg_0 = arg_0 . stack ( ) arg_0 . index = arg_0 . index . set_names ( [ 'dt' , 'ticker' ] ) return arg_0

def Func(arg_0, arg_1=True):
    """
    Convert positions to percentages if necessary, and change them
    to long format.

    Parameters
    ----------
    positions: pd.DataFrame
        Daily holdings (in dollars or percentages), indexed by date.
        Will be converted to percentages if positions are in dollars.
        Short positions show up as cash in the 'cash' column.

    pos_in_dollars : bool
        Flag indicating whether `positions` are in dollars or percentages
        If True, positions are in dollars.
    """
    if arg_1:
        # convert holdings to percentages
        arg_0 = get_percent_alloc(arg_0)

    # remove cash after normalizing positions
    arg_0 = arg_0.drop('cash', axis='columns')

    # convert positions to long format
    arg_0 = arg_0.stack()
    arg_0.index = arg_0.index.set_names(['dt', 'ticker'])

    return arg_0

Convert positions to percentages if necessary and change them to long format .


def Func(arg_0, arg_1):
        """Asserts that val is the given length."""
        if type(arg_1) is not int:
            raise TypeError('given arg must be an int')
        if arg_1 < 0:
            raise ValueError('given arg must be a positive int')
        if len(arg_0.val) != arg_1:
            arg_0._err('Expected <%s> to be of length <%d>, but was <%d>.' % (arg_0.val, arg_1, len(arg_0.val)))
        return arg_0


def Func ( arg_0 , arg_1 ) : if arg_0 . resolved : if isinstance ( arg_0 . resolved [ 0 ] , VirtualEnvironment ) : arg_2 = arg_0 . resolved [ 0 ] arg_3 = arg_2 . get_module ( arg_1 ) if arg_3 : return arg_3 raise ResolveError

def Func(arg_0, arg_1):
    '''Resolves module in previously resolved environment.'''

    if arg_0.resolved:

        if isinstance(arg_0.resolved[0], VirtualEnvironment):
            arg_2 = arg_0.resolved[0]
            arg_3 = arg_2.get_module(arg_1)

            if arg_3:
                return arg_3

    raise ResolveError

Resolves module in previously resolved environment .


return (
        parentUri
        and childUri
        and childUri.rstrip("/").startswith(parentUri.rstrip("/") + "/")
    )

def Func ( arg_0 , arg_1 ) : return ( arg_0 and arg_1 and arg_1 . rstrip ( "/" ) . startswith ( arg_0 . rstrip ( "/" ) + "/" ) )

def Func(arg_0, arg_1):
    """Return True, if childUri is a child of parentUri.

    This function accounts for the fact that '/a/b/c' and 'a/b/c/' are
    children of '/a/b' (and also of '/a/b/').
    Note that '/a/b/cd' is NOT a child of 'a/b/c'.
    """
    return (
        arg_0
        and arg_1
        and arg_1.rstrip("/").startswith(arg_0.rstrip("/") + "/")
    )

Return True if childUri is a child of parentUri .


return np.r_[2, 3, 3 * np.nonzero(sieve)[0] + 1 | 1]

def Func(arg_0):
  # Based on
  # https://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188
  """Returns sorted array of primes such that `2 <= prime < n`."""
  arg_1 = np.array((2, 3, 5))
  if arg_0 <= 6:
    return arg_1[arg_1 < arg_0]
  arg_2 = np.ones(arg_0 // 3 + (arg_0 % 6 == 2), dtype=np.bool)
  arg_2[0] = False
  arg_3 = int(arg_0 ** 0.5) // 3 + 1
  for arg_4 in range(arg_3):
    if not arg_2[arg_4]:
      continue
    arg_5 = 3 * arg_4 + 1 | 1
    arg_2[arg_5 ** 2 // 3::2 * arg_5] = False
    arg_2[(arg_5 ** 2 + 4 * arg_5 - 2 * arg_5 * (arg_4 & 1)) // 3::2 * arg_5] = False
  return np.r_[2, 3, 3 * np.nonzero(arg_2)[0] + 1 | 1]

Returns sorted array of primes such that 2 < = prime < n .


(count, ec2_config, region, waitForSSH=True, tags=None)

def Func(arg_0, arg_1, arg_2, arg_3=True, arg_4=None):
    '''Create a new reservation for count instances'''

    arg_5 = inheritparams(arg_1, EC2_API_RUN_INSTANCE)
    arg_5.setdefault('min_count', arg_0)
    arg_5.setdefault('max_count', arg_0)

    arg_6 = None
    arg_7 = ec2_connect(arg_2)
    try:
        arg_6 = arg_7.Func(**arg_5)
        log('Reservation: {0}'.format(arg_6.id))
        log('Waiting for {0} EC2 instances {1} to come up, this can take 1-2 minutes.'.format(len(arg_6.instances), arg_6.instances))
        arg_8 = time.time()
        time.sleep(1)
        for arg_9 in arg_6.instances:
            while arg_9.update() == 'pending':
               time.sleep(1)
               h2o_cmd.dot()

            if not arg_9.state == 'running':
                raise Exception('\033[91m[ec2] Error waiting for running state. Instance is in state {0}.\033[0m'.format(arg_9.state))

        log('Instances started in {0} seconds'.format(time.time() - arg_8))
        log('Instances: ')
        for arg_10 in arg_6.instances: log("   {0} ({1}) : public ip: {2}, private ip: {3}".format(arg_10.public_dns_name, arg_10.id, arg_10.ip_address, arg_10.private_ip_address))

        if arg_3:
            # kbn: changing to private address, so it should fail if not in right domain
            # used to have the public ip address
            wait_for_ssh([ arg_11.private_ip_address for arg_11 in arg_6.instances ])

        # Tag instances
        try:
            if arg_4:
                arg_7.create_tags([arg_11.id for arg_11 in arg_6.instances], arg_4)
        except:
            warn('Something wrong during tagging instances. Exceptions IGNORED!')
            print sys.exc_info()
            pass

        return arg_6
    except:
        print "\033[91mUnexpected error\033[0m :", sys.exc_info()
        if arg_6:
            terminate_reservation(arg_6, arg_2)
        raise


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
""
)
:
arg_1
=
arg_1
.
replace
(
" "
,
"_"
)
arg_4
=
extradims
.
get_id_for_extra_dim_type
(
arg_2
)
arg_5
=
ExtraBytesStruct
(
data_type
=
arg_4
,
arg_1
=
arg_1
.
encode
(
)
,
arg_3
=
arg_3
.
encode
(
)
)
try
:
arg_6
=
arg_0
.
vlrs
.
get
(
"ExtraBytesVlr"
)
[
0
]
except
IndexError
:
arg_6
=
ExtraBytesVlr
(
)
arg_0
.
vlrs
.
append
(
arg_6
)
finally
:
arg_6
.
extra_bytes_structs
.
append
(
arg_5
)
arg_0
.
points_data
.
Funcs
(
[
(
arg_1
,
arg_2
)
]
)

def Func(arg_0, arg_1, arg_2, arg_3=""):
        """ Adds a new extra dimension to the point record

        Parameters
        ----------
        name: str
            the name of the dimension
        type: str
            type of the dimension (eg 'uint8')
        description: str, optional
            a small description of the dimension
        """
        arg_1 = arg_1.replace(" ", "_")
        arg_4 = extradims.get_id_for_extra_dim_type(arg_2)
        arg_5 = ExtraBytesStruct(
            data_type=arg_4, arg_1=arg_1.encode(), arg_3=arg_3.encode()
        )

        try:
            arg_6 = arg_0.vlrs.get("ExtraBytesVlr")[0]
        except IndexError:
            arg_6 = ExtraBytesVlr()
            arg_0.vlrs.append(arg_6)
        finally:
            arg_6.extra_bytes_structs.append(arg_5)
            arg_0.points_data.Funcs([(arg_1, arg_2)])


def Func(arg_0, arg_1, arg_2=8):
        """Return the eudex phonetic hash of a word.

        Parameters
        ----------
        word : str
            The word to transform
        max_length : int
            The length in bits of the code returned (default 8)

        Returns
        -------
        int
            The eudex hash

        Examples
        --------
        >>> pe = Eudex()
        >>> pe.Func('Colin')
        432345564238053650
        >>> pe.Func('Christopher')
        433648490138894409
        >>> pe.Func('Niall')
        648518346341351840
        >>> pe.Func('Smith')
        720575940412906756
        >>> pe.Func('Schmidt')
        720589151732307997

        """
        # Lowercase input & filter unknown characters
        arg_1 = ''.join(
            arg_4 for arg_4 in arg_1.lower() if arg_4 in arg_0._initial_phones
        )

        if not arg_1:
            arg_1 = '÷'

        # Perform initial eudex coding of each character
        arg_3 = [arg_0._initial_phones[arg_1[0]]]
        arg_3 += [arg_0._trailing_phones[arg_4] for arg_4 in arg_1[1:]]

        # Right-shift by one to determine if second instance should be skipped
        arg_5 = [_ >> 1 for _ in arg_3]
        arg_6 = [arg_3[0]]
        for arg_7 in range(1, len(arg_5)):
            if arg_5[arg_7] != arg_5[arg_7 - 1]:
                arg_6.append(arg_3[arg_7])

        # Add padding after first character & trim beyond max_length
        arg_3 = (
            [arg_6[0]]
            + [0] * max(0, arg_2 - len(arg_6))
            + arg_6[1:arg_2]
        )

        # Combine individual character values into eudex hash
        arg_8 = 0
        for arg_9 in arg_3:
            arg_8 = (arg_8 << 8) | arg_9

        return arg_8

Return the eudex phonetic hash of a word.

        Parameters
        ----------
        word : str
            The word to transform
        max_length : int
            The length in bits of the code returned (default 8)

        Returns
        -------
        int
            The eudex hash

        Examples
        --------
        >>> pe = Eudex()
        >>> pe.encode('Colin')
        432345564238053650
        >>> pe.encode('Christopher')
        433648490138894409
        >>> pe.encode('Niall')
        648518346341351840
        >>> pe.encode('Smith')
        720575940412906756
        >>> pe.encode('Schmidt')
        720589151732307997

Return the eudex phonetic hash of a word .


def Func ( arg_0 ) : arg_1 = None if arg_0 . config . paths : arg_1 = PathAliases ( arg_0 . file_locator ) for arg_2 in arg_0 . config . paths . values ( ) : arg_3 = arg_2 [ 0 ] for arg_4 in arg_2 [ 1 : ] : arg_1 . add ( arg_4 , arg_3 ) arg_0 . data . Func_parallel_data ( arg_1 = arg_1 )

def Func(arg_0):
        """Combine together a number of similarly-named coverage data files.

        All coverage data files whose name starts with `data_file` (from the
        coverage() constructor) will be read, and Funcd together into the
        current measurements.

        """
        arg_1 = None
        if arg_0.config.paths:
            arg_1 = PathAliases(arg_0.file_locator)
            for arg_2 in arg_0.config.paths.values():
                arg_3 = arg_2[0]
                for arg_4 in arg_2[1:]:
                    arg_1.add(arg_4, arg_3)
        arg_0.data.Func_parallel_data(arg_1=arg_1)

Combine together a number of similarly-named coverage data files.

        All coverage data files whose name starts with `data_file` (from the
        coverage() constructor) will be read, and combined together into the
        current measurements.

Combine together a number of similarly - named coverage data files .


def Func(arg_0, arg_1, arg_2):
        '''Draw a line using relative coordinates.'''
        if arg_0._path is None:
            raise ShoebotError(_("No current path. Use beginpath() first."))
        arg_0._path.Func(arg_1, arg_2)

Draw a line using relative coordinates .


def Func ( arg_0 ) : try : arg_1 = arg_0 . get_argument ( constants . PARAM_ENDTIME ) return arg_1 except tornado . web . MissingArgumentError as e : raise Exception ( e . log_message )

def Func(arg_0):
    """
    Helper function to get endtime argument.
    Raises exception if argument is missing.
    Returns the endtime argument.
    """
    try:
      arg_1 = arg_0.get_argument(constants.PARAM_ENDTIME)
      return arg_1
    except tornado.web.MissingArgumentError as e:
      raise Exception(e.log_message)

Helper function to get endtime argument . Raises exception if argument is missing . Returns the endtime argument .


def
Func
(
arg_0
,
arg_1
=
,
**
arg_2
)
:
if
arg_1
is
:
arg_1
=
plt
.
gca
(
)
arg_3
=
FuncFormatter
(
utils
.
percentage
)
arg_1
.
yaxis
.
set_major_formatter
(
FuncFormatter
(
arg_3
)
)
arg_4
=
ep
.
cum_returns
(
arg_0
,
starting_value
=
1.0
)
arg_5
=
np
.
maximum
.
accumulate
(
arg_4
)
arg_6
=
100
*
(
(
arg_5
arg_4
)
/
arg_5
)
(
arg_6
)
.
plot
(
arg_1
=
arg_1
,
kind
=
'area'
,
color
=
'coral'
,
alpha
=
0.7
,
**
arg_2
)
arg_1
.
set_ylabel
(
'Drawdown'
)
arg_1
.
set_title
(
'Underwater plot'
)
arg_1
.
set_xlabel
(
''
)
return
arg_1

def Func(arg_0, arg_1=None, **arg_2):
    """
    Plots how far underwaterr returns are over time, or plots current
    drawdown vs. date.

    Parameters
    ----------
    returns : pd.Series
        Daily returns of the strategy, noncumulative.
         - See full explanation in tears.create_full_tear_sheet.
    ax : matplotlib.Axes, optional
        Axes upon which to plot.
    **kwargs, optional
        Passed to plotting function.

    Returns
    -------
    ax : matplotlib.Axes
        The axes that were plotted on.
    """

    if arg_1 is None:
        arg_1 = plt.gca()

    arg_3 = FuncFormatter(utils.percentage)
    arg_1.yaxis.set_major_formatter(FuncFormatter(arg_3))

    arg_4 = ep.cum_returns(arg_0, starting_value=1.0)
    arg_5 = np.maximum.accumulate(arg_4)
    arg_6 = -100 * ((arg_5 - arg_4) / arg_5)
    (arg_6).plot(arg_1=arg_1, kind='area', color='coral', alpha=0.7, **arg_2)
    arg_1.set_ylabel('Drawdown')
    arg_1.set_title('Underwater plot')
    arg_1.set_xlabel('')
    return arg_1

Plots how far underwaterr returns are over time or plots current drawdown vs . date .


def Func(arg_0, arg_1, arg_2):
        """Estimates the quality of the ContinuousMDR model using a t-statistic.

        Parameters
        ----------
        features: array-like {n_samples, n_features}
            Feature matrix to predict from
        targets: array-like {n_samples}
            List of true target values

        Returns
        -------
        quality_Func: float
            The estimated quality of the Continuous MDR model

        """
        if arg_0.feature_map is None:
            raise ValueError('The Continuous MDR model must be fit before Func() can be called.')

        arg_3 = []
        arg_4 = []

        for arg_5 in arg_0.feature_map:
            if arg_0.feature_map[arg_5] == 0:
                arg_3.extend(arg_0.mdr_matrix_values[arg_5])
            else:
                arg_4.extend(arg_0.mdr_matrix_values[arg_5])

        return abs(ttest_ind(arg_3, arg_4).statistic)

Estimates the quality of the ContinuousMDR model using a t-statistic.

        Parameters
        ----------
        features: array-like {n_samples, n_features}
            Feature matrix to predict from
        targets: array-like {n_samples}
            List of true target values

        Returns
        -------
        quality_score: float
            The estimated quality of the Continuous MDR model

Estimates the quality of the ContinuousMDR model using a t - statistic .


Allows a decorator to be called with or without keyword arguments.

def Func ( arg_0 ) : assert callable ( arg_0 ) , type ( arg_0 ) def _Func ( arg_1 = None , ** arg_2 ) : assert arg_1 is None or callable ( arg_1 ) , type ( arg_1 ) if arg_1 : return arg_0 ( arg_1 , ** arg_2 ) else : def _Func_helper ( arg_1 ) : return arg_0 ( arg_1 , ** arg_2 ) return _Func_helper return _Func

def Func(arg_0):
    """Allows a Func to be called with or without keyword arguments."""
    assert callable(arg_0), type(arg_0)

    def _Func(arg_1=None, **arg_2):
        assert arg_1 is None or callable(arg_1), type(arg_1)
        if arg_1:
            return arg_0(arg_1, **arg_2)
        else:
            def _Func_helper(arg_1):
                return arg_0(arg_1, **arg_2)

            return _Func_helper

    return _Func

Allows a decorator to be called with or without keyword arguments .


def Func():
    """
    This function will print out the intermittents onto the screen for casual viewing.  It will also print out
    where the giant summary dictionary is going to be stored.

    :return: None
    """
    # extract intermittents from collected failed tests
    global g_summary_dict_intermittents

    arg_0 = time.tzname[0]

    for arg_1 in range(len(g_summary_dict_all["TestName"])):
        if g_summary_dict_all["TestInfo"][arg_1]["FailureCount"] >= g_threshold_failure:
            addFailedTests(g_summary_dict_intermittents, g_summary_dict_all, arg_1)

    # save dict in file
    if len(g_summary_dict_intermittents["TestName"]) > 0:
        json.dump(g_summary_dict_intermittents, open(g_summary_dict_name, 'w'))

        with open(g_summary_csv_filename, 'w') as summaryFile:
            for arg_1 in range(len(g_summary_dict_intermittents["TestName"])):
                arg_2 = g_summary_dict_intermittents["TestName"][arg_1]
                arg_3 = g_summary_dict_intermittents["TestInfo"][arg_1]["FailureCount"]
                arg_4  = parser.parse(time.ctime(min(g_summary_dict_intermittents["TestInfo"][arg_1]["Timestamp"]))+
                                              ' '+arg_0)
                arg_5 = arg_4.strftime("%a %b %d %H:%M:%S %Y %Z")
                arg_6 = parser.parse(time.ctime(max(g_summary_dict_intermittents["TestInfo"][arg_1]["Timestamp"]))+
                                          ' '+arg_0)
                arg_7 = arg_6.strftime("%a %b %d %H:%M:%S %Y %Z")
                arg_8 = "{0}, {1}, {2}, {3}\n".format(arg_2, arg_7, arg_3,
                                                       g_summary_dict_intermittents["TestInfo"][arg_1]["TestCategory"][0])
                summaryFile.write(arg_8)
                print("Intermittent: {0}, Last failed: {1}, Failed {2} times since "
                      "{3}".format(arg_2, arg_7, arg_3, arg_5))

This function will print out the intermittents onto the screen for casual viewing . It will also print out where the giant summary dictionary is going to be stored .


def Func ( arg_0 ) : if arg_0 == '**' : return '.*' arg_1 , arg_2 = 0 , len ( arg_0 ) arg_3 = [ ] while arg_1 < arg_2 : arg_4 = arg_0 [ arg_1 ] arg_1 = arg_1 + 1 if arg_4 == '*' : arg_3 . append ( '[^%s]*' % SEPARATORS ) elif arg_4 == '?' : arg_3 . append ( '[^%s]?' % SEPARATORS ) elif arg_4 == '[' : arg_5 = arg_1 if arg_5 < arg_2 and arg_0 [ arg_5 ] == '!' : arg_5 = arg_5 + 1 if arg_5 < arg_2 and arg_0 [ arg_5 ] == ']' : arg_5 = arg_5 + 1 while arg_5 < arg_2 and arg_0 [ arg_5 ] != ']' : arg_5 = arg_5 + 1 if arg_5 >= arg_2 : arg_3 . append ( '\\[' ) else : arg_6 = arg_0 [ arg_1 : arg_5 ] . replace ( '\\' , '\\\\' ) arg_1 = arg_5 + 1 if arg_6 [ 0 ] == '!' : arg_6 = '^' + arg_6 [ 1 : ] elif arg_6 [ 0 ] == '^' : arg_6 = '\\' + arg_6 arg_3 . append ( '[%s]' % arg_6 ) else : arg_3 . append ( re . escape ( arg_4 ) ) return '' . join ( arg_3 )

def Func(arg_0):
    """Translate a glob PATTERN PART to a regular expression."""
    # Code modified from Python 3 standard lib fnmatch:
    if arg_0 == '**':
        return '.*'
    arg_1, arg_2 = 0, len(arg_0)
    arg_3 = []
    while arg_1 < arg_2:
        arg_4 = arg_0[arg_1]
        arg_1 = arg_1 + 1
        if arg_4 == '*':
            # Match anything but path separators:
            arg_3.append('[^%s]*' % SEPARATORS)
        elif arg_4 == '?':
            arg_3.append('[^%s]?' % SEPARATORS)
        elif arg_4 == '[':
            arg_5 = arg_1
            if arg_5 < arg_2 and arg_0[arg_5] == '!':
                arg_5 = arg_5 + 1
            if arg_5 < arg_2 and arg_0[arg_5] == ']':
                arg_5 = arg_5 + 1
            while arg_5 < arg_2 and arg_0[arg_5] != ']':
                arg_5 = arg_5 + 1
            if arg_5 >= arg_2:
                arg_3.append('\\[')
            else:
                arg_6 = arg_0[arg_1:arg_5].replace('\\', '\\\\')
                arg_1 = arg_5 + 1
                if arg_6[0] == '!':
                    arg_6 = '^' + arg_6[1:]
                elif arg_6[0] == '^':
                    arg_6 = '\\' + arg_6
                arg_3.append('[%s]' % arg_6)
        else:
            arg_3.append(re.escape(arg_4))
    return ''.join(arg_3)

Translate a glob PATTERN PART to a regular expression .


def Func ( ) : arg_0 , arg_1 , arg_2 = sys . exc_info ( ) if arg_2 is not None : _Func . post_mortem ( arg_2 ) else : _Func . set_trace ( )

def Func():
    """If called in the context of an exception, calls post_mortem; otherwise
    set_trace.
    ``ipdb`` is preferred over ``pdb`` if installed.
    """
    arg_0, arg_1, arg_2 = sys.exc_info()
    if arg_2 is not None:
        _Func.post_mortem(arg_2)
    else:
        _Func.set_trace()

If called in the context of an exception calls post_mortem ; otherwise set_trace . ipdb is preferred over pdb if installed .


def Func(arg_0, arg_1, arg_2=None):
    """
    Assert that variable satisfies the provided condition.

    :param v: variable to check. Its value is only used for error reporting.
    :param bool cond: condition that must be satisfied. Should be somehow related to the variable ``v``.
    :param message: message string to use instead of the default.
    """
    if not arg_1:
        arg_3, arg_4 = _retrieve_assert_arguments()
        if not arg_2:
            arg_2 = "Argument `{var}` (= {val!r}) does not satisfy the condition {expr}" \
                      .format(var=arg_3, val=arg_0, expr=arg_4)
        raise H2OValueError(arg_2=arg_2, var_name=arg_3, skip_frames=1)

Assert that variable satisfies the provided condition .


return (psd_future, acq_time_start, acq_time_stop)

def Func(arg_0, arg_1):
        """Tune to specified center frequency and compute Power Spectral Density"""
        if not arg_0.device.is_streaming:
            raise RuntimeError('Streaming is not initialized, you must run setup() first!')

        # Tune to new frequency in main thread
        logger.debug('  Frequency hop: {:.2f} Hz'.format(arg_1))
        arg_2 = time.time()
        if arg_0.device.freq != arg_1:
            # Deactivate streaming before tuning
            if arg_0._reset_stream:
                arg_0.device.device.deactivateStream(arg_0.device.stream)

            # Actually tune to new center frequency
            arg_0.device.freq = arg_1

            # Reactivate straming after tuning
            if arg_0._reset_stream:
                arg_0.device.device.activateStream(arg_0.device.stream)

            # Delay reading samples after tuning
            if arg_0._tune_delay:
                arg_4 = time.time()
                while True:
                    arg_0.device.read_stream()
                    arg_5 = time.time()
                    if arg_5 - arg_4 >= arg_0._tune_delay:
                        break
                logger.debug('    Tune delay: {:.3f} s'.format(arg_5 - arg_4))
        else:
            logger.debug('    Same frequency as before, tuning skipped')
        arg_6 = arg_0._Func.set_center_freq(arg_1)
        arg_7 = time.time()
        logger.debug('    Tune time: {:.3f} s'.format(arg_7 - arg_2))

        for arg_8 in range(arg_0._buffer_repeats):
            logger.debug('    Repeat: {}'.format(arg_8 + 1))
            # Read samples from SDR in main thread
            arg_9 = time.time()
            arg_10 = datetime.datetime.utcnow()
            arg_0.device.read_stream_into_buffer(arg_0._buffer)
            arg_11 = datetime.datetime.utcnow()
            arg_12 = time.time()
            logger.debug('      Acquisition time: {:.3f} s'.format(arg_12 - arg_9))

            # Start FFT computation in another thread
            arg_0._Func.update_async(arg_6, numpy.copy(arg_0._buffer))

            arg_13 = time.time()

            if _shutdown:
                break

        arg_14 = arg_0._Func.result_async(arg_6)
        logger.debug('    Total hop time: {:.3f} s'.format(arg_13 - arg_2))

        return (arg_14, arg_10, arg_11)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { } while arg_3 . get ( "state" , "" ) != "__DIE__" : try : arg_3 = arg_1 . get ( True , arg_0 . cycle_sleep ) arg_0 . task = arg_3 . get ( "task" , "" ) if arg_0 . task != "" : arg_0 . task . task_start = time . time ( ) arg_0 . r_q_send ( { "w_id" : arg_0 . w_id , "task" : arg_0 . task , "state" : "__ACK__" } ) arg_0 . cycle_sleep = arg_0 . task . worker_loop_delay arg_0 . task . result = arg_0 . task . run ( ) arg_0 . task . task_stop = time . time ( ) arg_0 . r_q_send ( { "w_id" : arg_0 . w_id , "task" : arg_0 . task , "state" : "__FINISHED__" } ) arg_0 . task = None except Empty : pass except Full : time . sleep ( 0.1 ) except : if arg_0 . task is not None : arg_0 . task . task_stop = time . time ( ) arg_9 = "" . join ( tb . format_exception ( * ( sys . exc_info ( ) ) ) ) arg_0 . r_q_send ( { "w_id" : arg_0 . w_id , "task" : arg_0 . task , "error" : arg_9 , "state" : "__ERROR__" , } ) return

def Func(arg_0, arg_1, arg_2):
        """Loop through messages and execute tasks"""
        arg_3 = {}
        while arg_3.get("state", "") != "__DIE__":
            try:
                arg_3 = arg_1.get(True, arg_0.cycle_sleep)  # Poll blocking
                arg_0.task = arg_3.get("task", "")  # __DIE__ has no task
                if arg_0.task != "":

                    arg_0.task.task_start = time.time()  # Start the timer
                    # Send ACK to the controller who requested work on this task
                    arg_0.r_q_send(
                        {"w_id": arg_0.w_id, "task": arg_0.task, "state": "__ACK__"}
                    )

                    # Update the sleep time with latest recommendations
                    arg_0.cycle_sleep = arg_0.task.worker_loop_delay

                    # Assign the result of task.run() to task.result
                    arg_0.task.result = arg_0.task.run()
                    arg_0.task.task_stop = time.time()  # Seconds since epoch

                    arg_0.r_q_send(
                        {"w_id": arg_0.w_id, "task": arg_0.task, "state": "__FINISHED__"}
                    )  # Ack work finished

                    arg_0.task = None
            except Empty:
                pass
            except Full:
                time.sleep(0.1)
            ## Disable extraneous error handling...
            except:
                if arg_0.task is not None:
                    arg_0.task.task_stop = time.time()  # Seconds since epoch
                # Handle all other errors here...
                arg_9 = "".join(tb.format_exception(*(sys.exc_info())))
                arg_0.r_q_send(
                    {
                        "w_id": arg_0.w_id,
                        "task": arg_0.task,
                        "error": arg_9,
                        "state": "__ERROR__",
                    }
                )

        return


def Func ( arg_0 ) : arg_1 = { } for arg_2 in arg_0 . split ( '\n' ) : if not arg_2 : continue if len ( arg_2 ) < 8 : continue arg_3 = _process_row ( arg_2 , columns_ ) or { 'card' : None } arg_4 = arg_3 [ 'card' ] if arg_4 is not None : arg_5 = _process_row ( arg_2 , columns [ arg_4 ] ) arg_6 = arg_1 . get ( arg_4 , [ ] ) arg_6 . append ( arg_5 ) arg_1 [ arg_4 ] = arg_6 for arg_7 , arg_8 in arg_1 . items ( ) : if len ( arg_8 ) == 1 : arg_1 [ arg_7 ] = arg_8 [ 0 ] return arg_1

def Func(arg_0):
    """
    Read all the rows and return a dict of the results.
    """
    arg_1 = {}
    for arg_2 in arg_0.split('\n'):
        if not arg_2:
            continue

        if len(arg_2) < 8:  # Not a real record.
            continue

        # Read the metadata for this row/
        arg_3 = _process_row(arg_2, columns_) or {'card': None}
        arg_4 = arg_3['card']

        # Now we know the card type for this row, we can process it.
        if arg_4 is not None:
            arg_5 = _process_row(arg_2, columns[arg_4])

        arg_6 = arg_1.get(arg_4, [])
        arg_6.append(arg_5)
        arg_1[arg_4] = arg_6

    # Flatten if possible.
    for arg_7, arg_8 in arg_1.items():
        if len(arg_8) == 1:
            arg_1[arg_7] = arg_8[0]

    return arg_1

Read all the rows and return a dict of the results .


return self._get_success_json(self._post_json(
            'v1/search_templates/builders/from-dataset-ids', data, failure_message=failure_message))['data']

def Func(arg_0, arg_1):
        """
        Generates a default search templates from the available columns in the dataset ids given.

        :param dataset_ids: The id of the dataset to retrieve files from
        :type dataset_ids: list of int
        :return: A search template based on the columns in the datasets given
        """

        arg_2 = {
            "dataset_ids":
                arg_1
        }

        arg_3 = "Failed to generate a search template from columns in dataset(s) {}".format(arg_1)

        return arg_0._get_success_json(arg_0._post_json(
            'v1/search_templates/builders/from-dataset-ids', arg_2, arg_3=arg_3))['data']

Generates a default search templates from the available columns in the dataset ids given .


(self, doc_id, conn=None, nosave=False, score=1.0, payload=None,
                      replace=False, partial=False, language=None, **fields)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = False , arg_4 = 1.0 , arg_5 = None , arg_6 = False , arg_7 = False , arg_8 = None , ** arg_9 ) : if arg_2 is None : arg_2 = arg_0 . redis if arg_7 : arg_6 = True arg_10 = [ arg_0 . ADD_CMD , arg_0 . index_name , arg_1 , arg_4 ] if arg_3 : arg_10 . append ( 'NOSAVE' ) if arg_5 is not None : arg_10 . append ( 'PAYLOAD' ) arg_10 . append ( arg_5 ) if arg_6 : arg_10 . append ( 'REPLACE' ) if arg_7 : arg_10 . append ( 'PARTIAL' ) if arg_8 : arg_10 += [ 'LANGUAGE' , arg_8 ] arg_10 . append ( 'FIELDS' ) arg_10 += list ( itertools . chain ( * arg_9 . items ( ) ) ) return arg_2 . execute_command ( * arg_10 )

def Func(arg_0, arg_1, arg_2=None, arg_3=False, arg_4=1.0, arg_5=None,
                      arg_6=False, arg_7=False, arg_8=None, **arg_9):
        """
        Internal add_document used for both batch and single doc indexing
        """
        if arg_2 is None:
            arg_2 = arg_0.redis

        if arg_7:
            arg_6 = True

        arg_10 = [arg_0.ADD_CMD, arg_0.index_name, arg_1, arg_4]
        if arg_3:
            arg_10.append('NOSAVE')
        if arg_5 is not None:
            arg_10.append('PAYLOAD')
            arg_10.append(arg_5)
        if arg_6:
            arg_10.append('REPLACE')
            if arg_7:
                arg_10.append('PARTIAL')
        if arg_8:
            arg_10 += ['LANGUAGE', arg_8]
        arg_10.append('FIELDS')
        arg_10 += list(itertools.chain(*arg_9.items()))
        return arg_2.execute_command(*arg_10)


def Func(arg_0, arg_1, arg_2):
    '''HPSS demo function.

    :parameters:
      - input_file : str
          path to input audio
      - output_harmonic : str
          path to save output harmonic (wav)
      - output_percussive : str
          path to save output harmonic (wav)
    '''

    # 1. Load the wav file, resample
    print('Loading ', arg_0)

    arg_3, arg_4 = librosa.load(arg_0)

    # Separate components with the effects module
    print('Separating harmonics and percussives... ')
    arg_5, arg_6 = librosa.effects.hpss(arg_3)

    # 5. Save the results
    print('Saving harmonic audio to: ', arg_1)
    librosa.output.write_wav(arg_1, arg_5, arg_4)

    print('Saving percussive audio to: ', arg_2)
    librosa.output.write_wav(arg_2, arg_6, arg_4)


def
Func
(
arg_0
,
arg_1
)
:
if
arg_1
>=
arg_0
.
_n
:
raise
IndexError
(
"Invalid bit"
)
arg_2
=
set
(
)
for
arg_3
,
arg_4
in
arg_0
.
_patterns
.
iteritems
(
)
:
if
arg_1
in
arg_4
:
arg_2
.
add
(
arg_3
)
return
arg_2

def Func(arg_0, arg_1):
    """
    Return the set of pattern numbers that match a bit.

    @param bit (int) Index of bit

    @return (set) Indices of numbers
    """
    if arg_1 >= arg_0._n:
      raise IndexError("Invalid bit")

    arg_2 = set()

    for arg_3, arg_4 in arg_0._patterns.iteritems():
      if arg_1 in arg_4:
        arg_2.add(arg_3)

    return arg_2

Return the set of pattern numbers that match a bit .


(self, x_pos, y_pos, theta, sf_0, phase, B_sf, B_theta)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, arg_7):
        """
        Returns the image of a LogGabor

        Note that the convention for coordinates follows that of matrices:
        the origin is at the top left of the image, and coordinates are first
        the rows (vertical axis, going down) then the columns (horizontal axis,
        going right).

        """

        arg_8 = arg_0.loggabor(arg_1, arg_2, arg_4=arg_4, arg_6=arg_6, arg_3=arg_3, arg_7=arg_7)
        arg_8 = arg_8 * np.exp(1j * arg_5)
        return arg_0.invert(arg_8, full=False)


def Func ( arg_0 ) : arg_1 = arg_0 . obj_get_positions ( ) arg_2 = np . round ( arg_1 ) . astype ( 'int' ) arg_3 = arg_0 . ishape . translate ( - arg_0 . pad ) . contains ( arg_2 ) arg_4 = tuple ( arg_2 [ arg_3 ] . T ) arg_5 = arg_0 . data [ arg_4 ] arg_6 = np . median ( arg_5 ) < np . median ( arg_0 . data ) return arg_6

def Func(arg_0):
    """Guesses whether particles are bright on a dark bkg or vice-versa

    Works by checking whether the intensity at the particle centers is
    brighter or darker than the average intensity of the image, by
    comparing the median intensities of each.

    Parameters
    ----------
    st : :class:`peri.states.ImageState`

    Returns
    -------
    invert : bool
        Whether to invert the image for featuring.
    """
    arg_1 = arg_0.obj_get_positions()
    arg_2 = np.round(arg_1).astype('int')
    arg_3 = arg_0.ishape.translate(-arg_0.pad).contains(arg_2)
    arg_4 = tuple(arg_2[arg_3].T)
    arg_5 = arg_0.data[arg_4]
    arg_6 = np.median(arg_5) < np.median(arg_0.data)  # invert if dark particles
    return arg_6

Guesses whether particles are bright on a dark bkg or vice - versa


def Func(arg_0, arg_1, arg_2=False):
        """ Append raw SVG data to the widget.
        """
        arg_0._append_custom(arg_0._insert_svg, arg_1, arg_2)


def Func(arg_0):
    """
    Instance method decorator to convert an optional file keyword
    argument into an actual value, whether it be a passed value, a
    value obtained from an io_manager, or sys.stderr.
    """
    def arg_4(arg_1, arg_2, arg_3=None):
        if arg_3:
            return arg_0(arg_1, arg_2, arg_3=arg_3)
        elif arg_1.io_manager:
            with arg_1.io_manager.with_stderr() as stderr:
                return arg_0(arg_1, arg_2, arg_3=stderr)
        else:
            return arg_0(arg_1, arg_2, arg_3=sys.stderr)
    arg_4.__doc__ = arg_0.__doc__
    return arg_4

Instance method decorator to convert an optional file keyword argument into an actual value whether it be a passed value a value obtained from an io_manager or sys . stderr .


delete - Deletes all entries matching the filter criteria

def Func ( arg_0 ) : if arg_0 . filters or arg_0 . notFilters : return arg_0 . mdl . Funcr . FuncMultiple ( arg_0 . allOnlyIndexedFields ( ) ) return arg_0 . mdl . Funcr . destroyModel ( )

def Func(arg_0):
		'''
			Func - Deletes all entries matching the filter criteria

		'''
		if arg_0.filters or arg_0.notFilters:
			return arg_0.mdl.Funcr.FuncMultiple(arg_0.allOnlyIndexedFields())
		return arg_0.mdl.Funcr.destroyModel()


(img, angle, translate, scale, shear, resample=0, fillcolor=None)

return img.transform(output_size, Image.AFFINE, matrix, resample, **kwargs)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5=0, arg_6=None):
    """Apply Func transformation on the image keeping image center invariant

    Args:
        img (PIL Image): PIL Image to be rotated.
        angle (float or int): rotation angle in degrees between -180 and 180, clockwise direction.
        translate (list or tuple of integers): horizontal and vertical translations (post-rotation translation)
        scale (float): overall scale
        shear (float): shear angle value in degrees between -180 to 180, clockwise direction.
        resample (``PIL.Image.NEAREST`` or ``PIL.Image.BILINEAR`` or ``PIL.Image.BICUBIC``, optional):
            An optional resampling filter.
            See `filters`_ for more information.
            If omitted, or if the image has mode "1" or "P", it is set to ``PIL.Image.NEAREST``.
        fillcolor (int): Optional fill color for the area outside the transform in the output image. (Pillow>=5.0.0)
    """
    if not _is_pil_image(arg_0):
        raise TypeError('img should be PIL Image. Got {}'.format(type(arg_0)))

    assert isinstance(arg_2, (tuple, list)) and len(arg_2) == 2, \
        "Argument translate should be a list or tuple of length 2"

    assert arg_3 > 0.0, "Argument scale should be positive"

    arg_7 = arg_0.size
    arg_8 = (arg_0.size[0] * 0.5 + 0.5, arg_0.size[1] * 0.5 + 0.5)
    arg_9 = _get_inverse_Func_matrix(arg_8, arg_1, arg_2, arg_3, arg_4)
    arg_10 = {"fillcolor": arg_6} if PILLOW_VERSION[0] == '5' else {}
    return arg_0.transform(arg_7, Image.AFFINE, arg_9, arg_5, **arg_10)

Apply affine transformation on the image keeping image center invariant

    Args:
        img (PIL Image): PIL Image to be rotated.
        angle (float or int): rotation angle in degrees between -180 and 180, clockwise direction.
        translate (list or tuple of integers): horizontal and vertical translations (post-rotation translation)
        scale (float): overall scale
        shear (float): shear angle value in degrees between -180 to 180, clockwise direction.
        resample (``PIL.Image.NEAREST`` or ``PIL.Image.BILINEAR`` or ``PIL.Image.BICUBIC``, optional):
            An optional resampling filter.
            See `filters`_ for more information.
            If omitted, or if the image has mode "1" or "P", it is set to ``PIL.Image.NEAREST``.
        fillcolor (int): Optional fill color for the area outside the transform in the output image. (Pillow>=5.0.0)


def Func(arg_0=None):
    """
    Load config overrides from the yml file at |path|, or from default paths. If a path
    is provided and it does not exist, raise an exception

    Default paths: ./mcore.yml, ./.mcore.yml, ./manticore.yml, ./.manticore.yml.
    """

    if arg_0 is not None:
        arg_1 = [arg_0]
    else:
        arg_2 = ['mcore.yml', 'manticore.yml']
        arg_1 = [os.path.join('.', ''.join(x)) for x in product(['', '.'], arg_2)]

    for arg_3 in arg_1:
        try:
            with open(arg_3, 'r') as yml_f:
                logger.info(f'Reading configuration from {name}')
                parse_config(yml_f)
            break
        except FileNotFoundError:
            pass
    else:
        if arg_0 is not None:
            raise FileNotFoundError(f"'{path}' not found for config overrides")

Load config overrides from the yml file at |path| or from default paths . If a path is provided and it does not exist raise an exception


def Func ( arg_0 ) : arg_1 = arg_0 . session . query ( models . IPAddress ) arg_2 , arg_3 = billing . calc_periods ( ) arg_4 = billing . build_full_day_ips ( arg_1 , arg_2 , arg_3 ) import random arg_5 = random . randint ( 0 , len ( arg_4 ) - 1 ) arg_6 = arg_4 [ arg_5 ] arg_6 . allocated_at = datetime . datetime . utcnow ( ) - datetime . timedelta ( days = 1 ) arg_0 . session . add ( arg_6 ) arg_0 . session . flush ( )

def Func(arg_0):
    """This is a helper method for testing.

    When run with the current context, it will create a case 2 entries
    in the database. See top of file for what case 2 is.
    """
    arg_1 = arg_0.session.query(models.IPAddress)
    arg_2, arg_3 = billing.calc_periods()
    arg_4 = billing.build_full_day_ips(arg_1, arg_2, arg_3)
    import random
    arg_5 = random.randint(0, len(arg_4) - 1)
    arg_6 = arg_4[arg_5]
    arg_6.allocated_at = datetime.datetime.utcnow() -\
        datetime.timedelta(days=1)
    arg_0.session.add(arg_6)
    arg_0.session.flush()


def
Func
(
arg_0
,
arg_1
,
*
arg_2
,
**
arg_3
)
:
arg_4
=
time
.
time
(
)
arg_0
.
__update_header
(
)
if
arg_0
.
container
.
isheavy
(
)
:
arg_0
.
__Func_heavy
(
arg_1
)
else
:
arg_0
.
__Func_light
(
arg_1
)
arg_5
=
time
.
time
(
)
logger
.
info
(
'Conversion time: %2.2fsec'
%
(
arg_5
arg_4
)
)

def Func(arg_0, arg_1, *arg_2, **arg_3):
        """ Write data to .fil file.
            It check the file size then decides how to write the file.

        Args:
            filename_out (str): Name of output file
        """

        #For timing how long it takes to write a file.
        arg_4 = time.time()

        #Update header
        arg_0.__update_header()

        if arg_0.container.isheavy():
            arg_0.__Func_heavy(arg_1)
        else:
            arg_0.__Func_light(arg_1)

        arg_5 = time.time()
        logger.info('Conversion time: %2.2fsec' % (arg_5- arg_4))

Write data to . fil file . It check the file size then decides how to write the file .


def Func ( arg_0 , ** arg_1 ) : arg_2 = [ ] arg_3 = False for arg_4 in arg_0 . variables : arg_5 = arg_0 . variables [ arg_4 ] for arg_6 , arg_7 in arg_1 . items ( ) : if callable ( arg_7 ) : arg_3 = arg_7 ( getattr ( arg_5 , arg_6 , None ) ) if arg_3 is False : break elif hasattr ( arg_5 , arg_6 ) and getattr ( arg_5 , arg_6 ) == arg_7 : arg_3 = True else : arg_3 = False break if arg_3 is True : arg_2 . append ( arg_0 . variables [ arg_4 ] ) return arg_2

def Func(arg_0, **arg_1):
        """ Returns variables that match specific conditions.

        * Can pass in key=value parameters and variables are returned that
        contain all of the matches.  For example,

        >>> # Get variables with x-axis attribute.
        >>> vs = nc.Func(axis='X')
        >>> # Get variables with matching "standard_name" attribute.
        >>> nc.Func(standard_name='northward_sea_water_velocity')

        * Can pass in key=callable parameter and variables are returned if the
        callable returns True.  The callable should accept a single parameter,
        the attribute value.  None is given as the attribute value when the
        attribute does not exist on the variable. For example,

        >>> # Get Axis variables.
        >>> vs = nc.Func(axis=lambda v: v in ['X', 'Y', 'Z', 'T'])
        >>> # Get variables that don't have an "axis" attribute.
        >>> vs = nc.Func(axis=lambda v: v is None)
        >>> # Get variables that have a "grid_mapping" attribute.
        >>> vs = nc.Func(grid_mapping=lambda v: v is not None)

        """
        arg_2 = []

        arg_3  = False
        for arg_4 in arg_0.variables:
            arg_5 = arg_0.variables[arg_4]
            for arg_6, arg_7 in arg_1.items():
                if callable(arg_7):
                    arg_3 = arg_7(getattr(arg_5, arg_6, None))
                    if arg_3 is False:
                        break
                elif hasattr(arg_5, arg_6) and getattr(arg_5, arg_6) == arg_7:
                    arg_3 = True
                else:
                    arg_3 = False
                    break

            if arg_3 is True:
                arg_2.append(arg_0.variables[arg_4])

        return arg_2

Returns variables that match specific conditions.

        * Can pass in key=value parameters and variables are returned that
        contain all of the matches.  For example,

        >>> # Get variables with x-axis attribute.
        >>> vs = nc.get_variables_by_attributes(axis='X')
        >>> # Get variables with matching "standard_name" attribute.
        >>> nc.get_variables_by_attributes(standard_name='northward_sea_water_velocity')

        * Can pass in key=callable parameter and variables are returned if the
        callable returns True.  The callable should accept a single parameter,
        the attribute value.  None is given as the attribute value when the
        attribute does not exist on the variable. For example,

        >>> # Get Axis variables.
        >>> vs = nc.get_variables_by_attributes(axis=lambda v: v in ['X', 'Y', 'Z', 'T'])
        >>> # Get variables that don't have an "axis" attribute.
        >>> vs = nc.get_variables_by_attributes(axis=lambda v: v is None)
        >>> # Get variables that have a "grid_mapping" attribute.
        >>> vs = nc.get_variables_by_attributes(grid_mapping=lambda v: v is not None)

Returns variables that match specific conditions .


def Func(arg_0, arg_1, arg_2, arg_3):
        """Set pixel to RGB color tuple"""
        arg_4 = arg_0.angleToPixel(arg_2, arg_1)
        arg_0._Func_base(arg_4, arg_3)


def Func ( arg_0 , arg_1 ) : try : if arg_0 . max_messages : arg_2 = arg_0 . redis_client . pipeline ( ) arg_2 . rpush ( arg_0 . key , arg_0 . format ( arg_1 ) ) arg_2 . ltrim ( arg_0 . key , - arg_0 . max_messages , - 1 ) arg_2 . execute ( ) else : arg_0 . redis_client . rpush ( arg_0 . key , arg_0 . format ( arg_1 ) ) except redis . RedisError : pass

def Func(arg_0, arg_1):
        """
        Publish record to redis logging list
        """
        try:
            if arg_0.max_messages:
                arg_2 = arg_0.redis_client.pipeline()
                arg_2.rpush(arg_0.key, arg_0.format(arg_1))
                arg_2.ltrim(arg_0.key, -arg_0.max_messages, -1)
                arg_2.execute()
            else:
                arg_0.redis_client.rpush(arg_0.key, arg_0.format(arg_1))
        except redis.RedisError:
            pass


def
Func
(
arg_0
,
arg_1
)
:
arg_0
.
_check_kernel_id
(
arg_1
)
super
(
MappingKernelManager
,
arg_0
)
.
Func
(
arg_1
)
arg_0
.
delete_mapping_for_kernel
(
arg_1
)
arg_0
.
log
.
info
(
"Kernel shutdown: %s"
%
arg_1
)

def Func(arg_0, arg_1):
        """Shutdown a kernel and remove its notebook association."""
        arg_0._check_kernel_id(arg_1)
        super(MappingKernelManager, arg_0).Func(arg_1)
        arg_0.delete_mapping_for_kernel(arg_1)
        arg_0.log.info("Kernel shutdown: %s" % arg_1)

Shutdown a kernel and remove its notebook association .


def Func(arg_0, arg_1):
        """Download a file.

        :param field: file field to Func
        :type field: string
        :rtype: a file handle

        """
        if not arg_1.startswith('output'):
            raise ValueError("Only processor results (output.* fields) can be Funced")

        if arg_1 not in arg_0.annotation:
            raise ValueError("Download field {} does not exist".format(arg_1))

        arg_2 = arg_0.annotation[arg_1]
        if arg_2['type'] != 'basic:file:':
            raise ValueError("Only basic:file: field can be Funced")

        return next(arg_0.gencloud.Func([arg_0.id], arg_1))

Download a file.

        :param field: file field to download
        :type field: string
        :rtype: a file handle


def Func(arg_0, **arg_1):
        """
        This method lets users get the status of whether or not the movie has
        been rated or added to their favourite or watch lists. A valid session
        id is required.

        Args:
            session_id: see Authentication.

        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

This method lets users get the status of whether or not the movie has been rated or added to their favourite or watch lists . A valid session id is required .


def Func ( arg_0 = True ) : arg_1 = pd . read_pickle ( pkgrs . resource_filename ( 'latools' , 'resources/Func.pkl' ) ) if arg_0 : return arg_1 . set_index ( 'element' ) else : def wmean ( arg_2 ) : return ( arg_2 . atomic_weight * arg_2 . percent ) . sum ( ) / 100 arg_3 = arg_1 . groupby ( 'element' ) . apply ( wmean ) arg_3 . name = 'atomic_weight' return arg_3

def Func(arg_0=True):
    """
    Loads a DataFrame of all Func and isotopes.

    Scraped from https://www.webFunc.com/

    Returns
    -------
    pandas DataFrame with columns (element, atomic_number, isotope, atomic_weight, percent)
    """
    arg_1 = pd.read_pickle(pkgrs.resource_filename('latools', 'resources/Func.pkl'))
    if arg_0:
        return arg_1.set_index('element')
    else:
        def wmean(arg_2):
            return (arg_2.atomic_weight * arg_2.percent).sum() / 100
        arg_3 = arg_1.groupby('element').apply(wmean)
        arg_3.name = 'atomic_weight'
        return arg_3

Loads a DataFrame of all elements and isotopes.

    Scraped from https://www.webelements.com/

    Returns
    -------
    pandas DataFrame with columns (element, atomic_number, isotope, atomic_weight, percent)

Loads a DataFrame of all elements and isotopes .


def Func ( arg_0 , arg_1 = None ) : arg_2 = util . get_object ( obj = arg_0 , predefined_objects = tensorforce . core . distributions . distributions , arg_1 = arg_1 ) assert isinstance ( arg_2 , Distribution ) return arg_2

def Func(arg_0, arg_1=None):
        """
        Creates a distribution from a specification dict.
        """
        arg_2 = util.get_object(
            obj=arg_0,
            predefined_objects=tensorforce.core.distributions.distributions,
            arg_1=arg_1
        )
        assert isinstance(arg_2, Distribution)
        return arg_2

Creates a distribution from a specification dict .


def Func ( arg_0 , arg_1 ) : arg_2 = numpy . zeros ( 1 ) for arg_3 in arg_0 . material . compounds : arg_2 += arg_0 . get_compound_mass ( arg_3 ) * numpy . array ( stoich . element_mass_fractions ( arg_3 , [ arg_1 ] ) ) return arg_2 [ 0 ]

def Func(arg_0, arg_1):
        """
        Determine the mass of the specified elements in the package.

        :returns: Masses. [kg]
        """

        arg_2 = numpy.zeros(1)
        for arg_3 in arg_0.material.compounds:
            arg_2 += arg_0.get_compound_mass(arg_3) *\
                numpy.array(stoich.element_mass_fractions(arg_3, [arg_1]))
        return arg_2[0]

Determine the mass of the specified elements in the package .


(url, output_dir='.', merge=True, info_only=False, **kwargs)

def Func(arg_0, arg_1='.', arg_2=True, arg_3=False, **arg_4):
    """Downloads CBS videos by URL.
    """

    arg_5 = get_content(arg_0)
    arg_6 = match1(arg_5, r'video\.settings\.pid\s*=\s*\'([^\']+)\'')
    arg_7 = match1(arg_5, r'video\.settings\.title\s*=\s*\"([^\"]+)\"')

    theplatform_download_by_pid(arg_6, arg_7, arg_1=arg_1, arg_2=arg_2, arg_3=arg_3)


def Func(arg_0, arg_1):
        """Reads in a PlanarRad generated report

        Saves the single line reported parameters as a python dictionary

        :param filename: The name and path of the PlanarRad generated file
        :returns self.data_dictionary: python dictionary with the key and values from the report
        """
        arg_2 = False
        arg_3 = open(arg_1)
        while arg_3:
        #for line in open(filename):
            arg_4 = arg_3.readline()
            if not arg_4:
                arg_2 = True
                break

            if "# Quad solid angle mean point theta table (rows are horizontal, columns are vertical):" in arg_4.strip():
                # read in the bunch of lines.
                arg_5 = []
                for arg_6 in range(0, len(arg_0.data_dictionary['theta_points_deg']) - 2):
                    arg_5.append(arg_3.readline())

                arg_0.data_dictionary['Quad_solid_angle_mean_point_theta'] = arg_5

            elif '#' not in arg_4 or not arg_4.strip():
                arg_8 = arg_4.split(',')
                arg_0.data_dictionary[arg_8[0]] = arg_8[1:]

            if "# Quad solid angle mean point phi table (rows are horizontal, columns are vertical):" in arg_4.strip():
                # read in the bunch of lines.
                arg_5 = []
                for arg_6 in range(0, len(arg_0.data_dictionary['theta_points_deg']) - 2):
                    arg_5.append(arg_3.readline())

                arg_0.data_dictionary['Quad_solid_angle_mean_point_phi'] = arg_5

            elif '#' not in arg_4 or not arg_4.strip():
                arg_8 = arg_4.split(',')
                arg_0.data_dictionary[arg_8[0]] = arg_8[1:]

            if "L_w band" in arg_4.strip():

                for arg_6 in range(0, int(arg_0.data_dictionary['band_count'][1])):
                    arg_5 = []
                    for arg_9 in range(0, len(arg_0.data_dictionary['theta_points_deg']) - 2):
                        arg_5.append(arg_3.readline())

                    arg_0.data_dictionary['L_w_band_' + arg_10(arg_6 + 1)] = arg_5
                    arg_3.readline()
                    arg_3.readline()  # skip the next 2 lines

            if "L_it band" in arg_4.strip():

                for arg_6 in range(0, int(arg_0.data_dictionary['band_count'][1])):
                    arg_5 = []
                    for arg_9 in range(0, len(arg_0.data_dictionary['theta_points_deg']) - 2):
                        arg_5.append(arg_3.readline())

                    arg_0.data_dictionary['L_it_band_' + arg_10(arg_6 + 1)] = arg_5
                    arg_3.readline()
                    arg_3.readline()  # skip the next 2 lines

        return arg_0.data_dictionary


def Func(arg_0, arg_1=None, **arg_2):
        """Finds and returns all datasets from the database which matches the requirement.
        In some case, the data in a dataset can be stored separately for better management.

        Parameters
        ----------
        dataset_name : str
            The name/key of dataset.
        kwargs : other events
            Other events, such as description, author and etc (optional).

        Returns
        --------
        params : the parameters, return False if nothing found.

        """

        arg_0._fill_project_info(arg_2)
        if arg_1 is None:
            raise Exception("dataset_name is None, please give a dataset name")
        arg_2.update({'dataset_name': arg_1})

        arg_3 = time.time()
        arg_4 = arg_0.db.Dataset.find(arg_2)

        if arg_4 is not None:
            arg_5 = arg_4.distinct('dataset_id')
            arg_6 = []
            for arg_7 in arg_5:  # you may have multiple Buckets files
                arg_8 = arg_0.dataset_fs.get(arg_7).read()
                arg_6.append(arg_0._deserialization(arg_8))
        else:
            print("[Database] FAIL! Cannot find any dataset: {}".format(arg_2))
            return False

        print("[Database] Find {} datasets SUCCESS, took: {}s".format(len(arg_6), round(time.time() - arg_3, 2)))
        return arg_6

Finds and returns all datasets from the database which matches the requirement . In some case the data in a dataset can be stored separately for better management .


def Func():
    """Show current logged Polyaxon user."""
    try:
        arg_0 = PolyaxonClient().auth.get_user()
    except (PolyaxonHTTPError, PolyaxonShouldExitError, PolyaxonClientException) as e:
        Printer.print_error('Could not load user info.')
        Printer.print_error('Error message `{}`.'.format(e))
        sys.exit(1)
    click.echo("\nUsername: {username}, Email: {email}\n".format(**arg_0.to_dict()))


def Func ( arg_0 , arg_1 ) : arg_0 . PC = Operators . ITEBV ( arg_0 . address_bit_size , Operators . OR ( arg_0 . CF , arg_0 . ZF ) , arg_1 . read ( ) , arg_0 . PC )

def Func(arg_0, arg_1):
        """
        Jumps short if below or equal.

        :param cpu: current CPU.
        :param target: destination operand.
        """
        arg_0.PC = Operators.ITEBV(arg_0.address_bit_size, Operators.OR(arg_0.CF, arg_0.ZF), arg_1.read(), arg_0.PC)


def Func ( arg_0 ) : if arg_0 . response . status in arg_0 . _error_handlers : return arg_0 . _error_handlers [ arg_0 . response . status ] elif None in arg_0 . _error_handlers : return arg_0 . _error_handlers [ None ] else : arg_0 . response . media_type = 'text/plain' return lambda : arg_0 . response . status_line

def Func(arg_0):
        """Return an error page for the current response status."""
        if arg_0.response.status in arg_0._error_handlers:
            return arg_0._error_handlers[arg_0.response.status]
        elif None in arg_0._error_handlers:
            return arg_0._error_handlers[None]
        else:
            # Rudimentary error handler if no error handler was found
            arg_0.response.media_type = 'text/plain'
            return lambda: arg_0.response.status_line

Return an error page for the current response status .


def Func ( arg_0 ) : arg_0 . Func_now = True arg_0 . history_manager . save_flag . set ( ) arg_0 . join ( )

def Func(arg_0):
        """This can be called from the main thread to safely Func this thread.

        Note that it does not attempt to write out remaining history before
        exiting. That should be done by calling the HistoryManager's
        end_session method."""
        arg_0.Func_now = True
        arg_0.history_manager.save_flag.set()
        arg_0.join()

This can be called from the main thread to safely stop this thread.

        Note that it does not attempt to write out remaining history before
        exiting. That should be done by calling the HistoryManager's
        end_session method.

This can be called from the main thread to safely stop this thread .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
.
split_contents
(
)
if
len
(
arg_2
)
>
1
:
raise
TemplateSyntaxError
(
"'%s' takes no arguments"
%
arg_2
[
0
]
)
return
ClickyNode
(
)

def Func(arg_0, arg_1):
    """
    Clicky tracking template tag.

    Renders Javascript code to track page visits.  You must supply
    your Clicky Site ID (as a string) in the ``CLICKY_SITE_ID``
    setting.
    """
    arg_2 = arg_1.split_contents()
    if len(arg_2) > 1:
        raise TemplateSyntaxError("'%s' takes no arguments" % arg_2[0])
    return ClickyNode()


def Func ( arg_0 , arg_1 ) : try : arg_2 = parser . parse ( str ( arg_1 ) ) except ValueError : try : arg_2 = datetime . fromtimestamp ( int ( arg_1 ) ) except TypeError : arg_2 = None return arg_2

def Func(arg_0, arg_1):
        """
        Attempt to parse the passed in string into a valid datetime.
        If we get a parse error then assume the string is an epoch time
        and convert to a datetime.
        """
        try:
            arg_2 = parser.parse(str(arg_1))
        except ValueError:
            try:
                arg_2 = datetime.fromtimestamp(int(arg_1))
            except TypeError:
                arg_2 = None
        return arg_2

Attempt to parse the passed in string into a valid datetime . If we get a parse error then assume the string is an epoch time and convert to a datetime .


def Func ( arg_0 , arg_1 ) : return bool ( lib . lsl_Func ( arg_0 . e , str . encode ( arg_1 ) ) )

def Func(arg_0, arg_1):
        """Set the element's value. Returns False if the node is empty."""
        return bool(lib.lsl_Func(arg_0.e, str.encode(arg_1)))

Set the element s value . Returns False if the node is empty .