Question: Index the text of a document .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_1 [ : arg_1 . index ( '\n' ) ] . strip ( ) arg_4 = words ( arg_1 ) arg_5 = len ( arg_0 . documents ) arg_0 . documents . append ( Document ( arg_3 , arg_2 , len ( arg_4 ) ) ) for arg_6 in arg_4 : if arg_6 not in arg_0 . stopwords : arg_0 . index [ arg_6 ] [ arg_5 ] += 1


Question: REST Conference RecordStop

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


Question: Indicate that a formerly enqueued task is complete .

def Func ( arg_0 ) : arg_0 . all_tasks_done . acquire ( ) try : arg_1 = arg_0 . unfinished_tasks - 1 if arg_1 <= 0 : if arg_1 < 0 : raise ValueError ( 'Func() called too many times' ) arg_0 . all_tasks_done . notify_all ( ) arg_0 . unfinished_tasks = arg_1 finally : arg_0 . all_tasks_done . release ( )


Question: Start LanguageBoard web application

def Func ( arg_0 , arg_1 = 62000 ) : from http . Funcr import HTTPServer , CGIHTTPRequestHandler os . chdir ( arg_0 . log_folder ) arg_2 = HTTPServer ( ( '' , arg_1 ) , CGIHTTPRequestHandler ) print ( "Starting LanguageBoard on port: " + str ( arg_2 . Funcr_port ) ) webbrowser . open ( 'http://0.0.0.0:{}' . format ( arg_1 ) ) arg_2 . Func_forever ( )

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.

        :param dataset_id: the dataset to upsert the table into.
        :type dataset_id: str
        :param table_resource: a table resource. see
            https://cloud.google.com/bigquery/docs/reference/v2/tables#resource
        :type table_resource: dict
        :param project_id: the project to upsert the table into.  If None,
            project will be self.project_id.
        :return:


Question: Write text at x y top left corner position .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = ( 255 , 255 , 255 ) , arg_4 = 12 , arg_5 = False , arg_6 = False ) : def antialias_value ( arg_7 , arg_8 ) : return int ( round ( arg_7 * arg_8 ) ) def antialias_rgb ( arg_3 , arg_8 ) : return tuple ( [ antialias_value ( arg_9 , arg_8 ) for arg_9 in arg_3 ] ) def set_color ( arg_10 , arg_11 , arg_3 ) : try : arg_0 [ arg_11 , arg_10 ] = arg_3 except IndexError : pass arg_12 , arg_13 = arg_2 arg_14 = PIL . ImageFont . truetype ( DEFAULT_FONT_PATH , arg_4 = arg_4 ) arg_15 = arg_14 . getmask ( arg_1 ) arg_16 , arg_17 = arg_15 . size if arg_6 : arg_13 = arg_13 - ( arg_16 // 2 ) arg_12 = arg_12 - ( arg_17 // 2 ) for arg_18 in range ( arg_17 ) : for arg_19 in range ( arg_16 ) : arg_8 = arg_15 [ arg_18 * arg_16 + arg_19 ] / 255. if arg_5 : if arg_8 != 0 : arg_20 = antialias_rgb ( arg_3 , arg_8 ) set_color ( arg_13 + arg_19 , arg_12 + arg_18 , arg_20 ) else : if arg_8 > .5 : set_color ( arg_13 + arg_19 , arg_12 + arg_18 , arg_3 )


Question: r Return the cosine similarity of two strings .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 2 ) : if arg_1 == arg_2 : return 1.0 if not arg_1 or not arg_2 : return 0.0 arg_4 , arg_5 = arg_0 . _get_qgrams ( arg_1 , arg_2 , arg_3 ) arg_6 = sum ( arg_4 . values ( ) ) arg_7 = sum ( arg_5 . values ( ) ) arg_8 = sum ( ( arg_4 & arg_5 ) . values ( ) ) return arg_8 / sqrt ( arg_6 * arg_7 )

This method is called before first step of simulation.


Question: Returns main ledger file path or raise exception if it cannot be \ found .

def Func ( arg_0 = None ) : if arg_0 is None : arg_0 = os . path . abspath ( os . path . expanduser ( "~/.ledgerrc" ) ) if "LEDGER_FILE" in os . environ : return os . path . abspath ( os . path . expanduser ( os . environ [ "LEDGER_FILE" ] ) ) elif os . path . exists ( arg_0 ) : arg_1 = open ( arg_0 ) for arg_2 in arg_1 . readlines ( ) : arg_3 = re . match ( r"--file\s+([^\s]+).*" , arg_2 ) if arg_3 is not None : return os . path . abspath ( os . path . expanduser ( arg_3 . group ( 1 ) ) ) else : return None

Update the profile picture for the current user.

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


Question: Return record n as 1 024 bytes ; records are indexed from 1 .

def Func ( arg_0 , arg_1 ) : arg_0 . file . seek ( arg_1 * K - K ) return arg_0 . file . read ( K )

Return True if we should retry. False otherwise.

  Args:
    exception: An exception to test for transience.

  Returns:
    True if we should retry. False otherwise.


Question: Evaluate a URL as a possible download and maybe retrieve it

def Func ( arg_0 , arg_1 , arg_2 = False ) : if arg_1 in arg_0 . scanned_urls and not arg_2 : return arg_0 . scanned_urls [ arg_1 ] = True if not URL_SCHEME ( arg_1 ) : arg_0 . process_filename ( arg_1 ) return else : arg_4 = list ( distros_for_url ( arg_1 ) ) if arg_4 : if not arg_0 . url_ok ( arg_1 ) : return arg_0 . debug ( "Found link: %s" , arg_1 ) if arg_4 or not arg_2 or arg_1 in arg_0 . fetched_urls : list ( map ( arg_0 . add , arg_4 ) ) return if not arg_0 . url_ok ( arg_1 ) : arg_0 . fetched_urls [ arg_1 ] = True return arg_0 . info ( "Reading %s" , arg_1 ) arg_0 . fetched_urls [ arg_1 ] = True arg_6 = arg_0 . open_url ( arg_1 , "Download error on %s: %%s -- Some packages may not be found!" % arg_1 ) if arg_6 is None : return arg_0 . fetched_urls [ arg_6 . url ] = True if 'html' not in arg_6 . headers . get ( 'content-type' , '' ) . lower ( ) : arg_6 . close ( ) return arg_7 = arg_6 . url arg_8 = arg_6 . read ( ) if not isinstance ( arg_8 , str ) : if isinstance ( arg_6 , HTTPError ) : arg_9 = 'latin-1' else : arg_9 = arg_6 . headers . get_param ( 'charset' ) or 'latin-1' arg_8 = arg_8 . decode ( arg_9 , "ignore" ) arg_6 . close ( ) for arg_10 in HREF . finditer ( arg_8 ) : arg_11 = urljoin ( arg_7 , htmldecode ( arg_10 . group ( 1 ) ) ) arg_0 . Func ( arg_11 ) if arg_1 . startswith ( arg_0 . index_url ) and getattr ( arg_6 , 'code' , None ) != 404 : arg_8 = arg_0 . process_index ( arg_1 , arg_8 )

Set the rotation of this body using a rotation matrix.

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


Question: Dump a single grid to its ZINC representation .

def Func ( arg_0 ) : arg_1 = 'ver:%s' % dump_str ( str ( arg_0 . _version ) , version = arg_0 . _version ) if bool ( arg_0 . metadata ) : arg_1 += ' ' + dump_meta ( arg_0 . metadata , version = arg_0 . _version ) arg_2 = dump_columns ( arg_0 . column , version = arg_0 . _version ) arg_3 = dump_rows ( arg_0 ) return '\n' . join ( [ arg_1 , arg_2 ] + arg_3 + [ '' ] )

scan through the java output text and extract the bad java messages that may or may not happened when
    unit tests are run.  It will not record any bad java messages that are stored in g_ok_java_messages.

    :return: none


Question: Grows the histogram to have rows rows and cols columns . Must not have been initialized before or already have the same number of columns . If rows is smaller than the current number of rows does not shrink . Also updates the sizes of the row and column sums .

def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_0 . hist_ : arg_0 . hist_ = SparseMatrix ( arg_1 , arg_2 ) arg_0 . rowSums_ = numpy . zeros ( arg_1 , dtype = dtype ) arg_0 . colSums_ = numpy . zeros ( arg_2 , dtype = dtype ) arg_0 . hack_ = None else : arg_7 = arg_0 . hist_ . nRows ( ) arg_8 = arg_0 . hist_ . nCols ( ) arg_9 = max ( arg_7 , arg_1 ) arg_10 = max ( arg_8 , arg_2 ) if ( arg_7 < arg_9 ) or ( arg_8 < arg_10 ) : arg_0 . hist_ . resize ( arg_9 , arg_10 ) if arg_7 < arg_9 : arg_11 = arg_0 . rowSums_ arg_0 . rowSums_ = numpy . zeros ( arg_9 , dtype = dtype ) arg_0 . rowSums_ [ 0 : arg_12 ( arg_11 ) ] = arg_11 arg_0 . hack_ = None if arg_8 < arg_10 : arg_11 = arg_0 . colSums_ arg_0 . colSums_ = numpy . zeros ( arg_10 , dtype = dtype ) arg_0 . colSums_ [ 0 : arg_12 ( arg_11 ) ] = arg_11 arg_0 . hack_ = None


Question: Delete a record and it s persistent identifiers .

def Func ( arg_0 , arg_1 ) : arg_1 . delete ( ) PersistentIdentifier . query . filter_by ( object_type = 'rec' , object_uuid = arg_1 . id , ) . update ( { PersistentIdentifier . status : PIDStatus . DELETED } ) arg_0 . delete_buckets ( arg_1 ) db . session . commit ( )

Prepare the actors, the world, and the messaging system to begin
        playing the game.

        This method is guaranteed to be called exactly once upon entering the
        game stage.


Question: capnp deserialization method for the anomaly likelihood object

def Func ( arg_0 , arg_1 ) : arg_2 = object . __new__ ( arg_0 ) arg_2 . _iteration = arg_1 . iteration arg_2 . _historicalScores = collections . deque ( maxlen = arg_1 . historicWindowSize ) for arg_5 , arg_6 in enumerate ( arg_1 . historicalScores ) : arg_2 . _historicalScores . append ( ( arg_5 , arg_6 . value , arg_6 . anomalyScore ) ) if arg_1 . distribution . name : arg_2 . _distribution = dict ( ) arg_2 . _distribution [ 'distribution' ] = dict ( ) arg_2 . _distribution [ 'distribution' ] [ "name" ] = arg_1 . distribution . name arg_2 . _distribution [ 'distribution' ] [ "mean" ] = arg_1 . distribution . mean arg_2 . _distribution [ 'distribution' ] [ "variance" ] = arg_1 . distribution . variance arg_2 . _distribution [ 'distribution' ] [ "stdev" ] = arg_1 . distribution . stdev arg_2 . _distribution [ "movingAverage" ] = { } arg_2 . _distribution [ "movingAverage" ] [ "windowSize" ] = arg_1 . distribution . movingAverage . windowSize arg_2 . _distribution [ "movingAverage" ] [ "historicalValues" ] = [ ] for arg_8 in arg_1 . distribution . movingAverage . historicalValues : arg_2 . _distribution [ "movingAverage" ] [ "historicalValues" ] . append ( arg_8 ) arg_2 . _distribution [ "movingAverage" ] [ "total" ] = arg_1 . distribution . movingAverage . total arg_2 . _distribution [ "historicalLikelihoods" ] = [ ] for arg_9 in arg_1 . distribution . historicalLikelihoods : arg_2 . _distribution [ "historicalLikelihoods" ] . append ( arg_9 ) else : arg_2 . _distribution = None arg_2 . _probationaryPeriod = arg_1 . probationaryPeriod arg_2 . _learningPeriod = arg_1 . learningPeriod arg_2 . _reestimationPeriod = arg_1 . reestimationPeriod return arg_2

Whether a connection can be established between those two meshes.


Question: Gets the cell with the smallest number of segments . Break ties randomly .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = [ ] arg_5 = float ( "inf" ) for arg_6 in arg_2 : arg_7 = arg_3 . numSegments ( arg_6 ) if arg_7 < arg_5 : arg_5 = arg_7 arg_4 = [ ] if arg_7 == arg_5 : arg_4 . append ( arg_6 ) arg_8 = arg_1 . getUInt32 ( len ( arg_4 ) ) return arg_4 [ arg_8 ]


