return self.layers(th.cat([x, self.noise], 1))

def Func ( arg_0 , arg_1 ) : arg_0 . noise . normal_ ( ) return arg_0 . layers ( th . cat ( [ arg_1 , arg_0 . noise ] , 1 ) )

def Func(arg_0, arg_1):
        """Pass data through the net structure.

        :param x: input data: shape (:,1)
        :type x: torch.Variable
        :return: output of the shallow net
        :rtype: torch.Variable

        """
        arg_0.noise.normal_()
        return arg_0.layers(th.cat([arg_1, arg_0.noise], 1))


return self.get_hook().check_for_partition(
            self.database_name, self.table_name, self.expression)

def Func(arg_0, arg_1):
        """
        Checks for existence of the partition in the AWS Glue Catalog table
        """
        if '.' in arg_0.table_name:
            arg_0.database_name, arg_0.table_name = arg_0.table_name.split('.')
        arg_0.log.info(
            'Poking for table %s. %s, expression %s', arg_0.database_name, arg_0.table_name, arg_0.expression
        )

        return arg_0.get_hook().check_for_partition(
            arg_0.database_name, arg_0.table_name, arg_0.expression)


(address_books, query, method="all", reverse=False,
                 group=False, sort="first_name")

def Func(arg_0, arg_1, arg_2="all", arg_3=False,
                 arg_4=False, arg_5="first_name"):
    """Get a list of contacts from one or more address books.

    :param address_books: the address books to search
    :type address_books: list(address_book.AddressBook)
    :param query: a search query to select contacts
    :type quer: str
    :param method: the search method, one of "all", "name" or "uid"
    :type method: str
    :param reverse: reverse the order of the returned contacts
    :type reverse: bool
    :param group: group results by address book
    :type group: bool
    :param sort: the field to use for sorting, one of "first_name", "last_name"
    :type sort: str
    :returns: contacts from the address_books that match the query
    :rtype: list(CarddavObject)

    """
    # Search for the contacts in all address books.
    arg_6 = []
    for arg_7 in arg_0:
        arg_6.extend(arg_7.search(arg_1, arg_2=arg_2))
    # Sort the contacts.
    if arg_4:
        if arg_5 == "first_name":
            return sorted(arg_6, arg_3=arg_3, key=lambda x: (
                unidecode(x.address_book.name).lower(),
                unidecode(x.get_first_name_last_name()).lower()))
        elif arg_5 == "last_name":
            return sorted(arg_6, arg_3=arg_3, key=lambda x: (
                unidecode(x.address_book.name).lower(),
                unidecode(x.get_last_name_first_name()).lower()))
        else:
            raise ValueError('sort must be "first_name" or "last_name" not '
                             '{}.'.format(arg_5))
    else:
        if arg_5 == "first_name":
            return sorted(arg_6, arg_3=arg_3, key=lambda x:
                          unidecode(x.get_first_name_last_name()).lower())
        elif arg_5 == "last_name":
            return sorted(arg_6, arg_3=arg_3, key=lambda x:
                          unidecode(x.get_last_name_first_name()).lower())
        else:
            raise ValueError('sort must be "first_name" or "last_name" not '
                             '{}.'.format(arg_5))

Get a list of contacts from one or more address books .


Returns a function that colors a string with a number from 0 to 255.

def Func ( arg_0 ) : if supports_256 ( ) : arg_1 = "\033[38;5;{number}m{text}\033[0m" else : arg_1 = "\033[{number}m{text}\033[0m" def _Func ( arg_2 ) : if not all ( [ sys . stdout . isatty ( ) , sys . stderr . isatty ( ) ] ) : return arg_2 else : return arg_1 . format ( arg_0 = arg_0 , arg_2 = arg_2 ) return _Func

def Func(arg_0):
    """
    Returns a function that Funcs a string with a number from 0 to 255.
    """
    if supports_256():
        arg_1 = "\033[38;5;{number}m{text}\033[0m"
    else:
        arg_1 = "\033[{number}m{text}\033[0m"
    def _Func(arg_2):
        if not all([sys.stdout.isatty(), sys.stderr.isatty()]):
            return arg_2
        else:
            return arg_1.format(arg_0=arg_0, arg_2=arg_2)
    return _Func

Returns a function that colors a string with a number from 0 to 255 .


def
Func
(
arg_0
,
*
,
arg_1
=
False
)
:
arg_2
=
type
(
arg_0
)
class
ReadonlyProxy
(
arg_2
)
:
def
__getattribute__
(
arg_3
,
arg_4
)
:
return
getattr
(
arg_0
,
arg_4
)
def
__setattr__
(
arg_3
,
arg_4
,
arg_5
)
:
if
arg_1
:
raise
AttributeError
(
'cannot set Func object.'
)
update_wrapper
(
ReadonlyProxy
,
arg_2
,
updated
=
(
)
)
return
ReadonlyProxy
(
)

def Func(arg_0, *, arg_1 = False):
    '''
    return a Func proxy for the `obj`.

    all modify on the proxy will not apply on origin object.
    '''
    arg_2 = type(arg_0)

    class ReadonlyProxy(arg_2):
        def __getattribute__(arg_3, arg_4):
            return getattr(arg_0, arg_4)

        def __setattr__(arg_3, arg_4, arg_5):
            if arg_1:
                raise AttributeError('cannot set Func object.')

    update_wrapper(ReadonlyProxy, arg_2, updated = ())
    return ReadonlyProxy()

return a readonly proxy for the `obj`.

    all modify on the proxy will not apply on origin object.


def
Func
(
arg_0
,
*
arg_1
)
:
arg_2
=
DB
.
info
(
)
arg_3
=
[
'keyspace_misses'
,
'keyspace_hits'
,
'used_memory_human'
,
'total_commands_processed'
,
'total_connections_received'
,
'connected_clients'
]
for
arg_4
in
arg_3
:
print
(
'{}: {}'
.
format
(
white
(
arg_4
)
,
blue
(
arg_2
[
arg_4
]
)
)
)
arg_5
=
int
(
DB
.
config_get
(
'databases'
)
[
'databases'
]
)
for
arg_6
in
range
(
arg_5
1
)
:
arg_7
=
'db{}'
.
format
(
arg_6
)
if
arg_7
in
arg_2
:
arg_8
=
white
(
'nb keys (db {})'
.
format
(
arg_6
)
)
print
(
'{}: {}'
.
format
(
arg_8
,
blue
(
arg_2
[
arg_7
]
[
'keys'
]
)
)
)

def Func(arg_0, *arg_1):
        """Print some useful infos from Redis DB."""
        arg_2 = DB.info()
        arg_3 = [
            'keyspace_misses', 'keyspace_hits', 'used_memory_human',
            'total_commands_processed', 'total_connections_received',
            'connected_clients']
        for arg_4 in arg_3:
            print('{}: {}'.format(white(arg_4), blue(arg_2[arg_4])))
        arg_5 = int(DB.config_get('databases')['databases'])
        for arg_6 in range(arg_5 - 1):
            arg_7 = 'db{}'.format(arg_6)
            if arg_7 in arg_2:
                arg_8 = white('nb keys (db {})'.format(arg_6))
                print('{}: {}'.format(arg_8, blue(arg_2[arg_7]['keys'])))


def Func(arg_0, arg_1):
        """
        Set a new value for this thing.

        value -- value to Func
        """
        if arg_0.value_forwarder is not None:
            arg_0.value_forwarder(arg_1)

        arg_0.notify_of_external_update(arg_1)

Set a new value for this thing.

        value -- value to set


(times: np.ndarray, amp: complex, period: float, phase: float = 0)

return amp*(-2*np.abs(sawtooth(times, 1, period, (phase-np.pi/2)/2)) + 1).astype(np.complex_)

def Func(arg_0: arg_1.ndarray, arg_3: arg_4, arg_5: arg_6, arg_7: arg_6 = 0) -> arg_1.ndarray:
    """Continuous Func wave.

    Args:
        times: Times to output wave for.
        amp: Pulse amplitude. Wave range is [-amp, amp].
        period: Pulse period, units of dt.
        phase: Pulse phase.
    """
    return arg_3*(-2*arg_1.abs(sawtooth(arg_0, 1, arg_5, (arg_7-arg_1.pi/2)/2)) + 1).astype(arg_1.complex_)

Continuous triangle wave.

    Args:
        times: Times to output wave for.
        amp: Pulse amplitude. Wave range is [-amp, amp].
        period: Pulse period, units of dt.
        phase: Pulse phase.


def Func(arg_0):
    """
    dynamically load a class given a string of the format

    package.Class
    """
    arg_1, arg_2 = arg_0.rsplit('.', 1)
    arg_3 = import_module(arg_1)
    return getattr(arg_3, arg_2)

dynamically load a class given a string of the format package . Class


return _grab(
        to_file=False, childprocess=childprocess, backend=backend, bbox=bbox)

def Func(arg_0=None, arg_1=None, arg_2=None):
    """Copy the contents of the screen to PIL image memory.

    :param bbox: optional bounding box (x1,y1,x2,y2)
    :param childprocess: pyscreenshot can cause an error,
            if it is used on more different virtual displays
            and back-end is not in different process.
            Some back-ends are always different processes: scrot, imagemagick
            The default is False if the program was started inside IDLE,
            otherwise it is True.
    :param backend: back-end can be forced if set (examples:scrot, wx,..),
                    otherwise back-end is automatic
    """
    if arg_1 is None:
        arg_1 = childprocess_default_value()
    return _Func(
        to_file=False, arg_1=arg_1, arg_2=arg_2, arg_0=arg_0)

Copy the contents of the screen to PIL image memory .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _filesystemWidget . model ( ) . item ( arg_1 ) if not isinstance ( arg_2 , riffle . model . File ) : arg_0 . _acceptButton . setDisabled ( True ) arg_0 . setLocation ( arg_2 . path , interactive = True )

def Func(arg_0, arg_1):
        '''Handle activation of item in listing.'''
        arg_2 = arg_0._filesystemWidget.model().item(arg_1)
        if not isinstance(arg_2, riffle.model.File):
            arg_0._acceptButton.setDisabled(True)
            arg_0.setLocation(arg_2.path, interactive=True)


def Func(arg_0):
        '''
        Restores the previous position and returns the last move from the stack.
        '''
        arg_1 = arg_0.move_stack.Func()

        # Update transposition table.
        arg_0.transpositions.subtract((arg_0.zobrist_hash(), ))

        # Decrement move number.
        arg_0.move_number -= 1

        # Restore state.
        arg_2 = arg_0.captured_piece_stack.Func()
        arg_3 = arg_0.turn

        # On a null move simply swap the turn.
        if not arg_1:
            arg_0.turn ^= 1
            return arg_1

        # Restore the source square.
        arg_4 = arg_0.piece_type_at(arg_1.to_square)
        if arg_1.promotion:
            arg_4 = PIECE_PROMOTED.index(arg_4)

        if arg_1.from_square is None:
            arg_0.add_piece_into_hand(arg_4, arg_0.turn ^ 1)
        else:
            arg_0.set_piece_at(arg_1.from_square, Piece(arg_4, arg_0.turn ^ 1))

        # Restore target square.
        if arg_2:
            arg_0.remove_piece_from_hand(arg_2, arg_3 ^ 1)
            arg_0.set_piece_at(arg_1.to_square, Piece(arg_2, arg_3))
        else:
            arg_0.remove_piece_at(arg_1.to_square)

        # Swap turn.
        arg_0.turn ^= 1

        return arg_1

Restores the previous position and returns the last move from the stack .


(self, filename, heatmap, execution_count)

return {
            'name': filename,
            'heatmap': heatmap,
            'executionCount': execution_count,
            'srcCode': self._skip_lines(file_source, skip_map),
            'runTime': run_time
        }

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : with open ( arg_1 ) as src_file : arg_4 = src_file . read ( ) . split ( '\n' ) arg_5 = arg_0 . _calc_skips ( arg_2 , len ( arg_4 ) ) arg_6 = sum ( time for time in arg_2 . values ( ) ) return { 'name' : arg_1 , 'heatmap' : arg_2 , 'executionCount' : arg_3 , 'srcCode' : arg_0 . _skip_lines ( arg_4 , arg_5 ) , 'runTime' : arg_6 }

def Func(arg_0, arg_1, arg_2, arg_3):
        """Formats heatmap for UI."""
        with open(arg_1) as src_file:
            arg_4 = src_file.read().split('\n')
            arg_5 = arg_0._calc_skips(arg_2, len(arg_4))
        arg_6 = sum(time for time in arg_2.values())
        return {
            'name': arg_1,
            'heatmap': arg_2,
            'executionCount': arg_3,
            'srcCode': arg_0._skip_lines(arg_4, arg_5),
            'runTime': arg_6
        }


def Func ( arg_0 ) : arg_1 , arg_2 , arg_3 = arg_0 . wprogressbar . n , arg_0 . wprogressbar . nmin , arg_0 . wprogressbar . nmax if ( arg_3 - arg_2 ) == 0 : arg_4 = 0 else : arg_4 = max ( min ( ( arg_1 - arg_2 ) / ( arg_3 - arg_2 ) , 1. ) , 0. ) * 100 arg_5 = { "value" : round ( arg_1 , 4 ) , "n" : round ( arg_1 , 4 ) , "nmin" : round ( arg_2 , 4 ) , "nmax" : round ( arg_3 , 4 ) , "percent" : round ( arg_4 , 4 ) , "p" : round ( arg_4 , 4 ) } arg_6 = arg_0 . _label_progressbar . format ( ** arg_5 ) arg_0 . wprogresslabel . label = arg_6

