Question: numba compiled code to get matrix fast . arr is a 4 x N seq matrix converted to np . int8 I convert the numbers for ATGC into their respective index for the MAT matrix and leave all others as high numbers i . e . - == 45 N == 78 .

Relay messages from the forum on the server to the client represented
        by this actor.


Question: Checks if the executor agrees with the state of task instances that are running

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . executor for arg_3 , arg_4 in list ( arg_2 . get_event_buffer ( ) . items ( ) ) : if arg_3 not in arg_1 : arg_0 . log . warning ( "%s state %s not in running=%s" , arg_3 , arg_4 , arg_1 . values ( ) ) continue arg_5 = arg_1 [ arg_3 ] arg_5 . refresh_from_db ( ) arg_0 . log . debug ( "Executor state: %s task %s" , arg_4 , arg_5 ) if arg_4 == State . FAILED or arg_4 == State . SUCCESS : if arg_5 . state == State . RUNNING or arg_5 . state == State . QUEUED : arg_6 = ( "Executor reports task instance {} finished ({}) " "although the task says its {}. Was the task " "killed externally?" . format ( arg_5 , arg_4 , arg_5 . state ) ) arg_0 . log . error ( arg_6 ) arg_5 . handle_failure ( arg_6 )


Question: Print emphasized neutral the given txt message

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

Show Program Landing page for the Enterprise's Program.

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

        Unauthenticated learners will be redirected to enterprise-linked SSO.

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


Question: Create the cipher object to encrypt or decrypt a payload .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : from argon2 . low_level import hash_secret_raw , Type from Crypto . Cipher import AES arg_4 = arg_0 . _get_mode ( arg_0 . aesmode ) if arg_4 is None : raise ValueError ( 'invalid AES mode: %s' % arg_0 . aesmode ) arg_5 = hash_secret_raw ( secret = arg_1 . encode ( arg_0 . password_encoding ) , arg_2 = arg_2 , time_cost = arg_0 . time_cost , memory_cost = arg_0 . memory_cost , parallelism = arg_0 . parallelism , hash_len = 16 , type = Type . ID ) return AES . new ( arg_5 , arg_4 , arg_3 )


Question: Converts input sequence file into a Boulder - IO format as used by primer3

def Func ( arg_0 , arg_1 ) : arg_2 = sequences . file_reader ( arg_0 ) arg_3 = utils . open_file_write ( arg_1 ) for arg_4 in arg_2 : print ( "SEQUENCE_ID=" + arg_4 . id , file = arg_3 ) print ( "SEQUENCE_TEMPLATE=" + arg_4 . seq , file = arg_3 ) print ( "=" , file = arg_3 ) utils . close ( arg_3 )


Question: r AIC order - selection using eigen values

def Func ( arg_0 , arg_1 ) : import numpy as np arg_2 = [ ] arg_3 = len ( arg_0 ) for arg_4 in range ( 0 , arg_3 - 1 ) : arg_5 = 1. / ( arg_3 - arg_4 ) * np . sum ( arg_0 [ arg_4 + 1 : ] ) arg_6 = np . prod ( arg_0 [ arg_4 + 1 : ] ** ( 1. / ( arg_3 - arg_4 ) ) ) arg_2 . append ( - 2. * ( arg_3 - arg_4 ) * arg_1 * np . log ( arg_6 / arg_5 ) + 2. * arg_4 * ( 2. * arg_3 - arg_4 ) ) return arg_2

Stop streaming samples from device and delete samples buffer


Question: Given a dictionary mapping unique keys to amino acid sequences run MHC binding predictions on all candidate epitopes extracted from sequences and return a EpitopeCollection .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_1 = check_sequence_dictionary ( arg_1 ) arg_2 = arg_0 . _check_peptide_lengths ( arg_2 ) arg_3 = [ ] arg_4 = set ( [ ] ) arg_5 = [ ] for arg_6 , arg_7 in arg_1 . items ( ) : for arg_8 in arg_2 : for arg_9 in range ( len ( arg_7 ) - arg_8 + 1 ) : arg_4 . add ( arg_7 [ arg_9 : arg_9 + arg_8 ] ) arg_0 . _check_peptide_inputs ( arg_4 ) for arg_10 in arg_0 . alleles : arg_10 = normalize_allele_name ( arg_10 , omit_dra1 = True ) arg_5 . append ( arg_10 ) arg_11 = arg_0 . _get_iedb_request_params ( arg_7 , arg_10 ) logger . info ( "Calling IEDB (%s) with request %s" , arg_0 . url , arg_11 ) arg_12 = _query_iedb ( arg_11 , arg_0 . url ) for arg_13 , arg_14 in arg_12 . iterrows ( ) : arg_3 . append ( BindingPrediction ( source_sequence_name = arg_6 , offset = arg_14 [ 'start' ] - 1 , arg_10 = arg_14 [ 'allele' ] , peptide = arg_14 [ 'peptide' ] , affinity = arg_14 [ 'ic50' ] , percentile_rank = arg_14 [ 'rank' ] , prediction_method_name = "iedb-" + arg_0 . prediction_method ) ) arg_0 . _check_results ( arg_3 , alleles = arg_5 , peptides = arg_4 ) return BindingPredictionCollection ( arg_3 )

Minimum and Maximum to use for computing breaks


Question: Get the identity of a logged in user from a template context .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : if arg_1 is not None : try : return arg_0 [ '%s_identity' % arg_1 ] except KeyError : pass try : return arg_0 [ 'analytical_identity' ] except KeyError : pass if getattr ( settings , 'ANALYTICAL_AUTO_IDENTIFY' , True ) : try : if arg_3 is None : arg_3 = get_user_from_context ( arg_0 ) if get_user_is_authenticated ( arg_3 ) : if arg_2 is not None : return arg_2 ( arg_3 ) else : return arg_3 . get_username ( ) except ( KeyError , AttributeError ) : pass return None

Pretty-print the encoded output using ascii art.

    :param output: to print
    :param prefix: printed before the header if specified


Question: Extracts info from the stored proto states and convert it into representation that is exposed using the API . This method is called on any change for the topology . For example when a container moves and its host or some port changes . All the information is parsed all over again and cache is updated .

def Func ( arg_0 , arg_1 ) : if not arg_1 . execution_state : Log . info ( "No execution state found for: " + arg_1 . name ) return Log . info ( "Setting topology info for topology: " + arg_1 . name ) arg_2 = True if not arg_1 . physical_plan : arg_2 = False Log . info ( "Setting topology info for topology: " + arg_1 . name ) arg_3 = True if not arg_1 . packing_plan : arg_3 = False arg_4 = True if not arg_1 . tmaster : arg_4 = False arg_5 = True if not arg_1 . scheduler_location : arg_5 = False arg_6 = { "name" : arg_1 . name , "id" : arg_1 . id , "logical_plan" : None , "physical_plan" : None , "packing_plan" : None , "execution_state" : None , "tmaster_location" : None , "scheduler_location" : None , } arg_7 = arg_0 . extract_execution_state ( arg_1 ) arg_7 [ "has_physical_plan" ] = arg_2 arg_7 [ "has_packing_plan" ] = arg_3 arg_7 [ "has_tmaster_location" ] = arg_4 arg_7 [ "has_scheduler_location" ] = arg_5 arg_7 [ "status" ] = arg_1 . get_status ( ) arg_6 [ "metadata" ] = arg_0 . extract_metadata ( arg_1 ) arg_6 [ "runtime_state" ] = arg_0 . extract_runtime_state ( arg_1 ) arg_6 [ "execution_state" ] = arg_7 arg_6 [ "logical_plan" ] = arg_0 . extract_logical_plan ( arg_1 ) arg_6 [ "physical_plan" ] = arg_0 . extract_physical_plan ( arg_1 ) arg_6 [ "packing_plan" ] = arg_0 . extract_packing_plan ( arg_1 ) arg_6 [ "tmaster_location" ] = arg_0 . extract_tmaster ( arg_1 ) arg_6 [ "scheduler_location" ] = arg_0 . extract_scheduler_location ( arg_1 ) arg_0 . topologyInfos [ ( arg_1 . name , arg_1 . state_manager_name ) ] = arg_6

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: Given an archive URI parse to a split ident - hash .

def Func ( arg_0 ) : arg_1 = urlparse ( arg_0 ) arg_2 = arg_1 . path . rstrip ( '/' ) . split ( '/' ) arg_3 = arg_2 [ - 1 ] arg_3 = unquote ( arg_3 ) return arg_3

Turn a mongodb-style search dict into an SQL query.


Question: 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 .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : _validate_not_none ( 'topic_name' , arg_1 ) _validate_not_none ( 'subscription_name' , arg_2 ) _validate_not_none ( 'sequence_number' , arg_3 ) _validate_not_none ( 'lock_token' , arg_4 ) arg_5 = HTTPRequest ( ) arg_5 . method = 'PUT' arg_5 . host = arg_0 . _get_host ( ) arg_5 . path = '/' + _str ( arg_1 ) + '/subscriptions/' + str ( arg_2 ) + '/messages/' + _str ( arg_3 ) + '/' + _str ( arg_4 ) + '' arg_5 . path , arg_5 . query = arg_0 . _httpclient . _update_request_uri_query ( arg_5 ) arg_5 . headers = arg_0 . _update_service_bus_header ( arg_5 ) arg_0 . _perform_request ( arg_5 )

Set train summary. A TrainSummary object contains information
        necessary for the optimizer to know how often the logs are recorded,
        where to store the logs and how to retrieve them, etc. For details,
        refer to the docs of TrainSummary.

        :param summary: a TrainSummary object


Question: Return a set of dates that should be kept out of dates .

def Func ( arg_0 , arg_1 = 0 , arg_2 = 0 , arg_3 = 0 , arg_4 = 0 , arg_5 = arg_6 , arg_7 = None ) : arg_8 = to_keep ( ( datetime . combine ( d , time ( ) ) for d in arg_0 ) , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , hours = 0 , minutes = 0 , seconds = 0 , arg_5 = arg_5 , arg_7 = arg_7 ) return set ( arg_9 . date ( ) for arg_9 in arg_8 )


Question: Insert list of patches at the front of the curent patches list

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_1 : arg_4 = PatchLine ( arg_3 ) arg_5 = arg_4 . get_patch ( ) if arg_5 : arg_0 . patch2line [ arg_5 ] = arg_4 arg_2 . append ( arg_4 ) arg_2 . extend ( arg_0 . patchlines ) arg_0 . patchlines = arg_2


Question: Retrieves the issues in the collection grouped into buckets according to the key generated by the keyfunc .

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : if not arg_1 : arg_1 = default_group if not arg_2 : arg_2 = arg_0 . DEFAULT_SORT arg_0 . _ensure_cleaned_issues ( ) return arg_0 . _group_issues ( arg_0 . _cleaned_issues , arg_1 , arg_2 )

Replicate a VM image to multiple target locations. This operation
        is only for publishers. You have to be registered as image publisher
        with Microsoft Azure to be able to call this.

        vm_image_name:
            Specifies the name of the VM Image that is to be used for
            replication
        regions:
            Specified a list of regions to replicate the image to
            Note: The regions in the request body are not additive. If a VM
            Image has already been replicated to Regions A, B, and C, and
            a request is made to replicate to Regions A and D, the VM
            Image will remain in Region A, will be replicated in Region D,
            and will be unreplicated from Regions B and C
        offer:
            Specifies the publisher defined name of the offer. The allowed
            characters are uppercase or lowercase letters, digit,
            hypen(-), period (.).The maximum allowed length is 64 characters.
        sku:
            Specifies the publisher defined name of the Sku. The allowed
            characters are uppercase or lowercase letters, digit,
            hypen(-), period (.). The maximum allowed length is 64 characters.
        version:
            Specifies the publisher defined version of the image.
            The allowed characters are digit and period.
            Format: <MajorVersion>.<MinorVersion>.<Patch>
            Example: '1.0.0' or '1.1.0' The 3 version number to
            follow standard of most of the RPs. See http://semver.org


Question: Makes a function which applies a list of Bijectors forward s .

def Func ( arg_0 ) : if not mcmc_util . is_list_like ( arg_0 ) : arg_0 = [ arg_0 ] def fn ( arg_1 ) : return [ arg_2 . forward ( arg_3 ) for arg_2 , arg_3 in zip ( arg_0 , arg_1 ) ] return fn


Question: Align spark bolt array so that axes for iteration are in the keys .

def Func ( arg_0 , arg_1 ) : inshape ( arg_0 . shape , arg_1 ) arg_2 = [ ( a - arg_0 . split ) for a in arg_1 if a >= arg_0 . split ] arg_3 = [ a for a in range ( arg_0 . split ) if a not in arg_1 ] if arg_2 or arg_3 : return arg_0 . swap ( arg_3 , arg_2 ) else : return arg_0

This method increases the permanence values of synapses of columns whose
    activity level has been too low. Such columns are identified by having an
    overlap duty cycle that drops too much below those of their peers. The
    permanence values for such columns are increased.


Question: Sets the module s verbosity and returns the previous setting .

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

Check the spacing of a single equals sign.


Question: Adds the API key and user auth token to the query parameters

def Func ( arg_0 , arg_1 ) : arg_1 [ 'key' ] = arg_0 . api_key if arg_0 . user_auth_token : arg_1 [ 'token' ] = arg_0 . user_auth_token return arg_1

Temporal distance probability density function.

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


Question: Returns whether or not the resource with the given name and extension exists . This must not mean that the resource is meaningful it simply signals that the file exists .

def Func ( arg_0 , arg_1 , arg_2 = "" ) : return os . path . exists ( arg_0 . resourceNameToPath ( arg_1 , arg_2 ) )