Question: Perform configuration which is common to root and non - root loggers .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : arg_4 = arg_2 . get ( 'level' , None ) if arg_4 is not None : arg_1 . setLevel ( _checkLevel ( arg_4 ) ) if not arg_3 : for arg_5 in arg_1 . handlers [ : ] : arg_1 . removeHandler ( arg_5 ) arg_6 = arg_2 . get ( 'handlers' , None ) if arg_6 : arg_0 . add_handlers ( arg_1 , arg_6 ) arg_7 = arg_2 . get ( 'filters' , None ) if arg_7 : arg_0 . add_filters ( arg_1 , arg_7 )


Question: Initialize all ephemerals used by derived classes .

def Func ( arg_0 ) : if hasattr ( arg_0 , '_sfdr' ) and arg_0 . _sfdr : arg_0 . _spatialPoolerOutput = numpy . zeros ( arg_0 . columnCount , dtype = GetNTAReal ( ) ) else : arg_0 . _spatialPoolerOutput = None arg_0 . _fpLogSPInput = None arg_0 . _fpLogSP = None arg_0 . _fpLogSPDense = None arg_0 . logPathInput = "" arg_0 . logPathOutput = "" arg_0 . logPathOutputDense = ""

Modal dialog asking for an input, returns string or None if cancelled


Question: This method will iterate over all process in the pipeline and populate the nextflow configuration files with the directives of each process in the pipeline .

def Func ( arg_0 ) : logger . debug ( "======================" ) logger . debug ( "Setting configurations" ) logger . debug ( "======================" ) arg_1 = "" arg_2 = "" arg_3 = "" arg_4 = "" if arg_0 . merge_params : arg_3 += arg_0 . _get_merged_params_string ( ) arg_5 = arg_0 . _get_merged_params_help ( ) else : arg_3 += arg_0 . _get_params_string ( ) arg_5 = arg_0 . _get_params_help ( ) for arg_6 in arg_0 . processes : if not arg_6 . directives : continue logger . debug ( "[{}] Adding directives: {}" . format ( arg_6 . template , arg_6 . directives ) ) arg_1 += arg_0 . _get_resources_string ( arg_6 . directives , arg_6 . pid ) arg_2 += arg_0 . _get_container_string ( arg_6 . directives , arg_6 . pid ) arg_4 = arg_0 . _get_manifest_string ( ) arg_0 . resources = arg_0 . _render_config ( "resources.config" , { "process_info" : arg_1 } ) arg_0 . containers = arg_0 . _render_config ( "containers.config" , { "container_info" : arg_2 } ) arg_0 . params = arg_0 . _render_config ( "params.config" , { "params_info" : arg_3 } ) arg_0 . manifest = arg_0 . _render_config ( "manifest.config" , { "manifest_info" : arg_4 } ) arg_0 . help = arg_0 . _render_config ( "Helper.groovy" , { "nf_file" : basename ( arg_0 . nf_file ) , "help_list" : arg_5 , "version" : __version__ , "pipeline_name" : " " . join ( [ x . upper ( ) for x in arg_0 . pipeline_name ] ) } ) arg_0 . user_config = arg_0 . _render_config ( "user.config" , { } )

Returns a randomly generated permanence value for a synapses that is
    initialized in a connected state. The basic idea here is to initialize
    permanence values very close to synPermConnected so that a small number of
    learning steps could make it disconnected or connected.

    Note: experimentation was done a long time ago on the best way to initialize
    permanence values, but the history for this particular scheme has been lost.


Question: Fix the value of a variable and remove it from the constraint .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . variables try : arg_4 = arg_3 . index ( arg_1 ) except ValueError : raise ValueError ( "given variable {} is not part of the constraint" . format ( arg_1 ) ) if arg_2 not in arg_0 . vartype . value : raise ValueError ( "expected value to be in {}, received {} instead" . format ( arg_0 . vartype . value , arg_2 ) ) arg_5 = frozenset ( config [ : arg_4 ] + config [ arg_4 + 1 : ] for config in arg_0 . configurations if config [ arg_4 ] == arg_2 ) if not arg_5 : raise UnsatError ( "fixing {} to {} makes this constraint unsatisfiable" . format ( arg_1 , arg_2 ) ) arg_3 = arg_3 [ : arg_4 ] + arg_3 [ arg_4 + 1 : ] arg_0 . configurations = arg_5 arg_0 . variables = arg_3 def arg_7 ( * arg_6 ) : return arg_6 in arg_5 arg_0 . func = arg_7 arg_0 . name = '{} ({} fixed to {})' . format ( arg_0 . name , arg_1 , arg_2 )

Register a file reader for use in parse_config_file.

  Registered file readers will be used to try reading files passed to
  `parse_config_file`. All file readers (beginning with the default `open`) will
  be tried until one of them succeeds at opening the file.

  This function may also be be used used as a decorator. For example:

      @register_file_reader(IOError)
      def exotic_data_source(filename):
        ...

  Args:
    *args: (When used as a decorator, only the existence check is supplied.)
      - file_reader_fn: The file reader function to register. This should be a
        function that can be used as a context manager to open a file and
        provide a file-like object, similar to Python's built-in `open`.
      - is_readable_fn: A function taking the file path and returning a boolean
        indicating whether the file can be read by `file_reader_fn`.

  Returns:
    `None`, or when used as a decorator, a function that will perform the
    registration using the supplied readability predicate.


Question: Run DDP greenlets .

def Func ( arg_0 ) : arg_0 . logger . debug ( 'PostgresGreenlet Func' ) arg_0 . start ( ) arg_0 . _stop_event . wait ( ) gevent . joinall ( arg_0 . threads + [ DDPLauncher . pgworker ] ) arg_0 . threads = [ ]

Convert this unnormalized batch to an instance of Batch.

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

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

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


Question: Load repository from a directory path and update the current instance . First new repository still will be loaded . If failed then old style repository load will be tried .

def Func ( arg_0 , arg_1 , arg_2 = True , arg_3 = 3 ) : assert isinstance ( arg_3 , int ) , "ntrials must be integer" assert arg_3 > 0 , "ntrials must be >0" arg_4 = None for arg_5 in range ( arg_3 ) : try : arg_0 . __Func ( arg_1 = arg_1 , arg_2 = True ) except Exception as err1 : try : from . OldRepository import Repository arg_6 = Repository ( arg_1 ) except Exception as err2 : arg_7 = "Unable to load repository using neiher new style (%s) nor old style (%s)" % ( err1 , err2 ) if arg_0 . DEBUG_PRINT_FAILED_TRIALS : print ( "Trial %i failed in Repository.%s (%s). Set Repository.DEBUG_PRINT_FAILED_TRIALS to False to mute" % ( arg_5 , inspect . stack ( ) [ 1 ] [ 3 ] , str ( arg_7 ) ) ) else : arg_7 = None arg_4 = arg_6 break else : arg_7 = None arg_4 = arg_0 break assert arg_7 is None , arg_7 return arg_4


Question: Process a single DDP message .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . get ( 'id' , None ) try : arg_3 = arg_1 . pop ( 'msg' ) except KeyError : arg_0 . reply ( 'error' , reason = 'Bad request' , offendingMessage = arg_1 , ) return try : arg_0 . dispatch ( arg_3 , arg_1 ) except Exception as err : arg_4 = { 'msg' : { 'method' : 'result' } . get ( arg_3 , 'error' ) , } if arg_2 is not None : arg_4 [ 'id' ] = arg_2 if isinstance ( err , MeteorError ) : arg_5 = err . as_dict ( ) else : arg_5 = { 'error' : 500 , 'reason' : 'Internal server error' , } if arg_4 [ 'msg' ] == 'error' : arg_4 . update ( arg_5 ) else : arg_4 [ 'error' ] = arg_5 if not isinstance ( err , MeteorError ) : arg_6 , arg_7 = safe_call ( arg_0 . logger . error , '%r %r' , arg_3 , arg_1 , exc_info = 1 , ) if arg_6 is not None : traceback . print_exc ( file = sys . stderr ) sys . stderr . write ( 'Additionally, while handling the above error the ' 'following error was encountered:\n' ) sys . stderr . write ( arg_6 ) elif settings . DEBUG : print ( 'ERROR: %s' % err ) dprint ( 'msg' , arg_3 ) dprint ( 'data' , arg_1 ) arg_5 . setdefault ( 'details' , traceback . format_exc ( ) ) print ( arg_5 [ 'details' ] ) arg_0 . reply ( ** arg_4 ) if arg_2 and arg_3 == 'method' : arg_0 . reply ( 'updated' , methods = [ arg_2 ] )

Gets the CRC32c checksum of an object in Google Cloud Storage.

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


Question: Downsample the signal by an integer factor . Only the first out of each factor samples is retained the others are discarded .

def Func ( arg_0 , arg_1 = 2 ) : if not isinstance ( arg_1 , int ) or arg_1 < 1 : raise ValueError ( 'factor must be a positive integer.' ) arg_2 = [ 'Func' , '{}' . format ( arg_1 ) ] arg_0 . effects . extend ( arg_2 ) arg_0 . effects_log . append ( 'Func' ) return arg_0


Question: Yield line numbers of unused variables .

def Func ( arg_0 ) : for arg_1 in arg_0 : if isinstance ( arg_1 , pyflakes . messages . UnusedVariable ) : yield arg_1 . lineno

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

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


Question: Subscribe to the passed pair s OHLC data channel .

def Func ( arg_0 , arg_1 , arg_2 = None , ** arg_3 ) : arg_4 = [ '1m' , '5m' , '15m' , '30m' , '1h' , '3h' , '6h' , '12h' , '1D' , '7D' , '14D' , '1M' ] if arg_2 : if arg_2 not in arg_4 : raise ValueError ( "timeframe must be any of %s" % arg_4 ) else : arg_2 = '1m' arg_5 = ( 'candles' , arg_1 , arg_2 ) arg_1 = 't' + arg_1 if not arg_1 . startswith ( 't' ) else arg_1 arg_6 = 'trade:' + arg_2 + ':' + arg_1 arg_0 . _subscribe ( 'candles' , arg_5 , arg_6 = arg_6 , ** arg_3 )

canonical cluster statistics for a single run and a single probability

    Parameters
    ----------

    microcanonical_statistics : ndarray
        Return value of `bond_microcanonical_statistics`

    convolution_factors : 1-D array_like
        The coefficients of the convolution for the given probabilty ``p``
        and for each occupation number ``n``.

    Returns
    -------
    ret : ndarray of size ``1``
        Structured array with dtype as returned by
        `canonical_statistics_dtype`

    ret['percolation_probability'] : ndarray of float
        The "percolation probability" of this run at the value of ``p``.
        Only exists if `microcanonical_statistics` argument has the
        ``has_spanning_cluster`` field.

    ret['max_cluster_size'] : ndarray of int
        Weighted size of the largest cluster (absolute number of sites)

    ret['moments'] : 1-D :py:class:`numpy.ndarray` of float
        Array of size ``5``.
        The ``k``-th entry is the weighted ``k``-th raw moment of the
        (absolute) cluster size distribution, with ``k`` ranging from ``0`` to
        ``4``.

    See Also
    --------

    bond_microcanonical_statistics
    canonical_statistics_dtype


Question: Get a list of all msg_ids in our DB records

def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_3 = arg_0 . db . Func ( ) except Exception as e : arg_4 = error . wrap_exception ( ) else : arg_4 = dict ( status = 'ok' , history = arg_3 ) arg_0 . session . send ( arg_0 . query , "history_reply" , arg_4 = arg_4 , parent = arg_2 , ident = arg_1 )

Return the appropriate URL prefix to prepend to requests,
        based on the host provided in settings.


Question: Convenience function for accessing tag parameters

def Func ( arg_0 , arg_1 , arg_2 = arg_3 ) : if arg_0 . HasParam ( arg_1 ) : return arg_0 . Func ( arg_1 ) else : if arg_2 == arg_3 : raise KeyError else : return 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: Get the number of mapped and unmapped reads for a sample and update sample . stats

