def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_0 . reply ( 'pong' ) else : arg_0 . reply ( 'pong' , id = arg_1 )

def Func(arg_0, arg_1=None):
        """DDP ping handler."""
        if arg_1 is None:
            arg_0.reply('pong')
        else:
            arg_0.reply('pong', id=arg_1)


def Func ( arg_0 , arg_1 , arg_2 = [ ] ) : arg_3 = None with cd ( arg_1 . rootdir ) : try : arg_4 = [ 'rm' ] + list ( arg_2 ) arg_3 = { 'status' : 'success' , 'message' : arg_0 . _run ( arg_4 ) } except Exception as e : arg_3 = { 'status' : 'error' , 'message' : str ( e ) } return arg_3

def Func(arg_0, arg_1, arg_2=[]):
        """
        Delete files from the repo
        """

        arg_3 = None
        with cd(arg_1.rootdir):
            try:
                arg_4 = ['rm'] + list(arg_2)
                arg_3 = {
                    'status': 'success',
                    'message': arg_0._run(arg_4)
                }
            except Exception as e:
                arg_3 = {
                    'status': 'error',
                    'message': str(e)
                }

            # print(result)
            return arg_3


def
Func
(
arg_0
,
arg_1
,
arg_2
=
True
)
:
if
not
os
.
path
.
isdir
(
arg_0
)
:
if
os
.
path
.
exists
(
arg_0
)
:
raise
IOError
(
arg_0
+
' is not directory'
)
else
:
raise
IOError
(
arg_0
+
" does not exists"
)
if
arg_2
:
for
arg_3
,
arg_4
,
arg_5
in
os
.
walk
(
arg_0
)
:
for
arg_6
in
arg_5
:
if
fnmatch
.
fnmatch
(
arg_6
,
arg_1
)
:
arg_7
=
os
.
path
.
join
(
arg_3
,
arg_6
)
yield
arg_7
else
:
arg_3
=
arg_0
for
arg_6
in
os
.
listdir
(
arg_3
)
:
if
fnmatch
.
fnmatch
(
arg_6
,
arg_1
)
:
arg_7
=
os
.
path
.
join
(
arg_3
,
arg_6
)
if
os
.
path
.
isfile
(
arg_7
)
:
yield
arg_7

def Func(arg_0, arg_1, arg_2=True):
    """
    Find files by pattern in directory
    """
    if not os.path.isdir(arg_0):
        if os.path.exists(arg_0):
            raise IOError(arg_0 + ' is not directory')
        else:
            raise IOError(arg_0 + " does not exists")
    if arg_2:
        for arg_3, arg_4, arg_5 in os.walk(arg_0):
            for arg_6 in arg_5:
                if fnmatch.fnmatch(arg_6, arg_1):
                    arg_7 = os.path.join(arg_3, arg_6)
                    yield arg_7
    else:
        arg_3 = arg_0
        for arg_6 in os.listdir(arg_3):
            if fnmatch.fnmatch(arg_6, arg_1):
                arg_7 = os.path.join(arg_3, arg_6)
                if os.path.isfile(arg_7):
                    yield arg_7


def Func ( arg_0 ) : arg_1 = arg_0 . read ( ) . split ( ) for arg_2 in arg_1 : if arg_2 . lstrip ( '-' ) . replace ( '.' , '' , 1 ) . isdigit ( ) : return True if arg_2 . isalpha ( ) and ( len ( arg_2 ) > 1 or len ( arg_2 ) <= 20 ) : return True return False

def Func(arg_0):
        """
        Returns true or false based on if the OCR process has read
        actual words. This is needed to prevent non-words from being
        added to the queue since the ocr process can sometimes return
        values that are not meaningfull.
        """

        # Split the input string at points with any amount of whitespace
        arg_1 = arg_0.read().split()

        # Light weight check to see if a word exists
        for arg_2 in arg_1:

            # If the word is a numeric value
            if arg_2.lstrip('-').replace('.', '', 1).isdigit():
                return True

            # If the word contains only letters with a length from 2 to 20
            if arg_2.isalpha() and (len(arg_2) > 1 or len(arg_2) <= 20):
                return True

        return False

Returns true or false based on if the OCR process has read actual words . This is needed to prevent non - words from being added to the queue since the ocr process can sometimes return values that are not meaningfull .


def Func ( arg_0 , arg_1 = False ) : arg_2 = super ( JackalDoc , arg_0 ) . Func ( arg_1 = arg_1 ) if arg_1 : arg_3 = arg_2 . pop ( '_source' ) return { ** arg_2 , ** arg_3 } else : return arg_2

def Func(arg_0, arg_1=False):
        """
            Returns the result as a dictionary, provide the include_meta flag to als show information like index and doctype.
        """
        arg_2 = super(JackalDoc, arg_0).Func(arg_1=arg_1)
        if arg_1:
            arg_3 = arg_2.pop('_source')
            return {**arg_2, **arg_3}
        else:
            return arg_2

Returns the result as a dictionary provide the include_meta flag to als show information like index and doctype .


def Func(arg_0, arg_1, arg_2):
    """
    Make a subparser for a given type of DNS record
    """
    arg_3 = arg_0.add_parser(arg_1)

    arg_3.add_argument("name", type=str)
    arg_3.add_argument("ttl", type=int, arg_7='?')
    arg_3.add_argument(arg_1, type=str)

    for arg_4 in arg_2:
        (arg_5, arg_6) = arg_4[:2]
        if len(arg_4) > 2:
            arg_7 = arg_4[2]
            arg_3.add_argument(arg_5, type=arg_6, arg_7=arg_7)
        else:
            arg_3.add_argument(arg_5, type=arg_6)
    return arg_3


def
Func
(
arg_0
)
:
if
arg_0
.
value
in
ERROR_DESCRIPTIONS
:
arg_1
=
"{}"
.
format
(
ERROR_DESCRIPTIONS
[
arg_0
.
value
]
)
else
:
arg_1
=
"{}"
.
format
(
arg_0
.
value
)
if
arg_0
.
context_info
:
arg_1
+=
": {}"
.
format
(
arg_0
.
context_info
)
elif
arg_0
.
value
in
ERROR_RESPONSES
:
arg_1
+=
": {}"
.
format
(
ERROR_RESPONSES
[
arg_0
.
value
]
)
if
arg_0
.
src_exception
:
arg_1
+=
"\n    Source exception: '{}'"
.
format
(
arg_0
.
src_exception
)
if
arg_0
.
err_condition
:
arg_1
+=
"\n    Error condition: '{}'"
.
format
(
arg_0
.
err_condition
)
return
arg_1

def Func(arg_0):
        """Return readable string."""
        if arg_0.value in ERROR_DESCRIPTIONS:
            arg_1 = "{}".format(ERROR_DESCRIPTIONS[arg_0.value])
        else:
            arg_1 = "{}".format(arg_0.value)

        if arg_0.context_info:
            arg_1 += ": {}".format(arg_0.context_info)
        elif arg_0.value in ERROR_RESPONSES:
            arg_1 += ": {}".format(ERROR_RESPONSES[arg_0.value])

        if arg_0.src_exception:
            arg_1 += "\n    Source exception: '{}'".format(arg_0.src_exception)

        if arg_0.err_condition:
            arg_1 += "\n    Error condition: '{}'".format(arg_0.err_condition)
        return arg_1


def Func ( arg_0 , arg_1 ) : try : arg_0 . v_protocol = arg_1 . pop ( PickleParameter . PROTOCOL ) except KeyError : arg_3 = next ( arg_1 . values ( ) ) arg_0 . v_protocol = PickleParameter . _get_protocol ( arg_3 ) for arg_4 in arg_1 : arg_5 = arg_1 [ arg_4 ] arg_0 . _data [ arg_4 ] = pickle . loads ( arg_5 )

def Func(arg_0, arg_1):
        """Reconstructs all items from the pickle dumps in `load_dict`.

        Sets the `v_protocol` property to the protocol of the first reconstructed item.

        """
        try:
            arg_0.v_protocol = arg_1.pop(PickleParameter.PROTOCOL)
        except KeyError:
            # For backwards compatibility
            arg_3 = next(arg_1.values())
            arg_0.v_protocol = PickleParameter._get_protocol(arg_3)
        for arg_4 in arg_1:
            arg_5 = arg_1[arg_4]
            arg_0._data[arg_4] = pickle.loads(arg_5)

Reconstructs all items from the pickle dumps in load_dict .


Return an image cropped on top, bottom, left or right.

(image, top_offset=0, left_offset=0, bottom_offset=0, right_offset=0)

def Func(arg_0, arg_1=0, arg_2=0, arg_3=0, arg_4=0):
    """Return an image Funcped on top, bottom, left or right."""
    if arg_3 or arg_1 or arg_2 or arg_4:
        arg_5, arg_6 = arg_0.size
        arg_7 = (arg_2, arg_1,
               arg_5 - arg_4, arg_6 - arg_3)
        arg_0 = arg_0.Func(arg_7=arg_7)

    return arg_0

Return an image cropped on top bottom left or right .


return int(grid_span.get('%sval' % w_namespace))

def Func ( arg_0 ) : arg_1 = get_namespace ( arg_0 , 'w' ) arg_2 = arg_0 . xpath ( './/w:gridSpan' , namespaces = arg_0 . nsmap ) if len ( arg_2 ) != 1 : return 1 arg_3 = arg_2 [ 0 ] return int ( arg_3 . get ( '%sval' % arg_1 ) )

def Func(arg_0):
    """
    gridSpan is what docx uses to denote that a table cell has a colspan. This
    is much more simple than rowspans in that there is a one-to-one mapping
    from gridSpan to colspan.
    """
    arg_1 = get_namespace(arg_0, 'w')
    arg_2 = arg_0.xpath('.//w:gridSpan', namespaces=arg_0.nsmap)
    if len(arg_2) != 1:
        return 1
    arg_3 = arg_2[0]
    return int(arg_3.get('%sval' % arg_1))

gridSpan is what docx uses to denote that a table cell has a colspan . This is much more simple than rowspans in that there is a one - to - one mapping from gridSpan to colspan .


(X_in, mapping=None, cols=None, handle_unknown='value', handle_missing='value')

def Func(arg_0, arg_1=None, arg_2=None, arg_3='value', arg_4='value'):
        """
        Ordinal encoding uses a single column of integers to represent the classes. An optional mapping dict can be passed
        in, in this case we use the knowledge that there is some true order to the classes themselves. Otherwise, the classes
        are assumed to have no true order and integers are selected at random.
        """

        arg_5 = pd.Series(arg_15=[np.nan], arg_14=[-2])

        arg_6 = arg_0.copy(deep=True)

        if arg_2 is None:
            arg_2 = arg_6.columns.values

        if arg_1 is not None:
            arg_7 = arg_1
            for arg_8 in arg_1:
                arg_9 = arg_8.get('col')
                arg_6[arg_9] = arg_6[arg_9].map(arg_8['mapping'])

                try:
                    arg_6[arg_9] = arg_6[arg_9].astype(int)
                except ValueError as e:
                    arg_6[arg_9] = arg_6[arg_9].astype(float)

                if arg_3 == 'value':
                    arg_6[arg_9].fillna(-1, inplace=True)
                elif arg_3 == 'error':
                    arg_10 = arg_6[arg_9].isnull()
                    if any(arg_10):
                        raise ValueError('Unexpected categories found in column %s' % arg_9)

                if arg_4 == 'return_nan':
                    arg_6[arg_9] = arg_6[arg_9].map(arg_5).where(arg_6[arg_9] == -2, arg_6[arg_9])

        else:
            arg_7 = []
            for arg_11 in arg_2:

                arg_12 = np.nan

                if util.is_category(arg_6[arg_11].dtype):
                    arg_13 = arg_6[arg_11].cat.categories
                else:
                    arg_13 = arg_6[arg_11].unique()

                arg_14 = pd.Series(arg_13).fillna(arg_12).unique()

                arg_15 = pd.Series(arg_14=arg_14, arg_15=range(1, len(arg_14) + 1))

                if arg_4 == 'value' and ~arg_15.index.isnull().any():
                    arg_15.loc[arg_12] = -2
                elif arg_4 == 'return_nan':
                    arg_15.loc[arg_12] = -2

                arg_7.append({'col': arg_11, 'mapping': arg_15, 'data_type': arg_6[arg_11].dtype}, )

        return arg_6, arg_7

Ordinal encoding uses a single column of integers to represent the classes . An optional mapping dict can be passed in in this case we use the knowledge that there is some true order to the classes themselves . Otherwise the classes are assumed to have no true order and integers are selected at random .