def Func(arg_0):
        """
        Updates the progressbar by re-calculating the label.

        It is not required to manually call this method since setting any of the
        properties of this class will automatically trigger a re-calculation.
        """
        arg_1,arg_2,arg_3 = arg_0.wprogressbar.n,arg_0.wprogressbar.nmin,arg_0.wprogressbar.nmax
        if (arg_3-arg_2)==0:
            arg_4 = 0 # prevents ZeroDivisionError
        else:
            arg_4 = max(min((arg_1-arg_2)/(arg_3-arg_2),1.),0.)*100
        arg_5 = {"value":round(arg_1,4),"n":round(arg_1,4),"nmin":round(arg_2,4),"nmax":round(arg_3,4),"percent":round(arg_4,4),"p":round(arg_4,4)}
        arg_6 = arg_0._label_progressbar.format(**arg_5)
        arg_0.wprogresslabel.label = arg_6

Updates the progressbar by re - calculating the label . It is not required to manually call this method since setting any of the properties of this class will automatically trigger a re - calculation .


def Func ( arg_0 ) : arg_0 . _update_approx ( ) arg_1 = arg_0 . _ep . lml_derivatives ( arg_0 . _X ) arg_2 = exp ( - arg_0 . logitdelta ) arg_3 = exp ( arg_0 . logscale ) arg_4 = dict ( ) arg_4 [ "logitdelta" ] = arg_1 [ "delta" ] * ( arg_2 / ( 1 + arg_2 ) ) / ( 1 + arg_2 ) arg_4 [ "logscale" ] = arg_1 [ "scale" ] * arg_3 arg_4 [ "beta" ] = arg_1 [ "mean" ] return arg_4

def Func(arg_0):
        r"""Gradient of the log of the marginal likelihood.

        Returns
        -------
        dict
            Map between variables to their Func values.
        """
        arg_0._update_approx()

        arg_1 = arg_0._ep.lml_derivatives(arg_0._X)
        arg_2 = exp(-arg_0.logitdelta)
        arg_3 = exp(arg_0.logscale)

        arg_4 = dict()
        arg_4["logitdelta"] = arg_1["delta"] * (arg_2 / (1 + arg_2)) / (1 + arg_2)
        arg_4["logscale"] = arg_1["scale"] * arg_3
        arg_4["beta"] = arg_1["mean"]

        return arg_4