def Func ( arg_0 , arg_1 ) : arg_2 = os . path . join ( arg_0 . dirs . refmapping , arg_1 . name + "-mapped-sorted.bam" ) arg_3 = os . path . join ( arg_0 . dirs . refmapping , arg_1 . name + "-unmapped.bam" ) arg_4 = [ ipyrad . bins . samtools , "flagstat" , arg_3 ] arg_5 = sps . Popen ( arg_4 , stderr = sps . STDOUT , stdout = sps . PIPE ) arg_6 = arg_5 . communicate ( ) [ 0 ] arg_7 = [ ipyrad . bins . samtools , "flagstat" , arg_2 ] arg_8 = sps . Popen ( arg_7 , stderr = sps . STDOUT , stdout = sps . PIPE ) arg_9 = arg_8 . communicate ( ) [ 0 ] if "pair" in arg_0 . paramsdict [ "datatype" ] : arg_1 . stats [ "refseq_unmapped_reads" ] = int ( arg_6 . split ( ) [ 0 ] ) / 2 arg_1 . stats [ "refseq_mapped_reads" ] = int ( arg_9 . split ( ) [ 0 ] ) / 2 else : arg_1 . stats [ "refseq_unmapped_reads" ] = int ( arg_6 . split ( ) [ 0 ] ) arg_1 . stats [ "refseq_mapped_reads" ] = int ( arg_9 . split ( ) [ 0 ] ) sample_cleanup ( arg_0 , arg_1 )

Make a GET request using the session object to a SuccessFactors endpoint for inactive learners.

        Example:
            sap_search_student_url: "/learning/odatav4/searchStudent/v1/Students?
                $filter=criteria/isActive eq False&$select=studentID"

            SAP API response: {
                u'@odata.metadataEtag': u'W/"17090d86-20fa-49c8-8de0-de1d308c8b55"',
                u'value': [
                    {
                        u'studentID': u'admint6',
                    },
                    {
                        u'studentID': u'adminsap1',
                    }
                ]
            }

        Returns: List of inactive learners
        [
            {
                u'studentID': u'admint6'
            },
            {
                u'studentID': u'adminsap1'
            }
        ]


Question: Fetches an entity from the session based on primary key .

def Func ( arg_0 , arg_1 ) : arg_0 . _init ( ) return arg_0 . known . Func ( arg_1 ) or arg_0 . wknown . Func ( arg_1 )


Question: Parses a pipeline string into a list of dictionaries with the connections between processes

def Func ( arg_0 ) : if os . path . exists ( arg_0 ) : logger . debug ( "Found pipeline file: {}" . format ( arg_0 ) ) with open ( arg_0 ) as fh : arg_0 = "" . join ( [ x . strip ( ) for x in fh . readlines ( ) ] ) logger . info ( colored_print ( "Resulting pipeline string:\n" ) ) logger . info ( colored_print ( arg_0 + "\n" ) ) insanity_checks ( arg_0 ) logger . debug ( "Parsing pipeline string: {}" . format ( arg_0 ) ) arg_1 = [ ] arg_2 = 1 arg_3 , arg_4 = add_unique_identifiers ( arg_0 ) arg_5 = arg_3 . count ( FORK_TOKEN ) logger . debug ( "Found {} fork(s)" . format ( arg_5 ) ) if not arg_5 : logger . debug ( "Detected linear pipeline string : {}" . format ( arg_0 ) ) arg_6 = [ "__init__" ] + arg_3 . split ( ) arg_1 . extend ( linear_connection ( arg_6 , arg_2 ) ) arg_1 = remove_unique_identifiers ( arg_4 , arg_1 ) return arg_1 for arg_7 in range ( arg_5 ) : logger . debug ( "Processing fork {} in lane {}" . format ( arg_7 , arg_2 ) ) arg_8 = arg_3 . split ( FORK_TOKEN , arg_7 + 1 ) arg_9 = arg_8 [ - 2 ] . split ( LANE_TOKEN ) [ - 1 ] . split ( ) logger . debug ( "Previous processes string: {}" . format ( arg_8 [ - 2 ] ) ) logger . debug ( "Previous processes list: {}" . format ( arg_9 ) ) arg_10 = get_lanes ( arg_8 [ - 1 ] ) logger . debug ( "Next lanes object: {}" . format ( arg_10 ) ) arg_11 = [ x [ 0 ] for x in arg_10 ] logger . debug ( "The fork sinks into the processes: {}" . format ( arg_11 ) ) if arg_7 == 0 : if not arg_9 : arg_9 = [ "__init__" ] arg_2 = 0 else : arg_9 = [ "__init__" ] + arg_9 arg_1 . extend ( linear_connection ( arg_9 , arg_2 ) ) arg_12 = arg_9 [ - 1 ] logger . debug ( "Fork source is set to: {}" . format ( arg_12 ) ) arg_13 = get_source_lane ( arg_9 , arg_1 ) logger . debug ( "Fork lane is set to: {}" . format ( arg_13 ) ) arg_1 . extend ( fork_connection ( arg_12 , arg_11 , arg_13 , arg_2 ) ) arg_1 . extend ( linear_lane_connection ( arg_10 , arg_2 ) ) arg_2 += len ( arg_11 ) arg_1 = remove_unique_identifiers ( arg_4 , arg_1 ) return arg_1

Read a varint from file, parse it, and return the decoded integer.


Question: Create a new sender link .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _pn_session . sender ( arg_1 ) return arg_0 . request_sender ( arg_2 )


Question: If unstacked convert to stacked . If stacked do nothing .

def Func ( arg_0 ) : if arg_0 . stacked : return arg_0 . _boundaries = bounds = np . r_ [ 0 , np . cumsum ( arg_0 . n_pts ) ] arg_0 . stacked_features = arg_4 = np . vstack ( arg_0 . features ) arg_0 . features = np . array ( [ arg_4 [ bounds [ i - 1 ] : bounds [ i ] ] for i in xrange ( 1 , len ( bounds ) ) ] , dtype = object ) arg_0 . stacked = True


Question: Converts dense Tensor to SparseTensor dropping ignore_value cells .

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : with tf . compat . v1 . name_scope ( arg_2 , 'Func' , [ arg_0 , arg_1 ] ) : arg_0 = tf . convert_to_tensor ( value = arg_0 , arg_2 = 'x' ) if arg_1 is None : if arg_0 . dtype . base_dtype == tf . string : arg_1 = '' else : arg_1 = arg_0 . dtype . as_numpy_dtype ( 0 ) arg_1 = tf . cast ( arg_1 , arg_0 . dtype , arg_2 = 'ignore_value' ) arg_3 = tf . where ( tf . not_equal ( arg_0 , arg_1 ) , arg_2 = 'indices' ) return tf . SparseTensor ( arg_3 = arg_3 , values = tf . gather_nd ( arg_0 , arg_3 , arg_2 = 'values' ) , dense_shape = tf . shape ( input = arg_0 , out_type = tf . int64 , arg_2 = 'dense_shape' ) )

Show Program Landing page for the Enterprise's Program.

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

        Unauthenticated learners will be redirected to enterprise-linked SSO.

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


Question: get the command to start the topology health manager processes

def Func ( arg_0 ) : arg_1 = 'org.apache.heron.healthmgr.HealthManager' arg_2 = [ os . path . join ( arg_0 . heron_java_home , 'bin/java' ) , '-Xmx1024M' , '-XX:+PrintCommandLineFlags' , '-verbosegc' , '-XX:+PrintGCDetails' , '-XX:+PrintGCTimeStamps' , '-XX:+PrintGCDateStamps' , '-XX:+PrintGCCause' , '-XX:+UseGCLogFileRotation' , '-XX:NumberOfGCLogFiles=5' , '-XX:GCLogFileSize=100M' , '-XX:+PrintPromotionFailure' , '-XX:+PrintTenuringDistribution' , '-XX:+PrintHeapAtGC' , '-XX:+HeapDumpOnOutOfMemoryError' , '-XX:+UseConcMarkSweepGC' , '-XX:+PrintCommandLineFlags' , '-Xloggc:log-files/gc.healthmgr.log' , '-Djava.net.preferIPv4Stack=true' , '-cp' , arg_0 . health_manager_classpath , arg_1 , "--cluster" , arg_0 . cluster , "--role" , arg_0 . role , "--environment" , arg_0 . environment , "--topology_name" , arg_0 . topology_name , "--metricsmgr_port" , arg_0 . metrics_manager_port ] return Command ( arg_2 , arg_0 . shell_env )

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


Question: Delete a variable from the various namespaces so that as far as possible we re not keeping any hidden references to it .

def Func ( arg_0 , arg_1 , arg_2 = False ) : if arg_1 in ( '__builtin__' , '__builtins__' ) : raise ValueError ( "Refusing to delete %s" % arg_1 ) arg_3 = arg_0 . all_ns_refs if arg_2 : for arg_4 in arg_3 : try : del arg_4 [ arg_1 ] except KeyError : pass else : try : arg_5 = arg_0 . user_ns [ arg_1 ] except KeyError : raise NameError ( "name '%s' is not defined" % arg_1 ) arg_3 . append ( arg_0 . history_manager . output_hist ) for arg_4 in arg_3 : arg_6 = [ n for n , o in arg_4 . iteritems ( ) if o is arg_5 ] for arg_7 in arg_6 : del arg_4 [ arg_7 ] for arg_7 in ( '_' , '__' , '___' ) : if getattr ( arg_0 . displayhook , arg_7 ) is arg_5 : setattr ( arg_0 . displayhook , arg_7 , None )

Create ContentMetadataItemTransmision models for the given content metadata items.


Question: Get a concept or collection by its uri .

def Func ( arg_0 , arg_1 ) : if not is_uri ( arg_1 ) : raise ValueError ( '%s is not a valid URI.' % arg_1 ) arg_2 = [ arg_3 for arg_3 in arg_0 . concept_scheme_uri_map . keys ( ) if arg_1 . startswith ( arg_3 ) ] for arg_3 in arg_2 : arg_4 = arg_0 . get_provider ( arg_3 ) . Func ( arg_1 ) if arg_4 : return arg_4 for arg_5 in arg_0 . providers . values ( ) : arg_4 = arg_5 . Func ( arg_1 ) if arg_4 : return arg_4 return False

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


Question: Adds the categories that the user does not currently have .

def Func ( arg_0 ) : arg_1 = user_for_context ( arg_0 ) arg_2 = set ( CategoryController . available_categories ( arg_1 ) ) arg_3 = ItemController ( arg_1 ) . items_pending_or_purchased ( ) arg_4 = set ( ) for arg_5 , arg_6 in arg_3 : arg_4 . add ( arg_5 . category ) return arg_2 - arg_4

Create a tar file based on the list of files passed


Question: This function will check whether a PID is currently running

def Func ( arg_0 , arg_1 ) : try : os . kill ( arg_0 , 0 ) if arg_1 > 1 : print ( "Script has a PIDFILE where the process is still running" ) return True except OSError : if arg_1 > 1 : print ( "Script does not appear to be running" ) return False

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


Question: Retrieve users .

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


Question: Clean enterprise channel worker user form field

def Func ( arg_0 ) : arg_1 = arg_0 . cleaned_data [ 'channel_worker_username' ] . strip ( ) try : User . objects . get ( username = arg_1 ) except User . DoesNotExist : raise ValidationError ( ValidationMessages . INVALID_CHANNEL_WORKER . format ( arg_1 = arg_1 ) ) return arg_1


Question: Set the first point of the exterior to the given point based on its coordinates .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 1e-4 , arg_4 = True ) : if len ( arg_0 . exterior ) == 0 : raise Exception ( "Cannot reorder polygon points, because it contains no points." ) arg_5 , arg_6 = arg_0 . find_closest_point_index ( arg_1 = arg_1 , arg_2 = arg_2 , return_distance = True ) if arg_3 is not None and arg_6 > arg_3 : if not arg_4 : return arg_0 . deepcopy ( ) arg_7 = arg_0 . exterior [ arg_5 , : ] raise Exception ( "Closest found point (%.9f, %.9f) exceeds max_distance of %.9f exceeded" % ( arg_7 [ 0 ] , arg_7 [ 1 ] , arg_6 ) ) return arg_0 . change_first_point_by_index ( arg_5 )

Creates a layer from its config.

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

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

    Returns:
      layer: A layer instance.


Question: passes white space from start and returns first identifier if identifier invalid and throw raises SyntaxError otherwise returns None

