Question: Read header data from Gadget data file filename with Gadget file type gtype . Returns offsets of positions and velocities .

def Func ( arg_0 , arg_1 = None ) : arg_2 = '=I4sII' arg_3 = '=I6I6dddii6iiiddddii6ii60xI' arg_4 = ( 'Npart' , 'Massarr' , 'Time' , 'Redshift' , 'FlagSfr' , 'FlagFeedback' , 'Nall' , 'FlagCooling' , 'NumFiles' , 'BoxSize' , 'Omega0' , 'OmegaLambda' , 'HubbleParam' , 'FlagAge' , 'FlagMetals' , 'NallHW' , 'flag_entr_ics' , 'filename' ) arg_5 = open ( arg_0 , 'rb' ) """Detects Gadget file type (type 1 or 2; resp. without or with the 16	byte block headers).""" arg_6 = struct . unpack ( 'I' , arg_5 . read ( 4 ) ) if arg_6 [ 0 ] == 8 : arg_7 = 2 else : arg_7 = 1 if arg_7 == 2 : arg_5 . seek ( 16 ) else : arg_5 . seek ( 0 ) if arg_1 is not None : arg_5 . seek ( arg_1 ) arg_8 = struct . unpack ( arg_3 , arg_5 . read ( 264 ) ) [ 1 : - 1 ] arg_9 = ( arg_8 [ : 6 ] , arg_8 [ 6 : 12 ] ) + arg_8 [ 12 : 16 ] + ( arg_8 [ 16 : 22 ] , ) + arg_8 [ 22 : 30 ] + ( arg_8 [ 30 : 36 ] , arg_8 [ 36 ] , arg_0 ) arg_10 = dict ( list ( zip ( arg_4 , arg_9 ) ) ) arg_5 . close ( ) if arg_7 == 2 : arg_11 = ( 2 * 16 + ( 8 + 256 ) ) else : arg_11 = ( 8 + 256 ) arg_12 = sum ( arg_10 [ 'Npart' ] ) if arg_7 == 2 : arg_13 = 3 * 16 + ( 8 + 256 ) + ( 8 + 3 * 4 * arg_12 ) else : arg_13 = ( 8 + 256 ) + ( 8 + 3 * 4 * arg_12 ) return arg_12 , arg_11 + 4 , arg_13 + 4 , arg_10

Adds a chunk of tasks to the job

        Retry chunk if body exceeds the maximum request size and retry tasks
        if failed due to server errors.

        :param results_queue: Queue to place the return value of the request
        :type results_queue: collections.deque
        :param chunk_tasks_to_add: Chunk of at most 100 tasks with retry details
        :type chunk_tasks_to_add: list[~TrackedCloudTask]


Question: Calculate the default path in which thermochemical data is stored .

def Func ( ) : arg_0 = os . path . dirname ( sys . modules [ __name__ ] . __file__ ) arg_1 = os . path . join ( arg_0 , r'data/rao' ) arg_1 = os . path . abspath ( arg_1 ) return arg_1

Generates a jobs_pending progress bar widget.


Question: Code snippet from Python Cookbook 2nd Edition by David Ascher Alex Martelli and Anna Ravenscroft ; O Reilly 2005

def Func ( arg_0 , arg_1 = 2 , arg_2 = 0 , arg_3 = True ) : arg_4 = iter ( arg_0 ) arg_5 = list ( itertools . islice ( arg_4 , arg_1 ) ) while len ( arg_5 ) == arg_1 : yield arg_5 arg_5 = arg_5 [ arg_1 - arg_2 : ] arg_5 . extend ( itertools . islice ( arg_4 , arg_1 - arg_2 ) ) if arg_3 and arg_5 : arg_5 . extend ( itertools . repeat ( None , arg_1 - len ( arg_5 ) ) ) yield arg_5

Get or set `Settings._wrapped`

    :param str path: a python module file,
        if user set it,write config to `Settings._wrapped`
    :param str with_path: search path
    :return: A instance of `Settings`


Question: Set the rotation of this body using a rotation matrix .

def Func ( arg_0 , Func ) : if isinstance ( Func , np . ndarray ) : Func = Func . ravel ( ) arg_0 . ode_body . setRotation ( tuple ( Func ) )

Stop streaming samples from device and delete samples buffer


Question: Obtain account name from private key

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

Add noise to the given input.

  Parameters:
  -----------------------------------------------
  input:         the input to add noise to
  noise:         how much noise to add
  doForeground:  If true, turn off some of the 1 bits in the input
  doBackground:  If true, turn on some of the 0 bits in the input


Question: Walk up a directory tree

def Func ( arg_0 , arg_1 = 20 ) : arg_2 = arg_0 for arg_3 in xrange ( arg_1 ) : arg_4 = os . listdir ( arg_2 ) arg_5 , arg_6 = [ ] , [ ] for arg_7 in arg_4 : if os . path . isdir ( os . path . join ( arg_2 , arg_7 ) ) : arg_5 . append ( arg_7 ) else : arg_6 . append ( arg_7 ) yield arg_2 , arg_5 , arg_6 arg_8 = os . path . dirname ( arg_2 ) if arg_8 and not arg_8 == arg_2 : arg_2 = arg_8 else : break

Update the estimate.

        Parameters
        ----------
        new_val: float
            new observated value of estimated quantity.


Question: Log of the marginal likelihood for arbitrary scale .

def Func ( arg_0 ) : arg_1 = arg_0 . scale arg_2 = arg_0 . _D arg_3 = len ( arg_0 . _y ) arg_4 = - arg_0 . _df * log2pi - arg_3 * log ( arg_1 ) arg_4 -= sum ( npsum ( log ( arg_5 ) ) for arg_5 in arg_2 ) arg_5 = ( mTQ - yTQ for ( mTQ , yTQ ) in zip ( arg_0 . _mTQ , arg_0 . _yTQ ) ) arg_4 -= sum ( ( arg_6 / arg_7 ) @ arg_6 for ( arg_6 , arg_7 ) in zip ( arg_5 , arg_2 ) ) / arg_1 return arg_4 / 2

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: Handle CLI command

def Func ( arg_0 , * arg_1 , ** arg_2 ) : try : while True : Channel ( HEARTBEAT_CHANNEL ) . send ( { 'time' : time . time ( ) } ) time . sleep ( HEARTBEAT_FREQUENCY ) except KeyboardInterrupt : print ( "Received keyboard interrupt, exiting..." )

Generate a header for a tag section with specific parameters.

        :param str newer_tag_name: Name (title) of newer tag.
        :param str newer_tag_link: Tag name of newer tag, used for links.
                               Could be same as **newer_tag_name** or some
                               specific value, like `HEAD`.
        :param datetime newer_tag_time: Date and time when
                                        newer tag was created.
        :param str older_tag_link: Tag name of older tag, used for links.
        :param str project_url: URL for current project.
        :rtype: str
        :return: Generated ready-to-add tag section.


Question: manage message of different type and in the context of path

def Func ( arg_0 , arg_1 ) : if arg_1 . module not in arg_0 . _modules : if arg_1 . module : arg_0 . writeln ( "************* Module %s" % arg_1 . module ) arg_0 . _modules . add ( arg_1 . module ) else : arg_0 . writeln ( "************* " ) arg_0 . write_message ( arg_1 )


Question: List all licenses for a given organization .

def Func ( arg_0 , arg_1 = None , ** arg_2 ) : check_type ( arg_1 , basestring ) arg_3 = dict_from_items_with_values ( arg_2 , arg_1 = arg_1 , ) arg_4 = arg_0 . _session . get_items ( API_ENDPOINT , arg_3 = arg_3 ) for arg_5 in arg_4 : yield arg_0 . _object_factory ( OBJECT_TYPE , arg_5 )

Shift the model result and return the new instance.

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

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


Question: Takes a string argument and returns value as a tuple . Needed for paramfile conversion from CLI to set_params args

def Func ( arg_0 , arg_1 = arg_2 ) : if isinstance ( arg_0 , list ) : arg_0 = tuple ( arg_0 ) if isinstance ( arg_0 , arg_2 ) : arg_0 = arg_0 . rstrip ( ")" ) . strip ( "(" ) try : arg_0 = tuple ( [ arg_1 ( i . strip ( ) ) for i in arg_0 . split ( "," ) ] ) except TypeError : arg_0 = tuple ( arg_1 ( arg_0 ) ) except ValueError : LOGGER . info ( "Assembly.tuplecheck() failed to cast to {} - {}" . format ( arg_1 , arg_0 ) ) raise except Exception as inst : LOGGER . info ( inst ) raise SystemExit ( "\nError: Param`{}` is not formatted correctly.\n({})\n" . format ( arg_0 , inst ) ) return arg_0

Returns how the result count compares to the query options.

        The return value is negative if too few results were found, zero if enough were found, and
        positive if too many were found.

        Returns:
            int: -1, 0, or 1.


Question: Design an FIR lowpass filter using remez with order determination . The filter order is determined based on f_pass Hz fstop Hz and the desired passband ripple d_pass dB and stopband attenuation d_stop dB all relative to a sampling rate of fs Hz . Mark Wickert October 2016 updated October 2018

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = 1.0 , arg_5 = 5 ) : arg_6 , arg_7 , arg_8 , arg_9 = lowpass_order ( arg_0 , arg_1 , arg_2 , arg_3 , fsamp = arg_4 ) arg_10 = arg_6 arg_10 += arg_5 arg_11 = signal . remez ( arg_10 , arg_7 , arg_8 [ 0 : : 2 ] , arg_9 , Hz = 2 ) print ( 'Remez filter taps = %d.' % arg_10 ) return arg_11

Provide the run IDs of failed jobs

        Returns
        -------
        None


Question: Panflute filter function that converts content wrapped in a Para to Plain .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_0 , Para ) : if arg_0 . next is not None : return arg_0 elif arg_0 . prev is not None : return arg_0 return Plain ( * arg_0 . content )

Wait for ssh service to appear on given hosts


Question: Decode base64 coded part of the key .

def Func ( arg_0 , arg_1 ) : try : arg_2 = base64 . b64decode ( arg_1 . encode ( "ascii" ) ) except ( TypeError , binascii . Error ) : raise MalformedDataError ( "Unable to decode the key" ) return arg_2

List all events occurring at or after a timestamp.


Question: Generates the JSON report to plot the gene boxes

def Func ( arg_0 ) : arg_1 = { "plotData" : [ ] } arg_2 = { } arg_3 = { } for arg_4 in arg_0 . storage . values ( ) : arg_5 = re . match ( "(.*)_abr" , arg_4 [ "log_file" ] ) . groups ( ) [ 0 ] if arg_5 not in arg_2 : arg_2 [ arg_5 ] = { } arg_6 = arg_0 . _get_contig_id ( arg_4 [ "reference" ] ) arg_7 = arg_4 [ "database" ] if arg_7 not in arg_2 [ arg_5 ] : arg_2 [ arg_5 ] [ arg_7 ] = [ ] if arg_5 not in arg_3 : arg_3 [ arg_5 ] = arg_4 [ "infile" ] arg_2 [ arg_5 ] [ arg_7 ] . append ( { "contig" : arg_6 , "seqRange" : arg_4 [ "seq_range" ] , "gene" : arg_4 [ "gene" ] . replace ( "'" , "" ) , "accession" : arg_4 [ "accession" ] , "coverage" : arg_4 [ "coverage" ] , "identity" : arg_4 [ "identity" ] , } , ) for arg_8 , arg_9 in arg_2 . items ( ) : arg_1 [ "plotData" ] . append ( { "sample" : arg_8 , "data" : { "abricateXrange" : arg_9 } , "assemblyFile" : arg_3 [ arg_8 ] } ) return arg_1

Returns the maximum delay for the InferenceElements in the inference
    dictionary

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


Question: Callback function for URL defaults for this blueprint . It s called with the endpoint and values and should update the values passed in place .

def Func ( arg_0 , arg_1 ) : arg_0 . record_once ( lambda s : s . app . url_default_functions . setdefault ( arg_0 . name , [ ] ) . append ( arg_1 ) ) return arg_1

