Question: Set a url parameter .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 is None or isinstance ( arg_2 , ( int , float , bool ) ) : arg_2 = str ( arg_2 ) if arg_1 . endswith ( '64' ) : arg_2 = urlsafe_b64encode ( arg_2 . encode ( 'utf-8' ) ) arg_2 = arg_2 . replace ( b ( '=' ) , b ( '' ) ) arg_0 . _parameters [ 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: Add v to the hash recursively if needed .

def Func ( arg_0 , arg_1 ) : arg_0 . md5 . Func ( to_bytes ( str ( type ( arg_1 ) ) ) ) if isinstance ( arg_1 , string_class ) : arg_0 . md5 . Func ( to_bytes ( arg_1 ) ) elif arg_1 is None : pass elif isinstance ( arg_1 , ( int , float ) ) : arg_0 . md5 . Func ( to_bytes ( str ( arg_1 ) ) ) elif isinstance ( arg_1 , ( tuple , list ) ) : for arg_2 in arg_1 : arg_0 . Func ( arg_2 ) elif isinstance ( arg_1 , dict ) : arg_3 = arg_1 . keys ( ) for arg_4 in sorted ( arg_3 ) : arg_0 . Func ( arg_4 ) arg_0 . Func ( arg_1 [ arg_4 ] ) else : for arg_4 in dir ( arg_1 ) : if arg_4 . startswith ( '__' ) : continue arg_5 = getattr ( arg_1 , arg_4 ) if inspect . isroutine ( arg_5 ) : continue arg_0 . Func ( arg_4 ) arg_0 . Func ( arg_5 )


Question: Enable event loop integration with pyglet .

def Func ( arg_0 , arg_1 = None ) : import pyglet from IPython . lib . inputhookpyglet import inputhook_pyglet arg_0 . set_inputhook ( inputhook_pyglet ) arg_0 . _current_gui = GUI_PYGLET return arg_1

Dump a certificate revocation list to a buffer.

    :param type: The file type (one of ``FILETYPE_PEM``, ``FILETYPE_ASN1``, or
        ``FILETYPE_TEXT``).
    :param CRL crl: The CRL to dump.

    :return: The buffer with the CRL.
    :rtype: bytes


Question: Retrieves a list of all NICs bound to the specified server .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 1 ) : arg_4 = arg_0 . _perform_request ( '/datacenters/%s/servers/%s/nics?depth=%s' % ( arg_1 , arg_2 , str ( arg_3 ) ) ) return arg_4

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


Question: Parse a StackExchange API raw response .

def Func ( arg_0 ) : arg_1 = json . loads ( arg_0 ) arg_2 = arg_1 [ 'items' ] for arg_3 in arg_2 : yield arg_3

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


Question: Change the number of servers in the queue to n .

def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_1 , numbers . Integral ) and arg_1 is not infty : arg_2 = "n must be an integer or infinity.\n{0}" raise TypeError ( arg_2 . format ( str ( arg_0 ) ) ) elif arg_1 <= 0 : arg_2 = "n must be a positive integer or infinity.\n{0}" raise ValueError ( arg_2 . format ( str ( arg_0 ) ) ) else : arg_0 . num_servers = arg_1

Returns the current ZipkinAttrs and generates new ones if needed.

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


Question: Get the command to start the checkpoint manager process

def Func ( arg_0 ) : arg_1 = 'org.apache.heron.ckptmgr.CheckpointManager' arg_2 = arg_0 . checkpoint_manager_ram / ( 1024 * 1024 ) arg_3 = [ os . path . join ( arg_0 . heron_java_home , "bin/java" ) , '-Xms%dM' % arg_2 , '-Xmx%dM' % arg_2 , '-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:+UseConcMarkSweepGC' , '-Xloggc:log-files/gc.ckptmgr.log' , '-Djava.net.preferIPv4Stack=true' , '-cp' , arg_0 . checkpoint_manager_classpath , arg_1 , '-t' + arg_0 . topology_name , '-i' + arg_0 . topology_id , '-c' + arg_0 . ckptmgr_ids [ arg_0 . shard ] , '-p' + arg_0 . checkpoint_manager_port , '-f' + arg_0 . stateful_config_file , '-o' + arg_0 . override_config_file , '-g' + arg_0 . heron_internals_config_file ] arg_4 = { } arg_4 [ arg_0 . ckptmgr_ids [ arg_0 . shard ] ] = Command ( arg_3 , arg_0 . shell_env ) return arg_4

Returns the profile with the received ID as a dict

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

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

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


Question: Retrieve Zotero items via the API Combine endpoint and request to access the specific resource Returns a JSON document

def Func ( arg_0 , arg_1 = None ) : arg_2 = "%s%s" % ( arg_0 . endpoint , arg_1 ) arg_0 . self_link = arg_1 arg_0 . request = requests . get ( url = arg_2 , headers = arg_0 . default_headers ( ) ) arg_0 . request . encoding = "utf-8" try : arg_0 . request . raise_for_status ( ) except requests . exceptions . HTTPError : error_handler ( arg_0 . request ) return arg_0 . request

hyperpolarization step. Use to calculate tau and stuff.


Question: Return a valid docker_path for a GCS bucket .

def Func ( arg_0 , arg_1 ) : arg_1 = directory_fmt ( arg_1 ) arg_2 , arg_3 = _gcs_uri_rewriter ( arg_1 ) arg_4 = os . path . join ( arg_0 . _relative_path , arg_3 ) return arg_4

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: given a path or list of files return ABF IDs .

def Func ( arg_0 ) : if type ( arg_0 ) is str : arg_0 = glob . glob ( arg_0 + "/*.*" ) arg_1 = [ ] for arg_2 in arg_0 : if arg_2 [ - 4 : ] . lower ( ) == '.abf' : arg_3 = arg_2 . split ( '.' ) [ - 1 ] arg_1 . append ( os . path . basename ( arg_2 ) . replace ( '.' + arg_3 , '' ) ) return sorted ( arg_1 )

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: Add chain to current shelve file

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 not in arg_0 . chains : setattr ( arg_0 . chains , arg_1 , MarkovChain ( arg_2 = arg_2 ) ) else : raise ValueError ( "Chain with this name already exists" )

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: See if span tag has underline style and wrap with u tag .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . get ( 'style' ) if arg_2 and 'text-decoration:underline' in arg_2 : arg_1 . wrap ( arg_0 . soup . new_tag ( 'u' ) )

Sets the main input channels of the pipeline and their forks.

        The ``raw_input`` dictionary input should contain one entry for each
        input type (fastq, fasta, etc). The corresponding value should be a
        dictionary/json with the following key:values:

        - ``channel``: Name of the raw input channel (e.g.: channel1)
        - ``channel_str``: The nextflow definition of the channel and
           eventual checks (e.g.: channel1 = Channel.fromPath(param))
        - ``raw_forks``: A list of channels to which the channel name will
          for to.

        Each new type of input parameter is automatically added to the
        :attr:`params` attribute, so that they are automatically collected
        for the pipeline description and help.

        Parameters
        ----------
        raw_input : dict
            Contains an entry for each input type with the channel name,
            channel string and forks.


Question: Update a firewall rule for an Azure SQL Database server .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : _validate_not_none ( 'server_name' , arg_1 ) _validate_not_none ( 'name' , arg_2 ) _validate_not_none ( 'start_ip_address' , arg_3 ) _validate_not_none ( 'end_ip_address' , arg_4 ) return arg_0 . _perform_put ( arg_0 . _get_firewall_rules_path ( arg_1 , arg_2 ) , _SqlManagementXmlSerializer . Func_to_xml ( arg_2 , arg_3 , arg_4 ) )

Sort list of string with number in human order.

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

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


Question: Get one of the backing abdress books by its name

def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . _abooks : if arg_2 . name == arg_1 : return arg_2

Whether a connection can be established between those two meshes.


Question: Generates a URL to the given endpoint with the method provided .

def Func ( arg_0 , ** arg_1 ) : arg_2 = _app_ctx_stack . top arg_3 = _request_ctx_stack . top if arg_2 is None : raise RuntimeError ( 'Attempted to generate a URL without the ' 'application context being pushed. This has to be ' 'executed when application context is available.' ) if arg_3 is not None : arg_4 = arg_3 . url_adapter arg_5 = request . blueprint if not arg_3 . request . _is_old_module : if arg_0 [ : 1 ] == '.' : if arg_5 is not None : arg_0 = arg_5 + arg_0 else : arg_0 = arg_0 [ 1 : ] else : if '.' not in arg_0 : if arg_5 is not None : arg_0 = arg_5 + '.' + arg_0 elif arg_0 . startswith ( '.' ) : arg_0 = arg_0 [ 1 : ] arg_6 = arg_1 . pop ( '_external' , False ) else : arg_4 = arg_2 . url_adapter if arg_4 is None : raise RuntimeError ( 'Application was not able to create a URL ' 'adapter for request independent URL generation. ' 'You might be able to fix this by setting ' 'the SERVER_NAME config variable.' ) arg_6 = arg_1 . pop ( '_external' , True ) arg_7 = arg_1 . pop ( '_anchor' , None ) arg_8 = arg_1 . pop ( '_method' , None ) arg_9 = arg_1 . pop ( '_scheme' , None ) arg_2 . app . inject_url_defaults ( arg_0 , arg_1 ) if arg_9 is not None : if not arg_6 : raise ValueError ( 'When specifying _scheme, _external must be True' ) arg_4 . url_scheme = arg_9 try : arg_11 = arg_4 . build ( arg_0 , arg_1 , arg_8 = arg_8 , force_external = arg_6 ) except BuildError as error : arg_1 [ '_external' ] = arg_6 arg_1 [ '_anchor' ] = arg_7 arg_1 [ '_method' ] = arg_8 return arg_2 . app . handle_url_build_error ( error , arg_0 , arg_1 ) if arg_7 is not None : arg_11 += '#' + url_quote ( arg_7 ) return arg_11

Reads the head of the las file and returns it


Question: Writing the configure file with the attributes in args

def Func ( arg_0 ) : logging . info ( "Writing configure file: %s" % arg_0 . config_file ) if arg_0 . config_file is None : return arg_1 = cparser . ConfigParser ( ) arg_1 . add_section ( "lrcloud" ) for arg_2 in [ x for x in dir ( arg_0 ) if not x . startswith ( "_" ) ] : if arg_2 in IGNORE_ARGS : continue arg_3 = getattr ( arg_0 , arg_2 ) if arg_3 is not None : arg_1 . set ( 'lrcloud' , arg_2 , str ( arg_3 ) ) with open ( arg_0 . config_file , 'w' ) as f : arg_1 . Func ( f )

Returns how the result count compares to the query options.

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

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


Question: Checks element definitions .

def Func ( arg_0 ) : arg_1 = set ( arg_0 . elements . type . argiope . values . flatten ( ) ) arg_2 = set ( ELEMENTS . keys ( ) ) if ( arg_1 <= arg_2 ) == False : raise ValueError ( "Element types {0} not in know elements {1}" . format ( arg_1 - arg_2 , arg_2 ) ) print ( "<Elements: OK>" )

Clip input array with a vector list.

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

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


Question: Stackted recurrent neural networks GRU or LSTM

def Func ( arg_0 : arg_1 . Tensor , arg_3 : arg_4 , arg_5 = 'gru' , arg_6 = None , arg_7 = False , arg_8 = 'RNN_layer' ) : for arg_9 , arg_10 in enumerate ( arg_3 ) : with arg_1 . variable_scope ( arg_8 + '_' + str ( arg_9 ) ) : if arg_5 == 'gru' : arg_11 = arg_1 . nn . rnn_cell . GRUCell ( arg_10 ) arg_12 = arg_1 . nn . rnn_cell . GRUCell ( arg_10 ) elif arg_5 == 'lstm' : arg_11 = arg_1 . nn . rnn_cell . LSTMCell ( arg_10 , arg_7 = arg_7 ) arg_12 = arg_1 . nn . rnn_cell . LSTMCell ( arg_10 , arg_7 = arg_7 ) else : raise RuntimeError ( 'cell_type must be either gru or lstm' ) ( arg_13 , arg_14 ) , ( arg_15 , arg_16 ) = arg_1 . nn . bidirectional_dynamic_rnn ( arg_11 , arg_12 , arg_0 , dtype = arg_1 . float32 , sequence_length = arg_6 ) arg_0 = arg_1 . concat ( [ arg_13 , arg_14 ] , axis = 2 ) if arg_5 == 'gru' : arg_17 = arg_1 . concat ( [ arg_15 , arg_16 ] , axis = 1 ) else : ( arg_18 , arg_19 ) , ( arg_20 , arg_21 ) = arg_15 , arg_16 arg_22 = arg_1 . concat ( [ arg_18 , arg_20 ] , axis = 1 ) arg_23 = arg_1 . concat ( [ arg_19 , arg_21 ] , axis = 1 ) arg_17 = ( arg_23 , arg_22 ) return arg_0 , arg_17