def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_1 = pass_white ( arg_0 , arg_1 ) arg_3 = arg_1 if not arg_3 < len ( arg_0 ) : if arg_2 : raise SyntaxError ( 'Missing identifier!' ) return None if arg_0 [ arg_3 ] not in IDENTIFIER_START : if arg_2 : raise SyntaxError ( 'Invalid identifier start: "%s"' % arg_0 [ arg_3 ] ) return None arg_3 += 1 while arg_3 < len ( arg_0 ) and arg_0 [ arg_3 ] in IDENTIFIER_PART : arg_3 += 1 if not is_valid_lval ( arg_0 [ arg_1 : arg_3 ] ) : if arg_2 : raise SyntaxError ( 'Invalid identifier name: "%s"' % arg_0 [ arg_1 : arg_3 ] ) return None return arg_0 [ arg_1 : arg_3 ] , arg_3

Update a Label

        :param label: The data to update. Must include keys:

            * id (str)
            * appearance (dict)
            * description (str)
            * name (str)
            * title (str)
        :type label: dict

        Example:

        .. code-block:: python

            Labels().update(
                label={
                    'id': 'd9d4596e-49e4-4135-b3b3-847f9e7c1f43',
                    'appearance': {'color': '278abe'},
                    'name': 'My Sandbox',
                    'description': 'My Sandbox',
                    'title': 'My Sandbox',
                }
            )

        :return:
        :rtype: dict


Question: Moves an issue_data from one namespace to another .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if isinstance ( arg_1 , int ) : arg_4 = str ( arg_1 ) elif isinstance ( arg_1 , basestring ) : arg_4 = arg_1 else : arg_4 = arg_1 . number arg_5 = arg_0 . _issue_data_key ( arg_2 ) arg_6 = arg_0 . _issue_data_key ( arg_3 ) arg_7 = arg_0 . data . get ( arg_5 , { } ) arg_8 = arg_0 . data . get ( arg_6 , { } ) arg_9 = arg_7 . pop ( arg_4 , None ) if arg_9 : arg_8 [ arg_4 ] = arg_9 arg_0 . data [ arg_6 ] = arg_8 arg_0 . data [ arg_5 ] = arg_7

Reads the current "best model" for the job and returns whether or not the
    current model is better than the "best model" stored for the job

    Returns: (isBetter, storedBest, origResultsStr)

    isBetter:
      True if the current model is better than the stored "best model"
    storedResults:
      A dict of the currently stored results in the jobs table record
    origResultsStr:
      The json-encoded string that currently resides in the "results" field
      of the jobs record (used to create atomicity)


Question: Parse an assembly fasta file .

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] arg_3 = 0 arg_4 , arg_5 = None , None with open ( arg_1 ) as fh : logger . debug ( "Starting iteration of assembly file: {}" . format ( arg_1 ) ) for arg_6 in fh : if not arg_6 . strip ( ) : continue else : arg_6 = arg_6 . strip ( ) if arg_6 . startswith ( ">" ) : if arg_2 : arg_7 = "" . join ( arg_2 ) logger . debug ( "Populating contig with contig_id '{}', " "header '{}' and cov '{}'" . format ( arg_3 , arg_5 , arg_4 ) ) arg_0 . _populate_contigs ( arg_3 , arg_5 , arg_4 , arg_7 ) arg_2 = [ ] arg_3 += 1 arg_5 = arg_6 [ 1 : ] arg_4 = arg_0 . _parse_coverage ( arg_6 ) else : arg_2 . append ( arg_6 ) logger . debug ( "Populating contig with contig_id '{}', " "header '{}' and cov '{}'" . format ( arg_3 , arg_5 , arg_4 ) ) arg_7 = "" . join ( arg_2 ) arg_0 . _populate_contigs ( arg_3 , arg_5 , arg_4 , arg_7 )

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


Question: Extract expression expressing date and time and normalize its value

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 ) : arg_1 = clean_app_id ( arg_1 ) arg_4 = clean_sentence ( arg_4 , arg_2 ) arg_7 = GoolabsAPI ( arg_1 ) arg_8 = arg_7 . Func ( arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 , ) if arg_3 : click . echo ( format_json ( arg_7 . response . json ( ) ) ) return for arg_9 in arg_8 [ 'datetime_list' ] : click . echo ( u'{0}: {1}' . format ( text ( arg_9 [ 0 ] ) , arg_9 [ 1 ] ) )

Return the generation index of the first generation in the given
    swarm that does not have numParticles particles in it, either still in the
    running state or completed. This does not include orphaned particles.

    Parameters:
    ---------------------------------------------------------------------
    swarmId:  A string representation of the sorted list of encoders in this
                 swarm. For example '__address_encoder.__gym_encoder'
    minNumParticles: minium number of partices required for a full
                  generation.

    retval:  generation index, or None if no particles at all.


Question: Serialize and send available measures of a metric .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : return [ arg_0 . format_metric_string ( arg_2 , getattr ( arg_1 , arg_5 ) , arg_4 ) for arg_5 in arg_3 ]

Reassemble a Binder object coming out of the database.


Question: Returns the DagRun for this TaskInstance

def Func ( arg_0 , arg_1 ) : from airflow . models . dagrun import DagRun arg_2 = arg_1 . query ( DagRun ) . filter ( DagRun . dag_id == arg_0 . dag_id , DagRun . execution_date == arg_0 . execution_date ) . first ( ) return arg_2

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

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


Question: Compute the number of days that would have been required to fully liquidate each position on each day based on the trailing n day mean daily bar volume and a limit on the proportion of a daily bar that we are allowed to consume .

def Func ( arg_0 , arg_1 , arg_2 = 0.2 , arg_3 = 1e6 , arg_4 = 5 ) : arg_5 = arg_1 [ 'volume' ] * arg_1 [ 'price' ] arg_6 = arg_5 . rolling ( window = arg_4 , center = False ) . mean ( ) . shift ( ) arg_6 = arg_6 . replace ( 0 , np . nan ) arg_7 = pos . get_percent_alloc ( arg_0 ) arg_7 = arg_7 . drop ( 'cash' , axis = 1 ) arg_8 = ( arg_7 * arg_3 ) / ( arg_2 * arg_6 ) return arg_8 . iloc [ arg_4 : ]


Question: Return the dict of a StoreItem .

def Func ( arg_0 , arg_1 : arg_2 ) -> Dict : arg_3 = ( [ arg_4 for arg_4 in dir ( arg_1 ) if not arg_4 . startswith ( '_' ) or arg_4 . __eq__ ( 'e_tag' ) ] ) return ( { arg_4 : getattr ( arg_1 , arg_4 ) for arg_4 in arg_3 } )

Calculates bubble point for a given pressure

    Parameters
    ----------
    P : float
        Pressure, [Pa]
    zs : list[float]
        Overall mole fractions of all species, [-]
    vapor_pressure_eqns : list[functions]
        Temperature dependent function for each specie, Returns Psat, [Pa]
    fugacities : list[float], optional
        fugacities of each species, defaults to list of ones, [-]
    gammas : list[float], optional
        gammas of each species, defaults to list of ones, [-]

    Returns
    -------
    Tbubble : float, optional
        Temperature of bubble point at pressure `P`, [K]


Question: remove genes entirely from the model

def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_3 = { arg_0 . genes . get_by_id ( str ( i ) ) for i in arg_1 } arg_4 = { i . id for i in arg_3 } arg_5 = _GeneRemover ( arg_4 ) arg_6 = get_compiled_gene_reaction_rules ( arg_0 ) arg_7 = [ ] for arg_8 , arg_9 in iteritems ( arg_6 ) : if arg_8 . gene_reaction_rule is None or len ( arg_8 . gene_reaction_rule ) == 0 : continue if arg_2 and not eval_gpr ( arg_9 , arg_4 ) : arg_7 . append ( arg_8 ) else : arg_5 . visit ( arg_9 ) arg_10 = ast2str ( arg_9 ) if arg_10 != arg_8 . gene_reaction_rule : arg_8 . gene_reaction_rule = arg_10 for arg_12 in arg_3 : arg_0 . genes . remove ( arg_12 ) arg_13 = arg_0 . get_associated_groups ( arg_12 ) for arg_14 in arg_13 : arg_14 . remove_members ( arg_12 ) arg_0 . remove_reactions ( arg_7 )


Question: Method to procces subscribe channel s messages

def Func ( arg_0 ) : while arg_0 . km . sub_channel . msg_ready ( ) : arg_1 = arg_0 . km . sub_channel . get_msg ( ) arg_2 = arg_1 [ 'header' ] [ 'msg_type' ] arg_3 = arg_1 [ "parent_header" ] if ( not arg_3 ) or arg_0 . session_id == arg_3 [ 'session' ] : if arg_2 == 'status' : if arg_1 [ "content" ] [ "execution_state" ] == "busy" : pass elif arg_2 == 'stream' : if arg_1 [ "content" ] [ "name" ] == "stdout" : print ( arg_1 [ "content" ] [ "data" ] , file = io . stdout , end = "" ) io . stdout . flush ( ) elif arg_1 [ "content" ] [ "name" ] == "stderr" : print ( arg_1 [ "content" ] [ "data" ] , file = io . stderr , end = "" ) io . stderr . flush ( ) elif arg_2 == 'pyout' : arg_0 . execution_count = int ( arg_1 [ "content" ] [ "execution_count" ] ) arg_5 = arg_1 [ "content" ] [ "data" ] arg_6 = arg_0 . displayhook arg_6 . start_displayhook ( ) arg_6 . write_output_prompt ( ) arg_6 . write_format_data ( arg_5 ) arg_6 . log_output ( arg_5 ) arg_6 . finish_displayhook ( )

Write the index.html file for this report.


Question: Gets information relating to the opening coin toss .

def Func ( arg_0 ) : arg_1 = arg_0 . get_doc ( ) arg_2 = arg_1 ( 'table#game_info' ) arg_3 = sportsref . utils . parse_info_table ( arg_2 ) if 'Won Toss' in arg_3 : pass else : return None

Delete existing messages.

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


Question: Copy the currently selected text to the clipboard and delete it if it s inside the input buffer .

def Func ( arg_0 ) : arg_0 . copy ( ) if arg_0 . can_Func ( ) : arg_0 . _control . textCursor ( ) . removeSelectedText ( )

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


Question: inserts indels into the catg array

def Func ( arg_0 , arg_1 ) : arg_2 = np . zeros ( arg_1 . shape , dtype = np . uint32 ) for arg_3 in xrange ( arg_1 . shape [ 0 ] ) : arg_4 = np . where ( arg_0 [ arg_3 , : ] ) [ 0 ] if np . any ( arg_4 ) : arg_5 = np . arange ( arg_1 . shape [ 1 ] ) arg_6 = np . ones ( arg_5 . shape [ 0 ] , dtype = np . bool_ ) for arg_7 in arg_4 : arg_6 [ arg_7 ] = False arg_8 = arg_5 [ arg_6 == 1 ] arg_2 [ arg_3 ] [ arg_8 ] = arg_1 [ arg_3 , : arg_8 . shape [ 0 ] ] else : arg_2 [ arg_3 ] = arg_1 [ arg_3 ] return arg_2

Generate RENEWING time.

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

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


Question: Return the list of HGNC symbols that match annotated HPO terms .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 1 ) : try : arg_4 = query_phenomizer . query ( arg_0 , arg_1 , * arg_2 ) arg_5 = [ result for result in arg_4 if result [ 'p_value' ] <= arg_3 ] return arg_5 except SystemExit : return None

Checks if file already exists and ask the user if it should
    be overwritten if it does.


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

def Func ( arg_0 , arg_1 = None , arg_2 = 'django.core.signing' , arg_3 = arg_4 , arg_5 = False ) : arg_6 = arg_3 ( ) . Func ( arg_0 ) arg_7 = False if arg_5 : arg_8 = zlib . compress ( arg_6 ) if len ( arg_8 ) < ( len ( arg_6 ) - 1 ) : arg_6 = arg_8 arg_7 = True arg_9 = b64_encode ( arg_6 ) if arg_7 : arg_9 = b'.' + arg_9 return TimestampSigner ( arg_1 , arg_2 = arg_2 ) . sign ( arg_9 )


Question: Build the URI for the API call .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = 'https://api.trello.com/1' + arg_0 . clean_path ( arg_1 ) arg_3 += '?' + urlencode ( arg_2 ) return arg_3

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


Question: Returns total number of gate operations in circuit .

def Func ( arg_0 ) : arg_1 = 0 for arg_2 , arg_3 , arg_3 in arg_0 . data : if arg_2 . name not in [ 'barrier' , 'snapshot' ] : arg_1 += 1 return arg_1

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: Octal to decimal conversion .