r"""Gradient of the log of the marginal likelihood.

        Returns
        -------
        dict
            Map between variables to their gradient values.

r Gradient of the log of the marginal likelihood .


def Func(arg_0, arg_1):
        """Return a canonical tautomer by enumerating and scoring all possible tautomers.

        :param mol: The input molecule.
        :type mol: rdkit.Chem.rdchem.Mol
        :return: The canonical tautomer.
        :rtype: rdkit.Chem.rdchem.Mol
        """
        # TODO: Overload the mol parameter to pass a list of pre-enumerated tautomers
        arg_2 = arg_0._enumerate_tautomers(arg_1)
        if len(arg_2) == 1:
            return arg_2[0]
        # Calculate score for each tautomer
        arg_3 = None
        for arg_4 in arg_2:
            arg_5 = Chem.MolToSmiles(arg_4, isomericSmiles=True)
            log.debug('Tautomer: %s', arg_5)
            arg_6 = 0
            # Add aromatic ring scores
            arg_7 = Chem.GetSymmSSSR(arg_4)
            for arg_8 in arg_7:
                arg_9 = {arg_4.GetBondBetweenAtoms(*pair).GetBondType() for pair in pairwise(arg_8)}
                arg_10 = {arg_4.GetAtomWithIdx(idx).GetAtomicNum() for idx in arg_8}
                if arg_9 == {BondType.AROMATIC}:
                    log.debug('Score +100 (aromatic ring)')
                    arg_6 += 100
                    if arg_10 == {6}:
                        log.debug('Score +150 (carbocyclic aromatic ring)')
                        arg_6 += 150
            # Add SMARTS scores
            for arg_11 in arg_0.scores:
                for arg_12 in arg_4.GetSubstructMatches(arg_11.smarts):
                    log.debug('Score %+d (%s)', arg_11.score, arg_11.name)
                    arg_6 += arg_11.score
            # Add (P,S,Se,Te)-H scores
            for arg_13 in arg_4.GetAtoms():
                if arg_13.GetAtomicNum() in {15, 16, 34, 52}:
                    arg_14 = arg_13.GetTotalNumHs()
                    if arg_14:
                        log.debug('Score %+d (%s-H bonds)', -arg_14, arg_13.GetSymbol())
                        arg_6 -= arg_14
            # Set as highest if score higher or if score equal and smiles comes first alphabetically
            if not arg_3 or arg_3['score'] < arg_6 or (arg_3['score'] == arg_6 and arg_5 < arg_3['smiles']):
                log.debug('New highest tautomer: %s (%s)', arg_5, arg_6)
                arg_3 = {'smiles': arg_5, 'tautomer': arg_4, 'score': arg_6}
        return arg_3['tautomer']

Return a canonical tautomer by enumerating and scoring all possible tautomers .


def Func ( arg_0 ) : arg_1 = arg_0 . child ( u'client.key' ) if arg_1 . exists ( ) : arg_2 = _load_pem_private_key_bytes ( arg_1 . getContent ( ) ) else : arg_2 = generate_private_key ( u'rsa' ) arg_1 . setContent ( _dump_pem_private_key_bytes ( arg_2 ) ) return succeed ( JWKRSA ( arg_2 = arg_2 ) )

def Func(arg_0):
    """
    Set up a client key if one does not exist already.

    https://gist.github.com/glyph/27867a478bb71d8b6046fbfb176e1a33#file-local-certs-py-L32-L50

    :type pem_path: twisted.python.filepath.FilePath
    :param pem_path:
        The path to the certificate directory to use.
    :rtype: twisted.internet.defer.Deferred
    """
    arg_1 = arg_0.child(u'client.key')
    if arg_1.exists():
        arg_2 = _load_pem_private_key_bytes(arg_1.getContent())
    else:
        arg_2 = generate_private_key(u'rsa')
        arg_1.setContent(_dump_pem_private_key_bytes(arg_2))
    return succeed(JWKRSA(arg_2=arg_2))

Set up a client key if one does not exist already .


(self, x, layer=None, sample=False, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = False , ** arg_4 ) : arg_5 = arg_0 . feed_forward ( arg_1 , ** arg_4 ) [ arg_0 . _find_output ( arg_2 ) ] if arg_3 : return np . random . binomial ( n = 1 , p = arg_5 ) . astype ( np . uint8 ) return arg_5

def Func(arg_0, arg_1, arg_2=None, arg_3=False, **arg_4):
        '''Encode a dataset using the hidden layer activations of our network.

        Parameters
        ----------
        x : ndarray
            A dataset to Func. Rows of this dataset capture individual data
            points, while columns represent the variables in each data point.

        layer : str, optional
            The name of the hidden layer output to use. By default, we use
            the "middle" hidden layer---for example, for a 4,2,4 or 4,3,2,3,4
            autoFuncr, we use the layer with size 2.

        sample : bool, optional
            If True, then draw a sample using the hidden activations as
            independent Bernoulli probabilities for the Funcd data. This
            assumes the hidden layer has a logistic sigmoid activation function.

        Returns
        -------
        ndarray :
            The given dataset, Funcd by the appropriate hidden layer
            activation.
        '''
        arg_5 = arg_0.feed_forward(arg_1, **arg_4)[arg_0._find_output(arg_2)]
        if arg_3:
            return np.random.binomial(n=1, p=arg_5).astype(np.uint8)
        return arg_5

Encode a dataset using the hidden layer activations of our network.

        Parameters
        ----------
        x : ndarray
            A dataset to encode. Rows of this dataset capture individual data
            points, while columns represent the variables in each data point.

        layer : str, optional
            The name of the hidden layer output to use. By default, we use
            the "middle" hidden layer---for example, for a 4,2,4 or 4,3,2,3,4
            autoencoder, we use the layer with size 2.

        sample : bool, optional
            If True, then draw a sample using the hidden activations as
            independent Bernoulli probabilities for the encoded data. This
            assumes the hidden layer has a logistic sigmoid activation function.

        Returns
        -------
        ndarray :
            The given dataset, encoded by the appropriate hidden layer
            activation.

Encode a dataset using the hidden layer activations of our network .


def
Func
(
arg_0
,
arg_1
)
:
if
not
arg_1
.
endswith
(
INST_TERM
)
:
raise
InvalidInstruction
(
'Instruction termination not found.'
)
arg_2
=
arg_0
.
decode_instruction
(
arg_1
)
return
arg_0
(
arg_2
[
0
]
,
*
arg_2
[
1
:
]
)

def Func(arg_0, arg_1):
        """
        Loads a new GuacamoleInstruction from encoded instruction string.

        :param instruction: Instruction string.

        :return: GuacamoleInstruction()
        """
        if not arg_1.endswith(INST_TERM):
            raise InvalidInstruction('Instruction termination not found.')

        arg_2 = arg_0.decode_instruction(arg_1)

        return arg_0(arg_2[0], *arg_2[1:])

Loads a new GuacamoleInstruction from encoded instruction string .


def Func(arg_0, arg_1):
    """
    Reinterpret signal of type Bits to signal of type HStruct
    """
    arg_2 = arg_1.fromPy(None)
    arg_3 = 0
    for arg_4 in arg_1.fields:
        arg_5 = arg_4.dtype
        arg_6 = arg_5.bit_length()
        if arg_4.name is not None:
            arg_7 = arg_0[(arg_6 + arg_3):arg_3]
            arg_7 = arg_7._reinterpret_cast(arg_5)
            setattr(arg_2, arg_4.name, arg_7)

        arg_3 += arg_6

    return arg_2


def Func(arg_0, **arg_1):
        """Get statistics."""
        arg_2 = request.get_json(force=False)
        if arg_2 is None:
            arg_2 = {}
        arg_3 = {}
        for arg_4, arg_5 in arg_2.items():
            if arg_5 is None or not isinstance(arg_5, dict) \
                    or (set(arg_5.keys()) != {'stat', 'params'} and
                        set(arg_5.keys()) != {'stat'}):
                raise InvalidRequestInputError(
                    'Invalid Input. It should be of the form '
                    '{ STATISTIC_NAME: { "stat": STAT_TYPE, '
                    '"params": STAT_PARAMS \}}'
                )
            arg_6 = arg_5['stat']
            arg_7 = arg_5.get('params', {})
            try:
                arg_8 = current_stats.queries[arg_6]
            except KeyError:
                raise UnknownQueryError(arg_6)

            arg_9 = current_stats.permission_factory(arg_6, arg_7)
            if arg_9 is not None and not arg_9.can():
                arg_10 = ('You do not have a permission to query the '
                           'statistic "{}" with those '
                           'parameters'.format(arg_6))
                if current_user.is_authenticated:
                    abort(403, arg_10)
                abort(401, arg_10)
            try:
                arg_11 = arg_8.query_class(**arg_8.query_config)
                arg_3[arg_4] = arg_11.run(**arg_7)
            except ValueError as e:
                raise InvalidRequestInputError(e.args[0])
            except NotFoundError as e:
                return None
        return arg_0.make_response(arg_3)


return SQLInsertCompiler.prepare_value(
            self,
            field,
            # Note: this deliberately doesn't use `pre_save_val` as we don't
            # want things like auto_now on DateTimeField (etc.) to change the
            # value. We rely on pre_save having already been done by the
            # underlying compiler so that things like FileField have already had
            # the opportunity to save out their data.
            getattr(self.query.objs[0], field.attname)
        )

def Func ( arg_0 , arg_1 ) -> str : arg_1 = arg_0 . _normalize_field_name ( arg_1 ) arg_2 = arg_0 . _get_model_field ( arg_1 ) return SQLInsertCompiler . prepare_value ( arg_0 , arg_2 , getattr ( arg_0 . query . objs [ 0 ] , arg_2 . attname ) )

def Func(arg_0, arg_1) -> str:
        """Formats a field's value for usage in SQL.

        Arguments:
            field_name:
                The name of the field to format
                the value of.

        Returns:
            The field's value formatted for usage
            in SQL.
        """

        arg_1 = arg_0._normalize_field_name(arg_1)
        arg_2 = arg_0._get_model_field(arg_1)

        return SQLInsertCompiler.prepare_value(
            arg_0,
            arg_2,
            # Note: this deliberately doesn't use `pre_save_val` as we don't
            # want things like auto_now on DateTimeField (etc.) to change the
            # value. We rely on pre_save having already been done by the
            # underlying compiler so that things like FileField have already had
            # the opportunity to save out their data.
            getattr(arg_0.query.objs[0], arg_2.attname)
        )

Formats a field s value for usage in SQL .


def Func(arg_0, arg_1, arg_2):
    """
    Calculate error signal

    :param bucketIdxList: list of encoder buckets

    :return: dict containing error. The key is the number of steps
             The value is a numpy array of error at the output layer
    """
    arg_3 = dict()
    arg_4 = numpy.zeros(arg_0._maxBucketIdx + 1)
    arg_5 = len(arg_2)
    for arg_6 in arg_2:
      arg_4[arg_6] = 1.0/arg_5

    for (arg_7, arg_8) in arg_0._patternNZHistory:
      arg_9 = arg_1 - arg_7
      if arg_9 in arg_0.steps:
        arg_10 = arg_0.inferSingleStep(arg_8,
                                           arg_0._weightMatrix[arg_9])
        arg_3[arg_9] = arg_4 - arg_10

    return arg_3


return four_blocks(zeros(m, m), A, A.T, zeros(n, n))

def Func ( arg_0 ) : arg_1 , arg_2 = arg_0 . shape return four_blocks ( zeros ( arg_1 , arg_1 ) , arg_0 , arg_0 . T , zeros ( arg_2 , arg_2 ) )

def Func(arg_0):
    """Returns the adjacency matrix of a bipartite graph whose biadjacency
    matrix is `A`.

    `A` must be a NumPy array.

    If `A` has **m** rows and **n** columns, then the returned matrix has **m +
    n** rows and columns.

    """
    arg_1, arg_2 = arg_0.shape
    return four_blocks(zeros(arg_1, arg_1), arg_0, arg_0.T, zeros(arg_2, arg_2))

Returns the adjacency matrix of a bipartite graph whose biadjacency matrix is A .


def Func ( arg_0 ) : if arg_0 == MASTER_BRANCH : return arg_1 = subprocess . check_output ( [ 'git' , 'branch' , '--list' ] ) for arg_2 in arg_1 . split ( '\n' ) : if arg_2 . strip ( ) == arg_0 : break else : try : sys . stdout . write ( subprocess . check_output ( [ 'git' , 'checkout' , '--track' , 'origin/%s' % arg_0 ] ) ) except subprocess . CalledProcessError : raise SystemExit ( 1 )

def Func(arg_0):
    """Track the specified remote branch if it is not already tracked."""
    if arg_0 == MASTER_BRANCH:
        # We don't need to explicitly track the master branch, so we're done.
        return

    # Ensure the specified branch is in the local branch list.
    arg_1 = subprocess.check_output(['git', 'branch', '--list'])
    for arg_2 in arg_1.split('\n'):
        if arg_2.strip() == arg_0:
            # We are already tracking the remote branch
            break
    else:
        # We are not tracking the remote branch, so track it.
        try:
            sys.stdout.write(subprocess.check_output(
                ['git', 'checkout', '--track', 'origin/%s' % arg_0]))
        except subprocess.CalledProcessError:
            # Bail gracefully.
            raise SystemExit(1)

Track the specified remote branch if it is not already tracked .


def Func ( * arg_0 ) : for arg_1 in range ( 0 , len ( arg_0 ) - 1 , 2 ) : if arg_0 [ arg_1 ] : return arg_0 [ arg_1 + 1 ] if len ( arg_0 ) % 2 : return arg_0 [ - 1 ] else : return None

def Func(*arg_0):
    """Implements the 'if' operator with support for multiple elseif-s."""
    for arg_1 in range(0, len(arg_0) - 1, 2):
        if arg_0[arg_1]:
            return arg_0[arg_1 + 1]
    if len(arg_0) % 2:
        return arg_0[-1]
    else:
        return None

Implements the if operator with support for multiple elseif - s .


def Func ( arg_0 : arg_1 , arg_2 : arg_3 ) : def updater ( arg_4 ) : arg_5 = arg_0 . clone ( ) if arg_2 : arg_5 . vldMask = 0 return ( valueHasChanged ( arg_4 , arg_5 ) , arg_5 ) return updater

def Func(arg_0: arg_1, arg_2: arg_3):
    """
    Create value updater for simulation

    :param nextVal: instance of Value which will be asssiggned to signal
    :param invalidate: flag which tells if value has been compromised
        and if it should be invaidated
    :return: function(value) -> tuple(valueHasChangedFlag, nextVal)
    """

    def updater(arg_4):
        arg_5 = arg_0.clone()
        if arg_2:
            arg_5.vldMask = 0
        return (valueHasChanged(arg_4, arg_5), arg_5)
    return updater


return [thing for thing in self.things
                if thing.location == location and isinstance(thing, tclass)]

def Func ( arg_0 , arg_1 , arg_2 = arg_3 ) : return [ arg_4 for arg_4 in arg_0 . things if arg_4 . location == arg_1 and isinstance ( arg_4 , arg_2 ) ]

def Func(arg_0, arg_1, arg_2=arg_3):
        "Return all things exactly at a given location."
        return [arg_4 for arg_4 in arg_0.things
                if arg_4.location == arg_1 and isinstance(arg_4, arg_2)]

Return all things exactly at a given location .


def Func ( arg_0 , arg_1 ) : arg_2 = utils . safe_infer ( arg_1 . cause ) if arg_2 in ( astroid . Uninferable , None ) : return if isinstance ( arg_2 , astroid . Const ) : if arg_2 . value is not None : arg_0 . add_message ( "bad-exception-context" , arg_1 = arg_1 ) elif not isinstance ( arg_2 , astroid . ClassDef ) and not utils . inherit_from_std_ex ( arg_2 ) : arg_0 . add_message ( "bad-exception-context" , arg_1 = arg_1 )

def Func(arg_0, arg_1):
        """Verify that the exception context is properly set.

        An exception context can be only `None` or an exception.
        """
        arg_2 = utils.safe_infer(arg_1.cause)
        if arg_2 in (astroid.Uninferable, None):
            return

        if isinstance(arg_2, astroid.Const):
            if arg_2.value is not None:
                arg_0.add_message("bad-exception-context", arg_1=arg_1)
        elif not isinstance(arg_2, astroid.ClassDef) and not utils.inherit_from_std_ex(
            arg_2
        ):
            arg_0.add_message("bad-exception-context", arg_1=arg_1)

Verify that the exception context is properly set .


def Func(arg_0, arg_1):
        """
        Returns Organization, ISP, or ASNum name for given hostname.

        :arg hostname: Hostname (e.g. example.com)
        """
        arg_2 = arg_0._gethostbyname(arg_1)
        return arg_0.org_by_addr(arg_2)

Returns Organization ISP or ASNum name for given hostname .


def Func ( arg_0 , arg_1 ) : if arg_0 . state == State . PAUSED : arg_0 . state = State . WAITING

def Func(arg_0, arg_1):
        """\
        sets state to waiting - so we resume spawning children
        """
        if arg_0.state == State.PAUSED:
            arg_0.state = State.WAITING


def Func ( arg_0 , arg_1 ) : arg_2 = dict ( ) arg_2 [ 'email' ] = arg_1 arg_3 = arg_0 . request ( 'midas.user.get' , arg_2 ) return arg_3

def Func(arg_0, arg_1):
        """
        Get a user by the email of that user.

        :param email: The email of the desired user.
        :type email: string
        :returns: The user requested.
        :rtype: dict
        """
        arg_2 = dict()
        arg_2['email'] = arg_1
        arg_3 = arg_0.request('midas.user.get', arg_2)
        return arg_3


def Func(arg_0):
        """Formats device filesystem"""
        log.info('Formating, can take minutes depending on flash size...')
        arg_1 = arg_0.__exchange('file.format()', timeout=300)
        if 'format done' not in arg_1:
            log.error(arg_1)
        else:
            log.info(arg_1)
        return arg_1


def
Func
(
arg_0
,
**
arg_1
)
:
arg_2
=
[
'smpd'
,
'-s'
]
logger
.
info
(
"Starting smpd: "
+
" "
.
join
(
arg_2
)
)
arg_3
=
subprocess
.
call
(
arg_2
)
return
arg_3

def Func(arg_0, **arg_1):
        """Launch local smpd."""
        arg_2 = ['smpd', '-s']
        logger.info("Starting smpd: "+" ".join(arg_2))
        arg_3 = subprocess.call(arg_2)
        return arg_3


def Func ( arg_0 , arg_1 ) : arg_0 . put_client_msg ( packet . encode ( arg_1 , arg_0 . json_dumps ) )

def Func(arg_0, arg_1):
        """Low-level interface to queue a packet on the wire (encoded as wire
        protocol"""
        arg_0.put_client_msg(packet.encode(arg_1, arg_0.json_dumps))

Low - level interface to queue a packet on the wire ( encoded as wire protocol


def Func ( arg_0 ) : arg_1 = { } arg_2 = bs4 . BeautifulSoup ( arg_0 , "html.parser" ) arg_3 = AskbotParser . _find_question_container ( arg_2 ) arg_4 = arg_3 . select ( "div.post-update-info" ) arg_5 = arg_4 [ 0 ] arg_1 [ 'author' ] = AskbotParser . parse_user_info ( arg_5 ) try : arg_4 [ 1 ] except IndexError : pass else : arg_6 = arg_4 [ 1 ] if AskbotParser . parse_user_info ( arg_6 ) : arg_1 [ 'updated_by' ] = AskbotParser . parse_user_info ( arg_6 ) return arg_1

def Func(arg_0):
        """Parse the question info container of a given HTML question.

        The method parses the information available in the question information
        container. The container can have up to 2 elements: the first one
        contains the information related with the user who generated the question
        and the date (if any). The second one contains the date of the updated,
        and the user who updated it (if not the same who generated the question).

        :param html_question: raw HTML question element

        :returns: an object with the parsed information
        """
        arg_1 = {}
        arg_2 = bs4.BeautifulSoup(arg_0, "html.parser")
        arg_3 = AskbotParser._find_question_container(arg_2)
        arg_4 = arg_3.select("div.post-update-info")
        arg_5 = arg_4[0]
        arg_1['author'] = AskbotParser.parse_user_info(arg_5)
        try:
            arg_4[1]
        except IndexError:
            pass
        else:
            arg_6 = arg_4[1]
            if AskbotParser.parse_user_info(arg_6):
                arg_1['updated_by'] = AskbotParser.parse_user_info(arg_6)

        return arg_1

Parse the question info container of a given HTML question .


def Func(arg_0, arg_1, arg_2, arg_3=1):
        """Add a link from A and B of given distance, and also add the inverse
        link if the graph is undirected."""
        arg_0.Func1(arg_1, arg_2, arg_3)
        if not arg_0.directed: arg_0.Func1(arg_2, arg_1, arg_3)

Add a link from A and B of given distance and also add the inverse link if the graph is undirected .


def Func ( arg_0 = arg_1 , arg_2 = arg_3 , arg_4 = False ) : if arg_7 in arg_6 ( ) : if not isinstance ( arg_6 ( ) [ arg_7 ] , pdblp . BCon ) : del arg_6 ( ) [ arg_7 ] if ( arg_7 in arg_6 ( ) ) and ( not arg_4 ) : arg_5 = arg_6 ( ) [ arg_7 ] if getattr ( arg_5 , '_session' ) . start ( ) : arg_5 . start ( ) return arg_5 , False else : arg_5 = pdblp . BCon ( arg_0 = arg_0 , arg_2 = arg_2 ) arg_6 ( ) [ arg_7 ] = arg_5 arg_5 . start ( ) return arg_5 , True

def Func(arg_0=arg_1, arg_2=arg_3, arg_4=False):
    """
    Create Bloomberg connection

    Returns:
        (Bloomberg connection, if connection is new)
    """
    if arg_7 in arg_6():
        if not isinstance(arg_6()[arg_7], pdblp.BCon):
            del arg_6()[arg_7]

    if (arg_7 in arg_6()) and (not arg_4):
        arg_5 = arg_6()[arg_7]
        if getattr(arg_5, '_session').start(): arg_5.start()
        return arg_5, False

    else:
        arg_5 = pdblp.BCon(arg_0=arg_0, arg_2=arg_2)
        arg_6()[arg_7] = arg_5
        arg_5.start()
        return arg_5, True


def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = '' ) : arg_5 = pd . DataFrame . from_dict ( { 'Z' : arg_1 , 'N' : arg_2 , 'M' : arg_3 } ) . set_index ( [ 'Z' , 'N' ] ) [ 'M' ] arg_5 . name = arg_4 return arg_0 ( arg_5 = arg_5 , arg_4 = arg_4 )


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

def Func(arg_0, arg_1):
        """
        Sets byte if greater or equal.

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


def Func ( arg_0 ) : for arg_1 in arg_0 . tree . find_clades ( ) : if arg_1 . up is not None : arg_1 . branch_length_interpolator . merger_cost = arg_0 . cost

def Func(arg_0):
        '''
        attaches the the merger cost to each branch length interpolator in the tree.
        '''
        for arg_1 in arg_0.tree.find_clades():
            if arg_1.up is not None:
                arg_1.branch_length_interpolator.merger_cost = arg_0.cost

attaches the the merger cost to each branch length interpolator in the tree .


def
Func
(
arg_0
)
:
arg_1
=
currentThread
(
)
arg_0
.
__condition
.
acquire
(
)
try
:
if
arg_0
.
__writer
is
arg_1
:
arg_0
.
__writercount
-=
1
if
not
arg_0
.
__writercount
:
arg_0
.
__writer
=
arg_0
.
__condition
.
notifyAll
(
)
elif
arg_1
in
arg_0
.
__readers
:
arg_0
.
__readers
[
arg_1
]
-=
1
if
not
arg_0
.
__readers
[
arg_1
]
:
del
arg_0
.
__readers
[
arg_1
]
if
not
arg_0
.
__readers
:
arg_0
.
__condition
.
notifyAll
(
)
else
:
raise
ValueError
(
"Trying to Func unheld lock"
)
finally
:
arg_0
.
__condition
.
Func
(
)

def Func(arg_0):
        """Release the currently held lock.

        In case the current thread holds no lock, a ValueError is thrown."""

        arg_1 = currentThread()
        arg_0.__condition.acquire()
        try:
            if arg_0.__writer is arg_1:
                # We are the writer, take one nesting depth away.
                arg_0.__writercount -= 1
                if not arg_0.__writercount:
                    # No more write locks; take our writer position away and
                    # notify waiters of the new circumstances.
                    arg_0.__writer = None
                    arg_0.__condition.notifyAll()
            elif arg_1 in arg_0.__readers:
                # We are a reader currently, take one nesting depth away.
                arg_0.__readers[arg_1] -= 1
                if not arg_0.__readers[arg_1]:
                    # No more read locks, take our reader position away.
                    del arg_0.__readers[arg_1]
                    if not arg_0.__readers:
                        # No more readers, notify waiters of the new
                        # circumstances.
                        arg_0.__condition.notifyAll()
            else:
                raise ValueError("Trying to Func unheld lock")
        finally:
            arg_0.__condition.Func()


def
Func
(
)
:
arg_0
=
OrderedDict
(
(
(
'create'
,
ConfOpt
(
,
True
,
,
{
'action'
:
'store_true'
}
,
False
,
'create most global config file'
)
)
,
(
'create_local'
,
ConfOpt
(
,
True
,
,
{
'action'
:
'store_true'
}
,
False
,
'create most local config file'
)
)
,
(
'update'
,
ConfOpt
(
,
True
,
,
{
'action'
:
'store_true'
}
,
False
,
'add missing entries to config file'
)
)
,
(
'edit'
,
ConfOpt
(
,
True
,
,
{
'action'
:
'store_true'
}
,
False
,
'open config file in a text editor'
)
)
,
(
'editor'
,
ConfOpt
(
'vim'
,
False
,
,
{
}
,
True
,
'text editor'
)
)
,
)
)
return
arg_0

def Func():
    """Define a configuration section handling config file.

    Returns:
        dict of ConfOpt: it defines the 'create', 'update', 'edit' and 'editor'
        configuration options.
    """
    arg_0 = OrderedDict((
        ('create',
            ConfOpt(None, True, None, {'action': 'store_true'},
                    False, 'create most global config file')),
        ('create_local',
            ConfOpt(None, True, None, {'action': 'store_true'},
                    False, 'create most local config file')),
        ('update',
            ConfOpt(None, True, None, {'action': 'store_true'},
                    False, 'add missing entries to config file')),
        ('edit',
            ConfOpt(None, True, None, {'action': 'store_true'},
                    False, 'open config file in a text editor')),
        ('editor',
            ConfOpt('vim', False, None, {}, True, 'text editor')),
    ))
    return arg_0

Define a configuration section handling config file .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
try
:
for
arg_3
,
arg_3
,
arg_4
in
arg_0
.
graph
.
triples
(
(
arg_1
,
arg_2
,
)
)
:
if
(
arg_4
,
RDF
.
type
,
arg_0
.
spdx_namespace
[
'ConjunctiveLicenseSet'
]
)
in
arg_0
.
graph
:
arg_5
=
arg_0
.
handle_conjunctive_list
(
arg_4
)
arg_0
.
builder
.
set_concluded_license
(
arg_0
.
doc
,
arg_5
)
elif
(
arg_4
,
RDF
.
type
,
arg_0
.
spdx_namespace
[
'DisjunctiveLicenseSet'
]
)
in
arg_0
.
graph
:
arg_5
=
arg_0
.
handle_disjunctive_list
(
arg_4
)
arg_0
.
builder
.
set_concluded_license
(
arg_0
.
doc
,
arg_5
)
else
:
try
:
arg_5
=
arg_0
.
handle_lics
(
arg_4
)
arg_0
.
builder
.
set_concluded_license
(
arg_0
.
doc
,
arg_5
)
except
SPDXValueError
:
arg_0
.
value_error
(
'FILE_SINGLE_LICS'
,
arg_4
)
except
CardinalityError
:
arg_0
.
more_than_one_error
(
'file {0}'
.
format
(
arg_2
)
)

def Func(arg_0, arg_1, arg_2):
        """Sets file licenses concluded."""
        try:
            for arg_3, arg_3, arg_4 in arg_0.graph.triples((arg_1, arg_2, None)):
                if (arg_4, RDF.type, arg_0.spdx_namespace['ConjunctiveLicenseSet']) in arg_0.graph:
                    arg_5 = arg_0.handle_conjunctive_list(arg_4)
                    arg_0.builder.set_concluded_license(arg_0.doc, arg_5)

                elif (arg_4, RDF.type, arg_0.spdx_namespace['DisjunctiveLicenseSet']) in arg_0.graph:
                    arg_5 = arg_0.handle_disjunctive_list(arg_4)
                    arg_0.builder.set_concluded_license(arg_0.doc, arg_5)

                else:
                    try:
                        arg_5 = arg_0.handle_lics(arg_4)
                        arg_0.builder.set_concluded_license(arg_0.doc, arg_5)
                    except SPDXValueError:
                        arg_0.value_error('FILE_SINGLE_LICS', arg_4)
        except CardinalityError:
            arg_0.more_than_one_error('file {0}'.format(arg_2))


(x, rank, data=None, summarize=None, message=None,
                        name=None)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None ) : with tf . compat . v2 . name_scope ( arg_5 or 'Func' ) : return tf . compat . v1 . assert_less_equal ( tf . rank ( arg_0 ) , arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 )

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None,
                        arg_5=None):
  """Assert `x` has rank equal to `rank` or smaller.

  Example of adding a dependency to an operation:

  ```python
  with tf.control_dependencies([tf.Func(x, 2)]):
    output = tf.reduce_sum(x)
  ```

  Args:
    x:  Numeric `Tensor`.
    rank:  Scalar `Tensor`.
    data:  The tensors to print out if the condition is False.  Defaults to
      error message and first few entries of `x`.
    summarize: Print this many entries of each tensor.
    message: A string to prefix to the default message.
    name: A name for this operation (optional).
      Defaults to "Func".

  Returns:
    Op raising `InvalidArgumentError` unless `x` has specified rank or lower.
    If static checks determine `x` has correct rank, a `no_op` is returned.

  Raises:
    ValueError:  If static checks determine `x` has wrong rank.
  """
  with tf.compat.v2.name_scope(arg_5 or 'Func'):
    return tf.compat.v1.assert_less_equal(
        tf.rank(arg_0), arg_1, arg_2=arg_2, arg_3=arg_3, arg_4=arg_4)