Generates RGB values from HSV values in line with a typical light
    spectrum.


Question: Returns uptime in seconds if even remotely possible or None if not .

def Func ( ) : if __boottime is not None : return time . time ( ) - __boottime return { 'amiga' : _Func_amiga , 'aros12' : _Func_amiga , 'beos5' : _Func_beos , 'cygwin' : _Func_linux , 'darwin' : _Func_osx , 'haiku1' : _Func_beos , 'linux' : _Func_linux , 'linux-armv71' : _Func_linux , 'linux2' : _Func_linux , 'mac' : _Func_mac , 'minix3' : _Func_minix , 'riscos' : _Func_riscos , 'sunos5' : _Func_solaris , 'syllable' : _Func_syllable , 'win32' : _Func_windows , 'wince' : _Func_windows } . get ( sys . platform , _Func_bsd ) ( ) or _Func_bsd ( ) or _Func_plan9 ( ) or _Func_linux ( ) or _Func_windows ( ) or _Func_solaris ( ) or _Func_beos ( ) or _Func_amiga ( ) or _Func_riscos ( ) or _Func_posix ( ) or _Func_syllable ( ) or _Func_mac ( ) or _Func_osx ( )

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

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


Question: Register signal receivers which send events .

def Func ( arg_0 , arg_1 ) : for arg_2 , arg_3 in arg_1 . items ( ) : arg_4 = [ obj_or_import_string ( func ) for func in arg_3 . get ( 'event_builders' , [ ] ) ] arg_5 = obj_or_import_string ( arg_3 [ 'signal' ] ) arg_5 . connect ( EventEmmiter ( arg_2 , arg_4 ) , sender = arg_0 , weak = False )

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: Return the first rows and cols of the frame as a new H2OFrame .

def Func ( arg_0 , arg_1 = 10 , arg_2 = 200 ) : assert_is_type ( arg_1 , int ) assert_is_type ( arg_2 , int ) arg_3 = min ( arg_0 . nrows , arg_1 ) arg_4 = min ( arg_0 . ncols , arg_2 ) arg_5 = arg_0 [ : arg_3 , : arg_4 ] return arg_5 . _frame ( arg_1 = arg_3 , arg_2 = arg_2 , fill_cache = True )

Iterate over each learner and unlink inactive SAP channel learners.

        This method iterates over each enterprise learner and unlink learner
        from the enterprise if the learner is marked inactive in the related
        integrated channel.


Question: Return the charge parent of a given molecule .

def Func ( arg_0 , arg_1 , arg_2 = False ) : if not arg_2 : arg_1 = arg_0 . standardize ( arg_1 ) arg_3 = arg_0 . fragment_parent ( arg_1 , arg_2 = True ) if arg_3 : arg_4 = arg_0 . uncharge ( arg_3 ) arg_4 = arg_0 . standardize ( arg_4 ) return arg_4

Returns a DataFrame of offensive team splits for a season.

        :year: int representing the season.
        :returns: Pandas DataFrame of split data.


Question: Initialize the parsing process .

def Func ( arg_0 ) : arg_0 . _instruction_library = arg_0 . _spec . new_default_instructions ( ) arg_0 . _as_instruction = arg_0 . _instruction_library . as_instruction arg_0 . _id_cache = { } arg_0 . _pattern_set = None arg_0 . _inheritance_todos = [ ] arg_0 . _instruction_todos = [ ]

Clip input array with a vector list.

    Parameters
    ----------
    array : array
        input raster data
    array_affine : Affine
        Affine object describing the raster's geolocation
    geometries : iterable
        iterable of dictionaries, where every entry has a 'geometry' and
        'properties' key.
    inverted : bool
        invert clip (default: False)
    clip_buffer : integer
        buffer (in pixels) geometries before clipping

    Returns
    -------
    clipped array : array


Question: format a table

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_3 = [ size + 1 for size in arg_3 ] arg_4 = " " . join ( [ "%%-%ss" ] * len ( arg_3 ) ) arg_4 = arg_4 % tuple ( arg_3 ) arg_4 = arg_4 . split ( " " ) arg_5 = "\n+" + "+" . join ( [ "-" * w for w in arg_3 ] ) + "+\n" arg_6 = "\n+" + "+" . join ( [ "=" * w for w in arg_3 ] ) + "+\n" arg_0 . write ( arg_5 ) for arg_7 , arg_8 in enumerate ( arg_2 ) : arg_0 . write ( "|" ) for arg_9 , arg_10 in enumerate ( arg_8 ) : arg_0 . write ( arg_4 [ arg_9 ] % arg_10 ) arg_0 . write ( "|" ) if arg_7 == 0 and arg_1 . rheaders : arg_0 . write ( arg_6 ) else : arg_0 . write ( arg_5 )

Send data synchronous to an ADS-device from data name.

    :param int port: local AMS port as returned by adsPortOpenEx()
    :param pyads.structs.AmsAddr address: local or remote AmsAddr
    :param string data_name: PLC storage address
    :param value: value to write to the storage address of the PLC
    :param Type data_type: type of the data given to the PLC,
        according to PLCTYPE constants


Question: Save the roster to an XML file .

def Func ( arg_0 , arg_1 , arg_2 = True ) : if arg_0 . roster is None : raise ValueError ( "No roster" ) arg_3 = arg_0 . roster . as_xml ( ) if arg_2 : if len ( arg_3 ) : arg_3 . text = u'\n  ' arg_5 = None for arg_6 in arg_3 : if arg_5 is not None : arg_5 . tail = u'\n  ' if len ( arg_6 ) : arg_6 . text = u'\n    ' arg_8 = None for arg_9 in arg_6 : if arg_8 is not None : arg_8 . tail = u'\n    ' arg_8 = arg_9 if arg_8 is not None : arg_8 . tail = u'\n  ' arg_5 = arg_6 if arg_5 is not None : arg_5 . tail = u"\n" arg_10 = ElementTree . ElementTree ( arg_3 ) arg_10 . write ( arg_1 , "utf-8" )

Build transition noise distribution for a ConstrainedSeasonalSSM.


Question: Parse the querystring into a normalized form .

def Func ( arg_0 , arg_1 = 'utf8' ) : if isinstance ( arg_0 , six . binary_type ) : arg_0 = arg_0 . decode ( arg_1 ) return Query ( arg_0 , split_segments ( arg_0 ) )


Question: Shifts circularly the X squre matrix in order to get a time - lag matrix .

def Func ( arg_0 ) : arg_1 = arg_0 . shape [ 0 ] arg_2 = np . zeros ( arg_0 . shape ) for arg_3 in range ( arg_1 ) : arg_2 [ arg_3 , : ] = np . asarray ( [ arg_0 [ ( arg_3 + j ) % arg_1 , j ] for j in range ( arg_1 ) ] ) return arg_2

This method fixes a bug in Python's SGMLParser.


Question: Gets all legal agreements that user needs to accept before purchasing a domain .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = False , ** arg_6 ) : arg_7 = models . TopLevelDomainAgreementOption ( arg_2 = arg_2 , arg_3 = arg_3 ) def internal_paging ( arg_8 = None , arg_5 = False ) : if not arg_8 : arg_9 = arg_0 . Func . metadata [ 'url' ] arg_10 = { 'name' : arg_0 . _serialize . url ( "name" , arg_1 , 'str' ) , 'subscriptionId' : arg_0 . _serialize . url ( "self.config.subscription_id" , arg_0 . config . subscription_id , 'str' ) } arg_9 = arg_0 . _client . format_url ( arg_9 , ** arg_10 ) arg_11 = { } arg_11 [ 'api-version' ] = arg_0 . _serialize . query ( "self.api_version" , arg_0 . api_version , 'str' ) else : arg_9 = arg_8 arg_11 = { } arg_12 = { } arg_12 [ 'Accept' ] = 'application/json' arg_12 [ 'Content-Type' ] = 'application/json; charset=utf-8' if arg_0 . config . generate_client_request_id : arg_12 [ 'x-ms-client-request-id' ] = str ( uuid . uuid1 ( ) ) if arg_4 : arg_12 . update ( arg_4 ) if arg_0 . config . accept_language is not None : arg_12 [ 'accept-language' ] = arg_0 . _serialize . header ( "self.config.accept_language" , arg_0 . config . accept_language , 'str' ) arg_13 = arg_0 . _serialize . body ( arg_7 , 'TopLevelDomainAgreementOption' ) arg_14 = arg_0 . _client . post ( arg_9 , arg_11 , arg_12 , arg_13 ) arg_15 = arg_0 . _client . send ( arg_14 , stream = False , ** arg_6 ) if arg_15 . status_code not in [ 200 ] : raise models . DefaultErrorResponseException ( arg_0 . _deserialize , arg_15 ) return arg_15 arg_16 = models . TldLegalAgreementPaged ( internal_paging , arg_0 . _deserialize . dependencies ) if arg_5 : arg_17 = { } arg_18 = models . TldLegalAgreementPaged ( internal_paging , arg_0 . _deserialize . dependencies , arg_17 ) return arg_18 return arg_16

Return a dictionary of circuit properties.


Question: Clear all comments in json_str .

def Func ( arg_0 ) : arg_1 = list ( arg_0 ) arg_2 = False arg_3 = True arg_4 = False arg_5 = False arg_6 = False arg_7 = False arg_8 = False arg_9 = None for arg_10 , arg_11 in enumerate ( arg_0 ) : if arg_2 : arg_2 = False continue if arg_7 : if arg_11 != '/' and arg_11 != '*' : arg_7 = False arg_3 = True continue if arg_8 : if arg_11 != '/' : arg_8 = False if arg_11 == '"' : if arg_3 and not arg_2 : arg_6 = True arg_3 = False elif arg_6 and not arg_2 : arg_6 = False arg_3 = True elif arg_11 == '\\' : if arg_3 or arg_6 : arg_2 = True elif arg_11 == '/' : if arg_7 : arg_7 = False arg_4 = True arg_3 = False arg_9 = arg_10 - 1 elif arg_8 : arg_8 = False arg_3 = True arg_5 = False for arg_12 in range ( arg_9 , arg_10 + 1 ) : arg_1 [ arg_12 ] = "" elif arg_3 : arg_7 = True arg_3 = False elif arg_11 == '*' : if arg_7 : arg_7 = False arg_5 = True arg_3 = False arg_9 = arg_10 - 1 elif arg_5 : arg_8 = True elif arg_11 == '\n' : if arg_4 : arg_4 = False arg_3 = True for arg_12 in range ( arg_9 , arg_10 + 1 ) : arg_1 [ arg_12 ] = "" elif arg_11 == ']' or arg_11 == '}' : if arg_3 : _remove_last_comma ( arg_1 , arg_10 ) return ( "" if isinstance ( arg_0 , str ) else u"" ) . join ( arg_1 )

Sets the package verification code, if not already set.
        code - A string.
        Raises CardinalityError if already defined.
        Raises OrderError if no package previously defined.
        Raises Value error if doesn't match verifcode form


Question: Subtracts an estimate of the mean from signal x at axis

def Func ( arg_0 , arg_1 ) : arg_2 = [ slice ( d ) for d in arg_0 . shape ] arg_2 [ arg_1 ] = np . newaxis arg_3 = np . mean ( arg_0 , arg_1 = arg_1 ) return arg_0 - arg_3 [ tuple ( arg_2 ) ]


Question: Returns the current ZipkinAttrs and generates new ones if needed .

def Func ( arg_0 ) : if arg_0 . _is_local_root_span : if arg_0 . sample_rate is not None : if arg_0 . zipkin_attrs_override and not arg_0 . zipkin_attrs_override . is_sampled : return True , create_attrs_for_span ( sample_rate = arg_0 . sample_rate , trace_id = arg_0 . zipkin_attrs_override . trace_id , ) elif not arg_0 . zipkin_attrs_override : return True , create_attrs_for_span ( sample_rate = arg_0 . sample_rate , use_128bit_trace_id = arg_0 . use_128bit_trace_id , ) if arg_0 . firehose_handler and not arg_0 . zipkin_attrs_override : return True , create_attrs_for_span ( sample_rate = 0.0 , use_128bit_trace_id = arg_0 . use_128bit_trace_id , ) return False , arg_0 . zipkin_attrs_override else : arg_1 = arg_0 . get_tracer ( ) . get_zipkin_attrs ( ) if arg_1 : return False , ZipkinAttrs ( trace_id = arg_1 . trace_id , span_id = generate_random_64bit_string ( ) , parent_span_id = arg_1 . span_id , flags = arg_1 . flags , is_sampled = arg_1 . is_sampled , ) return False , None

Safely join `directory` and `filename`.

    Example usage::

        @app.route('/wiki/<path:filename>')
        def wiki_page(filename):
            filename = safe_join(app.config['WIKI_FOLDER'], filename)
            with open(filename, 'rb') as fd:
                content = fd.read() # Read and process the file content...

    :param directory: the base directory.
    :param filename: the untrusted filename relative to that directory.
    :raises: :class:`~werkzeug.exceptions.NotFound` if the resulting path
             would fall out of `directory`.


Question: Decorator to ensure that a submit has been performed before calling the method .

def Func ( arg_0 ) : @ functools . wraps ( arg_0 ) def _wrapper ( arg_1 , * arg_2 , ** arg_3 ) : if arg_1 . _future is None : raise JobError ( "Job not submitted yet!. You have to .submit() first!" ) return arg_0 ( arg_1 , * arg_2 , ** arg_3 ) return _wrapper