def Func ( arg_0 , arg_1 = True ) : if arg_1 and not is_oct ( arg_0 ) : raise ValueError ( 'Func: invalid IP: "%s"' % arg_0 ) if isinstance ( arg_0 , int ) : arg_0 = oct ( arg_0 ) return int ( str ( arg_0 ) , 8 )


Question: Convert string datas into a Pillow Image object

def Func ( arg_0 ) : arg_1 = StringIO ( arg_0 ) arg_2 = Image . open ( arg_1 ) return 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: Resolve the polytomies on the tree .

def Func ( arg_0 , arg_1 = False ) : arg_0 . logger ( "TreeTime.Func: resolving multiple mergers..." , 1 ) arg_2 = 0 for arg_3 in arg_0 . tree . find_clades ( ) : if len ( arg_3 . clades ) > 2 : arg_4 = len ( arg_3 . clades ) arg_0 . _poly ( arg_3 , arg_1 ) arg_2 += arg_4 - len ( arg_3 . clades ) arg_5 = [ arg_3 for arg_3 in arg_0 . tree . find_clades ( ) if len ( arg_3 . clades ) == 1 and arg_3 . up is not None ] for arg_6 in arg_5 : arg_0 . logger ( 'TreeTime.Func: remove obsolete node ' + arg_6 . name , 4 ) if arg_6 . up is not None : arg_0 . tree . collapse ( arg_6 ) if arg_2 : arg_0 . logger ( 'TreeTime.Func: introduces %d new nodes' % arg_2 , 3 ) else : arg_0 . logger ( 'TreeTime.Func: No more polytomies to resolve' , 3 ) return arg_2

Register a file reader for use in parse_config_file.

  Registered file readers will be used to try reading files passed to
  `parse_config_file`. All file readers (beginning with the default `open`) will
  be tried until one of them succeeds at opening the file.

  This function may also be be used used as a decorator. For example:

      @register_file_reader(IOError)
      def exotic_data_source(filename):
        ...

  Args:
    *args: (When used as a decorator, only the existence check is supplied.)
      - file_reader_fn: The file reader function to register. This should be a
        function that can be used as a context manager to open a file and
        provide a file-like object, similar to Python's built-in `open`.
      - is_readable_fn: A function taking the file path and returning a boolean
        indicating whether the file can be read by `file_reader_fn`.

  Returns:
    `None`, or when used as a decorator, a function that will perform the
    registration using the supplied readability predicate.


Question: Calculate performance model cycles from cache stats .

def Func ( arg_0 ) : arg_1 = arg_0 . kernel . datatypes_size [ arg_0 . kernel . datatype ] arg_2 = float ( arg_0 . machine [ 'cacheline size' ] ) // arg_1 arg_3 = ( sympy . Integer ( arg_0 . machine [ 'cacheline size' ] ) / sympy . Integer ( arg_0 . kernel . bytes_per_iteration ) ) arg_0 . results [ 'iterations per cacheline' ] = arg_3 arg_5 = float ( arg_0 . machine [ 'cacheline size' ] ) arg_6 , arg_7 = ( arg_0 . predictor . get_loads ( ) , arg_0 . predictor . get_stores ( ) ) for arg_8 , arg_9 in list ( enumerate ( arg_0 . machine [ 'memory hierarchy' ] ) ) [ 1 : ] : arg_10 , arg_11 = arg_9 [ 'non-overlap upstream throughput' ] if type ( arg_10 ) is str and arg_10 == 'full socket memory bandwidth' : arg_12 = arg_6 [ arg_8 ] arg_13 = arg_7 [ arg_8 ] arg_14 = 1 arg_15 , arg_16 = arg_0 . machine . get_bandwidth ( arg_8 , arg_12 , arg_13 , arg_14 ) if arg_11 == 'half-duplex' : arg_17 = float ( arg_6 [ arg_8 ] + arg_7 [ arg_8 ] ) * float ( arg_2 ) * float ( arg_1 ) * float ( arg_0 . machine [ 'clock' ] ) / float ( arg_15 ) else : raise NotImplementedError ( "full-duplex mode is not (yet) supported for memory transfers." ) if 'penalty cycles per read stream' in arg_9 : arg_17 += arg_7 [ arg_8 ] * arg_9 [ 'penalty cycles per read stream' ] arg_0 . results . update ( { 'memory bandwidth kernel' : arg_16 , 'memory bandwidth' : arg_15 } ) else : arg_10 = float ( arg_10 ) / arg_5 if arg_11 == 'half-duplex' : arg_17 = ( arg_6 [ arg_8 ] + arg_7 [ arg_8 ] ) / float ( arg_10 ) elif arg_11 == 'full-duplex' : arg_17 = max ( arg_6 [ arg_8 ] / float ( arg_10 ) , arg_7 [ arg_8 ] / float ( arg_10 ) ) else : raise ValueError ( "Duplexness of cache throughput may only be 'half-duplex'" "or 'full-duplex', found {} in {}." . format ( arg_11 , arg_9 [ 'name' ] ) ) arg_0 . results [ 'cycles' ] . append ( ( arg_9 [ 'level' ] , arg_17 ) ) arg_0 . results [ arg_9 [ 'level' ] ] = arg_17 return arg_0 . results

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: Called when PUT has finished writing .

def Func ( arg_0 , arg_1 ) : if not arg_1 : commands . add ( arg_0 . provider . ui , arg_0 . provider . repo , arg_0 . localHgPath )

Makes closure which creates `loc`, `scale` params from `tf.get_variable`.

  This function produces a closure which produces `loc`, `scale` using
  `tf.get_variable`. The closure accepts the following arguments:

    dtype: Type of parameter's event.
    shape: Python `list`-like representing the parameter's event shape.
    name: Python `str` name prepended to any created (or existing)
      `tf.Variable`s.
    trainable: Python `bool` indicating all created `tf.Variable`s should be
      added to the graph collection `GraphKeys.TRAINABLE_VARIABLES`.
    add_variable_fn: `tf.get_variable`-like `callable` used to create (or
      access existing) `tf.Variable`s.

  Args:
    is_singular: Python `bool` indicating if `scale is None`. Default: `False`.
    loc_initializer: Initializer function for the `loc` parameters.
      The default is `tf.random_normal_initializer(mean=0., stddev=0.1)`.
    untransformed_scale_initializer: Initializer function for the `scale`
      parameters. Default value: `tf.random_normal_initializer(mean=-3.,
      stddev=0.1)`. This implies the softplus transformed result is initialized
      near `0`. It allows a `Normal` distribution with `scale` parameter set to
      this value to approximately act like a point mass.
    loc_regularizer: Regularizer function for the `loc` parameters.
      The default (`None`) is to use the `tf.get_variable` default.
    untransformed_scale_regularizer: Regularizer function for the `scale`
      parameters. The default (`None`) is to use the `tf.get_variable` default.
    loc_constraint: An optional projection function to be applied to the
      loc after being updated by an `Optimizer`. The function must take as input
      the unprojected variable and must return the projected variable (which
      must have the same shape). Constraints are not safe to use when doing
      asynchronous distributed training.
      The default (`None`) is to use the `tf.get_variable` default.
    untransformed_scale_constraint: An optional projection function to be
      applied to the `scale` parameters after being updated by an `Optimizer`
      (e.g. used to implement norm constraints or value constraints). The
      function must take as input the unprojected variable and must return the
      projected variable (which must have the same shape). Constraints are not
      safe to use when doing asynchronous distributed training. The default
      (`None`) is to use the `tf.get_variable` default.

  Returns:
    default_loc_scale_fn: Python `callable` which instantiates `loc`, `scale`
    parameters from args: `dtype, shape, name, trainable, add_variable_fn`.


Question: generates uninstall . sh and adds it to included files

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _render_template ( 'uninstall.sh' , arg_1 ) arg_0 . config . setdefault ( 'files' , [ ] ) arg_0 . _add_unique_file ( { "path" : "/uninstall.sh" , "contents" : arg_2 , "mode" : "755" } )

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

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


Question: Get the selected object and store start position

def Func ( arg_0 , arg_1 ) : if DEBUG : print "down!" if ( not arg_1 . ControlDown ( ) and not arg_1 . ShiftDown ( ) ) or arg_1 . AltDown ( ) : for arg_2 in arg_0 . selection : if arg_2 . sel_marker : arg_2 . sel_marker . show ( False ) arg_2 . sel_marker . destroy ( ) arg_2 . sel_marker = None arg_0 . selection = [ ] arg_5 = arg_1 . GetEventObject ( ) if arg_5 . Parent is None or arg_1 . AltDown ( ) : if not arg_1 . AltDown ( ) : arg_1 . Skip ( ) arg_0 . current = arg_5 arg_0 . overlay = wx . Overlay ( ) arg_0 . pos = arg_1 . GetPosition ( ) arg_0 . parent . wx_obj . CaptureMouse ( ) else : arg_2 = arg_5 . obj arg_0 . overlay = None if DEBUG : print arg_5 arg_9 , arg_10 = arg_5 . ScreenToClient ( arg_5 . GetPositionTuple ( ) ) arg_11 , arg_12 = arg_5 . ScreenToClient ( wx . GetMousePosition ( ) ) arg_0 . pos = arg_5 . ScreenToClient ( wx . GetMousePosition ( ) ) arg_0 . start = ( arg_9 - arg_11 , arg_10 - arg_12 ) arg_0 . current = arg_5 if DEBUG : print "capture..." if not isinstance ( arg_5 , wx . Notebook ) : arg_0 . parent . wx_obj . CaptureMouse ( ) arg_0 . select ( arg_2 , keep_selection = True )

Use ``\\r`` to overdraw the current line with the given text.

        This function transparently handles tracking how much overdrawing is
        necessary to erase the previous line when used consistently.

        :param text: The text to be outputted
        :param newline: Whether to start a new line and reset the length count.
        :type text: :class:`~__builtins__.str`
        :type newline: :class:`~__builtins__.bool`


Question: Import BibDocFile .

def Func ( ) : try : from invenio . bibdocfile import BibRecDocs , BibDoc except ImportError : from invenio . legacy . bibdocfile . api import BibRecDocs , BibDoc return BibRecDocs , BibDoc


Question: Compares the given tokens .

def Func ( arg_0 : arg_1 [ arg_2 , arg_3 ] , arg_4 : arg_1 [ arg_2 , arg_3 ] ) -> bool : arg_0 = util . to_bytes ( arg_0 ) arg_4 = util . to_bytes ( arg_4 ) arg_5 , arg_6 = arg_0 . rsplit ( b'.' , 1 ) arg_5 , arg_7 = arg_4 . rsplit ( b'.' , 1 ) arg_8 = util . b64_decode ( arg_6 ) arg_9 = util . b64_decode ( arg_7 ) return compare_signature ( arg_8 , arg_9 )

Parse a hub key into a dictionary of component parts

    :param key: str, a hub key
    :returns: dict, hub key split into parts
    :raises: ValueError


Question: Handle the channel readable state . E . g . read from a socket .

def Func ( arg_0 ) : with arg_0 . lock : logger . debug ( "Func()" ) if arg_0 . _eof or arg_0 . _socket is None : return if arg_0 . _state == "tls-handshake" : while True : logger . debug ( "tls handshake read..." ) arg_0 . _continue_tls_handshake ( ) logger . debug ( "  state: {0}" . format ( arg_0 . _tls_state ) ) if arg_0 . _tls_state != "want_read" : break elif arg_0 . _tls_state == "connected" : while arg_0 . _socket and not arg_0 . _eof : logger . debug ( "tls socket read..." ) try : arg_1 = arg_0 . _socket . read ( 4096 ) except ssl . SSLError , err : if err . args [ 0 ] == ssl . SSL_ERROR_WANT_READ : break elif err . args [ 0 ] == ssl . SSL_ERROR_WANT_WRITE : break else : raise except socket . error , err : if err . args [ 0 ] == errno . EINTR : continue elif err . args [ 0 ] in BLOCKING_ERRORS : break elif err . args [ 0 ] == errno . ECONNRESET : logger . warning ( "Connection reset by peer" ) arg_1 = None else : raise arg_0 . _feed_reader ( arg_1 ) else : while arg_0 . _socket and not arg_0 . _eof : logger . debug ( "raw socket read..." ) try : arg_1 = arg_0 . _socket . recv ( 4096 ) except socket . error , err : if err . args [ 0 ] == errno . EINTR : continue elif err . args [ 0 ] in BLOCKING_ERRORS : break elif err . args [ 0 ] == errno . ECONNRESET : logger . warning ( "Connection reset by peer" ) arg_1 = None else : raise arg_0 . _feed_reader ( arg_1 )