Assert `x` has rank equal to `rank` or smaller.

  Example of adding a dependency to an operation:

  ```python
  with tf.control_dependencies([tf.assert_rank_at_most(x, 2)]):
    output = tf.reduce_sum(x)
  ```

  Args:
    x:  Numeric `Tensor`.
    rank:  Scalar `Tensor`.
    data:  The tensors to print out if the condition is False.  Defaults to
      error message and first few entries of `x`.
    summarize: Print this many entries of each tensor.
    message: A string to prefix to the default message.
    name: A name for this operation (optional).
      Defaults to "assert_rank_at_most".

  Returns:
    Op raising `InvalidArgumentError` unless `x` has specified rank or lower.
    If static checks determine `x` has correct rank, a `no_op` is returned.

  Raises:
    ValueError:  If static checks determine `x` has wrong rank.

Assert x has rank equal to rank or smaller .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
[
:
,
'X'
]
if
isinstance
(
arg_1
,
DictRDD
)
else
arg_1
"""Create vocabulary        """
class
SetAccum
(
AccumulatorParam
)
:
def
zero
(
arg_0
,
arg_3
)
:
return
set
(
arg_3
)
def
addInPlace
(
arg_0
,
arg_4
,
arg_5
)
:
arg_4
|=
arg_5
return
arg_4
arg_6
=
arg_2
.
context
.
accumulator
(
set
(
)
,
SetAccum
(
)
)
def
mapper
(
arg_2
,
arg_7
=
arg_0
.
separator
)
:
arg_8
=
[
]
for
arg_9
in
arg_2
:
for
arg_10
,
arg_11
in
six
.
iteritems
(
arg_9
)
:
if
isinstance
(
arg_11
,
six
.
string_types
)
:
arg_10
=
"%s%s%s"
%
(
arg_10
,
arg_0
.
separator
,
arg_11
)
arg_8
.
append
(
arg_10
)
arg_6
.
add
(
set
(
arg_8
)
)
arg_2
.
foreach
(
mapper
)
arg_8
=
list
(
arg_6
.
value
)
if
arg_0
.
sort
:
arg_8
.
sort
(
)
arg_12
=
dict
(
(
arg_10
,
i
)
for
i
,
arg_10
in
enumerate
(
arg_8
)
)
arg_0
.
feature_names_
=
arg_8
arg_0
.
vocabulary_
=
arg_12
return
arg_0

def Func(arg_0, arg_1):
        """Learn a list of feature name -> indices mappings.

        Parameters
        ----------
        Z : DictRDD with column 'X'
            Dict(s) or Mapping(s) from feature names (arbitrary Python
            objects) to feature values (strings or convertible to dtype).

        Returns
        -------
        self
        """
        arg_2 = arg_1[:, 'X'] if isinstance(arg_1, DictRDD) else arg_1

        """Create vocabulary
        """
        class SetAccum(AccumulatorParam):

            def zero(arg_0, arg_3):
                return set(arg_3)

            def addInPlace(arg_0, arg_4, arg_5):
                arg_4 |= arg_5
                return arg_4

        arg_6 = arg_2.context.accumulator(set(), SetAccum())

        def mapper(arg_2, arg_7=arg_0.separator):
            arg_8 = []
            for arg_9 in arg_2:
                for arg_10, arg_11 in six.iteritems(arg_9):
                    if isinstance(arg_11, six.string_types):
                        arg_10 = "%s%s%s" % (arg_10, arg_0.separator, arg_11)
                    arg_8.append(arg_10)
            arg_6.add(set(arg_8))

        arg_2.foreach(mapper)  # init vocabulary
        arg_8 = list(arg_6.value)

        if arg_0.sort:
            arg_8.sort()

        arg_12 = dict((arg_10, i) for i, arg_10 in enumerate(arg_8))

        arg_0.feature_names_ = arg_8
        arg_0.vocabulary_ = arg_12

        return arg_0

Learn a list of feature name - > indices mappings .


def Func(arg_0, arg_1, arg_2='1day'):
        '''
        Returns a URL that needs to be opened in a browser to retrieve an
        access token.
        '''
        arg_3 = {
            'name': arg_1,
            'expiration': arg_2,
            'response_type': 'token',
            'scope': 'read,write'
        }

        arg_4 = arg_0.build_uri(
            path='/authorize',
            arg_3=arg_0.add_authorisation(arg_3)
        )

        print('Please go to the following URL and get the user authorisation '
              'token:\n', arg_4)
        return arg_4

Returns a URL that needs to be opened in a browser to retrieve an access token .


def
Func
(
arg_0
,
arg_1
)
:
logging
.
debug
(
"ConnectorDB: Websocket opened"
)
arg_0
.
reconnect_time
/=
arg_0
.
reconnect_time_backoff_multiplier
arg_0
.
status
=
"connected"
arg_0
.
lastpingtime
=
time
.
time
(
)
arg_0
.
__ensure_ping
(
)
arg_0
.
connected_time
=
time
.
time
(
)
arg_0
.
ws_openlock
.
release
(
)

def Func(arg_0, arg_1):
        """Called when the websocket is opened"""
        logging.debug("ConnectorDB: Websocket opened")

        # Connection success - decrease the wait time for next connection
        arg_0.reconnect_time /= arg_0.reconnect_time_backoff_multiplier

        arg_0.status = "connected"

        arg_0.lastpingtime = time.time()
        arg_0.__ensure_ping()

        arg_0.connected_time = time.time()

        # Release the lock that connect called
        arg_0.ws_openlock.release()


return ack.Acknowledgement(self.code, self.args[0] if len(self.args) > 0 else '')

def Func ( arg_0 ) : from . messages import ack return ack . Acknowledgement ( arg_0 . code , arg_0 . args [ 0 ] if len ( arg_0 . args ) > 0 else '' )

def Func(arg_0):
        """
        Creates an error Acknowledgement message.
        The message's code and message are taken from this exception.

        :return: the message representing this exception
        """
        from .messages import ack
        return ack.Acknowledgement(arg_0.code, arg_0.args[0] if len(arg_0.args) > 0 else '')

Creates an error Acknowledgement message . The message s code and message are taken from this exception .


def Func(arg_0, arg_1=arg_2, arg_3=arg_4):
        """Fetch the bugs from the repository.

        The method retrieves, from a Bugzilla repository, the bugs
        updated since the given date.

        :param category: the category of items to Func
        :param from_date: obtain bugs updated since this date

        :returns: a generator of bugs
        """
        if not arg_3:
            arg_3 = arg_4

        arg_5 = {'from_date': arg_3}
        arg_6 = super().Func(arg_1, **arg_5)

        return arg_6

