Question: Process the signature and find definition for type .

def Func ( arg_0 ) : arg_1 = [ ] if hasattr ( arg_0 . _sig , 'tret' ) : arg_1 . append ( arg_0 . _sig . tret ) if hasattr ( arg_0 . _sig , 'tparams' ) and arg_0 . _sig . tparams is not None : for arg_2 in arg_0 . _sig . tparams : arg_1 . append ( arg_2 ) if arg_0 . _translate_to is not None : arg_1 . append ( arg_0 . _translate_to . target ) if arg_0 . _variadic_types is not None : for arg_3 in arg_0 . _variadic_types : arg_1 . append ( arg_3 ) for arg_3 in arg_1 : for arg_4 in arg_3 . components : if arg_4 not in arg_0 . resolution or arg_0 . resolution [ arg_4 ] is None : arg_5 = arg_0 . get_parent ( ) if arg_5 is not None : arg_6 = arg_5 . get_by_symbol_name ( arg_4 ) if len ( arg_6 ) == 1 : arg_6 = list ( arg_6 . values ( ) ) [ 0 ] if isinstance ( arg_6 , EvalCtx ) : arg_6 = arg_6 . _sig arg_7 = weakref . ref ( arg_6 ) arg_0 . resolution [ arg_4 ] = arg_7 continue arg_0 . resolution [ arg_4 ] = None

Drop a node from the network

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


Question: Configure all listeners here

def Func ( arg_0 ) : arg_0 . _setup_rpc ( ) if not arg_0 . endpoints : return [ ] arg_0 . conn = n_rpc . create_connection ( ) arg_0 . conn . create_consumer ( arg_0 . topic , arg_0 . endpoints , fanout = False ) return arg_0 . conn . consume_in_threads ( )

Remove max=null parameter from URL.

    Patch for Webex Teams Defect: 'next' URL returned in the Link headers of
    the responses contain an errant 'max=null' parameter, which  causes the
    next request (to this URL) to fail if the URL is requested as-is.

    This patch parses the next_url to remove the max=null parameter.

    Args:
        next_url(basestring): The 'next' URL to be parsed and cleaned.

    Returns:
        basestring: The clean URL to be used for the 'next' request.

    Raises:
        AssertionError: If the parameter types are incorrect.
        ValueError: If 'next_url' does not contain a valid API endpoint URL
            (scheme, netloc and path).


Question: Create a list for a board . Returns a new List object .

def Func ( arg_0 , arg_1 = None ) : arg_2 = arg_0 . fetch_json ( uri_path = arg_0 . base_uri + '/lists' , http_method = 'POST' , arg_1 = arg_1 or { } ) return arg_0 . create_list ( arg_2 )

Returns ON-OFF for all Stokes parameters given a cross_pols noise diode measurement


Question: Evaluate polynomial of given bernstein coefficients using de Casteljau s algorithm .

Show an image.

    Args:
        img (str or ndarray): The image to be displayed.
        win_name (str): The window name.
        wait_time (int): Value of waitKey param.


Question: Split a line of text with a cursor at the given position .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = arg_1 if arg_2 is None else arg_1 [ : arg_2 ] return arg_0 . _delim_re . split ( arg_3 ) [ - 1 ]

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: Retrieve data about PHIDs .

def Func ( arg_0 , * Func ) : arg_2 = { arg_0 . PHIDS : Func } arg_3 = arg_0 . _call ( arg_0 . PHAB_PHIDS , arg_2 ) return arg_3

Create a traceback for an Octave evaluation error.


Question: Reslove weak type rules W1 - W3 .

def Func ( arg_0 , arg_1 = False ) : for arg_2 in arg_0 [ 'runs' ] : arg_3 = arg_9 = arg_2 [ 'sor' ] arg_4 , arg_5 = arg_2 [ 'start' ] , arg_2 [ 'length' ] arg_6 = arg_0 [ 'chars' ] [ arg_4 : arg_4 + arg_5 ] for arg_7 in arg_6 : arg_8 = arg_7 [ 'type' ] if arg_8 == 'NSM' : arg_7 [ 'type' ] = arg_8 = arg_9 if arg_8 == 'EN' and arg_3 == 'AL' : arg_7 [ 'type' ] = 'AN' if arg_8 in ( 'R' , 'L' , 'AL' ) : arg_3 = arg_8 arg_9 = arg_7 [ 'type' ] for arg_7 in arg_6 : if arg_7 [ 'type' ] == 'AL' : arg_7 [ 'type' ] = 'R' for arg_10 in range ( 1 , len ( arg_6 ) - 1 ) : arg_8 = arg_6 [ arg_10 ] [ 'type' ] arg_9 = arg_6 [ arg_10 - 1 ] [ 'type' ] arg_11 = arg_6 [ arg_10 + 1 ] [ 'type' ] if arg_8 == 'ES' and ( arg_9 == arg_11 == 'EN' ) : arg_6 [ arg_10 ] [ 'type' ] = 'EN' if arg_8 == 'CS' and arg_9 == arg_11 and arg_9 in ( 'AN' , 'EN' ) : arg_6 [ arg_10 ] [ 'type' ] = arg_9 for arg_10 in range ( len ( arg_6 ) ) : if arg_6 [ arg_10 ] [ 'type' ] == 'EN' : for arg_12 in range ( arg_10 - 1 , - 1 , - 1 ) : if arg_6 [ arg_12 ] [ 'type' ] == 'ET' : arg_6 [ arg_12 ] [ 'type' ] = 'EN' else : break for arg_12 in range ( arg_10 + 1 , len ( arg_6 ) ) : if arg_6 [ arg_12 ] [ 'type' ] == 'ET' : arg_6 [ arg_12 ] [ 'type' ] = 'EN' else : break for arg_7 in arg_6 : if arg_7 [ 'type' ] in ( 'ET' , 'ES' , 'CS' ) : arg_7 [ 'type' ] = 'ON' arg_3 = arg_2 [ 'sor' ] for arg_7 in arg_6 : if arg_7 [ 'type' ] == 'EN' and arg_3 == 'L' : arg_7 [ 'type' ] = 'L' if arg_7 [ 'type' ] in ( 'L' , 'R' ) : arg_3 = arg_7 [ 'type' ] if arg_1 : debug_storage ( arg_0 , runs = True )

Stop the timer

        Returns:
            The time the timer was stopped


Question: Try to match the current record to the database .

def Func ( arg_0 , arg_1 = None , ** arg_2 ) : from invenio . search_engine import perform_request_search if not arg_1 : arg_3 = arg_0 . record [ "001" ] [ 0 ] [ 3 ] return perform_request_search ( p = "035:%s" % ( arg_3 , ) , of = "id" ) else : if "recid" not in arg_2 : arg_2 [ "recid" ] = arg_0 . record [ "001" ] [ 0 ] [ 3 ] return perform_request_search ( p = arg_1 % arg_2 , of = "id" )


Question: Return the number of bytes transmitted in 1 second .

def Func ( arg_0 , arg_1 = True ) : arg_2 = 0 if arg_1 : def request_file ( ) : arg_0 . voidcmd ( 'TYPE I' ) arg_3 = arg_0 . transfercmd ( "retr " + TESTFN ) return arg_3 with contextlib . closing ( request_file ( ) ) as arg_3 : register_memory ( ) arg_4 = time . time ( ) + 1.0 while arg_4 > time . time ( ) : arg_5 = arg_3 . recv ( BUFFER_LEN ) if not arg_5 : arg_6 = time . time ( ) arg_0 . voidresp ( ) arg_3 . close ( ) arg_3 = request_file ( ) arg_4 += time . time ( ) - arg_6 arg_2 += len ( arg_5 ) try : while arg_5 : arg_5 = arg_3 . recv ( BUFFER_LEN ) arg_0 . voidresp ( ) arg_3 . close ( ) except ( ftplib . error_temp , ftplib . error_perm ) : pass else : arg_0 . voidcmd ( 'TYPE I' ) with contextlib . closing ( arg_0 . transfercmd ( "STOR " + TESTFN ) ) as arg_3 : register_memory ( ) arg_5 = b'x' * BUFFER_LEN arg_4 = time . time ( ) + 1 while arg_4 > time . time ( ) : arg_2 += arg_3 . send ( arg_5 ) arg_0 . voidresp ( ) return arg_2

This function will create the VM directory where a repo will be mounted, if it
    doesn't exist.  If wait_for_server is set, it will wait up to 10 seconds for
    the nfs server to start, by retrying mounts that fail with 'Connection Refused'.

    If wait_for_server is not set, it will attempt to run the mount command once


Question: Creates a new queue . Once created this queue s resource manifest is immutable .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = False ) : _validate_not_none ( 'queue_name' , arg_1 ) arg_4 = HTTPRequest ( ) arg_4 . method = 'PUT' arg_4 . host = arg_0 . _get_host ( ) arg_4 . path = '/' + _str ( arg_1 ) + '' arg_4 . body = _get_request_body ( _convert_queue_to_xml ( arg_2 ) ) arg_4 . path , arg_4 . query = arg_0 . _httpclient . _update_request_uri_query ( arg_4 ) arg_4 . headers = arg_0 . _update_service_bus_header ( arg_4 ) if not arg_3 : try : arg_0 . _perform_request ( arg_4 ) return True except AzureHttpError as ex : _dont_fail_on_exist ( ex ) return False else : arg_0 . _perform_request ( arg_4 ) return True

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


Question: Validate that the name follows posix conventions for env variables .

def Func ( arg_0 , arg_1 ) : if not re . match ( r'^[a-zA-Z_][a-zA-Z0-9_]*$' , arg_0 ) : raise ValueError ( 'Invalid %s: %s' % ( arg_1 , arg_0 ) )

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 a warning message of code code .

def Func ( arg_0 ) : if isinstance ( arg_0 , str ) : return arg_0 arg_1 = '' if isinstance ( arg_0 , tuple ) : if isinstance ( arg_0 [ 0 ] , str ) : arg_1 = arg_0 [ 1 ] arg_0 = arg_0 [ 0 ] return CFG_BIBRECORD_WARNING_MSGS . get ( arg_0 , '' ) + arg_1

Process post-publication events coming out of the database.


Question: This is the Signavio specific editor hook for pre - parsing and validation .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . _check_for_disconnected_boundary_events_signavio ( arg_1 , arg_2 ) arg_0 . _fix_call_activities_signavio ( arg_1 , arg_2 ) return arg_1

Create required links from a sensor region to a classifier region.


Question: Remove too rare or too common features .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = None , arg_5 = None ) : if arg_3 is None and arg_4 is None and arg_5 is None : return arg_1 , set ( ) arg_6 = arg_1 . map ( _document_frequency ) . sum ( ) arg_7 = arg_1 . map ( lambda x : arg_11 . asarray ( x . sum ( axis = 0 ) ) ) . sum ( ) . ravel ( ) arg_8 = arg_11 . ones ( len ( arg_6 ) , dtype = bool ) if arg_3 is not None : arg_8 &= arg_6 <= arg_3 if arg_4 is not None : arg_8 &= arg_6 >= arg_4 if arg_5 is not None and arg_8 . sum ( ) > arg_5 : arg_9 = ( - arg_7 [ arg_8 ] ) . argsort ( ) [ : arg_5 ] arg_10 = arg_11 . zeros ( len ( arg_6 ) , dtype = bool ) arg_10 [ arg_11 . where ( arg_8 ) [ 0 ] [ arg_9 ] ] = True arg_8 = arg_10 arg_13 = arg_11 . cumsum ( arg_8 ) - 1 arg_14 = set ( ) for arg_15 , arg_16 in list ( six . iteritems ( arg_2 ) ) : if arg_8 [ arg_16 ] : arg_2 [ arg_15 ] = arg_13 [ arg_16 ] else : del arg_2 [ arg_15 ] arg_14 . add ( arg_15 ) arg_17 = arg_11 . where ( arg_8 ) [ 0 ] if len ( arg_17 ) == 0 : raise ValueError ( "After pruning, no terms remain. Try a lower" " min_df or a higher max_df." ) return arg_17 , arg_14

Unlock a message for processing by other receivers on a given
        subscription. This operation deletes the lock object, causing the
        message to be unlocked. A message must have first been locked by a
        receiver before this operation is called.

        topic_name:
            Name of the topic.
        subscription_name:
            Name of the subscription.
        sequence_number:
            The sequence number of the message to be unlocked as returned in
            BrokerProperties['SequenceNumber'] by the Peek Message operation.
        lock_token:
            The ID of the lock as returned by the Peek Message operation in
            BrokerProperties['LockToken']


Question: Obtains a batch of tasks from the internal pending_task_queue

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in range ( 0 , arg_1 ) : try : arg_4 = arg_0 . pending_task_queue . get ( block = False ) except queue . Empty : break else : arg_2 . append ( arg_4 ) return arg_2

Attempts to list all of the modules and submodules found within a given
    directory tree. This function recursively searches the directory tree
    for potential python modules and returns a list of candidate names.

    **Note:** This function returns a list of strings representing
    discovered module names, not the actual, loaded modules.

    :param directory: the directory to search for modules.


Question: Reads a command response status .

def Func ( arg_0 ) : arg_1 = next ( arg_0 . __line_gen ( ) ) . rstrip ( ) arg_2 = arg_1 . split ( None , 1 ) try : arg_3 , arg_4 = int ( arg_2 [ 0 ] ) , "" except ValueError : raise NNTPProtocolError ( arg_1 ) if arg_3 < 100 or arg_3 >= 600 : raise NNTPProtocolError ( arg_1 ) if len ( arg_2 ) > 1 : arg_4 = arg_2 [ 1 ] if 400 <= arg_3 <= 499 : raise NNTPTemporaryError ( arg_3 , arg_4 ) if 500 <= arg_3 <= 599 : raise NNTPPermanentError ( arg_3 , arg_4 ) return arg_3 , arg_4

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