Validates API Root information. Raises errors for required
        properties.


Question: Serialize a list of trees in Newick format .

def Func ( arg_0 ) : if isinstance ( arg_0 , Node ) : arg_0 = [ arg_0 ] return ';\n' . join ( [ arg_1 . newick for arg_1 in arg_0 ] ) + ';'

Create a new Set produce by the intersection of 2 Set


Question: Function internally used to check if the given netmask is of the specified notation .

def Func ( arg_0 , arg_1 ) : arg_2 = { NM_DOT : _dot_to_dec , NM_HEX : _hex_to_dec , NM_BIN : _bin_to_dec , NM_OCT : _oct_to_dec , NM_DEC : _dec_to_dec_long } try : arg_3 = arg_2 [ arg_1 ] ( arg_0 , check = True ) except ValueError : return False if arg_3 in _NETMASKS_VALUES : return True return False


Question: Fetch the IDASettings instance for the curren plugin with directory scope .

def Func ( arg_0 ) : if arg_0 . _config_Func is None : ensure_ida_loaded ( ) return DirectoryIDASettings ( arg_0 . _plugin_name , Func = arg_0 . _config_Func )

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: Inherits the data from the parent .

def Func ( arg_0 ) : LOG . debug ( "'%s' inheriting data from '%s'" % ( arg_0 . get_name ( ) , arg_0 . parent . get_name ( ) ) , extra = dict ( data = arg_0 . parent . data ) ) arg_0 . set_data ( ** arg_0 . parent . data )

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: Download the EMNIST data if it doesn t exist in processed_folder already .

def Func ( arg_0 ) : import shutil import zipfile if arg_0 . _check_exists ( ) : return makedir_exist_ok ( arg_0 . raw_folder ) makedir_exist_ok ( arg_0 . processed_folder ) arg_1 = arg_0 . url . rpartition ( '/' ) [ 2 ] arg_2 = os . path . join ( arg_0 . raw_folder , arg_1 ) Func_url ( arg_0 . url , root = arg_0 . raw_folder , arg_1 = arg_1 , md5 = None ) print ( 'Extracting zip archive' ) with zipfile . ZipFile ( arg_2 ) as zip_f : zip_f . extractall ( arg_0 . raw_folder ) os . unlink ( arg_2 ) arg_3 = os . path . join ( arg_0 . raw_folder , 'gzip' ) for arg_4 in os . listdir ( arg_3 ) : if arg_4 . endswith ( '.gz' ) : arg_0 . extract_gzip ( gzip_path = os . path . join ( arg_3 , arg_4 ) ) for arg_5 in arg_0 . splits : print ( 'Processing ' + arg_5 ) arg_6 = ( read_image_file ( os . path . join ( arg_3 , 'emnist-{}-train-images-idx3-ubyte' . format ( arg_5 ) ) ) , read_label_file ( os . path . join ( arg_3 , 'emnist-{}-train-labels-idx1-ubyte' . format ( arg_5 ) ) ) ) arg_7 = ( read_image_file ( os . path . join ( arg_3 , 'emnist-{}-test-images-idx3-ubyte' . format ( arg_5 ) ) ) , read_label_file ( os . path . join ( arg_3 , 'emnist-{}-test-labels-idx1-ubyte' . format ( arg_5 ) ) ) ) with open ( os . path . join ( arg_0 . processed_folder , arg_0 . _training_file ( arg_5 ) ) , 'wb' ) as f : torch . save ( arg_6 , f ) with open ( os . path . join ( arg_0 . processed_folder , arg_0 . _test_file ( arg_5 ) ) , 'wb' ) as f : torch . save ( arg_7 , f ) shutil . rmtree ( arg_3 ) print ( 'Done!' )

Adds one encoder.

    :param name: (string) name of encoder, should be unique
    :param encoder: (:class:`.Encoder`) the encoder to add


Question: Create a new archive .

def Func ( arg_0 ) : arg_1 = uuid . uuid4 ( ) . hex arg_2 = os . path . join ( arg_0 . dirpath , arg_1 [ 0 : 2 ] ) arg_3 = arg_1 [ 2 : ] + arg_0 . STORAGE_EXT arg_4 = os . path . join ( arg_2 , arg_3 ) if not os . path . exists ( arg_2 ) : os . makedirs ( arg_2 ) try : arg_5 = Archive . create ( arg_4 ) except ArchiveError as e : raise ArchiveManagerError ( cause = str ( e ) ) return arg_5

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


Question: Write the specified value to this characteristic .

def Func ( arg_0 , arg_1 , arg_2 = 0 ) : arg_3 = NSData . dataWithBytes_length_ ( arg_1 , len ( arg_1 ) ) arg_0 . _device . _peripheral . writeValue_forCharacteristic_type_ ( arg_3 , arg_0 . _characteristic , arg_2 )

Unserialize a msg_list to a nested message dict.

        This is roughly the inverse of serialize. The serialize/unserialize
        methods work with full message lists, whereas pack/unpack work with
        the individual message parts in the message list.

        Parameters:
        -----------
        msg_list : list of bytes or Message objects
            The list of message parts of the form [HMAC,p_header,p_parent,
            p_content,buffer1,buffer2,...].
        content : bool (True)
            Whether to unpack the content dict (True), or leave it packed
            (False).
        copy : bool (True)
            Whether to return the bytes (True), or the non-copying Message
            object in each place (False).

        Returns
        -------
        msg : dict
            The nested message dict with top-level keys [header, parent_header,
            content, buffers].


Question: Disconnects the signal from the given function .

def Func ( arg_0 , arg_1 ) : if arg_0 . weak_subscribers is not None : with arg_0 . lock : arg_2 = arg_0 . _weakly_connected_index ( arg_1 ) if arg_2 is not None : arg_0 . weak_subscribers . pop ( arg_2 ) [ 0 ] if arg_0 . hard_subscribers is not None : try : arg_2 = arg_0 . _hard_callbacks ( ) . index ( arg_1 ) except ValueError : pass else : arg_0 . hard_subscribers . pop ( arg_2 )

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


Question: Binary to decimal conversion .

def Func ( arg_0 , arg_1 = True ) : if arg_1 and not is_bin ( arg_0 ) : raise ValueError ( 'Func: invalid IP: "%s"' % arg_0 ) if isinstance ( arg_0 , int ) : arg_0 = str ( arg_0 ) return int ( str ( arg_0 ) , 2 )

Show Program Landing page for the Enterprise's Program.

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

        Unauthenticated learners will be redirected to enterprise-linked SSO.

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


Question: Set the maximum forces for this object s degrees of freedom .

def Func ( arg_0 , Func ) : _set_params ( arg_0 . ode_obj , 'FMax' , Func , arg_0 . ADOF + arg_0 . LDOF )

Raise an exception if string doesn't match a part's regex

    :param string: str
    :param part: a key in the PARTS dict
    :raises: ValueError, TypeError


Question: Loads the named descriptor from the pool .

def Func ( arg_0 , arg_1 ) : arg_1 = _NormalizeFullyQualifiedName ( arg_1 ) if arg_1 not in arg_0 . _descriptors : arg_0 . FindFileContainingSymbol ( arg_1 ) return arg_0 . _descriptors [ arg_1 ]

Does this filename match any of the patterns?


Question: Add a task to the registry .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = None , arg_6 = None ) : arg_0 . _rwlock . writer_acquire ( ) if arg_1 in arg_0 . _tasks : arg_0 . _rwlock . writer_release ( ) raise AlreadyExistsError ( element = str ( arg_1 ) ) arg_7 = Task ( arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = arg_5 , arg_6 = arg_6 ) arg_0 . _tasks [ arg_1 ] = arg_7 arg_0 . _rwlock . writer_release ( ) logger . debug ( "Task %s Funced to the registry" , str ( arg_1 ) ) return arg_7

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: delete all of the selected objects

def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . selection : if arg_2 : if DEBUG : print "deleting" , arg_2 . name arg_2 . destroy ( ) arg_0 . selection = [ ] arg_0 . inspector . load_object ( )

Use ``\\r`` to overdraw the current line with the given text.

        This function transparently handles tracking how much overdrawing is
        necessary to erase the previous line when used consistently.

        :param text: The text to be outputted
        :param newline: Whether to start a new line and reset the length count.
        :type text: :class:`~__builtins__.str`
        :type newline: :class:`~__builtins__.bool`


Question: Create a citation timeline counter from the graph .

def Func ( arg_0 : arg_1 ) -> List [ Tuple [ int , int ] ] : return create_timeline ( count_citation_years ( arg_0 ) )


Question: Delete a service bus namespace .

def Func ( arg_0 , arg_1 ) : _validate_not_none ( 'name' , arg_1 ) return arg_0 . _perform_delete ( arg_0 . _get_path ( 'services/serviceBus/Namespaces' , arg_1 ) , None )

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

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


Question: _get_key_for_index - Returns the key name that would hold the indexes on a value Internal - does not validate that indexedFields is actually indexed . Trusts you . Don t let it down .

def Func ( arg_0 , arg_1 , arg_2 ) : if hasattr ( arg_1 , 'toIndex' ) : arg_2 = arg_1 . toIndex ( arg_2 ) else : arg_2 = arg_0 . fields [ arg_1 ] . toIndex ( arg_2 ) return '' . join ( [ INDEXED_REDIS_PREFIX , arg_0 . keyName , ':idx:' , arg_1 , ':' , arg_2 ] )

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


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

def Func ( arg_0 , arg_1 = False ) : check_call_on_vm ( 'sudo mkdir -p {}' . format ( arg_0 . vm_path ) ) if arg_1 : for arg_2 in range ( 0 , 10 ) : try : _run_mount_command ( arg_0 ) return except CalledProcessError as e : if 'Connection refused' in e . output : logging . info ( 'Failed to mount repo; waiting for nfsd to restart' ) time . sleep ( 1 ) else : logging . info ( e . output ) raise e log_to_client ( 'Failed to mount repo {}' . format ( arg_0 . short_name ) ) raise RuntimeError ( 'Unable to mount repo with NFS' ) else : _run_mount_command ( arg_0 )

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: construct a sentence text with proper spacing

def Func ( arg_0 ) : arg_1 = [ ] arg_2 = 0 for arg_3 in arg_0 : if len ( arg_3 ) > 0 : if ( arg_2 > 0 ) and not ( arg_3 [ 0 ] in ",.:;!?-\"'" ) : arg_1 . append ( " " ) arg_1 . append ( arg_3 ) arg_2 += 1 return "" . join ( arg_1 )


Question: Create an anomaly alert . This call makes 2 requests one to create a scheduled_query and another to create the alert .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 , arg_8 , arg_9 ) : arg_10 = '{pos}{change}' . format ( pos = '+' if arg_5 else '-' , arg_10 = str ( arg_6 ) ) arg_11 = arg_0 . _Func_scheduled_query ( arg_2 = arg_2 , arg_10 = arg_10 , arg_4 = arg_4 , arg_3 = arg_3 , ) arg_12 = arg_11 . get ( 'scheduled_query' , { } ) . get ( 'id' ) arg_13 = { 'tag' : { 'actions' : [ alert_report . to_dict ( ) for alert_report in arg_9 ] , 'name' : arg_1 , 'scheduled_query_id' : arg_12 , 'sources' : [ { 'id' : log } for log in arg_8 ] , 'sub_type' : 'AnomalyAlert' , 'type' : 'AlertNotify' } } arg_13 [ 'tag' ] . update ( arg_7 . to_dict ( ) ) arg_14 = 'https://logentries.com/rest/{account_id}/api/tags' . format ( account_id = arg_0 . account_id ) return arg_0 . _api_post ( url = arg_14 , data = json . dumps ( arg_13 , sort_keys = True ) , )


Question: Matomo tracking template tag .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . split_contents ( ) if len ( arg_2 ) > 1 : raise TemplateSyntaxError ( "'%s' takes no arguments" % arg_2 [ 0 ] ) return MatomoNode ( )

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