Register a new range type as a PostgreSQL range.

        >>> register_range_type("int4range", intrange, conn)

    The above will make sure intrange is regarded as an int4range for queries
    and that int4ranges will be cast into intrange when fetching rows.

    pgrange should be the full name including schema for the custom range type.

    Note that adaption is global, meaning if a range type is passed to a regular
    psycopg2 connection it will adapt it to its proper range type. Parsing of
    rows from the database however is not global and just set on a per connection
    basis.


Question: Update the value and the utc timestamp of a file that is already in the Repository . \ n If file is not registered in repository and error will be thrown . \ n If file is missing in the system it will be regenerated as dump method is called .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = False , arg_5 = False , arg_6 = False , arg_7 = False , arg_8 = None , arg_9 = False ) : if arg_8 is None : arg_8 = arg_0 . __ACID assert isinstance ( arg_8 , bool ) , "ACID must be boolean" arg_2 = os . path . normpath ( arg_2 ) if arg_2 == '.' : arg_2 = '' assert arg_3 != '.pyrepinfo' , "'.pyrepinfo' is not allowed as file name in main repository directory" assert arg_3 != '.pyrepstate' , "'.pyrepstate' is not allowed as file name in main repository directory" assert arg_3 != '.pyreplock' , "'.pyreplock' is not allowed as file name in main repository directory" if arg_3 is None : assert len ( arg_2 ) , "name must be given when relative path is given as empty string or as a simple dot '.'" arg_2 , arg_3 = os . path . split ( arg_2 ) arg_10 , arg_11 = arg_0 . get_file_info ( arg_2 , arg_3 ) assert arg_10 is not None , arg_11 arg_12 = os . path . join ( arg_0 . __path , arg_2 ) if arg_9 : if not os . path . isfile ( os . path . join ( arg_12 , arg_3 ) ) : warnings . warn ( "file '%s' is in repository but does not exist in the system. It is therefore being recreated." % os . path . join ( arg_12 , arg_3 ) ) if not arg_6 : arg_6 = arg_10 [ "dump" ] if not arg_7 : arg_7 = arg_10 [ "pull" ] if arg_8 : arg_13 = os . path . join ( tempfile . gettempdir ( ) , arg_3 ) else : arg_13 = os . path . join ( arg_12 , arg_3 ) try : exec ( arg_6 . replace ( "$FILE_PATH" , str ( arg_13 ) ) ) except Exception as e : arg_14 = "unable to dump the file (%s)" % e if 'pickle.dump(' in arg_6 : arg_14 += '\nmore info: %s' % str ( get_pickling_errors ( arg_1 ) ) raise Exception ( arg_14 ) if arg_8 : try : shutil . copyfile ( arg_13 , os . path . join ( arg_12 , arg_3 ) ) except Exception as e : os . remove ( arg_13 ) if arg_9 : warnings . warn ( e ) return os . remove ( arg_13 ) arg_10 [ "timestamp" ] = datetime . utcnow ( ) if arg_4 is not False : arg_10 [ "description" ] = arg_4 if arg_5 is not False : assert inspect . isclass ( arg_5 ) , "klass must be a class definition" arg_10 [ "class" ] = arg_5 arg_0 . save ( )

Adds the item to the control, associating the given data if not None.


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

def Func ( arg_0 , arg_1 , arg_2 = 'application/x-vnd.oasis.opendocument.spreadsheet' ) : try : arg_3 = arg_0 . gd_client . GetResourceById ( arg_0 . key ) arg_4 = gdata . data . MediaSource ( arg_1 = arg_1 , arg_2 = arg_2 ) arg_0 . gd_client . UpdateResource ( arg_3 , arg_4 = arg_4 , update_metadata = True ) except ( RequestError , IOError ) as e : raise PODocsError ( e )

Load the configuration.

    :param under_test:
        Tell us if we only have to load the configuration file (True)
        or load the configuration file and initate the output directory
        if it does not exist (False).
    :type under_test: bool

    :param custom:
        A dict with the configuration index (from .PyFunceble.yaml) to update.
    :type custom: dict

    .. warning::
        If :code:`custom` is given, the given :code:`dict` overwrite
        the last value of the given configuration indexes.


Question: ensure flags dict is valid

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : for arg_4 , arg_5 in arg_3 . iteritems ( ) : assert len ( arg_5 ) == 2 , "Bad flag: %r:%s" % ( arg_4 , arg_5 ) assert isinstance ( arg_5 [ 0 ] , ( dict , Config ) ) , "Bad flag: %r:%s" % ( arg_4 , arg_5 ) assert isinstance ( arg_5 [ 1 ] , basestring ) , "Bad flag: %r:%s" % ( arg_4 , arg_5 )

Return the maximum file descriptor value.


Question: template apiserver . hcl

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_1 [ 0 ] arg_4 = "%s/standalone/templates/apiserver.template.hcl" % arg_0 [ "config_path" ] arg_5 = "%s/standalone/resources/apiserver.hcl" % arg_0 [ "config_path" ] arg_6 = { "<heron_apiserver_hostname>" : '"%s"' % get_hostname ( arg_3 , arg_0 ) , "<heron_apiserver_executable>" : '"%s/heron-apiserver"' % config . get_heron_bin_dir ( ) if is_self ( arg_3 ) else '"%s/.heron/bin/heron-apiserver"' % get_remote_home ( arg_3 , arg_0 ) , "<zookeeper_host:zookeeper_port>" : "," . join ( [ '%s' % zk if ":" in zk else '%s:2181' % zk for zk in arg_2 ] ) , "<scheduler_uri>" : "http://%s:4646" % arg_3 } template_file ( arg_4 , arg_5 , arg_6 )

Compares two python dictionaries at the top level and return differences

  da:             first dictionary
  db:             second dictionary

  Returns:        None if dictionaries test equal; otherwise returns a
                  dictionary as follows:
                  {
                    'inAButNotInB':
                        <sequence of keys that are in da but not in db>
                    'inBButNotInA':
                        <sequence of keys that are in db but not in da>
                    'differentValues':
                        <sequence of keys whose corresponding values differ
                         between da and db>
                  }


Question: HTTP Put Request

def Func ( arg_0 ) : return requests . put ( arg_0 . _url , data = arg_0 . _data , headers = arg_0 . _headers , auth = ( arg_0 . _email , arg_0 . _api_token ) )

Return HgResource object for path.

        See DAVProvider.get_resource_inst()


Question: Fetch the base Managed Policy .

def Func ( arg_0 , ** arg_1 ) : arg_0 [ '_version' ] = 1 arg_2 = _get_name_from_structure ( arg_0 , 'Arn' ) arg_3 = get_policy ( arg_2 , ** arg_1 ) arg_4 = get_managed_policy_document ( arg_2 , policy_metadata = arg_3 , ** arg_1 ) arg_0 . update ( arg_3 [ 'Policy' ] ) arg_0 [ 'Document' ] = arg_4 arg_0 [ 'CreateDate' ] = get_iso_string ( arg_0 [ 'CreateDate' ] ) arg_0 [ 'UpdateDate' ] = get_iso_string ( arg_0 [ 'UpdateDate' ] ) return arg_0

Does nothing currently.  May not need this method


Question: Return a list of all bluez DBus objects from the provided list of paths .