def Func(arg_0, arg_1, arg_2, arg_3=0.5):
        """Double-click and drag the left mouse button without modifiers
        pressed.

        Parameters: coordinates to double-click on screen (tuple (x, y))
                    dest coordinates to drag to (tuple (x, y))
                    interval to send event of btn down, drag and up
        Returns: None
        """
        arg_4 = 0
        arg_0._queueMouseButton(arg_1, Quartz.kCGMouseButtonLeft, arg_4,
                               arg_2=arg_2)
        arg_0._queueMouseButton(arg_1, Quartz.kCGMouseButtonLeft, arg_4,
                               arg_2=arg_2,
                               clickCount=2)
        arg_0._postQueuedEvents(arg_3=arg_3)

Double - click and drag the left mouse button without modifiers pressed .


def Func(arg_0, arg_1, arg_2):
        """
        Helper method to clean up DAG file processors to avoid leaving orphan processes.
        """
        arg_0.log.info("Exiting gracefully upon receiving signal %s", arg_1)
        arg_0.terminate()
        arg_0.end()
        arg_0.log.debug("Finished terminating DAG processors.")
        sys.exit(os.EX_OK)

Helper method to clean up DAG file processors to avoid leaving orphan processes .


def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_1 = childprocess_default_value ( ) if not arg_1 : return _Func ( arg_0 ) else : return run_in_childprocess ( _Func , None , arg_0 )

def Func(arg_0, arg_1=None):
    """Back-end version.

    :param backend: back-end (examples:scrot, wx,..)
    :param childprocess: see :py:func:`grab`
    :return: version as string
    """
    if arg_1 is None:
        arg_1 = childprocess_default_value()
    if not arg_1:
        return _Func(arg_0)
    else:
        return run_in_childprocess(_Func, None, arg_0)


def Func ( arg_0 , arg_1 = None ) : @ llrule ( arg_1 , lambda arg_2 : [ arg_0 ] ) def rule ( arg_2 ) : arg_3 = arg_2 . _accept ( arg_0 ) if arg_3 is unmatched : return arg_3 return arg_3 . loc return rule

def Func(arg_0, arg_1=None):
    """A rule that accepts a token of kind ``kind`` and returns its location, or returns None."""
    @llrule(arg_1, lambda arg_2: [arg_0])
    def rule(arg_2):
        arg_3 = arg_2._accept(arg_0)
        if arg_3 is unmatched:
            return arg_3
        return arg_3.loc
    return rule

A rule that accepts a token of kind kind and returns its location or returns None .


def Func ( arg_0 , arg_1 ) : arg_0 . _nodes . add ( arg_1 ) arg_0 . _nodeAddrToNode [ arg_1 . address ] = arg_1 if arg_0 . _shouldConnect ( arg_1 ) : arg_4 = TcpConnection ( poller = arg_0 . _syncObj . _poller , timeout = arg_0 . _syncObj . conf . connectionTimeout , sendBufferSize = arg_0 . _syncObj . conf . sendBufferSize , recvBufferSize = arg_0 . _syncObj . conf . recvBufferSize ) arg_4 . encryptor = arg_0 . _syncObj . encryptor arg_4 . setOnConnectedCallback ( functools . partial ( arg_0 . _onOutgoingConnected , arg_4 ) ) arg_4 . setOnMessageReceivedCallback ( functools . partial ( arg_0 . _onMessageReceived , arg_1 ) ) arg_4 . setOnDisconnectedCallback ( functools . partial ( arg_0 . _onDisconnected , arg_4 ) ) arg_0 . _connections [ arg_1 ] = arg_4

def Func(arg_0, arg_1):
        """
        Add a node to the network

        :param node: node to add
        :type node: TCPNode
        """

        arg_0._nodes.add(arg_1)
        arg_0._nodeAddrToNode[arg_1.address] = arg_1
        if arg_0._shouldConnect(arg_1):
            arg_4 = TcpConnection(poller = arg_0._syncObj._poller,
                                 timeout = arg_0._syncObj.conf.connectionTimeout,
                                 sendBufferSize = arg_0._syncObj.conf.sendBufferSize,
                                 recvBufferSize = arg_0._syncObj.conf.recvBufferSize)
            arg_4.encryptor = arg_0._syncObj.encryptor
            arg_4.setOnConnectedCallback(functools.partial(arg_0._onOutgoingConnected, arg_4))
            arg_4.setOnMessageReceivedCallback(functools.partial(arg_0._onMessageReceived, arg_1))
            arg_4.setOnDisconnectedCallback(functools.partial(arg_0._onDisconnected, arg_4))
            arg_0._connections[arg_1] = arg_4


def
Func
(
arg_0
,
arg_1
)
:
def
validate_int_range
(
arg_2
)
:
arg_2
=
int
(
arg_2
)
if
arg_2
>=
arg_0
and
arg_2
<
arg_1
:
return
arg_2
raise
ValueError
(
"Not in <{0},{1}) range"
.
format
(
arg_0
,
arg_1
)
)
return
validate_int_range

def Func(arg_0, arg_1):
        """Return an integer range validator to be used with `add_setting`.

        :Parameters:
            - `start`: minimum value for the integer
            - `stop`: the upper bound (maximum value + 1)
        :Types:
            - `start`: `int`
            - `stop`: `int`

        :return: a validator function
        """
        def validate_int_range(arg_2):
            """Integer range validator."""
            arg_2 = int(arg_2)
            if arg_2 >= arg_0 and arg_2 < arg_1:
                return arg_2
            raise ValueError("Not in <{0},{1}) range".format(arg_0, arg_1))
        return validate_int_range

Return an integer range validator to be used with add_setting .


def Func ( arg_0 , arg_1 ) : arg_2 = dict ( ) for arg_3 in arg_1 . split ( ';' ) : arg_4 = arg_3 . split ( '=' ) if len ( arg_4 ) == 1 : arg_2 [ arg_4 [ 0 ] ] = True elif len ( arg_4 ) == 2 : arg_2 [ arg_4 [ 0 ] ] = arg_4 [ 1 ] return arg_2

def Func(arg_0, arg_1):
        """Parse the VCF info field"""
        arg_2 = dict()
        for arg_3 in arg_1.split(';'):
            # Info fields may be "foo=bar" or just "foo".
            # For the first case, store key "foo" with value "bar"
            # For the second case, store key "foo" with value True.
            arg_4 = arg_3.split('=')
            # If length is one, just store as a key with value = true.
            if len(arg_4) == 1:
                arg_2[arg_4[0]] = True
            elif len(arg_4) == 2:
                arg_2[arg_4[0]] = arg_4[1]
        return arg_2


def Func ( arg_0 , arg_1 , arg_2 = './' ) : arg_3 = arg_0 . generate ( ) arg_4 = '{0}.tar.gz' . format ( arg_1 ) if not arg_2 . endswith ( '/' ) : arg_2 += '/' arg_5 = open ( '{0}{1}' . format ( arg_2 , arg_4 ) , 'wb' ) arg_5 . Func ( arg_3 . getvalue ( ) ) arg_5 . close ( )

def Func(arg_0, arg_1, arg_2='./'):
        """
        Like ``generate`` but Funcs to disk.

        :param name: file name, the tar.gz extension will be added automatically
        :param path: directory where the file will be written to, defaults to ``./``
        :returns: None
        """
        arg_3 = arg_0.generate()
        arg_4 = '{0}.tar.gz'.format(arg_1)
        if not arg_2.endswith('/'):
            arg_2 += '/'
        arg_5 = open('{0}{1}'.format(arg_2, arg_4), 'wb')
        arg_5.Func(arg_3.getvalue())
        arg_5.close()

Like ``generate`` but writes to disk.

        :param name: file name, the tar.gz extension will be added automatically
        :param path: directory where the file will be written to, defaults to ``./``
        :returns: None


return validator(*[obj.file for obj in objs])

def Func ( * arg_0 ) : from . main import Collection , Module arg_1 = { Collection : cnxml . validate_collxml , Module : cnxml . validate_cnxml , } [ type ( arg_0 [ 0 ] ) ] return arg_1 ( * [ arg_2 . file for arg_2 in arg_0 ] )

def Func(*arg_0):
    """Runs the correct validator for given `obj`ects. Assumes all same type"""
    from .main import Collection, Module
    arg_1 = {
        Collection: cnxml.validate_collxml,
        Module: cnxml.validate_cnxml,
    }[type(arg_0[0])]
    return arg_1(*[arg_2.file for arg_2 in arg_0])

Runs the correct validator for given obj ects . Assumes all same type


def Func ( * arg_0 ) : arg_1 = set ( settings . INSTALLED_APPS ) arg_1 . update ( arg_0 ) return override_settings ( INSTALLED_APPS = list ( arg_1 ) )

def Func(*arg_0):
    """
    Class decorator that makes sure the passed apps are present in
    INSTALLED_APPS.
    """
    arg_1 = set(settings.INSTALLED_APPS)
    arg_1.update(arg_0)
    return override_settings(INSTALLED_APPS=list(arg_1))

Class decorator that makes sure the passed apps are present in INSTALLED_APPS .


(context, limit=None, sorts=['id'], marker=None,
                 page_reverse=False, filters=None, fields=None)

def Func(arg_0, arg_1=None, arg_2=['id'], arg_3=None,
                 arg_4=False, arg_5=None, arg_6=None):
    """Retrieve a list of networks.

    The contents of the list depends on the identity of the user
    making the request (as indicated by the context) as well as any
    filters.
    : param context: neutron api request context
    : param filters: a dictionary with keys that are valid keys for
        a network as listed in the RESOURCE_ATTRIBUTE_MAP object
        in neutron/api/v2/attributes.py.  Values in this dictiontary
        are an iterable containing values that will be used for an exact
        match comparison for that value.  Each result returned by this
        function will have matched one of the values for each key in
        filters.
    : param fields: a list of strings that are valid keys in a
        network dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
        object in neutron/api/v2/attributes.py. Only these fields
        will be returned.
    """
    LOG.info("Func for tenant %s with filters %s, fields %s" %
             (arg_0.tenant_id, arg_5, arg_6))
    arg_5 = arg_5 or {}
    arg_7 = db_api.network_find(arg_0, arg_1, arg_2, arg_3, arg_4,
                               join_subnets=True, **arg_5) or []
    arg_7 = [v._make_network_dict(net, arg_6=arg_6) for net in arg_7]
    return arg_7


(self, query_id=None, query_fc=None, feature_names=None)

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
        '''Keyword scan for feature collections.

        This performs a keyword scan using the query given. A keyword
        scan searches for FCs with terms in each of the query's indexed
        fields.

        At least one of ``query_id`` or ``query_fc`` must be provided.
        If ``query_fc`` is ``None``, then the query is retrieved
        automatically corresponding to ``query_id``.

        :param str query_id: Optional query id.
        :param query_fc: Optional query feature collection.
        :type query_fc: :class:`dossier.fc.FeatureCollection`
        :param [str] feature_names:
          A list of feature names to retrieve. When ``None``, all
          features are retrieved. Wildcards are allowed.
        :rtype: Iterable of ``(content_id, FC)``
        '''
        arg_4 = arg_0._Func(arg_1, arg_2,
                                arg_3=arg_3)
        for arg_5 in arg_4:
            arg_6 = arg_0.fc_from_dict(arg_5['_source']['fc'])
            yield did(arg_5['_id']), arg_6


def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . _validate_pin ( arg_1 ) if arg_2 : arg_0 . gppu [ int ( arg_1 / 8 ) ] |= 1 << ( int ( arg_1 % 8 ) ) else : arg_0 . gppu [ int ( arg_1 / 8 ) ] &= ~ ( 1 << ( int ( arg_1 % 8 ) ) ) arg_0 . write_gppu ( )

def Func(arg_0, arg_1, arg_2):
        """Turn on the pull-up resistor for the specified pin if enabled is True,
        otherwise turn off the pull-up resistor.
        """
        arg_0._validate_pin(arg_1)
        if arg_2:
            arg_0.gppu[int(arg_1/8)] |= 1 << (int(arg_1%8))
        else:
            arg_0.gppu[int(arg_1/8)] &= ~(1 << (int(arg_1%8)))
        arg_0.write_gppu()

Turn on the pull - up resistor for the specified pin if enabled is True otherwise turn off the pull - up resistor .