Question: Reports for long function bodies .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = arg_1 . lines arg_6 = arg_5 [ arg_2 ] arg_7 = '' arg_8 = False arg_9 = r'(\w(\w|::|\*|\&|\s)*)\(' arg_10 = Match ( arg_9 , arg_6 ) if arg_10 : arg_11 = arg_10 . group ( 1 ) . split ( ) [ - 1 ] if arg_11 == 'TEST' or arg_11 == 'TEST_F' or ( not Match ( r'[A-Z_]+$' , arg_11 ) ) : arg_8 = True if arg_8 : arg_12 = False for arg_13 in range ( arg_2 , arg_1 . NumLines ( ) ) : arg_14 = arg_5 [ arg_13 ] arg_7 += ' ' + arg_14 . lstrip ( ) if Search ( r'(;|})' , arg_14 ) : arg_12 = True break elif Search ( r'{' , arg_14 ) : arg_12 = True arg_15 = Search ( r'((\w|:)*)\(' , arg_6 ) . group ( 1 ) if Match ( r'TEST' , arg_15 ) : arg_16 = Search ( r'(\(.*\))' , arg_7 ) if arg_16 : arg_15 += arg_16 . group ( 1 ) else : arg_15 += '()' arg_3 . Begin ( arg_15 ) break if not arg_12 : arg_4 ( arg_0 , arg_2 , 'readability/fn_size' , 5 , 'Lint failed to find start of function body.' ) elif Match ( r'^\}\s*$' , arg_6 ) : arg_3 . Check ( arg_4 , arg_0 , arg_2 ) arg_3 . End ( ) elif not Match ( r'^\s*$' , arg_6 ) : arg_3 . Count ( )

Utility method to visualize decision boundaries in R^2.

  Args:
    features: Input points, as a Numpy `array` of shape `[num_examples, 2]`.
    labels: Numpy `float`-like array of shape `[num_examples, 1]` giving a
      label for each point.
    true_w_b: A `tuple` `(w, b)` where `w` is a Numpy array of
       shape `[2]` and `b` is a scalar `float`, interpreted as a
       decision rule of the form `dot(features, w) + b > 0`.
    candidate_w_bs: Python `iterable` containing tuples of the same form as
       true_w_b.
    fname: The filename to save the plot as a PNG image (Python `str`).


Question: Dump the remote tokens as a list of dictionaries .

def Func ( arg_0 , arg_1 , arg_2 = True , arg_3 = False , ** arg_4 ) : return dict ( id_remote_account = arg_0 . id_remote_account , token_type = arg_0 . token_type , access_token = arg_0 . access_token , secret = arg_0 . secret )

increments the branches counter and checks boolean expressions


Question: For a given x position in each Markov chain returns the next x .

def Func ( arg_0 , arg_1 , arg_2 = 0.01 , arg_3 = 30 , arg_4 = None , arg_5 = None ) : with tf . compat . v1 . name_scope ( arg_5 , 'Func' , [ arg_1 , arg_2 , arg_3 ] ) : arg_1 = tf . convert_to_tensor ( value = arg_1 ) arg_6 = arg_1 . dtype . base_dtype arg_7 = arg_0 ( arg_1 ) - tf . random . gamma ( tf . shape ( input = arg_1 ) , alpha = 1 , arg_6 = arg_6 , arg_4 = arg_4 ) arg_8 , arg_9 , arg_10 = slice_bounds_by_doubling ( arg_1 , arg_0 , arg_7 , arg_3 , arg_2 , arg_4 = arg_4 ) arg_11 = _sample_with_shrinkage ( arg_1 , arg_0 = arg_0 , arg_7 = arg_7 , arg_2 = arg_2 , arg_9 = arg_9 , arg_8 = arg_8 , arg_4 = arg_4 ) return ( arg_11 , arg_0 ( arg_11 ) , arg_10 , arg_8 , arg_9 )

This function prepares a list of hiveconf params
        from a dictionary of key value pairs.

        :param d:
        :type d: dict

        >>> hh = HiveCliHook()
        >>> hive_conf = {"hive.exec.dynamic.partition": "true",
        ... "hive.exec.dynamic.partition.mode": "nonstrict"}
        >>> hh._prepare_hiveconf(hive_conf)
        ["-hiveconf", "hive.exec.dynamic.partition=true",\
 "-hiveconf", "hive.exec.dynamic.partition.mode=nonstrict"]


Question: Creates a new Azure SQL Database .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None , arg_5 = None , arg_6 = None ) : _validate_not_none ( 'server_name' , arg_1 ) _validate_not_none ( 'name' , arg_2 ) _validate_not_none ( 'service_objective_id' , arg_3 ) return arg_0 . _perform_post ( arg_0 . _get_databases_path ( arg_1 ) , _SqlManagementXmlSerializer . Func_to_xml ( arg_2 , arg_3 , arg_4 , arg_5 , arg_6 ) )

Load a skeleton definition from a text file.

        Parameters
        ----------
        source : str or file
            A filename or file-like object that contains text information
            describing a skeleton. See :class:`pagoda.parser.BodyParser` for
            more information about the format of the text file.


Question: Implementation of coverage run .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_5 . path [ 0 ] arg_0 . coverage . start ( ) arg_4 = True try : try : if arg_1 . module : arg_5 . path [ 0 ] = '' arg_0 . run_python_module ( arg_2 [ 0 ] , arg_2 ) else : arg_7 = arg_2 [ 0 ] arg_5 . path [ 0 ] = os . path . abspath ( os . path . dirname ( arg_7 ) ) arg_0 . run_python_file ( arg_7 , arg_2 ) except NoSource : arg_4 = False raise finally : arg_0 . coverage . stop ( ) if arg_4 : arg_0 . coverage . save ( ) arg_5 . path [ 0 ] = arg_3

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


Question: Called when there is an error in the websocket

def Func ( arg_0 , arg_1 , arg_2 ) : logging . debug ( "ConnectorDB:WS: Connection Error" ) if arg_0 . status == "connecting" : arg_0 . status = "errored" arg_0 . ws_openlock . release ( )

The Get Management Certificate operation retrieves information about
        the management certificate with the specified thumbprint. Management
        certificates, which are also known as subscription certificates,
        authenticate clients attempting to connect to resources associated
        with your Windows Azure subscription.

        thumbprint:
            The thumbprint value of the certificate.


Question: Update a data set .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None ) : arg_5 = { "public" : _convert_bool_to_public_value ( arg_4 ) } if arg_2 : arg_5 [ "name" ] = arg_2 if arg_3 : arg_5 [ "description" ] = arg_3 arg_6 = { "dataset" : arg_5 } arg_7 = "Failed to update dataset {}" . format ( arg_1 ) arg_8 = arg_0 . _get_success_json ( arg_0 . _post_json ( routes . Func ( arg_1 ) , arg_5 = arg_6 , arg_7 = arg_7 ) ) return _dataset_from_response_dict ( arg_8 )

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


Question: return a module by its name raise KeyError if not found

def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . Funcs ( ) : if arg_2 . node . name == arg_1 : return arg_2 raise KeyError ( arg_1 )


Question: Input file list validation function . Checks that object is a list and contains valid filepaths that can be processed by SoX .

def Func ( arg_0 ) : if not isinstance ( arg_0 , list ) : raise TypeError ( "input_filepath_list must be a list." ) elif len ( arg_0 ) < 2 : raise ValueError ( "input_filepath_list must have at least 2 files." ) for arg_1 in arg_0 : validate_input_file ( arg_1 )

Send a string of binary data to the FireCracker with proper timing.

    See the diagram in the spec referenced above for timing information.
    The module level variables leadInOutDelay and bitDelay represent how
    long each type of delay should be in seconds. They may require tweaking
    on some setups.


Question: Add a new array to the DAF file .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_0 . file arg_5 = arg_0 . summary_control_struct arg_6 = arg_0 . bward arg_7 = bytearray ( arg_0 . read_record ( arg_6 ) ) arg_8 , arg_9 , arg_10 = arg_5 . unpack ( arg_7 [ : 24 ] ) if arg_10 < arg_0 . summaries_per_record : arg_11 = arg_6 arg_12 = arg_11 + 1 arg_7 [ : 24 ] = arg_5 . pack ( arg_8 , arg_9 , arg_10 + 1 ) arg_0 . write_record ( arg_11 , arg_7 ) else : arg_11 = ( ( arg_0 . free - 1 ) * 8 + 1023 ) // 1024 + 1 arg_12 = arg_11 + 1 arg_13 = arg_11 + 2 arg_10 = 0 arg_7 [ : 24 ] = arg_5 . pack ( arg_11 , arg_9 , arg_10 ) arg_0 . write_record ( arg_6 , arg_7 ) arg_14 = arg_5 . pack ( 0 , arg_6 , 1 ) . ljust ( 1024 , b'\0' ) arg_15 = b'\0' * 1024 arg_0 . write_record ( arg_11 , arg_14 ) arg_0 . write_record ( arg_12 , arg_15 ) arg_0 . bward = arg_11 arg_0 . free = ( arg_13 - 1 ) * 1024 // 8 + 1 arg_18 = arg_0 . free arg_4 . seek ( ( arg_18 - 1 ) * 8 ) arg_3 = numpy_array ( arg_3 ) arg_4 . write ( arg_3 . view ( ) ) arg_19 = arg_4 . tell ( ) // 8 arg_0 . free = arg_19 + 1 arg_0 . write_file_record ( ) arg_2 = arg_2 [ : arg_0 . nd + arg_0 . ni - 2 ] + ( arg_18 , arg_19 ) arg_20 = 1024 * ( arg_11 - 1 ) arg_21 = int ( arg_10 ) * arg_0 . summary_step arg_4 . seek ( arg_20 + arg_5 . size + arg_21 ) arg_4 . write ( arg_0 . summary_struct . pack ( * arg_2 ) ) arg_4 . seek ( arg_20 + 1024 + arg_21 ) arg_4 . write ( arg_1 [ : arg_0 . summary_length ] . ljust ( arg_0 . summary_step , b' ' ) )


Question: Initialize an empty JSON file .

def Func ( arg_0 , arg_1 = "dict" ) : arg_1 = { } if arg_1 . lower ( ) == "dict" else [ ] if not os . path . exists ( arg_0 ) : arg_2 = os . path . dirname ( arg_0 ) if arg_2 and not os . path . exists ( arg_2 ) : raise IOError ( ( "Could not initialize empty JSON file in non-existant " "directory '{}'" ) . format ( os . path . dirname ( arg_0 ) ) ) with open ( arg_0 , "w" ) as f : json . dump ( arg_1 , f ) return True elif os . path . getsize ( arg_0 ) == 0 : with open ( arg_0 , "w" ) as f : json . dump ( arg_1 , f ) else : return False


Question: Attaches a volume to a server .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = '{ "id": "' + arg_3 + '" }' arg_5 = arg_0 . _perform_request ( url = '/datacenters/%s/servers/%s/volumes' % ( arg_1 , arg_2 ) , method = 'POST' , arg_4 = arg_4 ) return arg_5

Describe the result set of a catalog search for IDAHO images.

        Args:
            idaho_image_results (dict): Result set of catalog search.
        Returns:
            results (json): The full catalog-search response for IDAHO images
                            corresponding to the given catID.


Question: Parse show subcommand .

def Func ( arg_0 ) : arg_1 = arg_0 . subFuncr . add_Funcr ( "show" , help = "Show workspace details" , description = "Show workspace details." ) arg_2 = arg_1 . add_mutually_exclusive_group ( required = True ) arg_2 . add_argument ( '--all' , action = 'store_true' , help = "All workspaces" ) arg_2 . add_argument ( 'name' , type = str , help = "Workspace name" , nargs = '?' )


Question: The target function for a thread runs an agent and environment until signaled to stop . Adds rewards to shared episode rewards list .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = False , arg_5 = - 1 , arg_6 = None , arg_7 = False , arg_8 = None ) : arg_9 = False if arg_6 is not None and len ( getargspec ( arg_6 ) . args ) == 1 : arg_9 = True arg_10 = 0 while not arg_0 . should_stop : arg_11 = arg_3 . reset ( ) arg_2 . reset ( ) arg_0 . global_timestep , arg_0 . global_episode = arg_2 . timestep , arg_2 . episode arg_14 = 0 arg_15 = 0 arg_16 = time . time ( ) while True : arg_17 , arg_18 , arg_19 = arg_2 . act ( arg_19 = arg_11 , arg_4 = arg_4 , buffered = False ) arg_20 = 0 for arg_21 in xrange ( arg_0 . repeat_actions ) : arg_11 , arg_22 , arg_23 = arg_3 . execute ( arg_17 = arg_17 ) arg_20 += arg_23 if arg_22 : break if not arg_7 : arg_2 . atomic_observe ( arg_19 = arg_11 , actions = arg_17 , arg_18 = arg_18 , arg_20 = arg_20 , arg_22 = arg_22 ) if arg_8 is not None : time . sleep ( arg_8 ) arg_15 += 1 arg_14 += arg_20 if arg_22 or arg_15 == arg_5 : break if arg_0 . should_stop : return arg_0 . global_timestep += arg_15 arg_0 . episode_list_lock . acquire ( ) arg_0 . episode_rewards . append ( arg_14 ) arg_0 . episode_timesteps . append ( arg_15 ) arg_0 . episode_times . append ( time . time ( ) - arg_16 ) arg_0 . episode_list_lock . release ( ) if arg_6 is not None : if arg_9 : arg_24 = { "thread_id" : arg_1 , "episode" : arg_10 , "timestep" : arg_15 , "episode_reward" : arg_14 } if not arg_6 ( arg_24 ) : return elif not arg_6 ( arg_0 , arg_1 ) : return arg_10 += 1