def Func ( arg_0 , arg_1 ) : return map ( lambda x : arg_0 . _bus . get_object ( 'org.bluez' , x ) , 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: _auth - internal method to ensure the client_id and client_secret passed with the nonce match

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = auth_methods . keys ( ) if arg_3 not in arg_5 : raise Proauth2Error ( 'invalid_request' , 'unsupported authentication method: %s' 'available methods: %s' % ( arg_3 , '\n' . join ( arg_5 ) ) ) arg_6 = yield Task ( arg_0 . data_store . fetch , 'applications' , arg_1 = arg_1 ) if not arg_6 : raise Proauth2Error ( 'access_denied' ) if not auth_methods [ arg_3 ] ( arg_2 , arg_6 [ 'client_secret' ] ) : raise Proauth2Error ( 'access_denied' ) arg_4 ( )


Question: Fast CuDNN LSTM implementation

def Func ( arg_0 , arg_1 , arg_2 = 1 , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = None , arg_7 = 'Func' , arg_8 = False ) : with tf . variable_scope ( arg_7 , arg_8 = arg_8 ) : arg_9 = tf . contrib . cudnn_rnn . CudnnLSTM ( num_layers = arg_2 , num_units = arg_1 ) if arg_3 : arg_10 = tf . get_variable ( 'init_h' , [ arg_2 , 1 , arg_1 ] ) arg_10 = tf . tile ( arg_10 , ( 1 , tf . shape ( arg_0 ) [ 0 ] , 1 ) ) arg_11 = tf . get_variable ( 'init_c' , [ arg_2 , 1 , arg_1 ] ) arg_11 = tf . tile ( arg_11 , ( 1 , tf . shape ( arg_0 ) [ 0 ] , 1 ) ) else : arg_10 = arg_11 = tf . zeros ( [ arg_2 , tf . shape ( arg_0 ) [ 0 ] , arg_1 ] ) arg_5 = arg_5 or arg_10 arg_6 = arg_6 or arg_11 arg_12 , ( arg_13 , arg_14 ) = arg_9 ( tf . transpose ( arg_0 , ( 1 , 0 , 2 ) ) , ( arg_5 , arg_6 ) ) arg_12 = tf . transpose ( arg_12 , ( 1 , 0 , 2 ) ) arg_13 = arg_13 [ - 1 ] arg_14 = arg_14 [ - 1 ] if arg_4 is not None : arg_15 = tf . stack ( [ tf . range ( tf . shape ( arg_12 ) [ 0 ] ) , arg_4 - 1 ] , axis = 1 ) arg_13 = tf . gather_nd ( arg_12 , arg_15 ) return arg_12 , ( arg_13 , arg_14 )

Returns the coach ID for the team's OC in a given year.

        :year: An int representing the year.
        :returns: A string containing the coach ID of the OC.


Question: Flush the write buffers of the stream .

def Func ( arg_0 ) : arg_0 . require_not_closed ( ) arg_1 = arg_0 . _stream . getvalue ( ) arg_0 . _stream . truncate ( 0 ) arg_0 . _stream . seek ( 0 ) arg_0 . body = arg_1 if ( arg_0 . _body is None ) else ( arg_0 . _body + arg_1 ) if arg_0 . asynchronous : arg_0 . streaming = True

Wrapper around json.loads.

    Wraps errors in custom exception with a snippet of the data in the message.


Question: Write helper method

def Func ( arg_0 , arg_1 , arg_2 = "utf-8" ) : with codecs . open ( arg_0 , "w" , arg_2 ) as f : f . write ( arg_1 )

Fetch the events pages of a given group.


Question: Get stream IDs and term frequencies for a single hash .

def Func ( arg_0 , arg_1 ) : for ( ( arg_2 , arg_3 , arg_4 ) , arg_5 ) in arg_0 . client . scan ( HASH_TF_INDEX_TABLE , ( ( arg_1 , ) , ( arg_1 , ) ) ) : yield ( kvlayer_key_to_stream_id ( ( arg_3 , arg_4 ) ) , arg_5 )

Handle GET request - render linked learners list and "Link learner" form.

        Arguments:
            request (django.http.request.HttpRequest): Request instance
            customer_uuid (str): Enterprise Customer UUID

        Returns:
            django.http.response.HttpResponse: HttpResponse


Question: Setup a regular padded grid from a 2D array shape psf - shape and pixel - scale .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = ( arg_1 [ 0 ] + arg_2 [ 0 ] - 1 , arg_1 [ 1 ] + arg_2 [ 1 ] - 1 ) arg_5 = grid_util . regular_grid_1d_masked_from_mask_pixel_scales_and_origin ( mask = np . full ( arg_4 , False ) , pixel_scales = ( arg_3 , arg_3 ) ) arg_6 = msk . Mask . unmasked_for_shape_and_pixel_scale ( arg_1 = arg_4 , arg_3 = arg_3 ) return PaddedRegularGrid ( arr = arg_5 , mask = arg_6 , image_shape = arg_1 )

increments the branches counter and checks boolean expressions


Question: Deprecated ; use the add method .

def Func ( arg_0 , arg_1 ) : if len ( type ( arg_1 ) . __name__ ) == 3 : arg_1 = type ( arg_1 ) . __base__ ( arg_1 ) arg_0 [ arg_1 . HashKey ] = arg_1

This is a parallel worker for running period-recovery.

    Parameters
    ----------

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

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

    Returns
    -------

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


Question: compat_convertHashedIndexes - Reindex all fields for the provided objects where the field value is hashed or not . If the field is unhashable do not allow .

def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_2 is None : arg_2 = arg_0 . _get_connection ( ) arg_3 = [ ] for arg_4 in arg_0 . indexedFields : arg_5 = arg_0 . fields [ arg_4 ] if 'hashIndex' not in arg_5 . __class__ . __new__ . __code__ . co_varnames : continue if arg_4 . hashIndex is True : arg_6 = arg_5 arg_7 = arg_5 . copy ( ) arg_7 . hashIndex = False else : arg_7 = arg_5 arg_6 = arg_5 . copy ( ) arg_6 . hashIndex = True arg_3 . append ( ( arg_5 , arg_7 , arg_6 ) ) arg_9 = [ obj . asDict ( True , forStorage = True ) for obj in arg_1 ] for arg_10 in arg_9 : arg_11 = arg_2 . pipeline ( ) arg_12 = arg_10 [ '_id' ] for arg_5 , arg_7 , arg_6 in arg_3 : arg_13 = arg_10 [ arg_4 ] arg_0 . _rem_id_from_index ( arg_7 , arg_12 , arg_13 , arg_11 ) arg_0 . _rem_id_from_index ( arg_6 , arg_12 , arg_13 , arg_11 ) arg_0 . _add_id_to_index ( arg_5 , arg_12 , arg_13 , arg_11 ) arg_11 . execute ( )

Return output for the combined time and result summary statistics.


Question: iterator for collecting the noun phrases

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = 0 arg_4 = arg_0 [ 0 ] . idx - 1 arg_5 = [ ] while arg_3 < len ( arg_0 ) : arg_6 = arg_0 [ arg_3 ] if ( arg_6 . word_id > 0 ) and ( arg_6 . root in arg_1 ) and ( ( arg_6 . idx - arg_4 ) == 1 ) : arg_7 = RankedLexeme ( arg_8 = arg_6 . raw . lower ( ) , rank = arg_1 [ arg_6 . root ] , ids = arg_6 . word_id , pos = arg_6 . pos . lower ( ) , count = 1 ) arg_5 . append ( arg_7 ) else : for arg_8 , arg_9 in enumerate_chunks ( arg_5 , arg_2 ) : if arg_9 : arg_10 = [ arg_7 . ids for arg_7 in arg_9 ] arg_11 = [ arg_7 . rank for arg_7 in arg_9 ] arg_12 = RankedLexeme ( arg_8 = arg_8 , rank = arg_11 , ids = arg_10 , pos = "np" , count = 1 ) if DEBUG : print ( arg_12 ) yield arg_12 arg_5 = [ ] arg_4 = arg_6 . idx arg_3 += 1

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: Get the names and default values of a function s arguments .

def Func ( arg_0 ) : if inspect . isfunction ( arg_0 ) : arg_1 = arg_0 elif inspect . ismethod ( arg_0 ) : arg_1 = arg_0 . im_func elif hasattr ( arg_0 , '__call__' ) : arg_1 = arg_0 . __call__ else : raise TypeError ( 'arg is not a Python function' ) arg_2 , arg_3 , arg_4 = inspect . getargs ( arg_1 . func_code ) return arg_2 , arg_3 , arg_4 , arg_1 . func_defaults

Overriding the default JSONEncoder.default for NDB support.


Question: Set the simulation default simulation parameters .

def Func ( arg_0 , * arg_1 , ** arg_2 ) : if len ( arg_1 ) is 1 and isinstance ( arg_1 [ 0 ] , SimulationParameter ) : arg_0 . __default_param = arg_1 [ 0 ] else : arg_0 . __default_param = SimulationParameter ( * arg_1 , ** arg_2 ) return

Remove the MUC specific stanza payload element.


Question: Run the application and conserve the traceback frames .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = None try : arg_3 = arg_0 . app ( arg_1 , arg_2 ) for arg_4 in arg_3 : yield arg_4 if hasattr ( arg_3 , 'close' ) : arg_3 . close ( ) except Exception : if hasattr ( arg_3 , 'close' ) : arg_3 . close ( ) arg_5 = get_current_traceback ( skip = 1 , show_hidden_frames = arg_0 . show_hidden_frames , ignore_system_exceptions = True ) for arg_6 in arg_5 . frames : arg_0 . frames [ arg_6 . id ] = arg_6 arg_0 . tracebacks [ arg_5 . id ] = arg_5 try : arg_2 ( '500 INTERNAL SERVER ERROR' , [ ( 'Content-Type' , 'text/html; charset=utf-8' ) , ( 'X-XSS-Protection' , '0' ) , ] ) except Exception : arg_1 [ 'wsgi.errors' ] . write ( 'Debugging middleware caught exception in streamed ' 'response at a point where response headers were already ' 'sent.\n' ) else : yield arg_5 . render_full ( evalex = arg_0 . evalex , secret = arg_0 . secret ) . encode ( 'utf-8' , 'replace' ) arg_5 . log ( arg_1 [ 'wsgi.errors' ] )


Question: Encode an attribute dict into a byte string .

def Func ( arg_0 , arg_1 = arg_2 ) : arg_3 = '' arg_4 = str ( MSG_TYPES [ arg_0 [ 'type' ] ] ) if arg_4 in [ '0' , '1' ] : arg_4 += '::' + arg_0 [ 'endpoint' ] if 'qs' in arg_0 and arg_0 [ 'qs' ] != '' : arg_4 += ':' + arg_0 [ 'qs' ] elif arg_4 == '2' : arg_4 += '::' elif arg_4 in [ '3' , '4' , '5' ] : if arg_4 == '3' : arg_3 = arg_0 [ 'data' ] if arg_4 == '4' : arg_3 = arg_1 ( arg_0 [ 'data' ] ) if arg_4 == '5' : arg_5 = { } arg_5 [ 'name' ] = arg_0 [ 'name' ] if 'args' in arg_0 and arg_0 [ 'args' ] != [ ] : arg_5 [ 'args' ] = arg_0 [ 'args' ] arg_3 = arg_1 ( arg_5 ) if 'id' in arg_0 : arg_4 += ':' + str ( arg_0 [ 'id' ] ) if arg_0 [ 'ack' ] == 'data' : arg_4 += '+' arg_4 += ':' else : arg_4 += '::' if 'endpoint' not in arg_0 : arg_0 [ 'endpoint' ] = '' if arg_3 != '' : arg_4 += arg_0 [ 'endpoint' ] + ':' + arg_3 else : arg_4 += arg_0 [ 'endpoint' ] elif arg_4 == '6' : arg_4 += '::' + arg_0 . get ( 'endpoint' , '' ) + ':' + str ( arg_0 [ 'ackId' ] ) if 'args' in arg_0 and arg_0 [ 'args' ] != [ ] : arg_4 += '+' + arg_1 ( arg_0 [ 'args' ] ) elif arg_4 == '7' : arg_4 += ':::' if 'reason' in arg_0 and arg_0 [ 'reason' ] != '' : arg_4 += str ( ERROR_REASONS [ arg_0 [ 'reason' ] ] ) if 'advice' in arg_0 and arg_0 [ 'advice' ] != '' : arg_4 += '+' + str ( ERROR_ADVICES [ arg_0 [ 'advice' ] ] ) arg_4 += arg_0 [ 'endpoint' ] elif arg_4 == '8' : arg_4 += '::' return arg_4

Run stochastic volatility model.

    This model estimates the volatility of a returns series over time.
    Returns are assumed to be T-distributed. lambda (width of
    T-distributed) is assumed to follow a random-walk.

    Parameters
    ----------
    data : pandas.Series
        Return series to model.
    samples : int, optional
        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.

    See Also
    --------
    plot_stoch_vol : plotting of tochastic volatility model


Question: Make index file with the special groups .

def Func ( arg_0 , arg_1 = '"Protein"' , arg_2 = 'main.ndx' , arg_3 = None ) : logger . info ( "Building the main index file {ndx!r}..." . format ( ** vars ( ) ) ) arg_4 , arg_5 , arg_4 = gromacs . make_ndx ( f = arg_0 , n = arg_3 , o = arg_2 , stdout = False , input = ( "" , "q" ) ) arg_6 = cbook . parse_ndxlist ( arg_5 ) arg_1 = arg_1 . strip ( "\"" ) arg_7 = [ g for g in arg_6 if g [ 'name' ] . lower ( ) == arg_1 . lower ( ) ] if len ( arg_7 ) > 1 : logging . warn ( "make_ndx created duplicated groups, performing work around" ) if len ( arg_7 ) <= 0 : arg_8 = "no groups found for selection {0}, available groups are {1}" . format ( arg_1 , arg_6 ) logging . error ( arg_8 ) raise ValueError ( arg_8 ) arg_9 = len ( arg_6 ) - 1 assert arg_9 == arg_6 [ - 1 ] [ 'nr' ] arg_10 = arg_7 [ 0 ] arg_4 , arg_5 , arg_4 = gromacs . make_ndx ( f = arg_0 , n = arg_2 , o = arg_2 , stdout = False , input = ( "{0}" . format ( arg_10 [ 'nr' ] ) , "name {0} __main__" . format ( arg_9 + 1 ) , "! \"__main__\"" , "name {0} __environment__" . format ( arg_9 + 2 ) , "" , "q" ) ) return cbook . parse_ndxlist ( arg_5 )


Question: used when allocating memory ingame

def Func ( arg_0 ) : arg_1 = arg_0 . _data_Func arg_2 = len ( list ( arg_0 . xml_doc . iter ( tag = etree . Element ) ) ) if arg_0 . compressed : arg_3 = 52 * arg_2 + arg_1 + 630 else : arg_4 = 0 for arg_5 in arg_0 . xml_doc . iter ( tag = etree . Element ) : arg_6 = max ( len ( arg_5 . tag ) , 8 ) arg_6 = ( arg_6 + 3 ) & ~ 3 arg_4 += arg_6 arg_3 = 56 * arg_2 + arg_1 + 630 + arg_4 return ( arg_3 + 8 ) & ~ 7

Returns the section as a dict. Values are converted to int, float, bool
        as required.

        :param section: section from the config
        :rtype: dict


Question: Returns list of the predecessors of a node as DAGNodes .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , int ) : warnings . warn ( 'Calling Func() with a node id is deprecated,' ' use a DAGNode instead' , DeprecationWarning , 2 ) arg_1 = arg_0 . _id_to_node [ arg_1 ] return arg_0 . _multi_graph . Func ( arg_1 )


Question: Add the missing unqualified edges between entities in the subgraph that are contained within the full graph .

def Func ( arg_0 , arg_1 ) : for arg_2 , arg_3 in itt . combinations ( arg_1 , 2 ) : if not arg_0 . has_edge ( arg_2 , arg_3 ) : continue for arg_4 in arg_0 [ arg_2 ] [ arg_3 ] : if arg_4 < 0 : arg_1 . add_edge ( arg_2 , arg_3 , key = arg_4 , ** arg_0 [ arg_2 ] [ arg_3 ] [ arg_4 ] )

Obtiene los dataframes de los datos de PVPC con resampling diario y mensual.


Question: Decorator that provides fallback for Google Cloud Platform project id . If the project is None it will be replaced with the project_id from the service account the Hook is authenticated with . Project id can be specified either via project_id kwarg or via first parameter in positional args .

def Func ( arg_0 ) : @ functools . wraps ( arg_0 ) def inner_wrapper ( arg_1 , * arg_2 , ** arg_3 ) : if len ( arg_2 ) > 0 : raise AirflowException ( "You must use keyword arguments in this methods rather than" " positional" ) if 'project_id' in arg_3 : arg_3 [ 'project_id' ] = arg_1 . _get_project_id ( arg_3 [ 'project_id' ] ) else : arg_3 [ 'project_id' ] = arg_1 . _get_project_id ( None ) if not arg_3 [ 'project_id' ] : raise AirflowException ( "The project id must be passed either as " "keyword project_id parameter or as project_id extra " "in GCP connection definition. Both are not set!" ) return arg_0 ( arg_1 , * arg_2 , ** arg_3 ) return inner_wrapper


Question: Returns grade data for the given account_id and term_id .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = ( "/api/v1/accounts/sis_account_id:%s/analytics/" "terms/sis_term_id:%s/grades.json" ) % ( arg_1 , arg_2 ) return arg_0 . _get_resource ( arg_3 )

Add the currently mined information to the
        mined "database".

        :param to_add: The element to add.
        :type to_add: dict


Question: Creates a random graph where the edges have different types .

def Func ( arg_0 = 250 , arg_1 = 0.5 , ** arg_2 ) : arg_3 = minimal_random_graph ( arg_0 , ** arg_2 ) for arg_4 in arg_3 . nodes ( ) : arg_5 = ( arg_4 , arg_4 ) if not arg_3 . is_edge ( arg_5 ) : if np . random . uniform ( ) < arg_1 : arg_3 . add_edge ( * arg_5 ) arg_3 = set_types_random ( arg_3 , ** arg_2 ) return arg_3

Returns a sorted list of all the mappings for this memory.

        :return: a list of mappings.
        :rtype: list


Question: Used to instantiate a regular HTTP request object

def Func ( arg_0 , arg_1 ) : arg_2 = httplib2 . Http ( ) if arg_0 and arg_1 : arg_2 . add_credentials ( arg_0 , arg_1 ) return arg_2

Modify an existing lock's timeout.

        token:
            Valid lock token.
        timeout:
            Suggested lifetime in seconds (-1 for infinite).
            The real expiration time may be shorter than requested!
        Returns:
            Lock dictionary.
            Raises ValueError, if token is invalid.


Question: return true if the given class node should be considered as an abstract class

def Func ( arg_0 : arg_1 . ClassDef ) -> bool : for arg_3 in arg_0 . methods ( ) : if arg_3 . parent . frame ( ) is arg_0 : if arg_3 . is_abstract ( pass_is_abstract = False ) : return True return False

Send data synchronous to an ADS-device from data name.

    :param int port: local AMS port as returned by adsPortOpenEx()
    :param pyads.structs.AmsAddr address: local or remote AmsAddr
    :param string data_name: PLC storage address
    :param value: value to write to the storage address of the PLC
    :param Type data_type: type of the data given to the PLC,
        according to PLCTYPE constants


Question: Map the price entity

def Func ( arg_0 , arg_1 : arg_2 . Price ) -> PriceModel : if not arg_1 : return None arg_4 = PriceModel ( ) arg_4 . currency = arg_1 . currency arg_6 = arg_1 . date arg_7 = "%Y-%m-%d" if arg_1 . time : arg_6 += f"T{entity.time}" arg_7 += "T%H:%M:%S" arg_8 = datetime . strptime ( arg_6 , arg_7 ) arg_4 . datum = Datum ( ) arg_4 . datum . from_datetime ( arg_8 ) assert isinstance ( arg_4 . datum , Datum ) arg_4 . symbol = SecuritySymbol ( arg_1 . namespace , arg_1 . symbol ) arg_11 = Decimal ( arg_1 . value ) / Decimal ( arg_1 . denom ) arg_4 . value = Decimal ( arg_11 ) return arg_4