Question: Starts command in a subprocess . Prints every line the command prints prefaced with description .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = False ) : arg_4 = shlex . split ( arg_0 ) try : arg_5 = subprocess . Popen ( arg_4 , stdout = subprocess . PIPE , stderr = subprocess . STDOUT , stdin = subprocess . PIPE ) except Exception as e : raise IOError ( 'Encountered error: {0} when running command {1}' . format ( e . message , ' ' . join ( arg_4 ) ) ) if arg_2 is not None : arg_5 . stdin . write ( arg_2 ) arg_5 . stdin . flush ( ) while arg_5 . poll ( ) is None : try : arg_6 = arg_5 . stdout . readline ( ) except KeyboardInterrupt : sys . exit ( 'Keyboard interrupt while running {}' . format ( arg_0 ) ) if len ( arg_6 . strip ( ) ) == 0 and arg_3 is True : continue elif 'killed by signal 1' in decode ( arg_6 ) . lower ( ) : continue elif 'to the list of known hosts' in decode ( arg_6 ) . lower ( ) : continue if arg_1 is not None : arg_6 = arg_1 ( arg_6 ) sys . stdout . write ( arg_6 ) arg_7 = arg_5 . poll ( ) return arg_7

Removes a NIC from the load balancer.

        :param      datacenter_id: The unique ID of the data center.
        :type       datacenter_id: ``str``

        :param      loadbalancer_id: The unique ID of the load balancer.
        :type       loadbalancer_id: ``str``

        :param      nic_id: The unique ID of the NIC.
        :type       nic_id: ``str``


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

def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : arg_6 = BytearrayStream ( ) if arg_0 . _unique_identifier : arg_0 . _unique_identifier . Func ( arg_6 , arg_2 = arg_2 ) else : raise ValueError ( "Invalid struct missing the unique identifier attribute." ) if arg_0 . _cryptographic_parameters : arg_0 . _cryptographic_parameters . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . length = arg_6 . length ( ) super ( MACSignatureKeyInformation , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_1 . Func ( arg_6 . buffer )

Initialize the bucket map assuming the given number of maxBuckets.


Question: Register an extension code .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_2 = int ( arg_2 ) if not 1 <= arg_2 <= 0x7fffffff : raise ValueError , "code out of range" arg_3 = ( arg_0 , arg_1 ) if ( arg_4 . get ( arg_3 ) == arg_2 and arg_5 . get ( arg_2 ) == arg_3 ) : return if arg_3 in arg_4 : raise ValueError ( "key %s is already registered with code %s" % ( arg_3 , arg_4 [ arg_3 ] ) ) if arg_2 in arg_5 : raise ValueError ( "code %s is already in use for key %s" % ( arg_2 , arg_5 [ arg_2 ] ) ) arg_4 [ arg_3 ] = arg_2 arg_5 [ arg_2 ] = arg_3

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


Question: Returns a new AudioSegment whose data is the same as this one but which has been resampled to the specified characteristics . Any parameter left None will be unchanged .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = False ) : if arg_1 is None : arg_1 = arg_0 . frame_rate if arg_2 is None : arg_2 = arg_0 . sample_width if arg_3 is None : arg_3 = arg_0 . channels arg_5 = "sox {inputfile} -b " + str ( arg_2 * 8 ) + " -r " + str ( arg_1 ) + " -t wav {outputfile} channels " + str ( arg_3 ) return arg_0 . _execute_sox_cmd ( arg_5 , arg_4 = arg_4 )

Delete this droplet

        Parameters
        ----------
        wait: bool, default True
            Whether to block until the pending action is completed


Question: Loads a class from a string naming the module and class name .

def Func ( arg_0 ) : arg_1 = arg_0 . split ( "." ) arg_2 = "." . join ( arg_1 [ : - 1 ] ) arg_3 = arg_1 [ - 1 ] arg_4 = importlib . import_module ( arg_2 ) return getattr ( arg_4 , arg_3 )

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: Shrinks the simplex around the best vertex .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = arg_1 [ arg_2 ] arg_6 = arg_5 + arg_3 * ( arg_1 - arg_5 ) arg_7 , arg_8 = _evaluate_objective_multiple ( arg_0 , arg_6 , arg_4 ) return ( False , arg_6 , arg_7 , arg_8 )

Handle a request whose date doesn't match the signing key scope date.

        This AWS4Auth class implementation regenerates the signing key. See
        StrictAWS4Auth class if you would prefer an exception to be raised.

        req -- a requests prepared request object


Question: Fully describes an ELB .

def Func ( arg_0 , arg_1 = arg_2 . ALL ^ arg_2 . POLICY_TYPES , ** arg_5 ) : try : arg_6 except NameError as _ : arg_6 = str if isinstance ( arg_0 , arg_6 ) : arg_0 = dict ( LoadBalancerName = arg_0 ) return registry . build_out ( arg_1 , start_with = arg_0 , pass_datastructure = True , ** arg_5 )

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: Retrieves all virtual machines instances in the current environment .

def Func ( arg_0 = 1 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None ) : from burlap . common import shelf , OrderedDict , get_verbose arg_5 = get_verbose ( ) require ( 'vm_type' , 'vm_group' ) assert arg_6 . vm_type , 'No VM type specified.' arg_6 . vm_type = ( arg_6 . vm_type or '' ) . lower ( ) arg_8 = arg_1 arg_9 = arg_2 arg_10 = arg_3 if arg_5 : print ( 'name=%s, group=%s, release=%s' % ( arg_8 , arg_9 , arg_10 ) ) arg_6 . vm_elastic_ip_mappings = shelf . get ( 'vm_elastic_ip_mappings' ) arg_12 = type ( arg_6 ) ( ) if arg_6 . vm_type == EC2 : if arg_5 : print ( 'Checking EC2...' ) for arg_13 in get_all_running_ec2_instances ( ) : arg_1 = arg_13 . tags . get ( arg_6 . vm_name_tag ) arg_2 = arg_13 . tags . get ( arg_6 . vm_group_tag ) arg_3 = arg_13 . tags . get ( arg_6 . vm_release_tag ) if arg_6 . vm_group and arg_6 . vm_group != arg_2 : if arg_5 : print ( ( 'Skipping instance %s because its group "%s" ' 'does not match env.vm_group "%s".' ) % ( arg_13 . public_dns_name , arg_2 , arg_6 . vm_group ) ) continue if arg_9 and arg_2 != arg_9 : if arg_5 : print ( ( 'Skipping instance %s because its group "%s" ' 'does not match local group "%s".' ) % ( arg_13 . public_dns_name , arg_2 , arg_9 ) ) continue if arg_8 and arg_1 != arg_8 : if arg_5 : print ( ( 'Skipping instance %s because its name "%s" ' 'does not match name "%s".' ) % ( arg_13 . public_dns_name , arg_1 , arg_8 ) ) continue if arg_10 and arg_3 != arg_10 : if arg_5 : print ( ( 'Skipping instance %s because its release "%s" ' 'does not match release "%s".' ) % ( arg_13 . public_dns_name , arg_3 , arg_10 ) ) continue if arg_4 and arg_3 == arg_4 : continue if arg_5 : print ( 'Adding instance %s (%s).' % ( arg_1 , arg_13 . public_dns_name ) ) arg_12 . setdefault ( arg_1 , type ( arg_6 ) ( ) ) arg_12 [ arg_1 ] [ 'id' ] = arg_13 . id arg_12 [ arg_1 ] [ 'public_dns_name' ] = arg_13 . public_dns_name if arg_5 : print ( 'Public DNS: %s' % arg_13 . public_dns_name ) if arg_6 . vm_elastic_ip_mappings and arg_1 in arg_6 . vm_elastic_ip_mappings : arg_12 [ arg_1 ] [ 'ip' ] = arg_6 . vm_elastic_ip_mappings [ arg_1 ] else : arg_12 [ arg_1 ] [ 'ip' ] = socket . gethostbyname ( arg_13 . public_dns_name ) if int ( arg_0 ) : pprint ( arg_12 , indent = 4 ) return arg_12 elif arg_6 . vm_type == KVM : pass else : raise NotImplementedError

Checks if a Pong message was received.

        :return:


Question: Return a generator that GETs and yields individual JSON items .

def Func ( arg_0 , arg_1 , arg_2 = None , ** arg_3 ) : arg_4 = arg_0 . get_pages ( arg_1 , arg_2 = arg_2 , ** arg_3 ) for arg_5 in arg_4 : assert isinstance ( arg_5 , dict ) arg_6 = arg_5 . get ( 'items' ) if arg_6 is None : arg_7 = "'items' key not found in JSON data: " "{!r}" . format ( arg_5 ) raise MalformedResponse ( arg_7 ) else : for arg_8 in arg_6 : yield arg_8

Unregister an extension code.  For testing only.


Question: Return if self is mergeable with timeslots .

def Func ( arg_0 , arg_1 : 'TimeslotCollection' ) -> bool : for arg_2 in arg_1 . timeslots : for arg_3 in arg_0 . _table [ arg_2 . channel ] : if arg_2 . interval . has_overlap ( arg_3 ) : return False return True

Get the reason of this revocation.

        :return: The reason, or ``None`` if there is none.
        :rtype: bytes or NoneType

        .. seealso::

            :meth:`all_reasons`, which gives you a list of all supported
            reasons this method might return.


Question: Perform a rachted step calculating a new shared secret from the public key and deriving new chain keys from this secret .

def Func ( arg_0 , arg_1 ) : if arg_0 . triggersStep ( arg_1 ) : arg_0 . __wrapOtherPub ( arg_1 ) arg_0 . __newRootKey ( "receiving" ) arg_0 . __newRatchetKey ( ) arg_0 . __newRootKey ( "sending" )