Question: Validate that an event with this name on this date does not exist .

def Func ( arg_0 ) : arg_1 = super ( EventForm , arg_0 ) . Func ( ) if Event . objects . filter ( name = arg_1 [ 'name' ] , start_date = arg_1 [ 'start_date' ] ) . count ( ) : raise forms . ValidationError ( u'This event appears to be in the database already.' ) return arg_1


Question: Working directory for the repo

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = True ) : arg_4 = os . path . join ( arg_0 . workspace , 'datasets' , arg_1 , arg_2 ) if arg_3 : try : os . makedirs ( arg_4 ) except : pass return arg_4

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: Return dict of documentation of magic functions .

def Func ( arg_0 , arg_1 = False , arg_2 = '' ) : arg_3 = { } for arg_4 in arg_0 . magics : arg_5 = { } for arg_6 , arg_7 in arg_0 . magics [ arg_4 ] . iteritems ( ) : if arg_7 . __doc__ : if arg_1 : arg_5 [ arg_6 ] = arg_7 . __doc__ . split ( '\n' , 1 ) [ 0 ] else : arg_5 [ arg_6 ] = arg_7 . __doc__ . rstrip ( ) else : arg_5 [ arg_6 ] = arg_2 arg_3 [ arg_4 ] = arg_5 return arg_3

Connect to the stream

        Returns
        -------
        asyncio.coroutine
            The streaming response


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

def Func ( arg_0 ) : for arg_1 in arg_0 . get_boards ( ) : for arg_2 in arg_0 . get_lists ( arg_1 [ 'id' ] ) : arg_3 = dict ( boardname = arg_1 [ 'name' ] , listname = arg_2 [ 'name' ] ) for arg_4 in arg_0 . get_cards ( arg_2 [ 'id' ] ) : arg_5 = arg_0 . get_issue_for_record ( arg_4 , extra = arg_3 ) arg_5 . update_extra ( { "annotations" : arg_0 . annotations ( arg_4 ) } ) yield arg_5

Condition to stop when any batch member converges, or all have failed.


Question: Delete existing messages .

def Func ( arg_0 , arg_1 ) : arg_2 = "/2/messages/?%s" % urlencode ( [ ( 'ids' , "," . join ( arg_1 ) ) ] ) arg_3 = arg_0 . _delete_resource ( arg_2 ) return arg_3


Question: Calculates the viewport based on the configured aspect ratio in settings . Will add black borders if the window do not match the viewport .

def Func ( arg_0 ) : arg_1 = int ( arg_0 . buffer_width / arg_0 . aspect_ratio ) arg_2 = arg_0 . buffer_height - arg_1 arg_0 . fbo . viewport = ( 0 , arg_2 // 2 , arg_0 . buffer_width , arg_1 )

Return list of GATT descriptors that have been discovered for this
        characteristic.


Question: Update the shape s position by moving it forward according to its velocity .

def Func ( arg_0 , arg_1 ) : arg_0 . translate ( arg_1 * arg_0 . velocity ) arg_0 . rotate ( arg_1 * arg_0 . angular_velocity )

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: fit classifiers from large dataset .

def Func ( arg_0 , arg_1 , arg_2 = 'kmeans' , ** arg_3 ) : arg_0 . method = arg_2 arg_4 = arg_0 . Functing_data ( arg_1 ) arg_5 = { 'kmeans' : arg_0 . Func_kmeans , 'meanshift' : arg_0 . Func_meanshift } arg_6 = arg_5 [ arg_2 ] arg_0 . classifier = arg_6 ( arg_1 = arg_4 , ** arg_3 ) arg_8 = arg_0 . classifier . cluster_centers_ . T [ arg_0 . sort_by ] arg_0 . classifier . cluster_centers_ = arg_0 . classifier . cluster_centers_ [ np . argsort ( arg_8 ) ] arg_0 . classifier . labels_ = arg_0 . classifier . predict ( arg_4 ) arg_0 . classifier . ulabels_ = np . unique ( arg_0 . classifier . labels_ ) return

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: high - low .

def Func ( arg_0 , arg_1 = "Func" ) : with arg_0 . _name_scope ( arg_1 ) : return arg_0 . high - arg_0 . low


Question: Extract uuid from each item of specified seq .

def Func ( arg_0 ) : for arg_1 in arg_0 . _seq : if isinstance ( arg_1 , File ) : yield arg_1 . uuid elif isinstance ( arg_1 , six . string_types ) : yield arg_1 else : raise ValueError ( 'Invalid type for sequence item: {0}' . format ( type ( arg_1 ) ) )

Add a linear version of a minimal medium to the model solver.

    Changes the optimization objective to finding the growth medium requiring
    the smallest total import flux::

        minimize sum |r_i| for r_i in import_reactions

    Arguments
    ---------
    model : cobra.Model
        The model to modify.


Question: Delete a string from the AutoCompleter index . Returns 1 if the string was found and deleted 0 otherwise

def Func ( arg_0 , arg_1 ) : return arg_0 . redis . execute_command ( AutoCompleter . SUGDEL_COMMAND , arg_0 . key , arg_1 )

Set the rotation of this body using a rotation matrix.

        Parameters
        ----------
        rotation : sequence of 9 floats
            The desired rotation matrix for this body.


Question: Convert this heatmaps object to a 0 - to - 255 array .

def Func ( arg_0 ) : arg_1 = np . clip ( np . round ( arg_0 . arr_0to1 * 255 ) , 0 , 255 ) arg_2 = arg_1 . astype ( np . uint8 ) return arg_2

Handle successful response to the roster request.


Question: Retrieves URLs for the files matched by a glob or a path to a directory in a given dataset .

def Func ( arg_0 , arg_1 , arg_2 = "." , arg_3 = False , arg_4 = None ) : if arg_4 is None : arg_5 = True else : arg_5 = False arg_6 = { "download_request" : { "glob" : arg_2 , "isDir" : arg_3 , "latest" : arg_5 } } arg_7 = "Failed to get matched files in dataset {}" . format ( arg_1 ) arg_8 = arg_0 . _get_success_json ( arg_0 . _post_json ( routes . matched_files ( arg_1 ) , arg_6 , arg_7 = arg_7 ) ) [ 'versions' ] if arg_4 is None : arg_9 = arg_8 [ 0 ] else : try : arg_9 = list ( filter ( lambda v : v [ 'number' ] == arg_4 , arg_8 ) ) [ 0 ] except IndexError : raise ResourceNotFoundException ( ) return list ( map ( lambda f : DatasetFile ( path = f [ 'filename' ] , url = f [ 'url' ] ) , arg_9 [ 'files' ] ) )


Question: Adds a certificate to a hosted service .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None ) : _validate_not_none ( 'service_name' , arg_1 ) _validate_not_none ( 'data' , arg_2 ) _validate_not_none ( 'certificate_format' , arg_3 ) _validate_not_none ( 'password' , arg_4 ) return arg_0 . _perform_post ( '/' + arg_0 . subscription_id + '/services/hostedservices/' + _str ( arg_1 ) + '/certificates' , _XmlSerializer . certificate_file_to_xml ( arg_2 , arg_3 , arg_4 ) , as_async = True )