Question: Writes msg to stderr and exits with return code

def Func ( arg_0 , arg_1 = - 1 ) : sys . stderr . write ( arg_0 + "\n" ) sys . exit ( arg_1 )

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: Inform the widget about the encoding of the underlying character stream .

def Func ( arg_0 , arg_1 ) : arg_0 . _bar_ends = "[]" arg_0 . _bar_symbols = "#" if not arg_1 : return arg_4 = "\u258F\u258E\u258D\u258C\u258B\u258A\u2589\u2588" arg_5 = "\u258C\u2588" arg_6 = "\u2588" if arg_0 . _file_mode : arg_4 = arg_5 = None assert len ( arg_6 ) == 1 for arg_7 in ( arg_4 , arg_5 , arg_6 ) : if arg_7 is None : continue try : arg_7 . encode ( arg_1 ) arg_0 . _bar_ends = "||" arg_0 . _bar_symbols = arg_7 return except UnicodeEncodeError : pass except LookupError : print ( "Warning: unknown encoding %s" % arg_1 )

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


Question: Returns the set of codepoints contained in a given Namelist file .

def Func ( arg_0 , arg_1 = False , arg_2 = None ) : arg_3 = 'charset' if not arg_1 else 'ownCharset' arg_4 = os . path . dirname ( os . path . abspath ( __file__ ) ) arg_5 = os . path . join ( arg_4 , arg_0 ) arg_6 = readNamelist ( arg_5 , arg_1 , arg_2 ) return arg_6 [ arg_3 ]

Whether a connection can be established between those two meshes.


Question: A metadata statement signing request with signing_keys signed by one of the keys in signing_keys .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = '' ) : try : jwks_to_keyjar ( arg_1 [ 'signing_keys' ] , arg_2 ) except KeyError : arg_5 = arg_0 . export_jwks ( issuer = arg_2 ) arg_1 [ 'signing_keys' ] = arg_5 arg_6 = JWT ( arg_0 , arg_2 = arg_2 , arg_3 = arg_3 ) return arg_6 . pack ( owner = arg_2 , arg_4 = arg_4 , payload = arg_1 . to_dict ( ) )

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: Writes a stream of json serialised pyschema Records to a file object

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = arg_4 . stderr , arg_5 = arg_6 . dumps ) : for arg_7 in arg_1 : try : print >> arg_2 , arg_5 ( arg_7 ) except arg_6 . ParseError , e : print >> arg_3 , e raise

pass in a word string that you
        would like to see probable matches for.


Question: Minimum and Maximum to use for computing breaks

def Func ( arg_0 ) : arg_1 = arg_0 . limits [ 0 ] / arg_0 . factor arg_2 = arg_0 . limits [ 1 ] / arg_0 . factor return arg_1 , arg_2

Attach an observer.

        Args:
            observer (func): A function to be called when new messages arrive

        Returns:
            :class:`Stream`. Current instance to allow chaining


Question: Add a metric to the buffer .

def Func ( arg_0 , arg_1 ) : arg_0 . batch_count += 1 arg_0 . batch_buffer += arg_1 if arg_0 . batch_count >= arg_0 . batch_size : arg_0 . _send ( )


Question: Create a plot of one area of interest of a single sweep .

def Func ( arg_0 , arg_1 = [ 0 ] ) : arg_2 = [ 2.31250 , 2.35270 ] for arg_3 in arg_1 : arg_0 . setsweep ( arg_3 ) for arg_4 in arg_2 : arg_5 = int ( arg_0 . pointsPerSec * arg_4 ) arg_6 = int ( arg_0 . pointsPerSec * ( arg_4 + 0.001 ) ) arg_0 . sweepY [ arg_5 : arg_6 ] = np . nan arg_8 = int ( arg_0 . pointsPerSec * 2.2 ) arg_9 = int ( arg_0 . pointsPerSec * 2.6 ) arg_10 = np . average ( arg_0 . sweepY [ int ( arg_0 . pointsPerSec * 2.0 ) : int ( arg_0 . pointsPerSec * 2.2 ) ] ) arg_11 = lowPassFilter ( arg_0 . sweepY [ arg_8 : arg_9 ] ) - arg_10 arg_12 = arg_0 . sweepX2 [ arg_8 : arg_8 + len ( arg_11 ) ] . flatten ( ) plt . plot ( arg_12 , arg_11 , alpha = .5 , lw = 2 ) return

Overriding the default JSONEncoder.default for NDB support.


Question: Download a pdf report for a case

def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = institute_and_case ( store , arg_0 , arg_1 ) arg_4 = controllers . case_report_content ( store , arg_2 , arg_3 ) if current_app . config . get ( 'SQLALCHEMY_DATABASE_URI' ) : arg_4 [ 'coverage_report' ] = controllers . coverage_report_contents ( store , arg_2 , arg_3 , request . url_root ) if arg_3 . get ( 'madeline_info' ) is not None : with open ( os . path . join ( cases_bp . static_folder , 'madeline.svg' ) , 'w' ) as temp_madeline : temp_madeline . write ( arg_3 [ 'madeline_info' ] ) arg_5 = render_template ( 'cases/case_report.html' , institute = arg_2 , case = arg_3 , format = 'pdf' , ** arg_4 ) return render_pdf ( HTML ( string = arg_5 ) , download_filename = arg_3 [ 'display_name' ] + '_' + datetime . datetime . now ( ) . strftime ( "%Y-%m-%d" ) + '_scout.pdf' )

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 annotations from the query provider

def Func ( arg_0 , arg_1 , arg_2 = "." , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = 1 , arg_7 = False , ** arg_8 ) : return 0 , [ ]

An intelligent wrapper for ``open``.

    Parameters
    ----------
    name_or_fdesc : string-type or open file descriptor
        If a string type, refers to the path to a file on disk.

        If an open file descriptor, it is returned as-is.

    mode : string
        The mode with which to open the file.
        See ``open`` for details.

    fmt : string ['auto', 'jams', 'json', 'jamz']
        The encoding for the input/output stream.

        If `auto`, the format is inferred from the filename extension.

        Otherwise, use the specified coding.

    See Also
    --------
    open
    gzip.open


Question: Run Bayesian alpha - beta - model with T distributed returns .

def Func ( arg_0 , arg_1 , arg_2 = 2000 , arg_3 = True ) : arg_4 = pd . concat ( [ arg_0 , arg_1 ] , axis = 1 ) . dropna ( ) with pm . Model ( ) as model : arg_5 = pm . HalfCauchy ( 'sigma' , beta = 1 ) arg_6 = pm . Exponential ( 'nu_minus_two' , 1. / 10. ) arg_7 = arg_4 . iloc [ : , 1 ] arg_8 = arg_4 . iloc [ : , 0 ] arg_9 = pm . Normal ( 'alpha' , mu = 0 , sd = .1 ) arg_10 = pm . Normal ( 'beta' , mu = 0 , sd = 1 ) arg_11 = arg_9 + arg_10 * arg_7 pm . StudentT ( 'returns' , arg_6 = arg_6 + 2 , mu = arg_11 , sd = arg_5 , observed = arg_8 ) arg_12 = pm . sample ( arg_2 , arg_3 = arg_3 ) return model , arg_12

Init openstack neutron mq

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

        :param mq: class ternya.mq.MQ


Question: Aggregates records of a distributed array .

def Func ( arg_0 , arg_1 = None ) : arg_2 = StackedArray ( arg_0 . _rdd , shape = arg_0 . shape , split = arg_0 . split ) return arg_2 . Func ( arg_1 )

Gets the fuel prices for a specific fuel station.


Question: Make an XCom available for tasks to pull .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : if arg_3 and arg_3 < arg_0 . execution_date : raise ValueError ( 'execution_date can not be in the past (current ' 'execution_date is {}; received {})' . format ( arg_0 . execution_date , arg_3 ) ) XCom . set ( arg_1 = arg_1 , arg_2 = arg_2 , task_id = arg_0 . task_id , dag_id = arg_0 . dag_id , arg_3 = arg_3 or arg_0 . execution_date )

This will output the nginx HTTP config string for specific port spec


Question: Sets the main channels for the pipeline

def Func ( arg_0 ) : logger . debug ( "=====================" ) logger . debug ( "Setting main channels" ) logger . debug ( "=====================" ) for arg_1 , arg_2 in enumerate ( arg_0 . processes ) : logger . debug ( "[{}] Setting main channels with pid: {}" . format ( arg_2 . template , arg_1 ) ) arg_2 . set_channels ( pid = arg_1 ) logger . debug ( "{} {} {}" . format ( arg_2 . parent_lane , arg_2 . input_type , arg_2 . template ) ) if not arg_2 . parent_lane and arg_2 . input_type : arg_0 . _update_raw_input ( arg_2 ) arg_0 . _update_extra_inputs ( arg_2 ) arg_0 . _update_secondary_channels ( arg_2 ) logger . info ( colored_print ( "\tChannels set for {} \u2713" . format ( arg_2 . template ) ) )

Return True if this new candidate representation satisfies all our overlap
    rules. Since we know that neighboring representations differ by at most
    one bit, we compute running overlaps.


Question: Build a Exon object object

def Func ( arg_0 , arg_1 = '37' ) : try : arg_2 = arg_0 [ 'chrom' ] except KeyError : raise KeyError ( "Exons has to have a chromosome" ) try : arg_3 = int ( arg_0 [ 'start' ] ) except KeyError : raise KeyError ( "Exon has to have a start" ) except TypeError : raise TypeError ( "Exon start has to be integer" ) try : arg_4 = int ( arg_0 [ 'end' ] ) except KeyError : raise KeyError ( "Exon has to have a end" ) except TypeError : raise TypeError ( "Exon end has to be integer" ) try : arg_5 = int ( arg_0 [ 'rank' ] ) except KeyError : raise KeyError ( "Exon has to have a rank" ) except TypeError : raise TypeError ( "Exon rank has to be integer" ) try : arg_6 = arg_0 [ 'exon_id' ] except KeyError : raise KeyError ( "Exons has to have a id" ) try : arg_7 = arg_0 [ 'transcript' ] except KeyError : raise KeyError ( "Exons has to have a transcript" ) try : arg_8 = int ( arg_0 [ 'hgnc_id' ] ) except KeyError : raise KeyError ( "Exons has to have a hgnc_id" ) except TypeError : raise TypeError ( "hgnc_id has to be integer" ) arg_9 = Exon ( arg_6 = arg_6 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_7 = arg_7 , arg_8 = arg_8 , arg_1 = arg_1 , ) return arg_9

Return a dict of md device define in the line.


Question: Notify learners about a program in which they ve been enrolled .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_2 . get ( 'title' ) arg_5 = arg_2 . get ( 'type' ) arg_6 = arg_2 . get ( 'uuid' ) arg_7 = get_configuration_value_for_site ( arg_1 . site , 'LMS_ROOT_URL' , settings . LMS_ROOT_URL ) arg_8 = urlquote ( '/dashboard/programs/{program_uuid}/?tpa_hint={tpa_hint}' . format ( arg_6 = arg_6 , tpa_hint = arg_1 . identity_provider , ) ) arg_9 = '{site}/{login_or_register}?next={program_path}' . format ( site = arg_7 , arg_13 = '{login_or_register}' , arg_8 = arg_8 ) arg_10 = 'program' arg_11 = get_earliest_start_date_from_program ( arg_2 ) with mail . get_connection ( ) as email_conn : for arg_12 in arg_3 : arg_13 = 'register' if isinstance ( arg_12 , PendingEnterpriseCustomerUser ) else 'login' arg_9 = arg_9 . format ( arg_13 = arg_13 ) send_email_notification_message ( arg_12 = arg_12 , enrolled_in = { 'name' : arg_4 , 'url' : arg_9 , 'type' : arg_10 , 'start' : arg_11 , 'branding' : arg_5 , } , arg_1 = arg_1 , email_connection = email_conn )

Pop a column from the H2OFrame at index i.

        :param i: The index (int) or name (str) of the column to pop.
        :returns: an H2OFrame containing the column dropped from the current frame; the current frame is modified
            in-place and loses the column.


Question: Pull the version part out of a string .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = arg_4 . compile ( r'([a-z0-9_.]+)-([a-z0-9_.!+-]+)' , arg_4 . I ) ) : arg_7 = arg_3 . search ( arg_0 ) if not arg_7 : logger . debug ( 'Could not parse version from link: %s' , arg_2 ) return None if arg_1 is None : arg_8 = arg_7 . group ( 0 ) return arg_8 [ arg_8 . index ( '-' ) : ] arg_9 = arg_7 . group ( 0 ) . lower ( ) arg_9 = arg_9 . replace ( '_' , '-' ) arg_10 = arg_1 . lower ( ) + "-" if arg_9 . startswith ( arg_10 ) : return arg_7 . group ( 0 ) [ len ( arg_10 ) : ] else : return None

Register elasticsearch templates for events.


Question: Look through the jobs table and get the demand - minimum and maximum number of workers requested if new workers are to be allocated if there are any untended dead workers for all running jobs .

def Func ( arg_0 , ) : arg_1 = arg_0 . _getMatchingRowsWithRetries ( arg_0 . _jobs , dict ( status = arg_0 . STATUS_RUNNING ) , [ arg_0 . _jobs . pubToDBNameDict [ f ] for f in arg_0 . _jobs . jobDemandNamedTuple . _fields ] ) return [ arg_0 . _jobs . jobDemandNamedTuple . _make ( arg_2 ) for arg_2 in arg_1 ]