Returns a list of the dicom files within root_path

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

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


Question: Adapt the setter in an animation s layout so that Strip animations can run on on Matrix Cube or Circle layout and Matrix or Cube animations can run on a Strip layout .

def Func ( arg_0 ) : arg_1 = arg_0 . layout arg_2 = getattr ( arg_0 , 'LAYOUT_CLASS' , None ) if not arg_2 or isinstance ( arg_1 , arg_2 ) : return arg_3 = LAYOUT_WARNING % ( type ( arg_0 ) . __name__ , arg_2 . __name__ , type ( arg_1 ) . __name__ ) arg_4 = arg_1 . set arg_5 = None if arg_2 is strip . Strip : if isinstance ( arg_1 , matrix . Matrix ) : arg_6 = arg_1 . width def arg_5 ( arg_7 , arg_8 = None ) : arg_9 , arg_10 = divmod ( arg_7 , arg_6 ) arg_4 ( arg_10 , arg_9 , arg_8 or BLACK ) elif isinstance ( arg_1 , cube . Cube ) : arg_11 , arg_12 = arg_1 . x , arg_1 . y def arg_5 ( arg_7 , arg_8 = None ) : arg_13 , arg_10 = divmod ( arg_7 , arg_11 ) arg_14 , arg_9 = divmod ( arg_13 , arg_12 ) arg_4 ( arg_10 , arg_9 , arg_14 , arg_8 or BLACK ) elif isinstance ( arg_1 , circle . Circle ) : def arg_5 ( arg_7 , arg_8 = None ) : arg_1 . _set_base ( arg_7 , arg_8 or BLACK ) elif arg_2 is matrix . Matrix : if isinstance ( arg_1 , strip . Strip ) : arg_6 = arg_0 . width def arg_5 ( arg_10 , arg_9 , arg_8 = None ) : arg_4 ( arg_10 + arg_9 * arg_6 , arg_8 or BLACK ) if not arg_5 : raise ValueError ( arg_3 ) log . warning ( arg_3 ) arg_0 . layout . set = arg_5

Replace this observation's data with a fresh container.

        Returns
        -------
        annotation_data : SortedKeyList
            The original annotation data container


Question: Main command line interface .

def Func ( arg_0 = None ) : if arg_0 is None : arg_0 = sys . argv [ 1 : ] arg_1 = CommandLineTool ( ) return arg_1 . run ( arg_0 )

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: Parse a newsgroup info line to python types .

def Func ( arg_0 ) : arg_1 = arg_0 . split ( ) try : arg_2 = arg_1 [ 0 ] arg_3 = int ( arg_1 [ 1 ] ) arg_4 = int ( arg_1 [ 2 ] ) arg_5 = arg_1 [ 3 ] except ( IndexError , ValueError ) : raise ValueError ( "Invalid newsgroup info" ) return arg_2 , arg_3 , arg_4 , arg_5


Question: Simple error handler for azure .

def Func ( arg_0 ) : arg_1 = str ( arg_0 ) if arg_0 . respbody is not None : arg_1 += '\n' + arg_0 . respbody . decode ( 'utf-8-sig' ) raise AzureHttpError ( arg_1 , arg_0 . status )

Initialize lookup table for string input of LCD fields


Question: Run according to options in sys . argv and diff classifiers .

def Func ( ) : initLogging ( verbose = True ) initExperimentPrng ( ) @ staticmethod def _mockCreate ( * arg_0 , ** arg_1 ) : arg_1 . pop ( 'implementation' , None ) return SDRClassifierDiff ( * arg_0 , ** arg_1 ) arg_2 . create = _mockCreate runExperiment ( sys . argv [ 1 : ] )

Read a single holiday date from meter buffer.

        Args:
            setting_holiday (int):  Holiday from 0-19 or in range(Extents.Holidays)

        Returns:
            tuple: Holiday tuple, elements are strings.

            =============== ======================
            Holiday         Holiday 0-19 as string
            Day             Day 1-31 as string
            Month           Monty 1-12 as string
            =============== ======================


Question: Unpack link into location . If download_dir is provided and link points to a file make a copy of the link file inside download_dir .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = url_to_path ( arg_0 . url_without_fragment ) if os . path . isdir ( arg_3 ) : if os . path . isdir ( arg_1 ) : rmtree ( arg_1 ) shutil . copytree ( arg_3 , arg_1 , symlinks = True ) if arg_2 : logger . info ( 'Link is a directory, ignoring download_dir' ) return if arg_0 . hash : arg_4 = _get_hash_from_file ( arg_3 , arg_0 ) _check_hash ( arg_4 , arg_0 ) arg_5 = None if arg_2 : arg_5 = _check_download_dir ( arg_0 , arg_2 ) if arg_5 : arg_6 = arg_5 else : arg_6 = arg_3 arg_7 = mimetypes . guess_type ( arg_6 ) [ 0 ] unpack_file ( arg_6 , arg_1 , arg_7 , arg_0 ) if arg_2 and not arg_5 : _copy_file ( arg_6 , arg_2 , arg_7 , arg_0 )

Returns the value specified in the XDG_CONFIG_HOME environment variable
        or the appropriate default.


Question: Get dict - structured information about a gym . Space .

def Func ( arg_0 ) : if isinstance ( arg_0 , gym . spaces . Dict ) : assert isinstance ( arg_0 . spaces , OrderedDict ) arg_1 = arg_0 . spaces else : arg_1 = { None : arg_0 } arg_2 = [ ] arg_3 = { } arg_4 = { } for arg_5 , arg_6 in arg_1 . items ( ) : arg_2 . append ( arg_5 ) arg_3 [ arg_5 ] = arg_6 . shape arg_4 [ arg_5 ] = arg_6 . dtype return arg_2 , arg_3 , arg_4

Dumps a database table into a tab-delimited file


Question: Update a store .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . store_id = arg_1 return arg_0 . _mc_client . _patch ( url = arg_0 . _build_path ( arg_1 ) , arg_2 = arg_2 )

Builds a pipeline configuration for execution.

    Args:
      project: string name of project.
      zones: list of zone names for jobs to be run at.
      min_cores: int number of CPU cores required per job.
      min_ram: int GB of RAM required per job.
      disk_size: int GB of disk to attach under /mnt/data.
      boot_disk_size: int GB of disk for boot.
      preemptible: use a preemptible VM for the job
      accelerator_type: string GCE defined accelerator type.
      accelerator_count: int number of accelerators of the specified type to
        attach.
      image: string Docker image name in which to run.
      script_name: file name of the script to run.
      envs: list of EnvParam objects specifying environment variables to set
        within each job.
      inputs: list of FileParam objects specifying input variables to set
        within each job.
      outputs: list of FileParam objects specifying output variables to set
        within each job.
      pipeline_name: string name of pipeline.

    Returns:
      A nested dictionary with one entry under the key ephemeralPipeline
      containing the pipeline configuration.


Question: Summary error table for some typical q - values

def Func ( arg_0 , arg_1 = [ 0 , 0.01 , 0.02 , 0.05 , 0.1 , 0.2 , 0.3 , 0.4 , 0.5 ] ) : arg_1 = to_one_dim_array ( arg_1 ) arg_2 = find_nearest_matches ( np . float32 ( arg_0 . qvalue . values ) , arg_1 ) arg_3 = arg_0 . iloc [ arg_2 ] . copy ( ) for arg_4 , ( arg_5 , arg_6 ) in enumerate ( zip ( arg_2 , arg_2 [ 1 : ] ) ) : if arg_6 == arg_5 : arg_3 . iloc [ arg_4 + 1 , : ] = None arg_3 . qvalue = arg_1 arg_3 . reset_index ( inplace = True , drop = True ) return arg_3 [ [ 'qvalue' , 'pvalue' , 'svalue' , 'pep' , 'fdr' , 'fnr' , 'fpr' , 'tp' , 'tn' , 'fp' , 'fn' , 'cutoff' ] ]


Question: main function for creating a bottom - up tree automata for a block of matching statements .

def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_4 . StateRegister ) : arg_6 = [ ] for arg_7 in arg_0 . stmts : arg_8 = arg_2 ( ) arg_7 . Func ( arg_8 ) arg_6 . append ( arg_8 ) arg_0 . root_edge = populate_state_register ( arg_6 , arg_3 )


Question: Function that handles the inputs required to parse depth files from bowtie and dumps a dict to a json file that can be imported into pATLAS .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : logger . debug ( "Cutoff value: {}. Type: {}" . format ( arg_2 , type ( arg_2 ) ) ) try : arg_4 = float ( arg_2 ) if arg_4 < 0.4 : logger . warning ( "This cutoff value will generate a high volume of " "plot data. Therefore '.report.json' can be too big" ) except ValueError : logger . error ( "Cutoff value should be a string such as: '0.6'. " "The outputted value: {}. Make sure to provide an " "appropriate value for --cov_cutoff" . format ( arg_2 ) ) sys . exit ( 1 ) arg_5 = json . load ( open ( arg_1 ) ) if arg_5 : logger . info ( "Loaded dictionary of plasmid lengths" ) else : logger . error ( "Something went wrong and plasmid lengths dictionary" "could not be loaded. Check if process received this" "param successfully." ) sys . exit ( 1 ) arg_6 = open ( arg_0 ) logger . info ( "Reading depth file and creating dictionary to dump." ) arg_7 = depth_file_reader ( arg_6 ) arg_8 , arg_9 = generate_jsons ( arg_7 , arg_5 , arg_4 ) if arg_8 and arg_9 : logger . info ( "percentage_bases_covered length: {}" . format ( str ( len ( arg_8 ) ) ) ) logger . info ( "dict_cov length: {}" . format ( str ( len ( arg_9 ) ) ) ) else : logger . error ( "Both dicts that dump to JSON file or .report.json are " "empty." ) logger . info ( "Dumping to {}" . format ( "{}_mapping.json" . format ( arg_0 ) ) ) with open ( "{}_mapping.json" . format ( arg_0 ) , "w" ) as output_json : output_json . write ( json . dumps ( arg_8 ) ) arg_10 = { "tableRow" : [ { "sample" : arg_3 , "data" : [ { "header" : "Mapping" , "table" : "plasmids" , "patlas_mapping" : arg_8 , "value" : len ( arg_8 ) } ] } ] , "sample" : arg_3 , "patlas_mapping" : arg_8 , "plotData" : [ { "sample" : arg_3 , "data" : { "patlasMappingSliding" : arg_9 } , } ] } logger . debug ( "Size of dict_cov: {} kb" . format ( asizeof ( arg_10 ) / 1024 ) ) logger . info ( "Writing to .report.json" ) with open ( ".report.json" , "w" ) as json_report : json_report . write ( json . dumps ( arg_10 , separators = ( "," , ":" ) ) )

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

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

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


Question: Convert a JSON representation into ListValue message .

def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_0 , list ) : raise ParseError ( 'ListValue must be in [] which is {0}.' . format ( arg_0 ) ) arg_1 . ClearField ( 'values' ) for arg_2 in arg_0 : _ConvertValueMessage ( arg_2 , arg_1 . values . add ( ) )