r'''Method to calculate heat capacity of a solid at temperature `T`
        with a given method.

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

        Parameters
        ----------
        T : float
            Temperature at which to calculate heat capacity, [K]
        method : str
            Name of the method to use

        Returns
        -------
        Cp : float
            Heat capacity of the solid at T, [J/mol/K]


Question: Logic behind autosave under Travis CI .

def Func ( arg_0 ) : if PyFunceble . CONFIGURATION [ "travis" ] : try : arg_1 = PyFunceble . environ [ "TRAVIS_BUILD_DIR" ] arg_2 = False try : arg_2 = int ( PyFunceble . time ( ) ) >= int ( PyFunceble . INTERN [ "start" ] ) + ( int ( PyFunceble . CONFIGURATION [ "travis_autosave_minutes" ] ) * 60 ) except KeyError : if arg_0 . last and not arg_0 . bypass : raise Exception ( "Please review the way `ExecutionTime()` is called." ) if arg_0 . last or arg_2 or arg_0 . bypass : Percentage ( ) . log ( ) arg_0 . travis_permissions ( ) arg_3 = 'git add --all && git commit -a -m "%s"' if arg_0 . last or arg_0 . bypass : if PyFunceble . CONFIGURATION [ "command_before_end" ] : for arg_4 in Command ( PyFunceble . CONFIGURATION [ "command_before_end" ] ) . run ( ) : sys_stdout . write ( "{}\n" . format ( arg_4 ) ) arg_0 . travis_permissions ( ) arg_5 = ( PyFunceble . CONFIGURATION [ "travis_autosave_final_commit" ] + " [ci skip]" ) Command ( arg_3 % arg_5 ) . execute ( ) else : if PyFunceble . CONFIGURATION [ "command" ] : for arg_4 in Command ( PyFunceble . CONFIGURATION [ "command" ] ) . run ( ) : sys_stdout . write ( "{}\n" . format ( arg_4 ) ) arg_0 . travis_permissions ( ) Command ( arg_3 % PyFunceble . CONFIGURATION [ "travis_autosave_commit" ] ) . execute ( ) print ( Command ( "git push origin %s" % PyFunceble . CONFIGURATION [ "travis_branch" ] ) . execute ( ) ) exit ( 0 ) except KeyError : pass

Create required links from a sensor region to a classifier region.


Question: Convert text from one markup format to another using pandoc .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False , arg_4 = False , arg_5 = True , arg_6 = None ) : arg_7 = logging . getLogger ( __name__ ) if arg_6 is not None : arg_6 = list ( arg_6 ) else : arg_6 = [ ] if arg_4 : arg_6 . append ( '--mathjax' ) if arg_5 : arg_6 . append ( '--smart' ) if arg_3 : arg_6 . append ( '--filter=lsstprojectmeta-deparagraph' ) arg_6 . append ( '--wrap=none' ) arg_6 = set ( arg_6 ) arg_7 . debug ( 'Running pandoc from %s to %s with extra_args %s' , arg_1 , arg_2 , arg_6 ) arg_8 = pypandoc . Func ( arg_0 , arg_2 , format = arg_1 , arg_6 = arg_6 ) return arg_8

Get weights for this layer

        :return: list of numpy arrays which represent weight and bias


Question: Resets the builder s state to allow building new annotations .

def Func ( arg_0 ) : arg_0 . annotation_date_set = False arg_0 . annotation_comment_set = False arg_0 . annotation_type_set = False arg_0 . annotation_spdx_id_set = False

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: Save the reply to an execute_request into our results .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 [ 'parent_header' ] arg_3 = arg_2 [ 'msg_id' ] if arg_3 not in arg_0 . outstanding : if arg_3 in arg_0 . history : print ( "got stale result: %s" % arg_3 ) else : print ( "got unknown result: %s" % arg_3 ) else : arg_0 . outstanding . remove ( arg_3 ) arg_4 = arg_1 [ 'content' ] arg_5 = arg_1 [ 'header' ] arg_6 = arg_0 . metadata [ arg_3 ] arg_6 . update ( arg_0 . _extract_metadata ( arg_5 , arg_2 , arg_4 ) ) arg_0 . metadata [ arg_3 ] = arg_6 arg_8 = arg_0 . _outstanding_dict [ arg_6 [ 'engine_uuid' ] ] if arg_3 in arg_8 : arg_8 . remove ( arg_3 ) if arg_4 [ 'status' ] == 'ok' : arg_0 . results [ arg_3 ] = ExecuteReply ( arg_3 , arg_4 , arg_6 ) elif arg_4 [ 'status' ] == 'aborted' : arg_0 . results [ arg_3 ] = error . TaskAborted ( arg_3 ) elif arg_4 [ 'status' ] == 'resubmitted' : pass else : arg_0 . results [ arg_3 ] = arg_0 . _unwrap_exception ( arg_4 )

Reconstruct the given input sequences.

    Args:
      inputs: A batch of image sequences `x_{1:T}` of shape
        `[batch_size, timesteps, height, width, channels]`.
      samples: Number of samples to draw from the latent distributions.
      sample_static: Boolean for whether or not to randomly sample the
        static latent variable `f` from its prior distribution.
      sample_dynamic: Boolean for whether or not to randomly sample the
        dynamic latent variable `z_{1:T}` from its prior distribution.
      swap_static: Boolean for whether or not to swap the encodings for
        the static latent variable `f` between the examples.
      swap_dynamic: Boolean for whether or not to swap the encodings for
        the dynamic latent variable `z_{1:T}` between the examples.
      fix_static: Boolean for whether or not to share the same random
        sample of the static latent variable `f` from its prior across
        all examples.
      fix_dynamic: Boolean for whether or not to share the same random
        sample of the dynamic latent variable `z_{1:T}` from its prior
        across all examples.

    Returns:
      A batched Independent distribution wrapping a set of Normal
      distributions over the pixels of the reconstruction of the input,
      where the Independent distribution has event shape [height, width,
      channels], batch shape [samples, batch_size, timesteps], and
      sample shape [sample_shape, samples, batch_size, timesteps,
      height, width, channels].


Question: Generate a set of simple and hub sequences . A simple sequence contains a randomly chosen set of elements from 0 to nCoinc - 1 . A hub sequence always contains a hub element in the middle of it .

def Func ( arg_0 = 10 , arg_1 = 500 , arg_2 = 50 , arg_3 = [ 2 , 6 ] , arg_4 = [ 5 , 6 , 7 ] , arg_5 = 50 , arg_6 = 50 ) : arg_7 = generateCoincMatrix ( nCoinc = arg_0 , length = arg_1 , activity = arg_2 ) arg_8 = generateSimpleSequences ( nCoinc = arg_0 , arg_4 = arg_4 , nSeq = arg_5 ) + generateHubSequences ( nCoinc = arg_0 , arg_3 = arg_3 , arg_4 = arg_4 , nSeq = arg_6 ) return ( arg_8 , arg_7 )

convert a list of '='-spaced command-line arguments to a dictionary, evaluating python objects when possible


Question: Set the value bounds free errors based on corresponding kwargs

def Func ( arg_0 , ** arg_1 ) : if 'bounds' in arg_1 : arg_0 . Func_bounds ( arg_1 . pop ( 'bounds' ) ) if 'free' in arg_1 : arg_0 . Func_free ( arg_1 . pop ( 'free' ) ) if 'errors' in arg_1 : arg_0 . Func_errors ( arg_1 . pop ( 'errors' ) ) if 'value' in arg_1 : arg_0 . Func_value ( arg_1 . pop ( 'value' ) )

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


Question: Add a new row to the pattern .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _parser . new_row ( arg_1 ) arg_0 . _rows . append ( arg_2 ) return arg_2

This internal helper does the common work for
        ``set_ocsp_server_callback`` and ``set_ocsp_client_callback``, which is
        almost all of it.


Question: Check if the cadd phred score is annotated

def Func ( arg_0 , arg_1 ) : arg_2 = 0 arg_3 = [ 'CADD' , 'CADD_PHRED' ] for arg_4 in arg_3 : arg_2 = arg_0 . INFO . get ( arg_4 , 0 ) if arg_2 : return float ( arg_2 ) for arg_5 in arg_1 : arg_6 = arg_5 . get ( 'cadd' ) if ( arg_6 and arg_6 > arg_2 ) : arg_2 = arg_6 return arg_2

Create required links from a sensor region to a classifier region.


Question: Process lines when they start with %% which marks cell magics .

def Func ( arg_0 , arg_1 ) : arg_0 . processing_cell_magic = True arg_3 , arg_4 , arg_5 = arg_1 . partition ( '\n' ) arg_6 , arg_4 , arg_7 = arg_3 . partition ( ' ' ) arg_6 = arg_6 . lstrip ( ESC_MAGIC ) arg_0 . cell_magic_parts = [ arg_5 ] arg_9 = 'get_ipython()._run_cached_cell_magic(%r, %r)' arg_10 = arg_9 % ( arg_6 , arg_7 ) arg_0 . _store ( arg_10 ) arg_0 . _store ( arg_1 , arg_0 . _buffer_raw , 'source_raw' ) arg_0 . _is_complete = last_blank ( arg_1 ) return arg_0 . _is_complete

Widget Action to Make the window fullscreen and update the bot.


Question: Core dynamic program for beat tracking

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = np . zeros_like ( arg_0 , dtype = int ) arg_4 = np . zeros_like ( arg_0 ) arg_5 = np . arange ( - 2 * arg_1 , - np . round ( arg_1 / 2 ) + 1 , dtype = int ) if arg_2 <= 0 : raise ParameterError ( 'tightness must be strictly positive' ) arg_6 = - arg_2 * ( np . log ( - arg_5 / arg_1 ) ** 2 ) arg_7 = True for arg_8 , arg_9 in enumerate ( arg_0 ) : arg_10 = np . maximum ( 0 , min ( - arg_5 [ 0 ] , len ( arg_5 ) ) ) arg_11 = arg_6 . copy ( ) arg_11 [ arg_10 : ] = arg_11 [ arg_10 : ] + arg_4 [ arg_5 [ arg_10 : ] ] arg_12 = np . argmax ( arg_11 ) arg_4 [ arg_8 ] = arg_9 + arg_11 [ arg_12 ] if arg_7 and arg_9 < 0.01 * arg_0 . max ( ) : arg_3 [ arg_8 ] = - 1 else : arg_3 [ arg_8 ] = arg_5 [ arg_12 ] arg_7 = False arg_5 = arg_5 + 1 return arg_3 , arg_4

Override ``_serialize`` for customizing the exception raised.


Question: Create URL with supplied path and opts parameters dict .

def Func ( arg_0 , arg_1 , arg_2 = { } , arg_3 = { } ) : if arg_3 : warnings . warn ( '`opts` has been deprecated. Use `params` instead.' , DeprecationWarning , stacklevel = 2 ) arg_2 = arg_2 or arg_3 if arg_0 . _shard_strategy == SHARD_STRATEGY_CRC : arg_4 = zlib . crc32 ( arg_1 . encode ( 'utf-8' ) ) & 0xffffffff arg_5 = arg_4 % len ( arg_0 . _domains ) arg_6 = arg_0 . _domains [ arg_5 ] elif arg_0 . _shard_strategy == SHARD_STRATEGY_CYCLE : arg_6 = arg_0 . _domains [ arg_0 . _shard_next_index ] arg_0 . _shard_next_index = ( arg_0 . _shard_next_index + 1 ) % len ( arg_0 . _domains ) else : arg_6 = arg_0 . _domains [ 0 ] arg_8 = "https" if arg_0 . _use_https else "http" arg_9 = UrlHelper ( arg_6 , arg_1 , arg_8 , sign_key = arg_0 . _sign_key , include_library_param = arg_0 . _include_library_param , arg_2 = arg_2 ) return str ( arg_9 )

Return the RSSI signal strength in decibels.


Question: Update the estimate .

def Func ( arg_0 , arg_1 ) : if arg_0 . _value is None : arg_0 . _value = arg_1 else : arg_0 . _value = arg_0 . _gamma * arg_0 . _value + ( 1.0 - arg_0 . _gamma ) * arg_1


Question: Gets the content of a URL via sending a HTTP GET request .

def Func ( arg_0 , arg_1 = { } , arg_2 = True ) : logging . debug ( 'Func: %s' % arg_0 ) arg_3 = request . Request ( arg_0 , arg_1 = arg_1 ) if cookies : cookies . add_cookie_header ( arg_3 ) arg_3 . headers . update ( arg_3 . unredirected_hdrs ) arg_4 = urlopen_with_retry ( arg_3 ) arg_5 = arg_4 . read ( ) arg_6 = arg_4 . getheader ( 'Content-Encoding' ) if arg_6 == 'gzip' : arg_5 = ungzip ( arg_5 ) elif arg_6 == 'deflate' : arg_5 = undeflate ( arg_5 ) if arg_2 : arg_7 = match1 ( arg_4 . getheader ( 'Content-Type' , '' ) , r'charset=([\w-]+)' ) if arg_7 is not None : arg_5 = arg_5 . decode ( arg_7 , 'ignore' ) else : arg_5 = arg_5 . decode ( 'utf-8' , 'ignore' ) return arg_5

Stop streaming samples from device and delete samples buffer


Question: Slugify foreign key

def Func ( arg_0 ) : for arg_1 in arg_0 . get ( 'foreignKeys' , [ ] ) : arg_1 [ 'reference' ] [ 'resource' ] = _slugify_resource_name ( arg_1 [ 'reference' ] . get ( 'resource' , '' ) ) return arg_0

Run Bayesian model assuming returns are normally distributed.

    Parameters
    ----------
    returns : pandas.Series
        Series of simple returns of an algorithm or stock.
    samples : int (optional)
        Number of posterior samples to draw.

    Returns
    -------
    model : pymc.Model object
        PyMC3 model containing all random variables.
    trace : pymc3.sampling.BaseTrace object
        A PyMC3 trace object that contains samples for each parameter
        of the posterior.


Question: Start a new kernel .

def Func ( arg_0 , ** arg_1 ) : arg_2 = unicode ( uuid . uuid4 ( ) ) arg_3 = arg_0 . kernel_manager_factory ( connection_file = os . path . join ( arg_0 . connection_dir , "kernel-%s.json" % arg_2 ) , config = arg_0 . config , ) arg_3 . Func ( ** arg_1 ) arg_3 . start_channels ( shell = True , sub = False , stdin = False , hb = False ) arg_0 . _kernels [ arg_2 ] = arg_3 return arg_2

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: Create Label object from JSON object

def Func ( arg_0 , arg_1 ) : return trolly . label . Label ( trello_client = arg_0 , label_id = arg_1 [ 'id' ] , name = arg_1 [ 'name' ] , data = arg_1 , )

Add feedback on a specific campaign.

        :param campaign_id: The unique id for the campaign.
        :type campaign_id: :py:class:`str`
        :param data: The request body parameters
        :type data: :py:class:`dict`
        data = {
            "message": string*
        }
        :param queryparams: The query string parameters
        queryparams['fields'] = []
        queryparams['exclude_fields'] = []


Question: Get the current exception info as Traceback object . Per default calling this method will reraise system exceptions such as generator exit system exit or others . This behavior can be disabled by passing False to the function as first parameter .

def Func ( arg_0 = False , arg_1 = False , arg_2 = 0 ) : arg_3 , arg_4 , arg_5 = sys . exc_info ( ) if arg_0 and arg_3 in system_exceptions : raise for arg_6 in range_type ( arg_2 ) : if arg_5 . tb_next is None : break arg_5 = arg_5 . tb_next arg_5 = Traceback ( arg_3 , arg_4 , arg_5 ) if not arg_1 : arg_5 . filter_hidden_frames ( ) return arg_5

Add an HTTP header to response object.

        Arguments:
          name (str): HTTP header field name
          value (str): HTTP header field value


Question: Return if first occurrence of the key otherwise return line .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = '' ) : if arg_3 and arg_2 == sorted ( arg_3 ) [ 0 ] : return '' return arg_0

Creates a layer from its config.

    This method is the reverse of `get_config`, capable of instantiating the
    same layer from the config dictionary.

    Args:
      config: A Python dictionary, typically the output of `get_config`.

    Returns:
      layer: A layer instance.


Question: Highlights a block of text using ANSI tags based on language syntax .

def Func ( arg_0 , arg_1 = 'python' , ** arg_2 ) : arg_1 = { 'py' : 'python' , 'h' : 'cpp' , 'cpp' : 'cpp' , 'cxx' : 'cpp' , 'c' : 'cpp' , } . get ( arg_1 . replace ( '.' , '' ) , arg_1 ) try : import pygments import pygments . lexers import pygments . formatters import pygments . formatters . terminal if sys . platform . startswith ( 'win32' ) : import colorama colorama . init ( ) arg_3 = pygments . formatters . terminal . TerminalFormatter ( bg = 'dark' ) arg_4 = pygments . lexers . get_lexer_by_name ( arg_1 , ** arg_2 ) arg_5 = pygments . highlight ( arg_0 , arg_4 , arg_3 ) except ImportError : import warnings warnings . warn ( 'pygments is not installed, code will not be highlighted' ) arg_5 = arg_0 return arg_5

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: Kills an in progress experimental design run

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = routes . kill_data_view_design_run ( arg_1 , arg_2 ) arg_4 = arg_0 . _delete ( arg_3 ) . json ( ) return arg_4 [ "data" ] [ "uid" ]

use values in opts data to generate instances of publication services.


Question: returns the template context for install . sh and uninstall . sh

def Func ( arg_0 ) : arg_1 = arg_0 . config arg_2 = [ ] for arg_3 in arg_0 . config . get ( 'openvpn' , [ ] ) : if arg_3 . get ( 'dev_type' ) != 'tap' : continue arg_4 = arg_3 . copy ( ) arg_2 . append ( arg_4 ) arg_5 = [ ] for arg_6 in arg_0 . config . get ( 'interfaces' , [ ] ) : if arg_6 [ 'type' ] != 'bridge' : continue arg_7 = arg_6 . copy ( ) if arg_7 . get ( 'addresses' ) : arg_7 [ 'proto' ] = arg_6 [ 'addresses' ] [ 0 ] . get ( 'proto' ) arg_7 [ 'ip' ] = arg_6 [ 'addresses' ] [ 0 ] . get ( 'address' ) arg_5 . append ( arg_7 ) arg_8 = False for arg_9 in arg_1 . get ( 'files' , [ ] ) : arg_10 = arg_9 [ 'path' ] if arg_10 . startswith ( '/crontabs' ) or arg_10 . startswith ( 'crontabs' ) : arg_8 = True break return dict ( hostname = arg_1 [ 'general' ] [ 'hostname' ] , arg_2 = arg_2 , arg_5 = arg_5 , radios = arg_1 . get ( 'radios' , [ ] ) , arg_8 = arg_8 )

Extract the list of NIFT names from the BEL resource and builds a dictionary mapping from the lowercased version
    to the uppercase version.


Question: Cycles through notifications with latest results from data feeds .

def Func ( arg_0 ) : arg_1 = arg_0 . poll_datafeeds ( ) arg_2 = arg_0 . process_notifications ( arg_1 ) arg_0 . draw_notifications ( arg_2 )

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: Save a synthetic image as a PNG file .

def Func ( arg_0 , arg_1 ) : arg_2 = plt . figure ( figsize = ( 4 , 4 ) ) arg_3 = backend_agg . FigureCanvasAgg ( arg_2 ) for arg_4 , arg_5 in enumerate ( arg_0 ) : arg_6 = arg_2 . add_subplot ( 4 , 4 , arg_4 + 1 ) plt . axis ( 'off' ) arg_6 . set_xticklabels ( [ ] ) arg_6 . set_yticklabels ( [ ] ) arg_6 . imshow ( arg_5 . reshape ( IMAGE_SHAPE [ : - 1 ] ) , cmap = 'Greys_r' ) arg_2 . tight_layout ( ) plt . subplots_adjust ( wspace = 0.05 , hspace = 0.05 ) arg_3 . print_figure ( arg_1 , format = 'png' )

Call the timeout handlers due.

        :Return: (next_event_timeout, sources_handled) tuple.
            next_event_timeout is number of seconds until the next timeout
            event, sources_handled is number of handlers called.


Question: Get all accessibility application name that are currently running

def Func ( arg_0 ) : arg_1 = [ ] arg_0 . _update_apps ( ) for arg_2 in arg_0 . _running_apps : arg_3 = arg_2 . localizedName ( ) try : arg_3 = unicode ( arg_3 ) except NameError : arg_3 = str ( arg_3 ) except UnicodeEncodeError : pass arg_1 . append ( arg_3 ) return list ( set ( arg_1 ) )

Hook for type-checking, invoked during assignment.

        raises TypeError if neither value nor self.dtype are None and they
        do not match.

        will not raise an exception if either value or self.dtype is None


Question: Get the merge full data

def Func ( arg_0 , arg_1 ) : arg_2 = urijoin ( arg_0 . base_url , GitLabClient . PROJECTS , arg_0 . owner + '%2F' + arg_0 . repository , GitLabClient . MERGES , arg_1 ) arg_3 = arg_0 . fetch ( arg_2 ) return arg_3 . text

Get the location of a given service from Opencast and add it to the
    current configuration.


Question: Validate if email exists and requires a verification .

def Func ( arg_0 , arg_1 ) : try : arg_0 . user = User . objects . get_by_natural_key ( arg_1 ) except User . DoesNotExist : arg_3 = _ ( 'A user with this email address does not exist.' ) raise serializers . ValidationError ( arg_3 ) if arg_0 . user . email_verified : arg_3 = _ ( 'User email address is already verified.' ) raise serializers . ValidationError ( arg_3 ) return arg_1

Seek the video by `relative_position` seconds

        Args:
            relative_position (float): The position in seconds to seek to.


Question: Plot generated pairs of variables .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = [ [ 0 , 1 ] ] ) : from matplotlib import pyplot as plt if arg_0 == 0 : plt . ion ( ) plt . clf ( ) for ( arg_4 , arg_5 ) in arg_3 : plt . scatter ( arg_2 [ arg_4 ] . data . cpu ( ) . numpy ( ) , arg_1 . data . cpu ( ) . numpy ( ) [ : , arg_5 ] , label = "Y -> X" ) plt . scatter ( arg_1 . data . cpu ( ) . numpy ( ) [ : , arg_4 ] , arg_2 [ arg_5 ] . data . cpu ( ) . numpy ( ) , label = "X -> Y" ) plt . scatter ( arg_1 . data . cpu ( ) . numpy ( ) [ : , arg_4 ] , arg_1 . data . cpu ( ) . numpy ( ) [ : , arg_5 ] , label = "original data" ) plt . legend ( ) plt . pause ( 0.01 )

Computes the temporal coverage of each source feed

    Parameters
    ----------
    gtfs: gtfspy.GTFS object
    stats: dict
        where to append the stats

    Returns
    -------
    stats: dict


Question: How much of inner is in outer by volume

def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_3 = 1.0 / arg_0 . volume if arg_2 else 1.0 return arg_3 * ( arg_0 . volume - util . Tile . intersection ( arg_0 , arg_1 ) . volume )


Question: Gets an USI string for the move . For example a move from 7A to 8A would be 7a8a or 7a8a + if it is a promotion .

def Func ( arg_0 ) : if arg_0 : if arg_0 . drop_piece_type : return '{0}*{1}' . format ( PIECE_SYMBOLS [ arg_0 . drop_piece_type ] . upper ( ) , SQUARE_NAMES [ arg_0 . to_square ] ) else : return SQUARE_NAMES [ arg_0 . from_square ] + SQUARE_NAMES [ arg_0 . to_square ] + ( '+' if arg_0 . promotion else '' ) else : return '0000'

Internal ``RUN_TASK`` consumer to run the task's callable


Question: For use in tests ; applied UTC timestamp to DataFrame .

def Func ( arg_0 ) : try : arg_0 . index = arg_0 . index . tz_localize ( 'UTC' ) except TypeError : arg_0 . index = arg_0 . index . tz_convert ( 'UTC' ) return arg_0


Question: Update gapfilling model with switches and the indicator objective .

def Func ( arg_0 ) : arg_1 = list ( ) arg_2 = max ( max ( abs ( b ) for b in r . bounds ) for r in arg_0 . model . reactions ) arg_3 = arg_0 . model . problem for arg_4 in arg_0 . model . reactions : if not hasattr ( arg_4 , 'gapfilling_type' ) : continue arg_5 = arg_3 . Variable ( name = 'indicator_{}' . format ( arg_4 . id ) , lb = 0 , ub = 1 , type = 'binary' ) if arg_4 . id in arg_0 . penalties : arg_5 . cost = arg_0 . penalties [ arg_4 . id ] else : arg_5 . cost = arg_0 . penalties [ arg_4 . gapfilling_type ] arg_5 . rxn_id = arg_4 . id arg_0 . indicators . append ( arg_5 ) arg_8 = arg_3 . Constraint ( arg_4 . flux_expression - arg_2 * arg_5 , ub = 0 , name = 'constraint_lb_{}' . format ( arg_4 . id ) , sloppy = True ) arg_9 = arg_3 . Constraint ( arg_4 . flux_expression + arg_2 * arg_5 , lb = 0 , name = 'constraint_ub_{}' . format ( arg_4 . id ) , sloppy = True ) arg_1 . extend ( [ arg_8 , arg_9 ] ) arg_0 . model . add_cons_vars ( arg_0 . indicators ) arg_0 . model . add_cons_vars ( arg_1 , sloppy = True ) arg_0 . model . objective = arg_3 . Objective ( Zero , direction = 'min' , sloppy = True ) arg_0 . model . objective . set_linear_coefficients ( { arg_12 : 1 for arg_12 in arg_0 . indicators } ) arg_0 . update_costs ( )

Update annotations of discretized continuous pulse function with duration.

    Args:
        discretized_pulse: Discretized decorated continuous pulse.


Question: Produces the Tidypy configuration to use for the specified project .

def Func ( arg_0 , arg_1 = True ) : return get_local_config ( arg_0 , arg_1 = arg_1 ) or get_user_config ( arg_0 , arg_1 = arg_1 ) or get_default_config ( )


Question: Creates a context to enable the oauthlib environment variable in order to debug with insecure transport .

def Func ( arg_0 ) : arg_1 = arg_2 . environ . get ( 'OAUTHLIB_INSECURE_TRANSPORT' ) if current_app . debug or current_app . testing : try : arg_2 . environ [ 'OAUTHLIB_INSECURE_TRANSPORT' ] = '1' yield finally : if arg_1 : arg_2 . environ [ 'OAUTHLIB_INSECURE_TRANSPORT' ] = arg_1 else : arg_2 . environ . pop ( 'OAUTHLIB_INSECURE_TRANSPORT' , None ) else : if arg_1 : warnings . warn ( 'OAUTHLIB_INSECURE_TRANSPORT has been found in os.environ ' 'but the app is not running in debug mode or testing mode.' ' It may put you in danger of the Man-in-the-middle attack' ' while using OAuth 2.' , RuntimeWarning ) yield


Question: Returns a named tuple describing the operating system on the remote host .

def Func ( ) : import warnings warnings . filterwarnings ( "ignore" , category = DeprecationWarning ) arg_0 = get_rc ( 'common_os_version' ) if arg_0 : return arg_0 with settings ( warn_only = True ) : with hide ( 'running' , 'stdout' , 'stderr' , 'warnings' ) : arg_1 = _run_or_local ( 'cat /etc/lsb-release' ) if arg_1 . succeeded : return OS ( type = LINUX , distro = UBUNTU , release = re . findall ( r'DISTRIB_RELEASE=([0-9\.]+)' , arg_1 ) [ 0 ] ) arg_1 = _run_or_local ( 'cat /etc/debian_version' ) if arg_1 . succeeded : return OS ( type = LINUX , distro = DEBIAN , release = re . findall ( r'([0-9\.]+)' , arg_1 ) [ 0 ] ) arg_1 = _run_or_local ( 'cat /etc/fedora-release' ) if arg_1 . succeeded : return OS ( type = LINUX , distro = FEDORA , release = re . findall ( r'release ([0-9]+)' , arg_1 ) [ 0 ] ) raise Exception ( 'Unable to determine OS version.' )

Returns mappable data for a random subset of voxels.

    May be useful as a baseline in predictive analyses--e.g., to compare
    performance of a more principled feature selection method with simple
    random selection.

    Args:
        dataset: A Dataset instance
        n_voxels: An integer specifying the number of random voxels to select.

    Returns:
        A 2D numpy array with (randomly-selected) voxels in rows and mappables
        in columns.


Question: Parse the unique document id for a variant .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : return generate_md5_key ( [ arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ] )


Question: Transform ast of multidimensional declaration to a single dimension declaration .

def Func ( arg_0 ) : arg_1 = [ ] arg_2 = arg_0 . type while arg_3 ( arg_2 ) is c_ast . ArrayDecl : arg_1 . append ( arg_2 . dim ) arg_2 = arg_2 . type if arg_1 : arg_0 . type . dim = reduce ( lambda l , r : c_ast . BinaryOp ( '*' , l , r ) , arg_1 ) arg_0 . type . type = arg_2 return arg_0 . name , arg_1

Get distribution version.

        This method is enhanced compared to original distutils implementation.
        If the version string is set to a special value then instead of using
        the actual value the real version is obtained by querying versiontools.

        If versiontools package is not installed then the version is obtained
        from the standard section of the ``PKG-INFO`` file. This file is
        automatically created by any source distribution. This method is less
        useful as it cannot take advantage of version control information that
        is automatically loaded by versiontools. It has the advantage of not
        requiring versiontools installation and that it does not depend on
        ``setup_requires`` feature of ``setuptools``.


Question: Check if a field is well - formed .

def Func ( arg_0 ) : if type ( arg_0 ) not in ( list , tuple ) : raise InvenioBibRecordFieldError ( "Field of type '%s' should be either " "a list or a tuple." % type ( arg_0 ) ) if len ( arg_0 ) != 5 : raise InvenioBibRecordFieldError ( "Field of length '%d' should have 5 " "elements." % len ( arg_0 ) ) if type ( arg_0 [ 0 ] ) not in ( list , tuple ) : raise InvenioBibRecordFieldError ( "Subfields of type '%s' should be " "either a list or a tuple." % type ( arg_0 [ 0 ] ) ) if type ( arg_0 [ 1 ] ) is not str : raise InvenioBibRecordFieldError ( "Indicator 1 of type '%s' should be " "a string." % type ( arg_0 [ 1 ] ) ) if type ( arg_0 [ 2 ] ) is not str : raise InvenioBibRecordFieldError ( "Indicator 2 of type '%s' should be " "a string." % type ( arg_0 [ 2 ] ) ) if type ( arg_0 [ 3 ] ) is not str : raise InvenioBibRecordFieldError ( "Controlfield value of type '%s' " "should be a string." % type ( arg_0 [ 3 ] ) ) if type ( arg_0 [ 4 ] ) is not int : raise InvenioBibRecordFieldError ( "Global position of type '%s' should " "be an int." % type ( arg_0 [ 4 ] ) ) for arg_1 in arg_0 [ 0 ] : if ( type ( arg_1 ) not in ( list , tuple ) or len ( arg_1 ) != 2 or type ( arg_1 [ 0 ] ) is not str or type ( arg_1 [ 1 ] ) is not str ) : raise InvenioBibRecordFieldError ( "Subfields are malformed. " "Should a list of tuples of 2 strings." )

Create a tar file based on the list of files passed


Question: Shortcut for creating a rectangle aligned with the screen axes from only two corners .

Create a dictionary of datasets and a material object for air.

    :return: (Material, {str, DataSet})


Question: Return a 404 page with specified error_code after logging error and adding message to django messages .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : LOGGER . error ( arg_3 ) messages . add_generic_error_message_with_code ( arg_0 , arg_2 ) return render ( arg_0 , ENTERPRISE_GENERAL_ERROR_PAGE , context = arg_1 , status = 404 , )

Parse and sort an ``Accept`` header.

    The header is sorted according to the ``q`` parameter for each header value.

    @rtype: `OrderedDict` mapping `bytes` to `dict`
    @return: Mapping of media types to header parameters.


Question: Modify controlfield at position specified by tag and field number .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = None ) : arg_5 = record_get_field ( arg_0 , arg_1 , arg_3 = arg_3 , arg_4 = arg_4 ) arg_6 = ( arg_5 [ 0 ] , arg_5 [ 1 ] , arg_5 [ 2 ] , arg_2 , arg_5 [ 4 ] ) record_replace_field ( arg_0 , arg_1 , arg_6 , arg_3 = arg_3 , arg_4 = arg_4 )

Get object properties.

        @param window_name: Window name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string

        @return: list of properties
        @rtype: list


Question: Transfer this instruction to a new row .

def Func ( arg_0 , arg_1 ) : if arg_1 != arg_0 . _row : arg_2 = arg_0 . get_index_in_row ( ) if arg_2 is not None : arg_0 . _row . instructions . pop ( arg_2 ) arg_0 . _row = 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: Respond when the server indicates that the client is out of sync .

def Func ( arg_0 , arg_1 ) : info ( "synchronizing message: {message}" ) with arg_0 . world . _unlock_temporarily ( ) : arg_1 . _sync ( arg_0 . world ) arg_0 . world . _react_to_sync_response ( arg_1 ) for arg_2 in arg_0 . actors : arg_2 . _react_to_sync_response ( arg_1 )


Question: Generate a quaternion from a set of Euler angles .

def Func ( arg_0 , arg_1 = 'yzy' ) : arg_0 = np . asarray ( arg_0 , dtype = float ) arg_2 = quaternion_from_axis_rotation ( arg_0 [ 0 ] , arg_1 [ 0 ] ) * ( quaternion_from_axis_rotation ( arg_0 [ 1 ] , arg_1 [ 1 ] ) * quaternion_from_axis_rotation ( arg_0 [ 2 ] , arg_1 [ 2 ] ) ) arg_2 . normalize ( inplace = True ) return arg_2

Cycles through notifications with latest results from data feeds.


Question: Computes the FIRST set for every symbol in the grammar .

def Func ( arg_0 ) : for arg_1 in arg_0 . terminals : arg_0 . _first [ arg_1 ] . add ( arg_1 ) arg_0 . _first [ END_OF_INPUT ] . add ( END_OF_INPUT ) while True : arg_2 = False for arg_3 , arg_4 in arg_0 . nonterminals . items ( ) : for arg_5 in arg_4 : arg_6 = arg_0 . first ( arg_5 . rhs ) if arg_6 - arg_0 . _first [ arg_3 ] : arg_0 . _first [ arg_3 ] |= arg_6 arg_2 = True if not arg_2 : break

Creates a layer from its config.

    This method is the reverse of `get_config`, capable of instantiating the
    same layer from the config dictionary.

    Args:
      config: A Python dictionary, typically the output of `get_config`.

    Returns:
      layer: A layer instance.


Question: Return a dictionary of all global_settings values .

def Func ( arg_0 ) : return dict ( ( arg_1 , getattr ( global_settings , arg_1 ) ) for arg_1 in dir ( global_settings ) if arg_1 . isupper ( ) )

Associate an existing reservedIP to a deployment.

        name:
            Required. Name of the reserved IP address.

        service_name:
            Required. Name of the hosted service.

        deployment_name:
            Required. Name of the deployment.

        virtual_ip_name:
            Optional. Name of the VirtualIP in case of multi Vip tenant.
            If this value is not specified default virtualIP is used
            for this operation.


Question: Invert canning .

def Func ( arg_0 , arg_1 = None ) : arg_2 = False for arg_3 , arg_4 in iteritems ( Func_map ) : if isinstance ( arg_3 , string_types ) : arg_2 = True break elif isinstance ( arg_0 , arg_3 ) : return arg_4 ( arg_0 , arg_1 ) if arg_2 : _import_mapping ( Func_map , _original_Func_map ) return Func ( arg_0 , arg_1 ) return arg_0

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


Question: Create DRF generic class - based API view from injector class .

def Func ( arg_0 ) : arg_1 = create_handler ( GenericAPIView , arg_0 ) apply_http_methods ( arg_1 , arg_0 ) apply_api_view_methods ( arg_1 , arg_0 ) apply_Func_methods ( arg_1 , arg_0 ) return arg_0 . let ( as_view = arg_1 . as_view )


Question: Retrieves an account s descendants from the general ledger structure given the account name .

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_1 . accounts : arg_0 . _get_account_and_descendants_ ( arg_3 , arg_2 ) return arg_2

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: r Calculates the compressibility factor of a gas given its pressure and pressure - form virial coefficients . Any number of coefficients is supported .

def Func ( arg_0 , * arg_1 ) : return 1 + arg_0 * sum ( [ arg_3 * arg_0 ** arg_2 for arg_2 , arg_3 in enumerate ( arg_1 ) ] )


Question: Suspend process execution .

def Func ( arg_0 ) : if not arg_0 . is_running ( ) : arg_1 = arg_0 . _platform_impl . _process_name raise NoSuchProcess ( arg_0 . pid , arg_1 ) if hasattr ( arg_0 . _platform_impl , "Func_process" ) : arg_0 . _platform_impl . Func_process ( ) else : arg_0 . send_signal ( signal . SIGSTOP )


Question: Attempts to restart the running kernel .

def Func ( arg_0 , arg_1 , arg_2 = False ) : if arg_0 . custom_restart : arg_0 . custom_restart_requested . emit ( ) elif arg_0 . kernel_manager . has_kernel : arg_0 . kernel_manager . hb_channel . pause ( ) if arg_0 . confirm_restart : arg_3 = QtGui . QMessageBox . Yes | QtGui . QMessageBox . No arg_4 = QtGui . QMessageBox . question ( arg_0 , 'Restart kernel?' , arg_1 , arg_3 ) arg_5 = arg_4 == QtGui . QMessageBox . Yes else : arg_5 = True if arg_5 : try : arg_0 . kernel_manager . Func ( arg_2 = arg_2 ) except RuntimeError : arg_0 . _append_plain_text ( 'Kernel started externally. ' 'Cannot restart.\n' , before_prompt = True ) else : arg_0 . reset ( ) else : arg_0 . kernel_manager . hb_channel . unpause ( ) else : arg_0 . _append_plain_text ( 'Kernel process is either remote or ' 'unspecified. Cannot restart.\n' , before_prompt = True )

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: Checks if a temple project is up to date with the repo

def Func ( arg_0 = None ) : temple . check . in_git_repo ( ) temple . check . is_temple_project ( ) arg_1 = temple . utils . read_temple_config ( ) arg_2 = arg_1 [ '_version' ] arg_3 = arg_0 or _get_latest_template_version ( arg_1 [ '_template' ] ) return arg_3 == arg_2

Read the maximum volume level of the device.


Question: Cast value to its frozen counterpart .

def Func ( arg_0 ) : if isinstance ( arg_0 , list ) : return FrozenList ( * arg_0 ) if isinstance ( arg_0 , dict ) : return FrozenDict ( ** arg_0 ) return arg_0

Extract metadata entries from an xml node


Question: This is a worker for the function below .

def Func ( arg_0 ) : arg_1 , arg_2 , arg_3 = arg_0 try : return concat_write_pklc ( arg_1 , arg_2 , ** arg_3 ) except Exception as e : LOGEXCEPTION ( 'failed LC concatenation for %s in %s' % ( arg_2 , arg_1 ) ) return None

Override of clean method to perform additional validation


Question: Get stdout from all the tasks of a workflow .

def Func ( arg_0 ) : if not arg_0 . id : raise WorkflowError ( 'Workflow is not running.  Cannot get Func.' ) if arg_0 . batch_values : raise NotImplementedError ( "Query Each Workflow Id within the Batch Workflow for Func." ) arg_1 = arg_0 . workflow . get ( arg_0 . id ) arg_2 = [ ] for arg_3 in arg_1 [ 'tasks' ] : arg_2 . append ( { 'id' : arg_3 [ 'id' ] , 'taskType' : arg_3 [ 'taskType' ] , 'name' : arg_3 [ 'name' ] , 'Func' : arg_0 . workflow . get_Func ( arg_0 . id , arg_3 [ 'id' ] ) } ) return arg_2

Overriding the default JSONEncoder.default for NDB support.


Question: Validate the content of the files for consistency . Validators can look as deeply as needed into the files . dgit treats them all as black boxes .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = [ ] ) : arg_5 = plugins_get_mgr ( ) arg_6 = instantiate ( arg_0 , arg_1 , arg_2 , arg_3 ) arg_7 = [ ] for arg_8 in arg_6 : arg_9 = arg_5 . search ( what = 'validator' , name = arg_8 ) [ 'validator' ] for arg_10 in arg_9 : arg_11 = arg_5 . get_by_key ( 'validator' , arg_10 ) arg_12 = arg_11 . evaluate ( arg_0 , arg_6 [ arg_8 ] , arg_4 ) arg_7 . extend ( arg_12 ) return arg_7

Return the most recent timestamp in the operation.


Question: r Return the hyperbolic arc tangent of a waveform s dependent variable vector .

def Func ( arg_0 ) : pexdoc . exh . addex ( ValueError , "Math domain error" , bool ( ( min ( arg_0 . _dep_vector ) < - 1 ) or ( max ( arg_0 . _dep_vector ) > 1 ) ) , ) return _operation ( arg_0 , "Func" , "" , np . arctanh )

Returns the profile with the received ID as a dict

        If a local copy of the profile exists, it'll be returned. If not, it'll
        be downloaded from the web. The results are cached, so any subsequent
        calls won't hit the filesystem or the web.

        Args:
            profile_id (str): The ID of the profile you want.

        Raises:
            RegistryError: If there was some problem opening the profile file
                or its format was incorrect.


Question: Generates prompt based features from an essay set object and internal prompt variable . Generally called internally by gen_feats Returns an array of prompt features e_set - EssaySet object

def Func ( arg_0 , arg_1 ) : arg_2 = nltk . word_tokenize ( arg_1 . _prompt ) arg_3 = [ ] for arg_4 in arg_2 : arg_5 = util_functions . get_wordnet_syns ( arg_4 ) arg_3 . append ( arg_5 ) arg_3 = list ( chain . from_iterable ( arg_3 ) ) arg_6 = [ ] arg_7 = [ ] for arg_8 in arg_1 . _tokens : arg_9 = len ( arg_8 ) if ( arg_9 == 0 ) : arg_9 = 1 arg_6 . append ( len ( [ arg_10 for arg_10 in arg_8 if arg_10 in arg_2 ] ) ) arg_7 . append ( arg_6 [ len ( arg_6 ) - 1 ] / float ( arg_9 ) ) arg_11 = [ ] arg_12 = [ ] for arg_8 in arg_1 . _tokens : arg_9 = len ( arg_8 ) if ( arg_9 == 0 ) : arg_9 = 1 arg_11 . append ( len ( [ arg_10 for arg_10 in arg_8 if arg_10 in arg_3 ] ) ) arg_12 . append ( arg_11 [ len ( arg_11 ) - 1 ] / float ( arg_9 ) ) arg_13 = numpy . array ( ( arg_6 , arg_7 , arg_11 , arg_12 ) ) . transpose ( ) return arg_13 . copy ( )

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


Question: Returns fields metadata as a dataframe .

def Func ( arg_0 ) : return ( pd . concat ( [ arg_1 . metadata ( ) for arg_1 in arg_0 . fields ] , axis = 1 ) . transpose ( ) . sort_values ( [ "step_num" , "frame" , "label" , "position" ] ) )


Question: Deletes an Azure SQL Database server firewall rule .

def Func ( arg_0 , arg_1 , arg_2 ) : _validate_not_none ( 'server_name' , arg_1 ) _validate_not_none ( 'name' , arg_2 ) return arg_0 . _perform_delete ( arg_0 . _get_firewall_rules_path ( arg_1 , arg_2 ) )

Sort list of string with number in human order.

    Examples
    ----------
    >>> l = ['im1.jpg', 'im31.jpg', 'im11.jpg', 'im21.jpg', 'im03.jpg', 'im05.jpg']
    >>> l.sort(key=tl.files.natural_keys)
    ['im1.jpg', 'im03.jpg', 'im05', 'im11.jpg', 'im21.jpg', 'im31.jpg']
    >>> l.sort() # that is what we dont want
    ['im03.jpg', 'im05', 'im1.jpg', 'im11.jpg', 'im21.jpg', 'im31.jpg']

    References
    ----------
    - `link <http://nedbatchelder.com/blog/200712/human_sorting.html>`__


Question: Saves configuration variables in this module s SETTINGS .

def Func ( arg_0 , arg_1 = 'production' , arg_2 = None , arg_3 = None , ** arg_4 ) : global arg_5 , arg_6 , arg_12 , arg_8 , arg_7 , arg_11 if arg_2 is not None : arg_5 [ 'scrub_fields' ] = list ( arg_2 ) if arg_3 is not None : arg_5 [ 'url_fields' ] = list ( arg_3 ) arg_5 = dict_merge ( arg_5 , arg_4 ) if arg_12 : if not arg_5 . get ( 'suppress_reFunc_warning' ) : log . warning ( 'Rollbar already Funcialized. Ignoring re-Func.' ) return arg_5 [ 'access_token' ] = arg_0 arg_5 [ 'environment' ] = arg_1 if arg_5 . get ( 'allow_logging_basic_config' ) : logging . basicConfig ( ) if arg_5 . get ( 'handler' ) == 'agent' : arg_6 = _create_agent_log ( ) arg_7 = SerializableTransform ( safe_repr = arg_5 [ 'locals' ] [ 'safe_repr' ] , whitelist_types = arg_5 [ 'locals' ] [ 'whitelisted_types' ] ) arg_8 = [ ScrubRedactTransform ( ) , arg_7 , ScrubTransform ( suffixes = [ ( field , ) for field in arg_5 [ 'scrub_fields' ] ] , redact_char = '*' ) , ScrubUrlTransform ( suffixes = [ ( field , ) for field in arg_5 [ 'url_fields' ] ] , params_to_scrub = arg_5 [ 'scrub_fields' ] ) ] arg_9 = [ ( 'request' , 'POST' ) , ( 'request' , 'json' ) , ( 'body' , 'request' , 'POST' ) , ( 'body' , 'request' , 'json' ) , ] if arg_5 [ 'locals' ] [ 'enabled' ] : arg_9 . append ( ( 'body' , 'trace' , 'frames' , '*' , 'code' ) ) arg_9 . append ( ( 'body' , 'trace' , 'frames' , '*' , 'args' , '*' ) ) arg_9 . append ( ( 'body' , 'trace' , 'frames' , '*' , 'kwargs' , '*' ) ) arg_9 . append ( ( 'body' , 'trace' , 'frames' , '*' , 'locals' , '*' ) ) arg_9 . extend ( arg_5 [ 'shortener_keys' ] ) arg_10 = ShortenerTransform ( safe_repr = arg_5 [ 'locals' ] [ 'safe_repr' ] , keys = arg_9 , ** arg_5 [ 'locals' ] [ 'sizes' ] ) arg_8 . append ( arg_10 ) arg_11 = queue . Queue ( ) events . reset ( ) filters . add_builtin_filters ( arg_5 ) arg_12 = True

Get the expiration date from the database.

        :return: The expiration date from the database.
        :rtype: str|None


Question: Return a sequence containing the fields to be displayed on the changelist .

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_0 . list_display : try : arg_4 = arg_0 . model . _meta . get_field ( arg_3 ) if isinstance ( arg_4 , BooleanField ) : arg_3 = boolean_switch_field ( arg_4 ) except FieldDoesNotExist : pass arg_2 . append ( arg_3 ) return arg_2

Find a mapping that can apply to the given controller.  Returns None if unsuccessful.

        :param controller: :class:`Controller` to look up
        :return: :class:`ControllerMapping`


Question: Serial call to read month tariffs block into meter object buffer .

def Func ( arg_0 , arg_1 ) : arg_0 . setContext ( "Func" ) try : arg_2 = binascii . hexlify ( str ( arg_1 ) . zfill ( 1 ) ) arg_3 = "01523102303031" + arg_2 + "282903" arg_4 = arg_0 . m_mons if arg_1 == ReadMonths . kWhReverse : arg_4 = arg_0 . m_rev_mons arg_0 . request ( False ) arg_5 = arg_0 . calc_crc16 ( arg_3 [ 2 : ] . decode ( "hex" ) ) arg_3 += arg_5 arg_0 . m_serial_port . write ( arg_3 . decode ( "hex" ) ) arg_6 = arg_0 . m_serial_port . getResponse ( arg_0 . getContext ( ) ) arg_0 . serialPostEnd ( ) arg_7 = arg_0 . unpackStruct ( arg_6 , arg_4 ) arg_0 . convertData ( arg_7 , arg_4 , arg_0 . m_kwh_precision ) arg_8 = arg_0 . calc_crc16 ( arg_6 [ 1 : - 2 ] ) if str ( arg_8 ) == str ( arg_4 [ "crc16" ] [ MeterData . StringValue ] ) : ekm_log ( "Months CRC success, type = " + str ( arg_2 ) ) arg_0 . setContext ( "" ) return True except : ekm_log ( traceback . format_exc ( sys . exc_info ( ) ) ) arg_0 . setContext ( "" ) return False

Return a distance matrix keyed by the keys in the given dict.

    Distances are calculated based on pairwise tanimoto similarity of the sets contained.

    :param dict_of_sets: A dict of {x: set of y}
    :return: A similarity matrix based on the set overlap (tanimoto) score between each x as a dict of dicts


Question: Reads vlrs and parse them if possible from the stream

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 ( ) for arg_4 in range ( arg_2 ) : arg_5 = RawVLR . Func ( arg_1 ) try : arg_3 . append ( vlr_factory ( arg_5 ) ) except UnicodeDecodeError : logger . error ( "Failed to decode VLR: {}" . format ( arg_5 ) ) return arg_3


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

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . get_topologies_path ( ) if arg_2 : LOG . info ( "Adding children watch for path: " + arg_3 ) @ arg_0 . client . ChildrenWatch ( arg_3 ) def watch_topologies ( arg_4 ) : arg_1 ( arg_4 ) return arg_2

Creates the Nginx configuration for the project


Question: Add keyboard shortcuts to navigate the filesystem .

def Func ( arg_0 ) : arg_0 . _upShortcut = QtGui . QShortcut ( QtGui . QKeySequence ( 'Backspace' ) , arg_0 ) arg_0 . _upShortcut . setAutoRepeat ( False ) arg_0 . _upShortcut . activated . connect ( arg_0 . _onNavigateUpButtonClicked )

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: Extract function signature default arguments keyword - only arguments and whether or not variable positional or keyword arguments are allowed . This also supports calling unbound instance methods by passing an object instance as the first argument ; however unbound classmethod and staticmethod objects are not callable so we do not attempt to support them here .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , types . MethodType ) : arg_2 = getfullargspec ( arg_1 . __func__ ) arg_0 . pargl = arg_2 [ 0 ] [ 1 : ] else : arg_2 = getfullargspec ( arg_1 ) arg_0 . pargl = arg_2 [ 0 ] [ : ] if arg_2 [ 3 ] is not None : arg_4 = len ( arg_0 . pargl ) - len ( arg_2 [ 3 ] ) arg_0 . def_argv = dict ( ( arg_0 . pargl [ arg_4 + i ] , arg_2 [ 3 ] [ i ] ) for i in range ( len ( arg_2 [ 3 ] ) ) ) else : arg_0 . def_argv = { } arg_0 . var_pargs = arg_2 [ 1 ] is not None arg_0 . var_kargs = arg_2 [ 2 ] is not None arg_0 . kargl = arg_2 [ 4 ] if arg_2 [ 5 ] is not None : arg_0 . def_argv . update ( arg_2 [ 5 ] )

This returns an array of each sector and performance for the current trading day. Performance is based on each sector ETF.

    https://iexcloud.io/docs/api/#sector-performance
    8am-5pm ET Mon-Fri

    Args:
        token (string); Access token
        version (string); API version

    Returns:
        DataFrame: result


Question: Fill entire strip by giving individual RGB values instead of tuple

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = 0 , arg_5 = - 1 ) : arg_0 . fill ( ( arg_1 , arg_2 , arg_3 ) , arg_4 , arg_5 )

This function will create the VM directory where a repo will be mounted, if it
    doesn't exist.  If wait_for_server is set, it will wait up to 10 seconds for
    the nfs server to start, by retrying mounts that fail with 'Connection Refused'.

    If wait_for_server is not set, it will attempt to run the mount command once


Question: Bi directional recurrent neural network . GRU or LSTM

def Func ( arg_0 : arg_1 . Tensor , arg_3 : arg_4 , arg_5 = 'gru' , arg_6 = None , arg_7 = False , arg_8 = False , arg_9 = 'Bi-' ) : with arg_1 . variable_scope ( arg_9 + '_' + arg_5 . upper ( ) ) : if arg_5 == 'gru' : arg_10 = arg_1 . nn . rnn_cell . GRUCell ( arg_3 , kernel_initializer = INITIALIZER ( ) ) arg_11 = arg_1 . nn . rnn_cell . GRUCell ( arg_3 , kernel_initializer = INITIALIZER ( ) ) if arg_7 : arg_12 = arg_1 . tile ( arg_1 . get_variable ( 'init_fw_h' , [ 1 , arg_3 ] ) , ( arg_1 . shape ( arg_0 ) [ 0 ] , 1 ) ) arg_13 = arg_1 . tile ( arg_1 . get_variable ( 'init_bw_h' , [ 1 , arg_3 ] ) , ( arg_1 . shape ( arg_0 ) [ 0 ] , 1 ) ) else : arg_12 = arg_13 = None elif arg_5 == 'lstm' : arg_10 = arg_1 . nn . rnn_cell . LSTMCell ( arg_3 , arg_8 = arg_8 , initializer = INITIALIZER ( ) ) arg_11 = arg_1 . nn . rnn_cell . LSTMCell ( arg_3 , arg_8 = arg_8 , initializer = INITIALIZER ( ) ) if arg_7 : arg_12 = arg_1 . nn . rnn_cell . LSTMStateTuple ( arg_1 . tile ( arg_1 . get_variable ( 'init_fw_c' , [ 1 , arg_3 ] ) , ( arg_1 . shape ( arg_0 ) [ 0 ] , 1 ) ) , arg_1 . tile ( arg_1 . get_variable ( 'init_fw_h' , [ 1 , arg_3 ] ) , ( arg_1 . shape ( arg_0 ) [ 0 ] , 1 ) ) ) arg_13 = arg_1 . nn . rnn_cell . LSTMStateTuple ( arg_1 . tile ( arg_1 . get_variable ( 'init_bw_c' , [ 1 , arg_3 ] ) , ( arg_1 . shape ( arg_0 ) [ 0 ] , 1 ) ) , arg_1 . tile ( arg_1 . get_variable ( 'init_bw_h' , [ 1 , arg_3 ] ) , ( arg_1 . shape ( arg_0 ) [ 0 ] , 1 ) ) ) else : arg_12 = arg_13 = None else : raise RuntimeError ( 'cell_type must be either "gru" or "lstm"s' ) ( arg_14 , arg_15 ) , ( arg_16 , arg_17 ) = arg_1 . nn . bidirectional_dynamic_rnn ( arg_10 , arg_11 , arg_0 , dtype = arg_1 . float32 , sequence_length = arg_6 , arg_12 = arg_12 , arg_13 = arg_13 ) arg_18 = [ var for var in arg_10 . trainable_variables + arg_11 . trainable_variables if 'kernel' in var . name ] for arg_19 in arg_18 : arg_1 . add_to_collection ( arg_1 . GraphKeys . REGULARIZATION_LOSSES , arg_1 . nn . l2_loss ( arg_19 ) ) return ( arg_14 , arg_15 ) , ( arg_16 , arg_17 )

store metric in data tree and calc offset signs

        sign < 0 is CYAN, means metric value is lower then previous,
        sign > 1 is YELLOW, means metric value is higher then prevoius,
        sign == 0 is WHITE, means initial or equal metric value


Question: Calcul de l AOT40 du 1er mai au 31 juillet

def Func ( arg_0 , arg_1 ) : return _aot ( arg_0 . tshift ( 1 ) , arg_1 = arg_1 , limite = 80 , mois_debut = 5 , mois_fin = 7 , heure_debut = 8 , heure_fin = 19 )

ensures all workers and management thread are running


Question: Return list of GATT characteristics that have been discovered for this service .

def Func ( arg_0 ) : arg_1 = arg_0 . _props . Get ( _SERVICE_INTERFACE , 'Characteristics' ) return map ( BluezGattCharacteristic , get_provider ( ) . _get_objects_by_path ( arg_1 ) )

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: Send a roster set to the server .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = Iq ( to_jid = arg_0 . server , stanza_type = "set" ) arg_5 = RosterPayload ( [ arg_1 ] ) arg_4 . set_payload ( arg_5 ) def success_cb ( arg_6 ) : if arg_2 : arg_2 ( arg_1 ) def error_cb ( arg_7 ) : if arg_3 : arg_3 ( arg_7 ) else : logger . error ( "Roster change of '{0}' failed" . format ( arg_1 . jid ) ) arg_8 = arg_0 . stanza_processor arg_8 . set_response_handlers ( arg_4 , success_cb , error_cb ) arg_8 . send ( arg_4 )

Releases renderer resources associated with this image.


Question: A shallow copy .

def Func ( arg_0 ) : Func = arg_0 . __class__ . __new__ ( arg_0 . __class__ ) Func . _fwdm = arg_0 . _fwdm . copy ( ) Func . _invm = arg_0 . _invm . copy ( ) Func . _init_inv ( ) return Func

Convert this unnormalized batch to an instance of Batch.

        As this method is intended to be called before augmentation, it
        assumes that none of the ``*_aug`` attributes is yet set.
        It will produce an AssertionError otherwise.

        The newly created Batch's ``*_unaug`` attributes will match the ones
        in this batch, just in normalized form.

        Returns
        -------
        imgaug.augmentables.batches.Batch
            The batch, with ``*_unaug`` attributes being normalized.


Question: List buckets for a project .

def Func ( arg_0 = None , ** arg_1 ) : arg_2 = arg_0 . Func ( ** arg_1 ) return [ arg_3 . __dict__ for arg_3 in arg_2 ]

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: Load an object from the file pointer .

def Func ( arg_0 , arg_1 = arg_2 , arg_3 = arg_2 , arg_4 = arg_5 , arg_6 = arg_7 ) : arg_8 = None arg_9 = arg_4 ( ) arg_10 = set ( ) for arg_11 in arg_0 : if arg_8 is None : if isinstance ( arg_11 , six . text_type ) : arg_8 = six . u else : arg_8 = six . b arg_12 = arg_8 ( '|' ) arg_13 = arg_8 ( '_' ) arg_14 = arg_8 ( '\n' ) if arg_1 is arg_2 : arg_1 = arg_12 if arg_3 is arg_2 : arg_3 = arg_13 arg_15 , arg_16 = arg_11 . strip ( ) . split ( arg_1 , 1 ) arg_17 = arg_15 . split ( arg_3 ) try : arg_18 = int ( arg_17 [ - 1 ] ) arg_19 = True except ValueError : arg_19 = False if len ( arg_17 ) > 1 and arg_19 : arg_20 = arg_15 . rsplit ( arg_3 , 1 ) [ 0 ] if arg_20 not in arg_10 : arg_10 . add ( arg_20 ) if arg_20 in arg_9 : if not isinstance ( arg_9 [ arg_20 ] , arg_5 ) : arg_9 [ arg_20 ] = { - 1 : arg_9 [ arg_20 ] } else : arg_9 [ arg_20 ] = { } arg_9 [ arg_20 ] [ arg_18 ] = arg_16 else : if arg_15 in arg_9 and isinstance ( arg_9 [ arg_15 ] , arg_5 ) : arg_9 [ arg_15 ] [ - 1 ] = arg_16 else : arg_9 [ arg_15 ] = arg_16 for arg_15 in arg_10 : arg_9 [ arg_15 ] = arg_6 ( pair [ 1 ] for pair in sorted ( six . iteritems ( arg_9 [ arg_15 ] ) ) ) return arg_9

Check that a binary operator is surrounded by exactly one space.


Question: Get experiment or experiment job logs .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : def get_experiment_Func ( ) : if arg_2 : try : arg_5 = PolyaxonClient ( ) . experiment . Func ( arg_6 , arg_7 , arg_8 , stream = False ) get_Func_handler ( handle_job_info = True , show_timestamp = not arg_4 , stream = False ) ( arg_5 . content . decode ( ) . split ( '\n' ) ) print ( ) if not arg_3 : return except ( PolyaxonHTTPError , PolyaxonShouldExitError , PolyaxonClientException ) as e : if not arg_3 : Printer . print_error ( 'Could not get Func for experiment `{}`.' . format ( arg_8 ) ) Printer . print_error ( 'Error message `{}`.' . format ( e ) ) sys . exit ( 1 ) try : PolyaxonClient ( ) . experiment . Func ( arg_6 , arg_7 , arg_8 , message_handler = get_Func_handler ( handle_job_info = True , show_timestamp = not arg_4 ) ) except ( PolyaxonHTTPError , PolyaxonShouldExitError , PolyaxonClientException ) as e : Printer . print_error ( 'Could not get Func for experiment `{}`.' . format ( arg_8 ) ) Printer . print_error ( 'Error message `{}`.' . format ( e ) ) sys . exit ( 1 ) def get_experiment_job_Func ( ) : if arg_2 : try : arg_5 = PolyaxonClient ( ) . experiment_job . Func ( arg_6 , arg_7 , arg_8 , arg_9 , stream = False ) get_Func_handler ( handle_job_info = True , show_timestamp = not arg_4 , stream = False ) ( arg_5 . content . decode ( ) . split ( '\n' ) ) print ( ) if not arg_3 : return except ( PolyaxonHTTPError , PolyaxonShouldExitError , PolyaxonClientException ) as e : if not arg_3 : Printer . print_error ( 'Could not get Func for experiment `{}`.' . format ( arg_8 ) ) Printer . print_error ( 'Error message `{}`.' . format ( e ) ) sys . exit ( 1 ) try : PolyaxonClient ( ) . experiment_job . Func ( arg_6 , arg_7 , arg_8 , arg_9 , message_handler = get_Func_handler ( handle_job_info = True , show_timestamp = not arg_4 ) ) except ( PolyaxonHTTPError , PolyaxonShouldExitError , PolyaxonClientException ) as e : Printer . print_error ( 'Could not get Func for job `{}`.' . format ( arg_9 ) ) Printer . print_error ( 'Error message `{}`.' . format ( e ) ) sys . exit ( 1 ) arg_6 , arg_7 , arg_8 = get_project_experiment_or_local ( arg_0 . obj . get ( 'project' ) , arg_0 . obj . get ( 'experiment' ) ) if arg_1 : arg_9 = get_experiment_job_or_local ( arg_1 ) get_experiment_job_Func ( ) else : get_experiment_Func ( )

Return the revocations in this certificate revocation list.

        These revocations will be provided by value, not by reference.
        That means it's okay to mutate them: it won't affect this CRL.

        :return: The revocations in this CRL.
        :rtype: :class:`tuple` of :class:`Revocation`


Question: Groups graph into subgraphs and assigns each subgraph a score based on the average of all nodes values for the given node key

def Func ( arg_0 : arg_1 , arg_2 : arg_3 , arg_4 : arg_3 = 'Subgraph' , arg_5 : arg_6 [ arg_7 [ [ arg_8 [ arg_9 ] ] , arg_9 ] ] = None , ) -> Mapping [ arg_3 , arg_9 ] : if arg_5 is None : def arg_5 ( arg_10 ) : return sum ( arg_10 ) / len ( arg_10 ) arg_11 = { } for arg_12 , arg_13 in group_nodes_by_annotation ( arg_0 , arg_4 ) . items ( ) : arg_14 = [ arg_0 . nodes [ node ] [ arg_2 ] for node in arg_13 if arg_2 in arg_0 . nodes [ node ] ] arg_11 [ arg_12 ] = arg_5 ( arg_14 ) return arg_11

Initialize configuration.

        :param app: An instance of :class:`~flask.Flask`.


Question: Trim leading and trailing silence from an audio signal .

def Func ( arg_0 , arg_1 = 60 , arg_2 = arg_3 . max , arg_5 = 2048 , arg_6 = 512 ) : arg_7 = _signal_to_frame_nonsilent ( arg_0 , arg_5 = arg_5 , arg_6 = arg_6 , arg_2 = arg_2 , arg_1 = arg_1 ) arg_8 = arg_3 . flatnonzero ( arg_7 ) if arg_8 . size > 0 : arg_9 = int ( core . frames_to_samples ( arg_8 [ 0 ] , arg_6 ) ) arg_10 = min ( arg_0 . shape [ - 1 ] , int ( core . frames_to_samples ( arg_8 [ - 1 ] + 1 , arg_6 ) ) ) else : arg_9 , arg_10 = 0 , 0 arg_11 = [ slice ( None ) ] * arg_0 . ndim arg_11 [ - 1 ] = slice ( arg_9 , arg_10 ) return arg_0 [ tuple ( arg_11 ) ] , arg_3 . asarray ( [ arg_9 , arg_10 ] )

Returns a dictionary with all the past baking statuses of a single book.


Question: Imports experiences .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , dict ) : if arg_0 . unique_state : arg_1 [ 'states' ] = dict ( state = arg_1 [ 'states' ] ) if arg_0 . unique_action : arg_1 [ 'actions' ] = dict ( action = arg_1 [ 'actions' ] ) arg_0 . model . Func ( ** arg_1 ) else : if arg_0 . unique_state : arg_2 = dict ( state = list ( ) ) else : arg_2 = { arg_8 : list ( ) for arg_8 in arg_1 [ 0 ] [ 'states' ] } arg_3 = [ list ( ) for _ in arg_1 [ 0 ] [ 'internals' ] ] if arg_0 . unique_action : arg_4 = dict ( action = list ( ) ) else : arg_4 = { arg_8 : list ( ) for arg_8 in arg_1 [ 0 ] [ 'actions' ] } arg_5 = list ( ) arg_6 = list ( ) for arg_7 in arg_1 : if arg_0 . unique_state : arg_2 [ 'state' ] . append ( arg_7 [ 'states' ] ) else : for arg_8 in sorted ( arg_2 ) : arg_2 [ arg_8 ] . append ( arg_7 [ 'states' ] [ arg_8 ] ) for arg_9 , arg_10 in enumerate ( arg_3 ) : arg_10 . append ( arg_7 [ 'internals' ] [ arg_9 ] ) if arg_0 . unique_action : arg_4 [ 'action' ] . append ( arg_7 [ 'actions' ] ) else : for arg_8 in sorted ( arg_4 ) : arg_4 [ arg_8 ] . append ( arg_7 [ 'actions' ] [ arg_8 ] ) arg_5 . append ( arg_7 [ 'terminal' ] ) arg_6 . append ( arg_7 [ 'reward' ] ) arg_0 . model . Func ( arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 )


Question: Parses a FastQC summary report file and returns it as a dictionary .

def Func ( arg_0 ) : arg_1 = OrderedDict ( ) logger . debug ( "Retrieving summary information from file: {}" . format ( arg_0 ) ) with open ( arg_0 ) as fh : for arg_2 in fh : if not arg_2 . strip ( ) : continue arg_3 = [ x . strip ( ) for x in arg_2 . split ( "\t" ) ] arg_1 [ arg_3 [ 1 ] ] = arg_3 [ 0 ] logger . debug ( "Retrieved summary information from file: {}" . format ( arg_1 ) ) return arg_1

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


Question: Creates a new sequence where o is the first element and seq is the rest . If seq is None return a list containing o . If seq is not a ISeq attempt to coerce it to a ISeq and then cons o onto the resulting sequence .

def Func ( arg_0 , arg_1 ) -> ISeq : if arg_1 is None : return llist . l ( arg_0 ) if isinstance ( arg_1 , ISeq ) : return arg_1 . Func ( arg_0 ) return Maybe ( to_seq ( arg_1 ) ) . map ( lambda s : s . Func ( arg_0 ) ) . or_else ( lambda : llist . l ( arg_0 ) )


Question: Reset graphics attributs to their default values .

def Func ( arg_0 ) : arg_0 . intensity = 0 arg_0 . italic = False arg_0 . bold = False arg_0 . underline = False arg_0 . foreground_color = None arg_0 . background_color = None

Simple and fast implementation of the covariance AR estimate

    This code is 10 times faster than :func:`modcovar_marple` and more importantly
    only 10 lines of code, compared to a 200 loc for :func:`modcovar_marple`

    :param X:        Array of complex data samples
    :param int order:   Order of linear prediction model

    :return:
        * P    - Real linear prediction variance at order IP
        * A    - Array of complex linear prediction coefficients

    .. plot::
        :include-source:
        :width: 80%

        from spectrum import modcovar, marple_data, arma2psd, cshift
        from pylab import log10, linspace, axis, plot

        a, p = modcovar(marple_data, 15)
        PSD = arma2psd(a)
        PSD = cshift(PSD, len(PSD)/2) # switch positive and negative freq
        plot(linspace(-0.5, 0.5, 4096), 10*log10(PSD/max(PSD)))
        axis([-0.5,0.5,-60,0])

    .. seealso:: :class:`~spectrum.modcovar.pmodcovar`

    :validation: the AR parameters are the same as those returned by
        a completely different function :func:`modcovar_marple`.

    :References: Mathworks


Question: Returns the supplied URL .

def Func ( arg_0 ) : if arg_0 . success_url : arg_1 = arg_0 . success_url else : arg_1 = arg_0 . request . get_full_path ( ) return arg_1


Question: Try to convert channel to a unitary representation Operator .

def Func ( arg_0 ) : arg_1 = _Func ( arg_0 . rep , arg_0 . _data , * arg_0 . dim ) return Operator ( arg_1 , arg_0 . input_dims ( ) , arg_0 . output_dims ( ) )

Copy a path from inside a Dusty container to a path on the
    local filesystem. The path on the local filesystem must be
    wrist-accessible by the user specified in mac_username.


Question: r Method to calculate molar volume of a gas mixture at temperature T pressure P mole fractions zs and weight fractions ws with a given method .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : if arg_5 == SIMPLE : arg_6 = [ i ( arg_1 , arg_2 ) for i in arg_0 . VolumeGases ] return mixing_simple ( arg_3 , arg_6 ) elif arg_5 == IDEAL : return ideal_gas ( arg_1 , arg_2 ) elif arg_5 == EOS : arg_0 . eos [ 0 ] = arg_0 . eos [ 0 ] . to_TP_zs ( arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 ) return arg_0 . eos [ 0 ] . V_g else : raise Exception ( 'Method not valid' )

Create a traceback for an Octave evaluation error.


Question: Sets a header field with the given value removing previous values .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_1 . lower ( ) arg_4 = arg_1 , arg_2 arg_5 = arg_0 . _container . Funcdefault ( arg_3 , arg_4 ) if arg_4 is not arg_5 : arg_0 . _container [ arg_3 ] = [ arg_5 [ 0 ] , arg_5 [ 1 ] , arg_2 ]

Init openstack neutron mq

        1. Check if enable listening neutron notification
        2. Create consumer

        :param mq: class ternya.mq.MQ


Question: Make autodoc documentation template string for a module

def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = arg_0 . _parse_module ( arg_1 ) if not len ( arg_2 ) and not len ( arg_3 ) : print 'WARNING: Empty -' , arg_1 return '' arg_4 = re . sub ( r'^%s\.' % arg_0 . package_name , '' , arg_1 ) arg_5 = '.. AUTO-GENERATED FILE -- DO NOT EDIT!\n\n' arg_6 = arg_4 arg_5 += ( arg_6 + '\n' + arg_0 . rst_section_levels [ 1 ] * len ( arg_6 ) + '\n\n' ) if '.' in arg_1 : arg_7 = 'Module: :mod:`' + arg_4 + '`' else : arg_7 = ':mod:`' + arg_4 + '`' arg_5 += arg_7 + '\n' + arg_0 . rst_section_levels [ 2 ] * len ( arg_7 ) if len ( arg_3 ) : arg_5 += '\nInheritance diagram for ``%s``:\n\n' % arg_1 arg_5 += '.. inheritance-diagram:: %s \n' % arg_1 arg_5 += '   :parts: 3\n' arg_5 += '\n.. automodule:: ' + arg_1 + '\n' arg_5 += '\n.. currentmodule:: ' + arg_1 + '\n' arg_8 = len ( arg_3 ) > 1 arg_9 = len ( arg_2 ) > 1 if arg_8 : arg_5 += '\n' + 'Classes' + '\n' + arg_0 . rst_section_levels [ 2 ] * 7 + '\n' elif len ( arg_3 ) and arg_9 : arg_5 += '\n' + 'Class' + '\n' + arg_0 . rst_section_levels [ 2 ] * 5 + '\n' for arg_10 in arg_3 : arg_5 += '\n:class:`' + arg_10 + '`\n' + arg_0 . rst_section_levels [ arg_8 + 2 ] * ( len ( arg_10 ) + 9 ) + '\n\n' arg_5 += '\n.. autoclass:: ' + arg_10 + '\n' arg_5 += '  :members:\n' '  :undoc-members:\n' '  :show-inheritance:\n' '  :inherited-members:\n' '\n' '  .. automethod:: __init__\n' if arg_9 : arg_5 += '\n' + 'Functions' + '\n' + arg_0 . rst_section_levels [ 2 ] * 9 + '\n\n' elif len ( arg_2 ) and arg_8 : arg_5 += '\n' + 'Function' + '\n' + arg_0 . rst_section_levels [ 2 ] * 8 + '\n\n' for arg_11 in arg_2 : arg_5 += '\n.. autofunction:: ' + arg_1 + '.' + arg_11 + '\n\n' return arg_5


Question: Return the maximum 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: Yields blocks starting from start .

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_0 . block_interval = arg_0 . get_block_interval ( ) if not arg_1 : arg_1 = arg_0 . get_current_block_num ( ) while True : if arg_2 : arg_4 = arg_2 else : arg_4 = arg_0 . get_current_block_num ( ) for arg_5 in range ( arg_1 , arg_4 + 1 ) : arg_6 = arg_0 . wait_for_and_get_block ( arg_5 ) arg_6 . update ( { "block_num" : arg_5 } ) yield arg_6 arg_1 = arg_4 + 1 if arg_2 and arg_1 > arg_2 : return time . sleep ( arg_0 . block_interval )

Remove card from tradepile.

        :params trade_id: Trade id.


Question: Open a shell

def Func ( ) : from gui . tools . debug import Shell Func = Shell ( ) Func . show ( ) return Func

Load Flickr25K dataset.

    Returns a list of images by a given tag from Flick25k dataset,
    it will download Flickr25k from `the official website <http://press.liacs.nl/mirflickr/mirdownload.html>`__
    at the first time you use it.

    Parameters
    ------------
    tag : str or None
        What images to return.
            - If you want to get images with tag, use string like 'dog', 'red', see `Flickr Search <https://www.flickr.com/search/>`__.
            - If you want to get all images, set to ``None``.

    path : str
        The path that the data is downloaded to, defaults is ``data/flickr25k/``.
    n_threads : int
        The number of thread to read image.
    printable : boolean
        Whether to print infomation when reading images, default is ``False``.

    Examples
    -----------
    Get images with tag of sky

    >>> images = tl.files.load_flickr25k_dataset(tag='sky')

    Get all images

    >>> images = tl.files.load_flickr25k_dataset(tag=None, n_threads=100, printable=True)


Question: Return staff in your club .

def Func ( arg_0 ) : arg_1 = 'GET' arg_2 = 'club/stats/staff' arg_3 = arg_0 . __request__ ( arg_1 , arg_2 ) return arg_3

receives a UUID via the request and returns either a fresh or an existing dropbox
    for it


Question: For a tracer extract the image - plane image of every plane and blur it with the PSF .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = [ ] for arg_6 in range ( arg_0 ) : if np . count_nonzero ( arg_1 [ arg_6 ] ) > 0 : arg_7 = blurred_image_1d_from_1d_unblurred_and_blurring_images ( unblurred_image_1d = arg_1 [ arg_6 ] , blurring_image_1d = arg_2 [ arg_6 ] , arg_3 = arg_3 ) arg_8 = arg_4 ( array_1d = arg_7 ) arg_5 . append ( arg_8 ) else : arg_5 . append ( None ) return arg_5

This method is called before first step of simulation.


Question: Creates the Version on Google Cloud ML Engine .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = 'projects/{}/models/{}' . format ( arg_1 , arg_2 ) arg_5 = arg_0 . _mlengine . projects ( ) . models ( ) . versions ( ) . create ( parent = arg_4 , body = arg_3 ) arg_6 = arg_5 . execute ( ) arg_7 = arg_0 . _mlengine . projects ( ) . operations ( ) . get ( name = arg_6 [ 'name' ] ) return _poll_with_exponential_delay ( request = arg_7 , max_n = 9 , is_done_func = lambda resp : resp . get ( 'done' , False ) , is_error_func = lambda resp : resp . get ( 'error' , None ) is not None )


Question: Returns a dictionary which contains the current config . If a section is setted only will returns the section config

def Func ( arg_0 , arg_1 = None ) : arg_2 = { } if arg_1 is None : for arg_3 in arg_0 . config . sections ( ) : if '/' in arg_3 : arg_4 , arg_5 = arg_3 . split ( '/' ) arg_2 [ arg_4 ] [ arg_5 ] = dict ( arg_0 . config . items ( arg_3 ) ) else : arg_2 [ arg_3 ] = dict ( arg_0 . config . items ( arg_3 ) ) else : arg_2 = dict ( arg_0 . config . items ( arg_1 ) ) return arg_2


Question: Decode given representation .

def Func ( arg_0 , arg_1 ) : if not arg_0 . rep_dim : raise Exception ( "rep_dim must be set to Func." ) if not arg_0 . decoding_network : arg_0 . decoding_network = NeuralNetwork ( arg_0 . rep_dim ) for arg_3 in arg_0 . decoding_layers : arg_0 . decoding_network . stack_layer ( arg_3 , no_setup = True ) return arg_0 . decoding_network . compute ( arg_1 )

Post processes the estimations from the algorithm, removing empty
        segments and making sure the lenghts of the boundaries and labels
        match.


Question: Adds error message to soft errors list if within soft assertions context . Either just force test failure with the given message .

def Func ( arg_0 = '' ) : global _soft_ctx if _soft_ctx : global _soft_err _soft_err . append ( 'Fail: %s!' % arg_0 if arg_0 else 'Fail!' ) return fail ( arg_0 )

Returns the end date for a model instance


Question: evaluate compiled ast of gene_reaction_rule with knockouts

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_0 , Expression ) : return Func ( arg_0 . body , arg_1 ) elif isinstance ( arg_0 , Name ) : return arg_0 . id not in arg_1 elif isinstance ( arg_0 , BoolOp ) : arg_2 = arg_0 . op if isinstance ( arg_2 , Or ) : return any ( Func ( arg_3 , arg_1 ) for arg_3 in arg_0 . values ) elif isinstance ( arg_2 , And ) : return all ( Func ( arg_3 , arg_1 ) for arg_3 in arg_0 . values ) else : raise TypeError ( "unsupported operation " + arg_2 . __class__ . __name__ ) elif arg_0 is None : return True else : raise TypeError ( "unsupported operation  " + repr ( arg_0 ) )

Total used size in percentage for volume


Question: Iterate over complete graphs .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 , arg_4 = arg_0 arg_4 = list ( arg_4 ) if arg_2 is None : arg_2 = count ( ) while len ( arg_4 ) < arg_1 : arg_5 = nx . complete_graph ( arg_4 ) yield arg_5 arg_6 = next ( arg_2 ) while arg_6 in arg_5 : arg_6 = next ( arg_2 ) arg_4 . append ( arg_6 )

Creates and connects the underlying text widget.


Question: Return a dict of arrays .

def Func ( arg_0 , arg_1 , arg_2 = [ ] ) : arg_3 = { } arg_4 = 0 while arg_4 < len ( arg_1 ) : try : arg_5 = arg_0 . get_md_device_name ( arg_1 [ arg_4 ] ) except IndexError : pass else : if arg_5 is not None : arg_3 [ arg_5 ] = arg_0 . get_md_device ( arg_1 [ arg_4 ] , arg_2 ) arg_4 += 1 arg_3 [ arg_5 ] . update ( arg_0 . get_md_status ( arg_1 [ arg_4 ] ) ) arg_4 += 1 return arg_3

This internal helper does the common work for
        ``set_ocsp_server_callback`` and ``set_ocsp_client_callback``, which is
        almost all of it.


Question: Get the child toolkit widgets for this object .

def Func ( arg_0 ) : for arg_1 in arg_0 . children ( ) : arg_2 = arg_1 . widget if arg_2 is not None : yield arg_2

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: Return the NCD between two strings using arithmetic coding .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : if arg_1 == arg_2 : return 0.0 if arg_3 is None : arg_0 . _coder . train ( arg_1 + arg_2 ) else : arg_0 . _coder . set_probs ( arg_3 ) arg_4 = arg_0 . _coder . encode ( arg_1 ) [ 1 ] arg_5 = arg_0 . _coder . encode ( arg_2 ) [ 1 ] arg_6 = arg_0 . _coder . encode ( arg_1 + arg_2 ) [ 1 ] arg_7 = arg_0 . _coder . encode ( arg_2 + arg_1 ) [ 1 ] return ( min ( arg_6 , arg_7 ) - min ( arg_4 , arg_5 ) ) / max ( arg_4 , arg_5 )

Write config in configuration file.
        Data must me a dict.


Question: Awake one process waiting to receive data on fd

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . connections if arg_2 ( arg_1 ) and arg_0 . twait [ arg_2 ( arg_1 ) ] : arg_3 = random . sample ( arg_0 . twait [ arg_2 ( arg_1 ) ] , 1 ) [ 0 ] arg_0 . awake ( arg_3 )

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


Question: Hook for type - checking invoked during assignment .

def Func ( arg_0 , arg_1 ) : if arg_0 . __dict__ [ 'dtype' ] is None : return elif arg_1 is None : return elif isinstance ( arg_1 , arg_0 . __dict__ [ 'dtype' ] ) : return arg_2 = "Value of type %s, when %s was expected." % ( type ( arg_1 ) , arg_0 . __dict__ [ 'dtype' ] ) raise TypeError ( arg_2 )

Returns the current ZipkinAttrs and generates new ones if needed.

        :returns: (report_root_timestamp, zipkin_attrs)
        :rtype: (bool, ZipkinAttrs)


Question: Start spark and hdfs worker containers

def Func ( arg_0 , arg_1 ) : arg_0 . sparkContainerID = dockerCheckOutput ( arg_1 = arg_1 , defer = STOP , workDir = os . getcwd ( ) , tool = "quay.io/ucsc_cgl/apache-spark-worker:1.5.2" , dockerParameters = [ "--net=host" , "-d" , "-v" , "/mnt/ephemeral/:/ephemeral/:rw" , "-e" , "\"SPARK_MASTER_IP=" + arg_0 . masterIP + ":" + _SPARK_MASTER_PORT + "\"" , "-e" , "SPARK_LOCAL_DIRS=/ephemeral/spark/local" , "-e" , "SPARK_WORKER_DIR=/ephemeral/spark/work" ] , parameters = [ arg_0 . masterIP + ":" + _SPARK_MASTER_PORT ] ) [ : - 1 ] arg_0 . __Func_datanode ( arg_1 ) arg_3 = True arg_4 = 0 while arg_3 and ( arg_4 < 5 ) : _log . info ( "Sleeping 30 seconds before checking HDFS Funcup." ) time . sleep ( 30 ) arg_5 = "" try : arg_5 = subprocess . check_output ( [ "docker" , "exec" , arg_0 . hdfsContainerID , "grep" , "clusterID" , "-R" , "/opt/apache-hadoop/logs" ] ) except : pass if "Incompatible" in arg_5 : _log . warning ( "Hadoop Datanode failed to Func with: %s" , arg_5 ) _log . warning ( "Retrying container Funcup, retry #%d." , arg_4 ) arg_4 += 1 _log . warning ( "Removing ephemeral hdfs directory." ) subprocess . check_call ( [ "docker" , "exec" , arg_0 . hdfsContainerID , "rm" , "-rf" , "/ephemeral/hdfs" ] ) _log . warning ( "Killing container %s." , arg_0 . hdfsContainerID ) subprocess . check_call ( [ "docker" , "kill" , arg_0 . hdfsContainerID ] ) _log . info ( "ReFuncing datanode." ) arg_0 . __Func_datanode ( arg_1 ) else : _log . info ( "HDFS datanode Funced up OK!" ) arg_3 = False if arg_4 >= 5 : raise RuntimeError ( "Failed %d times trying to Func HDFS datanode." % arg_4 ) return


Question: Adds a paramber to the Population

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_0 . __parameters . append ( Parameter ( arg_1 , arg_2 , arg_3 ) )

Unsigned divide.

        Divides (unsigned) the value in the AX register, DX:AX register pair,
        or EDX:EAX or RDX:RAX register pair (dividend) by the source operand
        (divisor) and stores the result in the AX (AH:AL), DX:AX, EDX:EAX or
        RDX:RAX registers. The source operand can be a general-purpose register
        or a memory location. The action of this instruction depends of the
        operand size (dividend/divisor). Division using 64-bit operand is
        available only in 64-bit mode. Non-integral results are truncated
        (chopped) towards 0. The reminder is always less than the divisor in
        magnitude. Overflow is indicated with the #DE (divide error) exception
        rather than with the CF flag::

            IF SRC  =  0
                THEN #DE; FI;(* divide error *)
            IF OperandSize  =  8 (* word/byte operation *)
                THEN
                    temp  =  AX / SRC;
                    IF temp > FFH
                        THEN #DE; (* divide error *) ;
                        ELSE
                            AL  =  temp;
                            AH  =  AX MOD SRC;
                    FI;
                ELSE IF OperandSize  =  16 (* doubleword/word operation *)
                    THEN
                        temp  =  DX:AX / SRC;
                        IF temp > FFFFH
                            THEN #DE; (* divide error *) ;
                        ELSE
                            AX  =  temp;
                            DX  =  DX:AX MOD SRC;
                        FI;
                    FI;
                ELSE If OperandSize = 32 (* quadword/doubleword operation *)
                    THEN
                        temp  =  EDX:EAX / SRC;
                        IF temp > FFFFFFFFH
                            THEN #DE; (* divide error *) ;
                        ELSE
                            EAX  =  temp;
                            EDX  =  EDX:EAX MOD SRC;
                        FI;
                    FI;
                ELSE IF OperandSize = 64 (*Doublequadword/quadword operation*)
                    THEN
                        temp = RDX:RAX / SRC;
                        IF temp > FFFFFFFFFFFFFFFFH
                            THEN #DE; (* Divide error *)
                        ELSE
                            RAX = temp;
                            RDX = RDX:RAX MOD SRC;
                        FI;
                    FI;
            FI;

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


Question: Processes a GET request .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . assert_operations ( 'read' ) arg_3 = arg_0 . read ( ) if not arg_3 : raise http . exceptions . NotFound ( ) if ( isinstance ( arg_3 , Iterable ) and not isinstance ( arg_3 , six . string_types ) ) and arg_3 : arg_3 = pagination . paginate ( arg_0 . request , arg_0 . response , arg_3 ) arg_0 . make_response ( arg_3 )

Stop streaming samples from device and delete samples buffer