def Func ( arg_0 ) : arg_1 = dict ( ) try : for arg_2 , arg_3 in arg_0 . request . links . items ( ) : arg_4 = urlparse ( arg_3 [ "url" ] ) arg_5 = "{path}?{query}" . format ( path = arg_4 [ 2 ] , query = arg_4 [ 4 ] ) arg_1 [ arg_2 ] = arg_5 arg_4 = list ( urlparse ( arg_0 . self_link ) ) arg_6 = "&" . join ( [ "%s=%s" % ( p [ 0 ] , p [ 1 ] ) for p in parse_qsl ( arg_4 [ 4 ] ) if p [ 0 ] != "format" ] ) arg_1 [ "self" ] = urlunparse ( [ arg_4 [ 0 ] , arg_4 [ 1 ] , arg_4 [ 2 ] , arg_4 [ 3 ] , arg_6 , arg_4 [ 5 ] ] ) return arg_1 except KeyError : return None

def Func(arg_0):
        """
        Extract self, first, next, last links from a request response
        """
        arg_1 = dict()
        try:
            for arg_2, arg_3 in arg_0.request.links.items():
                arg_4 = urlparse(arg_3["url"])
                arg_5 = "{path}?{query}".format(path=arg_4[2], query=arg_4[4])
                arg_1[arg_2] = arg_5
            # add a 'self' link
            arg_4 = list(urlparse(arg_0.self_link))
            # strip 'format' query parameter
            arg_6 = "&".join(
                [
                    "%s=%s" % (p[0], p[1])
                    for p in parse_qsl(arg_4[4])
                    if p[0] != "format"
                ]
            )
            # rebuild url fragment
            # this is a death march
            arg_1["self"] = urlunparse(
                [arg_4[0], arg_4[1], arg_4[2], arg_4[3], arg_6, arg_4[5]]
            )
            return arg_1
        except KeyError:
            # No links present, because it's a single item
            return None

Extract self first next last links from a request response


def Func(arg_0, arg_1, arg_2):
        r'''Method to Func low-pressure gas viscosity at
        tempearture `T` with a given method.

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

        Parameters
        ----------
        T : float
            Temperature of the gas, [K]
        method : str
            Name of the method to use

        Returns
        -------
        mu : float
            Viscosity of the gas at T and a low pressure, [Pa*S]
        '''
        if arg_2 == GHARAGHEIZI:
            arg_3 = Gharagheizi_gas_viscosity(arg_1, arg_0.Tc, arg_0.Pc, arg_0.MW)
        elif arg_2 == COOLPROP:
            arg_3 = CoolProp_T_dependent_property(arg_1, arg_0.CASRN, 'V', 'g')
        elif arg_2 == DIPPR_PERRY_8E:
            arg_3 = EQ102(arg_1, *arg_0.Perrys2_312_coeffs)
        elif arg_2 == VDI_PPDS:
            arg_3 =  horner(arg_0.VDI_PPDS_coeffs, arg_1)
        elif arg_2 == YOON_THODOS:
            arg_3 = Yoon_Thodos(arg_1, arg_0.Tc, arg_0.Pc, arg_0.MW)
        elif arg_2 == STIEL_THODOS:
            arg_3 = Stiel_Thodos(arg_1, arg_0.Tc, arg_0.Pc, arg_0.MW)
        elif arg_2 == LUCAS_GAS:
            arg_3 = lucas_gas(arg_1, arg_0.Tc, arg_0.Pc, arg_0.Zc, arg_0.MW, arg_0.dipole, CASRN=arg_0.CASRN)
        elif arg_2 in arg_0.tabular_data:
            arg_3 = arg_0.interpolate(arg_1, arg_2)
        return arg_3

