Question: Logs the WHOIS record if needed .

def Func ( arg_0 , arg_1 ) : if PyFunceble . CONFIGURATION [ "debug" ] and PyFunceble . CONFIGURATION [ "logs" ] : if PyFunceble . INTERN [ "referer" ] : arg_2 = PyFunceble . INTERN [ "referer" ] else : arg_2 = None arg_3 = { arg_0 . current_time : { "domain" : PyFunceble . INTERN [ "to_test" ] , "record" : arg_1 , "referer" : arg_2 , } } if arg_0 . output : arg_4 = arg_0 . output else : arg_4 = PyFunceble . OUTPUT_DIRECTORY arg_4 += PyFunceble . OUTPUTS [ "parent_directory" ] arg_4 += PyFunceble . OUTPUTS [ "logs" ] [ "directories" ] [ "parent" ] arg_4 += PyFunceble . OUTPUTS [ "logs" ] [ "filenames" ] [ "Func" ] arg_5 = arg_0 . _get_content ( arg_4 ) arg_5 . update ( arg_3 ) arg_0 . _write_content ( arg_5 , arg_4 )

Initialize bluez DBus communication.  Must be called before any other
        calls are made!


Question: Queries policy tracked resources under the management group .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = False , ** arg_5 ) : arg_6 = None if arg_2 is not None : arg_6 = arg_2 . top arg_7 = None if arg_2 is not None : arg_7 = arg_2 . filter def internal_paging ( arg_8 = None , arg_4 = False ) : if not arg_8 : arg_9 = arg_0 . Func . metadata [ 'url' ] arg_10 = { 'managementGroupsNamespace' : arg_0 . _serialize . url ( "self.management_groups_namespace" , arg_0 . management_groups_namespace , 'str' ) , 'managementGroupName' : arg_0 . _serialize . url ( "management_group_name" , arg_1 , 'str' ) , 'policyTrackedResourcesResource' : arg_0 . _serialize . url ( "self.policy_tracked_resources_resource" , arg_0 . policy_tracked_resources_resource , 'str' ) } arg_9 = arg_0 . _client . format_url ( arg_9 , ** arg_10 ) arg_11 = { } arg_11 [ 'api-version' ] = arg_0 . _serialize . query ( "self.api_version" , arg_0 . api_version , 'str' ) if arg_6 is not None : arg_11 [ '$top' ] = arg_0 . _serialize . query ( "top" , arg_6 , 'int' , minimum = 0 ) if arg_7 is not None : arg_11 [ '$filter' ] = arg_0 . _serialize . query ( "filter" , arg_7 , 'str' ) else : arg_9 = arg_8 arg_11 = { } arg_12 = { } arg_12 [ 'Accept' ] = 'application/json' if arg_0 . config . generate_client_request_id : arg_12 [ 'x-ms-client-request-id' ] = str ( uuid . uuid1 ( ) ) if arg_3 : arg_12 . update ( arg_3 ) if arg_0 . config . accept_language is not None : arg_12 [ 'accept-language' ] = arg_0 . _serialize . header ( "self.config.accept_language" , arg_0 . config . accept_language , 'str' ) arg_13 = arg_0 . _client . post ( arg_9 , arg_11 , arg_12 ) arg_14 = arg_0 . _client . send ( arg_13 , stream = False , ** arg_5 ) if arg_14 . status_code not in [ 200 ] : raise models . QueryFailureException ( arg_0 . _deserialize , arg_14 ) return arg_14 arg_15 = models . PolicyTrackedResourcePaged ( internal_paging , arg_0 . _deserialize . dependencies ) if arg_4 : arg_16 = { } arg_17 = models . PolicyTrackedResourcePaged ( internal_paging , arg_0 . _deserialize . dependencies , arg_16 ) return arg_17 return arg_15


Question: Defines a XML body value to match .

def Func ( arg_0 , Func ) : arg_0 . _request . xml = Func arg_0 . add_matcher ( matcher ( 'XMLMatcher' , Func ) )


Question: handles initial setup .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 ) : arg_0 . currentdir = arg_1 arg_0 . assetpath = arg_2 arg_0 . currentproject = arg_3 arg_0 . cplistfile = arg_4 arg_0 . executor = arg_5 arg_0 . readonly = arg_6 arg_0 . baseurl = arg_7

Deletes the video

        Authentication is required

        Params:
            entry: video entry fetch via 'fetch_video()'

        Return:
            True if successful

        Raise:
            OperationError: on unsuccessful deletion


Question: Builds a bridge and associates it with an AMP protocol instance .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _factory . Func ( arg_1 ) return JSONAMPDialectReceiver ( arg_2 )

This is a parallel worker for running period-recovery.

    Parameters
    ----------

    task : tuple
        This is used to pass args to the `periodicvar_recovery` function::

            task[0] = period-finding result pickle to work on
            task[1] = simbasedir
            task[2] = period_tolerance

    Returns
    -------

    dict
        This is the dict produced by the `periodicvar_recovery` function for the
        input period-finding result pickle.


Question: This sets the database connection to autocommit . Must be called before any cursors have been instantiated .

def Func ( arg_0 ) : if len ( arg_0 . cursors . keys ( ) ) == 0 : arg_0 . connection . autocommit = True else : raise AttributeError ( 'database cursors are already active, ' 'cannot switch to autocommit now' )

Main executor of the trimmomatic_report template.

    Parameters
    ----------
    log_files : list
        List of paths to the trimmomatic log files.


Question: Create the SSH Key

def Func ( arg_0 ) : arg_1 = { "name" : arg_0 . name , "public_key" : arg_0 . public_key , } arg_2 = arg_0 . get_data ( "account/keys/" , type = POST , params = arg_1 ) if arg_2 : arg_0 . id = arg_2 [ 'ssh_key' ] [ 'id' ]


Question: Adds more filters to the existing list of error - message filters .

def Func ( arg_0 , arg_1 ) : for arg_2 in arg_1 . split ( ',' ) : arg_3 = arg_2 . strip ( ) if arg_3 : arg_0 . filters . append ( arg_3 ) for arg_2 in arg_0 . filters : if not ( arg_2 . startswith ( '+' ) or arg_2 . startswith ( '-' ) ) : raise ValueError ( 'Every filter in --filters must start with + or -' ' (%s does not)' % arg_2 )

Click the right mouse button without modifiers pressed.

        Parameters: coordinates to click on scren (tuple (x, y))
        Returns: None


Question: reconstruct an object serialized by serialize_object from data buffers .

def Func ( arg_0 ) : arg_0 = list ( arg_0 ) arg_1 = pickle . loads ( arg_0 . pop ( 0 ) ) if isinstance ( arg_1 , ( list , tuple ) ) : for arg_2 in arg_1 : if arg_2 . data is None : arg_2 . data = arg_0 . pop ( 0 ) return uncanSequence ( map ( unserialize , arg_1 ) ) , arg_0 elif isinstance ( arg_1 , dict ) : arg_4 = { } for arg_5 in sorted ( arg_1 . iterkeys ( ) ) : arg_2 = arg_1 [ arg_5 ] if arg_2 . data is None : arg_2 . data = arg_0 . pop ( 0 ) arg_4 [ arg_5 ] = uncan ( unserialize ( arg_2 ) ) return arg_4 , arg_0 else : if arg_1 . data is None : arg_1 . data = arg_0 . pop ( 0 ) return uncan ( unserialize ( arg_1 ) ) , arg_0

Check the spacing of a single equals sign.


Question: Backpropagate multi - run peptide and protein scores to single files

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 is None : arg_1 = arg_0 else : arg_1 = arg_1 Func_oswr ( arg_0 , arg_1 , arg_2 )

Creates a random graph where the edges have different types.

    This method calls :func:`.minimal_random_graph`, and then adds
    a loop to each vertex with ``prob_loop`` probability. It then
    calls :func:`.set_types_random` on the resulting graph.

    Parameters
    ----------
    num_vertices : int (optional, default: 250)
        The number of vertices in the graph.
    prob_loop : float (optional, default: 0.5)
        The probability that a loop gets added to a vertex.
    **kwargs :
        Any parameters to send to :func:`.minimal_random_graph` or
        :func:`.set_types_random`.

    Returns
    -------
    :class:`.QueueNetworkDiGraph`
        A graph with the position of the vertex set as a property.
        The position property is called ``pos``. Also, the ``edge_type``
        edge property is set for each edge.

    Examples
    --------
    The following generates a directed graph with 50 vertices where half
    the edges are type 1 and 1/4th are type 2 and 1/4th are type 3:

    >>> import queueing_tool as qt
    >>> pTypes = {1: 0.5, 2: 0.25, 3: 0.25}
    >>> g = qt.generate_random_graph(100, proportions=pTypes, seed=17)
    >>> non_loops = [e for e in g.edges() if e[0] != e[1]]
    >>> p1 = np.sum([g.ep(e, 'edge_type') == 1 for e in non_loops])
    >>> float(p1) / len(non_loops) # doctest: +ELLIPSIS
    0.486...
    >>> p2 = np.sum([g.ep(e, 'edge_type') == 2 for e in non_loops])
    >>> float(p2) / len(non_loops) # doctest: +ELLIPSIS
    0.249...
    >>> p3 = np.sum([g.ep(e, 'edge_type') == 3 for e in non_loops])
    >>> float(p3) / len(non_loops) # doctest: +ELLIPSIS
    0.264...

    To make an undirected graph with 25 vertices where there are 4
    different edge types with random proportions:

    >>> p = np.random.rand(4)
    >>> p = p / sum(p)
    >>> p = {k + 1: p[k] for k in range(4)}
    >>> g = qt.generate_random_graph(num_vertices=25, is_directed=False, proportions=p)

    Note that none of the edge types in the above example are 0. It is
    recommended use edge type indices starting at 1, since 0 is
    typically used for terminal edges.


Question: Close stream .

def Func ( arg_0 ) : if arg_0 . writer . can_write_eof ( ) : arg_0 . writer . write_eof ( ) arg_0 . writer . Func ( )


Question: Add the default values to the class docstring

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : return Func ( arg_0 . defaults , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 )


Question: Drain will put a connection into a drain state . All subscriptions will immediately be put into a drain state . Upon completion the publishers will be drained and can not publish any additional messages . Upon draining of the publishers the connection will be closed . Use the closed_cb option to know when the connection has moved from draining to closed .

def Func ( arg_0 , arg_1 = None ) : if arg_0 . is_Funcing : return if arg_0 . is_closed : raise ErrConnectionClosed if arg_0 . is_connecting or arg_0 . is_reconnecting : raise ErrConnectionReconnecting if arg_1 is not None : return arg_0 . _Func_sub ( arg_1 ) arg_0 . _status = Client . DRAINING_SUBS arg_3 = [ ] for arg_4 , arg_5 in arg_0 . _subs . items ( ) : arg_6 = arg_0 . _Func_sub ( arg_4 ) arg_3 . append ( arg_6 ) arg_7 = asyncio . gather ( * arg_3 ) try : yield from asyncio . wait_for ( arg_7 , arg_0 . options [ "Func_timeout" ] ) except asyncio . TimeoutError : arg_7 . exception ( ) arg_7 . cancel ( ) if arg_0 . _error_cb is not None : yield from arg_0 . _error_cb ( ErrDrainTimeout ) except asyncio . CancelledError : pass finally : arg_0 . _status = Client . DRAINING_PUBS yield from arg_0 . flush ( ) yield from arg_0 . _close ( Client . CLOSED )


Question: Create an authorization URL by appending request_token and optional kwargs to url .

def Func ( arg_0 , arg_1 , arg_2 = None , ** arg_3 ) : arg_3 [ "oauth_token" ] = arg_2 or arg_0 . _client . client . resource_owner_key log . debug ( "Adding parameters %s to url %s" , arg_3 , arg_1 ) return add_params_to_uri ( arg_1 , arg_3 . items ( ) )

Returns a list of the dicom files within root_path

    Parameters
    ----------
    root_path: str
    Path to the directory to be recursively searched for DICOM files.

    Returns
    -------
    dicoms: set
    Set of DICOM absolute file paths


Question: List all display items ; return 0 if none

def Func ( arg_0 ) : arg_1 = False arg_2 = [ ] for arg_3 in arg_0 . list : if not arg_1 : arg_2 . append ( """Auto-display expressions now in effect:Num Enb Expression""" ) arg_1 = True pass arg_2 . append ( arg_3 . format ( ) ) return arg_2