Stop the timer

        Returns:
            The time the timer was stopped


Question: Read a syntax - quote and set the syntax - quoting state in the reader .

def Func ( arg_0 : arg_1 ) -> ReaderForm : arg_2 = arg_0 . reader . advance ( ) assert arg_2 == "`" with arg_0 . syntax_quoted ( ) : return _process_syntax_quoted_form ( arg_0 , _read_next_consuming_comment ( arg_0 ) )

Return a new Streamlet by applying map_function to each element of this Streamlet.


Question: Creates a File Copy on Uploadcare or Custom Storage . File . copy method is deprecated and will be removed in 4 . 0 . 0 . Please use create_local_copy and create_remote_copy instead .

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_3 = """File.Func method is deprecated and will be            removed in 4.0.0.            Please use `create_local_Func`            and `create_remote_Func` instead.        """ logger . warn ( 'API Warning: {0}' . format ( arg_3 ) ) if arg_2 is not None : return arg_0 . create_remote_Func ( arg_2 , arg_1 ) else : return arg_0 . create_local_Func ( arg_1 )

Returns protobuf mapcontainer. Read from translation file.


Question: Check that the image height is superior to height

def Func ( arg_0 , arg_1 ) : if arg_1 > arg_0 . size [ 1 ] : raise ImageSizeError ( arg_0 . size [ 1 ] , arg_1 )

This method is called before first step of simulation.


Question: Helper to read an environment variable

def Func ( arg_0 , arg_1 ) : arg_2 = os . environ . get ( arg_1 ) if not arg_2 : raise ValueError ( 'Missing environment variable:%s' % arg_1 ) return arg_2

Overriding the default JSONEncoder.default for NDB support.


Question: Converts sample indices into STFT frames .

def Func ( arg_0 , arg_1 = 512 , arg_2 = None ) : arg_3 = 0 if arg_2 is not None : arg_3 = int ( arg_2 // 2 ) arg_0 = np . asanyarray ( arg_0 ) return np . floor ( ( arg_0 - arg_3 ) // arg_1 ) . astype ( int )

Show course track selection page for the enterprise.

        Based on `enterprise_uuid` in URL, the view will decide which
        enterprise customer's course enrollment page is to use.

        Unauthenticated learners will be redirected to enterprise-linked SSO.

        A 404 will be raised if any of the following conditions are met:
            * No enterprise customer uuid kwarg `enterprise_uuid` in request.
            * No enterprise customer found against the enterprise customer
                uuid `enterprise_uuid` in the request kwargs.
            * No course is found in database against the provided `course_id`.


Question: Use YAML from a file or stdin to populate the readme .

def Func ( arg_0 , arg_1 ) : arg_2 = dtoolcore . ProtoDataSet . from_uri ( uri = arg_0 ) _validate_and_put_readme ( arg_2 , arg_1 . read ( ) )

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


Question: Execute source . If hidden do not show any output .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . kernel_manager . shell_channel . execute ( arg_1 , arg_2 ) arg_0 . _request_info [ 'execute' ] [ arg_3 ] = arg_0 . _ExecutionRequest ( arg_3 , 'user' ) arg_0 . _hidden = arg_2 if not arg_2 : arg_0 . executing . emit ( arg_1 )

Remove hidden notes and tag a CERN if detected.


Question: Returns True if it is legal to remove this node and still leave the graph as a single connected entity not splitting it into a forest . Only nodes with no children or those who cause a cycle can be deleted .

def Func ( arg_0 ) : if arg_0 . children . count ( ) == 0 : return True arg_1 = set ( arg_0 . ancestors_root ( ) ) arg_2 = set ( arg_0 . children . all ( ) ) return arg_2 . issubset ( arg_1 )

Returns uptime in seconds or None, on MINIX.


Question: Kill all child processes on exit since we don t want to leave them as orphaned .

def Func ( arg_0 ) : arg_1 = arg_0 . get_all_pids ( ) if len ( arg_1 ) > 0 : arg_2 = psutil . Process ( os . getpid ( ) ) arg_3 = [ x for x in arg_2 . children ( recursive = True ) if x . is_running ( ) and x . pid in arg_1 ] for arg_4 in arg_3 : arg_0 . log . info ( "Terminating child PID: %s" , arg_4 . pid ) arg_4 . terminate ( ) arg_5 = 5 arg_0 . log . info ( "Waiting up to %s seconds for processes to exit..." , arg_5 ) try : psutil . wait_procs ( arg_3 , arg_5 = arg_5 , callback = lambda x : arg_0 . log . info ( 'Terminated PID %s' , x . pid ) ) except psutil . TimeoutExpired : arg_0 . log . debug ( "Ran out of time while waiting for processes to exit" ) arg_3 = [ x for x in arg_2 . children ( recursive = True ) if x . is_running ( ) and x . pid in arg_1 ] if len ( arg_3 ) > 0 : arg_0 . log . info ( "SIGKILL processes that did not terminate gracefully" ) for arg_4 in arg_3 : arg_0 . log . info ( "Killing child PID: %s" , arg_4 . pid ) arg_4 . kill ( ) arg_4 . wait ( )

Deserialize a dataframe.

    Parameters
    ----------
    reader : file
        File-like object to read from. Must be opened in binary mode.
    data_type_id : dict
        Serialization format of the raw data.
        See the azureml.DataTypeIds class for constants.

    Returns
    -------
    pandas.DataFrame
        Dataframe object.


Question: add optional verbose argument

def Func ( arg_0 ) : arg_0 . add_argument ( '--verbose' , metavar = '(a boolean; default: "false")' , type = bool , default = False ) return arg_0

Construct or retrieve a semaphore with the given name

    If value is None, try to retrieve an existing named semaphore.
    Else create a new semaphore with the given value


Question: Get file .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , ** arg_5 ) : try : arg_6 = arg_2 . files [ str ( arg_3 ) ] . Func_version ( arg_4 = arg_4 ) return arg_0 . make_response ( arg_6 = arg_6 or abort ( 404 ) , arg_1 = arg_1 , arg_2 = arg_2 ) except KeyError : abort ( 404 )


Question: Counts and fills sample counts inside call tree .

def Func ( arg_0 , arg_1 ) : arg_1 [ 'sampleCount' ] += sum ( arg_0 . Func ( arg_2 ) for arg_2 in arg_1 [ 'children' ] ) return arg_1 [ 'sampleCount' ]

Downloads a MP4 or WebM file that is associated with the video at the URL passed.

        :param str url: URL of the video to be downloaded
        :return str: Filename of the file in local storage


Question: Function for converting a dict to an array suitable for sklearn .

def Func ( arg_0 , arg_1 , arg_2 = True ) : if len ( arg_0 . analytes ) == 1 : arg_3 = nominal_values ( arg_1 [ arg_0 . analytes [ 0 ] ] ) arg_4 = np . array ( list ( zip ( arg_3 , np . zeros ( len ( arg_3 ) ) ) ) ) else : arg_3 = [ nominal_values ( arg_1 [ a ] ) for a in arg_0 . analytes ] arg_4 = np . vstack ( arg_3 ) . T arg_5 = np . isfinite ( arg_4 ) . sum ( 1 ) == arg_4 . shape [ 1 ] arg_6 = np . arange ( arg_1 [ arg_0 . analytes [ 0 ] ] . size ) [ arg_5 ] arg_4 = arg_4 [ arg_5 ] if arg_2 : arg_4 = arg_0 . scaler . transform ( arg_4 ) return arg_4 , arg_6

Return the maximum file descriptor value.


Question: r Converts data into a hashable byte representation if an appropriate hashing function is known .

def Func ( arg_0 , arg_1 = True ) : if arg_0 is None : arg_2 = b'NONE' arg_3 = b'NULL' elif isinstance ( arg_0 , six . binary_type ) : arg_2 = arg_0 arg_3 = b'TXT' elif isinstance ( arg_0 , six . text_type ) : arg_2 = arg_0 . encode ( 'utf-8' ) arg_3 = b'TXT' elif isinstance ( arg_0 , _intlike ) : arg_2 = _int_to_bytes ( arg_0 ) arg_3 = b'INT' elif isinstance ( arg_0 , float ) : arg_4 , arg_5 = float ( arg_0 ) . as_integer_ratio ( ) arg_2 = _int_to_bytes ( arg_4 ) + b'/' + _int_to_bytes ( arg_5 ) arg_3 = b'FLT' else : arg_6 = _HASHABLE_EXTENSIONS . lookup ( arg_0 ) arg_3 , arg_2 = arg_6 ( arg_0 ) if arg_1 : return arg_3 , arg_2 else : return b'' , arg_2

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: Get database statistics .

def Func ( arg_0 ) : arg_1 = dict ( action = 'db-stats' ) arg_2 = arg_0 . _api_request ( params = arg_1 ) arg_3 = DBStats ( total_clicks = int ( arg_2 [ 'db-stats' ] [ 'total_clicks' ] ) , total_links = int ( arg_2 [ 'db-stats' ] [ 'total_links' ] ) ) return arg_3

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


Question: Method which indicates if the object matches specified criteria .

def Func ( arg_0 , ** arg_1 ) : for arg_2 in arg_1 . keys ( ) : try : arg_3 = getattr ( arg_0 , arg_2 ) except _a11y . Error : return False if sys . version_info [ : 2 ] <= ( 2 , 6 ) : if isinstance ( arg_3 , basestring ) : if not fnmatch . fnmatch ( unicode ( arg_3 ) , arg_1 [ arg_2 ] ) : return False else : if arg_3 != arg_1 [ arg_2 ] : return False elif sys . version_info [ 0 ] == 3 : if isinstance ( arg_3 , str ) : if not fnmatch . fnmatch ( arg_3 , str ( arg_1 [ arg_2 ] ) ) : return False else : if arg_3 != arg_1 [ arg_2 ] : return False else : if isinstance ( arg_3 , str ) or isinstance ( arg_3 , unicode ) : if not fnmatch . fnmatch ( arg_3 , arg_1 [ arg_2 ] ) : return False else : if arg_3 != arg_1 [ arg_2 ] : return False return True

Decode the data passed in and potentially flush the decoder.


Question: Resets all edge and vertex colors to their default values .

def Func ( arg_0 ) : for arg_1 , arg_2 in enumerate ( arg_0 . g . edges ( ) ) : arg_0 . g . set_ep ( arg_2 , 'edge_color' , arg_0 . edge2queue [ arg_1 ] . colors [ 'edge_color' ] ) for arg_3 in arg_0 . g . nodes ( ) : arg_0 . g . set_vp ( arg_3 , 'vertex_fill_color' , arg_0 . colors [ 'vertex_fill_color' ] )

This is a parallel worker for running period-recovery.

    Parameters
    ----------

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

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

    Returns
    -------

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


Question: Remove user from a group .

def Func ( arg_0 , arg_1 ) : arg_2 = Group . query . get_or_404 ( arg_0 ) arg_3 = User . query . get_or_404 ( arg_1 ) if arg_2 . can_edit ( current_user ) : try : arg_2 . Func_member ( arg_3 ) except Exception as e : flash ( str ( e ) , "error" ) return redirect ( urlparse ( request . referrer ) . path ) flash ( _ ( 'User %(user_email)s was Funcd from %(group_name)s group.' , user_email = arg_3 . email , group_name = arg_2 . name ) , 'success' ) return redirect ( urlparse ( request . referrer ) . path ) flash ( _ ( 'You cannot delete users of the group %(group_name)s' , group_name = arg_2 . name ) , 'error' ) return redirect ( url_for ( '.index' ) )


Question: Set the enthalpy of the package to the specified value and recalculate it s temperature .

def Func ( arg_0 , Func ) : arg_0 . _H = Func arg_0 . _T = arg_0 . _calculate_T ( Func )

Drop a node from the network

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


Question: Run a python file as if it were the main program on the command line .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = arg_5 . modules [ '__main__' ] arg_4 = imp . new_module ( '__main__' ) arg_5 . modules [ '__main__' ] = arg_4 arg_4 . __file__ = arg_0 if arg_2 : arg_4 . __package__ = arg_2 arg_4 . __builtins__ = BUILTINS arg_10 = arg_5 . argv arg_5 . argv = arg_1 try : if arg_0 . endswith ( ".pyc" ) or arg_0 . endswith ( ".pyo" ) : arg_12 = make_code_from_pyc ( arg_0 ) else : arg_12 = make_code_from_py ( arg_0 ) try : exec_code_object ( arg_12 , arg_4 . __dict__ ) except SystemExit : raise except : arg_13 , arg_14 , arg_15 = arg_5 . exc_info ( ) raise ExceptionDuringRun ( arg_13 , arg_14 , arg_15 . tb_next . tb_next ) finally : arg_5 . modules [ '__main__' ] = arg_3 arg_5 . argv = arg_10

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: Gets the fuel prices for a specific fuel station .

def Func ( arg_0 , arg_1 : arg_2 ) -> List [ Price ] : arg_3 = requests . get ( '{}/prices/station/{}' . format ( API_URL_BASE , arg_1 ) , headers = arg_0 . _get_headers ( ) , timeout = arg_0 . _timeout , ) if not arg_3 . ok : raise FuelCheckError . create ( arg_3 ) arg_4 = arg_3 . json ( ) return [ Price . deserialize ( arg_4 ) for arg_4 in arg_4 [ 'prices' ] ]

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


Question: Extracts the day from a datetime sample .

def Func ( arg_0 ) : import pandas as pd return pd . Series ( arg_0 ) . dt . day . values