r'''Method to calculate low-pressure gas viscosity at
        tempearture `T` with a given method.

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

        Parameters
        ----------
        T : float
            Temperature of the gas, [K]
        method : str
            Name of the method to use

        Returns
        -------
        mu : float
            Viscosity of the gas at T and a low pressure, [Pa*S]

r Method to calculate low - pressure gas viscosity at tempearture T with a given method .


def
Func
(
arg_0
,
arg_1
)
:
LOG
.
info
(
"Running scout view Func"
)
arg_2
=
arg_0
.
obj
[
'adapter'
]
arg_3
=
arg_2
.
gene_Func
(
institute_id
=
arg_1
)
if
arg_3
.
count
(
)
==
0
:
LOG
.
info
(
"No Func found"
)
arg_0
.
abort
(
)
click
.
echo
(
"#panel_name\tversion\tnr_genes\tdate"
)
for
arg_4
in
arg_3
:
click
.
echo
(
"{0}\t{1}\t{2}\t{3}"
.
format
(
arg_4
[
'panel_name'
]
,
str
(
arg_4
[
'version'
]
)
,
len
(
arg_4
[
'genes'
]
)
,
str
(
arg_4
[
'date'
]
.
strftime
(
'%Y-%m-%d'
)
)
)
)

def Func(arg_0, arg_1):
    """Show all gene Func in the database"""
    LOG.info("Running scout view Func")
    arg_2 = arg_0.obj['adapter']

    arg_3 = arg_2.gene_Func(institute_id=arg_1)
    if arg_3.count() == 0:
        LOG.info("No Func found")
        arg_0.abort()
    click.echo("#panel_name\tversion\tnr_genes\tdate")

    for arg_4 in arg_3:
        click.echo("{0}\t{1}\t{2}\t{3}".format(
            arg_4['panel_name'],
            str(arg_4['version']),
            len(arg_4['genes']),
            str(arg_4['date'].strftime('%Y-%m-%d'))
        ))


def Func(arg_0):
    '''
    This wraps varfeatures.

    '''

    try:
        (arg_1, arg_2, arg_3, arg_4, arg_5,
         arg_6, arg_7, arg_8) = arg_0
        return get_varfeatures(arg_1, arg_2,
                               arg_3=arg_3,
                               arg_4=arg_4,
                               arg_5=arg_5,
                               arg_6=arg_6,
                               arg_7=arg_7,
                               arg_8=arg_8)

    except Exception as e:
        return None


(self, members, output_file, dimension=None, start_index=None, stop_index=None, stride=None)

def Func(arg_0, arg_1, arg_2, arg_3=None, arg_4=None, arg_5=None, arg_6=None):
        """ Combine many files into a single file on disk.  Defaults to using the 'time' dimension. """
        arg_7 = None
        try:
            arg_7 = Nco()
        except BaseException:
            # This is not necessarily an import error (could be wrong PATH)
            raise ImportError("NCO not found.  The NCO python bindings are required to use 'Collection.Func'.")

        if len(arg_1) > 0 and hasattr(arg_1[0], 'path'):
            # A member DotDoct was passed in, we only need the paths
            arg_1 = [ m.path for m in arg_1 ]

        arg_8  = ['-4']  # NetCDF4
        arg_8 += ['-L', '3']  # Level 3 compression
        arg_8 += ['-h']  # Don't append to the history global attribute
        if arg_3 is not None:
            if arg_4 is None:
                arg_4 = 0
            if arg_5 is None:
                arg_5 = ''
            if arg_6 is None:
                arg_6 = 1
            arg_8 += ['-d', '{0},{1},{2},{3}'.format(arg_3, arg_4, arg_5, arg_6)]
        arg_7.ncrcat(input=arg_1, output=arg_2, arg_8=arg_8)

Combine many files into a single file on disk . Defaults to using the time dimension .


Returns all errors found with the bundle.

def Func ( arg_0 ) : try : arg_0 . _Func . extend ( arg_0 . _validator ) except StopIteration : pass return arg_0 . _Func

def Func(arg_0):
        # type: () -> List[Text]
        """
        Returns all Func found with the bundle.
        """
        try:
            arg_0._Func.extend(arg_0._validator)  # type: List[Text]
        except StopIteration:
            pass

        return arg_0._Func

Returns all errors found with the bundle .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = msaf . utils . times_to_intervals ( arg_0 ) assert len ( arg_3 ) == len ( arg_1 ) arg_4 = "" for arg_5 , arg_6 in zip ( arg_3 , arg_1 ) : arg_4 += "%.3f\t%.3f\t%s\n" % ( arg_5 [ 0 ] , arg_5 [ 1 ] , arg_6 ) with open ( arg_2 , "w" ) as f : f . write ( arg_4 [ : - 1 ] )

def Func(arg_0, arg_1, arg_2):
    """Writes results to file using the standard MIREX format.

    Parameters
    ----------
    times: np.array
        Times in seconds of the boundaries.
    labels: np.array
        Labels associated to the segments defined by the boundaries.
    out_file: str
        Output file path to save the results.
    """
    arg_3 = msaf.utils.times_to_intervals(arg_0)
    assert len(arg_3) == len(arg_1)
    arg_4 = ""
    for arg_5, arg_6 in zip(arg_3, arg_1):
        arg_4 += "%.3f\t%.3f\t%s\n" % (arg_5[0], arg_5[1], arg_6)
    with open(arg_2, "w") as f:
        f.write(arg_4[:-1])

Writes results to file using the standard MIREX format .


def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . _history_edits : return arg_0 . _history_edits [ arg_1 ] elif arg_1 == len ( arg_0 . _history ) : return unicode ( ) return arg_0 . _history [ arg_1 ]

def Func(arg_0, arg_1):
        """ Retrieves a history item, possibly with temporary edits.
        """
        if arg_1 in arg_0._history_edits:
            return arg_0._history_edits[arg_1]
        elif arg_1 == len(arg_0._history):
            return unicode()
        return arg_0._history[arg_1]

Retrieves a history item possibly with temporary edits .


def Func ( arg_0 ) : return os . path . abspath ( os . path . expandvars ( os . path . expanduser ( arg_0 ) ) )

def Func(arg_0):
    '''Returns an absolute expanded path'''

    return os.path.abspath(os.path.expandvars(os.path.expanduser(arg_0)))


def
Func
(
arg_0
,
*
arg_1
,
**
arg_2
)
:
for
arg_3
in
arg_0
.
gen_methods
(
*
arg_1
,
**
arg_2
)
:
return
arg_3
arg_4
=
'No method was found for %r on %r.'
raise
arg_0
.
DispatchError
(
arg_4
%
(
(
arg_1
,
arg_2
)
,
arg_0
.
inst
)
)

def Func(arg_0, *arg_1, **arg_2):
        '''Find the first method this input dispatches to.
        '''
        for arg_3 in arg_0.gen_methods(*arg_1, **arg_2):
            return arg_3
        arg_4 = 'No method was found for %r on %r.'
        raise arg_0.DispatchError(arg_4 % ((arg_1, arg_2), arg_0.inst))

Find the first method this input dispatches to .


def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . hooks : arg_0 . hooks . remove ( arg_1 )

def Func(arg_0, arg_1):
        """ Unregisters a hook. For further explanation, please have a look at ``register_hook``. """
        if arg_1 in arg_0.hooks:
            arg_0.hooks.remove(arg_1)

Unregisters a hook . For further explanation please have a look at register_hook .


def Func(arg_0, arg_1=None, arg_2=None):
        """Reshape input and output dimensions of operator.

        Arg:
            input_dims (tuple): new subsystem input dimensions.
            output_dims (tuple): new subsystem output dimensions.

        Returns:
            Operator: returns self with reshaped input and output dimensions.

        Raises:
            QiskitError: if combined size of all subsystem input dimension or
            subsystem output dimensions is not constant.
        """
        if arg_1 is not None:
            if np.product(arg_1) != arg_0._input_dim:
                raise QiskitError(
                    "Reshaped input_dims are incompatible with combined input dimension."
                )
            arg_0._input_dims = tuple(arg_1)
        if arg_2 is not None:
            if np.product(arg_2) != arg_0._output_dim:
                raise QiskitError(
                    "Reshaped input_dims are incompatible with combined input dimension."
                )
            arg_0._output_dims = tuple(arg_2)
        return arg_0

Reshape input and output dimensions of operator .


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

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
        """Get analog data."""
        arg_4 = []
        arg_5 = arg_4.append
        for arg_6 in range(arg_1.device_count):
            arg_3, arg_7 = QRTPacket._get_exact(
                RTAnalogDevice, arg_2, arg_3
            )
            if arg_7.sample_count > 0:
                arg_3, arg_8 = QRTPacket._get_exact(
                    RTSampleNumber, arg_2, arg_3
                )

                arg_9.format = struct.Struct(
                    arg_9.format_str % arg_7.sample_count
                )
                for arg_6 in range(arg_7.channel_count):
                    arg_3, arg_11 = QRTPacket._get_tuple(
                        arg_9, arg_2, arg_3
                    )
                    arg_5((arg_7, arg_8, arg_11))

        return arg_4


def Func(arg_0):
        """move cursor right"""
        arg_1, arg_2 = arg_0._index
        arg_0._select_index(arg_1, arg_2+1)


def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_1 . value , astroid . Call ) : return arg_2 = safe_infer ( arg_1 . value . func ) arg_3 = ( astroid . FunctionDef , astroid . UnboundMethod , astroid . BoundMethod ) if not ( isinstance ( arg_2 , arg_3 ) and arg_2 . root ( ) . fully_defined ( ) and not arg_2 . decorators ) : return if ( arg_2 . is_generator ( ) or arg_2 . is_abstract ( pass_is_abstract = False ) or isinstance ( arg_2 , astroid . AsyncFunctionDef ) ) : return arg_4 = list ( arg_2 . nodes_of_class ( astroid . Return , skip_klass = astroid . FunctionDef ) ) if not arg_4 : arg_0 . add_message ( "assignment-from-no-return" , arg_1 = arg_1 ) else : for arg_5 in arg_4 : if not ( isinstance ( arg_5 . value , astroid . Const ) and arg_5 . value . value is None or arg_5 . value is None ) : break else : arg_0 . add_message ( "assignment-from-none" , arg_1 = arg_1 )

def Func(arg_0, arg_1):
        """check that if assigning to a function call, the function is
        possibly returning something valuable
        """
        if not isinstance(arg_1.value, astroid.Call):
            return
        arg_2 = safe_infer(arg_1.value.func)
        # skip class, generator and incomplete function definition
        arg_3 = (astroid.FunctionDef, astroid.UnboundMethod, astroid.BoundMethod)
        if not (
            isinstance(arg_2, arg_3)
            and arg_2.root().fully_defined()
            and not arg_2.decorators
        ):
            return
        if (
            arg_2.is_generator()
            or arg_2.is_abstract(pass_is_abstract=False)
            or isinstance(arg_2, astroid.AsyncFunctionDef)
        ):
            return
        arg_4 = list(
            arg_2.nodes_of_class(astroid.Return, skip_klass=astroid.FunctionDef)
        )
        if not arg_4:
            arg_0.add_message("assignment-from-no-return", arg_1=arg_1)
        else:
            for arg_5 in arg_4:
                if not (
                    isinstance(arg_5.value, astroid.Const)
                    and arg_5.value.value is None
                    or arg_5.value is None
                ):
                    break
            else:
                arg_0.add_message("assignment-from-none", arg_1=arg_1)

check that if assigning to a function call the function is possibly returning something valuable


def
Func
(
arg_0
,
arg_1
:
arg_2
)
:
arg_3
=
pipes
.
Template
(
)
arg_3
.
append
(
'dot -Tpng > %s'
%
arg_1
,
'-.'
)
with
arg_3
.
open
(
'pipefile'
,
'w'
)
as
f
:
f
.
write
(
arg_0
.
to_dot
(
)
)

def Func(arg_0, arg_1: arg_2):
        """
        write a '.png' file.
        """
        arg_3 = pipes.Template()
        arg_3.append('dot -Tpng > %s' % arg_1, '-.')
        with arg_3.open('pipefile', 'w') as f:
            f.write(arg_0.to_dot())


def Func(arg_0, arg_1, arg_2):
    """
    Simple command line tool to help manage environment variables stored in a S3-like system. Facilitates editing text
    files remotely stored, as well as downloading and uploading files.
    """
    # configs this module logger to behave properly
    # logger messages will go to stderr (check __init__.py/patch.py)
    # client output should be generated with click.echo() to go to stdout
    try:
        click_log.basic_config('s3conf')
        logger.debug('Running Func entrypoint')
        if arg_1:
            if arg_0.invoked_subcommand is None:
                logger.debug('Using config file %s', config.LOCAL_CONFIG_FILE)
                config.ConfigFileResolver(config.LOCAL_CONFIG_FILE).edit(arg_2=arg_2)
                return
            else:
                raise UsageError('Edit should not be called with a subcommand.')
        # manually call help in case no relevant settings were defined
        if arg_0.invoked_subcommand is None:
            click.echo(Func.get_help(arg_0))
    except exceptions.FileDoesNotExist as e:
        raise UsageError('The file {} does not exist. Try "-c" option if you want to create it.'.format(str(e)))

Simple command line tool to help manage environment variables stored in a S3 - like system . Facilitates editing text files remotely stored as well as downloading and uploading files .


def Func(arg_0):
    """Attempts to load plugins from a list of directories."""

    arg_0 = [os.path.expanduser(d) for d in arg_0]

    for arg_1 in arg_0:
        if os.path.isdir(arg_1):
            streamlink.Func(arg_1)
        else:
            log.warning("Plugin path {0} does not exist or is not "
                        "a directory!", arg_1)

Attempts to load plugins from a list of directories .


def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_1 . endswith ( '.egg.zip' ) : arg_1 = arg_1 [ : - 4 ] if arg_1 . endswith ( '.egg' ) and '-' in arg_1 : return [ Distribution . from_location ( arg_0 , arg_1 , arg_2 ) ] if arg_1 . endswith ( '.exe' ) : arg_3 , arg_4 , arg_5 = parse_bdist_wininst ( arg_1 ) if arg_3 is not None : return interpret_distro_name ( arg_0 , arg_3 , arg_2 , arg_4 , BINARY_DIST , arg_5 ) for arg_6 in EXTENSIONS : if arg_1 . endswith ( arg_6 ) : arg_1 = arg_1 [ : - len ( arg_6 ) ] return interpret_distro_name ( arg_0 , arg_1 , arg_2 ) return [ ]

def Func(arg_0, arg_1, arg_2=None):
    """Yield egg or source distribution objects based on basename"""
    if arg_1.endswith('.egg.zip'):
        arg_1 = arg_1[:-4]    # strip the .zip
    if arg_1.endswith('.egg') and '-' in arg_1:
        # only one, unambiguous interpretation
        return [Distribution.from_location(arg_0, arg_1, arg_2)]
    if arg_1.endswith('.exe'):
        arg_3, arg_4, arg_5 = parse_bdist_wininst(arg_1)
        if arg_3 is not None:
            return interpret_distro_name(
                arg_0, arg_3, arg_2, arg_4, BINARY_DIST, arg_5
            )
    # Try source distro extensions (.zip, .tgz, etc.)
    #
    for arg_6 in EXTENSIONS:
        if arg_1.endswith(arg_6):
            arg_1 = arg_1[:-len(arg_6)]
            return interpret_distro_name(arg_0, arg_1, arg_2)
    return []


def Func ( arg_0 , arg_1 ) : if not arg_1 : arg_2 = 0 else : arg_2 = int ( round ( arg_0 / Decimal ( arg_1 ) ) ) arg_3 = timedelta ( arg_2 = arg_2 ) return str ( arg_3 )

def Func(arg_0, arg_1):
    """ Method to calculate and format an average duration safely """
    if not arg_1:
        arg_2 = 0
    else:
        arg_2 = int(round(arg_0 / Decimal(arg_1)))
    arg_3 = timedelta(arg_2=arg_2)
    return str(arg_3)


def Func(arg_0, arg_1=None):
        """Enable event loop integration with wxPython.

        Parameters
        ----------
        app : WX Application, optional.
            Running application to use.  If not given, we probe WX for an
            existing application object, and create a new one if none is found.

        Notes
        -----
        This methods sets the ``PyOS_InputHook`` for wxPython, which allows
        the wxPython to integrate with terminal based applications like
        IPython.

        If ``app`` is not given we probe for an existing one, and return it if
        found.  If no existing app is found, we create an :class:`wx.App` as
        follows::

            import wx
            app = wx.App(redirect=False, clearSigInt=False)
        """
        import wx

        arg_2 = V(wx.__version__).version

        if arg_2 < [2, 8]:
            raise ValueError("requires wxPython >= 2.8, but you have %s" % wx.__version__)

        from IPython.lib.inputhookwx import inputhook_wx
        arg_0.set_inputhook(inputhook_wx)
        arg_0._current_gui = arg_6
        import wx
        if arg_1 is None:
            arg_1 = wx.GetApp()
        if arg_1 is None:
            arg_1 = wx.App(redirect=False, clearSigInt=False)
        arg_1._in_event_loop = True
        arg_0._apps[arg_6] = arg_1
        return arg_1

Enable event loop integration with wxPython .


def
Func
(
arg_0
)
:
def
internal_decorator
(
arg_1
)
:
@
wraps
(
arg_1
)
async
def
wrapper
(
*
arg_2
,
**
arg_3
)
:
arg_4
=
await
arg_1
(
*
arg_2
,
**
arg_3
)
for
arg_5
in
arg_0
:
if
arg_4
.
startswith
(
arg_5
)
:
return
arg_4
raise
QRTCommandException
(
"Expected %s but got %s"
%
(
arg_0
,
arg_4
)
)
return
wrapper
return
internal_decorator

def Func(arg_0):
    """ Decorator to validate responses from QTM """

    def internal_decorator(arg_1):
        @wraps(arg_1)
        async def wrapper(*arg_2, **arg_3):

            arg_4 = await arg_1(*arg_2, **arg_3)

            for arg_5 in arg_0:
                if arg_4.startswith(arg_5):
                    return arg_4

            raise QRTCommandException(
                "Expected %s but got %s" % (arg_0, arg_4)
            )

        return wrapper

    return internal_decorator


def
Func
(
arg_0
,
arg_1
=
)
:
if
arg_1
is
:
arg_1
=
arg_0
.
fname
.
replace
(
".abf"
,
"_header.html"
)
arg_2
=
""
arg_2
+=
"
abfinfo() for %s.abf
"
%
arg_0
.
ID
arg_2
+=
arg_0
.
abfinfo
(
)
.
replace
(
"<"
,
"<"
)
.
replace
(
">"
,
">"
)
.
replace
(
"\n"
,
"
"
)
arg_2
+=
"
Header for %s.abf
"
%
arg_0
.
ID
arg_2
+=
pprint
.
pformat
(
arg_0
.
header
,
indent
=
1
)
arg_2
=
arg_2
.
replace
(
"\n"
,
'
'
)
.
replace
(
" "
,
" "
)
arg_2
=
arg_2
.
replace
(
r"\x00"
,
""
)
arg_2
+=
""
print
(
"WRITING HEADER TO:"
)
print
(
arg_1
)
arg_3
=
open
(
arg_1
,
'w'
)
arg_3
.
write
(
arg_2
)
arg_3
.
close
(
)

def Func(arg_0,arg_1=None):
        """read the ABF header and save it HTML formatted."""
        if arg_1 is None:
            arg_1 = arg_0.fname.replace(".abf","_header.html")
        arg_2=""
        arg_2+="
abfinfo() for %s.abf
"%arg_0.ID
        arg_2+=arg_0.abfinfo().replace("<","<").replace(">",">").replace("\n","
")
        arg_2+="
Header for %s.abf
"%arg_0.ID
        arg_2+=pprint.pformat(arg_0.header, indent=1)
        arg_2=arg_2.replace("\n",'
').replace(" "," ")
        arg_2=arg_2.replace(r"\x00","")
        arg_2+=""
        print("WRITING HEADER TO:")
        print(arg_1)
        arg_3=open(arg_1,'w')
        arg_3.write(arg_2)
        arg_3.close()

read the ABF header and save it HTML formatted .


def Func(arg_0, arg_1, arg_2):
        """
        Remove the nodes that match the pattern.
        """
        arg_3 = arg_0._filetree if arg_2 is None else arg_2

        if isinstance(arg_3, dict):
            for arg_4 in arg_3.keys():
                if isinstance(arg_3[arg_4], dict):
                    arg_5 = filter_list(arg_3[arg_4], arg_1)
                    for arg_4 in arg_5:
                        arg_3 = arg_0.Func(arg_1, arg_3[arg_4])
                        arg_3.pop(arg_4)
                else:
                    arg_3[arg_4] = filter_list(arg_3[arg_4], arg_1)
        else:
            arg_5 = set(filter_list(arg_3, arg_1))
            arg_3 = set(arg_3) - arg_5

        return arg_3

Remove the nodes that match the pattern .


def Func ( arg_0 , arg_1 ) : arg_2 = [ 'APP_' , 'RATELIMIT_' ] arg_3 = [ "'unsafe-inline'" ] for arg_4 in dir ( config ) : if any ( [ arg_4 . startswith ( arg_5 ) for arg_5 in arg_2 ] ) : arg_1 . config . setdefault ( arg_4 , getattr ( config , arg_4 ) ) if arg_1 . config [ 'DEBUG' ] : arg_1 . config . setdefault ( 'APP_DEFAULT_SECURE_HEADERS' , { } ) arg_6 = arg_1 . config [ 'APP_DEFAULT_SECURE_HEADERS' ] if arg_6 . get ( 'content_security_policy' ) != { } : arg_6 . setdefault ( 'content_security_policy' , { } ) arg_7 = arg_6 [ 'content_security_policy' ] if arg_7 . get ( 'default-src' ) != [ ] : arg_7 . setdefault ( 'default-src' , [ ] ) arg_7 [ 'default-src' ] += arg_3

def Func(arg_0, arg_1):
        """Initialize configuration.

        :param app: An instance of :class:`~flask.Flask`.
        """
        arg_2 = ['APP_', 'RATELIMIT_']
        arg_3 = ["'unsafe-inline'"]
        for arg_4 in dir(config):
            if any([arg_4.startswith(arg_5) for arg_5 in arg_2]):
                arg_1.config.setdefault(arg_4, getattr(config, arg_4))

        if arg_1.config['DEBUG']:
            arg_1.config.setdefault('APP_DEFAULT_SECURE_HEADERS', {})
            arg_6 = arg_1.config['APP_DEFAULT_SECURE_HEADERS']
            # ensure `content_security_policy` is not set to {}
            if arg_6.get('content_security_policy') != {}:
                arg_6.setdefault('content_security_policy', {})
                arg_7 = arg_6['content_security_policy']
                # ensure `default-src` is not set to []
                if arg_7.get('default-src') != []:
                    arg_7.setdefault('default-src', [])
                    # add default `content_security_policy` value when debug
                    arg_7['default-src'] += arg_3


(onset_front_id, onset_fronts, offset_fronts, onsets, offsets)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = _get_front_idxs_from_id ( arg_1 , arg_0 ) arg_6 = [ _lookup_offset_by_onset_idx ( i , arg_3 , arg_4 ) for i in arg_5 ] arg_7 = set ( [ int ( arg_2 [ f , i ] ) for f , i in arg_6 ] ) arg_7 = [ id for id in arg_7 if id != 0 ] if arg_7 : arg_8 = _choose_front_id_from_candidates ( arg_7 , arg_2 , arg_6 ) else : arg_8 = _get_offset_front_id_after_onset_front ( arg_0 , arg_1 , arg_2 ) return arg_8

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """
    Find all offset fronts which are composed of at least one offset which corresponds to one of the onsets in the
    given onset front.
    The offset front which contains the most of such offsets is the match.
    If there are no such offset fronts, return -1.
    """
    # find all offset fronts which are composed of at least one offset which corresponds to one of the onsets in the onset front
    # the offset front which contains the most of such offsets is the match

    # get the onsets that make up front_id
    arg_5 = _get_front_idxs_from_id(arg_1, arg_0)

    # get the offsets that match the onsets in front_id
    arg_6 = [_lookup_offset_by_onset_idx(i, arg_3, arg_4) for i in arg_5]

    # get all offset_fronts which contain at least one of these offsets
    arg_7 = set([int(arg_2[f, i]) for f, i in arg_6])

    # It is possible that offset_idxs contains offset indexes that correspond to offsets that did not
    # get formed into a front - those will have a front ID of 0. Remove them.
    arg_7 = [id for id in arg_7 if id != 0]

    if arg_7:
        arg_8 = _choose_front_id_from_candidates(arg_7, arg_2, arg_6)
    else:
        arg_8 = _get_offset_front_id_after_onset_front(arg_0, arg_1, arg_2)

    return arg_8

Find all offset fronts which are composed of at least one offset which corresponds to one of the onsets in the given onset front . The offset front which contains the most of such offsets is the match . If there are no such offset fronts return - 1 .


(model, reaction_list=None, method="fba",
                             solution=None, processes=None, **kwargs)

return _multi_deletion(
        model, 'reaction',
        element_lists=_element_lists(model.reactions, reaction_list),
        method=method, solution=solution, processes=processes, **kwargs)

def Func(arg_0, arg_1=None, arg_2="fba",
                             arg_3=None, arg_4=None, **arg_5):
    """
    Knock out each reaction from a given list.

    Parameters
    ----------
    model : cobra.Model
        The metabolic model to perform deletions in.
    reaction_list : iterable, optional
        ``cobra.Reaction``s to be deleted. If not passed,
        all the reactions from the model are used.
    method: {"fba", "moma", "linear moma", "room", "linear room"}, optional
        Method used to predict the growth rate.
    solution : cobra.Solution, optional
        A previous solution to use as a reference for (linear) MOMA or ROOM.
    processes : int, optional
        The number of parallel processes to run. Can speed up the computations
        if the number of knockouts to perform is large. If not passed,
        will be set to the number of CPUs found.
    kwargs :
        Keyword arguments are passed on to underlying simulation functions
        such as ``add_room``.

    Returns
    -------
    pandas.DataFrame
        A representation of all single reaction deletions. The columns are
        'growth' and 'status', where

        index : frozenset([str])
            The reaction identifier that was knocked out.
        growth : float
            The growth rate of the adjusted model.
        status : str
            The solution's status.

    """
    return _multi_deletion(
        arg_0, 'reaction',
        element_lists=_element_lists(arg_0.reactions, arg_1),
        arg_2=arg_2, arg_3=arg_3, arg_4=arg_4, **arg_5)

Knock out each reaction from a given list .


def Func ( arg_0 , arg_1 ) : if 'connect_urls' in arg_1 : if arg_1 [ 'connect_urls' ] : arg_2 = [ ] for arg_3 in arg_1 [ 'connect_urls' ] : arg_4 = urlparse ( "nats://%s" % arg_3 ) arg_5 = Srv ( arg_4 ) arg_5 . discovered = True arg_7 = True for arg_8 in arg_0 . _server_pool : if arg_4 . netloc == arg_8 . uri . netloc : arg_7 = False if arg_7 : arg_2 . append ( arg_5 ) if arg_0 . options [ "dont_randomize" ] is not True : shuffle ( arg_2 ) for arg_5 in arg_2 : arg_0 . _server_pool . append ( arg_5 )

def Func(arg_0, arg_1):
        """
        Process INFO lines sent by the server to reconfigure client
        with latest updates from cluster to enable server discovery.
        """
        if 'connect_urls' in arg_1:
            if arg_1['connect_urls']:
                arg_2 = []
                for arg_3 in arg_1['connect_urls']:
                    arg_4 = urlparse("nats://%s" % arg_3)
                    arg_5 = Srv(arg_4)
                    arg_5.discovered = True

                    # Filter for any similar server in the server pool already.
                    arg_7 = True
                    for arg_8 in arg_0._server_pool:
                        if arg_4.netloc == arg_8.uri.netloc:
                            arg_7 = False
                    if arg_7:
                        arg_2.append(arg_5)

                if arg_0.options["dont_randomize"] is not True:
                    shuffle(arg_2)
                for arg_5 in arg_2:
                    arg_0._server_pool.append(arg_5)

Process INFO lines sent by the server to reconfigure client with latest updates from cluster to enable server discovery .


def Func ( arg_0 , arg_1 ) : if hasattr ( arg_1 , "locals_type" ) : return arg_1 . locals_type = collections . defaultdict ( list ) if arg_0 . tag : arg_1 . uid = arg_0 . generate_id ( )

def Func(arg_0, arg_1):
        """visit an astroid.Function node

         * set the locals_type mapping
         * optionally tag the node with a unique id
        """
        if hasattr(arg_1, "locals_type"):
            return
        arg_1.locals_type = collections.defaultdict(list)
        if arg_0.tag:
            arg_1.uid = arg_0.generate_id()


def Func ( arg_0 , arg_1 ) : try : arg_2 = open ( USB_SYS_PREFIX + arg_0 + "/" + arg_1 ) return arg_2 . readline ( ) . rstrip ( "\n" ) except IOError : return None

def Func(arg_0, arg_1):
    """
    Read attribute from sysfs and return as string
    """
    try:
        arg_2 = open(USB_SYS_PREFIX + arg_0 + "/" + arg_1)
        return arg_2.readline().rstrip("\n")
    except IOError:
        return None


def Func(arg_0):
        """
        Redraws the background and contents, including scrollbar.

        This method will also check the scrollbar for any movement and will be automatically called on movement of the slider.
        """
        arg_1 = arg_0._scrollbar.n
        arg_0.offset_y = -arg_1 # Causes the content to move in the opposite direction of the slider

        # Size of scrollbar
        arg_3=24 # Currently constant, TODO: add dynamic sx of scrollbar
        arg_4=arg_0.size[1]
        # Pos of scrollbar
        arg_5=arg_0.size[0]-arg_3
        arg_6=0 # Currently constant, TODO: add dynamic y-pos of scrollbar

        # Dynamic pos/size may be added via align/lambda/etc.

        # Note that the values are written to the _* variant of the attribute to avoid 3 uneccessary redraws
        arg_0._scrollbar._size = arg_3,arg_4
        arg_0._scrollbar._pos = arg_5,arg_6
        arg_0._scrollbar._nmax = arg_0.content_height

        super(ScrollableContainer,arg_0).Func()

Redraws the background and contents including scrollbar . This method will also check the scrollbar for any movement and will be automatically called on movement of the slider .


def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Write the data encoding the Create response payload to a buffer.

        Args:
            output_buffer (stream): A data buffer in which to encode object
                data, supporting a Func method.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be encoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            InvalidField: Raised if the object type attribute or unique
                identifier is not defined.
        """
        arg_6 = utils.BytearrayStream()

        if arg_0._object_type:
            arg_0._object_type.Func(arg_6, arg_2=arg_2)
        else:
            raise exceptions.InvalidField(
                "The Create response payload is missing the object type field."
            )

        if arg_0._unique_identifier:
            arg_0._unique_identifier.Func(
                arg_6,
                arg_2=arg_2
            )
        else:
            raise exceptions.InvalidField(
                "The Create response payload is missing the unique identifier "
                "field."
            )

        if arg_2 < arg_3.KMIPVersion.KMIP_2_0:
            if arg_0._template_attribute:
                arg_0._template_attribute.Func(
                    arg_6,
                    arg_2=arg_2
                )

        arg_0.length = arg_6.length()
        super(CreateResponsePayload, arg_0).Func(
            arg_1,
            arg_2=arg_2
        )
        arg_1.Func(arg_6.buffer)

Write the data encoding the Create response payload to a buffer.

        Args:
            output_buffer (stream): A data buffer in which to encode object
                data, supporting a write method.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be encoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            InvalidField: Raised if the object type attribute or unique
                identifier is not defined.

Write the data encoding the Create response payload to a buffer .


def Func ( arg_0 , arg_1 ) : arg_0 . execute_batch_tasks ( arg_1 , arg_0 . conf [ 'sortinghat' ] [ 'sleep_for' ] , arg_0 . conf [ 'general' ] [ 'min_update_delay' ] , False )

def Func(arg_0, arg_1):
        """
            Just a wrapper to the execute_batch_tasks method
        """
        arg_0.execute_batch_tasks(arg_1,
                                 arg_0.conf['sortinghat']['sleep_for'],
                                 arg_0.conf['general']['min_update_delay'], False)


(name, owner=None, owner_host='localhost', charset='utf8',
                    collate='utf8_general_ci', **kwargs)

def Func(arg_0, arg_1=None, arg_2='localhost', arg_3='utf8',
                    arg_4='utf8_general_ci', **arg_5):
    """
    Create a MySQL database.

    Example::

        import burlap

        # Create DB if it does not exist
        if not burlap.mysql.database_exists('myapp'):
            burlap.mysql.Func('myapp', owner='dbuser')

    """
    with settings(hide('running')):

        query("CREATE DATABASE %(name)s CHARACTER SET %(charset)s COLLATE %(collate)s;" % {
            'name': arg_0,
            'charset': arg_3,
            'collate': arg_4
        }, **arg_5)

        if arg_1:
            query("GRANT ALL PRIVILEGES ON %(name)s.* TO '%(owner)s'@'%(owner_host)s' WITH GRANT OPTION;" % {
                'name': arg_0,
                'owner': arg_1,
                'owner_host': arg_2
            }, **arg_5)

    puts("Created MySQL database '%s'." % arg_0)

Create a MySQL database.

    Example::

        import burlap

        # Create DB if it does not exist
        if not burlap.mysql.database_exists('myapp'):
            burlap.mysql.create_database('myapp', owner='dbuser')


def
Func
(
arg_0
,
arg_1
,
arg_2
=
False
)
:
if
not
arg_0
:
arg_0
=
arg_1
.
copy
(
)
return
arg_0
if
not
isinstance
(
arg_0
,
dict
)
:
raise
TypeError
(
'Value not dict type'
)
if
len
(
arg_0
)
>
255
:
raise
ValueError
(
'More than 255 values defined'
)
for
arg_3
in
arg_0
.
keys
(
)
:
if
not
isinstance
(
arg_3
,
int
)
:
raise
TypeError
(
'Index not int type'
)
if
arg_3
<
0
or
arg_3
>
255
:
raise
ValueError
(
'Index value out of range'
)
if
not
arg_2
:
arg_0
.
update
(
arg_1
)
return
arg_0

def Func(arg_0, arg_1, arg_2=False):
        '''Update algorithm definition type dictionaries'''

        if not arg_0:
            arg_0 = arg_1.copy()
            return arg_0

        if not isinstance(arg_0, dict):
            raise TypeError('Value not dict type')
        if len(arg_0) > 255:
            raise ValueError('More than 255 values defined')
        for arg_3 in arg_0.keys():
            if not isinstance(arg_3, int):
                raise TypeError('Index not int type')
            if arg_3 < 0 or arg_3 > 255:
                raise ValueError('Index value out of range')

        if not arg_2:
            arg_0.update(arg_1)

        return arg_0


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = ERROR_MESSAGES [ arg_1 ] . format ( arg_2 ) arg_0 . logger . log ( arg_3 ) arg_0 . error = True

def Func(arg_0, arg_1, arg_2):
        """Reports a value error using ERROR_MESSAGES dict.
        key - key to use for ERROR_MESSAGES.
        bad_value - is passed to format which is called on what key maps to
        in ERROR_MESSAGES.
        """
        arg_3 = ERROR_MESSAGES[arg_1].format(arg_2)
        arg_0.logger.log(arg_3)
        arg_0.error = True

Reports a value error using ERROR_MESSAGES dict . key - key to use for ERROR_MESSAGES . bad_value - is passed to format which is called on what key maps to in ERROR_MESSAGES .


def Func ( arg_0 ) : try : return arg_0 [ 'user' ] except KeyError : pass try : arg_1 = arg_0 [ 'request' ] return arg_1 . user except ( KeyError , AttributeError ) : pass return None

def Func(arg_0):
    """
    Get the user instance from the template context, if possible.

    If the context does not contain a `request` or `user` attribute,
    `None` is returned.
    """
    try:
        return arg_0['user']
    except KeyError:
        pass
    try:
        arg_1 = arg_0['request']
        return arg_1.user
    except (KeyError, AttributeError):
        pass
    return None

Get the user instance from the template context if possible .


def Func ( arg_0 , arg_1 = True ) : arg_0 . _load ( ) if arg_1 : arg_0 . users . sort ( key = operator . itemgetter ( "name" ) ) return arg_0 . users

def Func(arg_0, arg_1=True):
        """ Get list of users in the room.

        Kwargs:
            sort (bool): If True, sort rooms by name

        Returns:
            array. List of users
        """
        arg_0._load()
        if arg_1:
            arg_0.users.sort(key=operator.itemgetter("name"))
        return arg_0.users


def Func(arg_0, arg_1=None):
    """
    Recursively finds the most recent timestamp in the given directory.
    """
    arg_1 = arg_1 or []
    if not isinstance(arg_0, six.string_types):
        return
    arg_2 = ''
    if arg_1:
        assert isinstance(arg_1, (tuple, list))
        arg_2 = ' '.join("! -name '%s'" % _ for _ in arg_1)
    arg_3 = 'find "'+arg_0+'" ' + arg_2 + ' -type f -printf "%T@ %p\n" | sort -n | tail -1 | cut -f 1 -d " "'
         #'find '+path+' -type f -printf "%T@ %p\n" | sort -n | tail -1 | cut -d " " -f1
    arg_4 = subprocess.check_output(arg_3, shell=True)
    # Note, we round now to avoid rounding errors later on where some formatters
    # use different decimal contexts.
    try:
        arg_4 = round(float(arg_4), 2)
    except ValueError:
        return
    return arg_4

Recursively finds the most recent timestamp in the given directory .


def Func ( arg_0 , arg_1 : arg_2 ) : while True : if arg_0 is None : return None if arg_1 == 0 : return arg_0 arg_1 -= 1 arg_0 = rest ( arg_0 )

def Func(arg_0, arg_1: arg_2):
    """Returns the nth rest sequence of coll, or coll if i is 0."""
    while True:
        if arg_0 is None:
            return None
        if arg_1 == 0:
            return arg_0
        arg_1 -= 1
        arg_0 = rest(arg_0)

Returns the nth rest sequence of coll or coll if i is 0 .


def Func(arg_0, **arg_1):
    """
    Returns tuple with form data and files
    """
    arg_2 = {}
    arg_3 = {}

    arg_4, arg_5 = split_model_kwargs(arg_1)

    for arg_6, arg_7 in arg_0.base_fields.iteritems():
        if arg_6 in arg_4:
            arg_2[arg_6] = arg_1[arg_6]
        else:
            arg_2[arg_6] = any_form_field(arg_7, **arg_5[arg_6])

    return arg_2, arg_3


(cls, proc: HWProcess, ctx: ResourceContext)

def Func(arg_0, arg_1: Func, arg_3: arg_4) -> None:
        """
        Gues resource usage by HWProcess
        """
        arg_5 = arg_3.seen
        for arg_6 in arg_1.statements:
            arg_7 = arg_6._enclosed_for
            arg_8 = arg_6._is_completly_event_dependent
            arg_9 = arg_6._now_is_event_dependent
            arg_10 = arg_8 or arg_9

            arg_11 = count_mux_inputs_for_outputs(arg_6)
            for arg_12 in arg_6._outputs:
                if arg_12 in arg_5:
                    continue

                arg_13 = arg_11[arg_12]
                if isinstance(arg_12._dtype, HArray):
                    assert arg_13 == 1, (arg_12, arg_13, " only one ram port per HWProcess")
                    for arg_14 in walk_assignments(arg_6, arg_12):
                        assert len(arg_14.indexes) == 1, "one address per RAM port"
                        arg_15 = arg_14.indexes[0]
                    arg_3.registerRAM_write_port(arg_12, arg_15, arg_10)
                elif arg_10:
                    arg_3.registerFF(arg_12)
                    if arg_13 > 1:
                        arg_3.registerMUX(arg_6, arg_12, arg_13)
                elif arg_12 not in arg_7:
                    arg_3.registerLatch(arg_12)
                    if arg_13 > 1:
                        arg_3.registerMUX(arg_6, arg_12, arg_13)
                elif arg_13 > 1:
                    arg_3.registerMUX(arg_6, arg_12, arg_13)
                else:
                    # just a connection
                    continue

            if isinstance(arg_6, SwitchContainer):
                arg_16 = set([arg_6.switchOn._eq(c[0]) for c in arg_6.cases])
                arg_17 = chain(
                    [sig for sig in arg_6._inputs if sig not in arg_16], [arg_6.switchOn])
            else:
                arg_17 = arg_6._inputs

            for arg_13 in arg_17:
                # discover only internal signals in this statements for
                # operators
                if not arg_13.hidden or arg_13 in arg_5:
                    continue

                arg_0.HWProcess_operators(arg_13, arg_3, arg_10)


(self, start_time_ut, lat, lon,
                            max_duration_ut=4 * 3600,
                            min_transfer_time=30,
                            use_shapes=False)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = 4 * 3600 , arg_5 = 30 , arg_6 = False ) : from gtfspy . spreading . spreader import Spreader arg_7 = Spreader ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 ) return arg_7 . spread ( )

def Func(arg_0, arg_1, arg_2, arg_3,
                            arg_4=4 * 3600,
                            arg_5=30,
                            arg_6=False):
        """
        Starting from a specific point and time, get complete single source
        shortest path spreading dynamics as trips, or "events".

        Parameters
        ----------
        start_time_ut: number
            Start time of the spreading.
        lat: float
            latitude of the spreading seed location
        lon: float
            longitude of the spreading seed location
        max_duration_ut: int
            maximum duration of the spreading process (in seconds)
        min_transfer_time : int
            minimum transfer time in seconds
        use_shapes : bool
            whether to include shapes

        Returns
        -------
        trips: dict
            trips['trips'] is a list whose each element (e.g. el = trips['trips'][0])
            is a dict with the following properties:
                el['lats'] : list of latitudes
                el['lons'] : list of longitudes
                el['times'] : list of passage_times
                el['route_type'] : type of vehicle as specified by GTFS, or -1 if walking
                el['name'] : name of the route
        """
        from gtfspy.spreading.spreader import Spreader
        arg_7 = Spreader(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6)
        return arg_7.spread()

Starting from a specific point and time get complete single source shortest path spreading dynamics as trips or events .


def Func ( arg_0 , arg_1 ) : def toFuncs ( arg_2 ) : arg_3 = [ ] arg_4 = [ ] for arg_5 , arg_6 in arg_2 : arg_3 . append ( arg_5 ) arg_4 . append ( arg_6 ) if arg_1 and 0 <= arg_1 <= len ( arg_3 ) : yield ( arg_3 , asarray ( arg_4 ) ) arg_3 , arg_4 = [ ] , [ ] if arg_3 : yield ( arg_3 , asarray ( arg_4 ) ) arg_7 = arg_0 . _rdd . mapPartitions ( toFuncs ) return arg_0 . _constructor ( arg_7 ) . __finalize__ ( arg_0 )

def Func(arg_0, arg_1):
        """
        Make an intermediate RDD where all records are combined into a
        list of keys and larger ndarray along a new 0th dimension.
        """
        def toFuncs(arg_2):
            arg_3 = []
            arg_4 = []
            for arg_5, arg_6 in arg_2:
                arg_3.append(arg_5)
                arg_4.append(arg_6)
                if arg_1 and 0 <= arg_1 <= len(arg_3):
                    yield (arg_3, asarray(arg_4))
                    arg_3, arg_4 = [], []
            if arg_3:
                yield (arg_3, asarray(arg_4))

        arg_7 = arg_0._rdd.mapPartitions(toFuncs)
        return arg_0._constructor(arg_7).__finalize__(arg_0)

Make an intermediate RDD where all records are combined into a list of keys and larger ndarray along a new 0th dimension .


(
            self, resource_group_name, if_match, provisioning_service_name, certificate_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, custom_headers=None, raw=False, **operation_config)

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
=
,
arg_14
=
False
,
**
arg_15
)
:
arg_16
=
arg_0
.
Func
.
metadata
[
'url'
]
arg_17
=
{
'subscriptionId'
:
arg_0
.
_serialize
.
url
(
"self.config.subscription_id"
,
arg_0
.
config
.
subscription_id
,
'str'
)
,
'resourceGroupName'
:
arg_0
.
_serialize
.
url
(
"resource_group_name"
,
arg_1
,
'str'
)
,
'provisioningServiceName'
:
arg_0
.
_serialize
.
url
(
"provisioning_service_name"
,
arg_3
,
'str'
)
,
'certificateName'
:
arg_0
.
_serialize
.
url
(
"certificate_name"
,
arg_4
,
'str'
)
}
arg_16
=
arg_0
.
_client
.
format_url
(
arg_16
,
**
arg_17
)
arg_18
=
{
}
if
arg_5
is
not
:
arg_18
[
'certificate.name'
]
=
arg_0
.
_serialize
.
query
(
"certificatename"
,
arg_5
,
'str'
)
if
arg_6
is
not
:
arg_18
[
'certificate.rawBytes'
]
=
arg_0
.
_serialize
.
query
(
"certificateraw_bytes"
,
arg_6
,
'bytearray'
)
if
arg_7
is
not
:
arg_18
[
'certificate.isVerified'
]
=
arg_0
.
_serialize
.
query
(
"certificateis_verified"
,
arg_7
,
'bool'
)
if
arg_8
is
not
:
arg_18
[
'certificate.purpose'
]
=
arg_0
.
_serialize
.
query
(
"certificatepurpose"
,
arg_8
,
'str'
)
if
arg_9
is
not
:
arg_18
[
'certificate.created'
]
=
arg_0
.
_serialize
.
query
(
"certificatecreated"
,
arg_9
,
'iso-8601'
)
if
arg_10
is
not
:
arg_18
[
'certificate.lastUpdated'
]
=
arg_0
.
_serialize
.
query
(
"certificatelast_updated"
,
arg_10
,
'iso-8601'
)
if
arg_11
is
not
:
arg_18
[
'certificate.hasPrivateKey'
]
=
arg_0
.
_serialize
.
query
(
"certificatehas_private_key"
,
arg_11
,
'bool'
)
if
arg_12
is
not
:
arg_18
[
'certificate.nonce'
]
=
arg_0
.
_serialize
.
query
(
"certificatenonce"
,
arg_12
,
'str'
)
arg_18
[
'api-version'
]
=
arg_0
.
_serialize
.
query
(
"self.api_version"
,
arg_0
.
api_version
,
'str'
)
arg_19
=
{
}
arg_19
[
'Content-Type'
]
=
'application/json; charset=utf-8'
if
arg_0
.
config
.
generate_client_request_id
:
arg_19
[
'x-ms-client-request-id'
]
=
str
(
uuid
.
uuid1
(
)
)
if
arg_13
:
arg_19
.
update
(
arg_13
)
arg_19
[
'If-Match'
]
=
arg_0
.
_serialize
.
header
(
"if_match"
,
arg_2
,
'str'
)
if
arg_0
.
config
.
accept_language
is
not
:
arg_19
[
'accept-language'
]
=
arg_0
.
_serialize
.
header
(
"self.config.accept_language"
,
arg_0
.
config
.
accept_language
,
'str'
)
arg_20
=
arg_0
.
_client
.
Func
(
arg_16
,
arg_18
)
arg_21
=
arg_0
.
_client
.
send
(
arg_20
,
arg_19
,
stream
=
False
,
**
arg_15
)
if
arg_21
.
status_code
not
in
[
200
,
204
]
:
raise
models
.
ErrorDetailsException
(
arg_0
.
_deserialize
,
arg_21
)
if
arg_14
:
arg_22
=
ClientRawResponse
(
,
arg_21
)
return
arg_22

def Func(
            arg_0, arg_1, arg_2, arg_3, arg_4, arg_5=None, arg_6=None, arg_7=None, arg_8=None, arg_9=None, arg_10=None, arg_11=None, arg_12=None, arg_13=None, arg_14=False, **arg_15):
        """Delete the Provisioning Service Certificate.

        Deletes the specified certificate assosciated with the Provisioning
        Service.

        :param resource_group_name: Resource group identifier.
        :type resource_group_name: str
        :param if_match: ETag of the certificate
        :type if_match: str
        :param provisioning_service_name: The name of the provisioning
         service.
        :type provisioning_service_name: str
        :param certificate_name: This is a mandatory field, and is the logical
         name of the certificate that the provisioning service will access by.
        :type certificate_name: str
        :param certificatename: This is optional, and it is the Common Name of
         the certificate.
        :type certificatename: str
        :param certificateraw_bytes: Raw data within the certificate.
        :type certificateraw_bytes: bytearray
        :param certificateis_verified: Indicates if certificate has been
         verified by owner of the private key.
        :type certificateis_verified: bool
        :param certificatepurpose: A description that mentions the purpose of
         the certificate. Possible values include: 'clientAuthentication',
         'serverAuthentication'
        :type certificatepurpose: str or
         ~azure.mgmt.iothubprovisioningservices.models.CertificatePurpose
        :param certificatecreated: Time the certificate is created.
        :type certificatecreated: datetime
        :param certificatelast_updated: Time the certificate is last updated.
        :type certificatelast_updated: datetime
        :param certificatehas_private_key: Indicates if the certificate
         contains a private key.
        :type certificatehas_private_key: bool
        :param certificatenonce: Random number generated to indicate Proof of
         Possession.
        :type certificatenonce: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorDetailsException<azure.mgmt.iothubprovisioningservices.models.ErrorDetailsException>`
        """
        # Construct URL
        arg_16 = arg_0.Func.metadata['url']
        arg_17 = {
            'subscriptionId': arg_0._serialize.url("self.config.subscription_id", arg_0.config.subscription_id, 'str'),
            'resourceGroupName': arg_0._serialize.url("resource_group_name", arg_1, 'str'),
            'provisioningServiceName': arg_0._serialize.url("provisioning_service_name", arg_3, 'str'),
            'certificateName': arg_0._serialize.url("certificate_name", arg_4, 'str')
        }
        arg_16 = arg_0._client.format_url(arg_16, **arg_17)

        # Construct parameters
        arg_18 = {}
        if arg_5 is not None:
            arg_18['certificate.name'] = arg_0._serialize.query("certificatename", arg_5, 'str')
        if arg_6 is not None:
            arg_18['certificate.rawBytes'] = arg_0._serialize.query("certificateraw_bytes", arg_6, 'bytearray')
        if arg_7 is not None:
            arg_18['certificate.isVerified'] = arg_0._serialize.query("certificateis_verified", arg_7, 'bool')
        if arg_8 is not None:
            arg_18['certificate.purpose'] = arg_0._serialize.query("certificatepurpose", arg_8, 'str')
        if arg_9 is not None:
            arg_18['certificate.created'] = arg_0._serialize.query("certificatecreated", arg_9, 'iso-8601')
        if arg_10 is not None:
            arg_18['certificate.lastUpdated'] = arg_0._serialize.query("certificatelast_updated", arg_10, 'iso-8601')
        if arg_11 is not None:
            arg_18['certificate.hasPrivateKey'] = arg_0._serialize.query("certificatehas_private_key", arg_11, 'bool')
        if arg_12 is not None:
            arg_18['certificate.nonce'] = arg_0._serialize.query("certificatenonce", arg_12, 'str')
        arg_18['api-version'] = arg_0._serialize.query("self.api_version", arg_0.api_version, 'str')

        # Construct headers
        arg_19 = {}
        arg_19['Content-Type'] = 'application/json; charset=utf-8'
        if arg_0.config.generate_client_request_id:
            arg_19['x-ms-client-request-id'] = str(uuid.uuid1())
        if arg_13:
            arg_19.update(arg_13)
        arg_19['If-Match'] = arg_0._serialize.header("if_match", arg_2, 'str')
        if arg_0.config.accept_language is not None:
            arg_19['accept-language'] = arg_0._serialize.header("self.config.accept_language", arg_0.config.accept_language, 'str')

        # Construct and send request
        arg_20 = arg_0._client.Func(arg_16, arg_18)
        arg_21 = arg_0._client.send(arg_20, arg_19, stream=False, **arg_15)

        if arg_21.status_code not in [200, 204]:
            raise models.ErrorDetailsException(arg_0._deserialize, arg_21)

        if arg_14:
            arg_22 = ClientRawResponse(None, arg_21)
            return arg_22

Delete the Provisioning Service Certificate .


def Func(arg_0: arg_1, arg_2: arg_3[arg_4, None]):
    """
    Construct SimBitsT with cache
    """
    arg_5 = (arg_0, arg_2)
    try:
        return arg_7[arg_5]
    except KeyError:
        arg_6 = SimBitsT(arg_0, arg_2)
        arg_7[arg_5] = arg_6
        return arg_6


def Func(arg_0, arg_1):
    """
    Create a deep clone of the frame ``data``.

    :param data: an H2OFrame to be cloned
    :param xid: (internal) id to be assigned to the new frame.
    :returns: new :class:`H2OFrame` which is the clone of the passed frame.
    """
    assert_is_type(arg_0, H2OFrame)
    assert_is_type(arg_1, str)
    assert_satisfies(arg_1, arg_1 != arg_0.frame_id)
    check_frame_id(arg_1)
    arg_2 = arg_0.apply(lambda x: x)
    arg_2._ex = ExprNode("assign", arg_1, arg_2)._eval_driver(False)
    arg_2._ex._cache._id = arg_1
    arg_2._ex._children = None
    return arg_2


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if arg_0 : if arg_2 : return True if arg_1 : if arg_2 : return True if len ( arg_3 ) >= 2 : return True if arg_2 : if len ( arg_2 ) >= 3 : return True elif len ( arg_2 ) >= 2 : if len ( arg_3 ) >= 2 : return True elif len ( arg_3 ) >= 4 : return True return False

def Func(arg_0, arg_1, arg_2, arg_3):
    """Check if the criterias for Likely Pathogenic is fullfilled

    The following are descriptions of Likely Pathogenic clasification from ACMG paper:

    Likely pathogenic
      (i) 1 Very strong (PVS1) AND 1 moderate (PM1– PM6) OR
      (ii) 1 Strong (PS1–PS4) AND 1–2 moderate (PM1–PM6) OR
      (iii) 1 Strong (PS1–PS4) AND ≥2 supporting (PP1–PP5) OR
      (iv)  ≥3 Moderate (PM1–PM6) OR
      (v) 2 Moderate (PM1–PM6) AND ≥2 supporting (PP1–PP5) OR
      (vi) 1 Moderate (PM1–PM6) AND ≥4 supportin (PP1–PP5)

    Args:
        pvs(bool): Pathogenic Very Strong
        ps_terms(list(str)): Pathogenic Strong terms
        pm_terms(list(str)): Pathogenic Moderate terms
        pp_terms(list(str)): Pathogenic Supporting terms

    Returns:
        bool: if classification indicates Likely Pathogenic level
    """
    if arg_0:
        # Likely Pathogenic (i):
        if arg_2:
            return True

    if arg_1:
        # Likely Pathogenic (ii):
        if arg_2:
            return True
        # Likely Pathogenic (iii):
        if len(arg_3) >= 2:
            return True

    if arg_2:
        # Likely Pathogenic (iv):
        if len(arg_2) >= 3:
            return True
        # Likely Pathogenic (v):
        elif len(arg_2) >= 2:
            if len(arg_3) >= 2:
                return True
        # Likely Pathogenic (vi):
        elif len(arg_3) >= 4:
            return True

    return False


(self, obj, isInsert, conn, pipeline=None)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None):
		'''
			Func - Internal function to save a single object. Don't call this directly.
			            Use "save" instead.

			  If a pipeline is provided, the operations (setting values, updating indexes, etc)
			    will be queued into that pipeline.
			  Otherwise, everything will be executed right away.

			  @param obj - Object to save
			  @param isInsert - Bool, if insert or update. Either way, obj._id is expected to be set.
			  @param conn - Redis connection
			  @param pipeline - Optional pipeline, if present the items will be queued onto it. Otherwise, go directly to conn.
		'''

		if arg_4 is None:
			arg_4 = arg_3

		arg_5 = arg_1.asDict(forStorage=True)
		arg_6 = arg_0._get_key_for_id(arg_1._id)

		if arg_2 is True:
			for arg_7 in arg_0.fields:

				arg_8 = arg_5.get(arg_7, arg_7.getDefaultValue())

				arg_4.hset(arg_6, arg_7, arg_8)

				# Update origData with the new data
				if arg_8 == IR_NULL_STR:
					arg_1._origData[arg_7] = irNull
				else:
					arg_1._origData[arg_7] = object.__getattribute__(arg_1, str(arg_7))

			arg_0._add_id_to_keys(arg_1._id, arg_4)

			for arg_10 in arg_0.indexedFields:
				arg_0._add_id_to_index(arg_10, arg_1._id, arg_1._origData[arg_10], arg_4)
		else:
			arg_11 = arg_1.getUpdatedFields()
			for arg_7, arg_8 in arg_11.items():
				(arg_12, arg_13) = arg_8

				arg_14 = arg_7.toStorage(arg_12)
				arg_15 = arg_7.toStorage(arg_13)

				arg_4.hset(arg_6, arg_7, arg_15)

				if arg_7 in arg_0.indexedFields:
					arg_0._rem_id_from_index(arg_7, arg_1._id, arg_14, arg_4)
					arg_0._add_id_to_index(arg_7, arg_1._id, arg_15, arg_4)

				# Update origData with the new data
				arg_1._origData[arg_7] = arg_13

_doSave - Internal function to save a single object. Don't call this directly.
			            Use "save" instead.

			  If a pipeline is provided, the operations (setting values, updating indexes, etc)
			    will be queued into that pipeline.
			  Otherwise, everything will be executed right away.

			  @param obj - Object to save
			  @param isInsert - Bool, if insert or update. Either way, obj._id is expected to be set.
			  @param conn - Redis connection
			  @param pipeline - Optional pipeline, if present the items will be queued onto it. Otherwise, go directly to conn.

_doSave - Internal function to save a single object . Don t call this directly . Use save instead .


return Image.frombytes(
            'RGB', (width, height), pixel_bytes, 'raw', 'RGB', pb.get_rowstride(), 1)

def
Func
(
arg_0
,
arg_1
=
)
:
arg_2
=
Gdk
.
get_default_root_window
(
)
if
arg_1
is
not
:
arg_3
=
[
arg_1
[
0
]
,
arg_1
[
1
]
,
arg_1
[
2
]
arg_1
[
0
]
,
arg_1
[
3
]
arg_1
[
1
]
]
else
:
arg_3
=
arg_2
.
get_geometry
(
)
arg_4
=
Gdk
.
pixbuf_get_from_window
(
arg_2
,
*
arg_3
)
if
arg_4
.
get_bits_per_sample
(
)
!=
8
:
raise
ValueError
(
'Expected 8 bits per pixel.'
)
elif
arg_4
.
get_n_channels
(
)
!=
3
:
raise
ValueError
(
'Expected RGB image.'
)
arg_5
=
arg_4
.
read_pixel_bytes
(
)
.
get_data
(
)
arg_6
,
arg_7
=
arg_3
[
2
]
,
arg_3
[
3
]
return
Image
.
frombytes
(
'RGB'
,
(
arg_6
,
arg_7
)
,
arg_5
,
'raw'
,
'RGB'
,
arg_4
.
get_rowstride
(
)
,
1
)

def Func(arg_0, arg_1=None):
        """Grabs an image directly to a buffer.

        :param bbox: Optional tuple or list containing (x1, y1, x2, y2) coordinates
            of sub-region to capture.
        :return: PIL RGB image
        :raises: ValueError, if image data does not have 3 channels (RGB), each with 8
            bits.
        :rtype: Image
        """
        arg_2 = Gdk.get_default_root_window()
        if arg_1 is not None:
            arg_3 = [arg_1[0], arg_1[1], arg_1[2] - arg_1[0], arg_1[3] - arg_1[1]]
        else:
            arg_3 = arg_2.get_geometry()
        arg_4 = Gdk.pixbuf_get_from_window(arg_2, *arg_3)
        if arg_4.get_bits_per_sample() != 8:
            raise ValueError('Expected 8 bits per pixel.')
        elif arg_4.get_n_channels() != 3:
            raise ValueError('Expected RGB image.')

        # Read the entire buffer into a python bytes object.
        # read_pixel_bytes: New in version 2.32.
        arg_5 = arg_4.read_pixel_bytes().get_data()  # type: bytes
        arg_6, arg_7 = arg_3[2], arg_3[3]

        # Probably for SSE alignment reasons, the pixbuf has extra data in each line.
        # The args after "raw" help handle this; see
        # http://effbot.org/imagingbook/decoder.htm#the-raw-decoder
        return Image.frombytes(
            'RGB', (arg_6, arg_7), arg_5, 'raw', 'RGB', arg_4.get_rowstride(), 1)


return [[length(x, y) for x in range(width)] for y in range(height)]

def Func ( arg_0 , arg_1 , arg_2 = 1 , arg_3 = 1 ) : arg_4 = ( arg_0 - 1 ) / 2 arg_5 = ( arg_1 - 1 ) / 2 def length ( arg_6 , arg_7 ) : arg_8 = math . pow ( arg_6 - arg_4 , 2 * arg_2 ) arg_9 = math . pow ( arg_7 - arg_5 , 2 * arg_3 ) return int ( math . sqrt ( arg_8 + arg_9 ) ) return [ [ length ( arg_6 , arg_7 ) for arg_6 in range ( arg_0 ) ] for arg_7 in range ( arg_1 ) ]

def Func(arg_0, arg_1, arg_2=1, arg_3=1):
    """
    Generates a map of vector lengths from the center point to each coordinate.

    width - width of matrix to generate
    height - height of matrix to generate
    x_mult - value to scale x-axis by
    y_mult - value to scale y-axis by
    """
    arg_4 = (arg_0 - 1) / 2
    arg_5 = (arg_1 - 1) / 2

    def length(arg_6, arg_7):
        arg_8 = math.pow(arg_6 - arg_4, 2 * arg_2)
        arg_9 = math.pow(arg_7 - arg_5, 2 * arg_3)
        return int(math.sqrt(arg_8 + arg_9))

    return [[length(arg_6, arg_7) for arg_6 in range(arg_0)] for arg_7 in range(arg_1)]

Generates a map of vector lengths from the center point to each coordinate .


def
Func
(
arg_0
)
:
def
wrapper
(
*
arg_1
,
**
arg_2
)
:
arg_3
=
"%s(%s)"
%
(
arg_0
.
__name__
,
", "
.
join
(
[
repr
(
p
)
for
p
in
arg_1
]
+
[
"%s=%s"
%
(
k
,
repr
(
v
)
)
for
(
k
,
v
)
in
list
(
arg_2
.
items
(
)
)
]
)
)
debug
(
">> %s"
,
arg_3
)
arg_4
=
arg_0
(
*
arg_1
,
**
arg_2
)
debug
(
"<< %s: %s"
,
arg_3
,
repr
(
arg_4
)
)
return
arg_4
return
wrapper

def Func(arg_0):
  '''Decorator to log function calls.'''
  def wrapper(*arg_1, **arg_2):
    arg_3 = "%s(%s)" % (arg_0.__name__, ", ".join([repr(p) for p in arg_1] + ["%s=%s" % (k, repr(v)) for (k, v) in list(arg_2.items())]))
    debug(">> %s", arg_3)
    arg_4 = arg_0(*arg_1, **arg_2)
    debug("<< %s: %s", arg_3, repr(arg_4))
    return arg_4
  return wrapper


def Func ( arg_0 = { } ) : arg_1 = { 'openid' : session . get ( 'qq_openid' ) , 'access_token' : session . get ( 'qq_token' ) [ 0 ] , 'oauth_consumer_key' : QQ_APP_ID , } arg_1 . update ( arg_0 ) return arg_1

def Func(arg_0={}):
    '''Update some required parameters for OAuth2.0 API calls'''
    arg_1 = {
        'openid': session.get('qq_openid'),
        'access_token': session.get('qq_token')[0],
        'oauth_consumer_key': QQ_APP_ID,
    }
    arg_1.update(arg_0)
    return arg_1

Update some required parameters for OAuth2 . 0 API calls


return (self.state == State.UP_FOR_RETRY and
                self.next_retry_datetime() < timezone.utcnow())

def Func ( arg_0 ) : return ( arg_0 . state == State . UP_FOR_RETRY and arg_0 . next_retry_datetime ( ) < timezone . utcnow ( ) )

def Func(arg_0):
        """
        Checks on whether the task instance is in the right state and timeframe
        to be retried.
        """
        return (arg_0.state == State.UP_FOR_RETRY and
                arg_0.next_retry_datetime() < timezone.utcnow())

Checks on whether the task instance is in the right state and timeframe to be retried .


def Func ( arg_0 , arg_1 ) : for arg_2 in os . listdir ( arg_1 ) : arg_3 = os . path . join ( arg_1 , arg_2 ) arg_4 , arg_5 = os . path . splitext ( arg_2 ) if os . path . isfile ( arg_3 ) and arg_5 == '.py' : arg_6 , arg_7 , arg_8 = imp . find_module ( arg_4 , [ arg_1 ] ) if arg_6 : arg_9 = imp . load_module ( arg_4 , arg_6 , arg_7 , arg_8 ) if os . path . isdir ( arg_3 ) : arg_0 . Func ( arg_3 )

def Func(arg_0, arg_1):
        """
        Loads plugins from the specified directory.

        `directory` is the full path to a directory containing python modules
        which each contain a subclass of the Plugin class.

        There is no criteria for a valid plugin at this level - any python
        module found in the directory will be loaded. Only modules that
        implement a subclass of the Plugin class above will be collected.

        The directory will be traversed recursively.
        """
        # walk directory
        for arg_2 in os.listdir(arg_1):
            # path to file
            arg_3 = os.path.join(arg_1, arg_2)

            # if it's a file, load it
            arg_4, arg_5 = os.path.splitext(arg_2)
            if os.path.isfile(arg_3) and arg_5 == '.py':
                arg_6, arg_7, arg_8 = imp.find_module(arg_4, [arg_1])
                if arg_6:
                    arg_9 = imp.load_module(arg_4, arg_6, arg_7, arg_8)

            # if it's a directory, recurse into it
            if os.path.isdir(arg_3):
                arg_0.Func(arg_3)

Loads plugins from the specified directory .


return self._request("",
                             ok_status=None,
                             data=data,
                             headers=headers)

def Func(arg_0, arg_1):
        """Create template config for specified template name.

        .. __: https://api.go.cd/current/#Func-template-config

        Returns:
          Response: :class:`gocd.api.response.Response` object
        """

        assert arg_1["name"] == arg_0.name, "Given config is not for this template"

        arg_2 = arg_0._json_encode(arg_1)
        arg_3 = arg_0._default_headers()

        return arg_0._request("",
                             ok_status=None,
                             arg_2=arg_2,
                             arg_3=arg_3)

Create template config for specified template name.

        .. __: https://api.go.cd/current/#create-template-config

        Returns:
          Response: :class:`gocd.api.response.Response` object

Create template config for specified template name .


def Func(arg_0, arg_1, arg_2, *arg_3):
        """
        Aggregate the rows of each group into a single value.

        :param clazz: name of a class that extends class Callable
        :type clazz: class
        :param new_col: name of the new column
        :type new_col: str
        :param args: list of column names of the object that
         function should be applied to
        :type args: varargs
        :return: returns a new dataframe object with the Funcd value
        :rtype: DataFrame
        """
        if is_callable(arg_1) \
                and not is_none(arg_2) \
                and has_elements(*arg_3) \
                and is_disjoint(arg_0.__grouping.grouping_colnames,
                                arg_3,
                                __DISJOINT_SETS_ERROR__):
            return arg_0.__do_Func(arg_1, arg_2, *arg_3)

Aggregate the rows of each group into a single value.

        :param clazz: name of a class that extends class Callable
        :type clazz: class
        :param new_col: name of the new column
        :type new_col: str
        :param args: list of column names of the object that
         function should be applied to
        :type args: varargs
        :return: returns a new dataframe object with the aggregated value
        :rtype: DataFrame

Aggregate the rows of each group into a single value .


def Func(arg_0, arg_1, arg_2=None):
        """This function adds the given stream to the logger, but does not check with a ConnectorDB database
        to make sure that the stream exists. Use at your own risk."""

        arg_3 = arg_0.database.cursor()
        arg_3.execute("INSERT OR REPLACE INTO streams VALUES (?,?);",
                  (arg_1, json.dumps(arg_2)))

        arg_0.streams[arg_1] = arg_2

This function adds the given stream to the logger but does not check with a ConnectorDB database to make sure that the stream exists . Use at your own risk .


(dataset, seed, threshold=0.0, output_dir='.', prefix='', r=6)

def Func(arg_0, arg_1, arg_2=0.0, arg_3='.', arg_4='', arg_5=6):
    """ Compute and save Func map given input image as seed.

    This is essentially just a wrapper for a meta-analysis defined
    by the contrast between those studies that activate within the seed
    and those that don't.

    Args:
      dataset: a Dataset instance containing study and activation data.
      seed: either a Nifti or Analyze image defining the boundaries of the
        seed, or a list of triples (x/y/z) defining the seed(s). Note that
        voxels do not need to be contiguous to define a seed--all supra-
        threshold voxels will be lumped together.
      threshold: optional float indicating the threshold above which voxels
        are considered to be part of the seed ROI (default = 0)
      r: optional integer indicating radius (in mm) of spheres to grow
        (only used if seed is a list of coordinates).
      output_dir: output directory to write to. Defaults to current.
        If none, defaults to using the first part of the seed filename.
      prefix: optional string to prepend to all Func images.

    Output:
      A set of meta-analysis images identical to that generated by
      meta.MetaAnalysis.
    """

    if isinstance(arg_1, string_types):
        arg_6 = arg_0.get_studies(mask=arg_1, activation_threshold=arg_2)
    else:
        arg_6 = arg_0.get_studies(peaks=arg_1, arg_5=arg_5,
                                  activation_threshold=arg_2)

    arg_7 = meta.MetaAnalysis(arg_0, arg_6)
    arg_7.save_results(arg_3, arg_4)

Compute and save coactivation map given input image as seed.

    This is essentially just a wrapper for a meta-analysis defined
    by the contrast between those studies that activate within the seed
    and those that don't.

    Args:
      dataset: a Dataset instance containing study and activation data.
      seed: either a Nifti or Analyze image defining the boundaries of the
        seed, or a list of triples (x/y/z) defining the seed(s). Note that
        voxels do not need to be contiguous to define a seed--all supra-
        threshold voxels will be lumped together.
      threshold: optional float indicating the threshold above which voxels
        are considered to be part of the seed ROI (default = 0)
      r: optional integer indicating radius (in mm) of spheres to grow
        (only used if seed is a list of coordinates).
      output_dir: output directory to write to. Defaults to current.
        If none, defaults to using the first part of the seed filename.
      prefix: optional string to prepend to all coactivation images.

    Output:
      A set of meta-analysis images identical to that generated by
      meta.MetaAnalysis.

Compute and save coactivation map given input image as seed .