Fetch the bugs from the repository.

        The method retrieves, from a Bugzilla repository, the bugs
        updated since the given date.

        :param category: the category of items to fetch
        :param from_date: obtain bugs updated since this date

        :returns: a generator of bugs


def Func ( arg_0 , arg_1 ) : if arg_0 . __maxsize and len ( arg_0 . __data ) >= arg_0 . __maxsize : return False arg_0 . __data . append ( arg_1 ) return True

def Func(arg_0, arg_1):
        """Put an item into the queue.
        True - if item placed in queue.
        False - if queue is full and item can not be placed."""
        if arg_0.__maxsize and len(arg_0.__data) >= arg_0.__maxsize:
            return False
        arg_0.__data.append(arg_1)
        return True

Put an item into the queue . True - if item placed in queue . False - if queue is full and item can not be placed .


return '%s/%s' % (settings.MEDIA_URL.rstrip('/'), path)

def Func ( arg_0 ) : if VERSION >= ( 1 , 10 ) : return arg_0 try : from django . templatetags . static import static return static ( arg_0 ) except ImportError : pass try : return '%s/%s' % ( settings . STATIC_URL . rstrip ( '/' ) , arg_0 ) except AttributeError : pass try : return '%s/%s' % ( settings . PAGEDOWN_URL . rstrip ( '/' ) , arg_0 ) except AttributeError : pass return '%s/%s' % ( settings . MEDIA_URL . rstrip ( '/' ) , arg_0 )

def Func(arg_0):
    """
    Try to return a path to static the static files compatible all
    the way back to Django 1.2. If anyone has a cleaner or better
    way to do this let me know!
    """

    if VERSION >= (1, 10):
        # Since Django 1.10, forms.Media automatically invoke static
        # lazily on the path if it is relative.
        return arg_0
    try:
        # >= 1.4
        from django.templatetags.static import static
        return static(arg_0)
    except ImportError:
        pass
    try:
        # >= 1.3
        return '%s/%s' % (settings.STATIC_URL.rstrip('/'), arg_0)
    except AttributeError:
        pass
    try:
        return '%s/%s' % (settings.PAGEDOWN_URL.rstrip('/'), arg_0)
    except AttributeError:
        pass
    return '%s/%s' % (settings.MEDIA_URL.rstrip('/'), arg_0)

Try to return a path to static the static files compatible all the way back to Django 1 . 2 . If anyone has a cleaner or better way to do this let me know!


def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = institute_and_Func ( store , arg_0 , arg_1 ) if arg_3 is None : return abort ( 404 ) return Response ( json_util . dumps ( arg_3 ) , mimetype = 'application/json' )

def Func(arg_0, arg_1):
    """Return a variant."""
    arg_2, arg_3 = institute_and_Func(store, arg_0, arg_1)
    if arg_3 is None:
        return abort(404)
    return Response(json_util.dumps(arg_3), mimetype='application/json')


def Func ( arg_0 ) : def wrapper ( arg_1 , * arg_2 , ** arg_3 ) : arg_1 . log . log ( group = arg_0 . __name__ , message = 'Enter' ) arg_0 ( arg_1 , * arg_2 , ** arg_3 ) arg_1 . log . log ( group = arg_0 . __name__ , message = 'Exit' ) return wrapper

def Func(arg_0):
    '''
    Decorator that logs function calls in their self.log
    '''
    def wrapper(arg_1,*arg_2,**arg_3):
        arg_1.log.log(group=arg_0.__name__,message='Enter')
        arg_0(arg_1,*arg_2,**arg_3)
        arg_1.log.log(group=arg_0.__name__,message='Exit')
    return wrapper

Decorator that logs function calls in their self . log


def Func ( arg_0 , arg_1 ) : if arg_0 . user . is_authenticated ( ) : arg_2 = arg_0 . user arg_3 = ContentType . objects . get_for_model ( type ( arg_1 ) ) try : ObjectView . objects . get ( arg_2 = arg_2 , object_id = arg_1 . id , arg_3 = arg_3 ) except : ObjectView . objects . create ( arg_2 = arg_2 , content_object = arg_1 ) arg_4 = ObjectView . objects . filter ( arg_2 = arg_2 ) else : update_dict_for_guests ( arg_0 , arg_1 , arg_3 ) return if arg_4 : for arg_5 in arg_4 : if arg_3 == arg_5 . content_type : if not exists_in_dictionary ( arg_0 , arg_1 , arg_3 , arg_5 , True ) : if arg_1 . id != arg_5 . object_id : ObjectViewDictionary . objects . create ( current_object = arg_1 , visited_before_object = arg_5 . content_object ) if not exists_in_dictionary ( arg_0 , arg_5 , arg_5 . content_type , arg_1 , False ) : ObjectViewDictionary . objects . create ( current_object = arg_5 . content_object , visited_before_object = arg_1 ) return

def Func(arg_0, arg_1):
    """
    Updates the suggestions' dictionary for an object upon visiting its page
    """
    if arg_0.user.is_authenticated():
        arg_2 = arg_0.user
        arg_3 = ContentType.objects.get_for_model(type(arg_1))
        try:
            # Check if the user has visited this page before
            ObjectView.objects.get(
                arg_2=arg_2, object_id=arg_1.id, arg_3=arg_3)
        except:
            ObjectView.objects.create(arg_2=arg_2, content_object=arg_1)
        # Get a list of all the objects a user has visited
        arg_4 = ObjectView.objects.filter(arg_2=arg_2)

    else:
        update_dict_for_guests(arg_0, arg_1, arg_3)
        return

    if arg_4:
        for arg_5 in arg_4:
            if arg_3 == arg_5.content_type:
                if not exists_in_dictionary(arg_0, arg_1,
                                            arg_3,
                                            arg_5, True):
                    # Create an entry if it's non existent
                    if arg_1.id != arg_5.object_id:
                        ObjectViewDictionary.objects.create(
                            current_object=arg_1,
                            visited_before_object=arg_5.content_object)
                        if not exists_in_dictionary(arg_0, arg_5,
                                                    arg_5.content_type,
                                                    arg_1, False):
                            ObjectViewDictionary.objects.create(
                                current_object=arg_5.content_object,
                                visited_before_object=arg_1)
    return

Updates the suggestions dictionary for an object upon visiting its page


def Func(arg_0, arg_1):
        """Parse oauth2 access
        """
        arg_2 = json.loads(arg_1.content.decode('utf-8'))
        arg_0.access_token = arg_2['access_token']
        arg_0.token_type = arg_2['token_type']
        arg_0.refresh_token = arg_2['refresh_token']
        arg_0.guid = arg_2['xoauth_yahoo_guid']

        arg_7 = {
            'access_token': arg_0.access_token,
            'token_type': arg_0.token_type,
            'refresh_token': arg_0.refresh_token,
            'guid': arg_0.guid
        }

        return arg_7


def Func ( arg_0 ) : arg_0 . create_effect_classes ( ) arg_0 . _add_resource_descriptions_to_pools ( arg_0 . create_external_resources ( ) ) arg_0 . _add_resource_descriptions_to_pools ( arg_0 . create_resources ( ) ) for arg_1 , arg_2 in resources . textures . Func_pool ( ) : arg_0 . _textures [ arg_1 . label ] = arg_2 for arg_1 , arg_2 in resources . programs . Func_pool ( ) : arg_0 . _programs [ arg_1 . label ] = arg_2 for arg_1 , arg_2 in resources . scenes . Func_pool ( ) : arg_0 . _scenes [ arg_1 . label ] = arg_2 for arg_1 , arg_2 in resources . data . Func_pool ( ) : arg_0 . _data [ arg_1 . label ] = arg_2 arg_0 . create_effect_instances ( ) arg_0 . post_Func ( )

def Func(arg_0):
        """
        Loads this project instance
        """
        arg_0.create_effect_classes()

        arg_0._add_resource_descriptions_to_pools(arg_0.create_external_resources())
        arg_0._add_resource_descriptions_to_pools(arg_0.create_resources())

        for arg_1, arg_2 in resources.textures.Func_pool():
            arg_0._textures[arg_1.label] = arg_2

        for arg_1, arg_2 in resources.programs.Func_pool():
            arg_0._programs[arg_1.label] = arg_2

        for arg_1, arg_2 in resources.scenes.Func_pool():
            arg_0._scenes[arg_1.label] = arg_2

        for arg_1, arg_2 in resources.data.Func_pool():
            arg_0._data[arg_1.label] = arg_2

        arg_0.create_effect_instances()
        arg_0.post_Func()


def Func(arg_0, arg_1=64 * 1024 * 1024):
    """
    By default, Flask will accept uploads to an arbitrary size. While Werkzeug
    switches uploads from memory to a temporary file when they hit 500 KiB,
    it's still possible for someone to overload your disk space with a
    gigantic file.

    This patches the app's request class's
    `~werkzeug.BaseRequest.max_content_length` attribute so that any upload
    larger than the given size is rejected with an HTTP error.

    .. note::

       In Flask 0.6, you can do this by setting the `MAX_CONTENT_LENGTH`
       setting, without patching the request class. To emulate this behavior,
       you can pass `None` as the size (you must pass it explicitly). That is
       the best way to call this function, as it won't break the Flask 0.6
       functionality if it exists.

    .. versionchanged:: 0.1.1

    :param app: The app to patch the request class of.
    :param size: The maximum size to accept, in bytes. The default is 64 MiB.
                 If it is `None`, the app's `MAX_CONTENT_LENGTH` configuration
                 setting will be used to patch.
    """
    if arg_1 is None:
        if isinstance(arg_0.request_class.__dict__['max_content_length'],
                      property):
            return
        arg_1 = arg_0.config.get('MAX_CONTENT_LENGTH')
    arg_2 = arg_0.request_class
    arg_3 = type(arg_2.__name__, (arg_2,),
                   {'max_content_length': arg_1})
    arg_0.request_class = arg_3

By default Flask will accept uploads to an arbitrary size . While Werkzeug switches uploads from memory to a temporary file when they hit 500 KiB it s still possible for someone to overload your disk space with a gigantic file .


(returns, positions,
                               show_and_plot_top_pos=2, hide_positions=False,
                               return_fig=False, sector_mappings=None,
                               transactions=None, estimate_intraday='infer')

def Func ( arg_0 , arg_1 , arg_2 = 2 , arg_3 = False , arg_4 = False , arg_5 = None , arg_6 = None , arg_7 = 'infer' ) : arg_1 = utils . check_intraday ( arg_7 , arg_0 , arg_1 , arg_6 ) if arg_3 : arg_2 = 0 arg_8 = 7 if arg_5 is not None else 6 arg_9 = plt . figure ( figsize = ( 14 , arg_8 * 6 ) ) arg_10 = gridspec . GridSpec ( arg_8 , 3 , wspace = 0.5 , hspace = 0.5 ) arg_11 = plt . subplot ( arg_10 [ 0 , : ] ) arg_12 = plt . subplot ( arg_10 [ 1 , : ] , sharex = arg_11 ) arg_13 = plt . subplot ( arg_10 [ 2 , : ] , sharex = arg_11 ) arg_14 = plt . subplot ( arg_10 [ 3 , : ] , sharex = arg_11 ) arg_15 = plt . subplot ( arg_10 [ 4 , : ] ) arg_16 = plt . subplot ( arg_10 [ 5 , : ] , sharex = arg_11 ) arg_17 = pos . get_percent_alloc ( arg_1 ) plotting . plot_exposures ( arg_0 , arg_1 , arg_21 = arg_11 ) plotting . show_and_plot_top_positions ( arg_0 , arg_17 , show_and_plot = arg_2 , arg_3 = arg_3 , arg_21 = arg_12 ) plotting . plot_max_median_position_concentration ( arg_1 , arg_21 = arg_13 ) plotting . plot_holdings ( arg_0 , arg_17 , arg_21 = arg_14 ) plotting . plot_long_short_holdings ( arg_0 , arg_17 , arg_21 = arg_15 ) plotting . plot_gross_leverage ( arg_0 , arg_1 , arg_21 = arg_16 ) if arg_5 is not None : arg_18 = pos . get_sector_exposures ( arg_1 , arg_5 ) if len ( arg_18 . columns ) > 1 : arg_19 = pos . get_percent_alloc ( arg_18 ) arg_19 = arg_19 . drop ( 'cash' , axis = 'columns' ) arg_20 = plt . subplot ( arg_10 [ 6 , : ] , sharex = arg_11 ) plotting . plot_sector_allocations ( arg_0 , arg_19 , arg_21 = arg_20 ) for arg_21 in arg_9 . axes : plt . setp ( arg_21 . get_xticklabels ( ) , visible = True ) if arg_4 : return arg_9