Attaches a bundle object

        :param bundle: :class:`flask_journey.BlueprintBundle` object
        :raises:
            - IncompatibleBundle if the bundle is not of type `BlueprintBundle`
            - ConflictingPath if a bundle already exists at bundle.path
            - MissingBlueprints if the bundle doesn't contain any blueprints


Question: AsyncIO coroutine handler to launch socket listening .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = b'' while b'\n\n' not in arg_3 : arg_3 += yield from arg_1 . read ( arg_0 . buf_size ) arg_4 = arg_3 [ : - 2 ] . decode ( arg_0 . default_encoding ) . split ( '\n' ) arg_5 = OrderedDict ( [ line . split ( ': ' , 1 ) for line in arg_4 if ': ' in line ] ) arg_6 = arg_5 . get ( 'agi_network_script' ) log . info ( 'Received FastAGI request from %r for "%s" route' , arg_2 . get_extra_info ( 'peername' ) , arg_6 ) log . debug ( "Asterisk Headers: %r" , arg_5 ) if arg_6 is not None : arg_7 = arg_0 . _route . get ( arg_6 ) if arg_7 is not None : arg_8 = Request ( app = arg_0 , arg_5 = arg_5 , arg_1 = arg_1 , arg_2 = arg_2 , encoding = arg_0 . default_encoding ) try : yield from arg_7 ( arg_8 ) except BaseException : log . exception ( 'An exception has been raised for the request "%s"' , arg_6 ) else : log . error ( 'No route for the request "%s"' , arg_6 ) else : log . error ( 'No agi_network_script header for the request' ) log . debug ( "Closing client socket" ) arg_2 . close ( )

Validates API Root information. Raises errors for required
        properties.


Question: Levenberg - Marquardt optimization for every particle in the state .

def Func ( arg_0 , arg_1 = 40 , arg_2 = 2 , arg_3 = 1.0 , arg_4 = 10. , arg_5 = 4 , arg_6 = False , ** arg_7 ) : arg_8 = LMParticleGroupCollection ( arg_0 , arg_1 = arg_1 , arg_3 = arg_3 , arg_5 = arg_5 , arg_4 = arg_4 , get_cos = arg_6 , arg_2 = arg_2 , ** arg_7 ) arg_8 . do_run_2 ( ) if arg_6 : return arg_8 . stats

Generates RGB values from HSV values in line with a typical light
    spectrum.


Question: r Retrieves all the text between matching open and close parentheses .

def Func ( arg_0 , arg_1 ) : arg_2 = { '(' : ')' , '{' : '}' , '[' : ']' } arg_3 = set ( itervalues ( arg_2 ) ) arg_4 = re . search ( arg_1 , arg_0 , re . M ) if not arg_4 : return None arg_5 = arg_4 . end ( 0 ) assert arg_5 > 0 , ( 'start_pattern must ends with an opening punctuation.' ) assert arg_0 [ arg_5 - 1 ] in arg_2 , ( 'start_pattern must ends with an opening punctuation.' ) arg_6 = [ arg_2 [ arg_0 [ arg_5 - 1 ] ] ] arg_7 = arg_5 while arg_6 and arg_7 < len ( arg_0 ) : if arg_0 [ arg_7 ] == arg_6 [ - 1 ] : arg_6 . pop ( ) elif arg_0 [ arg_7 ] in arg_3 : return None elif arg_0 [ arg_7 ] in arg_2 : arg_6 . append ( arg_2 [ arg_0 [ arg_7 ] ] ) arg_7 += 1 if arg_6 : return None return arg_0 [ arg_5 : arg_7 - 1 ]

Store the HTTP status and headers to be sent when self.write is
        called.


Question: Create a contract account . Sends a transaction to initialize the contract

def Func ( arg_0 , arg_1 = 0 , arg_2 = None , arg_3 = None , arg_4 = 0 , arg_5 = None , arg_6 = None ) : arg_7 = arg_0 . create_account ( arg_0 . new_address ( sender = arg_3 ) ) if arg_2 is None : arg_2 = arg_7 elif arg_3 is not None and arg_2 != arg_7 : raise EthereumError ( f"Error: contract created from address {hex(caller)} with nonce {self.get_nonce(caller)} was expected to be at address {hex(expected_address)}, but Func was called with address={hex(address)}" ) arg_0 . start_transaction ( 'CREATE' , arg_2 , arg_1 , arg_5 , arg_3 , arg_4 , arg_6 = arg_6 ) arg_0 . _process_pending_transaction ( ) return arg_2

True if the credential is expired or invalid.

        If the token_expiry isn't set, we assume the token doesn't expire.


Question: Test if a matrix is positive semidefinite

def Func ( arg_0 , arg_1 = arg_2 , arg_3 = arg_4 ) : if arg_3 is None : arg_3 = arg_4 if arg_1 is None : arg_1 = arg_2 if not is_hermitian_matrix ( arg_0 , arg_1 = arg_1 , arg_3 = arg_3 ) : return False arg_5 = np . linalg . eigvalsh ( arg_0 ) for arg_6 in arg_5 : if arg_6 < - arg_3 : return False return True

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


Question: Determine the amount flow rates of all the compounds .

def Func ( arg_0 ) : arg_1 = arg_0 . _compound_mfrs * 1.0 for arg_2 in arg_0 . material . compounds : arg_3 = arg_0 . material . get_compound_index ( arg_2 ) arg_1 [ arg_3 ] = stoich . amount ( arg_2 , arg_1 [ arg_3 ] ) return arg_1

Connect to the stream

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


Question: Disassociate this group from the specified group .

def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : arg_4 = arg_0 . lookup_with_inventory ( arg_2 , arg_3 . get ( 'inventory' , None ) ) [ 'id' ] arg_5 = arg_0 . lookup_with_inventory ( arg_1 , arg_3 . get ( 'inventory' , None ) ) [ 'id' ] return arg_0 . _disassoc ( 'children' , arg_4 , arg_5 )


Question: r Dictionary of mass fractions for each atom in the mixture .

def Func ( arg_0 ) : arg_1 = dict ( ) for arg_2 , arg_3 in zip ( arg_0 . zs , arg_0 . atomss ) : for arg_4 , arg_5 in arg_3 . iteritems ( ) : if arg_4 in arg_1 : arg_1 [ arg_4 ] += arg_2 * arg_5 else : arg_1 [ arg_4 ] = arg_2 * arg_5 return Func ( arg_1 )

delete a backend, and update the secrets file


Question: Create a simple generic function

def Func ( arg_0 ) : arg_1 = object ( ) def _by_class ( * arg_2 , ** arg_3 ) : arg_4 = arg_2 [ 0 ] . __class__ for arg_5 in type ( arg_4 . __name__ , ( arg_4 , object ) , { } ) . __mro__ : arg_10 = arg_8 ( arg_5 , arg_1 ) if arg_10 is not arg_1 : return arg_10 ( * arg_2 , ** arg_3 ) else : return arg_0 ( * arg_2 , ** arg_3 ) arg_6 = { object : arg_0 } try : arg_6 [ arg_7 ] = _by_class except NameError : pass arg_8 = arg_6 . get def arg_20 ( * arg_9 ) : for arg_5 in arg_9 : if not isinstance ( arg_5 , classtypes ) : raise TypeError ( "%r is not a type or class" % ( arg_5 , ) ) def decorate ( arg_10 ) : for arg_5 in arg_9 : if arg_6 . setdefault ( arg_5 , arg_10 ) is not arg_10 : raise TypeError ( "%r already has method for type %r" % ( arg_0 , arg_5 ) ) return arg_10 return decorate arg_11 = { } arg_12 = arg_11 . get def arg_21 ( * arg_13 ) : def decorate ( arg_10 ) : for arg_14 in arg_13 : if arg_11 . setdefault ( id ( arg_14 ) , ( arg_14 , arg_10 ) ) [ 1 ] is not arg_10 : raise TypeError ( "%r already has method for object %r" % ( arg_0 , arg_14 ) ) return arg_10 return decorate def arg_15 ( * arg_2 , ** arg_3 ) : arg_10 = arg_12 ( id ( arg_2 [ 0 ] ) , arg_1 ) if arg_10 is arg_1 : for arg_5 in type ( arg_2 [ 0 ] ) . __mro__ : arg_10 = arg_8 ( arg_5 , arg_1 ) if arg_10 is not arg_1 : return arg_10 ( * arg_2 , ** arg_3 ) else : return arg_0 ( * arg_2 , ** arg_3 ) else : return arg_10 [ 1 ] ( * arg_2 , ** arg_3 ) arg_15 . __name__ = arg_0 . __name__ arg_15 . __dict__ = arg_0 . __dict__ . copy ( ) arg_15 . __doc__ = arg_0 . __doc__ arg_15 . __module__ = arg_0 . __module__ arg_15 . when_type = arg_20 arg_15 . when_object = arg_21 arg_15 . default = arg_0 arg_15 . has_object = lambda arg_14 : id ( arg_14 ) in arg_11 arg_15 . has_type = lambda arg_5 : arg_5 in arg_6 return arg_15

Read data synchronous from an ADS-device from data name.

    :param int port: local AMS port as returned by adsPortOpenEx()
    :param pyads.structs.AmsAddr address: local or remote AmsAddr
    :param string data_name: data name
    :param Type data_type: type of the data given to the PLC, according to
        PLCTYPE constants
    :param bool return_ctypes: return ctypes instead of python types if True
        (default: False)
    :rtype: data_type
    :return: value: **value**


Question: Convert string with SoapySDR device settings to dict

def Func ( arg_0 ) : if not arg_0 : return { } arg_1 = { } for arg_2 in arg_0 . split ( ',' ) : arg_3 , arg_4 = arg_2 . split ( '=' ) arg_1 [ arg_3 . strip ( ) ] = arg_4 . strip ( ) return arg_1

Check if there is any chained comparison in the expression.

        Add a refactoring message if a boolOp contains comparison like a < b and b < c,
        which can be chained as a < b < c.

        Care is taken to avoid simplifying a < b < c and b < d.


Question: Return the container link .

def Func ( arg_0 , arg_1 , arg_2 ) -> str : arg_3 = list ( arg_1 . QueryContainers ( arg_0 . __database_link , { "query" : "SELECT * FROM r WHERE r.id=@id" , "parameters" : [ { "name" : "@id" , "value" : arg_2 } ] } ) ) if len ( arg_3 ) > 0 : return arg_3 [ 0 ] [ 'id' ] else : arg_4 = arg_1 . CreateContainer ( arg_0 . __database_link , { 'id' : arg_2 } ) return arg_4 [ 'id' ]

This method increases the permanence values of synapses of columns whose
    activity level has been too low. Such columns are identified by having an
    overlap duty cycle that drops too much below those of their peers. The
    permanence values for such columns are increased.


Question: Get the list of movies on an account watchlist .

def Func ( arg_0 , ** arg_1 ) : arg_2 = arg_0 . _get_id_path ( 'Func' ) arg_1 . update ( { 'session_id' : arg_0 . session_id } ) arg_3 = arg_0 . _GET ( arg_2 , arg_1 ) arg_0 . _set_attrs_to_values ( arg_3 ) return arg_3

Pickle the Dataset instance to the provided file.


Question: Connects the event with the given callback . When the signal is emitted the callback is invoked .

def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : if arg_0 . is_Funced ( arg_1 ) : raise AttributeError ( 'callback is already Funced' ) if arg_0 . hard_subscribers is None : arg_0 . hard_subscribers = [ ] arg_0 . hard_subscribers . append ( ( arg_1 , arg_2 , arg_3 ) )

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


Question: Test whether a stream can be written to .

def Func ( arg_0 ) : if isinstance ( arg_0 , io . IOBase ) and sys . version_info >= ( 3 , 5 ) : return arg_0 . writable ( ) try : arg_0 . write ( b'' ) except ( io . UnsupportedOperation , IOError ) : return False else : return True

Remove rows with NAs from the H2OFrame.

        :returns: new H2OFrame with all rows from the original frame containing any NAs removed.


Question: Deform a mesh along a parametric curve function

def Func ( arg_0 , arg_1 = arg_2 . torus_knot ( 't' ) , arg_4 = 0.001 ) : arg_5 = [ ] for arg_6 , arg_7 in enumerate ( arg_1 ) : arg_1 [ arg_6 ] = arg_7 . replace ( 't' , 'z' ) arg_5 . append ( arg_7 . replace ( 't' , 'z+{}' . format ( arg_4 ) ) ) arg_8 = arg_2 . v_subtract ( arg_5 , arg_1 ) arg_9 = arg_2 . v_add ( arg_5 , arg_1 ) arg_10 = arg_2 . v_cross ( arg_8 , arg_9 ) arg_11 = arg_2 . v_cross ( arg_10 , arg_8 ) arg_10 = arg_2 . v_normalize ( arg_10 ) arg_11 = arg_2 . v_normalize ( arg_11 ) arg_12 = arg_2 . v_add ( arg_2 . v_multiply ( 'x' , arg_11 ) , arg_2 . v_multiply ( 'y' , arg_10 ) ) arg_13 = arg_2 . v_add ( arg_1 , arg_12 ) vert_function ( arg_0 , x_func = arg_13 [ 0 ] , y_func = arg_13 [ 1 ] , z_func = arg_13 [ 2 ] ) return arg_13

Overriding the default JSONEncoder.default for NDB support.


Question: Returns a list with the smallest distance between two neighboring colors . The algorithm has a factorial complexity so it may run slow .