Register a new range type as a PostgreSQL range.

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

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

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

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


Question: Preprocess a panel of genes .

def Func ( arg_0 , arg_1 ) : arg_1 [ 'institute' ] = arg_0 . institute ( arg_1 [ 'institute' ] ) arg_2 = "{}({})" . format ( arg_1 [ 'display_name' ] , arg_1 [ 'version' ] ) arg_1 [ 'name_and_version' ] = arg_2 return dict ( panel = arg_1 )

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


Question: Searches the elasticsearch instance to retrieve the requested documents .

def Func ( arg_0 , arg_1 = None , * arg_2 , ** arg_3 ) : Func = arg_0 . create_search ( * arg_2 , ** arg_3 ) try : if arg_1 : arg_5 = Func [ 0 : arg_1 ] else : arg_2 , arg_6 = arg_0 . core_parser . parse_known_args ( ) if arg_2 . number : arg_5 = Func [ 0 : arg_2 . number ] else : arg_5 = Func . scan ( ) return [ arg_7 for arg_7 in arg_5 ] except NotFoundError : print_error ( "The index was not found, have you initialized the index?" ) return [ ] except ( ConnectionError , TransportError ) : print_error ( "Cannot connect to elasticsearch" ) return [ ]

Generates the JSON report to plot the gene boxes

        Following the convention of the reports platform, this method returns
        a list of JSON/dict objects with the information about each entry in
        the abricate file. The information contained in this JSON is::

            {contig_id: <str>,
             seqRange: [<int>, <int>],
             gene: <str>,
             accession: <str>,
             coverage: <float>,
             identity: <float>
             }

        Note that the `seqRange` entry contains the position in the
        corresponding contig, not the absolute position in the whole assembly.

        Returns
        -------
        json_dic : list
            List of JSON/dict objects with the report data.


Question: Gives the sas - url to download the configurations for vpn - sites in a resource group .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = False , arg_7 = True , ** arg_8 ) : arg_9 = arg_0 . _Func_initial ( arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = True , ** arg_8 ) def get_long_running_output ( arg_10 ) : if arg_6 : arg_11 = ClientRawResponse ( None , arg_10 ) return arg_11 arg_12 = arg_8 . get ( 'long_running_operation_timeout' , arg_0 . config . long_running_operation_timeout ) if arg_7 is True : arg_13 = ARMPolling ( arg_12 , ** arg_8 ) elif arg_7 is False : arg_13 = NoPolling ( ) else : arg_13 = arg_7 return LROPoller ( arg_0 . _client , arg_9 , get_long_running_output , arg_13 )

Read the file and perform any transforms to get a loaded image


Question: Unparse a range argument .

def Func ( arg_0 ) : if isinstance ( arg_0 , ( int , long ) ) : return str ( arg_0 ) if isinstance ( arg_0 , tuple ) : arg_1 = str ( arg_0 [ 0 ] ) + "-" if len ( arg_0 ) > 1 : arg_1 += str ( arg_0 [ 1 ] ) return arg_1 raise ValueError ( "Must be an integer or tuple" )

Handle the case where the employee on SAPSF's side is marked as inactive.


Question: Build the markdown release notes for Hugo .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ '+++\n' , 'date = "{}"\n' . format ( date . today ( ) . isoformat ( ) ) , 'title = "{}"\n' . format ( arg_1 ) , 'author = "The COBRApy Team"\n' , 'release = "{}"\n' . format ( arg_2 ) , '+++\n' , '\n' ] with open ( arg_0 , "r" ) as file_h : arg_4 = insert_break ( file_h . readlines ( ) ) arg_3 . extend ( arg_4 ) with open ( arg_0 , "w" ) as file_h : file_h . writelines ( arg_3 )

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: Convert a QuantumCircuit or Instruction to a SuperOp .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , QuantumCircuit ) : arg_1 = arg_1 . to_instruction ( ) arg_2 = SuperOp ( np . eye ( 4 ** arg_1 . num_qubits ) ) arg_2 . _append_instruction ( arg_1 ) return arg_2

Get events from this conversation.

        Makes a request to load historical events if necessary.

        Args:
            event_id (str): (optional) If provided, return events preceding
                this event, otherwise return the newest events.
            max_events (int): Maximum number of events to return. Defaults to
                50.

        Returns:
            List of :class:`.ConversationEvent` instances, ordered
            newest-first.

        Raises:
            KeyError: If ``event_id`` does not correspond to a known event.
            .NetworkError: If the events could not be requested.


Question: sets 1 . 0 cost for every replacement insertion deletion and transposition

def Func ( arg_0 , arg_1 = False ) : arg_0 . operation_costs = dict ( ) arg_0 . operation_costs [ "" ] = { c : 1.0 for c in list ( arg_0 . alphabet ) + [ ' ' ] } for arg_3 in arg_0 . alphabet : arg_4 = { c : 1.0 for c in arg_0 . alphabet } arg_4 [ arg_3 ] = 0.0 arg_4 [ "" ] = 1.0 if arg_1 : arg_4 [ " " ] = 1.0 arg_0 . operation_costs [ arg_3 ] = arg_4 for arg_3 , arg_5 in itertools . permutations ( arg_0 . alphabet , 2 ) : arg_0 . operation_costs [ arg_3 + arg_5 ] = { arg_5 + arg_3 : 1.0 } if arg_1 : arg_0 . operation_costs [ " " ] = { c : 1.0 for c in arg_0 . alphabet } arg_0 . operation_costs [ " " ] [ "" ] = 1.0

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

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


Question: A parameter derived from Sersic index which ensures that effective radius contains 50% of the profile s total integrated light .

Reads a file and returns its contents as a list of lines. Works for both local and remote files.

    :param unicode filename:

    :param None|''|'\n'|'\r'|'\r\n' newline:
        Controls universal newlines.
        See 'io.open' newline parameter documentation for more details.

    :param unicode encoding:
        File's encoding. If not None, contents obtained from file will be decoded using this
        `encoding`.

    :returns list(unicode):
        The file's lines

    .. seealso:: FTP LIMITATIONS at this module's doc for performance issues information


Question: Remove the client from the users of the socket .

def Func ( arg_0 , arg_1 ) : try : arg_0 . _clients . remove ( id ( arg_1 ) ) except ValueError : pass if len ( arg_0 . _clients ) < 1 : arg_0 . close ( )

Returns the public data for the specified X.509 certificate associated
        with a hosted service.

        service_name:
            Name of the hosted service.
        thumbalgorithm:
            The algorithm for the certificate's thumbprint.
        thumbprint:
            The hexadecimal representation of the thumbprint.


Question: Validate that arguments passed to submit_job have valid file providers .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = arg_0 . job_resources arg_6 = arg_0 . job_params arg_7 = arg_0 . task_descriptors _validate_providers ( [ arg_5 . logging ] , 'logging' , arg_4 , arg_1 ) _validate_providers ( arg_6 [ 'inputs' ] , 'input' , arg_2 , arg_1 ) _validate_providers ( arg_6 [ 'outputs' ] , 'output' , arg_3 , arg_1 ) for arg_8 in arg_7 : _validate_providers ( arg_8 . task_params [ 'inputs' ] , 'input' , arg_2 , arg_1 ) _validate_providers ( arg_8 . task_params [ 'outputs' ] , 'output' , arg_3 , arg_1 )

Remove groups from the model.

        Members of each group are not removed
        from the model (i.e. metabolites, reactions, and genes in the group
        stay in the model after any groups containing them are removed).

        Parameters
        ----------
        group_list : list
            A list of `cobra.Group` objects to remove from the model.


Question: Checks that a key matching a wildcard expression exists in a bucket

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = '' ) : return arg_0 . get_wildcard_key ( arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 ) is not None

Handle marking messages as read and keeping client active.


Question: Handler for ls command

def Func ( arg_0 , arg_1 ) : if len ( arg_1 ) == 1 : arg_0 . pretty_print ( arg_0 . s3handler ( ) . list_buckets ( ) ) return arg_0 . validate ( 'cmd|s3' , arg_1 ) arg_0 . pretty_print ( arg_0 . s3handler ( ) . s3walk ( arg_1 [ 1 ] ) )

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


Question: Parses the dot_code string and replaces the existing model .

def Func ( arg_0 ) : arg_1 = GodotDataParser ( ) arg_2 = arg_1 . parse_dot_data ( arg_0 . dot_code ) if arg_2 is not None : arg_0 . model = arg_2

Awake one process waiting to receive data on fd


Question: Update sent packet metrics

def Func ( arg_0 , arg_1 ) : arg_0 . update_count ( arg_0 . SENT_PKT_COUNT ) arg_0 . update_count ( arg_0 . SENT_PKT_SIZE , incr_by = arg_1 )


Question: Read a notebook from a file like object

def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_1 . Func ( ) if not py3compat . PY3 and not isinstance ( arg_3 , unicode ) : arg_3 = py3compat . str_to_unicode ( arg_3 ) return arg_0 . Funcs ( arg_3 , ** arg_2 )

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


Question: Sparse matrix roll

def Func ( arg_0 , arg_1 , arg_2 = 0 ) : if not scipy . sparse . isspmatrix ( arg_0 ) : return np . roll ( arg_0 , arg_1 , arg_2 = arg_2 ) if arg_2 not in [ 0 , 1 , - 1 ] : raise ParameterError ( 'axis must be one of (0, 1, -1)' ) arg_1 = np . mod ( arg_1 , arg_0 . shape [ arg_2 ] ) if arg_1 == 0 : return arg_0 . copy ( ) arg_3 = arg_0 . format if arg_2 == 0 : arg_0 = arg_0 . tocsc ( ) elif arg_2 in ( - 1 , 1 ) : arg_0 = arg_0 . tocsr ( ) arg_4 = scipy . sparse . lil_matrix ( arg_0 . shape , dtype = arg_0 . dtype ) arg_5 = [ slice ( None ) ] * arg_0 . ndim arg_6 = [ slice ( None ) ] * arg_4 . ndim arg_5 [ arg_2 ] = slice ( 0 , - arg_1 ) arg_6 [ arg_2 ] = slice ( arg_1 , None ) arg_4 [ arg_7 ( arg_6 ) ] = arg_0 [ arg_7 ( arg_5 ) ] arg_6 [ arg_2 ] = slice ( 0 , arg_1 ) arg_5 [ arg_2 ] = slice ( - arg_1 , None ) arg_4 [ arg_7 ( arg_6 ) ] = arg_0 [ arg_7 ( arg_5 ) ] return arg_4 . asformat ( arg_3 )


Question: Retrieves the number of members of the organization .

def Func ( arg_0 ) : print 'Getting members.' arg_1 = 0 for arg_2 in arg_0 . org_retrieved . iter_members ( ) : arg_0 . members_json [ arg_2 . id ] = arg_2 . to_json ( ) arg_1 += 1 return arg_1

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


Question: Deletes the given version of a model . Blocks until finished .

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

Set the rotation of this body using a rotation matrix.

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


Question: Reset the LegacyClientStream object state making the object ready to handle new connections .

def Func ( arg_0 ) : ClientStream . Func ( arg_0 ) arg_0 . available_auth_methods = None arg_0 . auth_stanza = None arg_0 . registration_callback = None

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

    :param globs: Patterns to be processed by :mod:`fnmatch`.
    :type globs: iterable of :class:`~__builtins__.str`

    :param prefix: If ``True``, then :meth:`~re.RegexObject.match` will
        perform prefix matching rather than exact string matching.
    :type prefix: :class:`~__builtins__.bool`

    :rtype: :class:`re.RegexObject`