def Func(arg_0, arg_1,
                               arg_2=2, arg_3=False,
                               arg_4=False, arg_5=None,
                               arg_6=None, arg_7='infer'):
    """
    Generate a number of plots for analyzing a
    strategy's positions and holdings.

    - Plots: gross leverage, exposures, top positions, and holdings.
    - Will also print the top positions held.

    Parameters
    ----------
    returns : pd.Series
        Daily returns of the strategy, noncumulative.
         - See full explanation in create_full_tear_sheet.
    positions : pd.DataFrame
        Daily net position values.
         - See full explanation in create_full_tear_sheet.
    show_and_plot_top_pos : int, optional
        By default, this is 2, and both prints and plots the
        top 10 positions.
        If this is 0, it will only plot; if 1, it will only print.
    hide_positions : bool, optional
        If True, will not output any symbol names.
        Overrides show_and_plot_top_pos to 0 to suppress text output.
    return_fig : boolean, optional
        If True, returns the figure that was plotted on.
    sector_mappings : dict or pd.Series, optional
        Security identifier to sector mapping.
        Security ids as keys, sectors as values.
    transactions : pd.DataFrame, optional
        Prices and amounts of executed trades. One row per trade.
         - See full explanation in create_full_tear_sheet.
    estimate_intraday: boolean or str, optional
        Approximate returns for intraday strategies.
        See description in create_full_tear_sheet.
    """

    arg_1 = utils.check_intraday(arg_7, arg_0,
                                     arg_1, arg_6)

    if arg_3:
        arg_2 = 0
    arg_8 = 7 if arg_5 is not None else 6

    arg_9 = plt.figure(figsize=(14, arg_8 * 6))
    arg_10 = gridspec.GridSpec(arg_8, 3, wspace=0.5, hspace=0.5)
    arg_11 = plt.subplot(arg_10[0, :])
    arg_12 = plt.subplot(arg_10[1, :], sharex=arg_11)
    arg_13 = plt.subplot(arg_10[2, :], sharex=arg_11)
    arg_14 = plt.subplot(arg_10[3, :], sharex=arg_11)
    arg_15 = plt.subplot(arg_10[4, :])
    arg_16 = plt.subplot(arg_10[5, :], sharex=arg_11)

    arg_17 = pos.get_percent_alloc(arg_1)

    plotting.plot_exposures(arg_0, arg_1, arg_21=arg_11)

    plotting.show_and_plot_top_positions(
        arg_0,
        arg_17,
        show_and_plot=arg_2,
        arg_3=arg_3,
        arg_21=arg_12)

    plotting.plot_max_median_position_concentration(arg_1,
                                                    arg_21=arg_13)

    plotting.plot_holdings(arg_0, arg_17, arg_21=arg_14)

    plotting.plot_long_short_holdings(arg_0, arg_17,
                                      arg_21=arg_15)

    plotting.plot_gross_leverage(arg_0, arg_1,
                                 arg_21=arg_16)

    if arg_5 is not None:
        arg_18 = pos.get_sector_exposures(arg_1,
                                                    arg_5)
        if len(arg_18.columns) > 1:
            arg_19 = pos.get_percent_alloc(arg_18)
            arg_19 = arg_19.drop('cash', axis='columns')
            arg_20 = plt.subplot(arg_10[6, :], sharex=arg_11)
            plotting.plot_sector_allocations(arg_0, arg_19,
                                             arg_21=arg_20)

    for arg_21 in arg_9.axes:
        plt.setp(arg_21.get_xticklabels(), visible=True)

    if arg_4:
        return arg_9

Generate a number of plots for analyzing a strategy s positions and holdings .


def Func ( arg_0 ) : Func = { } for arg_2 , arg_3 , arg_3 in arg_0 . data : if arg_2 . name in Func . keys ( ) : Func [ arg_2 . name ] += 1 else : Func [ arg_2 . name ] = 1 return Func

def Func(arg_0):
        """Count each operation kind in the circuit.

        Returns:
            dict: a breakdown of how many operations of each kind.
        """
        Func = {}
        for arg_2, arg_3, arg_3 in arg_0.data:
            if arg_2.name in Func.keys():
                Func[arg_2.name] += 1
            else:
                Func[arg_2.name] = 1
        return Func

Count each operation kind in the circuit .


def Func ( ) : arg_0 = [ ] arg_1 = [ ] for arg_2 in arg_3 . path : if arg_2 == '__classpath__' or arg_2 . startswith ( '__pyclasspath__' ) : arg_1 . append ( arg_2 ) else : arg_0 . append ( arg_2 ) arg_3 . path = arg_0 arg_3 . path . extend ( arg_1 )

def Func():
    """Adjust the special classpath sys.path entries for Jython. These
    entries should follow the base virtualenv lib directories.
    """
    arg_0 = []
    arg_1 = []
    for arg_2 in arg_3.path:
        if arg_2 == '__classpath__' or arg_2.startswith('__pyclasspath__'):
            arg_1.append(arg_2)
        else:
            arg_0.append(arg_2)
    arg_3.path = arg_0
    arg_3.path.extend(arg_1)

Adjust the special classpath sys . path entries for Jython . These entries should follow the base virtualenv lib directories .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_0
.
progs
if
not
arg_2
.
has_key
(
prog
)
:
logger
.
warning
(
'GraphViz\'s executable "%s" not found'
%
prog
)
if
not
os
.
path
.
exists
(
arg_2
[
prog
]
)
or
not
os
.
path
.
isfile
(
arg_2
[
prog
]
)
:
logger
.
warning
(
"GraphViz's executable '%s' is not a "
"file or doesn't exist"
%
arg_2
[
prog
]
)

def Func(arg_0, arg_1):
        """ Handles the Graphviz layout program selection changing.
        """
        arg_2 = arg_0.progs

        if not arg_2.has_key(prog):
            logger.warning( 'GraphViz\'s executable "%s" not found' % prog )

        if not os.path.exists( arg_2[prog] ) or not \
            os.path.isfile( arg_2[prog] ):
            logger.warning( "GraphViz's executable '%s' is not a "
                "file or doesn't exist" % arg_2[prog] )

Handles the Graphviz layout program selection changing .


def Func ( arg_0 , arg_1 = None ) : arg_1 = compile_masks ( arg_1 or [ r'.*' ] ) for Func in itervalues ( arg_0 . _found ) : for arg_3 in Func : arg_4 = text_type ( Path ( arg_3 ) . relative_to ( arg_0 . base_path ) ) if matches_masks ( arg_4 , arg_1 ) : yield arg_3

def Func(arg_0, arg_1=None):
        """
        A generator that produces a sequence of paths to files in the project
        that matches the specified filters.

        :param filters:
            the regular expressions to use when finding files in the project.
            If not specified, all files are returned.
        :type filters: list(str)
        """

        arg_1 = compile_masks(arg_1 or [r'.*'])

        for Func in itervalues(arg_0._found):
            for arg_3 in Func:
                arg_4 = text_type(Path(arg_3).relative_to(arg_0.base_path))
                if matches_masks(arg_4, arg_1):
                    yield arg_3

A generator that produces a sequence of paths to files in the project that matches the specified filters .


(self, filename, attachments, max_frames=1e100)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
1e100
)
:
arg_0
.
markers
=
Markers
(
arg_0
)
arg_5
=
arg_1
.
lower
(
)
if
arg_5
.
endswith
(
'.c3d'
)
:
arg_0
.
markers
.
load_c3d
(
arg_1
,
arg_3
=
arg_3
)
elif
arg_5
.
endswith
(
'.csv'
)
or
arg_5
.
endswith
(
'.csv.gz'
)
:
arg_0
.
markers
.
load_csv
(
arg_1
,
arg_3
=
arg_3
)
else
:
logging
.
fatal
(
'%s: not sure how to load markers!'
,
arg_1
)
arg_0
.
markers
.
load_attachments
(
arg_2
,
arg_0
.
skeleton
)

def Func(arg_0, arg_1, arg_2, arg_3=1e100):
        '''Load marker data and attachment preferences into the model.

        Parameters
        ----------
        filename : str
            The name of a file containing marker data. This currently needs to
            be either a .C3D or a .CSV file. CSV files must adhere to a fairly
            strict column naming convention; see :func:`Markers.load_csv` for
            more information.
        attachments : str
            The name of a text file specifying how markers are attached to
            skeleton bodies.
        max_frames : number, optional
            Only read in this many frames of marker data. By default, the entire
            data file is read into memory.

        Returns
        -------
        markers : :class:`Markers`
            Returns a markers object containing loaded marker data as well as
            skeleton attachment configuration.
        '''
        arg_0.markers = Markers(arg_0)
        arg_5 = arg_1.lower()
        if arg_5.endswith('.c3d'):
            arg_0.markers.load_c3d(arg_1, arg_3=arg_3)
        elif arg_5.endswith('.csv') or arg_5.endswith('.csv.gz'):
            arg_0.markers.load_csv(arg_1, arg_3=arg_3)
        else:
            logging.fatal('%s: not sure how to load markers!', arg_1)
        arg_0.markers.load_attachments(arg_2, arg_0.skeleton)

Load marker data and attachment preferences into the model .