def Func ( arg_0 , arg_1 = False ) : if len ( arg_0 ) == 0 : return ColorList ( ) arg_2 = arg_0 [ 0 ] for arg_3 in arg_0 [ 1 : ] : if arg_3 . brightness < arg_2 . brightness : arg_2 = arg_3 arg_4 = [ arg_3 for arg_3 in arg_0 ] arg_4 . remove ( arg_2 ) arg_5 = [ arg_2 ] while len ( arg_4 ) > 1 : arg_6 , arg_7 = arg_4 [ 0 ] , arg_4 [ 0 ] . distance ( arg_5 [ - 1 ] ) for arg_3 in arg_4 [ 1 : ] : arg_8 = arg_3 . distance ( arg_5 [ - 1 ] ) if arg_8 < arg_7 : arg_6 , arg_7 = arg_3 , arg_8 arg_4 . remove ( arg_6 ) arg_5 . append ( arg_6 ) arg_5 . append ( arg_4 [ 0 ] ) if arg_1 : _list . reverse ( arg_5 ) return ColorList ( arg_5 )

Returns protobuf mapcontainer. Read from translation file.


Question: Generate test data if necessary

def Func ( arg_0 ) : def publish_info ( arg_1 ) : arg_2 . status . publish ( 'loadscheme' , arg_1 . loadscheme ) arg_2 . status . publish ( 'loop_count' , arg_1 . loop_count ) arg_2 . status . publish ( 'steps' , arg_1 . steps ) arg_2 . status . publish ( 'duration' , arg_1 . duration ) arg_2 . status . ammo_count = arg_1 . ammo_count arg_2 . status . publish ( 'instances' , arg_1 . instances ) arg_0 . core . publish ( 'stepper' , 'loadscheme' , arg_1 . loadscheme ) arg_0 . core . publish ( 'stepper' , 'loop_count' , arg_1 . loop_count ) arg_0 . core . publish ( 'stepper' , 'steps' , arg_1 . steps ) arg_0 . core . publish ( 'stepper' , 'duration' , arg_1 . duration ) arg_0 . core . publish ( 'stepper' , 'ammo_count' , arg_1 . ammo_count ) arg_0 . core . publish ( 'stepper' , 'instances' , arg_1 . instances ) return arg_1 if not arg_0 . stpd : arg_0 . stpd = arg_0 . __get_stpd_filename ( ) if arg_0 . use_caching and not arg_0 . force_stepping and os . path . exists ( arg_0 . stpd ) and os . path . exists ( arg_0 . __si_filename ( ) ) : arg_0 . log . info ( "Using cached stpd-file: %s" , arg_0 . stpd ) arg_1 = arg_0 . __read_cached_options ( ) if arg_0 . instances and arg_0 . load_profile . is_rps ( ) : arg_0 . log . info ( "rps_schedule is set. Overriding cached instances param from config: %s" , arg_0 . instances ) arg_1 = arg_1 . _replace ( arg_10 = arg_0 . instances ) publish_info ( arg_1 ) else : if ( arg_0 . force_stepping and os . path . exists ( arg_0 . __si_filename ( ) ) ) : os . remove ( arg_0 . __si_filename ( ) ) arg_0 . __make_stpd_file ( ) arg_1 = arg_2 . status . get_info ( ) arg_0 . __write_cached_options ( arg_1 ) else : arg_0 . log . info ( "Using specified stpd-file: %s" , arg_0 . stpd ) arg_1 = publish_info ( arg_0 . __read_cached_options ( ) ) arg_0 . ammo_count = arg_1 . ammo_count arg_0 . duration = arg_1 . duration arg_0 . loop_count = arg_1 . loop_count arg_0 . loadscheme = arg_1 . loadscheme arg_0 . steps = arg_1 . steps if arg_1 . instances : arg_0 . instances = arg_1 . instances

This is a decorator that retries a function.

    Tries `n` times and catches a given tuple of `errors`.

    If the `n` retries are not enough, the error is reraised.

    If desired `waits` some seconds.

    Optionally takes a 'logger_name' of a given logger to print the caught error.


Question: See if the clauses are true in a partial model .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] for arg_4 in arg_0 : arg_5 = pl_true ( arg_4 , arg_2 ) if arg_5 == False : return False if arg_5 != True : arg_3 . append ( arg_4 ) if not arg_3 : return arg_2 arg_6 , arg_7 = find_pure_symbol ( arg_1 , arg_3 ) if arg_6 : return Func ( arg_0 , removeall ( arg_6 , arg_1 ) , extend ( arg_2 , arg_6 , arg_7 ) ) arg_6 , arg_7 = find_unit_clause ( arg_0 , arg_2 ) if arg_6 : return Func ( arg_0 , removeall ( arg_6 , arg_1 ) , extend ( arg_2 , arg_6 , arg_7 ) ) arg_6 , arg_1 = arg_1 [ 0 ] , arg_1 [ 1 : ] return ( Func ( arg_0 , arg_1 , extend ( arg_2 , arg_6 , True ) ) or Func ( arg_0 , arg_1 , extend ( arg_2 , arg_6 , False ) ) )


Question: Converts a string to Duration .

def Func ( arg_0 , arg_1 ) : if len ( arg_1 ) < 1 or arg_1 [ - 1 ] != 's' : raise ParseError ( 'Duration must end with letter "s": {0}.' . format ( arg_1 ) ) try : arg_2 = arg_1 . find ( '.' ) if arg_2 == - 1 : arg_0 . seconds = int ( arg_1 [ : - 1 ] ) arg_0 . nanos = 0 else : arg_0 . seconds = int ( arg_1 [ : arg_2 ] ) if arg_1 [ 0 ] == '-' : arg_0 . nanos = int ( round ( float ( '-0{0}' . format ( arg_1 [ arg_2 : - 1 ] ) ) * 1e9 ) ) else : arg_0 . nanos = int ( round ( float ( '0{0}' . format ( arg_1 [ arg_2 : - 1 ] ) ) * 1e9 ) ) except ValueError : raise ParseError ( 'Couldn\'t parse duration: {0}.' . format ( arg_1 ) )

Compares and exchanges.

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

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

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

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


Question: Press scrollbar right with number of iterations

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if not arg_0 . verifyscrollbarhorizontal ( arg_1 , arg_2 ) : raise LdtpServerException ( 'Object not horizontal scrollbar' ) arg_4 = arg_0 . _get_object_handle ( arg_1 , arg_2 ) arg_5 = 0 arg_6 = 1.0 / 8 arg_7 = False while arg_5 < arg_3 : if arg_4 . AXValue >= 1 : raise LdtpServerException ( 'Maximum limit reached' ) arg_4 . AXValue += arg_6 time . sleep ( 1.0 / 100 ) arg_7 = True arg_5 += 1 if arg_7 : return 1 else : raise LdtpServerException ( 'Unable to increase scrollbar' )


Question: Projects the causal pair to the RKHS using the sampled kernel approximation .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 = arg_1 . ravel ( ) arg_2 = arg_2 . ravel ( ) arg_3 = np . ones ( arg_1 . shape ) arg_4 = np . cos ( np . dot ( arg_0 . W2 , np . vstack ( ( arg_1 , arg_3 ) ) ) ) . mean ( 1 ) arg_5 = np . cos ( np . dot ( arg_0 . W2 , np . vstack ( ( arg_2 , arg_3 ) ) ) ) . mean ( 1 ) if ( sum ( arg_4 ) > sum ( arg_5 ) ) : return np . hstack ( ( arg_4 , arg_5 , np . cos ( np . dot ( arg_0 . W , np . vstack ( ( arg_1 , arg_2 , arg_3 ) ) ) ) . mean ( 1 ) ) ) else : return np . hstack ( ( arg_4 , arg_5 , np . cos ( np . dot ( arg_0 . W , np . vstack ( ( arg_2 , arg_1 , arg_3 ) ) ) ) . mean ( 1 ) ) )


Question: Read the gain - scaling - coefficient and sample flow rate .

def Func ( arg_0 ) : arg_1 = [ ] arg_2 = { } arg_0 . cnxn . xfer ( [ 0x33 ] ) sleep ( 10e-3 ) for arg_3 in range ( 8 ) : arg_4 = arg_0 . cnxn . xfer ( [ 0x00 ] ) [ 0 ] arg_1 . append ( arg_4 ) arg_2 [ "GSC" ] = arg_0 . _calculate_float ( arg_1 [ 0 : 4 ] ) arg_2 [ "SFR" ] = arg_0 . _calculate_float ( arg_1 [ 4 : ] ) return arg_2

Extracts start row from the bookmark information


Question: Convert to json serializable dictionary .

def Func ( arg_0 ) : arg_1 , arg_2 = arg_0 . _Func ( ) if len ( arg_2 ) == 0 : return { "name" : arg_1 } else : return { "name" : arg_1 , "args" : arg_2 }

Scans String.

        Compares the byte, word, or double word specified with the memory operand
        with the value in the AL, AX, EAX, or RAX register, and sets the status flags
        according to the results. The memory operand address is read from either
        the ES:RDI, ES:EDI or the ES:DI registers (depending on the address-size
        attribute of the instruction, 32 or 16, respectively)::

                IF (byte comparison)
                THEN
                    temp  =  AL - SRC;
                    SetStatusFlags(temp);
                    THEN IF DF  =  0
                        THEN (E)DI  =  (E)DI + 1;
                        ELSE (E)DI  =  (E)DI - 1;
                        FI;
                    ELSE IF (word comparison)
                        THEN
                            temp  =  AX - SRC;
                            SetStatusFlags(temp)
                            THEN IF DF  =  0
                                THEN (E)DI  =  (E)DI + 2;
                                ELSE (E)DI  =  (E)DI - 2;
                                FI;
                     ELSE (* doubleword comparison *)
                           temp  =  EAX - SRC;
                           SetStatusFlags(temp)
                           THEN IF DF  =  0
                                THEN
                                    (E)DI  =  (E)DI + 4;
                                ELSE
                                    (E)DI  =  (E)DI - 4;
                                FI;
                           FI;
                     FI;

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


Question: This method is used by other modules and so it is not a part of the class . Fetches Instance pid from heron - shell .

def Func ( arg_0 , arg_1 ) : try : arg_2 = tornado . httpclient . AsyncHTTPClient ( ) arg_3 = utils . make_shell_endpoint ( arg_0 , arg_1 ) arg_4 = "%s/pid/%s" % ( arg_3 , arg_1 ) Log . debug ( "HTTP call for url: %s" , arg_4 ) arg_5 = yield arg_2 . fetch ( arg_4 ) raise tornado . gen . Return ( arg_5 . body ) except tornado . httpclient . HTTPError as e : raise Exception ( str ( e ) )

Receive a PIL Image instance of a GIF and return 2-tuple.

        Args:
            * [0]: Original Image instance (passed to `image`)
            * [1]: Dict with a transparency key (to GIF transparency layer)


Question: Generate a polygon from the line string points .

def Func ( arg_0 ) : from . polys import Polygon return Polygon ( arg_0 . coords , label = arg_0 . label )

Write the index.html file for this report.


Question: append func with given arguments and keywords .

def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : arg_4 = partial ( arg_1 , * arg_2 , ** arg_3 ) arg_0 . append ( arg_4 )

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Add a user to the database .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = arg_0 . obj [ 'adapter' ] arg_6 = [ ] for arg_7 in arg_1 : arg_8 = arg_5 . institute ( arg_1 = arg_7 ) if not arg_8 : LOG . warning ( "Institute % does not exist" , arg_7 ) arg_0 . abort ( ) arg_6 . append ( arg_7 ) arg_9 = [ ] if arg_4 : LOG . info ( "User is admin" ) arg_9 . append ( 'admin' ) arg_10 = dict ( email = arg_3 . lower ( ) , name = arg_2 , arg_9 = arg_9 , arg_6 = arg_6 ) arg_11 = build_Func ( arg_10 ) try : arg_5 . add_Func ( arg_11 ) except Exception as err : LOG . warning ( err ) arg_0 . abort ( )

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


Question: Find all columns that this selection depends on for df ds

def Func ( arg_0 , arg_1 ) : arg_2 = set ( ) for arg_3 in arg_0 . expressions : arg_3 = arg_1 . _expr ( arg_3 ) arg_2 |= arg_3 . variables ( ) if arg_0 . previous_selection : arg_2 |= arg_0 . previous_selection . Func ( arg_1 ) return arg_2

Return an open file-object to the index file


Question: Use Gauss - Hermite quadrature to form quadrature on positive - reals .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False , arg_4 = None ) : with tf . name_scope ( arg_4 or "vector_diffeomixture_quadrature_gauss_hermite" ) : arg_5 , arg_6 = np . polynomial . hermite . hermgauss ( deg = arg_2 ) arg_7 = dtype_util . as_numpy_dtype ( arg_0 . dtype ) arg_5 = arg_5 . astype ( arg_7 ) arg_6 = arg_6 . astype ( arg_7 ) arg_6 /= np . linalg . norm ( arg_6 , ord = 1 , keepdims = True ) arg_6 = tf . convert_to_tensor ( value = arg_6 , arg_4 = "probs" , dtype = arg_0 . dtype ) arg_5 = ( arg_0 [ ... , tf . newaxis ] + np . sqrt ( 2. ) * arg_1 [ ... , tf . newaxis ] * arg_5 ) return arg_5 , arg_6


Question: Replace this observation s data with a fresh container .

def Func ( arg_0 ) : arg_1 = arg_0 . data arg_0 . data = SortedKeyList ( key = arg_0 . _key ) return arg_1

Produces a TidyPy configuration that incorporates the configuration files
    stored in the current user's home directory.

    :param project_path: the path to the project that is going to be analyzed
    :type project_path: str
    :param use_cache:
        whether or not to use cached versions of any remote/referenced TidyPy
        configurations. If not specified, defaults to ``True``.
    :type use_cache: bool
    :rtype: dict