r''' Return a datetime.tzinfo implementation for the given timezone

    >>> from datetime import datetime, timedelta
    >>> utc = timezone('UTC')
    >>> eastern = timezone('US/Eastern')
    >>> eastern.zone
    'US/Eastern'
    >>> timezone(unicode('US/Eastern')) is eastern
    True
    >>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)
    >>> loc_dt = utc_dt.astimezone(eastern)
    >>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
    >>> loc_dt.strftime(fmt)
    '2002-10-27 01:00:00 EST (-0500)'
    >>> (loc_dt - timedelta(minutes=10)).strftime(fmt)
    '2002-10-27 00:50:00 EST (-0500)'
    >>> eastern.normalize(loc_dt - timedelta(minutes=10)).strftime(fmt)
    '2002-10-27 01:50:00 EDT (-0400)'
    >>> (loc_dt + timedelta(minutes=10)).strftime(fmt)
    '2002-10-27 01:10:00 EST (-0500)'

    Raises UnknownTimeZoneError if passed an unknown zone.

    >>> try:
    ...     timezone('Asia/Shangri-La')
    ... except UnknownTimeZoneError:
    ...     print('Unknown')
    Unknown

    >>> try:
    ...     timezone(unicode('\N{TRADE MARK SIGN}'))
    ... except UnknownTimeZoneError:
    ...     print('Unknown')
    Unknown


Question: Return the number of combinations for n choose k .

def Func ( arg_0 , arg_1 ) : if arg_0 == 0 : return 0 return reduce ( lambda x , y : x * y [ 0 ] / y [ 1 ] , zip ( range ( arg_0 - arg_1 + 1 , arg_0 + 1 ) , range ( 1 , arg_1 + 1 ) ) , 1 )

Returns uptime in seconds or None, on MINIX.


Question: Returns the configuration for KEY

def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_1 in arg_0 . config : return arg_0 . config . get ( arg_1 ) else : 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: Useful utility ; prints the string in hexadecimal

def Func ( arg_0 ) : for arg_1 in range ( len ( arg_0 ) ) : sys . stdout . write ( "%2x " % ( ord ( arg_0 [ arg_1 ] ) ) ) if ( arg_1 + 1 ) % 8 == 0 : print repr ( arg_0 [ arg_1 - 7 : arg_1 + 1 ] ) if ( len ( arg_0 ) % 8 != 0 ) : print string . rjust ( "" , 11 ) , repr ( arg_0 [ arg_1 - len ( arg_0 ) % 8 : arg_1 + 1 ] )

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: Verify BOARD variables and construct exported variables

def Func ( ) : if cij . ssh . Func ( ) : cij . err ( "board.Func: invalid SSH Funcironment" ) return 1 arg_0 = cij . Func_to_dict ( PREFIX , REQUIRED ) if arg_0 is None : cij . err ( "board.Func: invalid BOARD Funcironment" ) return 1 arg_0 [ "CLASS" ] = "_" . join ( [ arg_0 [ r ] for r in REQUIRED [ : - 1 ] ] ) arg_0 [ "IDENT" ] = "-" . join ( [ arg_0 [ "CLASS" ] , arg_0 [ "ALIAS" ] ] ) cij . Func_export ( PREFIX , EXPORTED , arg_0 ) return 0

This turns the pickled lightcurve file back into an `lcdict`.

    Parameters
    ----------

    picklefile : str
        The path to a previously written Kepler LC picklefile generated by
        `kepler_lcdict_to_pkl` above.

    Returns
    -------

    lcdict
        Returns an `lcdict` (this is useable by most astrobase functions for LC
        processing).


Question: Return a temporary file with the given suffix within dirpath . If dirpath is None will look for a temporary folder in your system .

def Func ( arg_0 = '.txt' , arg_1 = None ) : if arg_1 is None : arg_1 = get_temp_dir ( ) return tempfile . NamedTemporaryFile ( arg_0 = arg_0 , dir = arg_1 )

Whether a connection can be established between those two meshes.


Question: Return True if QuantumChannel is a unitary channel .

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : try : arg_3 = arg_0 . to_operator ( ) return arg_3 . Func ( arg_1 = arg_1 , arg_2 = arg_2 ) except QiskitError : return False

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


Question: Handles static files requests .

def Func ( arg_0 ) : arg_1 = os . path . join ( os . path . dirname ( __file__ ) , _STATIC_DIR , arg_0 . path [ 1 : ] ) with io . open ( arg_1 , 'rb' ) as res_file : arg_2 = res_file . read ( ) arg_3 , arg_4 = os . path . splitext ( arg_0 . path ) return arg_2 , 'text/%s' % arg_4 [ 1 : ]

Returns a new random state.

    Parameters
    ----------
    seed : None or int, optional
        Optional seed value to use.
        The same datatypes are allowed as for ``numpy.random.RandomState(seed)``.

    fully_random : bool, optional
        Whether to use numpy's random initialization for the
        RandomState (used if set to True). If False, a seed is sampled from
        the global random state, which is a bit faster and hence the default.

    Returns
    -------
    numpy.random.RandomState
        The new random state.


Question: Gets username course_id and enterprise_customer_uuid which are the relevant query parameters for this API endpoint .

def Func ( arg_0 , arg_1 ) : arg_2 = get_request_value ( arg_1 , arg_0 . REQUIRED_PARAM_USERNAME , '' ) arg_3 = get_request_value ( arg_1 , arg_0 . REQUIRED_PARAM_COURSE_ID , '' ) arg_4 = get_request_value ( arg_1 , arg_0 . REQUIRED_PARAM_PROGRAM_UUID , '' ) arg_5 = get_request_value ( arg_1 , arg_0 . REQUIRED_PARAM_ENTERPRISE_CUSTOMER ) if not ( arg_2 and ( arg_3 or arg_4 ) and arg_5 ) : raise ConsentAPIRequestError ( arg_0 . get_missing_params_message ( [ ( "'username'" , bool ( arg_2 ) ) , ( "'enterprise_customer_uuid'" , bool ( arg_5 ) ) , ( "one of 'course_id' or 'program_uuid'" , bool ( arg_3 or arg_4 ) ) , ] ) ) return arg_2 , arg_3 , arg_4 , arg_5

Returns a weak reference to the given method or function.
    If the callback argument is not None, it is called as soon
    as the referenced function is garbage deleted.

    :type  function: callable
    :param function: The function to reference.
    :type  callback: callable
    :param callback: Called when the function dies.


Question: Create the task on the server

def Func ( arg_0 , arg_1 ) : if len ( arg_0 . geometries ) == 0 : raise Exception ( 'no geometries' ) return arg_1 . post ( 'task_admin' , arg_0 . as_payload ( ) , replacements = { 'slug' : arg_0 . __challenge__ . slug , 'identifier' : arg_0 . identifier } )

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


Question: Return a client with same settings of the batch client

def Func ( arg_0 ) : arg_1 = Client ( arg_0 . host , arg_0 . port , arg_0 . prefix ) arg_0 . _configure_client ( arg_1 ) return arg_1

Helper method to clean up DAG file processors to avoid leaving orphan processes.


Question: prop is a sugar for property .

def Func ( arg_0 = None , * , arg_1 = arg_2 , arg_3 : arg_4 = True , arg_5 : arg_4 = True , arg_6 : arg_4 = False , arg_7 = arg_2 , arg_8 : arg_9 = arg_2 ) : def wrap ( arg_0 ) : if not callable ( arg_0 ) : raise TypeError arg_10 = arg_0 . __name__ arg_11 = arg_1 if arg_11 is arg_2 : arg_11 = '_' + arg_10 arg_12 , arg_13 , arg_14 = None , None , None if arg_3 : def arg_12 ( arg_15 ) : try : return arg_15 . __dict__ [ arg_11 ] except KeyError : if arg_7 is not arg_2 : return arg_7 raise AttributeError ( f"'{type(self).__name__}' object has no attribute '{key}'" ) if arg_5 : def arg_13 ( arg_15 , arg_16 ) : if arg_8 is not arg_2 and not isinstance ( arg_16 , arg_8 ) : if isinstance ( arg_8 , arg_9 ) : arg_17 = arg_9 ( x . __name__ for x in arg_8 ) else : arg_17 = arg_8 . __name__ raise TypeError ( f'type of {type(self).__name__}.{Func_name} must be {types_name}; ' f'got {type(val).__name__} instead' ) arg_15 . __dict__ [ arg_11 ] = arg_16 if arg_6 : def arg_14 ( arg_15 ) : del arg_15 . __dict__ [ arg_11 ] return Funcerty ( arg_12 , arg_13 , arg_14 , arg_0 . __doc__ ) return wrap ( arg_0 ) if arg_0 else wrap

Get the reason of this revocation.

        :return: The reason, or ``None`` if there is none.
        :rtype: bytes or NoneType

        .. seealso::

            :meth:`all_reasons`, which gives you a list of all supported
            reasons this method might return.


Question: Set the time zone data of this object from a _tzfile object

def Func ( arg_0 , arg_1 ) : for arg_2 in _tzfile . attrs : setattr ( arg_0 , '_' + arg_2 , getattr ( arg_1 , arg_2 ) )


Question: Returns an etree HTML node with a document describing the process . This is only supported if the editor provided an SVG representation .

def Func ( arg_0 ) : arg_1 = ET . Element ( 'html' ) arg_2 = ET . SubElement ( arg_1 , 'head' ) arg_3 = ET . SubElement ( arg_2 , 'title' ) arg_3 . text = arg_0 . description arg_5 = ET . SubElement ( arg_1 , 'body' ) arg_6 = ET . SubElement ( arg_5 , 'h1' ) arg_6 . text = arg_0 . description arg_7 = ET . SubElement ( arg_5 , 'span' ) arg_7 . text = '___CONTENT___' arg_8 = ET . tostring ( arg_1 ) arg_9 = '' arg_10 = set ( ) for arg_11 in arg_0 . get_specs_depth_first ( ) : if arg_11 . svg and arg_11 . svg not in arg_10 : arg_9 += '<p>' + arg_11 . svg + "</p>" arg_10 . add ( arg_11 . svg ) return arg_8 . replace ( '___CONTENT___' , arg_9 )


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

def Func ( arg_0 ) : try : arg_1 = int ( arg_0 . registry . settings . get ( 'post_token_max_age_seconds' ) ) except Exception : arg_1 = 300 try : arg_2 = parse_post_token ( token = arg_0 . matchdict [ 'token' ] , secret = arg_0 . registry . settings [ 'post_secret' ] , arg_1 = arg_1 ) except SignatureExpired : raise HTTPGone ( 'dropbox expired' ) except Exception : raise HTTPNotFound ( 'no such dropbox' ) arg_3 = arg_0 . registry . settings [ 'dropbox_container' ] . get_dropbox ( arg_2 ) if arg_3 . status_int >= 20 : raise HTTPGone ( 'dropbox already in processing, no longer accepts data' ) return arg_3

Convert segmentation map to heatmaps object.

        Each segmentation map class will be represented as a single heatmap channel.

        Parameters
        ----------
        only_nonempty : bool, optional
            If True, then only heatmaps for classes that appear in the segmentation map will be
            generated. Additionally, a list of these class ids will be returned.

        not_none_if_no_nonempty : bool, optional
            If `only_nonempty` is True and for a segmentation map no channel was non-empty,
            this function usually returns None as the heatmaps object. If however this parameter
            is set to True, a heatmaps object with one channel (representing class 0)
            will be returned as a fallback in these cases.

        Returns
        -------
        imgaug.HeatmapsOnImage or None
            Segmentation map as a heatmaps object.
            If `only_nonempty` was set to True and no class appeared in the segmentation map,
            then this is None.

        class_indices : list of int
            Class ids (0 to C-1) of the classes that were actually added to the heatmaps.
            Only returned if `only_nonempty` was set to True.


Question: Parses option_settings as they are defined in the configuration file

def Func ( arg_0 ) : arg_1 = [ ] for arg_2 , arg_3 in list ( arg_0 . items ( ) ) : for arg_4 , arg_5 in list ( arg_3 . items ( ) ) : arg_1 . append ( ( arg_2 , arg_4 , arg_5 ) ) return arg_1

Finds embedded player url in HTTP response.

    :param response: Response object.
    :returns: Player url (str).


Question: Construct a circle .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 50 , ** arg_4 ) : return arg_0 . regular_polygon ( arg_1 , arg_2 , arg_3 , ** arg_4 )

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


Question: Looks for files in the extra locations as defined in MEDIA_FIXTURES_FILES_DIRS .

def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_3 = [ ] for arg_4 , arg_5 in arg_0 . locations : if arg_5 not in searched_locations : searched_locations . append ( arg_5 ) arg_6 = arg_0 . Func_location ( arg_5 , arg_1 , arg_4 ) if arg_6 : if not arg_2 : return arg_6 arg_3 . append ( arg_6 ) return arg_3


Question: Adds an empty result group under the current node .

def Func ( arg_0 , * arg_1 , ** arg_2 ) : return arg_0 . _nn_interface . _add_generic ( arg_0 , type_name = RESULT_GROUP , group_type_name = RESULT_GROUP , arg_1 = arg_1 , arg_2 = arg_2 )

Read attribute from sysfs and return as string


Question: Converts py_zipkin s annotations dict to protobuf .

def Func ( arg_0 ) : arg_1 = [ ] for arg_2 , arg_3 in arg_0 . items ( ) : arg_1 . append ( zipkin_pb2 . Annotation ( timestamp = int ( arg_3 * 1000 * 1000 ) , arg_2 = arg_2 , ) ) return arg_1

Format the exception part of a traceback.

    The arguments are the exception type and value such as given by
    sys.last_type and sys.last_value. The return value is a list of
    strings, each ending in a newline.

    Normally, the list contains a single string; however, for
    SyntaxError exceptions, it contains several lines that (when
    printed) display detailed information about where the syntax
    error occurred.

    The message indicating which exception occurred is always the last
    string in the list.


Question: Invalidate an authorization code after use .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , * arg_4 , ** arg_5 ) : log . debug ( 'Destroy grant token for client %r, %r' , arg_1 , arg_2 ) arg_6 = arg_0 . _grantgetter ( arg_1 = arg_1 , arg_2 = arg_2 ) if arg_6 : arg_6 . delete ( )

Returns opened file object for writing dialog logs.

        Returns:
            log_file: opened Python file object.


Question: Return TypingStatusMessage from hangouts_pb2 . SetTypingNotification .

def Func ( arg_0 ) : return TypingStatusMessage ( conv_id = arg_0 . conversation_id . id , user_id = from_participantid ( arg_0 . sender_id ) , timestamp = from_timestamp ( arg_0 . timestamp ) , status = arg_0 . type , )

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

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


Question: make messages type report

def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_1 [ "by_msg" ] : raise exceptions . EmptyReportError ( ) arg_3 = sorted ( [ ( arg_5 , arg_6 ) for arg_6 , arg_5 in arg_1 [ "by_msg" ] . items ( ) if not arg_6 . startswith ( "I" ) ] ) arg_3 . reverse ( ) arg_4 = ( "message id" , "occurrences" ) for arg_5 , arg_6 in arg_3 : arg_4 += ( arg_6 , str ( arg_5 ) ) arg_0 . append ( report_nodes . Table ( children = arg_4 , cols = 2 , rheaders = 1 ) )

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: use the GUI to ask YES or NO .

def Func ( arg_0 , arg_1 ) : arg_2 = tkinter . Tk ( ) arg_2 . attributes ( "-topmost" , True ) arg_2 . withdraw ( ) arg_3 = tkinter . messagebox . askyesno ( arg_0 , arg_1 ) arg_2 . destroy ( ) return arg_3

Runs statistical profiler on a function.


Question: Export the graph to a SPIA Excel sheet .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 , arg_4 : arg_3 ) : if not arg_2 and not arg_4 : click . secho ( 'Specify at least one option --xlsx or --tsvs' , fg = 'red' ) sys . exit ( 1 ) arg_5 = bel_to_spia_matrices ( arg_0 ) if arg_2 : spia_matrices_to_excel ( arg_5 , arg_2 ) if arg_4 : spia_matrices_to_tsvs ( arg_5 , arg_4 )

Converts all of the non-numeric fields from spatialOutput and temporalOutput
    into their scalar equivalents and records them in the output dictionary.

    :param spatialOutput: The results of topDownCompute() for the spatial input.
    :param temporalOutput: The results of topDownCompute() for the temporal
      input.
    :param output: The main dictionary of outputs passed to compute(). It is
      expected to have keys 'spatialTopDownOut' and 'temporalTopDownOut' that
      are mapped to numpy arrays.


Question: Return the R1 region as defined in the Porter2 specification .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = False if hasattr ( arg_2 , '__iter__' ) : for arg_4 in arg_2 : if arg_1 [ : len ( arg_4 ) ] == arg_4 : return len ( arg_4 ) for arg_5 in range ( len ( arg_1 ) ) : if not arg_3 and arg_1 [ arg_5 ] in arg_0 . _vowels : arg_3 = True elif arg_3 and arg_1 [ arg_5 ] not in arg_0 . _vowels : return arg_5 + 1 return len ( arg_1 )

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


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

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = False ) : arg_5 = adsSyncReadWriteReqEx2 ( arg_0 , arg_1 , ADSIGRP_SYM_HNDBYNAME , 0x0 , PLCTYPE_UDINT , arg_2 , PLCTYPE_STRING , ) arg_6 = adsSyncReadReqEx2 ( arg_0 , arg_1 , ADSIGRP_SYM_VALBYHND , arg_5 , arg_3 , arg_4 ) adsSyncWriteReqEx ( arg_0 , arg_1 , ADSIGRP_SYM_RELEASEHND , 0 , arg_5 , PLCTYPE_UDINT ) return arg_6

Validates API Root information. Raises errors for required
        properties.


Question: Return stripped HTML keeping only MathML .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 ( ) arg_2 . feed ( arg_1 ) arg_3 = arg_2 . unescape ( arg_2 . get_data ( ) ) return escape_for_xml ( arg_3 , tags_to_keep = arg_2 . mathml_elements )

Show an image.

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


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

def Func ( arg_0 ) : while True : arg_1 = arg_0 . _read_varint ( ) if arg_1 == 0 : break for arg_2 in range ( arg_1 ) : arg_3 = arg_0 . _read_varint ( ) if arg_3 == 0 : raise EOFError ( 'unexpected EOF.' ) yield arg_0 . _fd . read ( arg_3 ) if arg_0 . _group_delim : yield arg_0 . _delimiter ( ) if arg_0 . _delimiter is not None else None

Waits for the Job to reach a terminal state.

        This method will periodically check the job state until the job reach
        a terminal state.

        Raises:
            googleapiclient.errors.HttpError: if HTTP error is returned when getting
            the job


Question: Internal utility function for Unified Job Templates . Returns data about the last job run off of that UJT

def Func ( arg_0 , arg_1 = None , ** arg_2 ) : arg_3 = arg_0 . get ( arg_1 , include_debug_header = True , ** arg_2 ) if 'current_update' in arg_3 [ 'related' ] : debug . log ( 'A current job; retrieving it.' , header = 'details' ) return client . get ( arg_3 [ 'related' ] [ 'current_update' ] [ 7 : ] ) . json ( ) elif arg_3 [ 'related' ] . get ( 'last_update' , None ) : debug . log ( 'No current job or update exists; retrieving the most recent.' , header = 'details' ) return client . get ( arg_3 [ 'related' ] [ 'last_update' ] [ 7 : ] ) . json ( ) else : raise exc . NotFound ( 'No related jobs or updates exist.' )

Associates a cobra.Gene object with a cobra.Reaction.

        Parameters
        ----------
        cobra_gene : cobra.core.Gene.Gene


Question: Token can be only a single char . Returns position after token if found . Otherwise raises syntax error if throw otherwise returns None

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = True ) : arg_1 = pass_white ( arg_0 , arg_1 ) if arg_1 < len ( arg_0 ) and arg_0 [ arg_1 ] == arg_2 : return arg_1 + 1 if arg_3 : raise SyntaxError ( 'Missing token. Expected %s' % arg_2 ) return None

Adds headers to the request

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

        Returns:
            The request builder instance in order to chain calls


Question: Load a public key from a buffer .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , _text_type ) : arg_1 = arg_1 . encode ( "ascii" ) arg_2 = _new_mem_buf ( arg_1 ) if arg_0 == FILETYPE_PEM : arg_3 = _lib . PEM_read_bio_PUBKEY ( arg_2 , _ffi . NULL , _ffi . NULL , _ffi . NULL ) elif arg_0 == FILETYPE_ASN1 : arg_3 = _lib . d2i_PUBKEY_bio ( arg_2 , _ffi . NULL ) else : raise ValueError ( "type argument must be FILETYPE_PEM or FILETYPE_ASN1" ) if arg_3 == _ffi . NULL : _raise_current_error ( ) arg_4 = PKey . __new__ ( PKey ) arg_4 . _pkey = _ffi . gc ( arg_3 , _lib . EVP_PKEY_free ) arg_4 . _only_public = True return arg_4


Question: List all events occurring at or after a timestamp .

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

write lines, one by one, separated by \n to device


Question: Print a stack trace from its invocation point .

def Func ( arg_0 = None , arg_1 = None , arg_2 = None ) : if arg_0 is None : try : raise ZeroDivisionError except ZeroDivisionError : arg_0 = sys . exc_info ( ) [ 2 ] . tb_frame . f_back print_list ( extract_stack ( arg_0 , arg_1 ) , arg_2 )

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


Question: check that the argument to reversed is a sequence

def Func ( arg_0 , arg_1 ) : try : arg_2 = utils . safe_infer ( utils . get_argument_from_call ( arg_1 , position = 0 ) ) except utils . NoSuchArgumentError : pass else : if arg_2 is astroid . Uninferable : return if arg_2 is None : if isinstance ( arg_1 . args [ 0 ] , astroid . Call ) : try : arg_3 = next ( arg_1 . args [ 0 ] . func . infer ( ) ) except astroid . InferenceError : return if getattr ( arg_3 , "name" , None ) == "iter" and utils . is_builtin_object ( arg_3 ) : arg_0 . add_message ( "bad-reversed-sequence" , arg_1 = arg_1 ) return if isinstance ( arg_2 , ( astroid . List , astroid . Tuple ) ) : return if isinstance ( arg_2 , astroid . Instance ) : if arg_2 . _proxied . name == "dict" and utils . is_builtin_object ( arg_2 . _proxied ) : arg_0 . add_message ( "bad-reversed-sequence" , arg_1 = arg_1 ) return if any ( arg_4 . name == "dict" and utils . is_builtin_object ( arg_4 ) for arg_4 in arg_2 . _proxied . ancestors ( ) ) : try : arg_2 . locals [ REVERSED_PROTOCOL_METHOD ] except KeyError : arg_0 . add_message ( "bad-reversed-sequence" , arg_1 = arg_1 ) return if hasattr ( arg_2 , "getattr" ) : for arg_5 in REVERSED_METHODS : for meth in arg_5 : try : arg_2 . getattr ( meth ) except astroid . NotFoundError : break else : break else : arg_0 . add_message ( "bad-reversed-sequence" , arg_1 = arg_1 ) else : arg_0 . add_message ( "bad-reversed-sequence" , arg_1 = arg_1 )

Bookmark group.

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

    Examples:

    \b
    ```bash
    $ polyaxon group bookmark
    ```

    \b
    ```bash
    $ polyaxon group -g 2 bookmark
    ```


Question: Build destination URL .

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_3 = arg_1 or arg_0 . _settings [ "url" ] if arg_1 and arg_0 . _settings [ "baseFunc" ] : arg_3 = "%s/%s" % ( arg_0 . _settings [ "baseFunc" ] , arg_1 ) arg_3 += ".json" if arg_2 : arg_3 += "?%s" % urllib . urlencode ( arg_2 ) return arg_3

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


Question: Receive instructions from Guacamole guacd server .

def Func ( arg_0 ) : arg_1 = 0 while True : arg_2 = arg_0 . _buffer . find ( INST_TERM . encode ( ) , arg_1 ) if arg_2 != - 1 : arg_3 = arg_0 . _buffer [ : arg_2 + 1 ] . decode ( ) arg_0 . _buffer = arg_0 . _buffer [ arg_2 + 1 : ] arg_0 . logger . debug ( 'Received instruction: %s' % arg_3 ) return arg_3 else : arg_1 = len ( arg_0 . _buffer ) arg_5 = arg_0 . client . recv ( BUF_LEN ) if not arg_5 : arg_0 . close ( ) arg_0 . logger . debug ( 'Failed to Func instruction. Closing.' ) return None arg_0 . _buffer . extend ( arg_5 )

Writes int to memory

        :param int where: address to write to
        :param expr: value to write
        :type expr: int or BitVec
        :param size: bit size of `expr`
        :param force: whether to ignore memory permissions


Question: Select all the faces and vertexes within the specified vertex quality range .

def Func ( arg_0 , arg_1 = 0.0 , arg_2 = 0.05 , arg_3 = True ) : arg_4 = '' . join ( [ '  <filter name="Select by Vertex Quality">\n' , '    <Param name="minQ" ' , 'value="{}" ' . format ( arg_1 ) , 'description="Min Quality" ' , 'min="0" ' , 'max="{}" ' . format ( 2 * arg_2 ) , 'type="RichDynamicFloat" ' , '/>\n' , '    <Param name="maxQ" ' , 'value="{}" ' . format ( arg_2 ) , 'description="Max Quality" ' , 'min="0" ' , 'max="{}" ' . format ( 2 * arg_2 ) , 'type="RichDynamicFloat" ' , '/>\n' , '    <Param name="Inclusive" ' , 'value="{}" ' . format ( str ( arg_3 ) . lower ( ) ) , 'description="Inclusive Sel." ' , 'type="RichBool" ' , '/>\n' , '  </filter>\n' ] ) util . write_filter ( arg_0 , arg_4 ) return None

Removes the specfied course from the specified organization


Question: Returns initializer configuration as a JSON - serializable dict .

def Func ( arg_0 ) : return { 'initializers' : [ tf . compat . v2 . initializers . serialize ( tf . keras . initializers . get ( arg_1 ) ) for arg_1 in arg_0 . initializers ] , 'sizes' : arg_0 . sizes , 'validate_args' : arg_0 . validate_args , }

Show an image.

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


Question: Add options to a parser .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = ( 'store_true' , 'store_false' ) for arg_4 , arg_5 in arg_1 . items ( ) : arg_6 = arg_0 . _conf [ arg_5 ] . def_ [ arg_4 ] arg_7 = copy . deepcopy ( arg_6 . cmd_kwargs ) arg_8 = arg_7 . get ( 'action' ) if arg_8 is internal . Switch : arg_7 . update ( nargs = 0 ) elif arg_6 . default is not None and arg_8 not in arg_3 : arg_7 . setdefault ( 'type' , type ( arg_6 . default ) ) arg_7 . update ( help = arg_6 . help ) arg_7 . setdefault ( 'default' , arg_0 . _conf [ arg_5 ] [ arg_4 ] ) arg_2 . add_argument ( * _names ( arg_0 . _conf [ arg_5 ] , arg_4 ) , ** arg_7 )

Seek and return the region information.
        Returns dict containing country_code and region_code.

        :arg ipnum: Result of ip2long conversion


Question: Return a default OpenQASM string for the instruction .

def Func ( arg_0 ) : arg_1 = arg_0 . name if arg_0 . params : arg_1 = "%s(%s)" % ( arg_1 , "," . join ( [ str ( i ) for i in arg_0 . params ] ) ) return arg_0 . _Funcif ( arg_1 )

List all events occurring at or after a timestamp.


Question: Adds N interpolated points with uniform spacing to each edge .

def Func ( arg_0 , arg_1 ) : if len ( arg_0 . coords ) <= 1 or arg_1 < 1 : return arg_0 . deepcopy ( ) arg_2 = interpolate_points ( arg_0 . coords , nb_steps = arg_1 , closed = False ) return arg_0 . deepcopy ( arg_2 = arg_2 )

Build a mongo query across multiple cases.
        Translate query options from a form into a complete mongo query dictionary.

        Beware that unindexed queries against a large variant collection will
        be extremely slow.

        Currently indexed query options:
            hgnc_symbols
            rank_score
            variant_type
            category

        Args:
            query(dict): A query dictionary for the database, from a query form.
            category(str): 'snv', 'sv', 'str' or 'cancer'
            variant_type(str): 'clinical' or 'research'

        Returns:
            mongo_query : A dictionary in the mongo query format.


Question: Returns a list of the names of the dimensions that will be lost when converting from point_fmt_in to point_fmt_out

def Func ( arg_0 , arg_1 ) : arg_2 = PointFormat ( arg_0 ) . dtype arg_3 = PointFormat ( arg_1 ) . dtype arg_4 = arg_3 . fields arg_5 = [ ] for arg_6 in arg_2 . names : if arg_6 not in arg_4 : arg_5 . append ( arg_6 ) return arg_5

Jumps short if RCX register is 0.

        :param cpu: current CPU.
        :param target: destination operand.


Question: Encrypt data using asymmetric decryption .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = None ) : if arg_1 == enums . CryptographicAlgorithm . RSA : if arg_4 == enums . PaddingMethod . OAEP : arg_6 = arg_0 . _encryption_hash_algorithms . get ( arg_5 ) if arg_6 is None : raise exceptions . InvalidField ( "The hashing algorithm '{0}' is not supported for " "asymmetric decryption." . format ( arg_5 ) ) arg_4 = asymmetric_padding . OAEP ( mgf = asymmetric_padding . MGF1 ( algorithm = arg_6 ( ) ) , algorithm = arg_6 ( ) , label = None ) elif arg_4 == enums . PaddingMethod . PKCS1v15 : arg_4 = asymmetric_padding . PKCS1v15 ( ) else : raise exceptions . InvalidField ( "The padding method '{0}' is not supported for asymmetric " "decryption." . format ( arg_4 ) ) arg_7 = default_backend ( ) try : arg_8 = arg_7 . load_der_private_key ( arg_2 , None ) except Exception : try : arg_8 = arg_7 . load_pem_private_key ( arg_2 , None ) except Exception : raise exceptions . CryptographicFailure ( "The private key bytes could not be loaded." ) arg_9 = arg_8 . decrypt ( arg_3 , arg_4 ) return arg_9 else : raise exceptions . InvalidField ( "The cryptographic algorithm '{0}' is not supported for " "asymmetric decryption." . format ( arg_1 ) )

Updates a player's state when a payload with opcode ``playerUpdate`` is received.


Question: Generate a coincidence matrix . This is used to generate random inputs to the temporal learner and to compare the predicted output against .

def Func ( arg_0 = 10 , arg_1 = 500 , arg_2 = 50 ) : arg_3 = SM32 ( int ( arg_0 ) , int ( arg_1 ) ) arg_4 = numpy . array ( [ 1.0 ] * arg_2 , dtype = numpy . float32 ) for arg_5 in xrange ( arg_0 ) : arg_6 = numpy . array ( random . sample ( xrange ( arg_1 ) , arg_2 ) , dtype = numpy . uint32 ) arg_6 . sort ( ) arg_3 . setRowFromSparse ( arg_5 , arg_6 , arg_4 ) arg_7 = SM32 ( int ( arg_0 ) , int ( arg_1 ) ) arg_7 . initializeWithFixedNNZR ( arg_2 ) return arg_3

Return True if we should retry, False otherwise.


Question: tries to deserialize a message might fail if data is missing

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = arg_4 , arg_5 = False , arg_6 = arg_7 , arg_8 = arg_9 , arg_10 = arg_11 , arg_12 = arg_13 , arg_14 = False ) : if len ( arg_1 ) < arg_0 . MIN_MESSAGE_SIZE : raise ValueError ( 'not enough data' ) if arg_2 is None : arg_2 = arg_0 . detect_protocol ( arg_1 , arg_3 ) arg_15 = TTransport . TMemoryBuffer ( arg_1 ) arg_16 = arg_2 ( arg_15 ) arg_17 = None if arg_5 : try : arg_17 = ThriftStruct . Func ( arg_16 , arg_6 , arg_8 , arg_10 , arg_12 , arg_14 ) except : arg_15 = TTransport . TMemoryBuffer ( arg_1 ) arg_16 = arg_2 ( arg_15 ) arg_18 , arg_19 , arg_20 = arg_16 . FuncMessageBegin ( ) arg_19 = arg_0 . message_type_to_str ( arg_19 ) if len ( arg_18 ) == 0 or arg_18 . isspace ( ) or arg_18 . startswith ( ' ' ) : raise ValueError ( 'no method name' ) if len ( arg_18 ) > arg_0 . MAX_METHOD_LENGTH : raise ValueError ( 'method name too long' ) arg_21 = range ( 33 , 127 ) if any ( ord ( arg_22 ) not in arg_21 for arg_22 in arg_18 ) : raise ValueError ( 'invalid method name' % arg_18 ) arg_23 = ThriftStruct . Func ( arg_16 , arg_6 , arg_8 , arg_10 , arg_12 , arg_14 ) arg_16 . FuncMessageEnd ( ) arg_24 = arg_15 . _buffer . tell ( ) return arg_0 ( arg_18 , arg_19 , arg_20 , arg_23 , arg_17 , arg_24 ) , arg_24

Set the rotation state of the camera

        :param x: viewport x pos
        :param y: viewport y pos


Question: Parses the API response and raises appropriate errors if raise_errors was set to True

def Func ( arg_0 , arg_1 ) : if not arg_0 . _raise_errors : return arg_1 arg_2 = str ( arg_1 . status_code ) [ 0 ] == '4' arg_3 = str ( arg_1 . status_code ) [ 0 ] == '5' arg_4 = arg_1 . content if arg_1 . status_code == 403 : raise AuthenticationError ( arg_4 ) elif arg_2 : raise APIError ( arg_4 ) elif arg_3 : raise ServerError ( arg_4 ) return arg_1

Configure the Outstation's database of input point definitions.

            Configure two Analog points (group/variation 30.1) at indexes 1 and 2.
            Configure two Binary points (group/variation 1.2) at indexes 1 and 2.


Question: Try to find the container ID with the specified name

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _containers . get ( arg_1 , None ) if not arg_2 is None : return arg_2 . get ( 'id' , None ) return None

Attempt to re-establish a connection using previously acquired tokens.

        If the Skype token is valid but the registration token is invalid, a new endpoint will be registered.

        Raises:
            .SkypeAuthException: if the token file cannot be used to authenticate


Question: Temporal distance probability density function .

def Func ( arg_0 ) : arg_1 , arg_2 = arg_0 . _temporal_distance_cdf ( ) arg_3 = { } arg_4 = [ arg_1 [ 0 ] ] arg_5 = [ ] for arg_6 in range ( 0 , len ( arg_1 ) - 1 ) : arg_7 = arg_1 [ arg_6 ] arg_8 = arg_1 [ arg_6 + 1 ] arg_9 = arg_8 - arg_7 arg_10 = arg_2 [ arg_6 + 1 ] - arg_2 [ arg_6 ] if arg_9 == 0.0 : arg_3 [ arg_7 ] = arg_10 else : arg_4 . append ( arg_8 ) arg_5 . append ( arg_10 / float ( arg_9 ) ) assert ( len ( arg_5 ) == len ( arg_4 ) - 1 ) return numpy . array ( arg_4 ) , numpy . array ( arg_5 ) , arg_3

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


Question: Pop a column from the H2OFrame at index i .

def Func ( arg_0 , arg_1 ) : if is_type ( arg_1 , str ) : arg_1 = arg_0 . names . index ( arg_1 ) arg_2 = H2OFrame . _expr ( expr = ExprNode ( "cols" , arg_0 , arg_1 ) ) arg_3 = arg_0 . _ex . _cache arg_0 . _ex = ExprNode ( "cols" , arg_0 , - ( arg_1 + 1 ) ) arg_0 . _ex . _cache . ncols -= 1 arg_0 . _ex . _cache . names = arg_3 . names [ : arg_1 ] + arg_3 . names [ arg_1 + 1 : ] arg_0 . _ex . _cache . types = { name : arg_3 . types [ name ] for name in arg_0 . _ex . _cache . names } arg_0 . _ex . _cache . _data = None arg_2 . _ex . _cache . ncols = 1 arg_2 . _ex . _cache . names = [ arg_3 . names [ arg_1 ] ] return arg_2


Question: find the SHA256 hash string of a file

def Func ( arg_0 ) : arg_1 = hashlib . sha256 ( ) with open ( arg_0 , "rb" ) as f : for arg_2 in iter ( lambda : f . read ( 4096 ) , b"" ) : arg_1 . update ( arg_2 ) return arg_1 . hexdigest ( )


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

def Func ( arg_0 ) : arg_1 = int ( math . sqrt ( arg_0 ) ) assert arg_1 * arg_1 == arg_0 return arg_1

Serialize a dataframe.

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


Question: Assert model solver status is optimal .

def Func ( arg_0 , arg_1 = 'optimization failed' ) : arg_2 = arg_0 . solver . status if arg_2 != OPTIMAL : arg_3 = OPTLANG_TO_EXCEPTIONS_DICT . get ( arg_2 , OptimizationError ) raise arg_3 ( "{} ({})" . format ( arg_1 , arg_2 ) )

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: Run the script

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = False , arg_5 = None , arg_6 = None , arg_7 = None , arg_8 = True ) : arg_9 = False arg_10 = False if arg_0 . __no_file_in : arg_11 = tempfile . NamedTemporaryFile ( delete = False , suffix = '.xyz' , dir = os . getcwd ( ) ) arg_11 . write ( b'0 0 0' ) arg_11 . close ( ) arg_0 . file_in = [ arg_11 . name ] if not arg_0 . filters : arg_7 = None elif arg_7 is None : arg_9 = True arg_13 = tempfile . NamedTemporaryFile ( delete = False , suffix = '.mlx' ) arg_13 . close ( ) arg_0 . save_to_file ( arg_13 . name ) arg_7 = arg_13 . name if ( arg_0 . parse_geometry or arg_0 . parse_topology or arg_0 . parse_hausdorff ) and ( arg_2 is None ) : arg_10 = True arg_14 = tempfile . NamedTemporaryFile ( delete = False , suffix = '.txt' ) arg_14 . close ( ) arg_2 = arg_14 . name if arg_5 is None : arg_5 = arg_0 . file_out run ( script = arg_7 , arg_1 = arg_1 , arg_2 = arg_2 , mlp_in = arg_0 . mlp_in , arg_3 = arg_3 , arg_4 = arg_4 , arg_12 = arg_0 . file_in , arg_5 = arg_5 , arg_6 = arg_6 , ml_version = arg_0 . ml_version , arg_8 = arg_8 ) if arg_0 . parse_geometry : arg_0 . geometry = compute . parse_geometry ( arg_2 , arg_1 , print_output = arg_8 ) if arg_0 . parse_topology : arg_0 . topology = compute . parse_topology ( arg_2 , arg_1 , print_output = arg_8 ) if arg_0 . parse_hausdorff : arg_0 . hausdorff_distance = compute . parse_hausdorff ( arg_2 , arg_1 , print_output = arg_8 ) if arg_0 . __no_file_in : os . remove ( arg_11 . name ) if arg_9 : os . remove ( arg_13 . name ) if arg_10 : os . remove ( arg_14 . name )

Fetch the events pages of a given group.


Question: Reformat binary annotations dict to return list of zipkin_core objects . The value of the binary annotations MUST be in string format .

def Func ( arg_0 , arg_1 ) : arg_2 = zipkin_core . AnnotationType . STRING return [ create_binary_annotation ( arg_3 , str ( arg_4 ) , arg_2 , arg_1 ) for arg_3 , arg_4 in arg_0 . items ( ) ]

Query the Enrollment API for the specific course modes that are available for the given course_id.

        Arguments:
            course_id (str): The string value of the course's unique identifier

        Returns:
            list: A list of course mode dictionaries.


Question: Add an item to this checklist . Returns a dictionary of values of new item .

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


Question: Read elements from the file .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : arg_4 , arg_5 , arg_6 = read_element_tag ( arg_0 , arg_1 ) if arg_2 and arg_4 not in [ etypes [ arg_7 ] [ 'n' ] for arg_7 in arg_2 ] : raise ParseError ( 'Got type {}, expected {}' . format ( arg_4 , ' / ' . join ( '{} ({})' . format ( etypes [ arg_7 ] [ 'n' ] , arg_7 ) for arg_7 in arg_2 ) ) ) if not arg_6 : arg_6 = arg_0 . read ( arg_5 ) arg_8 = arg_5 % 8 if arg_8 : arg_0 . seek ( 8 - arg_8 , 1 ) if arg_3 : arg_9 = 's' arg_10 = [ unpack ( arg_1 , arg_9 , s ) for s in arg_6 . split ( b'\0' ) if s ] if len ( arg_10 ) == 0 : arg_10 = '' elif len ( arg_10 ) == 1 : arg_10 = asstr ( arg_10 [ 0 ] ) else : arg_10 = [ asstr ( s ) for s in arg_10 ] else : arg_9 = etypes [ inv_etypes [ arg_4 ] ] [ 'fmt' ] arg_10 = unpack ( arg_1 , arg_9 , arg_6 ) return arg_10

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: attrs pipe can extract attribute values of object .

def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 : arg_3 = [ ] for arg_4 in arg_1 : if hasattr ( arg_2 , arg_4 ) : arg_3 . append ( getattr ( arg_2 , arg_4 ) ) yield arg_3

Trim all the annotations inside the jam and return as a new `JAMS`
        object.

        See `Annotation.trim` for details about how the annotations
        are trimmed.

        This operation is also documented in the jam-level sandbox
        with a list keyed by ``JAMS.sandbox.trim`` containing a tuple for each
        jam-level trim of the form ``(start_time, end_time)``.

        This function also copies over all of the file metadata from the
        original jam.

        Note: trimming does not affect the duration of the jam, i.e. the value
        of ``JAMS.file_metadata.duration`` will be the same for the original
        and trimmed jams.

        Parameters
        ----------
        start_time : float
            The desired start time for the trimmed annotations in seconds.
        end_time
            The desired end time for trimmed annotations in seconds. Must be
            greater than ``start_time``.
        strict : bool
            When ``False`` (default) observations that lie at the boundaries of
            the trimming range (see `Annotation.trim` for details), will have
            their time and/or duration adjusted such that only the part of the
            observation that lies within the trim range is kept. When ``True``
            such observations are discarded and not included in the trimmed
            annotation.

        Returns
        -------
        jam_trimmed : JAMS
            The trimmed jam with trimmed annotations, returned as a new JAMS
            object.


Question: Shows some stats about the currently playing song .

async def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . bot . lavalink . players . get ( arg_1 . guild . id ) arg_3 = 'Nothing' if arg_2 . current : arg_4 = lavalink . Utils . format_time ( arg_2 . position ) if arg_2 . current . stream : arg_5 = '🔴 LIVE'
 else : arg_5 = lavalink . Utils . format_time ( arg_2 . current . duration ) arg_3 = f'**[{player.current.title}]({player.current.uri})**\n({position}/{duration})' arg_6 = discord . Embed ( color = discord . Color . blurple ( ) , title = 'Now Playing' , description = arg_3 ) await arg_1 . send ( arg_6 = arg_6 )


Question: A local version of NumPy s PSD function that returns the plot arrays .

def Func ( arg_0 , arg_1 = 2 ** 10 , arg_2 = 1 ) : arg_3 , arg_4 = pylab . mlab . psd ( arg_0 , arg_1 , arg_2 ) return arg_3 . flatten ( ) , arg_4


Question: Return motion settings matching camera_id .

def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_0 . _api_info [ 'camera_event' ] arg_4 = dict ( { '_sid' : arg_0 . _sid , 'api' : arg_3 [ 'name' ] , 'method' : 'MotionEnum' , 'version' : arg_3 [ 'version' ] , 'camId' : arg_1 , } , ** arg_2 ) arg_5 = arg_0 . _get_json_with_retry ( arg_3 [ 'url' ] , arg_4 ) return MotionSetting ( arg_1 , arg_5 [ 'data' ] [ 'MDParam' ] )


Question: Shannon entropy in nats .

def Func ( arg_0 ) : if any ( arg_0 . _dist_fn_args ) : raise ValueError ( 'Can only compute entropy when all distributions are independent.' ) return sum ( joint_distribution_lib . maybe_check_wont_broadcast ( ( arg_1 ( ) . entropy ( ) for arg_1 in arg_0 . _dist_fn_wrapped ) , arg_0 . validate_args ) )

This method determines if we should apply our namespace indentation check.

  Args:
    nesting_state: The current nesting state.
    is_namespace_indent_item: If we just put a new class on the stack, True.
      If the top of the stack is not a class, or we did not recently
      add the class, False.
    raw_lines_no_comments: The lines without the comments.
    linenum: The current line number we are processing.

  Returns:
    True if we should apply our namespace indentation check. Currently, it
    only works for classes and namespaces inside of a namespace.


Question: Defines a set of URL query params to match .

def Func ( arg_0 , Func ) : arg_2 = furl ( arg_0 . _request . rawurl ) arg_2 = arg_2 . add ( Func ) arg_0 . _request . url = arg_2 . url arg_0 . add_matcher ( matcher ( 'QueryMatcher' , Func ) )

Initialize all ephemerals used by derived classes.


Question: r Return a new schedule with by appending child to parent at the last time of the parent schedule s channels over the intersection of the parent and child schedule s channels .

def Func ( arg_0 : arg_1 , arg_2 : arg_1 , arg_3 : arg_4 = None ) -> Schedule : arg_5 = set ( arg_0 . channels ) & set ( arg_2 . channels ) arg_6 = arg_0 . ch_stop_time ( * arg_5 ) return insert ( arg_0 , arg_6 , arg_2 , arg_3 = arg_3 )

turns off debugging by removing hidden tmp file


Question: Generate a random density matrix rho .

def Func ( arg_0 , arg_1 = None , arg_2 = 'Hilbert-Schmidt' , arg_3 = None ) : if arg_2 == 'Hilbert-Schmidt' : return __random_density_hs ( arg_0 , arg_1 , arg_3 ) elif arg_2 == 'Bures' : return __random_density_bures ( arg_0 , arg_1 , arg_3 ) else : raise QiskitError ( 'Error: unrecognized method {}' . format ( arg_2 ) )

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


Question: Return disk partitions .

def Func ( arg_0 ) : arg_1 = _psutil_mswindows . get_Func ( arg_0 ) return [ nt_partition ( * arg_2 ) for arg_2 in arg_1 ]

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


Question: This function should return unicode representation of the value

def Func ( arg_0 ) : arg_1 = id ( arg_0 ) if arg_1 in recursion_breaker . processed : return u'<recursion>' recursion_breaker . processed . add ( arg_1 ) try : if isinstance ( arg_0 , six . binary_type ) : return u"'{0}'" . format ( arg_0 . decode ( 'utf-8' ) ) elif isinstance ( arg_0 , six . text_type ) : return u"u'{0}'" . format ( arg_0 ) elif isinstance ( arg_0 , ( list , tuple ) ) : arg_2 = list ( map ( Func , arg_0 ) ) arg_3 = serialize_list ( u'[' , arg_2 , delimiter = u',' ) + u']' return force_unicode ( arg_3 ) elif isinstance ( arg_0 , dict ) : arg_4 = six . iteritems ( arg_0 ) arg_4 = ( tuple ( map ( Func , item ) ) for item in arg_4 ) arg_4 = list ( arg_4 ) arg_4 . sort ( ) arg_4 = [ serialize_text ( u'{0}: ' . format ( key ) , item_value ) for key , item_value in arg_4 ] arg_3 = serialize_list ( u'{' , arg_4 , delimiter = u',' ) + u'}' return force_unicode ( arg_3 ) return force_unicode ( repr ( arg_0 ) ) finally : recursion_breaker . processed . remove ( arg_1 )

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


Question: Convert the munging operations performed on H2OFrame into a POJO .

def Func ( arg_0 , arg_1 = "" , arg_2 = "" , arg_3 = True ) : assert_is_type ( arg_1 , str ) assert_is_type ( arg_2 , str ) assert_is_type ( arg_3 , bool ) if arg_1 == "" : arg_1 = "AssemblyPOJO_" + str ( uuid . uuid4 ( ) ) arg_4 = h2o . api ( "GET /99/Assembly.java/%s/%s" % ( arg_0 . id , arg_1 ) ) arg_5 = arg_2 + "/" + arg_1 + ".java" if arg_2 == "" : print ( arg_4 ) else : with open ( arg_5 , 'w' , encoding = "utf-8" ) as f : f . write ( arg_4 ) if arg_3 and arg_2 != "" : h2o . api ( "GET /3/h2o-genmodel.jar" , save_to = os . path . join ( arg_2 , "h2o-genmodel.jar" ) )

Run stochastic volatility model.

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

    Parameters
    ----------
    data : pandas.Series
        Return series to model.
    samples : int, optional
        Posterior samples to draw.

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

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


Question: Verify that the condition is valid .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 is not None and arg_2 [ 0 ] . name not in arg_0 . cregs : raise DAGCircuitError ( "invalid creg in condition for %s" % arg_1 )

A factory method which can be overridden in subclasses to create
        specialized LogRecords.


Question: visit an astroid . ImportFrom node

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . modname arg_3 = arg_1 . root ( ) . file if arg_3 is not None : arg_4 = modutils . is_relative ( arg_2 , arg_3 ) else : arg_4 = False for arg_5 in arg_1 . names : if arg_5 [ 0 ] == "*" : continue arg_6 = "%s.%s" % ( arg_2 , arg_5 [ 0 ] ) if arg_6 . find ( "." ) > - 1 : try : arg_6 = modutils . get_module_part ( arg_6 , arg_3 ) except ImportError : continue if arg_6 != arg_2 : arg_0 . _imported_module ( arg_1 , arg_6 , arg_4 )

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


Question: Returns a stdin - suitable file - like object based on the optional os_path and optionally skipping any configured sub - command .

def Func ( arg_0 , arg_1 = None , arg_2 = False ) : arg_3 = None if arg_2 else arg_0 . stdin_sub_command arg_4 , arg_5 = arg_0 . _get_in_and_path ( arg_0 . stdin , arg_0 . stdin_root , arg_3 , arg_1 ) if hasattr ( arg_4 , 'stdout' ) : return arg_4 . stdout return arg_4

Registers `block` to `block_type` in the registry.


Question: Implementation of UNIX nslookup .

def Func ( arg_0 ) : try : if "current_test_data" in arg_3 . INTERN : if not Check ( ) . is_ip_valid ( ) : arg_1 = arg_3 . socket . getaddrinfo ( arg_3 . INTERN [ "to_test" ] , 80 , 0 , 0 , arg_3 . socket . IPPROTO_TCP , ) for arg_2 in arg_1 : arg_3 . INTERN [ "current_test_data" ] [ "Func" ] . append ( arg_2 [ - 1 ] [ 0 ] ) else : arg_1 = arg_3 . socket . gethostbyaddr ( arg_3 . INTERN [ "to_test" ] ) arg_3 . INTERN [ "current_test_data" ] [ "Func" ] [ "hostname" ] = arg_1 [ 0 ] arg_3 . INTERN [ "current_test_data" ] [ "Func" ] [ "aliases" ] = arg_1 [ 1 ] arg_3 . INTERN [ "current_test_data" ] [ "Func" ] [ "ips" ] = arg_1 [ 2 ] else : if not Check ( ) . is_ip_valid ( ) : arg_3 . socket . getaddrinfo ( arg_3 . INTERN [ "to_test" ] , 80 , 0 , 0 , arg_3 . socket . IPPROTO_TCP , ) else : arg_3 . socket . gethostbyaddr ( arg_3 . INTERN [ "to_test" ] ) return True except ( OSError , arg_3 . socket . herror , arg_3 . socket . gaierror ) : return False

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


Question: Setup a handler to be called when a trait changes .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = False ) : if arg_3 : arg_4 = parse_notifier_name ( arg_2 ) for arg_5 in arg_4 : arg_0 . _remove_notifiers ( arg_1 , arg_5 ) else : arg_4 = parse_notifier_name ( arg_2 ) for arg_5 in arg_4 : arg_0 . _add_notifiers ( arg_1 , arg_5 )


Question: Returns the min and max possible values for x within given constraints

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 10000 ) : if issymbolic ( arg_2 ) : arg_4 = arg_0 . min ( arg_1 , arg_2 , arg_3 ) arg_5 = arg_0 . max ( arg_1 , arg_2 , arg_3 ) return arg_4 , arg_5 else : return arg_2 , arg_2

Set the rotation of this body using a rotation matrix.

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


Question: Return a folder list in a folder by given a folder path .

def Func ( arg_0 = "" ) : return [ os . path . join ( arg_0 , arg_1 ) for arg_1 in os . listdir ( arg_0 ) if os . path . isdir ( os . path . join ( arg_0 , arg_1 ) ) ]

Return True if we should retry, False otherwise.


Question: If the header key does not exist then set it to value . Returns the header value .

def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_2 ) -> arg_2 : arg_4 = arg_1 . lower ( ) . encode ( "latin-1" ) arg_5 = arg_3 . encode ( "latin-1" ) for arg_6 , ( arg_7 , arg_8 ) in enumerate ( arg_0 . _list ) : if arg_7 == arg_4 : return arg_8 . decode ( "latin-1" ) arg_0 . _list . append ( ( arg_4 , arg_5 ) ) return arg_3

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


Question: Helper to iterate over the files in a directory putting those in the passed StringIO in ini format .

def Func ( arg_0 , arg_1 , arg_2 = '' , arg_3 = None , arg_4 = None ) : import fnmatch import os arg_5 = [ ( os . path . join ( arg_0 , i ) , i ) for i in os . listdir ( arg_0 ) ] arg_5 = [ i for i in arg_5 if os . path . isfile ( i [ 0 ] ) ] for arg_6 , arg_7 in arg_5 : if arg_4 is not None : if not fnmatch . fnmatch ( arg_6 , arg_4 ) : continue if arg_3 is not None : if fnmatch . fnmatch ( arg_6 , arg_3 ) : continue arg_8 = Md5Hex ( arg_6 ) if arg_2 : arg_1 . write ( '%s/%s=%s\n' % ( arg_2 , arg_7 , arg_8 ) ) else : arg_1 . write ( '%s=%s\n' % ( arg_7 , arg_8 ) )

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: Long explanation of the value from the numeric value with optional extra bits Used by Layout . verboseRead when printing the value

def Func ( arg_0 , arg_1 = None ) : if isinstance ( arg_0 . code , WithExtra ) : return arg_0 . code . callback ( arg_0 , arg_1 ) return arg_0 . code . callback ( arg_0 )

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


Question: Semver tag triggered deployment helper

def Func ( arg_0 , arg_1 ) : check_environment ( arg_0 , arg_1 ) click . secho ( 'Fetching tags from the upstream ...' ) arg_2 = TagHandler ( git . list_tags ( ) ) print_information ( arg_2 , arg_1 ) arg_3 = arg_2 . yield_tag ( arg_0 , arg_1 ) confirm ( arg_3 )

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: Return the first element of an array

def Func ( arg_0 ) : from bolt . local . array import BoltArrayLocal arg_1 = arg_0 . _rdd if arg_0 . _ordered else arg_0 . _rdd . sortByKey ( ) return BoltArrayLocal ( arg_1 . values ( ) . Func ( ) )

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: Groups line reference together

def Func ( arg_0 , arg_1 , arg_2 = 30 ) : arg_3 = len ( arg_0 . citation ) arg_4 = [ reff . split ( ":" ) [ - 1 ] for reff in arg_1 ( arg_3 = arg_3 ) ] arg_5 = [ ] arg_6 = 0 while arg_6 + arg_2 - 1 < len ( arg_4 ) : arg_5 . append ( tuple ( [ arg_4 [ arg_6 ] + "-" + arg_4 [ arg_6 + arg_2 - 1 ] , arg_4 [ arg_6 ] ] ) ) arg_6 += arg_2 if arg_6 < len ( arg_4 ) : arg_5 . append ( tuple ( [ arg_4 [ arg_6 ] + "-" + arg_4 [ len ( arg_4 ) - 1 ] , arg_4 [ arg_6 ] ] ) ) return arg_5

Serial command to set seasons table.

        If no dictionary is passed, the meter object buffer is used.

        Args:
            cmd_dict (dict): Optional dictionary of season schedules.
            password (str): Optional password

        Returns:
            bool: True on completion and ACK.


Question: Return absolute distance .

def Func ( arg_0 , arg_1 , arg_2 , * arg_3 , ** arg_4 ) : return arg_0 . dist ( arg_1 , arg_2 , * arg_3 , ** arg_4 )

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


Question: Perform a quick check on a BAM via samtools quickcheck . This will detect obvious BAM errors such as truncation .

def Func ( arg_0 ) : arg_1 , arg_2 = os . path . split ( arg_0 ) arg_3 = subprocess . call ( [ 'docker' , 'run' , '-v' , arg_1 + ':/data' , 'quay.io/ucsc_cgl/samtools:1.3--256539928ea162949d8a65ca5c79a72ef557ce7c' , 'quickcheck' , '-vv' , '/data/' + arg_2 ] ) if arg_3 != 0 : return False return True


Question: Parse arguments to mixin . Add them to scope as variables . Sets upp special variable

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = list ( zip ( arg_1 , [ ' ' ] * len ( arg_1 ) ) ) if arg_1 and arg_1 [ 0 ] else None arg_4 = itertools . zip_longest if sys . version_info [ 0 ] == 3 else itertools . izip_longest if arg_0 . args : arg_5 = [ v if hasattr ( v , 'parse' ) else v for v in copy . copy ( arg_0 . args ) ] arg_1 = arg_1 if isinstance ( arg_1 , list ) else [ arg_1 ] arg_6 = [ arg_0 . _parse_arg ( arg_7 , arg , arg_2 ) for arg , arg_7 in arg_4 ( [ a for a in arg_1 ] , arg_5 ) ] for arg_7 in arg_6 : if arg_7 : arg_7 . parse ( arg_2 ) if not arg_3 : arg_3 = [ v . value for v in arg_6 if v ] if not arg_3 : arg_3 = '' Variable ( [ '@arguments' , None , arg_3 ] ) . parse ( arg_2 )

Remove all binary files in the adslib directory.


Question: Get a list of all available fields for an object .

def Func ( arg_0 , arg_1 ) : arg_0 . get_conn ( ) arg_2 = arg_0 . describe_object ( arg_1 ) return [ arg_3 [ 'name' ] for arg_3 in arg_2 [ 'fields' ] ]

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

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


Question: Performs a step to establish the context as an acceptor .

def Func ( arg_0 , arg_1 ) : arg_2 = ffi . new ( 'OM_uint32[1]' ) arg_3 = ffi . new ( 'gss_buffer_desc[1]' ) arg_3 [ 0 ] . length = len ( arg_1 ) arg_5 = ffi . new ( 'char[]' , arg_1 ) arg_3 [ 0 ] . value = arg_5 arg_7 = ffi . new ( 'gss_OID[1]' ) arg_8 = ffi . new ( 'gss_buffer_desc[1]' ) arg_9 = ffi . new ( 'gss_name_t[1]' ) arg_10 = ffi . new ( 'OM_uint32[1]' ) arg_11 = ffi . new ( 'OM_uint32[1]' ) arg_12 = ffi . new ( 'gss_cred_id_t[1]' ) if arg_0 . _cred_object is not None : arg_13 = arg_0 . _cred_object . _cred [ 0 ] else : arg_13 = ffi . cast ( 'gss_cred_id_t' , C . GSS_C_NO_CREDENTIAL ) arg_14 = C . gss_accept_sec_context ( arg_2 , arg_0 . _ctx , arg_13 , arg_3 , arg_0 . _channel_bindings , arg_9 , arg_7 , arg_8 , arg_10 , arg_11 , arg_12 ) if arg_9 [ 0 ] : arg_15 = MechName ( arg_9 , arg_7 [ 0 ] ) try : if arg_8 [ 0 ] . length != 0 : arg_16 = _buf_to_str ( arg_8 [ 0 ] ) else : arg_16 = None if GSS_ERROR ( arg_14 ) : if arg_2 [ 0 ] and arg_7 [ 0 ] : raise _exception_for_status ( arg_14 , arg_2 [ 0 ] , arg_7 [ 0 ] , arg_16 ) else : raise _exception_for_status ( arg_14 , arg_2 [ 0 ] , None , arg_16 ) arg_0 . established = not ( arg_14 & C . GSS_S_CONTINUE_NEEDED ) arg_0 . flags = arg_10 [ 0 ] if ( arg_0 . flags & C . GSS_C_DELEG_FLAG ) : arg_0 . delegated_cred = Credential ( arg_12 ) if arg_7 [ 0 ] : arg_0 . mech_type = OID ( arg_7 [ 0 ] [ 0 ] ) if arg_9 [ 0 ] : arg_15 . _mech_type = arg_0 . mech_type arg_0 . peer_name = arg_15 return arg_16 except : if arg_0 . _ctx : C . gss_delete_sec_context ( arg_2 , arg_0 . _ctx , ffi . cast ( 'gss_buffer_t' , C . GSS_C_NO_BUFFER ) ) arg_0 . _reset_flags ( ) raise finally : if arg_8 [ 0 ] . length != 0 : C . gss_release_buffer ( arg_2 , arg_8 ) if arg_12 [ 0 ] and not arg_0 . delegated_cred : C . gss_release_cred ( arg_2 , arg_12 )

Set the rotation of this body using a rotation matrix.

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


Question: Remove standard padding .

def Func ( arg_0 , arg_1 , arg_2 = 'pkcs7' ) : arg_3 = len ( arg_0 ) if arg_3 % arg_1 : raise ValueError ( "Input data is not padded" ) if arg_2 in ( 'pkcs7' , 'x923' ) : arg_4 = bord ( arg_0 [ - 1 ] ) if arg_4 < 1 or arg_4 > min ( arg_1 , arg_3 ) : raise ValueError ( "Padding is incorrect." ) if arg_2 == 'pkcs7' : if arg_0 [ - arg_4 : ] != bchr ( arg_4 ) * arg_4 : raise ValueError ( "PKCS#7 padding is incorrect." ) else : if arg_0 [ - arg_4 : - 1 ] != bchr ( 0 ) * ( arg_4 - 1 ) : raise ValueError ( "ANSI X.923 padding is incorrect." ) elif arg_2 == 'iso7816' : arg_4 = arg_3 - arg_0 . rfind ( bchr ( 128 ) ) if arg_4 < 1 or arg_4 > min ( arg_1 , arg_3 ) : raise ValueError ( "Padding is incorrect." ) if arg_4 > 1 and arg_0 [ 1 - arg_4 : ] != bchr ( 0 ) * ( arg_4 - 1 ) : raise ValueError ( "ISO 7816-4 padding is incorrect." ) else : raise ValueError ( "Unknown padding style" ) return arg_0 [ : - arg_4 ]

Removes the video from youtube and from db
    Requires POST


Question: Register unit object on interface level object

def Func ( arg_0 , arg_1 , arg_2 ) : nameAvailabilityCheck ( arg_0 , arg_1 , arg_2 ) assert arg_2 . _parent is None arg_2 . _parent = arg_0 arg_2 . _name = arg_1 arg_0 . _units . append ( arg_2 )

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


Question: Download and return a path to a sample that is curated by the PyAV developers .

def Func ( arg_0 ) : return cached_download ( 'https://docs.mikeboers.com/pyav/samples/' + arg_0 , os . path . join ( 'pyav-Func' , arg_0 . replace ( '/' , os . path . sep ) ) )

Associate an existing reservedIP to a deployment.

        name:
            Required. Name of the reserved IP address.

        service_name:
            Required. Name of the hosted service.

        deployment_name:
            Required. Name of the deployment.

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


Question: Writes a report summarizing coverage statistics per module .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_0 . find_code_units ( arg_1 ) arg_3 = max ( [ len ( arg_11 . name ) for arg_11 in arg_0 . code_units ] + [ 5 ] ) arg_4 = "%%- %ds  " % arg_3 arg_5 = "%s   %s: %s\n" arg_6 = ( arg_4 % "Name" ) + " Stmts   Miss" arg_7 = arg_4 + "%6d %6d" if arg_0 . branches : arg_6 += " Branch BrMiss" arg_7 += " %6d %6d" arg_8 = Numbers . pc_str_width ( ) arg_6 += "%*s" % ( arg_8 + 4 , "Cover" ) arg_7 += "%%%ds%%%%" % ( arg_8 + 3 , ) if arg_0 . config . show_missing : arg_6 += "   Missing" arg_7 += "   %s" arg_9 = "-" * len ( arg_6 ) + "\n" arg_6 += "\n" arg_7 += "\n" if not arg_2 : arg_2 = sys . stdout arg_2 . write ( arg_6 ) arg_2 . write ( arg_9 ) arg_10 = Numbers ( ) for arg_11 in arg_0 . code_units : try : arg_12 = arg_0 . coverage . _analyze ( arg_11 ) arg_13 = arg_12 . numbers arg_14 = ( arg_11 . name , arg_13 . n_statements , arg_13 . n_missing ) if arg_0 . branches : arg_14 += ( arg_13 . n_branches , arg_13 . n_missing_branches ) arg_14 += ( arg_13 . pc_covered_str , ) if arg_0 . config . show_missing : arg_14 += ( arg_12 . missing_formatted ( ) , ) arg_2 . write ( arg_7 % arg_14 ) arg_10 += arg_13 except KeyboardInterrupt : raise except : arg_15 = not arg_0 . config . ignore_errors if arg_15 : arg_16 , arg_17 = sys . exc_info ( ) [ : 2 ] if arg_16 is NotPython and not arg_11 . should_be_python ( ) : arg_15 = False if arg_15 : arg_2 . write ( arg_5 % ( arg_11 . name , arg_16 . __name__ , arg_17 ) ) if arg_10 . n_files > 1 : arg_2 . write ( arg_9 ) arg_14 = ( "TOTAL" , arg_10 . n_statements , arg_10 . n_missing ) if arg_0 . branches : arg_14 += ( arg_10 . n_branches , arg_10 . n_missing_branches ) arg_14 += ( arg_10 . pc_covered_str , ) if arg_0 . config . show_missing : arg_14 += ( "" , ) arg_2 . write ( arg_7 % arg_14 ) return arg_10 . pc_covered

Converts all of the non-numeric fields from spatialOutput and temporalOutput
    into their scalar equivalents and records them in the output dictionary.

    :param spatialOutput: The results of topDownCompute() for the spatial input.
    :param temporalOutput: The results of topDownCompute() for the temporal
      input.
    :param output: The main dictionary of outputs passed to compute(). It is
      expected to have keys 'spatialTopDownOut' and 'temporalTopDownOut' that
      are mapped to numpy arrays.


Question: Find requested version in POST request .

def Func ( arg_0 ) : if "version" in arg_0 . document . attrib : arg_1 = arg_0 . document . attrib [ "version" ] . lower ( ) if arg_1 in allowed_versions [ arg_0 . params [ 'service' ] ] : arg_0 . params [ "version" ] = arg_1 else : raise OWSInvalidParameterValue ( "Version %s is not supported" % arg_1 , arg_1 = "version" ) elif arg_0 . _get_request_type ( ) == "getcapabilities" : arg_0 . params [ "version" ] = None else : raise OWSMissingParameterValue ( 'Parameter "version" is missing' , arg_1 = "version" ) return arg_0 . params [ "version" ]

Returns protobuf mapcontainer. Read from translation file.


Question: Set the ERP values for this object s degrees of freedom .

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

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


Question: Validate the internal representation of the instance .

def Func ( arg_0 ) : try : arg_1 = arg_0 . schema . validate ( arg_0 . to_dict ( ) ) except ValidationError as ex : raise ModelValidationError ( ex . messages , ex . field_names , ex . fields , ex . data , ** ex . kwargs )

Decode the data passed in and potentially flush the decoder.


Question: Creates a transfer job that runs periodically .

def Func ( arg_0 , arg_1 ) : arg_1 = arg_0 . _inject_project_id ( arg_1 , BODY , PROJECT_ID ) return arg_0 . get_conn ( ) . transferJobs ( ) . create ( arg_1 = arg_1 ) . execute ( num_retries = arg_0 . num_retries )


Question: Detect infinite recursion and prevent it .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = os . path . abspath ( os . path . normcase ( arg_2 ) ) if arg_4 in arg_0 : raise NamelistRecursionError ( arg_4 ) arg_0 . add ( arg_4 ) try : arg_5 = _Func ( arg_1 , arg_4 , arg_3 ) finally : arg_0 . remove ( arg_4 ) return arg_5

Serialize a dataframe.

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


Question: Set instance variables based on an options dict

def Func ( arg_0 , ** arg_1 ) : arg_0 . interactive = arg_1 [ 'interactive' ] arg_0 . verbosity = arg_1 [ 'verbosity' ] arg_0 . symlink = arg_1 [ 'link' ] arg_0 . clear = arg_1 [ 'clear' ] arg_0 . dry_run = arg_1 [ 'dry_run' ] arg_7 = arg_1 [ 'ignore_patterns' ] if arg_1 [ 'use_default_ignore_patterns' ] : arg_7 += [ 'CVS' , '.*' , '*~' ] arg_0 . ignore_patterns = list ( set ( arg_7 ) ) arg_0 . post_process = arg_1 [ 'post_process' ]

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


Question: Parse a string of space - separated numbers returning a Python list .

def Func ( arg_0 ) : assert isinstance ( arg_0 , basestring ) return [ int ( arg_1 ) for arg_1 in arg_0 . split ( ) ]

Adjust contrast of an Image.

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

    Returns:
        PIL Image: Contrast adjusted image.


Question: Initializes sitetree in memory .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_2 . get ( 'request' , None ) if arg_3 is None : raise SiteTreeError ( 'Sitetree requires "django.core.context_processors.request" template context processor to be active. ' 'If it is, check that your view pushes request data into the template.' ) if id ( arg_3 ) != id ( arg_0 . current_request ) : arg_0 . init ( arg_2 ) arg_1 = arg_0 . resolve_var ( arg_1 ) arg_1 , arg_4 = arg_0 . get_sitetree ( arg_1 ) if not arg_4 : return None , None return arg_1 , arg_4


Question: Delete a space .

def Func ( arg_0 , arg_1 ) : if arg_1 not in arg_0 . spaces : raise ValueError ( "Space '%s' does not exist" % arg_1 ) if arg_1 in arg_0 . static_spaces : arg_2 = arg_0 . static_spaces [ arg_1 ] if arg_2 . is_derived : raise ValueError ( "%s has derived spaces" % repr ( arg_2 . interface ) ) else : arg_0 . static_spaces . del_item ( arg_1 ) arg_0 . model . spacegraph . remove_node ( arg_2 ) arg_0 . inherit ( ) arg_0 . model . spacegraph . update_subspaces ( arg_0 ) elif arg_1 in arg_0 . dynamic_spaces : arg_0 . dynamic_spaces . del_item ( arg_1 ) else : raise ValueError ( "Derived cells cannot be deleted" )

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: Convert Monero decimal to atomic integer of piconero .

def Func ( arg_0 ) : if not isinstance ( arg_0 , ( Decimal , float ) + _integer_types ) : raise ValueError ( "Amount '{}' doesn't have numeric type. Only Decimal, int, long and " "float (not recommended) are accepted as amounts." ) return int ( arg_0 * 10 ** 12 )

Fill missing rates of a currency with the closest available ones.


Question: Get a list of top clans by trophy

def Func ( arg_0 , arg_1 = 'global' , ** arg_2 : arg_3 ) : arg_4 = arg_0 . api . LOCATIONS + '/' + str ( arg_1 ) + '/rankings/clans' return arg_0 . _get_model ( arg_4 , PartialClan , ** arg_2 )

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: Tags the current version .

def Func ( arg_0 ) : print ( 'Tagging "{}"' . format ( arg_0 ) ) arg_1 = '"Released version {}"' . format ( arg_0 ) Popen ( [ 'git' , 'tag' , '-s' , '-m' , arg_1 , arg_0 ] ) . wait ( )

Remove rows with NAs from the H2OFrame.

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


Question: Execute JavaScript Asynchronously in current context .

def Func ( arg_0 , arg_1 , * arg_2 ) : return arg_0 . _execute ( Command . EXECUTE_ASYNC_SCRIPT , { 'script' : arg_1 , 'args' : list ( arg_2 ) } )

Main executor of the trimmomatic_report template.

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


Question: iterator for JSON - per - line in a file pattern

def Func ( arg_0 ) : with open ( arg_0 , 'r' ) as f : for arg_1 in f . readlines ( ) : yield json . loads ( arg_1 )

Verify a certificate in a context.

        .. versionadded:: 0.15

        :raises X509StoreContextError: If an error occurred when validating a
          certificate in the context. Sets ``certificate`` attribute to
          indicate which certificate caused the error.