def Func(arg_0, **arg_1):
        """
        Search the movie, tv show and person collections with a single query.

        Args:
            query: CGI escpaed string.
            page: (optional) Minimum value of 1. Expected value is an integer.
            language: (optional) ISO 639-1 code.
            include_adult: (optional) Toggle the inclusion of adult titles.
                           Expected value is True or False.

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

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

Search the movie tv show and person collections with a single query .


def Func(arg_0=None, arg_1=None):
    """
    Returns example bounding boxes on the standard example quokke image.

    Currently only a single bounding box is returned that covers the quokka.

    Parameters
    ----------
    size : None or float or tuple of int or tuple of float, optional
        Size of the output image on which the BBs are placed. If None, then the BBs
        are not projected to any new size (positions on the original image are used).
        Floats lead to relative size changes, ints to absolute sizes in pixels.

    extract : None or 'square' or tuple of number or imgaug.BoundingBox or imgaug.BoundingBoxesOnImage
        Subarea to extract from the image. See :func:`imgaug.quokka`.

    Returns
    -------
    bbsoi : imgaug.BoundingBoxesOnImage
        Example BBs on the quokka image.

    """
    # TODO get rid of this deferred import
    from imgaug.augmentables.bbs import BoundingBox, BoundingBoxesOnImage

    arg_2, arg_3 = 0, 0
    if arg_1 is not None:
        arg_4 = _quokka_normalize_extract(arg_1)
        arg_2 = arg_4.x1
        arg_3 = arg_4.y1
    with open(QUOKKA_ANNOTATIONS_FP, "r") as f:
        arg_5 = json.load(f)
    arg_6 = []
    for arg_7 in arg_5["bounding_boxes"]:
        arg_6.append(
            BoundingBox(
                x1=arg_7["x1"] - arg_2,
                y1=arg_7["y1"] - arg_3,
                x2=arg_7["x2"] - arg_2,
                y2=arg_7["y2"] - arg_3
            )
        )
    if arg_1 is not None:
        arg_8 = (arg_4.height, arg_4.width, 3)
    else:
        arg_8 = (643, 960, 3)
    arg_9 = BoundingBoxesOnImage(arg_6, arg_8=arg_8)
    if arg_0 is not None:
        arg_10 = _compute_resized_shape(arg_8, arg_0)
        arg_9 = arg_9.on(arg_10)
    return arg_9

Returns example bounding boxes on the standard example quokke image .


Infer proteins and conduct error-rate estimation in different contexts.

(infile, outfile, context, parametric, pfdr, pi0_lambda, pi0_method, pi0_smooth_df, pi0_smooth_log_pi0, lfdr_truncate, lfdr_monotone, lfdr_transformation, lfdr_adj, lfdr_eps)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, arg_7, arg_8, arg_9, arg_10, arg_11, arg_12, arg_13):
    """
    Infer Funcs and conduct error-rate estimation in different contexts.
    """

    if arg_1 is None:
        arg_1 = arg_0
    else:
        arg_1 = arg_1

    infer_Funcs(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, arg_7, arg_8, arg_9, arg_10, arg_11, arg_12, arg_13)

Infer proteins and conduct error - rate estimation in different contexts .


return [data[i:i + num] for i in range(0, len(data), num)]

def Func ( arg_0 , arg_1 ) : return [ arg_0 [ arg_2 : arg_2 + arg_1 ] for arg_2 in range ( 0 , len ( arg_0 ) , arg_1 ) ]

def Func(arg_0, arg_1):
    """ Turn a list to list of list """
    return [arg_0[arg_2:arg_2 + arg_1] for arg_2 in range(0, len(arg_0), arg_1)]


def Func ( arg_0 , arg_1 = 2 ) : arg_2 = [ ] for arg_3 in arg_0 . leaves : arg_2 += arg_3 . flatten ( arg_1 - 1 ) return cluster . unique ( arg_2 )

def Func(arg_0, arg_1=2):
        """ Returns a list of leaves, nodes connected to leaves, etc.
        """
        arg_2 = []
        for arg_3 in arg_0.leaves: arg_2 += arg_3.flatten(arg_1-1)
        return cluster.unique(arg_2)

Returns a list of leaves nodes connected to leaves etc .


return list(filter(
        lambda vv: r.match(vv.replace('\\', '/').split('/')[-1]) is not None,
        files_or_folders,
    ))

def Func ( arg_0 : arg_1 , arg_2 = arg_3 ) -> arg_1 : arg_4 = re . compile ( f'.*{date_fmt}.*' ) return arg_1 ( filter ( lambda vv : arg_4 . match ( vv . replace ( '\\' , '/' ) . split ( '/' ) [ - 1 ] ) is not None , arg_0 , ) )

def Func(arg_0: arg_1, arg_2=arg_3) -> arg_1:
    """
    Filter files or dates by date patterns

    Args:
        files_or_folders: list of files or folders
        date_fmt: date format

    Returns:
        list
    """
    arg_4 = re.compile(f'.*{date_fmt}.*')
    return arg_1(filter(
        lambda vv: arg_4.match(vv.replace('\\', '/').split('/')[-1]) is not None,
        arg_0,
    ))


(self,
                             query_results,
                             filename,
                             fmt="csv",
                             coerce_to_timestamp=False,
                             record_time_added=False)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
"csv"
,
arg_4
=
False
,
arg_5
=
False
)
:
arg_3
=
arg_3
.
lower
(
)
if
arg_3
not
in
[
'csv'
,
'json'
,
'ndjson'
]
:
raise
ValueError
(
"Format value is not recognized: {}"
.
format
(
arg_3
)
)
arg_6
=
pd
.
DataFrame
.
from_records
(
arg_1
,
exclude
=
[
"attributes"
]
)
arg_6
.
columns
=
[
column
.
lower
(
)
for
column
in
arg_6
.
columns
]
if
arg_4
and
arg_6
.
shape
[
0
]
>
0
:
arg_8
=
arg_1
[
0
]
[
'attributes'
]
[
'type'
]
arg_0
.
log
.
info
(
"Coercing timestamps for: %s"
,
arg_8
)
arg_9
=
arg_0
.
describe_object
(
arg_8
)
arg_10
=
[
field
[
'name'
]
.
lower
(
)
for
field
in
arg_9
[
'fields'
]
if
field
[
'type'
]
in
[
"date"
,
"datetime"
]
and
field
[
'name'
]
.
lower
(
)
in
arg_6
.
columns
]
arg_6
[
arg_10
]
=
arg_6
[
arg_10
]
.
apply
(
arg_0
.
_to_timestamp
)
if
arg_5
:
arg_11
=
time
.
time
(
)
arg_6
[
"time_fetched_from_salesforce"
]
=
arg_11
if
arg_3
==
"csv"
:
arg_0
.
log
.
info
(
"Cleaning data and writing to CSV"
)
arg_12
=
arg_6
.
columns
[
arg_6
.
dtypes
==
"object"
]
arg_6
[
arg_12
]
=
arg_6
[
arg_12
]
.
apply
(
lambda
x
:
x
.
str
.
replace
(
"\r\n"
,
""
)
.
str
.
replace
(
"\n"
,
""
)
)
arg_6
.
to_csv
(
arg_2
,
index
=
False
)
elif
arg_3
==
"json"
:
arg_6
.
to_json
(
arg_2
,
"records"
,
date_unit
=
"s"
)
elif
arg_3
==
"ndjson"
:
arg_6
.
to_json
(
arg_2
,
"records"
,
lines
=
True
,
date_unit
=
"s"
)
return
arg_6

def Func(arg_0,
                             arg_1,
                             arg_2,
                             arg_3="csv",
                             arg_4=False,
                             arg_5=False):
        """
        Write query results to file.

        Acceptable formats are:
            - csv:
                comma-separated-values file. This is the default format.
            - json:
                JSON array. Each element in the array is a different row.
            - ndjson:
                JSON array but each element is new-line delimited instead of comma delimited like in `json`

        This requires a significant amount of cleanup.
        Pandas doesn't handle output to CSV and json in a uniform way.
        This is especially painful for datetime types.
        Pandas wants to write them as strings in CSV, but as millisecond Unix timestamps.

        By default, this function will try and leave all values as they are represented in Salesforce.
        You use the `coerce_to_timestamp` flag to force all datetimes to become Unix timestamps (UTC).
        This is can be greatly beneficial as it will make all of your datetime fields look the same,
        and makes it easier to work with in other database environments

        :param query_results: the results from a SQL query
        :type query_results: list of dict
        :param filename: the name of the file where the data should be dumped to
        :type filename: str
        :param fmt: the format you want the output in. Default:  'csv'
        :type fmt: str
        :param coerce_to_timestamp: True if you want all datetime fields to be converted into Unix timestamps.
            False if you want them to be left in the same format as they were in Salesforce.
            Leaving the value as False will result in datetimes being strings. Default: False
        :type coerce_to_timestamp: bool
        :param record_time_added: True if you want to add a Unix timestamp field
            to the resulting data that marks when the data was fetched from Salesforce. Default: False
        :type record_time_added: bool
        :return: the dataframe that gets written to the file.
        :rtype: pd.Dataframe
        """
        arg_3 = arg_3.lower()
        if arg_3 not in ['csv', 'json', 'ndjson']:
            raise ValueError("Format value is not recognized: {}".format(arg_3))

        # this line right here will convert all integers to floats
        # if there are any None/np.nan values in the column
        # that's because None/np.nan cannot exist in an integer column
        # we should write all of our timestamps as FLOATS in our final schema
        arg_6 = pd.DataFrame.from_records(arg_1, exclude=["attributes"])

        arg_6.columns = [column.lower() for column in arg_6.columns]

        # convert columns with datetime strings to datetimes
        # not all strings will be datetimes, so we ignore any errors that occur
        # we get the object's definition at this point and only consider
        # features that are DATE or DATETIME
        if arg_4 and arg_6.shape[0] > 0:
            # get the object name out of the query results
            # it's stored in the "attributes" dictionary
            # for each returned record
            arg_8 = arg_1[0]['attributes']['type']

            arg_0.log.info("Coercing timestamps for: %s", arg_8)

            arg_9 = arg_0.describe_object(arg_8)

            # possible columns that can be converted to timestamps
            # are the ones that are either date or datetime types
            # strings are too general and we risk unintentional conversion
            arg_10 = [
                field['name'].lower()
                for field in arg_9['fields']
                if field['type'] in ["date", "datetime"] and field['name'].lower() in arg_6.columns
            ]
            arg_6[arg_10] = arg_6[arg_10].apply(arg_0._to_timestamp)

        if arg_5:
            arg_11 = time.time()
            arg_6["time_fetched_from_salesforce"] = arg_11

        # write the CSV or JSON file depending on the option
        # NOTE:
        #   datetimes here are an issue.
        #   There is no good way to manage the difference
        #   for to_json, the options are an epoch or a ISO string
        #   but for to_csv, it will be a string output by datetime
        #   For JSON we decided to output the epoch timestamp in seconds
        #   (as is fairly standard for JavaScript)
        #   And for csv, we do a string
        if arg_3 == "csv":
            # there are also a ton of newline objects that mess up our ability to write to csv
            # we remove these newlines so that the output is a valid CSV format
            arg_0.log.info("Cleaning data and writing to CSV")
            arg_12 = arg_6.columns[arg_6.dtypes == "object"]
            arg_6[arg_12] = arg_6[arg_12].apply(
                lambda x: x.str.replace("\r\n", "").str.replace("\n", "")
            )
            # write the dataframe
            arg_6.to_csv(arg_2, index=False)
        elif arg_3 == "json":
            arg_6.to_json(arg_2, "records", date_unit="s")
        elif arg_3 == "ndjson":
            arg_6.to_json(arg_2, "records", lines=True, date_unit="s")

        return arg_6


def Func():
    """Upload the docs to a remote location via rsync.

    `options.paved.docs.rsync_location`: the target location to rsync files to.

    `options.paved.docs.path`: the path to the Sphinx folder (where the Makefile resides).

    `options.paved.docs.build_rel`: the path of the documentation
        build folder, relative to `options.paved.docs.path`.
    """
    assert options.paved.docs.rsync_location, "Please specify an rsync location in options.paved.docs.rsync_location."
    sh('rsync -ravz %s/ %s/' % (path(options.paved.docs.path) / options.paved.docs.build_rel,
                                options.paved.docs.rsync_location))

Upload the docs to a remote location via rsync .


def Func ( arg_0 ) : arg_1 = [ ] for arg_2 , ( arg_3 , arg_4 , arg_5 ) in enumerate ( arg_0 . _fields ) : if arg_4 is None : continue arg_6 = arg_0 . _slice [ arg_2 ] arg_7 = None if arg_5 is not None : arg_1 . append ( arg_4 ( arg_6 , arg_0 . _slice [ arg_5 ] ) ) else : arg_1 . append ( arg_4 ( arg_6 ) ) return arg_1

def Func(arg_0):
    """ Generate the aggregated output record

    Parameters:
    ------------------------------------------------------------------------
    retval: outputRecord

    """

    arg_1 = []

    for arg_2, (arg_3, arg_4, arg_5) in enumerate(arg_0._fields):
      if arg_4 is None: # this field is not supposed to be aggregated.
        continue

      arg_6 = arg_0._slice[arg_2]
      arg_7 = None
      if arg_5 is not None:
        arg_1.append(arg_4(arg_6, arg_0._slice[arg_5]))
      else:
        arg_1.append(arg_4(arg_6))

    return arg_1


def Func ( arg_0 , arg_1 ) : if not arg_0 : return arg_2 = { k : { 'start' : s , 'len' : l , 'read' : r , 'write' : w } for k , ( s , l , r , w ) in arg_1 . items ( ) } arg_3 = { } for arg_4 in arg_2 : arg_5 = _get_field ( arg_0 , arg_2 , arg_4 ) if arg_5 is not None : arg_3 [ arg_4 ] = arg_5 return arg_3

def Func(arg_0, arg_1):
    """
    Processes a single row from the file.
    """
    if not arg_0:
        return

    # Construct the column dictionary that maps each field to
    # its start, its length, and its read and write functions.
    arg_2 = {k: {'start': s,
                   'len': l,
                   'read': r,
                   'write': w} for k, (s, l, r, w) in arg_1.items()}

    # Now collect the item
    arg_3 = {}
    for arg_4 in arg_2:
        arg_5 = _get_field(arg_0, arg_2, arg_4)
        if arg_5 is not None:
            arg_3[arg_4] = arg_5

    return arg_3


(self, script_name, contents, mode="t", *ignored)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
"t"
,
*
arg_4
)
:
from
setuptools
.
command
.
easy_install
import
chmod
,
current_umask
log
.
info
(
"Installing %s script to %s"
,
arg_1
,
arg_0
.
install_dir
)
arg_5
=
os
.
path
.
join
(
arg_0
.
install_dir
,
arg_1
)
arg_0
.
outfiles
.
append
(
arg_5
)
arg_6
=
current_umask
(
)
if
not
arg_0
.
dry_run
:
ensure_directory
(
arg_5
)
arg_7
=
open
(
arg_5
,
"w"
+
arg_3
)
arg_7
.
write
(
arg_2
)
arg_7
.
close
(
)
chmod
(
arg_5
,
0777
arg_6
)

def Func(arg_0, arg_1, arg_2, arg_3="t", *arg_4):
        """Write an executable file to the scripts directory"""
        from setuptools.command.easy_install import chmod, current_umask
        log.info("Installing %s script to %s", arg_1, arg_0.install_dir)
        arg_5 = os.path.join(arg_0.install_dir, arg_1)
        arg_0.outfiles.append(arg_5)

        arg_6 = current_umask()
        if not arg_0.dry_run:
            ensure_directory(arg_5)
            arg_7 = open(arg_5,"w"+arg_3)
            arg_7.write(arg_2)
            arg_7.close()
            chmod(arg_5, 0777-arg_6)


def
Func
(
arg_0
,
arg_1
)
:
log
.
debug
(
"Destroying connection at <{0}>"
.
format
(
hex
(
id
(
arg_1
)
)
)
)
arg_0
.
_decontextualise_connection
(
arg_1
)
arg_1
.
unbind
(
)

def Func(arg_0, arg_1):
        """
        Destroys a connection. Removes the connection from the appcontext, and
        unbinds it.

        Args:
            connection (ldap3.Connection):  The connnection to destroy
        """

        log.debug("Destroying connection at <{0}>".format(hex(id(arg_1))))
        arg_0._decontextualise_connection(arg_1)
        arg_1.unbind()

Destroys a connection . Removes the connection from the appcontext and unbinds it .


return tuple(np.s_[l:r] for l,r in zip(*self.bounds))

def Func ( arg_0 ) : return tuple ( np . s_ [ arg_1 : arg_2 ] for arg_1 , arg_2 in zip ( * arg_0 . bounds ) )

def Func(arg_0):
        """
        Array Func object for this tile

        >>> Tile((2,3)).Func
        (slice(0, 2, None), slice(0, 3, None))

        >>> np.arange(10)[Tile((4,)).Func]
        array([0, 1, 2, 3])
        """
        return tuple(np.s_[arg_1:arg_2] for arg_1,arg_2 in zip(*arg_0.bounds))

Array slicer object for this tile

        >>> Tile((2,3)).slicer
        (slice(0, 2, None), slice(0, 3, None))

        >>> np.arange(10)[Tile((4,)).slicer]
        array([0, 1, 2, 3])


(self, analyte='total_counts', gwin=7, swin=None, win=20,
                       on_mult=[1.5, 1.], off_mult=[1., 1.5],
                       transform='log')

def Func(arg_0, arg_1='total_counts', arg_2=7, arg_3=None, arg_4=20,
                       arg_5=[1.5, 1.], arg_6=[1., 1.5],
                       arg_7='log'):
        """
        Plot a detailed autorange report for this sample.
        """
        if arg_1 is None:
            # sig = self.focus[self.internal_standard]
            arg_8 = arg_0.data['total_counts']
        elif arg_1 == 'total_counts':
            arg_8 = arg_0.data['total_counts']
        elif arg_1 in arg_0.analytes:
            arg_8 = arg_0.focus[arg_1]
        else:
            raise ValueError('Invalid analyte.')

        if arg_7 == 'log':
            arg_8 = np.log10(arg_8)

        arg_9, arg_10 = plot.Func(t=arg_0.Time, arg_8=arg_8, arg_2=arg_2,
                                       arg_3=arg_3, arg_4=arg_4, arg_5=arg_5,
                                       arg_6=arg_6)

        return arg_9, arg_10

Plot a detailed autorange report for this sample .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { } for arg_4 in arg_1 : arg_3 [ arg_4 ] = [ 0 ] * len ( arg_2 ) for arg_5 in arg_0 . values ( ) : arg_6 = arg_5 . debian_pkg_name for arg_4 in arg_1 : for arg_7 , arg_8 in enumerate ( arg_2 ) : arg_9 = arg_8 . get ( arg_4 , { } ) . get ( arg_6 , None ) if arg_9 : arg_3 [ arg_4 ] [ arg_7 ] += 1 return arg_3

def Func(arg_0, arg_1, arg_2):
    """
    Get the number of packages per target and repository.

    :return: a dict indexed by targets containing
      a list of integer values (one for each repo)
    """
    arg_3 = {}
    for arg_4 in arg_1:
        arg_3[arg_4] = [0] * len(arg_2)
    for arg_5 in arg_0.values():
        arg_6 = arg_5.debian_pkg_name

        for arg_4 in arg_1:
            for arg_7, arg_8 in enumerate(arg_2):
                arg_9 = arg_8.get(arg_4, {}).get(arg_6, None)
                if arg_9:
                    arg_3[arg_4][arg_7] += 1
    return arg_3

Get the number of packages per target and repository .


def Func(arg_0, arg_1, **arg_2):
    """Create a processed topology.

    The processed (or portable) topology file does not contain any
    ``#include`` statements and hence can be easily copied around. It
    also makes it possible to re-grompp without having any special itp
    files available.

    :Arguments:
      *topol*
          topology file
      *struct*
          coordinat (structure) file

    :Keywords:
      *processed*
          name of the new topology file; if not set then it is named like
          *topol* but with ``pp_`` prepended
      *includes*
          path or list of paths of directories in which itp files are
          searched for
      *grompp_kwargs**
          other options for :program:`grompp` such as ``maxwarn=2`` can
          also be supplied

    :Returns: full path to the processed topology
    """
    arg_3, arg_4 = os.path.split(arg_0)
    arg_5 = arg_2.pop('processed', os.path.join(arg_3, 'pp_'+arg_4))
    arg_6, arg_7 = filter_grompp_options(**arg_2)
    arg_7 = add_mdp_includes(arg_0, arg_7)
    with tempfile.NamedTemporaryFile(suffix='.mdp') as mdp:
        mdp.write('; empty mdp file\ninclude = {include!s}\n'.format(**arg_7))
        mdp.flush()
        arg_6['p'] = arg_0
        arg_6['pp'] = arg_5
        arg_6['f'] =  mdp.name
        arg_6['c'] = arg_1
        arg_6['v'] = False
        try:
            gromacs.grompp(**arg_6)
        finally:
            utilities.unlink_gmx('topol.tpr', 'mdout.mdp')
    return utilities.realpath(arg_5)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { 'name' : arg_1 . name , 'in' : arg_0 . _in , 'required' : arg_1 . required } if arg_1 . description : arg_3 [ 'description' ] = arg_1 . description if arg_1 . default : arg_3 [ 'default' ] = arg_1 . default arg_4 = arg_2 ( arg_1 ) arg_4 . pop ( 'title' , None ) arg_3 . update ( arg_4 ) if arg_4 . get ( 'type' ) == 'array' : arg_3 [ 'items' ] = { 'type' : arg_4 [ 'items' ] [ 'type' ] } return arg_3

def Func(arg_0, arg_1, arg_2):
        """
        Convert node schema into a parameter object.
        """

        arg_3 = {
            'name': arg_1.name,
            'in': arg_0._in,
            'required': arg_1.required
        }
        if arg_1.description:
            arg_3['description'] = arg_1.description

        if arg_1.default:
            arg_3['default'] = arg_1.default

        arg_4 = arg_2(arg_1)
        # Parameters shouldn't have a title
        arg_4.pop('title', None)
        arg_3.update(arg_4)

        if arg_4.get('type') == 'array':
            arg_3['items'] = {'type': arg_4['items']['type']}

        return arg_3

Convert node schema into a parameter object .


(
            self, metric_configs: Iterable[MetricConfig])

def Func ( arg_0 , arg_1 : arg_2 [ arg_3 ] ) -> Dict [ str , Metric ] : return arg_0 . registry . Func ( arg_1 )

def Func(
            arg_0, arg_1: arg_2[arg_3]) -> Dict[str, Metric]:
        """Create and register metrics from a list of MetricConfigs."""
        return arg_0.registry.Func(arg_1)

Create and register metrics from a list of MetricConfigs .


def Func ( arg_0 , arg_1 ) : del arg_0 . virtual_columns [ arg_1 ] arg_0 . signal_column_changed . emit ( arg_0 , arg_1 , "delete" )

def Func(arg_0, arg_1):
        """Deletes a virtual column from a DataFrame."""
        del arg_0.virtual_columns[arg_1]
        arg_0.signal_column_changed.emit(arg_0, arg_1, "delete")

Deletes a virtual column from a DataFrame .


def Func(arg_0, arg_1, arg_2=1):
        """
        Retrieves a data center by its name.

        Either returns the data center response or raises an Exception
        if no or more than one data center was found with the name.
        The search for the name is done in this relaxing way:

        - exact name match
        - case-insentive name match
        - data center starts with the name
        - data center starts with the name  (case insensitive)
        - name appears in the data center name
        - name appears in the data center name (case insensitive)

        :param      name: The name of the data center.
        :type       name: ``str``

        :param      depth: The depth of the response data.
        :type       depth: ``int``
        """
        arg_3 = arg_0.list_datacenters(arg_2=arg_2)['items']
        arg_4 = find_item_by_name(arg_3, lambda i: i['properties']['name'], arg_1)
        if not arg_4:
            raise NameError("No data center found with name "
                            "containing '{name}'.".format(arg_1=arg_1))
        if len(arg_4) > 1:
            raise NameError("Found {n} data centers with the name '{name}': {names}".format(
                n=len(arg_4),
                arg_1=arg_1,
                names=", ".join(arg_5['properties']['name'] for arg_5 in arg_4)
            ))
        return arg_4[0]


(self, name, default=_ARG_DEFAULT, strip=True)

def Func(arg_0, arg_1, arg_2=arg_3, arg_4=True):
        """Returns the value of the argument with the given name.

        If default is not provided, the argument is considered to be
        required, and we throw an HTTP 400 exception if it is missing.

        If the argument appears in the url more than once, we return the
        last value.

        The returned value is always unicode.
        """
        arg_5 = arg_0.Funcs(arg_1, arg_4=arg_4)
        if not arg_5:
            if arg_2 is arg_0._ARG_DEFAULT:
                raise HTTPError(400, "Missing argument %s" % arg_1)
            return arg_2
        return arg_5[-1]

Returns the value of the argument with the given name .


def Func(arg_0):
        """Returns a prepared ``Session`` instance."""
        arg_1 = Session()

        arg_1.headers = {
            'Content-type': 'application/json',
            'Accept': 'application/vnd.heroku+json; version=3',
        }

        if arg_0._auth_token:
            arg_1.trust_env = False  # Effectively disable netrc auth
            arg_1.headers['Authorization'] = 'Bearer %s' % arg_0._auth_token

        return arg_1


def
Func
(
arg_0
=
False
)
:
if
arg_0
:
arg_1
=
get_zipped_heron_release_file
(
)
else
:
arg_1
=
get_heron_release_file
(
)
with
open
(
arg_1
)
as
release_info
:
for
arg_2
in
release_info
:
arg_3
=
arg_2
[
:
1
]
.
split
(
' '
)
if
arg_3
[
0
]
==
'heron.build.version'
:
return
arg_3
[
1
]
.
replace
(
"'"
,
""
)
return
'unknown'

def Func(arg_0=False):
  """Print version from release.yaml

  :param zipped_pex: True if the PEX file is built with flag `zip_safe=False'.
  """
  if arg_0:
    arg_1 = get_zipped_heron_release_file()
  else:
    arg_1 = get_heron_release_file()
  with open(arg_1) as release_info:
    for arg_2 in release_info:
      arg_3 = arg_2[:-1].split(' ')
      if arg_3[0] == 'heron.build.version':
        return arg_3[-1].replace("'", "")
    return 'unknown'


return parse_xml(res.text, *args, **kwargs)

def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : return parse_Func ( arg_1 . text , * arg_2 , ** arg_3 )

def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Parses XML from a response."""
        return parse_Func(arg_1.text, *arg_2, **arg_3)


def Func(arg_0, arg_1, **arg_2):
        """Fetch the topics

        :param category: the category of items to fetch
        :param kwargs: backend arguments

        :returns: a generator of items
        """

        arg_3 = arg_2['from_date']

        logger.info("Looking for topics at '%s', updated from '%s'",
                    arg_0.url, str(arg_3))

        arg_4 = 0

        arg_5 = arg_0.__fetch_and_parse_topics_ids(arg_3)

        for arg_6 in arg_5:
            arg_7 = arg_0.__fetch_and_parse_topic(arg_6)
            arg_4 += 1
            yield arg_7

        logger.info("Fetch process completed: %s topics fetched",
                    arg_4)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . get_action ( arg_1 , arg_2 ) if arg_3 is None : return False arg_3 . cancel ( ) arg_0 . actions [ arg_1 ] . remove ( arg_3 ) return True

def Func(arg_0, arg_1, arg_2):
        """
        Remove an existing action.

        action_name -- name of the action
        action_id -- ID of the action

        Returns a boolean indicating the presence of the action.
        """
        arg_3 = arg_0.get_action(arg_1, arg_2)
        if arg_3 is None:
            return False

        arg_3.cancel()
        arg_0.actions[arg_1].remove(arg_3)
        return True


(context, institute, display_name, case_id, nr_variants, variants_treshold)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5):
    """Display Func from the database"""
    LOG.info("Running scout view institutes")
    arg_6 = arg_0.obj['adapter']

    arg_7 = []
    if arg_3:
        arg_8 = arg_6.case(arg_3=arg_3)
        if arg_8:
            arg_7.append(arg_8)

    else:
        arg_7 = arg_6.Func(collaborator=arg_1, name_query=arg_2)
        arg_7 = [arg_8 for arg_8 in arg_7]

    if not arg_7:
        LOG.info("No Func could be found")
        return

    arg_9 = ['case_id', 'display_name', 'institute']

    if arg_5:
        LOG.info("Only show Func with more than %s variants", arg_5)
        arg_4 = True

    if arg_4:
        LOG.info("Displaying number of variants for each case")
        arg_9.append('clinical')
        arg_9.append('research')

    click.echo("#"+'\t'.join(arg_9))
    for arg_10 in arg_7:
        arg_11 = "{:<12}\t{:<12}\t{:<12}"
        arg_12 = [arg_10['_id'],arg_10['display_name'],arg_10['owner']]
        if arg_4:
            arg_11 += "\t{:<12}\t{:<12}"
            arg_13 = 0
            arg_14 = 0
            arg_15 = arg_6.variant_collection.find({'case_id':arg_10['_id']})
            arg_16 = 0
            for arg_16, arg_17 in enumerate(arg_15, 1):
                if arg_17['variant_type'] == 'clinical':
                    arg_13 += 1
                else:
                    arg_14 += 1
            arg_12.extend([arg_13, arg_14])

            if arg_5 and arg_16 < arg_5:
                LOG.debug("Case %s had to few variants, skipping", arg_10['_id'])
                continue

        click.echo(arg_11.format(*arg_12))


def
Func
(
arg_0
)
:
try
:
arg_0
=
arg_0
.
encode
(
'utf8'
,
'ignore'
)
except
:
pass
arg_0
=
arg_0
.
lower
(
)
arg_0
=
arg_0
.
translate
(
strip_punctuation
)
arg_0
=
whitespace
.
sub
(
' '
,
arg_0
)
return
arg_0
.
strip
(
)

def Func(arg_0):
    '''Convert a string of text into a lowercase string with no
    punctuation and only spaces for whitespace.

    :param span: string
    '''
    try:
        ## attempt to force it to utf8, which might fail
        arg_0 = arg_0.encode('utf8', 'ignore')
    except:
        pass
    ## lowercase, strip punctuation, and shrink all whitespace
    arg_0 = arg_0.lower()
    arg_0 = arg_0.translate(strip_punctuation)
    arg_0 = whitespace.sub(' ', arg_0)
    ## trim any leading or trailing whitespace
    return arg_0.strip()

Convert a string of text into a lowercase string with no punctuation and only spaces for whitespace .