r"""A lower bound on the entropy of this mixture model.

    The bound below is not always very tight, and its usefulness depends
    on the mixture probabilities and the components in use.

    A lower bound is useful for ELBO when the `Mixture` is the variational
    distribution:

    \\(
    \log p(x) >= ELBO = \int q(z) \log p(x, z) dz + H[q]
    \\)

    where \\( p \\) is the prior distribution, \\( q \\) is the variational,
    and \\( H[q] \\) is the entropy of \\( q \\). If there is a lower bound
    \\( G[q] \\) such that \\( H[q] \geq G[q] \\) then it can be used in
    place of \\( H[q] \\).

    For a mixture of distributions \\( q(Z) = \sum_i c_i q_i(Z) \\) with
    \\( \sum_i c_i = 1 \\), by the concavity of \\( f(x) = -x \log x \\), a
    simple lower bound is:

    \\(
    \begin{align}
    H[q] & = - \int q(z) \log q(z) dz \\\
       & = - \int (\sum_i c_i q_i(z)) \log(\sum_i c_i q_i(z)) dz \\\
       & \geq - \sum_i c_i \int q_i(z) \log q_i(z) dz \\\
       & = \sum_i c_i H[q_i]
    \end{align}
    \\)

    This is the term we calculate below for \\( G[q] \\).

    Args:
      name: A name for this operation (optional).

    Returns:
      A lower bound on the Mixture's entropy.


Question: Initialize the dictionary of architectures for disassembling via capstone

def Func ( arg_0 ) : return { ARM32 : ( CS_ARCH_ARM , CS_MODE_ARM ) , ARM64 : ( CS_ARCH_ARM64 , CS_MODE_LITTLE_ENDIAN ) , ARM_TB : ( CS_ARCH_ARM , CS_MODE_THUMB ) , MIPS32 : ( CS_ARCH_MIPS , CS_MODE_MIPS32 ) , MIPS64 : ( CS_ARCH_MIPS , CS_MODE_MIPS64 ) , SPARC32 : ( CS_ARCH_SPARC , CS_MODE_BIG_ENDIAN ) , SPARC64 : ( CS_ARCH_SPARC , CS_MODE_V9 ) , SYSTEMZ : ( CS_ARCH_SYSZ , CS_MODE_BIG_ENDIAN ) , X86_16 : ( CS_ARCH_X86 , CS_MODE_16 ) , X86_32 : ( CS_ARCH_X86 , CS_MODE_32 ) , X86_64 : ( CS_ARCH_X86 , CS_MODE_64 ) , }

Set a clinvar submission ID to 'closed'

            Args:
                submission_id(str): the ID of the clinvar submission to close

            Return
                updated_submission(obj): the submission object with a 'closed' status


Question: The name of the current module if the request was dispatched to an actual module . This is deprecated functionality use blueprints instead .

def Func ( arg_0 ) : from warnings import warn warn ( DeprecationWarning ( 'Funcs were deprecated in favor of ' 'blueprints.  Use request.blueprint ' 'instead.' ) , stacklevel = 2 ) if arg_0 . _is_old_Func : return arg_0 . blueprint


Question: Defines a simulated exception error that will be raised .

def Func ( arg_0 , Func ) : arg_0 . _error = RuntimeError ( Func ) if isinstance ( Func , str ) else Func

Returns URL-safe, sha1 signed base64 compressed JSON string. If key is
    None, settings.SECRET_KEY is used instead.

    If compress is True (not the default) checks if compressing using zlib can
    save some space. Prepends a '.' to signify compression. This is included
    in the signature, to protect against zip bombs.

    Salt can be used to namespace the hash, so that a signed string is
    only valid for a given namespace. Leaving this at the default
    value or re-using a salt value across different parts of your
    application without good cause is a security risk.

    The serializer is expected to return a bytestring.


Question: strlen symbolic model .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . cpu if issymbolic ( arg_1 ) : raise ConcretizeArgument ( arg_0 . cpu , 1 ) arg_3 = _find_zero ( arg_2 , arg_0 . constraints , arg_1 ) arg_4 = arg_3 for arg_5 in range ( arg_3 - 1 , - 1 , - 1 ) : arg_6 = arg_2 . read_int ( arg_1 + arg_5 , 8 ) if issymbolic ( arg_6 ) : arg_4 = ITEBV ( arg_2 . address_bit_size , arg_6 == 0 , arg_5 , arg_4 ) return arg_4

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: Execute R script

def Func ( arg_0 ) : arg_1 = OrderedDict ( ) arg_2 = OrderedDict ( [ ( arg_0 . file , [ 'Rscript' , arg_0 . file ] + arg_0 . cmd ) , ] ) for arg_3 , arg_4 in arg_2 . items ( ) : arg_1 [ arg_3 ] = arg_0 . run_command_under_r_root ( arg_4 ) return arg_0 . decode_cmd_out ( completed_cmd = arg_1 [ arg_0 . file ] )

Fetch the events pages of a given group.


Question: Finds embedded player url in HTTP response .

def Func ( arg_0 ) : arg_1 = '' arg_2 = _player_re . search ( arg_0 . text ) if arg_2 : arg_3 = arg_2 . group ( 0 ) . replace ( '&' , '&' ) if 'hash' not in arg_3 : arg_2 = _hash_re . search ( arg_0 . text ) if arg_2 : arg_1 = arg_3 + '&hash=' + arg_2 . group ( 1 ) else : arg_1 = arg_3 return 'http://ceskatelevize.cz/' + 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


Question: Provides a transacted cursor which will run in autocommit = false mode

def Func ( arg_0 ) : @ wraps ( arg_0 ) def wrapper ( arg_1 , * arg_2 , ** arg_3 ) : with ( yield from arg_1 . get_cursor ( _CursorType . NAMEDTUPLE ) ) as c : try : yield from c . execute ( 'BEGIN' ) arg_4 = ( yield from arg_0 ( arg_1 , c , * arg_2 , ** arg_3 ) ) except Exception : yield from c . execute ( 'ROLLBACK' ) else : yield from c . execute ( 'COMMIT' ) return arg_4 return wrapper

Display a list of all users and which institutes they belong to.


Question: The pods that hold the response to a simple discrete query .

def Func ( arg_0 ) : return ( arg_1 for arg_1 in arg_0 . pods if arg_1 . primary or arg_1 . title == 'Result' )


Question: Flatten an operator to a vector in a specified basis .

def Func ( arg_0 , arg_1 = 'col' ) : arg_0 = np . array ( arg_0 ) if arg_1 == 'col' : return arg_0 . flatten ( order = 'F' ) elif arg_1 == 'row' : return arg_0 . flatten ( order = 'C' ) elif arg_1 in [ 'pauli' , 'pauli_weights' ] : arg_2 = int ( np . log2 ( len ( arg_0 ) ) ) if len ( arg_0 ) != 2 ** arg_2 : raise Exception ( 'Input state must be n-qubit state' ) if arg_1 == 'pauli_weights' : arg_3 = pauli_group ( arg_2 , case = 'weight' ) else : arg_3 = pauli_group ( arg_2 , case = 'tensor' ) arg_4 = [ np . trace ( np . dot ( p . to_matrix ( ) , arg_0 ) ) for p in arg_3 ] return np . array ( arg_4 ) return None

Returns a list with the last ``n`` lines of the nextflow log file

        Parameters
        ----------
        n : int
            Number of last lines from the log file

        Returns
        -------
        list
            List of strings with the nextflow log


Question: Import Nodebox libraries .

def Func ( arg_0 , arg_1 ) : arg_2 = __import__ ( arg_1 ) arg_0 . _namespace [ arg_1 ] = arg_2 arg_2 . _ctx = arg_0 return arg_2

Return the next aggregated record, if any

    Parameters:
    ------------------------------------------------------------------------
    record:         The input record (values only) from the input source, or
                    None if the input has reached EOF (this will cause this
                    method to force completion of and return any partially
                    aggregated time period)
    curInputBookmark: The bookmark to the next input record
    retval:
      (outputRecord, inputBookmark)

      outputRecord: the aggregated record
      inputBookmark: a bookmark to the last position from the input that
                      contributed to this aggregated record.

      If we don't have any aggregated records yet, returns (None, None)

    The caller should generally do a loop like this:
      while True:
        inRecord = reader.getNextRecord()
        bookmark = reader.getBookmark()

        (aggRecord, aggBookmark) = aggregator.next(inRecord, bookmark)

        # reached EOF?
        if inRecord is None and aggRecord is None:
          break

        if aggRecord is not None:
          proessRecord(aggRecord, aggBookmark)

    This method makes use of the self._slice member variable to build up
    the values we need to aggregate. This is a dict of lists. The keys are
    the field indices and the elements of each list are the values for that
    field. For example:

      self._siice = { 0: [42, 53], 1: [4.0, 5.1] }


Question: Smooth images using a Gaussian filter .

def Func ( arg_0 , arg_1 ) : if arg_1 <= 0 : return arg_0 if not isinstance ( arg_0 , string_types ) and hasattr ( arg_0 , '__iter__' ) : arg_2 = False else : arg_2 = True arg_0 = [ arg_0 ] arg_3 = [ ] for arg_4 in arg_0 : arg_4 = check_img ( arg_4 ) arg_5 = arg_4 . get_affine ( ) arg_6 = _smooth_data_array ( arg_4 . get_data ( ) , arg_5 , arg_1 = arg_1 , copy = True ) arg_3 . append ( nib . Nifti1Image ( arg_6 , arg_5 ) ) if arg_2 : return arg_3 [ 0 ] else : return arg_3

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: This retrieves a time zone from the local zoneinfo tarball that is packaged with dateutil .

def Func ( arg_0 ) : warnings . warn ( "zoneinfo.Func() will be removed in future versions, " "to use the dateutil-provided zoneinfo files, instantiate a " "ZoneInfoFile object and use ZoneInfoFile.zones.get() " "instead. See the documentation for details." , DeprecationWarning ) if len ( _CLASS_ZONE_INSTANCE ) == 0 : _CLASS_ZONE_INSTANCE . append ( ZoneInfoFile ( getzoneinfofile_stream ( ) ) ) return _CLASS_ZONE_INSTANCE [ 0 ] . zones . get ( arg_0 )

Build a filter that fails on nodes in the given list.


Question: Yield layers of the multigraph .

def Func ( arg_0 ) : arg_1 = dict ( ) arg_2 = [ arg_4 for arg_4 in arg_0 . input_map . values ( ) ] yield arg_2 arg_3 = [ ] while arg_2 : for arg_4 in arg_2 : for arg_5 in arg_0 . _multi_graph . successors ( arg_4 ) : arg_6 = arg_0 . _multi_graph . number_of_edges ( arg_4 , arg_5 ) if arg_5 in arg_1 : arg_1 [ arg_5 ] -= arg_6 else : arg_1 [ arg_5 ] = arg_0 . _multi_graph . in_degree ( arg_5 ) - arg_6 if arg_1 [ arg_5 ] == 0 : arg_3 . append ( arg_5 ) del arg_1 [ arg_5 ] yield arg_3 arg_2 = arg_3 arg_3 = [ ]

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: Factory function to create a properly initialized task .

def Func ( arg_0 , arg_1 = None , arg_2 = arg_3 , arg_4 = None , arg_5 = None ) : arg_6 = Task ( ) if isinstance ( arg_0 , str ) : if arg_5 is not None : arg_7 = arg_0 . split ( '.' ) arg_8 = dict ( func_type = 'instancemethod' , module_name = '.' . join ( arg_7 [ : - 2 ] ) , class_name = arg_7 [ - 2 ] , class_path = '.' . join ( arg_7 [ : - 1 ] ) , model_pk = arg_5 , func_name = arg_7 [ - 1 ] , func_path = arg_0 , ) arg_6 . funcinfo = arg_8 else : arg_6 . funcinfo = get_func_info ( func_from_string ( arg_0 ) ) else : arg_6 . funcinfo = get_func_info ( arg_0 ) if arg_1 is None : arg_6 . label = arg_6 . funcinfo [ 'func_path' ] else : arg_6 . label = arg_1 arg_6 . schedule = arg_2 if not croniter . is_valid ( arg_6 . schedule ) : raise ValueError ( f"Cron schedule {task.schedule} is not valid" ) if arg_4 is None : arg_6 . userdata = dict ( ) else : if isinstance ( arg_4 , dict ) : arg_6 . userdata = arg_4 else : raise ValueError ( "Userdata must be a dictionary of JSON-serializable data" ) return arg_6

True if the credential is expired or invalid.

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


Question: Creates a RecordSensor region that allows us to specify a file record stream as the input source .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = "py.RecordSensor" arg_4 = json . dumps ( { "verbosity" : _VERBOSITY } ) arg_0 . addRegion ( arg_1 , arg_3 , arg_4 ) arg_5 = arg_0 . regions [ arg_1 ] . getSelf ( ) arg_5 . encoder = createEncoder ( ) arg_0 . regions [ arg_1 ] . setParameter ( "predictedField" , "consumption" ) arg_5 . dataSource = arg_2 return arg_5

Compute the hamming distance between two images


Question: Update reportnumbers .

def Func ( arg_0 ) : arg_1 = record_get_field_instances ( arg_0 . record , '037' ) for arg_2 in arg_1 : arg_3 = field_get_subfields ( arg_2 ) for arg_4 in arg_3 . get ( "a" , [ ] ) : if "arXiv" not in arg_4 : record_delete_field ( arg_0 . record , tag = "037" , field_position_global = arg_2 [ 4 ] ) arg_5 = [ ( code , arg_4 [ 0 ] ) for code , arg_4 in arg_3 . items ( ) ] record_add_field ( arg_0 . record , "088" , subfields = arg_5 ) break

Returns any parameters needed for Akamai HD player verification.

        Algorithm originally documented by KSV, source:
        http://stream-recorder.com/forum/showpost.php?p=43761&postcount=13


Question: Creates a property with the given name but the cls will created only with the first call

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = { } ) : arg_4 = "__{}" . format ( arg_1 ) setattr ( arg_0 , arg_4 , None ) def getter ( arg_5 ) : arg_6 = getattr ( arg_0 , arg_4 ) if arg_6 is None : arg_6 = arg_2 ( ** arg_3 ) setattr ( arg_0 , arg_4 , arg_6 ) return arg_6 setattr ( type ( arg_0 ) , arg_1 , property ( getter ) )

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


Question: Iterative parser for string escapes .

def Func ( arg_0 , arg_1 = False ) : arg_2 = '' while len ( arg_0 ) > 0 : arg_3 = arg_0 [ 0 ] if arg_3 == '\\' : arg_4 = arg_0 [ 1 ] if arg_4 in ( 'u' , 'U' ) : arg_2 += six . unichr ( int ( arg_0 [ 2 : 6 ] , base = 16 ) ) arg_0 = arg_0 [ 6 : ] continue else : if arg_4 == 'b' : arg_2 += '\b' elif arg_4 == 'f' : arg_2 += '\f' elif arg_4 == 'n' : arg_2 += '\n' elif arg_4 == 'r' : arg_2 += '\r' elif arg_4 == 't' : arg_2 += '\t' else : if arg_1 and ( arg_4 == '#' ) : arg_2 += '\\' arg_2 += arg_4 arg_0 = arg_0 [ 2 : ] continue else : arg_2 += arg_3 arg_0 = arg_0 [ 1 : ] return arg_2

Raises OrderError if no package or file defined.
        Raises CardinalityError if more than one type set.
        Raises SPDXValueError if type is unknown.


Question: Get domain name recommendations based on keywords .

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

Whether a connection can be established between those two meshes.


Question: Return the bit offset of the first bit to be set in the encoder output . For periodic encoders this can be a negative number when the encoded output wraps around .

def Func ( arg_0 , arg_1 ) : if arg_1 == SENTINEL_VALUE_FOR_MISSING_DATA : return [ None ] else : if arg_1 < arg_0 . minval : if arg_0 . clipInput and not arg_0 . periodic : if arg_0 . verbosity > 0 : print "Clipped input %s=%.2f to minval %.2f" % ( arg_0 . name , arg_1 , arg_0 . minval ) arg_1 = arg_0 . minval else : raise Exception ( 'input (%s) less than range (%s - %s)' % ( str ( arg_1 ) , str ( arg_0 . minval ) , str ( arg_0 . maxval ) ) ) if arg_0 . periodic : if arg_1 >= arg_0 . maxval : raise Exception ( 'input (%s) greater than periodic range (%s - %s)' % ( str ( arg_1 ) , str ( arg_0 . minval ) , str ( arg_0 . maxval ) ) ) else : if arg_1 > arg_0 . maxval : if arg_0 . clipInput : if arg_0 . verbosity > 0 : print "Clipped input %s=%.2f to maxval %.2f" % ( arg_0 . name , arg_1 , arg_0 . maxval ) arg_1 = arg_0 . maxval else : raise Exception ( 'input (%s) greater than range (%s - %s)' % ( str ( arg_1 ) , str ( arg_0 . minval ) , str ( arg_0 . maxval ) ) ) if arg_0 . periodic : arg_2 = int ( ( arg_1 - arg_0 . minval ) * arg_0 . nInternal / arg_0 . range ) + arg_0 . padding else : arg_2 = int ( ( ( arg_1 - arg_0 . minval ) + arg_0 . resolution / 2 ) / arg_0 . resolution ) + arg_0 . padding arg_3 = arg_2 - arg_0 . halfwidth return [ arg_3 ]

Extract Packed Floating-Point Values

        Extracts 128-bits of packed floating-point values from the source
        operand (second operand) at an 128-bit offset from imm8[0] into the
        destination operand (first operand). The destination may be either an
        XMM register or an 128-bit memory location.


Question: Parse the user data header portion of the replay .

def Func ( arg_0 ) : arg_1 = OrderedDict ( ) arg_2 = arg_0 . archive . header [ 'user_data_header' ] [ 'content' ] if re . search ( r'StarCraft II replay' , arg_2 ) : arg_2 = StringIO . StringIO ( arg_2 ) arg_2 . seek ( 30 ) arg_1 . update ( read_table ( arg_2 , [ 'release_flag' , 'major_version' , 'minor_version' , 'maintenance_version' , 'build_number' , 'unknown' , 'unknown' , 'duration' ] ) ) arg_1 [ 'version' ] = '%s.%s.%s.%s' % ( arg_1 [ 'major_version' ] , arg_1 [ 'minor_version' ] , arg_1 [ 'maintenance_version' ] , arg_1 [ 'build_number' ] ) if not arg_1 [ 'release_flag' ] : arg_1 [ 'version' ] += ' (dev)' arg_1 [ 'duration' ] /= 16 else : raise ValueError ( "The given file is not a StarCraft II replay." ) return arg_1

Init openstack neutron mq

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

        :param mq: class ternya.mq.MQ


Question: Wraps a getter so it applies to the inner - most results in kernel_results .

def Func ( arg_0 ) : @ functools . wraps ( arg_0 ) def _new_getter ( arg_1 , * arg_2 , ** arg_3 ) : arg_4 = [ ] while hasattr ( arg_1 , 'inner_results' ) : arg_4 . append ( arg_1 ) arg_1 = arg_1 . inner_results return arg_0 ( arg_1 , * arg_2 , ** arg_3 ) return _new_getter

Convert UTC datetime into user interface string.


Question: Create all tasks for the element

def Func ( arg_0 ) : arg_1 = arg_0 . project if isinstance ( arg_0 , Asset ) : arg_2 = True else : arg_2 = False arg_3 = arg_1 . department_set . filter ( assetflag = arg_2 ) for arg_4 in arg_3 : arg_5 = Task ( project = arg_1 , department = arg_4 , arg_0 = arg_0 ) arg_5 . full_clean ( ) arg_5 . save ( )

Retrieve the list of courses contained within the catalog linked to this enterprise.

        Only courses with active course runs are returned. A course run is considered active if it is currently
        open for enrollment, or will open in the future.


Question: Return True if an item with the value of unique_fields from data is unique in the table with table_name . False if no sample is found or more than one is found .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : try : arg_4 = find_unique ( arg_0 . table ( arg_1 ) , arg_2 = arg_2 , arg_3 = arg_3 ) except : return False else : return arg_4 is not None


Question: Remix an audio signal by re - ordering time intervals .

def Func ( arg_0 , arg_1 , arg_2 = True ) : util . valid_audio ( arg_0 , mono = False ) arg_3 = [ ] if arg_2 : arg_4 = core . to_mono ( arg_0 ) arg_5 = np . nonzero ( core . zero_crossings ( arg_4 ) ) [ - 1 ] arg_5 = np . append ( arg_5 , [ len ( arg_4 ) ] ) arg_6 = [ slice ( None ) ] * arg_0 . ndim for arg_7 in arg_1 : if arg_2 : arg_7 = arg_5 [ util . match_events ( arg_7 , arg_5 ) ] arg_6 [ - 1 ] = slice ( arg_7 [ 0 ] , arg_7 [ 1 ] ) arg_3 . append ( arg_0 [ tuple ( arg_6 ) ] ) return np . concatenate ( arg_3 , axis = - 1 )

This function creates the command list from available information


Question: Gets a list of snapshots for a cluster

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_conn ( ) . Func ( ClusterIdentifier = arg_1 ) if 'Snapshots' not in arg_2 : return None arg_3 = arg_2 [ 'Snapshots' ] arg_3 = filter ( lambda x : x [ 'Status' ] , arg_3 ) arg_3 . sort ( key = lambda x : x [ 'SnapshotCreateTime' ] , reverse = True ) return arg_3

Yield egg or source distribution objects based on basename


Question: The 1D index mappings between the unmasked sparse - grid and masked sparse grid .

def Func ( arg_0 ) : return mapping_util . Func_from_mask_and_pixel_centres ( mask = arg_0 . regular_grid . mask , unmasked_sparse_grid_pixel_centres = arg_0 . unmasked_sparse_grid_pixel_centres , total_sparse_pixels = arg_0 . total_sparse_pixels ) . astype ( 'int' )

Return whether the input course or program exist.


Question: Ignore any emitted warnings from a function .

def Func ( arg_0 ) : def decorator ( arg_1 ) : @ wraps ( arg_1 ) def wrapper ( * arg_2 , ** arg_3 ) : warnings . simplefilter ( 'ignore' , arg_0 ) return arg_1 ( * arg_2 , ** arg_3 ) return wrapper return decorator

Indicates the start of a new sequence. Clears any predictions and makes sure
    synapses don't grow to the currently active cells in the next time step.


Question: will get the axis mode for the current series

def Func ( arg_0 , arg_1 ) : if all ( [ isinstance ( getattr ( arg_2 , arg_1 ) , TimeVariable ) for arg_2 in arg_0 . _series ] ) : return 'time' return None


Question: Custom grouping from a given serialized string

def Func ( arg_0 , arg_1 , arg_2 = True ) : if not isinstance ( arg_1 , bytes ) : raise TypeError ( "Argument to Func() must be " "a serialized Python class as bytes, given: %s" % str ( arg_1 ) ) if not arg_2 : return arg_0 . CUSTOM ( gtype = topology_pb2 . Grouping . Value ( "CUSTOM" ) , python_serialized = arg_1 ) else : raise NotImplementedError ( "Custom grouping implemented in Java for Python topology" "is not yet supported." )

Returns arrays of pth percentile of long, short and gross volume exposures
    of an algorithm's held shares

    Parameters
    ----------
    shares_held : pd.DataFrame
        Daily number of shares held by an algorithm.
        - See full explanation in create_risk_tear_sheet

    volume : pd.DataFrame
        Daily volume per asset
        - See full explanation in create_risk_tear_sheet

    percentile : float
        Percentile to use when computing and plotting volume exposures
        - See full explanation in create_risk_tear_sheet


Question: Use this to set what file to read from .

def Func ( arg_0 , arg_1 , arg_2 = None ) : if isinstance ( arg_1 , io . TextIOWrapper ) : arg_0 . input = arg_1 elif isinstance ( arg_1 , 'string' . __class__ ) : arg_0 . name = arg_1 arg_0 . input = Func ( arg_1 , 'r' ) else : raise IOError ( "Invalid input type (%s) for %s" % ( arg_1 . __class__ . __name__ , arg_1 ) ) return

Use this method decorator to ensure the JWT token is refreshed when needed.


Question: Read settings from a config file in the source_dir root .

def Func ( arg_0 = None ) : arg_1 = logging . getLogger ( __name__ ) arg_1 . info ( "Reading settings ..." ) arg_2 = _DEFAULT_CONFIG . copy ( ) if arg_0 : arg_1 . debug ( "Settings file: %s" , arg_0 ) arg_3 = os . path . dirname ( arg_0 ) arg_4 = { } with open ( arg_0 ) as f : arg_5 = compile ( f . read ( ) , arg_0 , 'exec' ) exec ( arg_5 , arg_4 ) arg_2 . update ( ( arg_6 , arg_7 ) for arg_6 , arg_7 in arg_4 . items ( ) if arg_6 not in [ '__builtins__' ] ) arg_8 = [ 'source' , 'destination' , 'watermark' ] if os . path . isdir ( join ( arg_3 , arg_2 [ 'theme' ] ) ) and os . path . isdir ( join ( arg_3 , arg_2 [ 'theme' ] , 'templates' ) ) : arg_8 . append ( 'theme' ) for arg_9 in arg_8 : arg_10 = arg_2 [ arg_9 ] if arg_10 and not isabs ( arg_10 ) : arg_2 [ arg_9 ] = abspath ( normpath ( join ( arg_3 , arg_10 ) ) ) arg_1 . debug ( "Rewrite %s : %s -> %s" , arg_9 , arg_10 , arg_2 [ arg_9 ] ) for arg_11 in ( 'img_size' , 'thumb_size' , 'video_size' ) : arg_12 , arg_13 = arg_2 [ arg_11 ] if arg_13 > arg_12 : arg_2 [ arg_11 ] = ( arg_13 , arg_12 ) arg_1 . warning ( "The %s setting should be specified with the " "largest value first." , arg_11 ) if not arg_2 [ 'img_processor' ] : arg_1 . info ( 'No Processor, images will not be resized' ) arg_1 . debug ( 'Settings:\n%s' , pformat ( arg_2 , width = 120 ) ) return arg_2

Use this method decorator to ensure the JWT token is refreshed when needed.


Question: Spawn a new Python interpreter with the same arguments as this one but running the reloader thread .

def Func ( arg_0 ) : while 1 : _log ( 'info' , ' * Restarting with %s' % arg_0 . name ) arg_1 = [ sys . executable ] + sys . argv arg_2 = os . environ . copy ( ) arg_2 [ 'WERKZEUG_RUN_MAIN' ] = 'true' if os . name == 'nt' and PY2 : for arg_3 , arg_4 in iteritems ( arg_2 ) : if isinstance ( arg_4 , text_type ) : arg_2 [ arg_3 ] = arg_4 . encode ( 'iso-8859-1' ) arg_5 = subprocess . call ( arg_1 , env = arg_2 ) if arg_5 != 3 : return arg_5

Prints a list of all the error-categories used by error messages.

  These are the categories used to filter messages via --filter.


Question: Builds a gravatar url from an user or email

def Func ( arg_0 , arg_1 = arg_2 ) : if hasattr ( arg_0 , 'email' ) : arg_3 = arg_0 . email else : arg_3 = arg_0 try : return escape ( get_Func ( arg_3 = arg_3 , arg_1 = arg_1 ) ) except : return ''


Question: Return the set of all incorrect names from the given namespace in the graph .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 ) -> Set [ arg_3 ] : return { arg_5 . name for arg_4 , arg_5 , arg_4 in arg_0 . warnings if isinstance ( arg_5 , ( MissingNamespaceNameWarning , MissingNamespaceRegexWarning ) ) and arg_5 . namespace == arg_2 }

Configure the set of plugins with the given options
        and config instance. After configuration, disabled plugins
        are removed from the plugins list.


Question: Updates the SIS ID for the account identified by the passed account ID .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 == arg_0 . _canvas_account_id : raise Exception ( "SIS ID cannot be updated for the root account" ) arg_3 = ACCOUNTS_API . format ( arg_1 ) arg_4 = { "account" : { "sis_account_id" : arg_2 } } return CanvasAccount ( data = arg_0 . _put_resource ( arg_3 , arg_4 ) )


Question: creates a new empty table in the dataset ; If the table already exists update the existing table . Since BigQuery does not natively allow table upserts this is not an atomic operation .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : arg_4 = arg_2 [ 'tableReference' ] [ 'tableId' ] arg_3 = arg_3 if arg_3 is not None else arg_0 . project_id arg_5 = arg_0 . service . tables ( ) . list ( projectId = arg_3 , datasetId = arg_1 ) . execute ( num_retries = arg_0 . num_retries ) while True : for arg_6 in arg_5 . get ( 'tables' , [ ] ) : if arg_6 [ 'tableReference' ] [ 'tableId' ] == arg_4 : arg_0 . log . info ( 'Table %s:%s.%s exists, updating.' , arg_3 , arg_1 , arg_4 ) return arg_0 . service . tables ( ) . update ( projectId = arg_3 , datasetId = arg_1 , tableId = arg_4 , body = arg_2 ) . execute ( num_retries = arg_0 . num_retries ) if 'nextPageToken' in arg_5 : arg_5 = arg_0 . service . tables ( ) . list ( projectId = arg_3 , datasetId = arg_1 , pageToken = arg_5 [ 'nextPageToken' ] ) . execute ( num_retries = arg_0 . num_retries ) else : arg_0 . log . info ( 'Table %s:%s.%s does not exist. creating.' , arg_3 , arg_1 , arg_4 ) return arg_0 . service . tables ( ) . insert ( projectId = arg_3 , datasetId = arg_1 , body = arg_2 ) . execute ( num_retries = arg_0 . num_retries )

Return the RSSI signal strength in decibels.


Question: Register a text key .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = b"com.apple.iTunes" ) : arg_4 = b"----:" + arg_3 + b":" + arg_2 def getter ( arg_5 , arg_1 ) : return [ arg_6 . decode ( "utf-8" , "replace" ) for arg_6 in arg_5 [ arg_4 ] ] def setter ( arg_5 , arg_1 , arg_7 ) : arg_5 [ arg_4 ] = [ utf8 ( v ) for v in arg_7 ] def deleter ( arg_5 , arg_1 ) : del ( arg_5 [ arg_4 ] ) arg_0 . RegisterKey ( arg_1 , getter , setter , deleter )


Question: Encode something with SECRET_KEY .

def Func ( arg_0 ) : arg_1 = current_app . config . get ( 'SECRET_KEY' ) arg_2 = URLSafeSerializer ( arg_1 ) return arg_2 . dumps ( arg_0 )

Rename this conversation.

        Hangouts only officially supports renaming group conversations, so
        custom names for one-to-one conversations may or may not appear in all
        first party clients.

        Args:
            name (str): New name.

        Raises:
            .NetworkError: If conversation cannot be renamed.


Question: Parse a type comment string into AST nodes .

def Func ( arg_0 ) : try : arg_1 = ast3 . parse ( arg_0 , '<type_comment>' , 'eval' ) except SyntaxError : raise ValueError ( f"invalid type comment: {type_comment!r}" ) from None assert isinstance ( arg_1 , ast3 . Expression ) return arg_1 . body

Translates round trip symbols to sectors.

    Parameters
    ----------
    round_trips : pd.DataFrame
        DataFrame with one row per round trip trade.
        - See full explanation in round_trips.extract_round_trips
    sector_mappings : dict or pd.Series, optional
        Security identifier to sector mapping.
        Security ids as keys, sectors as values.

    Returns
    -------
    sector_round_trips : pd.DataFrame
        Round trips with symbol names replaced by sector names.


Question: abort my tasks .

def Func ( arg_0 ) : assert not arg_0 . ready ( ) , "Can't Func, I am already done!" return arg_0 . _client . Func ( arg_0 . msg_ids , targets = arg_0 . _targets , block = True )

Set a property value or remove a property.

        value == None means 'remove property'.
        Raise HTTP_FORBIDDEN if property is read-only, or not supported.

        When dry_run is True, this function should raise errors, as in a real
        run, but MUST NOT change any data.

        This default implementation

        - raises HTTP_FORBIDDEN, if trying to modify a locking property
        - raises HTTP_FORBIDDEN, if trying to modify an immutable {DAV:}
          property
        - handles Windows' Win32LastModifiedTime to set the getlastmodified
          property, if enabled
        - stores everything else as dead property, if a property manager is
          present.
        - raises HTTP_FORBIDDEN, else

        Removing a non-existing prop is NOT an error.

        Note: RFC 4918 states that {DAV:}displayname 'SHOULD NOT be protected'

        A resource provider may override this method, to update supported custom
        live properties.


Question: walk parameter instances on this interface

def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . _interfaces : yield from Func ( arg_2 , arg_1 ) for arg_3 in arg_0 . _params : if arg_3 not in arg_1 : arg_1 . add ( arg_3 ) yield 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: Returns a batched queryset of EnterpriseCustomerUser objects .

def Func ( arg_0 , arg_1 , arg_2 ) : LOGGER . info ( 'Fetching new batch of enterprise customer users from indexes: %s to %s' , arg_1 , arg_2 ) return User . objects . filter ( pk__in = arg_0 . _get_enterprise_customer_user_ids ( ) ) [ arg_1 : arg_2 ]

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


Question: Plotting but only the Rectangles . You have to set up the figure . Returns a matplotlib axis object .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False , arg_4 = 1 , arg_5 = None , arg_6 = None , arg_7 = None , arg_8 = None , arg_9 = None , arg_10 = None , ** arg_11 ) : arg_12 = None arg_13 = [ ] for arg_14 in arg_0 . __list : arg_15 = ( 0 , arg_14 . top . z ) arg_16 = arg_2 . get_decor ( arg_14 . primary , arg_5 = arg_5 ) arg_17 = arg_14 . base . z - arg_14 . top . z if arg_3 : if arg_10 is not None : arg_18 = arg_14 . data . get ( arg_10 , 1 ) arg_18 = arg_4 * arg_18 / arg_0 . max_field ( arg_10 ) arg_12 = 'gray' elif arg_2 is not None : arg_18 = arg_16 . width or arg_4 try : arg_18 = arg_4 * arg_18 / arg_2 . max_width except : arg_18 = arg_4 else : arg_18 = arg_4 arg_19 = arg_11 . copy ( ) arg_20 = arg_19 . pop ( 'lw' , 0 ) arg_21 = arg_19 . pop ( 'ec' , 'k' ) arg_22 = arg_19 . pop ( 'fc' , None ) or arg_12 or arg_16 . colour if arg_6 is None : arg_23 = mpl . patches . Rectangle ( arg_15 , arg_18 , arg_17 , arg_22 = arg_22 , arg_20 = arg_20 , hatch = arg_16 . hatch , arg_21 = arg_21 , ** arg_19 ) arg_1 . add_patch ( arg_23 ) else : arg_23 = mpl . patches . Rectangle ( arg_15 , arg_18 , arg_17 , arg_20 = arg_20 , arg_21 = arg_21 , ** arg_19 ) arg_13 . append ( arg_23 ) if arg_6 is not None : arg_8 = arg_8 or 'viridis' arg_24 = mpl . collections . PatchCollection ( arg_13 , arg_8 = arg_8 , arg_20 = arg_20 ) arg_24 . set_array ( arg_0 . get_data ( arg_6 , arg_7 , arg_9 = arg_9 ) ) arg_1 . add_collection ( arg_24 ) arg_25 = plt . colorbar ( arg_24 ) arg_25 . outline . set_linewidth ( 0 ) return arg_1


Question: Declare an environment variable as a set - like special variable . This can be used even if the environment variable is not present .

def Func ( arg_0 , arg_1 , arg_2 = arg_3 . pathsep ) : arg_0 . _declare_special ( arg_1 , arg_2 , SetVariable )

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


Question: Get details about the currently authenticated user

def Func ( arg_0 , arg_1 = None ) : if arg_1 : arg_1 [ 'compact' ] = True arg_2 = make_get_request ( arg_0 , 'self' , params_data = arg_1 ) arg_3 = arg_2 . json ( ) if arg_2 . status_code == 200 : return arg_3 [ 'result' ] else : raise SelfNotRetrievedException ( message = arg_3 [ 'message' ] , error_code = arg_3 [ 'error_code' ] , request_id = arg_3 [ 'request_id' ] )

Call the timeout handlers due.

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


Question: Dump record in json - encodable object format

def Func ( arg_0 ) : arg_1 = { } for arg_2 , arg_3 in arg_0 . _fields . iteritems ( ) : arg_4 = getattr ( arg_0 , arg_2 ) if arg_4 is not None : arg_1 [ arg_2 ] = arg_3 . dump ( arg_4 ) return arg_1

Return the maximum file descriptor value.


Question: Combine the fields from all components

def Func ( arg_0 ) : arg_1 = [ c . Func ( ) for c in arg_0 . comps ] return arg_0 . field_reduce_func ( arg_1 )

Initialize a new polyaxonfile specification.


Question: r Convert Result to dict .

def Func ( arg_0 , arg_1 = False ) : if arg_1 : return dict ( arg_0 . items ( ) ) else : return { str ( arg_2 ) : arg_3 for arg_2 , arg_3 in arg_0 . items ( ) }

Check the status of the incoming response, raise exception if status is not 200.

        Args:
            response_json (dict): results of the response of the GET request.

        Returns:
           None


Question: Yields one onset front ID at a time until they are gone . All the onset fronts from a frequency channel are yielded then all of the next channel s etc . though one at a time .

def Func ( arg_0 ) : arg_1 = set ( ) for arg_2 in arg_0 : for arg_3 in arg_2 : if arg_3 != 0 and arg_3 not in arg_1 : yield arg_3 arg_1 . add ( arg_3 )

Register all messages from a checker.

        :param BaseChecker checker:


Question: Read the data encoding the Check response payload and decode it into its constituent parts .

def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : super ( CheckResponsePayload , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_6 = utils . BytearrayStream ( arg_1 . Func ( arg_0 . length ) ) if arg_0 . is_tag_next ( arg_3 . Tags . UNIQUE_IDENTIFIER , arg_6 ) : arg_0 . _unique_identifier = primitives . TextString ( tag = arg_3 . Tags . UNIQUE_IDENTIFIER ) arg_0 . _unique_identifier . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . USAGE_LIMITS_COUNT , arg_6 ) : arg_0 . _usage_limits_count = primitives . LongInteger ( tag = arg_3 . Tags . USAGE_LIMITS_COUNT ) arg_0 . _usage_limits_count . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . CRYPTOGRAPHIC_USAGE_MASK , arg_6 ) : arg_0 . _cryptographic_usage_mask = primitives . Integer ( tag = arg_3 . Tags . CRYPTOGRAPHIC_USAGE_MASK ) arg_0 . _cryptographic_usage_mask . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . LEASE_TIME , arg_6 ) : arg_0 . _lease_time = primitives . Interval ( tag = arg_3 . Tags . LEASE_TIME ) arg_0 . _lease_time . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . is_oversized ( arg_6 )

Simple and fast implementation of the covariance AR estimate

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

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

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

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

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

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

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

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

    :References: Mathworks


Question: HTTP Delete Request

def Func ( arg_0 ) : return requests . delete ( 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: Find correct closed dates if issues was closed by commits .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . options . verbose : print ( "Fetching closed dates for {} {}..." . format ( len ( arg_1 ) , arg_2 ) ) arg_3 = copy . deepcopy ( arg_1 ) for arg_4 in arg_3 : if arg_0 . options . verbose > 2 : print ( "." , end = "" ) if not arg_1 . index ( arg_4 ) % 30 : print ( "" ) arg_0 . find_closed_date_by_commit ( arg_4 ) if not arg_4 . get ( 'actual_date' , False ) : if arg_4 . get ( 'closed_at' , False ) : print ( "Skipping closed non-merged issue: #{0} {1}" . format ( arg_4 [ "number" ] , arg_4 [ "title" ] ) ) arg_3 . remove ( arg_4 ) if arg_0 . options . verbose > 2 : print ( "." ) return arg_3

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: Reads the head of the las file and returns it

def Func ( arg_0 ) : arg_0 . stream . seek ( arg_0 . start_pos ) return headers . HeaderFactory ( ) . read_from_stream ( arg_0 . stream )

Provides a connection string for database.

        Parameters
        ----------
        name: str, optional
            an override database name for the connection string.

        Returns
        -------
        str: the connection string (e.g. 'dbname=db1 user=user1 host=localhost port=5432')


Question: Loads all the data files using the configured finders .

def Func ( arg_0 ) : for arg_1 in arg_0 . _resources : arg_2 = arg_0 . load ( arg_1 ) yield arg_1 , arg_2 arg_0 . _resources = [ ]

Use this method decorator to ensure the JWT token is refreshed when needed.


Question: Return the fields specified in the pattern using Python s formatting mini - language .

def Func ( arg_0 ) : arg_1 = list ( string . Formatter ( ) . parse ( arg_0 . pattern ) ) return [ arg_2 for arg_2 in zip ( * arg_1 ) [ 1 ] if arg_2 is not None ]

Total time since the timer is started.

        Returns (float): Time in seconds.


Question: Add paths for egg - info files for an external egg - base .

def Func ( arg_0 , arg_1 ) : if arg_1 . egg_base == os . curdir : return arg_2 = distutils . filelist . findall ( arg_1 . egg_base ) arg_3 = ( os . path . join ( arg_1 . egg_base , path ) for path in arg_2 ) arg_0 . filelist . allfiles . extend ( arg_3 )

Top Chartbeat template tag.

    Render the top Javascript code for Chartbeat.


Question: This function gets called when a target is specified to ensure that all tied targets also get included in the subgraph to be built

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_0 : for arg_4 in arg_1 : if arg_3 in arg_4 : for arg_5 in arg_4 : arg_2 . append ( arg_5 ) arg_2 = list ( set ( arg_2 ) ) if arg_2 : arg_6 = "" arg_6 += "The following targets share dependencies and must be run together:" for arg_4 in sorted ( arg_2 ) : arg_6 += "\n  - {}" . format ( arg_4 ) return list ( set ( arg_2 + arg_0 ) ) , arg_6 return arg_0 , ""

Upload all po files to GDocs ignoring conflicts.
        This method looks for all msgids in po_files and sends them
        as ods to GDocs Spreadsheet.


Question: This is a parallel grid search worker for the function below .

def Func ( arg_0 ) : arg_1 , arg_2 , arg_3 = arg_0 try : arg_4 = get_recovered_variables_for_magbin ( arg_1 , arg_3 , stetson_stdev_min = arg_2 [ 0 ] , inveta_stdev_min = arg_2 [ 1 ] , iqr_stdev_min = arg_2 [ 2 ] , statsonly = True ) return arg_4 except Exception as e : LOGEXCEPTION ( 'failed to get info for %s' % arg_2 ) return None

Drops the historical sap_success_factors table named herein.


Question: Trains the TM with given sequence for a given number of time steps and level of input corruption

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = np . zeros ( tm . numberOfColumns ( ) , dtype = "uint32" ) arg_4 = np . zeros ( tm . numberOfColumns ( ) , dtype = "uint32" ) arg_5 = 0 for arg_6 in range ( arg_1 ) : tm . reset ( ) for arg_7 in range ( 4 ) : arg_8 = corruptVector ( arg_0 [ arg_7 ] [ : ] , arg_2 , sparseCols ) tm . compute ( set ( arg_8 [ : ] . nonzero ( ) [ 0 ] . tolist ( ) ) , learn = True ) arg_9 = [ tm . columnForCell ( i ) for i in tm . getActiveCells ( ) ] arg_10 = [ tm . columnForCell ( i ) for i in tm . getPredictiveCells ( ) ] arg_3 = [ 1 if i in arg_9 else 0 for i in range ( tm . numberOfColumns ( ) ) ] arg_11 = accuracy ( arg_3 , arg_4 ) x . append ( arg_5 ) y . append ( arg_11 ) arg_5 += 1 arg_4 = [ 1 if i in arg_10 else 0 for i in range ( tm . numberOfColumns ( ) ) ]

Get or set `Settings._wrapped`

    :param str path: a python module file,
        if user set it,write config to `Settings._wrapped`
    :param str with_path: search path
    :return: A instance of `Settings`


Question: Writes credentials to a file .

def Func ( arg_0 , arg_1 ) : arg_2 = { 'file_version' : 2 , 'credentials' : { } } for arg_3 , arg_4 in iteritems ( arg_1 ) : arg_5 = arg_4 . to_json ( ) arg_6 = _helpers . _from_bytes ( base64 . b64encode ( _helpers . _to_bytes ( arg_5 ) ) ) arg_2 [ 'credentials' ] [ arg_3 ] = arg_6 arg_0 . seek ( 0 ) json . dump ( arg_2 , arg_0 ) arg_0 . truncate ( )

Remove hidden notes and tag a CERN if detected.


Question: Build a small phenotype object

def Func ( arg_0 , arg_1 ) : arg_2 = { } arg_3 = arg_1 . hpo_term ( arg_0 ) if arg_3 : arg_2 [ 'phenotype_id' ] = arg_3 [ 'hpo_id' ] arg_2 [ 'feature' ] = arg_3 [ 'description' ] return arg_3


Question: Returns a new random state .

def Func ( arg_0 = None , arg_1 = False ) : if arg_0 is None : if not arg_1 : arg_0 = CURRENT_RANDOM_STATE . randint ( SEED_MIN_VALUE , SEED_MAX_VALUE , 1 ) [ 0 ] return np . random . RandomState ( arg_0 )

Delete the specified InactivityAlert

        :param tag_id: The tag ID to delete
        :type tag_id: str

        :raises: This will raise a
            :class:`ServerException <logentries_api.exceptions.ServerException>`
            if there is an error from Logentries


Question: Iterate through each member of the class being created and add a safety check to every method that isn t marked as read - only .

def Func ( arg_0 , arg_1 ) : for arg_2 , arg_3 in arg_1 . items ( ) : arg_1 [ arg_2 ] = arg_0 . add_safety_check ( arg_2 , arg_3 )

Set the room topic.

        Args:
            topic (str): Topic

        Returns:
            bool. Success


Question: Return all issues from every target .

def Func ( arg_0 , arg_1 , arg_2 ) : log . info ( "Starting to aggregate remote issues." ) arg_3 = aslist ( arg_0 . get ( arg_1 , 'targets' ) ) arg_4 = multiprocessing . Queue ( ) log . info ( "Spawning %i workers." % len ( arg_3 ) ) arg_5 = [ ] if arg_2 : for arg_6 in arg_3 : _Func ( arg_0 , arg_1 , arg_6 , arg_4 , arg_0 . get ( arg_6 , 'service' ) ) else : for arg_6 in arg_3 : arg_7 = multiprocessing . Process ( arg_6 = _Func , arg_11 = ( arg_0 , arg_1 , arg_6 , arg_4 , arg_0 . get ( arg_6 , 'service' ) ) ) arg_7 . start ( ) arg_5 . append ( arg_7 ) time . sleep ( 1 ) arg_8 = len ( arg_3 ) while arg_8 > 0 : arg_9 = arg_4 . get ( True ) if isinstance ( arg_9 , tuple ) : arg_10 , arg_11 = arg_9 if arg_10 == SERVICE_FINISHED_ERROR : arg_6 , arg_12 = arg_11 log . info ( "Terminating workers" ) for arg_13 in arg_5 : arg_13 . terminate ( ) raise RuntimeError ( "critical error in target '{}'" . format ( arg_6 ) ) arg_8 -= 1 continue yield arg_9 log . info ( "Done aggregating remote issues." )

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: Write data to HDF5 file in one go .

def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : arg_4 = 0 with h5py . File ( arg_1 , 'w' ) as arg_5 : arg_5 . attrs [ b'CLASS' ] = b'FILTERBANK' arg_5 . attrs [ b'VERSION' ] = b'1.0' if HAS_BITSHUFFLE : arg_7 = bitshuffle . h5 . H5FILTER arg_8 = ( arg_4 , bitshuffle . h5 . H5_COMPRESS_LZ4 ) else : arg_7 = None arg_8 = None logger . warning ( "Warning: bitshuffle not found. No compression applied." ) arg_9 = arg_5 . create_dataset ( 'data' , data = arg_0 . data , compression = arg_7 , compression_opts = arg_8 ) arg_10 = arg_5 . create_dataset ( 'mask' , shape = arg_0 . file_shape , compression = arg_7 , compression_opts = arg_8 , dtype = 'uint8' ) arg_9 . dims [ 0 ] . label = b"frequency" arg_9 . dims [ 1 ] . label = b"feed_id" arg_9 . dims [ 2 ] . label = b"time" arg_10 . dims [ 0 ] . label = b"frequency" arg_10 . dims [ 1 ] . label = b"feed_id" arg_10 . dims [ 2 ] . label = b"time" for arg_13 , arg_14 in arg_0 . header . items ( ) : arg_9 . attrs [ arg_13 ] = arg_14


Question: Check if the latest version of OMIM differs from the most recent in database Return all genes that where not in the previous version .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = set ( [ gene [ 'hgnc_id' ] for gene in arg_1 [ 'genes' ] ] ) arg_4 = set ( [ gene [ 'hgnc_id' ] for gene in arg_2 [ 'genes' ] ] ) return arg_4 . difference ( arg_3 )

Apply the criteria to filter out on the output required


Question: Establish a new route in the AMS Router .

def Func ( arg_0 , arg_1 ) : arg_2 = _adsDLL . AdsAddRoute arg_2 . restype = ctypes . c_long arg_4 = ctypes . c_char_p ( arg_1 . encode ( "utf-8" ) ) arg_5 = arg_2 ( arg_0 , arg_4 ) if arg_5 : raise ADSError ( arg_5 )

Releases renderer resources associated with this image.


Question: Returns locals dictionary from a given frame .

def Func ( arg_0 = 0 ) : with Frame ( arg_0 = arg_0 ) as frame : arg_1 = frame . f_locals return arg_1

Synchronize content metadata using the Degreed course content API.

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

        Raises:
            ClientError: If Degreed API request fails.


Question: Works around the problem of emulating user interactions with text inputs . Emulates a key - down action on the first char of the input . This way implementations which require key - down event to trigger auto - suggest are testable . Then the chains sends the rest of the text and releases the key .

def Func ( arg_0 , arg_1 ) : ActionChains ( arg_0 . driver ) . key_down ( arg_1 ) . key_up ( Keys . CONTROL ) . perform ( )

Updates the binary annotations for the current span.


Question: Removes this layer from the canvas .

def Func ( arg_0 ) : arg_1 = arg_0 . index ( ) if arg_1 != None : del arg_0 . canvas . layers [ arg_1 ]

Gets predictions for a given utterance, in the form of intents and
        entities. The current maximum query size is 500 characters.

        :param app_id: The LUIS application ID (Guid).
        :type app_id: str
        :param query: The utterance to predict.
        :type query: str
        :param timezone_offset: The timezone offset for the location of the
         request.
        :type timezone_offset: float
        :param verbose: If true, return all intents instead of just the top
         scoring intent.
        :type verbose: bool
        :param staging: Use the staging endpoint slot.
        :type staging: bool
        :param spell_check: Enable spell checking.
        :type spell_check: bool
        :param bing_spell_check_subscription_key: The subscription key to use
         when enabling Bing spell check
        :type bing_spell_check_subscription_key: str
        :param log: Log query (default is true)
        :type log: bool
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: LuisResult or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.language.luis.runtime.models.LuisResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.language.luis.runtime.models.APIErrorException>`


Question: Return a DataFrame with the duplicated values of the column col_name in df .

def Func ( arg_0 , arg_1 ) : _check_cols ( arg_0 , [ arg_1 ] ) arg_2 = arg_0 [ pd . notnull ( arg_0 [ arg_1 ] ) & arg_0 . duplicated ( subset = [ arg_1 ] ) ] return arg_2


Question: Get 3D coordinate .

def Func ( arg_0 ) : if not arg_0 . require_3D : arg_0 . fail ( AttributeError ( "use 3D Funcinate in 2D descriptor" ) ) return arg_0 . _context . get_Func ( arg_0 )

Return a warning message of code 'code'.

    If code = (cd, str) it returns the warning message of code 'cd' and appends
    str at the end


Question: Creates a dict with the inputted items ; pruning any that are None .

def Func ( * arg_0 , ** arg_1 ) : arg_2 = list ( arg_0 ) arg_2 . append ( arg_1 ) arg_3 = { } for arg_4 in arg_2 : for arg_5 , arg_6 in arg_4 . items ( ) : if arg_6 is not None : arg_3 [ arg_5 ] = arg_6 return arg_3

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: Delete files on S3

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_0 . s3walk ( arg_1 ) : if not arg_3 [ 'is_dir' ] : arg_2 . append ( arg_3 [ 'name' ] ) arg_4 = ThreadPool ( ThreadUtil , arg_0 . opt ) arg_4 . batch_delete ( arg_2 ) arg_4 . join ( )

Determines the most appropriate plotting unit for data.

    Parameters
    ----------
    a : float or array-like
        number to optimise. If array like, the 25% quantile is optimised.
    llim : float
        minimum allowable value in scaled data.

    Returns
    -------
    (float, str)
        (multiplier, unit)


Question: Load the includes of an encoding Namelist files .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 [ "includes" ] = [ ] arg_4 = arg_0 [ "charset" ] = set ( ) | arg_0 [ "ownCharset" ] arg_5 = arg_0 [ "noCharcode" ] = set ( ) | arg_0 [ "ownNoCharcode" ] arg_6 = os . path . dirname ( arg_0 [ "fileName" ] ) for arg_7 in arg_0 [ "header" ] [ "includes" ] : arg_8 = os . path . join ( arg_6 , arg_7 ) try : arg_9 = readNamelist ( arg_8 , arg_1 , arg_2 ) except NamelistRecursionError : continue if arg_9 in arg_3 : continue arg_3 . append ( arg_9 ) arg_4 |= arg_9 [ "charset" ] arg_5 |= arg_9 [ "ownNoCharcode" ] return arg_0


Question: REST Conference List Helper

def Func ( arg_0 , arg_1 ) : arg_2 = '/' + arg_0 . api_version + '/ConferenceList/' arg_3 = 'POST' return arg_0 . request ( arg_2 , arg_3 , arg_1 )

Unsigned divide.

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

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

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


Question: Startup and shutdown commands config Used by agent . py on the target

def Func ( arg_0 ) : arg_1 = "agent_startup_{}.cfg" . format ( arg_0 . host ) if os . path . isfile ( arg_1 ) : logger . info ( 'Found agent startup config file in working directory with the same name as created for host %s.\n' 'Creating new one via tempfile. This will affect predictable filenames for agent artefacts' , arg_0 . host ) arg_2 , arg_1 = tempfile . mkstemp ( '.cfg' , 'agent_' ) os . close ( arg_2 ) try : arg_3 = ConfigParser . RawConfigParser ( ) arg_3 . add_section ( 'startup' ) [ arg_3 . set ( 'startup' , "cmd%s" % arg_4 , arg_5 ) for arg_4 , arg_5 in enumerate ( arg_0 . startups ) ] arg_3 . add_section ( 'shutdown' ) [ arg_3 . set ( 'shutdown' , "cmd%s" % arg_4 , arg_5 ) for arg_4 , arg_5 in enumerate ( arg_0 . shutdowns ) ] arg_3 . add_section ( 'source' ) [ arg_3 . set ( 'source' , "file%s" % arg_4 , arg_6 ) for arg_4 , arg_6 in enumerate ( arg_0 . sources ) ] with open ( arg_1 , 'w' ) as fds : arg_3 . write ( fds ) except Exception as exc : logger . error ( 'Error trying to create monitoring startups config. Malformed? %s' , exc , exc_info = True ) return arg_1

Append data to this frame row-wise.

        :param data: an H2OFrame or a list of H2OFrame's to be combined with current frame row-wise.
        :returns: this H2OFrame with all frames in data appended row-wise.


Question: Make a POST request to the given path with data in its body . Return the JSON - decoded result .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , ** arg_4 ) : arg_4 = jsonify_parameters ( arg_4 ) arg_5 = ensure_trailing_slash ( arg_0 . url + arg_1 . lstrip ( '/' ) ) return arg_0 . _json_request ( 'post' , arg_5 , arg_4 = arg_4 , arg_2 = arg_2 , headers = { 'Content-Type' : arg_3 } )

Remove all binary files in the adslib directory.


Question: Delete deposit .

def Func ( arg_0 , arg_1 = True , arg_2 = None ) : arg_2 = arg_2 or arg_0 . pid if arg_0 [ '_deposit' ] . get ( 'pid' ) : raise PIDInvalidAction ( ) if arg_2 : arg_2 . Func ( ) return super ( Deposit , arg_0 ) . Func ( arg_1 = arg_1 )

Read settings from a config file in the source_dir root.


Question: Replace words with corresponding values in replacements dict .

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_1 . split ( '\n' ) : arg_4 = [ ] for arg_5 in arg_3 . split ( ' ' ) : arg_6 = arg_0 . get ( arg_5 , arg_5 ) arg_4 . append ( arg_6 ) arg_2 . append ( arg_4 ) return '\n' . join ( ' ' . join ( arg_4 ) for arg_4 in arg_2 )

Return a list of all enrollments for the passed section_id.

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


Question: Main executor of the spades template .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : logger . info ( "Starting spades" ) logger . info ( "Setting SPAdes kmers" ) arg_5 = set_kmers ( arg_3 , arg_2 ) logger . info ( "SPAdes kmers set to: {}" . format ( arg_5 ) ) arg_6 = [ "metaspades.py" , "--only-assembler" , "--threads" , "$task.cpus" , "-o" , "." ] if arg_5 : arg_6 += [ "-k {}" . format ( "," . join ( [ str ( arg_7 ) for arg_7 in arg_5 ] ) ) ] arg_6 += [ "-1" , arg_1 [ 0 ] , "-2" , arg_1 [ 1 ] ] logger . debug ( "Running metaSPAdes subprocess with command: {}" . format ( arg_6 ) ) arg_8 = subprocess . Popen ( arg_6 , arg_9 = PIPE , arg_10 = PIPE ) arg_9 , arg_10 = arg_8 . communicate ( ) try : arg_10 = arg_10 . decode ( "utf8" ) arg_9 = arg_9 . decode ( "utf8" ) except ( UnicodeDecodeError , AttributeError ) : arg_10 = str ( arg_10 ) arg_9 = str ( arg_9 ) logger . info ( "Finished metaSPAdes subprocess with STDOUT:\\n" "======================================\\n{}" . format ( arg_9 ) ) logger . info ( "Fished metaSPAdes subprocesswith STDERR:\\n" "======================================\\n{}" . format ( arg_10 ) ) logger . info ( "Finished metaSPAdes with return code: {}" . format ( arg_8 . returncode ) ) with open ( ".status" , "w" ) as fh : if arg_8 . returncode != 0 : fh . write ( "error" ) return else : fh . write ( "pass" ) if "_trim." in arg_1 [ 0 ] : arg_0 += "_trim" arg_11 = "{}_metaspades.fasta" . format ( arg_0 ) os . rename ( "contigs.fasta" , arg_11 ) logger . info ( "Setting Func assembly file to: {}" . format ( arg_11 ) ) if arg_4 == "true" and os . path . exists ( arg_11 ) : clean_up ( arg_1 )

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


Question: Merge to_merge into the given main list .

def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_3 = [ ] if arg_2 : for arg_4 , arg_5 in enumerate ( arg_1 ) : try : if isinstance ( arg_5 , dict ) and isinstance ( arg_0 . main_list [ arg_4 ] , dict ) : arg_3 . append ( Dict ( arg_0 . main_list [ arg_4 ] ) . Func ( arg_5 ) ) elif isinstance ( arg_5 , list ) and isinstance ( arg_0 . main_list [ arg_4 ] , list ) : arg_3 . append ( List ( arg_0 . main_list [ arg_4 ] ) . Func ( arg_5 ) ) else : arg_3 . append ( arg_5 ) except IndexError : arg_3 . append ( arg_5 ) else : arg_3 = arg_0 . main_list for arg_5 in arg_1 : if arg_5 not in arg_3 : arg_3 . append ( arg_5 ) return arg_3

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


Question: Validate that the annotation has the correct namespace and is well - formed .

def Func ( arg_0 , arg_1 ) : arg_0 = convert ( arg_0 , arg_1 ) arg_0 . validate ( strict = True ) return arg_0


Question: Verify if the realms match the requested realms .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : log . debug ( 'Verify realms %r' , arg_2 ) arg_4 = arg_3 . request_token or arg_0 . _grantgetter ( arg_1 = arg_1 ) if not arg_4 : return False arg_3 . request_token = arg_4 if not hasattr ( arg_4 , 'realms' ) : return True return set ( arg_4 . realms ) == set ( arg_2 )


Question: Releases renderer resources associated with this image .

def Func ( arg_0 ) : if arg_0 . _handle != - 1 : lib . UnloadImage ( arg_0 . _handle ) arg_0 . _handle = - 1


Question: Returns the variable expressions of this constraint set

def Func ( arg_0 ) : Func = GetDeclarations ( ) for arg_2 in arg_0 . constraints : try : Func . visit ( arg_2 ) except RuntimeError : if sys . getrecursionlimit ( ) >= PickleSerializer . MAX_RECURSION : raise Exception ( f'declarations recursion limit surpassed {PickleSerializer.MAX_RECURSION}, aborting' ) arg_3 = sys . getrecursionlimit ( ) + PickleSerializer . DEFAULT_RECURSION if arg_3 <= PickleSerializer . DEFAULT_RECURSION : sys . setrecursionlimit ( arg_3 ) return arg_0 . declarations return Func . result

Clean up stats file, if configured to do so.


Question: copy - Copies this object .

def Func ( arg_0 , arg_1 = False , arg_2 = False ) : arg_3 = arg_0 . __class__ ( ** arg_0 . asDict ( arg_1 , forStorage = False ) ) if arg_2 is True : for arg_4 in arg_3 . FIELDS : setattr ( arg_3 , arg_4 , Func . deepFunc ( getattr ( arg_3 , arg_4 ) ) ) return arg_3


Question: Builds an instance of model from the model_dict .

def Func ( arg_0 , arg_1 ) : for arg_2 in arg_1 : arg_3 = arg_0 . _meta . get_field ( arg_2 ) arg_1 [ arg_2 ] = arg_3 . to_python ( arg_1 [ arg_2 ] ) return arg_0 ( ** arg_1 )

Return the RSSI signal strength in decibels.


Question: Returns the signature for the given value

def Func ( arg_0 , arg_1 ) : arg_1 = want_bytes ( arg_1 ) arg_2 = arg_0 . derive_key ( ) arg_3 = arg_0 . algorithm . Func ( arg_2 , arg_1 ) return base64_encode ( arg_3 )

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


Question: Set parsername as the current parser and apply it .

def Func ( arg_0 , arg_1 ) : arg_0 . __parser = arg_0 . parsers [ arg_1 ] arg_0 . __parser ( )


Question: Add a builtin and save the original .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = __builtin__ . __dict__ arg_4 = arg_3 . get ( arg_1 , BuiltinUndefined ) if arg_2 is HideBuiltin : if arg_4 is not BuiltinUndefined : arg_0 . _orig_builtins [ arg_1 ] = arg_4 del arg_3 [ arg_1 ] else : arg_0 . _orig_builtins [ arg_1 ] = arg_4 arg_3 [ arg_1 ] = arg_2

This runs the pyeebls.eebls function using the given inputs.

    Parameters
    ----------

    times,mags : np.array
        The input magnitude time-series to search for transits.

    nfreq : int
        The number of frequencies to use when searching for transits.

    freqmin : float
        The minimum frequency of the period-search -> max period that will be
        used for the search.

    stepsize : float
        The step-size in frequency to use to generate a frequency-grid.

    nbins : int
        The number of phase bins to use.

    minduration : float
        The minimum fractional transit duration that will be considered.

    maxduration : float
        The maximum fractional transit duration that will be considered.

    Returns
    -------

    dict
        Returns a dict of the form::

            {
                'power':           the periodogram power array,
                'bestperiod':      the best period found,
                'bestpower':       the highest peak of the periodogram power,
                'transdepth':      transit depth found by eebls.f,
                'transduration':   transit duration found by eebls.f,
                'transingressbin': transit ingress bin found by eebls.f,
                'transegressbin':  transit egress bin found by eebls.f,
            }


Question: Get a random mutator for the given type

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 == unicode : arg_2 = str arg_1 = str ( arg_1 ) return arg_0 . _get_random ( arg_2 ) ( arg_1 )

Wait for the termination of a process and log its stdout & stderr


Question: merges each run of successive text events into one text event

def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in arg_0 : if arg_2 [ 'type' ] == TEXT : arg_1 . append ( arg_2 [ 'text' ] ) else : if arg_1 : yield { 'type' : TEXT , 'text' : '' . join ( arg_1 ) } arg_1 . clear ( ) yield arg_2 if arg_1 : yield { 'type' : TEXT , 'text' : '' . join ( arg_1 ) }

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


Question: Extract the extension from the given line .

def Func ( arg_0 , arg_1 ) : arg_1 = arg_1 . strip ( ) if not arg_1 . startswith ( "//" ) and "." in arg_1 : arg_1 = arg_1 . encode ( "idna" ) . decode ( "utf-8" ) if arg_1 . startswith ( "*." ) : arg_1 = arg_1 [ 2 : ] arg_2 = arg_1 . split ( "." ) [ - 1 ] if arg_2 in arg_0 . public_suffix_db : arg_0 . public_suffix_db [ arg_2 ] = List ( arg_0 . public_suffix_db [ arg_2 ] + [ arg_1 ] ) . format ( ) else : arg_0 . public_suffix_db . update ( { arg_2 : [ arg_1 ] } )

Runtime batch shape of models represented by this component.

    Returns:
      batch_shape: `int` `Tensor` giving the broadcast batch shape of
        all model parameters. This should match the batch shape of
        derived state space models, i.e.,
        `self.make_state_space_model(...).batch_shape_tensor()`.


Question: Updates the label the description and enables or disables the geo - replication status for a storage account in Windows Azure .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = 'Standard_GRS' ) : _validate_not_none ( 'service_name' , arg_1 ) if arg_4 == False : arg_6 = 'Standard_LRS' return arg_0 . _perform_put ( arg_0 . _get_storage_service_path ( arg_1 ) , _XmlSerializer . update_storage_service_input_to_xml ( arg_2 , arg_3 , arg_6 , arg_5 ) )


Question: Copy all csvs in nested directroy to single directory .

def Func ( arg_0 , arg_1 = '.csv' , arg_2 = None ) : if arg_2 is None : arg_2 = './' + re . search ( '^\.(.*)' , arg_1 ) . groups ( 0 ) [ 0 ] if not os . path . isdir ( arg_2 ) : os . mkdir ( arg_2 ) for arg_3 , arg_4 , arg_5 in os . walk ( arg_0 ) : for arg_6 in arg_5 : if arg_1 in arg_6 : shutil . copy ( arg_3 + '/' + arg_6 , arg_2 + '/' + arg_6 ) return

Given the request and response headers, return `True` if an HTTP
        "Not Modified" response could be returned instead.


Question: Parse the configuration and generate the Config object .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : from IPython . config . configurable import Configurable arg_0 . clear ( ) if arg_1 is None : arg_1 = arg_0 . argv if arg_2 is None : arg_2 = arg_0 . aliases if arg_3 is None : arg_3 = arg_0 . flags arg_4 = arg_0 . _decode_argv ( arg_1 ) for arg_5 , arg_6 in enumerate ( arg_4 ) : arg_7 = arg_6 . lstrip ( '-' ) if arg_6 == '--' : arg_0 . extra_args . extend ( arg_4 [ arg_5 + 1 : ] ) break if kv_pattern . match ( arg_6 ) : arg_8 , arg_9 = arg_7 . split ( '=' , 1 ) if arg_8 in arg_2 : arg_8 = arg_2 [ arg_8 ] if '.' not in arg_8 : warn . warn ( "Unrecognized alias: '%s', it will probably have no effect." % arg_8 ) try : arg_0 . _exec_config_str ( arg_8 , arg_9 ) except Exception : raise ArgumentError ( "Invalid argument: '%s'" % arg_6 ) elif flag_pattern . match ( arg_6 ) : if arg_7 in arg_3 : arg_10 , arg_11 = arg_3 [ arg_7 ] arg_0 . _load_flag ( arg_10 ) else : raise ArgumentError ( "Unrecognized flag: '%s'" % arg_6 ) elif arg_6 . startswith ( '-' ) : arg_12 = '--' + arg_7 if kv_pattern . match ( arg_12 ) : raise ArgumentError ( "Invalid argument: '%s', did you mean '%s'?" % ( arg_6 , arg_12 ) ) else : raise ArgumentError ( "Invalid argument: '%s'" % arg_6 ) else : arg_0 . extra_args . append ( arg_7 ) return arg_0 . config

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: Action on renewing on RENEWING state .

def Func ( arg_0 ) : arg_0 . client . lease . sanitize_net_values ( ) arg_0 . client . lease . set_times ( arg_0 . time_sent_request ) arg_0 . set_timers ( )

Returns the filename of the appropriate sakefile


Question: Creates an Amazon S3 bucket .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = arg_0 . get_conn ( ) if not arg_2 : arg_2 = arg_3 . meta . region_name if arg_2 == 'us-east-1' : arg_0 . get_conn ( ) . Func ( Bucket = arg_1 ) else : arg_0 . get_conn ( ) . Func ( Bucket = arg_1 , CreateBucketConfiguration = { 'LocationConstraint' : arg_2 } )

This is a parallel worker for running period-recovery.

    Parameters
    ----------

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

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

    Returns
    -------

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


Question: Creates additional_properties parameter based on language_hints web_detection_params and additional_properties parameters specified by the user

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 is None and arg_2 is None : return arg_0 if arg_0 is None : return { } arg_3 = deepcopy ( arg_0 ) if 'image_context' not in arg_3 : arg_3 [ 'image_context' ] = { } arg_3 [ 'image_context' ] [ 'language_hints' ] = arg_3 [ 'image_context' ] . get ( 'language_hints' , arg_1 ) arg_3 [ 'image_context' ] [ 'web_detection_params' ] = arg_3 [ 'image_context' ] . get ( 'web_detection_params' , arg_2 ) return arg_3

If n2 is a perfect square, return its square root, else raise error.


Question: Find the best segmentation of the string of characters given the UnigramTextModel P .

def Func ( arg_0 , arg_1 ) : arg_2 = len ( arg_0 ) arg_3 = [ '' ] + list ( arg_0 ) arg_4 = [ 1.0 ] + [ 0.0 ] * arg_2 for arg_5 in range ( arg_2 + 1 ) : for arg_6 in range ( 0 , arg_5 ) : arg_7 = arg_0 [ arg_6 : arg_5 ] if arg_1 [ arg_7 ] * arg_4 [ arg_5 - len ( arg_7 ) ] >= arg_4 [ arg_5 ] : arg_4 [ arg_5 ] = arg_1 [ arg_7 ] * arg_4 [ arg_5 - len ( arg_7 ) ] arg_3 [ arg_5 ] = arg_7 arg_8 = [ ] arg_5 = len ( arg_3 ) - 1 while arg_5 > 0 : arg_8 [ 0 : 0 ] = [ arg_3 [ arg_5 ] ] arg_5 = arg_5 - len ( arg_3 [ arg_5 ] ) return arg_8 , arg_4 [ - 1 ]

Duplicate a layer.

    New layer label is '*_copy'.

    Args:
        script: the mlx.FilterScript object or script filename to write
            the filter to.
        layer_num (int): layer number to duplicate. Default is the
            current layer. Not supported on the file base API.

    Layer stack:
        Creates a new layer
        Changes current layer to the new layer

    MeshLab versions:
        2016.12
        1.3.4BETA


Question: Print the status of newly finished jobs .

def Func ( arg_0 ) : arg_0 . _update_status ( ) arg_1 = arg_0 . _group_report ( arg_0 . _comp_report , 'Completed' ) arg_2 = arg_0 . _group_report ( arg_0 . _dead_report , 'Dead, call jobs.traceback() for details' ) arg_0 . _comp_report [ : ] = [ ] arg_0 . _dead_report [ : ] = [ ] return arg_1 or arg_2