r"""FullName after removing the local path to the repository.

    If we have a real absolute path name here we can try to do something smart:
    detecting the root of the checkout and truncating /path/to/checkout from
    the name so that we get header guards that don't include things like
    "C:\Documents and Settings\..." or "/home/username/..." in them and thus
    people on different computers who have checked the source out to different
    locations won't see bogus errors.


Question: Calculate two s complement .

def Func ( arg_0 , arg_1 ) : if sys . version < '3' : arg_2 = long ( 0 ) for arg_3 in arg_1 : arg_2 = ( arg_2 << 8 ) + ord ( arg_3 ) else : arg_2 = 0 for arg_3 in arg_1 : arg_2 = ( arg_2 << 8 ) + arg_3 return arg_2

Shift the model result and return the new instance.

    Queues up the T(i+1) prediction value and emits a T(i)
    input/prediction pair, if possible. E.g., if the previous T(i-1)
    iteration was learn-only, then we would not have a T(i) prediction in our
    FIFO and would not be able to emit a meaningful input/prediction pair.

    :param modelResult: A :class:`~.nupic.frameworks.opf.opf_utils.ModelResult`
                        instance to shift.
    :return: A :class:`~.nupic.frameworks.opf.opf_utils.ModelResult` instance that
             has been shifted


Question: A function to do simple sign - based control of a variable .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 , arg_4 : arg_3 , arg_5 : arg_3 = 0.01 ) -> arg_1 : def _get_new_control ( arg_0 , arg_2 , arg_4 ) : arg_6 = mcmc_util . choose ( arg_2 > arg_4 , arg_0 * ( 1. + arg_5 ) , arg_0 / ( 1. + arg_5 ) ) return arg_6 arg_2 = maybe_broadcast_structure ( arg_2 , arg_0 ) arg_4 = maybe_broadcast_structure ( arg_4 , arg_0 ) return tf . nest . map_structure ( _get_new_control , arg_0 , arg_2 , arg_4 )

Parse a page of character results.

    :param soup: The BS4 class object
    :return: Returns a list of dictionaries containing a name, gender and list of dictionaries containing a game name/id pair
             for games they appeared in.


Question: Wrapper for struct . unpack with SerialBlock buffer definitionns .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = "=" for arg_4 in arg_2 : if not arg_2 [ arg_4 ] [ MeterData . CalculatedFlag ] : arg_3 = arg_3 + str ( arg_2 [ arg_4 ] [ MeterData . SizeValue ] ) + "s" if len ( arg_1 ) == 255 : arg_5 = struct . unpack ( arg_3 , str ( arg_1 ) ) else : arg_0 . writeCmdMsg ( "Length error.  Len() size = " + str ( len ( arg_1 ) ) ) arg_5 = ( ) return arg_5

Updates the timestamp for the given channel id.

        :param chan_id:
        :param ts:
        :return:


Question: Compute the energy at harmonics of time - frequency representation .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 'linear' , arg_4 = 0 , arg_5 = 0 ) : arg_6 = [ len ( arg_2 ) ] arg_6 . extend ( arg_0 . shape ) arg_7 = np . zeros ( arg_6 , dtype = arg_0 . dtype ) if arg_1 . ndim == 1 and len ( arg_1 ) == arg_0 . shape [ arg_5 ] : harmonics_1d ( arg_7 , arg_0 , arg_1 , arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 ) elif arg_1 . ndim == 2 and arg_1 . shape == arg_0 . shape : harmonics_2d ( arg_7 , arg_0 , arg_1 , arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 ) else : raise ParameterError ( 'freqs.shape={} does not match ' 'input shape={}' . format ( arg_1 . shape , arg_0 . shape ) ) return arg_7

Drop a node from the network

        :param node: node to drop
        :type node: Node


Question: Try to see if no - member should be emitted for the given owner .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = True , arg_4 = True ) : if node_ignores_exception ( arg_0 , AttributeError ) : return False if arg_4 and isinstance ( arg_1 , astroid . Const ) and arg_1 . value is None : return False if is_super ( arg_1 ) or getattr ( arg_1 , "type" , None ) == "metaclass" : return False if arg_3 and arg_2 [ - 5 : ] . lower ( ) == "mixin" : return False if isinstance ( arg_1 , astroid . FunctionDef ) and arg_1 . decorators : return False if isinstance ( arg_1 , ( astroid . Instance , astroid . ClassDef ) ) : if arg_1 . has_dynamic_getattr ( ) : try : arg_5 = arg_1 . metaclass ( ) except exceptions . MroError : return False if arg_5 : return arg_5 . qname ( ) == "enum.EnumMeta" return False if not has_known_bases ( arg_1 ) : return False if isinstance ( arg_1 , objects . Super ) : try : arg_1 . super_mro ( ) except ( exceptions . MroError , exceptions . SuperError ) : return False if not all ( map ( has_known_bases , arg_1 . type . mro ( ) ) ) : return False if isinstance ( arg_1 , astroid . Module ) : try : arg_1 . getattr ( "__getattr__" ) return False except astroid . NotFoundError : pass if arg_0 . attrname . startswith ( "_" + arg_2 ) : arg_6 = arg_0 . attrname . split ( "_" + arg_2 ) [ - 1 ] try : if arg_1 . getattr ( arg_6 , context = None ) is not None : return False except astroid . NotFoundError : return True return True

Returns the maximum delay for the InferenceElements in the inference
    dictionary

    Parameters:
    -----------------------------------------------------------------------
    inferences:   A dictionary where the keys are InferenceElements


Question: Validate zipped data package

def Func ( arg_0 ) : arg_1 = [ f for f in arg_0 . namelist ( ) if f . endswith ( 'datapackage.json' ) ] if len ( arg_1 ) != 1 : arg_2 = 'DataPackage must have only one "datapackage.json" (had {n})' raise exceptions . DataPackageException ( arg_2 . format ( n = len ( arg_1 ) ) )

Disconnect any connected devices that have any of the specified
        service UUIDs.


Question: Given an ordered dictionary of items and a key in that dict return an ordered dict of items before the keyed item and an ordered dict of items after .

def Func ( arg_0 , arg_1 ) : def unmatched ( arg_2 ) : arg_3 , arg_4 , = arg_2 return arg_3 != arg_1 arg_5 = iter ( arg_0 . items ( ) ) arg_4 = arg_0 . get ( arg_1 ) arg_6 = collections . OrderedDict ( itertools . takewhile ( unmatched , arg_5 ) ) arg_7 = collections . OrderedDict ( arg_5 ) return arg_6 , arg_4 , arg_7

Return True if we should retry, False otherwise.


Question: try load value from dict . if key is not exists mark as state unset .

def Func ( arg_0 , arg_1 : arg_2 , arg_3 ) : if arg_3 in arg_1 : arg_0 . value = arg_1 [ arg_3 ] else : arg_0 . reset ( )

Logs the extracted expiration date.

        :param extracted: The extracted expiration date (from WHOIS record).
        :type extracted: str


Question: Group the citation counters by subgraphs induced by the annotation .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 ) -> Mapping [ arg_3 , typing . Counter [ arg_3 ] ] : arg_4 = defaultdict ( lambda : defaultdict ( set ) ) for arg_5 , arg_6 , arg_7 in arg_0 . edges ( arg_7 = True ) : if not edge_has_annotation ( arg_7 , arg_2 ) or CITATION not in arg_7 : continue arg_8 = arg_7 [ ANNOTATIONS ] [ arg_2 ] arg_4 [ arg_8 ] [ arg_5 , arg_6 ] . add ( ( arg_7 [ CITATION ] [ CITATION_TYPE ] , arg_7 [ CITATION ] [ CITATION_REFERENCE ] . strip ( ) ) ) return { arg_8 : Counter ( itt . chain . from_iterable ( arg_6 . values ( ) ) ) for arg_8 , arg_6 in arg_4 . items ( ) }

Configure session for particular device

        Returns:
            tensorflow.Session


Question: Represent data as a masked array .

def Func ( arg_0 ) : arg_1 = arg_0 . array return numpy . Func . MaskedArray ( arg_1 , Funcsk = numpy . logical_not ( numpy . isfinite ( arg_1 ) ) )

Create Flask application class.

    Invenio-Files-REST needs to patch the Werkzeug form parsing in order to
    support streaming large file uploads. This is done by subclassing the Flask
    application class.


Question: Get a unique state id .

def Func ( arg_0 ) : arg_1 = arg_0 . _last_id . value arg_0 . _last_id . value += 1 return arg_1

Returns assignment data for the given course_id.

        https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.course_assignments


Question: Retrieves a list of the VM Images from the image repository that is associated with the specified subscription .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : arg_4 = arg_0 . _get_vm_image_path ( ) arg_5 = '' if arg_1 : arg_5 += '&location=' + arg_1 if arg_2 : arg_5 += '&publisher=' + arg_2 if arg_3 : arg_5 += '&category=' + arg_3 if arg_5 : arg_4 = arg_4 + '?' + arg_5 . lstrip ( '&' ) return arg_0 . _perform_get ( arg_4 , VMImages )

Get Dingding endpoint for sending message.


Question: Create and return a new instance .

def Func ( arg_0 , * arg_1 , ** arg_2 ) : arg_3 = arg_0 . clazz ( ) arg_0 . storage . append ( arg_3 ) arg_4 = dict ( ) for arg_5 , arg_6 in arg_0 . attributes : if arg_5 not in arg_0 . referential_attributes : arg_7 = arg_0 . default_value ( arg_6 ) setattr ( arg_3 , arg_5 , arg_7 ) for arg_8 , arg_7 in zip ( arg_0 . attributes , arg_1 ) : arg_5 , arg_6 = arg_8 if arg_5 not in arg_0 . referential_attributes : setattr ( arg_3 , arg_5 , arg_7 ) else : arg_4 [ arg_5 ] = arg_7 for arg_5 , arg_7 in arg_2 . items ( ) : if arg_5 not in arg_0 . referential_attributes : setattr ( arg_3 , arg_5 , arg_7 ) else : arg_4 [ arg_5 ] = arg_7 if not arg_4 : return arg_3 for arg_9 in arg_0 . links . values ( ) : if set ( arg_9 . key_map . values ( ) ) - set ( arg_4 . keys ( ) ) : continue arg_2 = dict ( ) for arg_10 , arg_7 in arg_9 . key_map . items ( ) : arg_2 [ arg_10 ] = arg_4 [ arg_7 ] if not arg_2 : continue for arg_11 in arg_9 . to_metaclass . query ( arg_2 ) : relate ( arg_11 , arg_3 , arg_9 . rel_id , arg_9 . phrase ) for arg_5 , arg_7 in arg_4 . items ( ) : if getattr ( arg_3 , arg_5 ) != arg_7 : logger . warning ( 'unable to assign %s to %s' , arg_5 , arg_3 ) return arg_3

Synchronize local po files with translations on GDocs Spreadsheet.
        Downloads two csv files, merges them and converts into po files
        structure. If new msgids appeared in po files, this method creates
        new ods with appended content and sends it to GDocs.


Question: If input points to ( or { or [ or < finds the position that closes it .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . elided [ arg_1 ] if ( arg_3 [ arg_2 ] not in '({[<' ) or Match ( r'<[<=]' , arg_3 [ arg_2 : ] ) : return ( arg_3 , arg_0 . NumLines ( ) , - 1 ) ( arg_4 , arg_5 ) = FindEndOfExpressionInLine ( arg_3 , arg_2 , [ ] ) if arg_4 > - 1 : return ( arg_3 , arg_1 , arg_4 ) while arg_5 and arg_1 < arg_0 . NumLines ( ) - 1 : arg_1 += 1 arg_3 = arg_0 . elided [ arg_1 ] ( arg_4 , arg_5 ) = FindEndOfExpressionInLine ( arg_3 , 0 , arg_5 ) if arg_4 > - 1 : return ( arg_3 , arg_1 , arg_4 ) return ( arg_3 , arg_0 . NumLines ( ) , - 1 )

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Return the items from Launchpad API using pagination

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = 0 arg_4 = arg_1 arg_5 = True while arg_5 : logger . debug ( "Fetching page: %i" , arg_3 ) try : arg_6 = arg_0 . __send_request ( arg_4 , arg_2 ) arg_7 = json . loads ( arg_6 ) except requests . exceptions . HTTPError as e : if e . response . status_code in [ 410 ] : logger . warning ( "Data is not available - %s" , arg_4 ) arg_6 = '{"total_size": 0, "start": 0, "entries": []}' arg_7 = json . loads ( arg_6 ) else : raise e if 'next_collection_link' in arg_7 : arg_4 = arg_7 [ 'next_collection_link' ] arg_2 = None else : arg_5 = False yield arg_6 arg_3 += 1

Helper to read the contents of the given file or path into a string with the given encoding.
    Encoding defaults to 'utf-8', other useful encodings are 'ascii' and 'latin-1'.


Question: Slow conversion of a recarray into a list of records with python types .

def Func ( arg_0 ) : arg_1 = [ pyify ( typestr ) for name , typestr in arg_0 . dtype . descr ] def convert_record ( arg_2 ) : return tuple ( [ arg_3 ( arg_4 ) for arg_3 , arg_4 in zip ( arg_1 , arg_2 ) ] ) return ( convert_record ( arg_2 ) for arg_2 in arg_0 )

Determine if an input file is silent.

    Parameters
    ----------
    input_filepath : str
        The input filepath.
    threshold : float
        Threshold for determining silence

    Returns
    -------
    is_silent : bool
        True if file is determined silent.


Question: Single Sample GSEA workflow with permutation procedure

def Func ( arg_0 , arg_1 , arg_2 = None ) : assert arg_0 . min_size <= arg_0 . max_size mkdirs ( arg_0 . outdir ) arg_0 . resultsOnSamples = OrderedDict ( ) arg_4 = arg_0 . outdir for arg_5 , arg_6 in arg_1 . iteritems ( ) : arg_0 . outdir = os . path . join ( arg_4 , str ( arg_5 ) ) arg_0 . _logger . info ( "Run Sample: %s " % arg_5 ) mkdirs ( arg_0 . outdir ) arg_7 = arg_6 . sort_values ( ascending = arg_0 . ascending ) arg_8 , arg_9 , arg_10 , arg_11 = gsea_compute ( data = arg_7 , n = arg_0 . permutation_num , arg_2 = arg_2 , weighted_score_type = arg_0 . weighted_score_type , permutation_type = 'gene_set' , method = None , pheno_pos = '' , pheno_neg = '' , classes = None , ascending = arg_0 . ascending , processes = arg_0 . _processes , seed = arg_0 . seed , single = True , scale = arg_0 . scale ) arg_12 = zip ( arg_11 , list ( arg_8 ) , arg_9 , arg_10 ) arg_0 . _save_results ( zipdata = arg_12 , arg_4 = arg_0 . outdir , module = arg_0 . module , arg_2 = arg_2 , rank_metric = arg_7 , permutation_type = "gene_sets" ) arg_0 . resultsOnSamples [ arg_5 ] = arg_0 . res2d . es if arg_0 . _noplot : continue arg_0 . _logger . info ( "Plotting Sample: %s \n" % arg_5 ) arg_0 . _plotting ( rank_metric = arg_7 , results = arg_0 . results , graph_num = arg_0 . graph_num , arg_4 = arg_0 . outdir , figsize = arg_0 . figsize , format = arg_0 . format ) arg_0 . _save ( arg_4 ) return

Replace all the tracks in a playlist, overwriting its existing tracks.
        This powerful request can be useful for replacing tracks, re-ordering existing tracks, or clearing the playlist.

        Parameters
        ----------
        playlist : Union[str, PLaylist]
            The playlist to modify
        tracks : Sequence[Union[str, Track]]
            Tracks to place in the playlist


Question: Returns a list of patches before patch from the patches list

def Func ( arg_0 , arg_1 ) : return [ arg_2 . get_patch ( ) for arg_2 in arg_0 . _patchlines_before ( arg_1 ) if arg_2 . get_patch ( ) ]

Propagate "clk" clock and reset "rst" signal to all subcomponents


Question: Build the matrix representation of the sampling problem .

def Func ( arg_0 ) : arg_1 = constraint_matrices ( arg_0 . model , zero_tol = arg_0 . feasibility_tol ) arg_2 = arg_1 . equalities arg_3 = arg_1 . b arg_4 = arg_11 . atleast_2d ( arg_1 . bounds ) . T arg_5 = arg_11 . atleast_2d ( arg_1 . variable_bounds ) . T arg_6 = all ( arg_11 . abs ( arg_3 ) < arg_0 . feasibility_tol ) arg_7 = arg_11 . abs ( arg_1 . variable_bounds [ : , 1 ] ) > arg_0 . feasibility_tol arg_7 &= arg_1 . variable_fixed if any ( arg_7 ) : arg_8 = arg_7 . sum ( ) arg_9 = arg_11 . zeros ( ( arg_8 , arg_1 . equalities . shape [ 1 ] ) ) arg_9 [ arg_10 ( arg_8 ) , arg_11 . where ( arg_7 ) ] = 1.0 arg_2 = arg_11 . vstack ( [ arg_2 , arg_9 ] ) arg_13 = arg_1 . variable_bounds [ : , 1 ] arg_3 = arg_11 . hstack ( [ arg_3 , arg_13 [ arg_7 ] ] ) arg_6 = False arg_14 = nullspace ( arg_2 ) return Problem ( arg_2 = shared_np_array ( arg_2 . shape , arg_2 ) , arg_3 = shared_np_array ( arg_3 . shape , arg_3 ) , inequalities = shared_np_array ( arg_1 . inequalities . shape , arg_1 . inequalities ) , arg_4 = shared_np_array ( arg_4 . shape , arg_4 ) , variable_fixed = shared_np_array ( arg_1 . variable_fixed . shape , arg_1 . variable_fixed , integer = True ) , variable_bounds = shared_np_array ( arg_5 . shape , arg_5 ) , nullspace = shared_np_array ( arg_14 . shape , arg_14 ) , arg_6 = arg_6 )

Returns an invoice object for a given cart at its current revision.
        If such an invoice does not exist, the cart is validated, and if valid,
        an invoice is generated.


Question: r Hann - Poisson tapering window

def Func ( arg_0 , arg_1 = 2 ) : arg_2 = window_hann ( arg_0 ) arg_3 = window_poisson ( arg_0 , arg_1 = arg_1 ) return arg_2 * arg_3

Given a document_field and a form_value this will translate the value
    to the correct result for mongo to use.


Question: Save model parameters to self . save_path

def Func ( arg_0 , arg_1 : arg_2 = ( 'Optimizer' , ) ) -> None : if not hasattr ( arg_0 , 'sess' ) : raise RuntimeError ( 'Your TensorFlow model {} must' ' have sess attribute!' . format ( arg_0 . __class__ . __name__ ) ) arg_3 = str ( arg_0 . Func_path . resolve ( ) ) log . info ( '[saving model to {}]' . format ( arg_3 ) ) arg_4 = arg_0 . _get_Funcable_variables ( arg_1 ) arg_5 = tf . train . Saver ( arg_4 ) arg_5 . Func ( arg_0 . sess , arg_3 )

ASCII adjust after addition.

        Adjusts the sum of two unpacked BCD values to create an unpacked BCD
        result. The AL register is the implied source and destination operand
        for this instruction. The AAA instruction is only useful when it follows
        an ADD instruction that adds (binary addition) two unpacked BCD values
        and stores a byte result in the AL register. The AAA instruction then
        adjusts the contents of the AL register to contain the correct 1-digit
        unpacked BCD result.
        If the addition produces a decimal carry, the AH register is incremented
        by 1, and the CF and AF flags are set. If there was no decimal carry,
        the CF and AF flags are cleared and the AH register is unchanged. In either
        case, bits 4 through 7 of the AL register are cleared to 0.

        This instruction executes as described in compatibility mode and legacy mode.
        It is not valid in 64-bit mode.
        ::
                IF ((AL AND 0FH) > 9) Operators.OR(AF  =  1)
                THEN
                    AL  =  (AL + 6);
                    AH  =  AH + 1;
                    AF  =  1;
                    CF  =  1;
                ELSE
                    AF  =  0;
                    CF  =  0;
                FI;
                AL  =  AL AND 0FH;
        :param cpu: current CPU.


Question: Append a node as the last child

def Func ( arg_0 , arg_1 , arg_2 = - 1 ) : if isinstance ( arg_1 , str ) : arg_1 = text ( arg_1 , parent = arg_0 ) else : arg_1 . _xml_parent = weakref . ref ( arg_0 ) if arg_2 == - 1 : arg_0 . xml_children . append ( arg_1 ) else : arg_0 . xml_children . insert ( arg_2 , arg_1 ) return


Question: Load a disease term into the database

def Func ( arg_0 , arg_1 ) : LOG . debug ( "Loading disease term %s into database" , arg_1 [ '_id' ] ) try : arg_0 . disease_term_collection . insert_one ( arg_1 ) except DuplicateKeyError as err : raise IntegrityError ( "Disease term %s already exists in database" . format ( arg_1 [ '_id' ] ) ) LOG . debug ( "Disease term saved" )

Add one or more files or URLs to the manifest.
        If files contains a glob, it is expanded.

        All files are uploaded to SolveBio. The Upload
        object is used to fill the manifest.


Question: Return all variants seen in a given gene .

def Func ( arg_0 , arg_1 = None , arg_2 = 'snv' , arg_3 = [ 'clinical' ] , arg_4 = 50 , arg_5 = 0 ) : arg_6 = arg_0 . build_variant_query ( arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 ) arg_7 = [ ( 'rank_score' , pymongo . DESCENDING ) ] if arg_4 == - 1 : arg_4 = 0 else : arg_4 = arg_5 + arg_4 arg_8 = arg_0 . variant_collection . find ( arg_6 ) . sort ( arg_7 ) . skip ( arg_5 ) . limit ( arg_4 ) return arg_8

Handle Error messages and log them accordingly.

        :param data:
        :param ts:


Question: Print emphasized warning the given txt message

def Func ( arg_0 ) : print ( "%s# %s%s%s" % ( PR_WARN_CC , get_time_stamp ( ) , arg_0 , PR_NC ) ) sys . stdout . flush ( )


Question: Commands for build jobs .

def Func ( arg_0 , arg_1 , Func ) : arg_0 . obj = arg_0 . obj or { } arg_0 . obj [ 'project' ] = arg_1 arg_0 . obj [ 'build' ] = Func

Uploads file to GDocs spreadsheet.
        Content type can be provided as argument, default is ods.


Question: Add files to the repository by explicitly specifying them or by specifying a pattern over files accessed during execution of an executable .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False , arg_4 = False , arg_5 = [ ] , arg_6 = False , arg_7 = None ) : if not arg_3 : arg_8 = Func_files ( arg_1 = arg_1 , arg_2 = arg_2 , arg_7 = arg_7 , arg_6 = arg_6 , arg_4 = arg_4 ) else : arg_8 = run_executable ( arg_0 , arg_1 , arg_5 ) if arg_8 is None or len ( arg_8 ) == 0 : return arg_0 arg_9 = [ ] arg_10 = arg_0 . package for arg_11 in arg_8 : arg_12 = False for arg_13 , arg_14 in enumerate ( arg_10 [ 'resources' ] ) : if arg_11 [ 'relativepath' ] == arg_14 [ 'relativepath' ] : arg_12 = True if arg_11 [ 'sha256' ] == arg_14 [ 'sha256' ] : arg_15 = False for arg_16 in [ 'source' ] : if arg_11 [ arg_16 ] != arg_14 [ arg_16 ] : arg_14 [ arg_16 ] = arg_11 [ arg_16 ] arg_15 = True if arg_15 : arg_9 . append ( arg_11 ) continue else : arg_9 . append ( arg_11 ) arg_10 [ 'resources' ] [ arg_13 ] = arg_11 break if not arg_12 : arg_9 . append ( arg_11 ) arg_10 [ 'resources' ] . append ( arg_11 ) if len ( arg_9 ) == 0 : return 0 arg_0 . manager . Func_files ( arg_0 , arg_9 ) arg_17 = arg_0 . rootdir with cd ( arg_17 ) : arg_18 = "datapackage.json" with open ( arg_18 , 'w' ) as fd : fd . write ( json . dumps ( arg_10 , indent = 4 ) ) return len ( arg_9 )


Question: Perform a GET request and get the contents of the JSON response .

def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_0 . request ( 'GET' , headers = { 'Accept' : 'application/json' } , ** arg_2 ) arg_3 . addCallback ( raise_for_status ) arg_3 . addCallback ( raise_for_header , 'Content-Type' , 'application/json' ) arg_3 . addCallback ( json_content ) arg_3 . addCallback ( arg_0 . _Func , arg_1 ) return arg_3

Calculate the seconds to reset the token requests, by obtaining the different
        between the current date and the next date when the token is fully regenerated.


Question: Renders the given template to a string .

def Func ( arg_0 , arg_1 = None ) : from jinja2 import Template arg_1 = arg_1 or { } arg_2 = find_template ( arg_0 ) assert arg_2 , 'Template not found: %s' % arg_0 arg_3 = open ( arg_2 , 'r' ) . read ( ) arg_4 = Template ( arg_3 ) if arg_1 : arg_5 = env . copy ( ) arg_5 . update ( arg_1 ) else : arg_5 = env arg_6 = arg_4 . render ( ** arg_5 ) arg_6 = arg_6 . replace ( '"' , '"' ) return arg_6

Expand the rank of x up to static_event_rank times for broadcasting.

    The static event rank was checked to not be None at construction time.

    Args:
      x: A tensor to expand.
    Returns:
      The expanded tensor.


Question: Return True if we should retry . False otherwise .

def Func ( arg_0 ) : if isinstance ( arg_0 , apiclient . errors . HttpError ) : if arg_0 . resp . status in TRANSIENT_HTTP_ERROR_CODES : _print_error ( 'Retrying...' ) return True if isinstance ( arg_0 , socket . error ) : if arg_0 . errno in TRANSIENT_SOCKET_ERROR_CODES : _print_error ( 'Retrying...' ) return True if isinstance ( arg_0 , oauth2client . client . AccessTokenRefreshError ) : _print_error ( 'Retrying...' ) return True if isinstance ( arg_0 , SSLError ) : _print_error ( 'Retrying...' ) return True if isinstance ( arg_0 , ServerNotFoundError ) : _print_error ( 'Retrying...' ) return True return False

Add members found in prior versions up till the next major release

    These members are to be considered deprecated. When a new major
    release is made, these members are removed.


Question: Generates a filter chain for validating a security level .

def Func ( ) : return ( f . Type ( int ) | f . Min ( 1 ) | f . Max ( 3 ) | f . Optional ( default = AddressGenerator . DEFAULT_SECURITY_LEVEL ) )

Given an email address, check the email_remapping table to see if the email
        should be sent to a different address. This function also handles overriding
        the email domain if ignore_vcs_email_domain is set or the domain was missing


Question: Transpose just the values of a BoltArraySpark returning a new BoltArraySpark .

def Func ( arg_0 , * arg_1 ) : arg_2 = argpack ( arg_1 ) arg_3 = range ( arg_0 . ndim ) isFuncable ( arg_2 , arg_3 ) if arg_2 == arg_3 : return arg_0 . _barray def f ( arg_4 ) : return arg_4 . Func ( arg_2 ) arg_5 = arg_0 . _barray . _rdd . mapValues ( f ) arg_6 = arg_0 . _barray . keys . shape + tuple ( arg_0 . shape [ i ] for i in arg_2 ) return BoltArraySpark ( arg_5 , shape = arg_6 ) . __finalize__ ( arg_0 . _barray )

Logs into the specified ftp server and returns connector.


Question: Add a callback to the parent to update the state .

def Func ( arg_0 , arg_1 ) : arg_0 . parent = arg_1 try : arg_1 . add_done_callback ( arg_0 . parent_callback ) except Exception as e : logger . error ( "add_done_callback got an exception {} which will be ignored" . format ( e ) )

Return a list of all enrollments for the passed section_id.

        https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index


Question: Wrapper function for TUN and serial port monitoring

def Func ( arg_0 ) : while arg_0 . isRunning . is_set ( ) : try : try : arg_0 . monitorTUN ( ) except timeout_decorator . TimeoutError as error : pass arg_0 . checkSerial ( ) except KeyboardInterrupt : break

This uploads a file to S3.

    Parameters
    ----------

    local_file : str
        Path to the file to upload to S3.

    bucket : str
        The AWS S3 bucket to upload the file to.

    client : boto3.Client or None
        If None, this function will instantiate a new `boto3.Client` object to
        use in its operations. Alternatively, pass in an existing `boto3.Client`
        instance to re-use it here.

    raiseonfail : bool
        If True, will re-raise whatever Exception caused the operation to fail
        and break out immediately.

    Returns
    -------

    str or None
        If the file upload is successful, returns the s3:// URL of the uploaded
        file. If it failed, will return None.


Question: Calculate the Ralleigh number .

def Func ( arg_0 : arg_1 , arg_2 : arg_1 , arg_3 : arg_1 , arg_4 : arg_1 , arg_5 : arg_1 , arg_6 : arg_1 ) -> arg_1 : return g * arg_5 * ( arg_2 - Tinf ) * arg_0 ** 3.0 / ( arg_6 * arg_4 )

Given a Dusty repo object, clone the remote into Dusty's local repos
        directory if it does not already exist.


Question: Handler for cat command

def Func ( arg_0 , arg_1 ) : arg_0 . validate ( 'cmd|s3' , arg_1 ) arg_2 = arg_1 [ 1 ] arg_0 . s3handler ( ) . print_files ( arg_2 )

Assign var, and keep track of conflicts.


Question: Gets the DynamoDB item behind a counter and ties it to a Counter instace .

def Func ( arg_0 , arg_1 , arg_2 = 0 ) : arg_3 = arg_0 . get_item ( hash_key = arg_1 , arg_2 = arg_2 ) arg_4 = Counter ( dynamo_item = arg_3 , pool = arg_0 ) return arg_4

Tries decoding a byte string from the OS into a unicode string

    :param byte_string:
        A byte string

    :return:
        A unicode string


Question: Lookup AQI database for station codes in a given city .

def Func ( arg_0 , arg_1 ) : arg_2 = requests . get ( API_ENDPOINT_SEARCH , params = { 'token' : arg_1 , 'keyword' : arg_0 } ) if arg_2 . status_code == 200 and arg_2 . json ( ) [ "status" ] == "ok" : return [ arg_3 [ "uid" ] for arg_3 in arg_2 . json ( ) [ "data" ] ] else : return [ ]

update secrets will take a secrets credential file
        either located at .sregistry or the environment variable
        SREGISTRY_CLIENT_SECRETS and update the current client
        secrets as well as the associated API base.


Question: A utility function of concatenate .

def Func ( arg_0 , arg_1 = - 1 ) : from deepy . core . neural_var import NeuralVariable if isinstance ( arg_0 [ 0 ] , NeuralVariable ) : arg_2 = Concatenate ( arg_1 = arg_1 ) . compute ( * arg_0 ) if arg_1 == - 1 or arg_1 == arg_0 [ 0 ] . tensor . ndim - 1 : arg_2 . output_dim = sum ( [ x . output_dim for x in arg_0 ] , 0 ) else : arg_2 = TT . Func ( arg_0 , arg_1 ) return arg_2

Synchronize content metadata using the Degreed course content API.

        Args:
            serialized_data: JSON-encoded object containing content metadata.
            http_method: The HTTP method to use for the API request.

        Raises:
            ClientError: If Degreed API request fails.


Question: Gets a Model . Blocks until finished .

def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_2 : raise ValueError ( "Model name must be provided and " "it could not be an empty string" ) arg_3 = 'projects/{}/models/{}' . format ( arg_1 , arg_2 ) arg_4 = arg_0 . _mlengine . projects ( ) . models ( ) . get ( name = arg_3 ) try : return arg_4 . execute ( ) except HttpError as e : if e . resp . status == 404 : arg_0 . log . error ( 'Model was not found: %s' , e ) return None raise

Helper to read the contents of the given file or path into a string with the given encoding.
    Encoding defaults to 'utf-8', other useful encodings are 'ascii' and 'latin-1'.


Question: this function parses the string just like javascript for example literal \ d in JavaScript would be interpreted as d - backslash would be ignored and in Pyhon this would be interpreted as \\ d This function fixes this problem .

def Func ( arg_0 ) : arg_1 = 0 arg_2 = '' arg_3 = len ( arg_0 ) while arg_1 < arg_3 : arg_4 = arg_0 [ arg_1 ] if arg_4 == '\\' : arg_5 , arg_1 = do_escape ( arg_0 , arg_1 ) arg_2 += arg_5 else : arg_2 += arg_4 arg_1 += 1 return arg_2


Question: Shows an open file dialog and open the file if the dialog was accepted .

def Func ( arg_0 ) : arg_1 , arg_2 = QtWidgets . QFileDialog . getOpenFileName ( arg_0 , 'Open' ) if arg_1 : arg_0 . open_file ( arg_1 ) arg_0 . actionRun . setEnabled ( True ) arg_0 . actionConfigure_run . setEnabled ( True )

Number of `params` needed to create a `MixtureSameFamily` distribution.

    Arguments:
      num_components: Number of component distributions in the mixture
        distribution.
      component_params_size: Number of parameters needed to create a single
        component distribution.
      name: The name to use for the op to compute the number of parameters
        (if such an op needs to be created).

    Returns:
     params_size: The number of parameters needed to create the mixture
       distribution.


Question: Convert an arbitrary array to numpy . ndarray .

def Func ( arg_0 , arg_1 = False , arg_2 = None , arg_3 = 'K' ) : if arg_3 not in ( 'C' , 'F' , 'A' , 'K' , None ) : raise ValueError ( "Invalid value for 'order': {}" . format ( str ( arg_3 ) ) ) if isinstance ( arg_0 , np . memmap ) : if arg_2 is None : if arg_3 in ( 'K' , 'A' , None ) : arg_4 = np . array ( np . asarray ( arg_0 ) , arg_1 = True ) else : arg_4 = np . array ( np . asarray ( arg_0 ) , arg_1 = True , arg_3 = arg_3 ) else : if arg_3 in ( 'K' , 'A' , None ) : arg_4 = np . asarray ( arg_0 ) . astype ( arg_2 ) else : arg_4 = _asarray ( np . array ( arg_0 , arg_1 = True ) , arg_2 = arg_2 , arg_3 = arg_3 ) elif isinstance ( arg_0 , np . ndarray ) : arg_4 = _asarray ( arg_0 , arg_2 = arg_2 , arg_3 = arg_3 ) if np . may_share_memory ( arg_4 , arg_0 ) and arg_1 : arg_4 = arg_4 . T . copy ( ) . T if arg_4 . flags [ 'F_CONTIGUOUS' ] else arg_4 . copy ( ) elif isinstance ( arg_0 , ( list , tuple ) ) : if arg_3 in ( "A" , "K" ) : arg_4 = np . asarray ( arg_0 , arg_2 = arg_2 ) else : arg_4 = np . asarray ( arg_0 , arg_2 = arg_2 , arg_3 = arg_3 ) else : raise ValueError ( "Type not handled: {}" . format ( arg_0 . __class__ ) ) return arg_4

Raises OrderError if no package or file defined.
        Raises CardinalityError if already set.
        Raises SPDXValueError if malformed.


Question: Decorator to verify arguments and return types .

def Func ( arg_0 ) : arg_1 = inspect . signature ( arg_0 ) arg_2 = { } for arg_3 in arg_1 . parameters . values ( ) : arg_4 = arg_3 . annotation if arg_4 is arg_3 . empty or not inspect . isclass ( arg_4 ) : continue arg_2 [ arg_3 . name ] = arg_4 if ( arg_3 . default is not arg_3 . empty and not isinstance ( arg_3 . default , arg_4 ) ) : raise ValueError ( "{func}: wrong type of a default value for {arg!r}" . format ( arg_0 = arg_0 . __qualname__ , arg_12 = arg_3 . name ) ) def check_type ( arg_1 , arg_6 , arg_7 , arg_8 ) : if not isinstance ( arg_8 , arg_7 ) : raise ValueError ( "{func}: wrong type of {arg!r} argument, " "{exp!r} expected, got {got!r}" . format ( arg_0 = arg_0 . __qualname__ , arg_12 = arg_6 , exp = arg_7 . __name__ , got = type ( arg_8 ) . __name__ ) ) @ functools . wraps ( arg_0 ) def wrapper ( * arg_9 , ** arg_10 ) : arg_11 = arg_1 . bind ( * arg_9 , ** arg_10 ) for arg_6 , arg_12 in arg_11 . arguments . items ( ) : try : arg_13 = arg_2 [ arg_6 ] except KeyError : continue else : arg_3 = arg_1 . parameters [ arg_6 ] if arg_3 . kind == arg_3 . VAR_POSITIONAL : for arg_14 in arg_12 : check_type ( arg_1 , arg_6 , arg_13 , arg_14 ) elif arg_3 . kind == arg_3 . VAR_KEYWORD : for arg_15 , arg_14 in arg_12 . items ( ) : check_type ( arg_1 , arg_6 + ':' + arg_15 , arg_13 , arg_14 ) else : check_type ( arg_1 , arg_6 , arg_13 , arg_12 ) arg_16 = arg_0 ( * arg_11 . args , ** arg_11 . kwargs ) arg_17 = arg_1 . return_annotation if ( arg_17 is not arg_1 . empty and isinstance ( arg_17 , type ) and not isinstance ( arg_16 , arg_17 ) ) : raise ValueError ( '{func}: wrong return type, {exp} expected, got {got}' . format ( arg_0 = arg_0 . __qualname__ , exp = arg_17 . __name__ , got = type ( arg_16 ) . __name__ ) ) return arg_16 return wrapper

Drop a node from the network

        :param node: node to drop
        :type node: Node


Question: Uploads a file on the server to the desired location

def Func ( arg_0 , arg_1 , arg_2 = '' ) : arg_3 = arg_0 . _ftp . pwd ( ) arg_0 . mkdir ( arg_2 ) arg_0 . cd ( arg_2 ) arg_4 = open ( arg_1 , 'rb' ) arg_1 = arg_1 . split ( '/' ) [ - 1 ] arg_0 . _ftp . storbinary ( 'STOR %s' % arg_1 , arg_4 ) arg_4 . close ( ) arg_0 . cd ( arg_3 )

A generator yielding all protobuf object data in the file. It is the
        main parser of the stream encoding.


Question: set cpu numbers to be used

def Func ( arg_0 ) : arg_1 = cpu_count ( ) - 1 if arg_0 . _processes > arg_1 : arg_2 = arg_1 elif arg_0 . _processes < 1 : arg_2 = 1 else : arg_2 = arg_0 . _processes arg_0 . _processes = int ( arg_2 )

Return HgResource object for path.

        See DAVProvider.get_resource_inst()


Question: Gets the most recent non - zero value for a . last metric or zero for empty data .

def Func ( arg_0 ) : if not arg_0 : return 0 for arg_1 , arg_2 in arg_0 . items ( ) : return next ( ( arg_3 [ 'y' ] for arg_3 in reversed ( arg_2 ) if arg_3 [ 'y' ] > 0 ) , 0 )

Call when there is a change in the instructions.


Question: Compute the column .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 is None : return 0 arg_3 = arg_1 . rfind ( '\n' , 0 , arg_2 . lexpos ) if arg_3 < 0 : arg_3 = 0 arg_4 = ( arg_2 . lexpos - arg_3 ) + 1 return arg_4

Show Program Landing page for the Enterprise's Program.

        Render the Enterprise's Program Enrollment page for a specific program.
        The Enterprise and Program are both selected by their respective UUIDs.

        Unauthenticated learners will be redirected to enterprise-linked SSO.

        A 404 will be raised if any of the following conditions are met:
            * No enterprise customer UUID query parameter ``enterprise_uuid`` found in request.
            * No enterprise customer found against the enterprise customer
                uuid ``enterprise_uuid`` in the request kwargs.
            * No Program can be found given ``program_uuid`` either at all or associated with
                the Enterprise..


Question: Set event in QTM .

async def Func ( arg_0 , arg_1 = None ) : arg_2 = "event%s" % ( "" if arg_1 is None else " " + arg_1 ) return await asyncio . wait_for ( arg_0 . _protocol . send_command ( arg_2 ) , timeout = arg_0 . _timeout )

Generate RENEWING time.

    [:rfc:`2131#section-4.4.5`]::

        T1
        defaults to (0.5 * duration_of_lease).  T2 defaults to (0.875 *
        duration_of_lease).  Times T1 and T2 SHOULD be chosen with some
        random "fuzz" around a fixed value, to avoid synchronization of
        client reacquisition.


Question: Return bool indicating connection state

def Func ( arg_0 ) : try : arg_0 . exec_command ( b"Query(ConnectionState)" ) return arg_0 . status . connection_state . startswith ( b"C(" ) except NotConnectedException : return False

Return an existing CA bundle path, or None


Question: Returns a set of segments defined by the bound_idxs .

def Func ( arg_0 , arg_1 ) : assert len ( arg_1 ) > 0 , "Boundaries can't be empty" arg_1 = np . sort ( arg_1 ) assert arg_1 [ 0 ] >= 0 and arg_1 [ - 1 ] < arg_0 . shape [ 0 ] , "Boundaries are not correct for the given feature dimensions." arg_2 = [ ] for arg_3 in range ( len ( arg_1 ) - 1 ) : arg_2 . append ( arg_0 [ arg_1 [ arg_3 ] : arg_1 [ arg_3 + 1 ] , : ] ) return arg_2

Update the profile picture for the current user.

        Args:
            image (file): a file-like object to read the image from


Question: Raise a runtime error if on Win32 systems .

def Func ( arg_0 ) : @ wraps ( arg_0 ) def wrapper ( * arg_1 , ** arg_2 ) : if platform_is_windows ( ) : raise RuntimeError ( "Router interface is not available on Win32 systems.\n" "Configure AMS routes using the TwinCAT router service." ) return arg_0 ( * arg_1 , ** arg_2 ) return wrapper

Serialize a dataframe.

    Parameters
    ----------
    writer : file
        File-like object to write to. Must be opened in binary mode.
    data_type_id : dict
        Serialization format to use.
        See the azureml.DataTypeIds class for constants.
    dataframe: pandas.DataFrame
        Dataframe to serialize.


Question: Helper function to get scheduler location with a callback . The future watch is placed only if isWatching is True .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_0 . get_scheduler_location_path ( arg_1 ) if arg_3 : LOG . info ( "Adding data watch for path: " + arg_4 ) @ arg_0 . client . DataWatch ( arg_4 ) def watch_scheduler_location ( arg_5 , arg_6 ) : if arg_5 : arg_7 = SchedulerLocation ( ) arg_7 . ParseFromString ( arg_5 ) arg_2 ( arg_7 ) else : arg_2 ( None ) return arg_3

Adds headers to the request

        Args:
            headers (dict): The headers to add the request headers

        Returns:
            The request builder instance in order to chain calls


Question: This is a decorator that retries a function .

def Func ( arg_0 , arg_1 , arg_2 = 0.0 , arg_3 = None ) : def wrapper ( arg_4 ) : @ functools . wraps ( arg_4 ) def new_func ( * arg_5 , ** arg_6 ) : arg_7 = 0 while True : try : arg_8 = arg_4 ( * arg_5 , ** arg_6 ) if arg_7 and arg_3 : arg_9 = logging . getLogger ( arg_3 ) arg_9 . debug ( 'Retry of `%s` successful' % arg_4 . __name__ ) return arg_8 except arg_1 : if arg_7 >= arg_0 : if arg_3 : arg_9 = logging . getLogger ( arg_3 ) arg_9 . exception ( 'I could not execute `%s` with args %s and kwargs %s, ' 'starting next try. ' % ( arg_4 . __name__ , str ( arg_5 ) , str ( arg_6 ) ) ) raise elif arg_3 : arg_9 = logging . getLogger ( arg_3 ) arg_9 . debug ( 'I could not execute `%s` with args %s and kwargs %s, ' 'starting next try. ' % ( arg_4 . __name__ , str ( arg_5 ) , str ( arg_6 ) ) ) arg_7 += 1 if arg_2 : time . sleep ( arg_2 ) return new_func return wrapper

Unregister an extension code.  For testing only.


Question: Attempt to guess where the python source files to mutate are and yield their paths

def Func ( arg_0 , arg_1 ) : if isdir ( arg_0 ) : for arg_2 , arg_3 , arg_4 in os . walk ( arg_0 ) : arg_3 [ : ] = [ d for d in arg_3 if os . path . join ( arg_2 , d ) not in arg_1 ] for arg_5 in arg_4 : if arg_5 . endswith ( '.py' ) : yield os . path . join ( arg_2 , arg_5 ) else : yield arg_0

Return a list of not null values from the `col_name` column of `df`.


Question: Reserves an IPv4 address for the specified subscription .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : _validate_not_none ( 'name' , arg_1 ) return arg_0 . _perform_post ( arg_0 . _get_reserved_ip_path ( ) , _XmlSerializer . create_reserved_ip_to_xml ( arg_1 , arg_2 , arg_3 ) , as_async = True )

Check if files in input file list have the same number of channels


Question: Cut off drivers from statements

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] arg_3 = [ ] for arg_4 in arg_1 : arg_4 . _clean_signal_meta ( ) arg_5 = arg_4 . _Func ( arg_0 ) if arg_5 is not None : arg_2 . append ( arg_5 ) arg_6 = arg_5 is not arg_4 arg_3 . append ( arg_6 ) return list ( compress ( arg_1 , arg_3 ) ) , arg_2


Question: load contents from file_obj returning a generator that yields one element at a time

def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in arg_0 : arg_1 . append ( arg_2 ) if arg_2 == '\n' : arg_3 = '' . join ( arg_1 ) arg_1 = [ ] try : arg_4 = Funcs ( arg_3 ) except ValueError : continue yield arg_4

Set's the package's description.
        Raises SPDXValueError if text is not free form text.
        Raises CardinalityError if description already set.
        Raises OrderError if no package previously defined.


Question: Given a list of pem objects sort the objects into the private key leaf certificate and list of CA certificates in the trust chain . This function assumes that the list of pem objects will contain exactly one private key and exactly one leaf certificate and that only key and certificate type objects are provided .

def Func ( arg_0 ) : arg_1 , arg_2 , arg_3 = [ ] , [ ] , [ ] for arg_4 in arg_0 : if isinstance ( arg_4 , pem . Key ) : arg_1 . append ( arg_4 ) else : if _is_ca ( arg_4 ) : arg_3 . append ( arg_4 ) else : arg_2 . append ( arg_4 ) [ arg_5 ] , [ arg_6 ] = arg_1 , arg_2 return arg_5 , arg_6 , arg_3

Deletes the video

        Authentication is required

        Params:
            entry: video entry fetch via 'fetch_video()'

        Return:
            True if successful

        Raise:
            OperationError: on unsuccessful deletion


Question: Get a page from an interator handling invalid input from the page number by defaulting to the first page .

def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_2 = validate_page_number ( arg_2 ) except ( PageNotAnInteger , EmptyPage ) : arg_2 = 1 arg_3 = ( arg_2 - 1 ) * arg_1 arg_4 = ( arg_2 * arg_1 ) + 1 arg_5 = list ( islice ( arg_0 , arg_3 ) ) arg_6 = list ( islice ( arg_0 , arg_4 ) ) if len ( arg_6 ) == 0 and arg_2 != 1 : arg_6 = arg_5 arg_2 = 1 arg_7 = len ( arg_6 ) > arg_1 arg_6 = arg_6 [ : arg_1 ] return NoCountPage ( arg_6 , arg_2 , arg_1 , arg_7 )

Convert transfer function filter parameters to zero-pole-gain form

    Find the zeros, poles, and gains of this continuous-time system:

    .. warning:: b and a must have the same length.

    ::

        from spectrum import tf2zp
        b = [2,3,0]
        a = [1, 0.4, 1]
        [z,p,k] = tf2zp(b,a)          % Obtain zero-pole-gain form
        z =
            1.5
            0
        p =
           -0.2000 + 0.9798i
            -0.2000 - 0.9798i
        k =
           2

    :param b: numerator
    :param a: denominator
    :param fill: If True, check that the length of a and b are the same. If not, create a copy of the shortest element and append zeros to it.
    :return: z (zeros), p (poles), g (gain)

    Convert transfer function f(x)=sum(b*x^n)/sum(a*x^n) to
    zero-pole-gain form f(x)=g*prod(1-z*x)/prod(1-p*x)

    .. todo:: See if tf2ss followed by ss2zp gives better results.  These
        are available from the control system toolbox.  Note that
        the control systems toolbox doesn't bother, but instead uses

    .. seealso:: scipy.signal.tf2zpk, which gives the same results but uses a different
        algorithm (z^-1 instead of z).


Question: Executed by task_instance at runtime

def Func ( arg_0 , arg_1 ) : arg_2 = S3Hook ( arg_0 . s3_conn_id ) if arg_0 . is_pipeline : arg_3 = MongoHook ( arg_0 . mongo_conn_id ) . aggregate ( mongo_collection = arg_0 . mongo_collection , aggregate_query = arg_0 . mongo_query , mongo_db = arg_0 . mongo_db ) else : arg_3 = MongoHook ( arg_0 . mongo_conn_id ) . find ( mongo_collection = arg_0 . mongo_collection , query = arg_0 . mongo_query , mongo_db = arg_0 . mongo_db ) arg_4 = arg_0 . _stringify ( arg_0 . transform ( arg_3 ) ) arg_2 . load_string ( string_data = arg_4 , key = arg_0 . s3_key , bucket_name = arg_0 . s3_bucket , replace = arg_0 . replace ) return True

Inform the widget about the encoding of the underlying character stream.


Question: Start listening for events from Marathon running a sync when we first successfully subscribe and triggering a sync on API request events .

def Func ( arg_0 , arg_1 = 0 ) : arg_0 . log . info ( 'Listening for events from Marathon...' ) arg_0 . _attached = False def on_finished ( arg_3 , arg_1 ) : arg_0 . log . warn ( 'Connection lost listening for events, ' 'reconnecting... ({reconnects} so far)' , arg_1 = arg_1 ) arg_1 += 1 return arg_0 . Func ( arg_1 ) def log_failure ( arg_4 ) : arg_0 . log . failure ( 'Failed to listen for events' , arg_4 ) return arg_4 return arg_0 . marathon_client . get_events ( { 'event_stream_attached' : arg_0 . _sync_on_event_stream_attached , 'api_post_event' : arg_0 . _sync_on_api_post_event } ) . addCallbacks ( on_finished , log_failure , callbackArgs = [ arg_1 ] )

Add a thing to the environment, setting its location. For
        convenience, if thing is an agent program we make a new agent
        for it. (Shouldn't need to override this.


Question: Concatenate images in the direction determined in axis .

def Func ( arg_0 , arg_1 = 't' ) : if not arg_0 : return None arg_2 = { 'x' : 0 , 'y' : 1 , 'z' : 2 , 't' : 3 , } if arg_1 not in arg_2 : raise ValueError ( 'Expected `axis` to be one of ({}), got {}.' . format ( set ( arg_2 . keys ( ) ) , arg_1 ) ) arg_3 = arg_0 [ 0 ] for arg_4 in arg_0 : check_img_compatibility ( arg_3 , arg_4 ) arg_5 = [ ] for arg_4 in arg_0 : arg_5 . append ( check_img ( arg_4 ) . get_data ( ) ) arg_6 = arg_2 [ arg_1 ] arg_7 = arg_5 [ 0 ] . ndim if arg_7 - 1 < arg_6 : arg_5 = [ np . expand_dims ( arg_4 , arg_1 = arg_6 ) for arg_4 in arg_5 ] return np . concatenate ( arg_5 , arg_1 = arg_6 )


Question: Convert to equivalent StandardScaler

def Func ( arg_0 ) : arg_1 = StandardScaler ( with_mean = arg_0 . with_mean , with_std = arg_0 . with_std , copy = arg_0 . copy ) arg_1 . __dict__ = arg_0 . __dict__ return arg_1


Question: Plays the first track in the queue if any or plays a track from the specified index in the queue .

async def Func ( arg_0 , arg_1 : arg_2 = 0 , arg_3 : arg_4 = False ) : if arg_0 . repeat and arg_0 . current : arg_0 . queue . append ( arg_0 . current ) arg_0 . previous = arg_0 . current arg_0 . current = None arg_0 . position = 0 arg_0 . paused = False if not arg_0 . queue : await arg_0 . stop ( ) await arg_0 . _lavalink . dispatch_event ( QueueEndEvent ( arg_0 ) ) else : if arg_0 . shuffle and not arg_3 : arg_9 = arg_0 . queue . pop ( randrange ( len ( arg_0 . queue ) ) ) else : arg_9 = arg_0 . queue . pop ( min ( arg_1 , len ( arg_0 . queue ) - 1 ) ) arg_0 . current = arg_9 await arg_0 . _lavalink . ws . send ( op = 'Func' , guildId = arg_0 . guild_id , arg_9 = arg_9 . track ) await arg_0 . _lavalink . dispatch_event ( TrackStartEvent ( arg_0 , arg_9 ) )

AWS doesn't quite have Swagger 2.0 validation right and will fail
        on some refs. So, we need to convert to deref before
        upload.


Question: Exports Hive table to remote location . Arguments are copies of direct sqoop command line Arguments

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 = None ) : arg_15 = arg_0 . _export_cmd ( 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 ) arg_0 . Popen ( arg_15 )

Prepare received data for representation.

        Args:
            data (dict): values to represent (ex. {'001' : 130})
            number_to_keep (int): number of elements to show individually.

        Returns:
            dict: processed data to show.


Question: Register an io - handler with the glib main loop .

def Func ( arg_0 , arg_1 ) : if arg_0 . check_events ( ) : return if arg_1 in arg_0 . _unprepared_handlers : arg_2 = arg_0 . _unprepared_handlers [ arg_1 ] arg_3 = arg_0 . _prepare_io_handler ( arg_1 ) else : arg_2 = None arg_3 = True arg_4 = arg_1 . fileno ( ) if arg_2 is not None and arg_4 != arg_2 : arg_5 = arg_0 . _io_sources . pop ( arg_1 , None ) if arg_5 is not None : glib . source_remove ( arg_5 ) if not arg_3 : arg_0 . _unprepared_handlers [ arg_1 ] = arg_4 if arg_4 is None : logger . debug ( " {0!r}.fileno() is None, not polling" . format ( arg_1 ) ) return arg_7 = 0 if arg_1 . is_readable ( ) : logger . debug ( " {0!r} readable" . format ( arg_1 ) ) arg_7 |= glib . IO_IN | glib . IO_ERR if arg_1 . is_writable ( ) : logger . debug ( " {0!r} writable" . format ( arg_1 ) ) arg_7 |= glib . IO_OUT | glib . IO_HUP | glib . IO_ERR if arg_7 : logger . debug ( " registering {0!r} handler fileno {1} for" " events {2}" . format ( arg_1 , arg_4 , arg_7 ) ) glib . io_add_watch ( arg_4 , arg_7 , arg_0 . _io_callback , arg_1 )


Question: Yields DOE CODE records from a DOE CODE . json URL response Converts a DOE CODE API . json URL response into DOE CODE projects

def Func ( arg_0 , arg_1 ) : logger . debug ( 'Fetching DOE CODE JSON: %s' , arg_0 ) if arg_1 is None : raise ValueError ( 'DOE CODE API Key value is missing!' ) arg_2 = requests . get ( arg_0 , headers = { "Authorization" : "Basic " + arg_1 } ) arg_3 = arg_2 . json ( ) for arg_4 in arg_3 [ 'records' ] : yield arg_4

Adjust contrast of an Image.

    Args:
        img (PIL Image): PIL Image to be adjusted.
        contrast_factor (float): How much to adjust the contrast. Can be any
            non negative number. 0 gives a solid gray image, 1 gives the
            original image while 2 increases the contrast by a factor of 2.

    Returns:
        PIL Image: Contrast adjusted image.


Question: Calculates LM updates with or without the acceleration correction .

def Func ( arg_0 , arg_1 , arg_2 = True , arg_3 = None ) : if arg_3 is not None : if ( arg_3 . sum ( ) == 0 ) or ( arg_3 . size == 0 ) : CLOG . fatal ( 'Empty subblock in Func' ) raise ValueError ( 'Empty sub-block' ) arg_4 = arg_0 . J [ arg_3 ] arg_5 = np . dot ( arg_4 , arg_4 . T ) arg_6 = arg_0 . _calc_damped_jtj ( arg_5 , arg_3 = arg_3 ) arg_1 = arg_1 [ arg_3 ] else : arg_6 = arg_0 . _calc_damped_jtj ( arg_0 . JTJ , arg_3 = arg_3 ) arg_7 = arg_0 . _calc_lm_step ( arg_6 , arg_1 , arg_3 = arg_3 ) if arg_0 . use_accel : arg_8 = arg_0 . calc_accel_correction ( arg_6 , arg_7 ) arg_9 = np . sqrt ( np . sum ( arg_7 ** 2 ) ) arg_10 = np . sqrt ( np . sum ( arg_8 ** 2 ) ) CLOG . debug ( '|correction| / |LM step|\t%e' % ( arg_10 / arg_9 ) ) if arg_10 / arg_9 < arg_0 . max_accel_correction : arg_7 += arg_8 elif arg_2 : CLOG . debug ( 'Untrustworthy step! Increasing damping...' ) arg_0 . increase_damping ( ) arg_6 = arg_0 . _calc_damped_jtj ( arg_0 . JTJ , arg_3 = arg_3 ) arg_7 = arg_0 . _calc_lm_step ( arg_6 , arg_1 , arg_3 = arg_3 ) if np . any ( np . isnan ( arg_7 ) ) : CLOG . fatal ( 'Calculated steps have nans!?' ) raise FloatingPointError ( 'Calculated steps have nans!?' ) return arg_7

Initialize bluez DBus communication.  Must be called before any other
        calls are made!


Question: Delete the exons collection

def Func ( arg_0 , arg_1 = None ) : if arg_1 : LOG . info ( "Dropping the exons collection, build %s" , arg_1 ) arg_0 . exon_collection . delete_many ( { 'build' : arg_1 } ) else : LOG . info ( "Dropping the exons collection" ) arg_0 . exon_collection . drop ( )

Fit and score an estimator with cross-validation

    This function is basically a copy of sklearn's
    model_selection._BaseSearchCV._fit(), which is the core of the GridSearchCV
    fit() method. Unfortunately, that class does _not_ return the training
    set scores, which we want to save in the database, and because of the
    way it's written, you can't change it by subclassing or monkeypatching.

    This function uses some undocumented internal sklearn APIs (non-public).
    It was written against sklearn version 0.16.1. Prior Versions are likely
    to fail due to changes in the design of cross_validation module.

    Returns
    -------
    out : dict, with keys 'mean_test_score' 'test_scores', 'train_scores'
        The scores on the training and test sets, as well as the mean test set
        score.


Question: Return module sequence discovered from self . package_name

def Func ( arg_0 ) : arg_1 = [ arg_0 . package_name ] for arg_2 , arg_3 , arg_4 in os . walk ( arg_0 . root_path ) : arg_5 = arg_0 . _path2uri ( os . path . join ( arg_0 . root_path , arg_2 ) ) for arg_6 in arg_3 [ : ] : arg_7 = '.' . join ( ( arg_5 , arg_6 ) ) if ( arg_0 . _uri2path ( arg_7 ) and arg_0 . _survives_exclude ( arg_7 , 'package' ) ) : arg_1 . append ( arg_7 ) else : arg_3 . remove ( arg_6 ) for arg_8 in arg_4 : arg_9 = arg_8 [ : - 3 ] arg_10 = '.' . join ( ( arg_5 , arg_9 ) ) if ( arg_0 . _uri2path ( arg_10 ) and arg_0 . _survives_exclude ( arg_10 , 'module' ) ) : arg_1 . append ( arg_10 ) return sorted ( arg_1 )

Temporal distance probability density function.

        Returns
        -------
        non_delta_peak_split_points: numpy.array
        non_delta_peak_densities: numpy.array
            len(density) == len(temporal_distance_split_points_ordered) -1
        delta_peak_loc_to_probability_mass : dict


Question: Returns domain name portion of a URL

def Func ( arg_0 ) : if 'http' not in arg_0 . lower ( ) : arg_0 = 'http://{}' . format ( arg_0 ) return urllib . parse . urlparse ( arg_0 ) . hostname


Question: Parse a HTML fragment into a well - formed tree fragment

def Func ( arg_0 , arg_1 , arg_2 = "div" , arg_3 = None , arg_4 = False , arg_5 = True ) : arg_0 . _parse ( arg_1 , True , arg_2 = arg_2 , arg_3 = arg_3 ) return arg_0 . tree . getFragment ( )

This method is called before first step of simulation.


Question: Update various internal variables from a model update from oldmodel to newmodel for the tile tile

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_0 . _loglikelihood -= arg_0 . _calc_loglikelihood ( arg_1 , arg_3 = arg_3 ) arg_0 . _loglikelihood += arg_0 . _calc_loglikelihood ( arg_2 , arg_3 = arg_3 ) arg_0 . _residuals [ arg_3 . slicer ] = arg_0 . _data [ arg_3 . slicer ] - arg_2

Call all plugins, yielding each item in each non-None result.


Question: Update disease terms in mongo database .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . obj [ 'adapter' ] arg_1 = arg_1 or arg_0 . obj . get ( 'omim_api_key' ) if not arg_1 : LOG . warning ( "Please provide a omim api key to load the omim gene panel" ) arg_0 . abort ( ) try : arg_3 = fetch_mim_files ( arg_1 , genemap2 = True ) except Exception as err : LOG . warning ( err ) arg_0 . abort ( ) LOG . info ( "Dropping DiseaseTerms" ) arg_2 . disease_term_collection . drop ( ) LOG . debug ( "DiseaseTerms dropped" ) load_disease_terms ( arg_2 = arg_2 , genemap_lines = arg_3 [ 'genemap2' ] , ) LOG . info ( "Successfully loaded all disease terms" )


Question: basic support for evaluate at server at least to run some unittest do not expect this to work from strings

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = False ) : arg_1 = _ensure_strings_from_expressions ( arg_1 ) arg_7 = arg_0 . server . _call_dataset ( "Func" , arg_0 , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_5 = arg_5 , arg_6 = arg_6 ) return arg_7

Add this manager's namespace to the graph.


Question: Regenerates the primary or secondary access key for the specified storage account .

def Func ( arg_0 , arg_1 , arg_2 ) : _validate_not_none ( 'service_name' , arg_1 ) _validate_not_none ( 'key_type' , arg_2 ) return arg_0 . _perform_post ( arg_0 . _get_storage_service_path ( arg_1 ) + '/keys?action=regenerate' , _XmlSerializer . regenerate_keys_to_xml ( arg_2 ) , StorageService )


Question: Registers a new job or updates an existing job

def Func ( arg_0 , arg_1 , arg_2 ) : return arg_0 . request ( arg_1 , json = arg_2 , method = "post" ) . json ( )

Calculate the phase's magnetic contribution to heat capacity at the
        specified temperature.

        :param T: [K] temperature

        :returns: [J/mol/K] The magnetic heat capacity of the compound phase.

        Dinsdale, A. T. (1991). SGTE data for pure elements. Calphad, 15(4),
        317–425. http://doi.org/10.1016/0364-5916(91)90030-N


Question: Return card info .

def Func ( arg_0 , arg_1 ) : arg_2 = baseId ( arg_1 ) if arg_2 in arg_0 . players : return arg_0 . players [ arg_2 ] else : arg_3 = '{0}{1}.json' . format ( card_info_url , arg_2 ) return requests . get ( arg_3 , timeout = arg_0 . timeout ) . json ( )

Destroy nDestroy synapses on the specified segment, but don't destroy
    synapses to the "excludeCells".


Question: Delete the specified InactivityAlert

def Func ( arg_0 , arg_1 ) : arg_2 = 'https://logentries.com/rest/{account_id}/api/tags/{tag_id}' arg_0 . _api_Func ( url = arg_2 . format ( account_id = arg_0 . account_id , arg_1 = arg_1 ) )

Attempts to find the Teradata install directory with the defaults
    for a given platform.  Should always return `None` when the defaults
    are not present and the TERADATA_HOME environment variable wasn't
    explicitly set to the correct install location.


Question: Create profile stats file and load profiler .

def Func ( arg_0 ) : if not arg_0 . available ( ) : return arg_0 . _create_pfile ( ) arg_0 . prof = hotshot . Profile ( arg_0 . pfile )

A list of row indices to remove. There are two caveats. First, this is
    a potentially slow operation. Second, pattern indices will shift if
    patterns before them are removed.


Question: Removes the association

def Func ( arg_0 , arg_1 = None , arg_2 = True ) : warn ( "Use cobra.manipulation.remove_genes instead" ) if arg_1 is not None : if arg_1 != arg_0 . _model : raise Exception ( "%s is a member of %s, not %s" % ( repr ( arg_0 ) , repr ( arg_0 . _model ) , repr ( arg_1 ) ) ) if arg_0 . _model is None : raise Exception ( '%s is not in a model' % repr ( arg_0 ) ) if arg_2 : arg_3 = 'False' else : arg_3 = 'True' arg_4 = re . compile ( '(^|(?<=( |\()))%s(?=( |\)|$))' % re . escape ( arg_0 . id ) ) arg_5 = arg_0 . _model . get_associated_groups ( arg_0 ) for arg_6 in arg_5 : arg_6 . remove_members ( arg_0 ) arg_0 . _model . genes . remove ( arg_0 ) arg_0 . _model = None for arg_8 in list ( arg_0 . _reaction ) : arg_8 . _gene_reaction_rule = arg_4 . sub ( arg_3 , arg_8 . gene_reaction_rule ) arg_8 . _genes . remove ( arg_0 ) arg_10 = arg_8 . gene_reaction_rule for arg_11 in arg_8 . _genes : arg_12 = re . compile ( '(^|(?<=( |\()))%s(?=( |\)|$))' % re . escape ( arg_11 . id ) ) arg_10 = arg_12 . sub ( 'True' , arg_10 ) if not eval ( arg_10 ) : arg_8 . lower_bound = 0 arg_8 . upper_bound = 0 arg_0 . _reaction . clear ( )

main execution loop. query weather data and post to online service.


Question: Bind the server unless it is already bound this is a read - only node or the last attempt was too recently .

def Func ( arg_0 ) : if arg_0 . _ready or arg_0 . _selfIsReadonlyNode or time . time ( ) < arg_0 . _lastBindAttemptTime + arg_0 . _syncObj . conf . bindRetryTime : return arg_0 . _lastBindAttemptTime = time . time ( ) try : arg_0 . _server . bind ( ) except Exception as e : arg_0 . _bindAttempts += 1 if arg_0 . _syncObj . conf . maxBindRetries and arg_0 . _bindAttempts >= arg_0 . _syncObj . conf . maxBindRetries : arg_0 . _bindOverEvent . set ( ) raise TransportNotReadyError else : arg_0 . _ready = True arg_0 . _bindOverEvent . set ( )

Delete existing messages.

        http://dev.wheniwork.com/#delete-existing-message


Question: Retrive an user with a spotify ID .

async def Func ( arg_0 , arg_1 : arg_2 ) -> User : arg_3 = await arg_0 . http . user ( to_id ( arg_1 ) ) return User ( arg_0 , arg_3 )

Runs Picard MarkDuplicates on a BAM file. Requires that the BAM file be coordinate sorted.

    :param JobFunctionWrappingJob job: passed automatically by Toil
    :param str bam: FileStoreID for BAM file
    :param str bai: FileStoreID for BAM index file
    :param str validation_stringency: BAM file validation stringency, default is LENIENT
    :return: FileStoreIDs for BAM and BAI files
    :rtype: tuple


Question: Calculates various bootstrapped performance metrics of a strategy .

def Func ( arg_0 , arg_1 = None , arg_2 = True , ** arg_3 ) : arg_4 = OrderedDict ( ) for arg_5 in SIMPLE_STAT_FUNCS : arg_6 = STAT_FUNC_NAMES [ arg_5 . __name__ ] arg_4 [ arg_6 ] = calc_bootstrap ( arg_5 , arg_0 ) if arg_1 is not None : for arg_5 in FACTOR_STAT_FUNCS : arg_6 = STAT_FUNC_NAMES [ arg_5 . __name__ ] arg_4 [ arg_6 ] = calc_bootstrap ( arg_5 , arg_0 , arg_1 = arg_1 ) arg_4 = pd . DataFrame ( arg_4 ) if arg_2 : arg_7 = arg_4 . apply ( calc_distribution_stats ) return arg_7 . T [ [ 'mean' , 'median' , '5%' , '95%' ] ] else : return arg_4

Stops the notebook deployment for this project if it exists.

    Uses [Caching](/references/polyaxon-cli/#caching)


Question: Return the minimum of the array over the given axis .

def Func ( arg_0 , arg_1 = None , arg_2 = False ) : from numpy import Funcimum return arg_0 . _stat ( arg_1 , func = Funcimum , arg_2 = arg_2 )


Question: Load a jam and pack it with audio .

def Func ( arg_0 , arg_1 , arg_2 = True , arg_3 = True , arg_4 = 'auto' , ** arg_5 ) : if isinstance ( arg_0 , jams . JAMS ) : arg_6 = arg_0 else : arg_6 = jams . load ( arg_0 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 ) arg_7 , arg_8 = librosa . load ( arg_1 , ** arg_5 ) if arg_6 . file_metadata . duration is None : arg_6 . file_metadata . duration = librosa . get_duration ( arg_7 = arg_7 , arg_8 = arg_8 ) return jam_pack ( arg_6 , _audio = dict ( arg_7 = arg_7 , arg_8 = arg_8 ) )


Question: formats a logging . Record into a standard json log entry

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . __dict__ . copy ( ) arg_0 . _set_exc_info ( arg_2 ) arg_3 = 'default' if arg_2 . get ( 'event_name' ) : arg_3 = arg_2 . pop ( 'event_name' ) arg_4 = 'INFO' if arg_2 . get ( 'log_level' ) : arg_4 = arg_2 . pop ( 'log_level' ) [ arg_2 . pop ( arg_5 ) for arg_5 in arg_2 . keys ( ) if arg_5 not in arg_0 . fields ] arg_6 = arg_0 . defaults . copy ( ) arg_7 = arg_0 . fields . copy ( ) arg_7 . update ( arg_2 ) arg_8 = { } for arg_5 , arg_9 in arg_7 . iteritems ( ) : if arg_9 is not None : arg_8 [ arg_5 ] = arg_9 arg_6 . update ( { 'event_timestamp' : arg_0 . _get_now ( ) , 'event_name' : arg_3 , 'log_level' : arg_4 , 'fields' : arg_8 } ) return json . dumps ( arg_6 , default = arg_0 . json_default )


Question: Get a list representation of repository state along with useful information . List state is ordered relativeley to directories level

def Func ( arg_0 , arg_1 = None ) : arg_2 = [ ] def _walk_dir ( arg_1 , arg_3 ) : arg_4 = { 'type' : 'dir' , 'exists' : os . path . isdir ( os . path . join ( arg_0 . __path , arg_1 ) ) , 'pyrepdirinfo' : os . path . isfile ( os . path . join ( arg_0 . __path , arg_1 , arg_0 . __dirInfo ) ) , } arg_2 . append ( { arg_1 : arg_4 } ) for arg_5 in sorted ( [ f for f in arg_3 if isinstance ( f , basestring ) ] ) : arg_6 = os . path . join ( arg_1 , arg_5 ) arg_7 = os . path . join ( arg_0 . __path , arg_6 ) arg_8 = { 'type' : 'file' , 'exists' : os . path . isfile ( arg_7 ) , 'pyrepfileinfo' : os . path . isfile ( os . path . join ( arg_0 . __path , arg_1 , arg_0 . __fileInfo % arg_5 ) ) , } arg_2 . append ( { arg_6 : arg_8 } ) for arg_9 in sorted ( [ d for d in arg_3 if isinstance ( d , dict ) ] , key = lambda k : list ( k ) [ 0 ] ) : arg_10 = list ( arg_9 ) [ 0 ] _walk_dir ( arg_1 = os . path . join ( arg_1 , arg_10 ) , arg_3 = arg_9 [ arg_10 ] ) if arg_1 is None : _walk_dir ( arg_1 = '' , arg_3 = arg_0 . __repo [ 'walk_repo' ] ) else : assert isinstance ( arg_1 , basestring ) , "relaPath must be None or a str" arg_1 = arg_0 . to_repo_relative_path ( path = arg_1 , split = False ) arg_11 = arg_1 . split ( os . sep ) arg_3 = arg_0 . __repo [ 'walk_repo' ] while len ( arg_11 ) : arg_10 = arg_11 . pop ( 0 ) arg_12 = [ d for d in arg_3 if isinstance ( d , dict ) ] if not len ( arg_12 ) : arg_3 = None break arg_13 = [ d for d in arg_12 if arg_10 in d ] if not len ( arg_13 ) : arg_3 = None break arg_3 = arg_13 [ 0 ] [ arg_10 ] if arg_3 is not None : _walk_dir ( arg_1 = arg_1 , arg_3 = arg_3 ) return arg_2

Filter custom fields from a given set of fields.

    :param fields: set of fields

    :returns: an object with the filtered custom fields


Question: Remove a list of metabolites from the the object .

def Func ( arg_0 , arg_1 , arg_2 = False ) : if not hasattr ( arg_1 , '__iter__' ) : arg_1 = [ arg_1 ] arg_1 = [ arg_3 for arg_3 in arg_1 if arg_3 . id in arg_0 . metabolites ] for arg_3 in arg_1 : arg_3 . _model = None arg_5 = arg_0 . get_associated_groups ( arg_3 ) for arg_6 in arg_5 : arg_6 . remove_members ( arg_3 ) if not arg_2 : for arg_7 in list ( arg_3 . _reaction ) : arg_8 = arg_7 . _metabolites [ arg_3 ] arg_7 . subtract_metabolites ( { arg_3 : arg_8 } ) else : for arg_3 in list ( arg_3 . _reaction ) : arg_3 . remove_from_model ( ) arg_0 . metabolites -= arg_1 arg_9 = [ arg_0 . solver . constraints [ m . id ] for m in arg_1 ] arg_0 . remove_cons_vars ( arg_9 ) arg_10 = get_context ( arg_0 ) if arg_10 : arg_10 ( partial ( arg_0 . metabolites . __iadd__ , arg_1 ) ) for arg_3 in arg_1 : arg_10 ( partial ( setattr , arg_3 , '_model' , arg_0 ) )

An integer-valued dimension bounded between `min` <= x <= `max`.
        Note that the right endpoint of the interval includes `max`.

        When `warp` is None, the base measure associated with this dimension
        is a categorical distribution with each weight on each of the integers
        in [min, max]. With `warp == 'log'`, the base measure is a uniform
        distribution on the log of the variable, with bounds at `log(min)` and
        `log(max)`. This is appropriate for variables that are "naturally" in
        log-space. Other `warp` functions are not supported (yet), but may be
        at a later time. Please note that this functionality is not supported
        for `hyperopt_tpe`.


Question: Returns next available data record from the file .

def Func ( arg_0 , arg_1 = True ) : assert arg_0 . _file is not None assert arg_0 . _mode == arg_0 . _FILE_READ_MODE try : arg_2 = arg_0 . _reader . next ( ) except StopIteration : if arg_0 . rewindAtEOF : if arg_0 . _recordCount == 0 : raise Exception ( "The source configured to reset at EOF but " "'%s' appears to be empty" % arg_0 . _filename ) arg_0 . rewind ( ) arg_2 = arg_0 . _reader . next ( ) else : return None arg_0 . _recordCount += 1 arg_3 = [ ] for arg_4 , arg_5 in enumerate ( arg_2 ) : if arg_5 in arg_0 . _missingValues : arg_3 . append ( SENTINEL_VALUE_FOR_MISSING_DATA ) else : arg_3 . append ( arg_0 . _adapters [ arg_4 ] ( arg_5 ) ) return arg_3

Given a unicode string, will do its dandiest to give you back a
    valid ascii charset string you can use in, say, http headers and the
    like.


Question: Handles the component being changed .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . canvas if arg_1 is not None : arg_3 . remove ( arg_1 ) if arg_2 is not None : arg_3 . add ( arg_2 )

Returns a list of dicts representing issues from a remote service.


Question: Formats a transaction DataFrame .

def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in arg_0 . index : arg_3 = arg_0 . loc [ arg_2 ] if len ( arg_3 ) == 0 : continue for arg_4 in arg_3 : arg_4 = map_transaction ( arg_4 ) arg_1 . append ( arg_4 ) arg_5 = pd . DataFrame ( sorted ( arg_1 , key = lambda x : x [ 'dt' ] ) ) arg_5 [ 'txn_dollars' ] = - arg_5 [ 'amount' ] * arg_5 [ 'price' ] arg_5 . index = list ( map ( pd . Timestamp , arg_5 . dt . values ) ) return arg_5

Delete previous webhooks. If local ngrok tunnel, create a webhook.


Question: Generates a single key .

def Func ( arg_0 , arg_1 , arg_2 ) : return ( arg_0 . Funcs ( start = arg_1 , count = 1 , step = 1 , arg_2 = arg_2 , ) [ 0 ] )

Given a single spinn3r feed entry, produce a single StreamItem.

    Returns 'None' if a complete item can't be constructed.


Question: Send a chat message to a conversation .

async def Func ( arg_0 , arg_1 ) : arg_2 = hangouts_pb2 . SendChatMessageResponse ( ) await arg_0 . _pb_request ( 'conversations/sendchatmessage' , arg_1 , arg_2 ) return arg_2

Print informations about PyFunceble and the date of generation of a file
        into a given path, if doesn't exist.


Question: Execute asynchronousely without waiting for exitcode

def Func ( arg_0 , arg_1 , arg_2 = 2 , arg_3 = { } ) : arg_4 , arg_5 , arg_6 = arg_0 . ssh_client . exec_command ( arg_0 . prepend_envs ( arg_1 , arg_3 ) , bufsize = - 1 , timeout = arg_2 ) return None , arg_5 , arg_6


Question: Create a new layer populated with a point sampling of the current mesh at most one sample for each element of the mesh is created .

def Func ( arg_0 , arg_1 = 1000 , arg_2 = 'VERT' ) : if arg_2 . lower ( ) == 'vert' : arg_3 = 0 elif arg_2 . lower ( ) == 'edge' : arg_3 = 1 elif arg_2 . lower ( ) == 'face' : arg_3 = 2 arg_4 = '' . join ( [ '  <filter name="Mesh Element Subsampling">\n' , '    <Param name="Sampling" ' , 'value="{:d}" ' . format ( arg_3 ) , 'description="Element to sample:" ' , 'enum_val0="Vertex" ' , 'enum_val1="Edge" ' , 'enum_val2="Face" ' , 'enum_cardinality="3" ' , 'type="RichEnum" ' , '/>\n' , '    <Param name="SampleNum" ' , 'value="{:d}" ' . format ( arg_1 ) , 'description="Number of samples" ' , 'type="RichInt" ' , '/>\n' , '  </filter>\n' ] ) util . write_filter ( arg_0 , arg_4 ) if isinstance ( arg_0 , FilterScript ) : arg_0 . add_layer ( 'Sampled Mesh' ) return None

Generate a tag for the alignment of the geometry of the bulge and disk of a bulge-disk system, to customize \
    phase names based on the bulge-disk model. This adds together the bulge_disk tags generated in the 3 functions
    above


Question: Copy code running in current environment to memory

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_0 . _allocate ( arg_1 , arg_3 ) arg_4 = 3 arg_5 = arg_0 . safe_mul ( arg_4 , Operators . UDIV ( arg_0 . safe_add ( arg_3 , 31 ) , 32 ) ) arg_0 . _consume ( arg_5 ) if issymbolic ( arg_3 ) : arg_6 = solver . max ( arg_0 . constraints , arg_3 ) else : arg_6 = arg_3 for arg_7 in range ( arg_6 ) : if issymbolic ( arg_7 < arg_3 ) : arg_8 = Operators . ITEBV ( 8 , arg_7 < arg_3 , 0 , arg_0 . _load ( arg_1 + arg_7 , 1 ) ) else : if arg_7 < arg_3 : arg_8 = 0 else : arg_8 = arg_0 . _load ( arg_1 + arg_7 , 1 ) if issymbolic ( arg_2 ) : arg_9 = Operators . ITEBV ( 8 , arg_2 + arg_7 >= len ( arg_0 . bytecode ) , arg_8 , arg_0 . bytecode [ arg_2 + arg_7 ] ) else : if arg_2 + arg_7 >= len ( arg_0 . bytecode ) : arg_9 = arg_8 else : arg_9 = arg_0 . bytecode [ arg_2 + arg_7 ] arg_0 . _store ( arg_1 + arg_7 , arg_9 ) arg_0 . _publish ( 'did_evm_read_code' , arg_2 , arg_3 )

Creates a SecBufferDesc struct and contained SecBuffer structs

        :param number:
            The number of contains SecBuffer objects to create

        :return:
            A tuple of (SecBufferDesc pointer, SecBuffer array)


Question: Fit and score an estimator with cross - validation

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None , arg_5 = None , arg_6 = True , arg_7 = 1 , arg_8 = 1 , arg_9 = '2*n_jobs' ) : arg_10 = check_scoring ( arg_0 , arg_5 = arg_5 ) arg_11 = num_samples ( arg_3 ) arg_3 , arg_4 = check_arrays ( arg_3 , arg_4 , allow_lists = True , sparse_format = 'csr' , allow_nans = True ) if arg_4 is not None : if len ( arg_4 ) != arg_11 : raise ValueError ( 'Target variable (y) has a different number ' 'of samples (%i) than data (X: %i samples)' % ( len ( arg_4 ) , arg_11 ) ) arg_2 = check_cv ( arg_2 = arg_2 , arg_4 = arg_4 , classifier = is_classifier ( arg_0 ) ) arg_12 = Parallel ( arg_7 = arg_7 , arg_8 = arg_8 , arg_9 = arg_9 ) ( delayed ( _fit_and_score ) ( clone ( arg_0 ) , arg_3 , arg_4 , arg_10 , train , test , arg_8 , arg_1 , fit_params = None ) for train , test in arg_2 . split ( arg_3 , arg_4 ) ) assert len ( arg_12 ) == arg_2 . n_splits arg_13 , arg_14 = [ ] , [ ] arg_15 , arg_16 = [ ] , [ ] for arg_17 , arg_18 , arg_19 , arg_20 , arg_21 in arg_12 : arg_13 . append ( arg_19 ) arg_14 . append ( arg_17 ) arg_16 . append ( arg_18 ) arg_15 . append ( arg_20 ) arg_13 , arg_14 = map ( list , check_arrays ( arg_13 , arg_14 , warn_nans = True , replace_nans = True ) ) if arg_6 : if arg_8 > 0 and is_msmbuilder_estimator ( arg_0 ) : print ( '[CV] Using MSMBuilder API n_samples averaging' ) print ( '[CV]   n_train_samples: %s' % str ( arg_15 ) ) print ( '[CV]   n_test_samples: %s' % str ( arg_16 ) ) arg_22 = np . average ( arg_14 , weights = arg_16 ) arg_23 = np . average ( arg_13 , weights = arg_15 ) else : arg_22 = np . average ( arg_14 ) arg_23 = np . average ( arg_13 ) arg_24 = { 'mean_test_score' : arg_22 , 'test_scores' : arg_14 , 'mean_train_score' : arg_23 , 'train_scores' : arg_13 , 'n_test_samples' : arg_16 , 'n_train_samples' : arg_15 } return arg_24

Configure the Python logging module for this file.


Question: Find and parse config file storing all variables in self . _config .

def Func ( arg_0 ) : arg_0 . _config_loaded = True arg_2 = [ ] for arg_3 in arg_0 . _candidate_log_files ( ) : if os . path . isfile ( arg_3 ) : arg_0 . _logger . info ( "Reading config file %s" % arg_3 ) arg_4 = re . compile ( r"^\[(\w+)\]$" ) arg_5 = re . compile ( r"^(\w+:)?([\w.]+)\s*=(.*)$" ) with io . open ( arg_3 , "rt" , encoding = "utf-8" ) as config_file : arg_6 = None for arg_7 , arg_8 in enumerate ( config_file ) : arg_8 = arg_8 . strip ( ) if arg_8 == "" or arg_8 . startswith ( "#" ) : continue arg_9 = arg_4 . match ( arg_8 ) if arg_9 : arg_6 = arg_9 . group ( 1 ) continue arg_10 = arg_5 . match ( arg_8 ) if arg_10 : arg_11 = arg_10 . group ( 1 ) arg_12 = arg_10 . group ( 2 ) arg_13 = arg_10 . group ( 3 ) . strip ( ) if arg_11 and arg_11 . lower ( ) != "py:" : continue if arg_6 : arg_12 = arg_6 + "." + arg_12 if arg_12 in H2OConfigReader . _allowed_config_keys : arg_2 . append ( ( arg_12 , arg_13 ) ) else : arg_0 . _logger . error ( "Key %s is not a valid config key" % arg_12 ) continue arg_0 . _logger . error ( "Syntax error in config file line %d: %s" % ( arg_7 , arg_8 ) ) arg_0 . _config = dict ( arg_2 ) return

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Parse a header line .

def Func ( arg_0 ) : if not arg_0 or arg_0 == "\r\n" : return None if arg_0 [ 0 ] in " \t" : return arg_0 [ 1 : ] . rstrip ( ) arg_1 , arg_2 = arg_0 . split ( ":" , 1 ) return ( arg_1 . strip ( ) , arg_2 . strip ( ) )

Shift the model result and return the new instance.

    Queues up the T(i+1) prediction value and emits a T(i)
    input/prediction pair, if possible. E.g., if the previous T(i-1)
    iteration was learn-only, then we would not have a T(i) prediction in our
    FIFO and would not be able to emit a meaningful input/prediction pair.

    :param modelResult: A :class:`~.nupic.frameworks.opf.opf_utils.ModelResult`
                        instance to shift.
    :return: A :class:`~.nupic.frameworks.opf.opf_utils.ModelResult` instance that
             has been shifted


Question: simple timer . returns a time object or a string .

def Func ( arg_0 = None ) : if arg_0 is None : return time . time ( ) else : arg_1 = time . time ( ) - arg_0 if arg_1 < 1 : return "%.02f ms" % ( arg_1 * 1000.0 ) elif arg_1 < 60 : return "%.02f s" % ( arg_1 ) else : return "%.02f min" % ( arg_1 / 60.0 )

Compares and exchanges.

        Compares the value in the AL, AX, EAX or RAX register (depending on the
        size of the operand) with the first operand (destination operand). If
        the two values are equal, the second operand (source operand) is loaded
        into the destination operand. Otherwise, the destination operand is
        loaded into the AL, AX, EAX or RAX register.

        The ZF flag is set if the values in the destination operand and
        register AL, AX, or EAX are equal; otherwise it is cleared. The CF, PF,
        AF, SF, and OF flags are set according to the results of the comparison
        operation::

        (* accumulator  =  AL, AX, EAX or RAX,  depending on whether *)
        (* a byte, word, a doubleword or a 64bit comparison is being performed*)
        IF accumulator  ==  DEST
        THEN
            ZF  =  1
            DEST  =  SRC
        ELSE
            ZF  =  0
            accumulator  =  DEST
        FI;

        :param cpu: current CPU.
        :param dest: destination operand.
        :param src: source operand.


Question: Get a list of stitch coordinates for the given well .

def Func ( arg_0 , arg_1 = 0 , arg_2 = 0 ) : arg_3 = [ w for w in arg_0 . wells if attribute ( w , 'u' ) == arg_2 and attribute ( w , 'v' ) == arg_1 ] if len ( arg_3 ) == 1 : arg_3 = arg_3 [ 0 ] arg_4 = os . path . join ( arg_3 , 'TileConfiguration.registered.txt' ) with open ( arg_4 ) as f : arg_5 = [ x . strip ( ) for l in f . readlines ( ) if l [ 0 : 7 ] == 'image--' for x in l . split ( ';' ) ] arg_6 = ( ast . literal_eval ( x ) for x in arg_5 [ 2 : : 3 ] ) arg_6 = sum ( arg_6 , ( ) ) arg_7 = tuple ( attributes ( x ) for x in arg_5 [ 0 : : 3 ] ) return arg_6 [ 0 : : 2 ] , arg_6 [ 1 : : 2 ] , arg_7 else : print ( 'leicaexperiment Func' '({}, {}) Well not found' . format ( arg_1 , arg_2 ) )

Log 'msg % args' at level 'level' once per 'n' times.

    Logs the 1st call, (N+1)st call, (2N+1)st call,  etc.
    Not threadsafe.

    Args:
    level: The level at which to log.
    msg: The message to be logged.
    n: The number of times this should be called before it is logged.
    *args: The args to be substituted into the msg.


Question: It will poll the URL to grab the latest status resource in a given timeout and time interval .

def Func ( arg_0 , arg_1 = 1 , arg_2 = 60 ) : arg_3 = time . time ( ) arg_4 = 0 while ( arg_0 . status != "complete" and ( arg_2 <= 0 or arg_4 < arg_2 ) ) : time . sleep ( arg_1 ) arg_0 . refresh ( ) arg_4 = time . time ( ) - arg_3


Question: Get the F1 values for a set of thresholds for the models explored .

def Func ( arg_0 , arg_1 = None , arg_2 = False , arg_3 = False , arg_4 = False ) : return { arg_5 . model_id : arg_5 . Func ( arg_1 , arg_2 , arg_3 , arg_4 ) for arg_5 in arg_0 . models }

Wrap a reader function in a decorator to supply line and column
    information along with relevant forms.


Question: Returns list of unique FragmentResource s by order of first appearance .

def Func ( arg_0 ) : arg_1 = set ( ) return [ arg_2 for arg_2 in arg_0 . _Func if arg_2 not in arg_1 and not arg_1 . add ( arg_2 ) ]

turns off debugging by removing hidden tmp file


Question: Clear temp directory from created csv and ods files during communicator operations .

def Func ( arg_0 ) : arg_1 = [ LOCAL_ODS , GDOCS_TRANS_CSV , GDOCS_META_CSV , LOCAL_TRANS_CSV , LOCAL_META_CSV ] for arg_2 in arg_1 : arg_3 = os . path . join ( arg_0 . temp_path , arg_2 ) if os . path . exists ( arg_3 ) : os . remove ( arg_3 )

Increases or decreases the brightness in the layer.

        The given value is a percentage to increase
        or decrease the image brightness,
        for example 0.8 means brightness at 80%.


Question: Energy minimize the system .

def Func ( arg_0 = 'em' , arg_1 = arg_2 . templates [ 'em.mdp' ] , arg_4 = 'solvate/ionized.gro' , arg_5 = 'top/system.top' , arg_6 = 'em.pdb' , arg_7 = "em" , arg_8 = None , arg_9 = None , ** arg_10 ) : arg_11 = realpath ( arg_4 ) arg_12 = realpath ( arg_5 ) arg_13 = arg_2 . get_template ( arg_1 ) arg_7 = arg_7 . strip ( ) arg_9 = { } if arg_9 is None else arg_9 arg_10 . setdefault ( 'pp' , 'processed.top' ) arg_10 . pop ( 'ndx' , None ) arg_14 = arg_10 . pop ( 'mainselection' , '"Protein"' ) arg_15 = arg_10 . pop ( 'qtot' , 0 ) arg_1 = arg_7 + '.mdp' arg_16 = arg_7 + '.tpr' logger . info ( "[{dirname!s}] Energy minimization of struct={struct!r}, top={top!r}, mdp={mdp!r} ..." . format ( ** vars ( ) ) ) cbook . add_mdp_includes ( arg_12 , arg_10 ) if arg_15 != 0 : arg_17 = "Total charge was reported as qtot = {qtot:g} <> 0; probably a problem." . format ( ** vars ( ) ) logger . warn ( arg_17 ) warnings . warn ( arg_17 , category = BadParameterWarning ) with in_dir ( arg_0 ) : arg_18 = cbook . edit_mdp ( arg_13 , new_mdp = arg_1 , ** arg_10 ) check_mdpargs ( arg_18 ) gromacs . grompp ( f = arg_1 , o = arg_16 , c = arg_11 , r = arg_11 , p = arg_12 , ** arg_18 ) arg_9 . update ( v = True , stepout = 10 , arg_7 = arg_7 , c = arg_6 ) if arg_8 is None : arg_19 = run . get_double_or_single_prec_mdrun ( ) arg_19 ( ** arg_9 ) else : if type ( arg_8 ) is type : arg_19 = arg_8 ( ** arg_9 ) arg_19 . run ( ) else : try : arg_8 . run ( mdrunargs = arg_9 ) except AttributeError : logger . error ( "mdrunner: Provide a gromacs.run.MDrunner class or instance or a callback with a run() method" ) raise TypeError ( "mdrunner: Provide a gromacs.run.MDrunner class or instance or a callback with a run() method" ) if not os . path . exists ( arg_6 ) : arg_20 = "Energy minimized system NOT produced." logger . error ( arg_20 ) raise GromacsError ( arg_20 ) arg_21 = realpath ( arg_6 ) logger . info ( "[{dirname!s}] energy minimized structure {final_struct!r}" . format ( ** vars ( ) ) ) return { 'struct' : arg_21 , 'top' : arg_12 , 'mainselection' : arg_14 , }

Synchronize local po files with translations on GDocs Spreadsheet.
        Downloads two csv files, merges them and converts into po files
        structure. If new msgids appeared in po files, this method creates
        new ods with appended content and sends it to GDocs.


Question: Resolves current tree item of tree_alias tree matching current request path against URL of given tree item .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _current_items . get ( arg_1 , _UNSET ) if arg_2 is not _UNSET : if arg_2 is not None : arg_2 . is_current = True return arg_2 arg_2 = None if arg_0 . current_app_is_admin ( ) : arg_0 . _current_items [ arg_1 ] = arg_2 return None arg_5 = arg_0 . current_request . path if isinstance ( arg_5 , str ) : arg_5 = arg_5 . encode ( 'UTF-8' ) if arg_5 : arg_5 = urlquote ( arg_5 ) for arg_6 , arg_7 in arg_0 . _items_urls . items ( ) : if arg_7 != arg_5 : continue arg_6 . is_current = True if arg_6 . tree . alias == arg_1 : arg_2 = arg_6 if arg_2 is not None : arg_0 . _current_items [ arg_1 ] = arg_2 return arg_2

Stop streaming samples from device and delete samples buffer


Question: Encode and store a DISCONNECT control packet .

def Func ( arg_0 ) : arg_1 = bytearray ( 2 ) arg_1 [ 0 ] = 0xE0 arg_0 . Funcd = arg_1 return str ( arg_1 ) if PY2 else bytes ( arg_1 )

Write the index.html file for this report.


Question: Return a new Timeslot shifted by time .

def Func ( arg_0 , arg_1 : arg_2 ) -> 'Timeslot' : return Timeslot ( arg_0 . interval . Func ( arg_1 ) , arg_0 . channel )

Load songs from local playlist.

		Parameters:
			playlist (str): An M3U(8) playlist filepath.

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

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

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

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

			exclude_patterns (list or str): Pattern(s) to exclude.
				Patterns are Python regex patterns.
				Filepaths are excluded if they match any of the exclude patterns.

		Returns:
			A list of local playlist song filepaths matching criteria,
			a list of local playlist song filepaths filtered out using filter criteria,
			and a list of local playlist song filepaths excluded using exclusion criteria.


Question: returns a list of files that have finished structure

def Func ( arg_0 ) : arg_1 = OPJ ( arg_0 . workdir , arg_0 . name + "-K-*-rep-*_f" ) arg_2 = glob . glob ( arg_1 ) return arg_2

Creates a TFS TFVC Client to pull TFVC repo info


Question: Writes int to memory

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = False ) : if arg_3 is None : arg_3 = arg_0 . address_bit_size assert arg_3 in SANE_SIZES arg_0 . _publish ( 'will_write_memory' , arg_1 , arg_2 , arg_3 ) arg_5 = [ Operators . CHR ( Operators . EXTRACT ( arg_2 , offset , 8 ) ) for offset in range ( 0 , arg_3 , 8 ) ] arg_0 . _memory . write ( arg_1 , arg_5 , arg_4 ) arg_0 . _publish ( 'did_write_memory' , arg_1 , arg_2 , arg_3 )

Checks if an blob_name is updated in Google Cloud Storage.

        :param bucket_name: The Google cloud storage bucket where the object is.
        :type bucket_name: str
        :param object_name: The name of the object to check in the Google cloud
            storage bucket.
        :type object_name: str
        :param ts: The timestamp to check against.
        :type ts: datetime.datetime


Question: Generate a single A or B or C regex from a list of shell globs .

def Func ( arg_0 , arg_1 = False ) : if not arg_0 : return re . compile ( '^$' ) elif arg_1 : arg_0 = [ arg_2 + '*' for arg_2 in arg_0 ] return re . compile ( '|' . join ( fnmatch . translate ( arg_2 ) for arg_2 in arg_0 ) )

Returns the maximum delay for the InferenceElements in the inference
    dictionary

    Parameters:
    -----------------------------------------------------------------------
    inferences:   A dictionary where the keys are InferenceElements


Question: Write the data encoding the Credential struct to a stream .

def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : arg_6 = BytearrayStream ( ) if arg_0 . _credential_type : arg_0 . _credential_type . Func ( arg_6 , arg_2 = arg_2 ) else : raise ValueError ( "Credential struct missing the credential type." ) if arg_0 . _credential_value : arg_0 . _credential_value . Func ( arg_6 , arg_2 = arg_2 ) else : raise ValueError ( "Credential struct missing the credential value." ) arg_0 . length = arg_6 . length ( ) super ( Credential , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_1 . Func ( arg_6 . buffer )

Return the value to player; 1 for win, -1 for loss, 0 otherwise.


Question: If args and kwargs contains Cells Convert them to their values .

def Func ( arg_0 , arg_1 ) : arg_2 = False for arg_3 in arg_0 : if isinstance ( arg_3 , Cells ) : arg_2 = True break if arg_2 : arg_0 = tuple ( arg_3 . value if isinstance ( arg_3 , Cells ) else arg_3 for arg_3 in arg_0 ) if arg_1 is not None : for arg_4 , arg_3 in arg_1 . items ( ) : if isinstance ( arg_3 , Cells ) : arg_1 [ arg_4 ] = arg_3 . value return arg_0 , arg_1

issue a command to read the archive records after a known time stamp.


Question: Verify there is a process object and that it is still running . Raise NoGdbProcessError if either of the above are not true .

def Func ( arg_0 ) : if not arg_0 . gdb_process : raise NoGdbProcessError ( "gdb process is not attached" ) elif arg_0 . gdb_process . poll ( ) is not None : raise NoGdbProcessError ( "gdb process has already finished with return code: %s" % str ( arg_0 . gdb_process . poll ( ) ) )

Synchronize local po files with translations on GDocs Spreadsheet.
        Downloads two csv files, merges them and converts into po files
        structure. If new msgids appeared in po files, this method creates
        new ods with appended content and sends it to GDocs.


Question: Update timeout for all throttles

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : for arg_4 in arg_0 . throttles . values ( ) : getattr ( arg_4 , arg_1 ) . Func ( arg_2 , arg_3 )

Call the segmenter in order to split text in sentences.

        Args:
            text (str): Text to be segmented.

        Returns:
            dict, int: A dict containing a list of dicts with the offsets of
                each sentence; an integer representing the response code.


Question: Add a format function for a given type .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . type_printers . get ( arg_1 , None ) if arg_2 is not None : arg_0 . type_printers [ arg_1 ] = arg_2 return arg_3

Sequentially update the actors, the world, and the messaging system.
        The theater terminates once all of the actors indicate that they are done.