Question: This will return a single tr element with all tds already populated .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = etree . Element ( 'tr' ) arg_4 = get_namespace ( arg_0 , 'w' ) arg_5 = [ ] for arg_6 in arg_0 : if arg_6 in arg_5 : continue arg_5 . append ( arg_6 ) if arg_6 . tag == '%stc' % arg_4 : arg_7 = get_v_merge ( arg_6 ) if ( arg_7 is not None and arg_7 . get ( '%sval' % arg_4 ) != 'restart' ) : continue arg_8 = [ ] for arg_9 in arg_6 : if arg_9 in arg_5 : continue if is_li ( arg_9 , arg_1 ) : arg_10 = get_single_list_nodes_data ( arg_9 , arg_1 , ) arg_11 , arg_12 = build_list ( arg_10 , arg_1 , ) arg_5 . extend ( arg_12 ) arg_8 . append ( etree . tostring ( arg_11 ) ) elif arg_9 . tag == '%stbl' % arg_4 : arg_13 , arg_14 = build_table ( arg_9 , arg_1 , ) arg_5 . extend ( arg_14 ) arg_8 . append ( etree . tostring ( arg_13 ) ) elif arg_9 . tag == '%stcPr' % arg_4 : arg_5 . append ( arg_9 ) continue else : arg_15 = get_element_content ( arg_9 , arg_1 , is_td = True , ) arg_8 . append ( arg_15 ) arg_16 = '
' . join ( t for t in arg_8 if t is not None ) arg_17 = etree . XML ( '%s	' % arg_16 ) arg_18 = get_grid_span ( arg_6 ) if arg_18 > 1 : arg_17 . set ( 'colspan' , '%d' % arg_18 ) arg_7 = get_v_merge ( arg_6 ) if ( arg_7 is not None and arg_7 . get ( '%sval' % arg_4 ) == 'restart' ) : arg_19 = next ( arg_2 ) arg_17 . set ( 'rowspan' , '%d' % arg_19 ) arg_3 . append ( arg_17 ) return arg_3

update secrets will take a secrets credential file
        either located at .sregistry or the environment variable
        SREGISTRY_CLIENT_SECRETS and update the current client
        secrets as well as the associated API base.


Question: Parse a docstring into ParameterInfo and ReturnInfo objects .

def Func ( arg_0 ) : arg_0 = inspect . cleandoc ( arg_0 ) arg_1 = arg_0 . split ( '\n' ) arg_2 = None arg_3 = None arg_4 = { } arg_5 = None for arg_6 in arg_1 : arg_6 = arg_6 . rstrip ( ) if len ( arg_6 ) == 0 : continue elif str ( arg_6 ) == 'Args:' : arg_2 = 'args' arg_3 = None continue elif str ( arg_6 ) == 'Returns:' : arg_2 = 'return' arg_3 = None continue if arg_2 is not None : arg_7 = arg_6 . lstrip ( ) arg_8 = len ( arg_6 ) - len ( arg_7 ) if arg_3 is None : arg_3 = arg_8 if arg_8 != arg_3 : continue if arg_2 == 'args' : arg_9 , arg_10 = parse_param ( arg_7 ) arg_4 [ arg_9 ] = arg_10 elif arg_2 == 'return' : arg_5 = parse_return ( arg_7 ) return arg_4 , arg_5

Drop a node from the network

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


Question: Function for doing an upload of a file as an item . This should be a building block for user - level functions .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : arg_4 = _create_or_reuse_item ( arg_0 , arg_1 , arg_3 ) _create_bitstream ( arg_2 , arg_0 , arg_4 ) for arg_5 in session . item_upload_callbacks : arg_5 ( session . communicator , session . token , arg_4 )

update secrets will take a secrets credential file
        either located at .sregistry or the environment variable
        SREGISTRY_CLIENT_SECRETS and update the current client
        secrets as well as the associated API base.


Question: Verify a register .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 . name not in arg_0 . global_symtab : raise QasmError ( 'Cannot find definition for' , arg_2 , "'" + arg_1 . name + "'" , 'at line' , str ( arg_1 . line ) , 'file' , arg_1 . file ) arg_3 = arg_0 . global_symtab [ arg_1 . name ] if arg_3 . type != arg_2 : raise QasmError ( "Type for '" + arg_3 . name + "' should be '" + arg_2 + "' but was found to be '" + arg_3 . type + "'" , "line" , str ( arg_1 . line ) , "file" , arg_1 . file ) if arg_1 . type == 'indexed_id' : arg_4 = arg_3 . index arg_5 = arg_1 . index if arg_5 < 0 or arg_5 >= arg_4 : raise QasmError ( "Register index for '" + arg_3 . name + "' out of bounds. Index is" , str ( arg_5 ) , "bound is 0 <= index <" , str ( arg_4 ) , "at line" , str ( arg_1 . line ) , "file" , arg_1 . file )

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


Question: Code to load create user module . Copied off django - browserid .

def Func ( arg_0 ) : arg_1 = arg_0 . rfind ( "." ) arg_2 , arg_3 = arg_0 [ : arg_1 ] , arg_0 [ arg_1 + 1 : ] try : arg_4 = import_module ( arg_2 ) except ImportError : raise ImproperlyConfigured ( "Error importing CAN_LOGIN_AS function: {}" . format ( arg_2 ) ) except ValueError : raise ImproperlyConfigured ( "Error importing CAN_LOGIN_AS" " function. Is CAN_LOGIN_AS a" " string?" ) try : arg_5 = getattr ( arg_4 , arg_3 ) except AttributeError : raise ImproperlyConfigured ( "Module {0} does not define a {1} " "function." . format ( arg_2 , arg_3 ) ) return arg_5


Question: push an image to Globus endpoint . In this case the name is the globus endpoint id and path .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : arg_4 , arg_5 = arg_0 . _parse_endpoint_name ( arg_2 ) arg_1 = os . path . abspath ( arg_1 ) arg_6 = os . path . basename ( arg_1 ) bot . debug ( "PUSH %s" % arg_1 ) arg_7 = parse_image_name ( arg_6 ) if not os . path . exists ( arg_1 ) : bot . error ( '%s does not exist.' % arg_1 ) sys . exit ( 1 ) if not hasattr ( arg_0 , 'transfer_client' ) : arg_0 . _init_transfer_client ( ) arg_8 = arg_0 . _get_endpoints ( ) if len ( arg_8 [ 'my-endpoints' ] ) == 0 : bot . error ( 'You must have a personal endpoint to transfer the container' ) sys . exit ( 1 ) arg_9 = None for arg_10 , arg_11 in arg_8 [ 'my-endpoints' ] . items ( ) : if arg_11 [ 'gcp_connected' ] is True : arg_9 = arg_11 break if arg_9 is None : bot . error ( 'No activated local endpoints online! Go online to transfer' ) sys . exit ( 1 ) arg_0 . _create_endpoint_cache ( arg_4 ) arg_12 = arg_0 . add ( image_path = arg_1 , image_uri = arg_7 [ 'uri' ] , copy = True ) arg_13 = "Singularity Registry Transfer for %s" % arg_12 . name arg_14 = globus_sdk . TransferData ( arg_0 . transfer_client , arg_9 [ 'id' ] , arg_4 , arg_13 = arg_13 , sync_level = "checksum" ) arg_6 = ".singularity/shub/%s" % arg_6 arg_14 . add_item ( arg_12 . image , arg_6 ) bot . info ( 'Requesting transfer from local %s to %s:%s' % ( SREGISTRY_STORAGE , arg_4 , arg_6 ) ) arg_15 = arg_0 . transfer_client . submit_transfer ( arg_14 ) bot . info ( arg_15 [ 'message' ] ) return arg_15

Enumerate all possible resonance forms and return them as a list.

        :param mol: The input molecule.
        :type mol: rdkit.Chem.rdchem.Mol
        :return: A list of all possible resonance forms of the molecule.
        :rtype: list of rdkit.Chem.rdchem.Mol


Question: r Calculate Parachor for a pure species using its density in the liquid and gas phases surface tension and molecular weight .

delete a backend, and update the secrets file


Question: Serial command to set seasons table .

def Func ( arg_0 , arg_1 = None , arg_2 = "00000000" ) : arg_3 = False arg_0 . setContext ( "Func" ) if not arg_1 : arg_1 = arg_0 . m_seasons_sched_params try : if not arg_0 . request ( False ) : arg_0 . writeCmdMsg ( "Bad read CRC on setting" ) else : if not arg_0 . serialCmdPwdAuth ( arg_2 ) : arg_0 . writeCmdMsg ( "Password failure" ) else : arg_4 = "" arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_1_Start_Month" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_1_Start_Day" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_1_Schedule" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_2_Start_Month" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_2_Start_Day" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_2_Schedule" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_3_Start_Month" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_3_Start_Day" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_3_Schedule" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_4_Start_Month" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_4_Start_Day" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( arg_1 [ "Season_4_Schedule" ] ) . zfill ( 2 ) ) arg_4 += binascii . hexlify ( str ( 0 ) . zfill ( 24 ) ) arg_5 = "015731023030383028" + arg_4 + "2903" arg_5 += arg_0 . calc_crc16 ( arg_5 [ 2 : ] . decode ( "hex" ) ) arg_0 . m_serial_port . write ( arg_5 . decode ( "hex" ) ) if arg_0 . m_serial_port . getResponse ( arg_0 . getContext ( ) ) . encode ( "hex" ) == "06" : arg_0 . writeCmdMsg ( "Success(Func): 06 returned." ) arg_3 = True arg_0 . serialPostEnd ( ) except : ekm_log ( traceback . format_exc ( sys . exc_info ( ) ) ) arg_0 . setContext ( "" ) return arg_3

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

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


Question: Return a dictionary of distances keyed by the keys in the given dict .

def Func ( arg_0 : arg_1 [ arg_2 ] , arg_3 : arg_4 [ arg_5 , arg_6 [ arg_2 ] ] ) -> arg_4 [ arg_5 , float ] : arg_7 = set ( arg_0 ) return { arg_8 : tanimoto_set_similarity ( arg_7 , arg_9 ) for arg_8 , arg_9 in arg_3 . items ( ) }

Export as a ``cryptography`` certificate signing request.

        :rtype: ``cryptography.x509.CertificateSigningRequest``

        .. versionadded:: 17.1.0


Question: random - fill a buffer with random data

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = 0 if arg_3 != 0 : if arg_3 > Decree . CGC_SSIZE_MAX or arg_3 < 0 : arg_5 = Decree . CGC_EINVAL else : if arg_2 not in arg_1 . memory or ( arg_2 + arg_3 ) not in arg_1 . memory : logger . info ( "RANDOM: buf points to invalid address. Returning EFAULT" ) return Decree . CGC_EFAULT with open ( "/dev/urandom" , "rb" ) as f : arg_6 = f . read ( arg_3 ) arg_0 . syscall_trace . append ( ( "_random" , - 1 , arg_6 ) ) arg_1 . write_bytes ( arg_2 , arg_6 ) if arg_4 : if arg_4 not in arg_1 . memory : logger . info ( "RANDOM: Not valid rnd_bytes. Returning EFAULT" ) return Decree . CGC_EFAULT arg_1 . write_int ( arg_4 , len ( arg_6 ) , 32 ) logger . info ( "RANDOM(0x%08x, %d, 0x%08x) -> <%s>)" % ( arg_2 , arg_3 , arg_4 , repr ( arg_6 [ : 10 ] ) ) ) return arg_5

Hunt down the settings.py module by going up the FS path


Question: Decodes an encoded 7 - bit ASCII header value into it s actual value .

def Func ( arg_0 ) : arg_1 , arg_2 = decode_header ( arg_0 ) [ 0 ] if arg_2 : return arg_1 . decode ( arg_2 ) else : return arg_1

Shrinks the trajectory and removes all exploration ranges from the parameters.
        Only possible if the trajectory has not been stored to disk before or was loaded as new.

        :param force:

            Usually you cannot shrink the trajectory if it has been stored to disk,
            because there's no guarantee that it is actually shrunk if there
            still exist explored parameters on disk. In case you are certain that
            you did not store explored parameters to disk set or you deleted all
            of them from disk set `force=True`.

        :raises: TypeError if the trajectory was stored before.


Question: Construct a TaskInstance from the database based on the primary key

def Func ( arg_0 , arg_1 = None , arg_2 = False ) : arg_3 = airflow . models . TaskInstance arg_4 = arg_1 . query ( arg_3 ) . filter ( arg_3 . dag_id == arg_0 . _dag_id , arg_3 . task_id == arg_0 . _task_id , arg_3 . execution_date == arg_0 . _execution_date ) if arg_2 : arg_5 = arg_4 . with_for_update ( ) . first ( ) else : arg_5 = arg_4 . first ( ) return arg_5

Validate access token.

        :param token: A string of random characters
        :param scopes: A list of scopes
        :param request: The Request object passed by oauthlib

        The validation validates:

            1) if the token is available
            2) if the token has expired
            3) if the scopes are available


Question: Load a lexicon from a JSON file .

def Func ( arg_0 , arg_1 ) : with open ( arg_1 , 'r' ) as fp : return arg_0 ( json . load ( fp ) )

Update the estimate.

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


Question: Removes a NIC from the server .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_0 . _perform_request ( url = '/datacenters/%s/servers/%s/nics/%s' % ( arg_1 , arg_2 , arg_3 ) , method = 'DELETE' ) return arg_4


Question: Add the specific arguments of this CLI

def Func ( arg_0 ) : MetricCommon . Func ( arg_0 ) arg_0 . parser . add_argument ( '-n' , '--metric-name' , dest = 'metricName' , action = 'store' , required = True , metavar = 'metric_name' , help = 'Metric identifier' ) arg_0 . parser . add_argument ( '-d' , '--display-name' , dest = 'displayName' , action = 'store' , required = True , metavar = 'display_name' , help = 'Metric display name' ) arg_0 . parser . add_argument ( '-s' , '--display-name-short' , dest = 'displayNameShort' , action = 'store' , required = True , metavar = 'display_short_name' , help = 'Metric short display name' ) arg_0 . parser . add_argument ( '-i' , '--description' , dest = 'description' , action = 'store' , required = not arg_0 . update , metavar = 'description' , help = 'Metric description' ) arg_0 . parser . add_argument ( '-g' , '--aggregate' , dest = 'aggregate' , action = 'store' , required = True , choices = [ 'avg' , 'max' , 'min' , 'sum' ] , help = 'Metric default aggregate' ) arg_0 . parser . add_argument ( '-u' , '--unit' , dest = 'unit' , action = 'store' , required = False , choices = [ 'percent' , 'number' , 'bytecount' , 'duration' ] , help = 'Metric unit' ) arg_0 . parser . add_argument ( '-r' , '--resolution' , dest = 'resolution' , action = 'store' , metavar = 'resolution' , required = False , help = 'Metric default resolution' ) arg_0 . parser . add_argument ( '-y' , '--type' , dest = 'type' , action = 'store' , default = None , required = False , metavar = 'type' , help = 'Sets the type metadata field' ) arg_0 . parser . add_argument ( '-x' , '--is-disabled' , dest = 'isDisabled' , action = 'store' , default = None , required = False , choices = [ 'true' , 'false' ] , help = 'Enable or disable the metric definition' )

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


Question: Custom loads function with an object_hook and automatic decoding

def Func ( arg_0 , arg_1 = "utf-8" , ** arg_2 ) : if isinstance ( arg_0 , bytes ) : arg_0 = arg_0 . decode ( arg_1 ) return json . Func ( arg_0 , object_hook = JSONData , ** arg_2 )

r"""Generate the mexican hat wavelet

    The Mexican wavelet is:

    .. math:: w[x] = \cos{5x}  \exp^{-x^2/2}

    :param lb: lower bound
    :param ub: upper bound
    :param int n: waveform data samples
    :return: the waveform

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

        from spectrum import mexican
        from pylab import plot
        plot(mexican(0, 10, 100))


Question: Plotting wrapper for hierarchical segmentations

def Func ( arg_0 , ** arg_1 ) : arg_2 , arg_3 = Func_flatten ( arg_0 ) arg_2 = [ np . asarray ( _ ) for _ in arg_2 ] return mir_eval . display . Func ( arg_2 , arg_3 , ** arg_1 )

This function handles the retrieval of Short-term Exposure Limit on
    worker exposure to dangerous chemicals.

    This API is considered experimental, and is expected to be removed in a
    future release in favor of a more complete object-oriented interface.

    >>> STEL('67-64-1')
    (750.0, 'ppm')
    >>> STEL('7664-38-2')
    (0.7489774978301237, 'ppm')
    >>> STEL('55720-99-5')
    (2.0, 'mg/m^3')
    >>> STEL('86290-81-5', AvailableMethods=True)
    ['Ontario Limits', 'None']


Question: Gets the file including name and payload .

def Func ( arg_0 ) : return arg_0 . part . Funcname ( ) , arg_0 . part . get_payload ( decode = True )

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: Makes a subfolder for plots .

def Func ( arg_0 , arg_1 ) : arg_2 = os . path . join ( arg_1 . analysis . plot_folder , arg_1 . v_name , arg_1 . v_crun ) arg_2 = os . path . abspath ( arg_2 ) if not os . path . isdir ( arg_2 ) : os . makedirs ( arg_2 ) return arg_2


Question: Helper to get optional details about const references

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 if arg_1 is not None : try : arg_2 = arg_1 [ arg_0 ] except IndexError : raise ValidationError ( "Consts value out of range: {}" . format ( arg_0 ) ) from None return arg_2 , repr ( arg_2 )

Extracts the update time from a ReMo item.

        The timestamp is extracted from 'end' field.
        This date is converted to a perceval format using a float value.

        :param item: item generated by the backend

        :returns: a UNIX timestamp


Question: Update boost factors when local inhibition is used

def Func ( arg_0 ) : arg_1 = numpy . zeros ( arg_0 . _numColumns , dtype = realDType ) for arg_2 in xrange ( arg_0 . _numColumns ) : arg_3 = arg_0 . _getColumnNeighborhood ( arg_2 ) arg_1 [ arg_2 ] = numpy . mean ( arg_0 . _activeDutyCycles [ arg_3 ] ) arg_0 . _boostFactors = numpy . exp ( ( arg_1 - arg_0 . _activeDutyCycles ) * arg_0 . _boostStrength )

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: Finish computation of prob on one element of the inverse image .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , ** arg_5 ) : arg_2 = arg_0 . _maybe_rotate_dims ( arg_2 , rotate_right = True ) arg_6 = arg_0 . distribution . prob ( arg_2 , ** arg_5 ) if arg_0 . _is_maybe_event_override : arg_6 = tf . reduce_prod ( input_tensor = arg_6 , axis = arg_0 . _reduce_event_indices ) arg_6 *= tf . exp ( tf . cast ( arg_3 , arg_6 . dtype ) ) if arg_0 . _is_maybe_event_override and isinstance ( arg_4 , int ) : tensorshape_util . set_shape ( arg_6 , tf . broadcast_static_shape ( tensorshape_util . with_rank_at_least ( arg_1 . shape , 1 ) [ : - arg_4 ] , arg_0 . batch_shape ) ) return arg_6

This method is called before first step of simulation.


Question: Gets the VPC Network ACLs

def Func ( arg_0 , ** arg_1 ) : arg_2 = describe_network_acls ( Filters = [ { "Name" : "vpc-id" , "Values" : [ arg_0 [ "id" ] ] } ] , ** arg_1 ) arg_3 = [ ] for arg_4 in arg_2 : arg_3 . append ( arg_4 [ "NetworkAclId" ] ) return arg_3

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: Should be called when tuple was buffered into in_stream

def Func ( arg_0 ) : if arg_0 . output_helper . is_out_queue_available ( ) : arg_0 . _read_tuples_and_execute ( ) arg_0 . output_helper . send_out_tuples ( ) else : arg_0 . bolt_metrics . update_out_queue_full_count ( )


Question: Parse a Telegram JSON messages list .

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

Write data to HDF5 file in one go.

        Args:
            filename_out (str): Name of output file


Question: Partition the network between containers

def Func ( arg_0 ) : arg_1 = load_config ( arg_0 . config ) arg_2 = get_blockade ( arg_1 , arg_0 ) if arg_0 . random : if arg_0 . partitions : raise BlockadeError ( "Either specify individual partitions " "or --random, but not both" ) arg_2 . random_partition ( ) else : arg_3 = [ ] for arg_4 in arg_0 . partitions : arg_5 = [ ] for arg_6 in arg_4 . split ( "," ) : arg_6 = arg_6 . strip ( ) if arg_6 : arg_5 . append ( arg_6 ) arg_3 . append ( arg_5 ) if not arg_3 : raise BlockadeError ( "Either specify individual partitions " "or random" ) arg_2 . partition ( arg_3 )

Sparse matrix roll

    This operation is equivalent to ``numpy.roll``, but operates on sparse matrices.

    Parameters
    ----------
    x : scipy.sparse.spmatrix or np.ndarray
        The sparse matrix input

    shift : int
        The number of positions to roll the specified axis

    axis : (0, 1, -1)
        The axis along which to roll.

    Returns
    -------
    x_rolled : same type as `x`
        The rolled matrix, with the same format as `x`

    See Also
    --------
    numpy.roll

    Examples
    --------
    >>> # Generate a random sparse binary matrix
    >>> X = scipy.sparse.lil_matrix(np.random.randint(0, 2, size=(5,5)))
    >>> X_roll = roll_sparse(X, 2, axis=0)  # Roll by 2 on the first axis
    >>> X_dense_r = roll_sparse(X.toarray(), 2, axis=0)  # Equivalent dense roll
    >>> np.allclose(X_roll, X_dense_r.toarray())
    True


Question: Private swap function used by get_or_create to atomically swap the new namespace map into the global cache .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 . Symbol , arg_5 : arg_6 . ModuleType = None , arg_8 = arg_9 , ) -> lmap . Map : arg_10 = arg_0 . entry ( arg_2 , None ) if arg_10 is not None : return arg_0 arg_11 = Namespace ( arg_2 , arg_5 = arg_5 ) if arg_2 . name != arg_8 : arg_12 = arg_0 . entry ( arg_3 . symbol ( arg_8 ) , None ) assert arg_12 is not None , "Core namespace not loaded yet!" arg_11 . refer_all ( arg_12 ) return arg_0 . assoc ( arg_2 , arg_11 )

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

        :param summary: a TrainSummary object


Question: Reads the features from a file and stores them in the current object .

def Func ( arg_0 , arg_1 = 1e-3 ) : try : with open ( arg_0 . file_struct . features_file ) as f : arg_2 = json . load ( f ) if arg_0 . dur is None : arg_0 . dur = float ( arg_2 [ "globals" ] [ "dur" ] ) assert ( np . isclose ( arg_0 . dur , float ( arg_2 [ "globals" ] [ "dur" ] ) , rtol = arg_1 ) ) assert ( arg_0 . sr == int ( arg_2 [ "globals" ] [ "sample_rate" ] ) ) assert ( arg_0 . hop_length == int ( arg_2 [ "globals" ] [ "hop_length" ] ) ) assert ( os . path . basename ( arg_0 . file_struct . audio_file ) == os . path . basename ( arg_2 [ "globals" ] [ "audio_file" ] ) ) arg_4 = FeatureParamsError ( "Couldn't find features for %s id in file %s" % ( arg_0 . get_id ( ) , arg_0 . file_struct . features_file ) ) if arg_0 . get_id ( ) not in arg_2 . keys ( ) : raise arg_4 for arg_5 in arg_0 . get_param_names ( ) : arg_6 = getattr ( arg_0 , arg_5 ) if hasattr ( arg_6 , '__call__' ) : if arg_6 . __name__ != arg_2 [ arg_0 . get_id ( ) ] [ "params" ] [ arg_5 ] : raise arg_4 else : if str ( arg_6 ) != arg_2 [ arg_0 . get_id ( ) ] [ "params" ] [ arg_5 ] : raise arg_4 arg_0 . _est_beats_times = np . array ( arg_2 [ "est_beats" ] ) arg_0 . _est_beatsync_times = np . array ( arg_2 [ "est_beatsync_times" ] ) arg_0 . _est_beats_frames = librosa . core . time_to_frames ( arg_0 . _est_beats_times , sr = arg_0 . sr , hop_length = arg_0 . hop_length ) arg_0 . _framesync_features = np . array ( arg_2 [ arg_0 . get_id ( ) ] [ "framesync" ] ) arg_0 . _est_beatsync_features = np . array ( arg_2 [ arg_0 . get_id ( ) ] [ "est_beatsync" ] ) if "ann_beats" in arg_2 . keys ( ) : arg_0 . _ann_beats_times = np . array ( arg_2 [ "ann_beats" ] ) arg_0 . _ann_beatsync_times = np . array ( arg_2 [ "ann_beatsync_times" ] ) arg_0 . _ann_beats_frames = librosa . core . time_to_frames ( arg_0 . _ann_beats_times , sr = arg_0 . sr , hop_length = arg_0 . hop_length ) arg_0 . _ann_beatsync_features = np . array ( arg_2 [ arg_0 . get_id ( ) ] [ "ann_beatsync" ] ) except KeyError : raise WrongFeaturesFormatError ( "The features file %s is not correctly formatted" % arg_0 . file_struct . features_file ) except AssertionError : raise FeaturesNotFound ( "The features for the given parameters were not found in " "features file %s" % arg_0 . file_struct . features_file ) except IOError : raise NoFeaturesFileError ( "Could not find features file %s" , arg_0 . file_struct . features_file )

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


Question: A System Model contains top - level packages

def Func ( arg_0 , arg_1 ) : for arg_2 in many ( arg_1 ) . EP_PKG [ 1401 ] ( ) : arg_0 . accept ( arg_2 )

Generates a 'code_verifier' as described in section 4.1 of RFC 7636.

    This is a 'high-entropy cryptographic random string' that will be
    impractical for an attacker to guess.

    Args:
        n_bytes: integer between 31 and 96, inclusive. default: 64
            number of bytes of entropy to include in verifier.

    Returns:
        Bytestring, representing urlsafe base64-encoded random data.


Question: REST Schedule playing something on a call Helper

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

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: Given a list of range specifiers for python ensure compatibility .

def Func ( arg_0 ) : if not isinstance ( arg_0 , ( list , tuple ) ) : arg_0 = [ arg_0 ] arg_1 = sys . version_info arg_2 = '%s.%s' % ( arg_1 . major , arg_1 . minor ) for arg_3 in arg_0 : if arg_2 == arg_3 : return try : if eval ( arg_2 + arg_3 ) : return except SyntaxError : pass raise ValueError ( 'Python version %s unsupported' % arg_2 )

The estimated signal-to-noise_maps mappers of the image.


Question: Implements the < = operator with JS - style type coertion .

def Func ( arg_0 , arg_1 , * arg_2 ) : return ( less ( arg_0 , arg_1 ) or soft_equals ( arg_0 , arg_1 ) ) and ( not arg_2 or Func ( arg_1 , * arg_2 ) )


Question: Saves the specified file to either S3 or the local filesystem depending on the currently enabled storage type .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if not ( arg_0 . storage_type and arg_0 . bucket_name ) : arg_4 = arg_0 . _Func_local ( arg_1 , arg_2 , arg_3 ) else : if arg_0 . storage_type != 's3' : raise ValueError ( 'Storage type "%s" is invalid, the only supported storage type (apart from default local storage) is s3.' % arg_0 . storage_type ) arg_4 = arg_0 . _Func_s3 ( arg_1 , arg_2 , arg_3 ) if arg_0 . field_name : setattr ( arg_3 , arg_0 . field_name , arg_4 ) if arg_0 . storage_type == 's3' : if arg_0 . storage_type_field : setattr ( arg_3 , arg_0 . storage_type_field , arg_0 . storage_type ) if arg_0 . bucket_name_field : setattr ( arg_3 , arg_0 . bucket_name_field , arg_0 . bucket_name ) else : if arg_0 . storage_type_field : setattr ( arg_3 , arg_0 . storage_type_field , '' ) if arg_0 . bucket_name_field : setattr ( arg_3 , arg_0 . bucket_name_field , '' ) return arg_4


Question: The trace function passed to sys . settrace .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if arg_0 . stopped : return if 0 : sys . stderr . write ( "trace event: %s %r @%d\n" % ( arg_2 , arg_1 . f_code . co_filename , arg_1 . f_lineno ) ) if arg_0 . last_exc_back : if arg_1 == arg_0 . last_exc_back : if arg_0 . arcs and arg_0 . cur_file_data : arg_4 = ( arg_0 . last_line , - arg_0 . last_exc_firstlineno ) arg_0 . cur_file_data [ arg_4 ] = None arg_0 . cur_file_data , arg_0 . last_line = arg_0 . data_stack . pop ( ) arg_0 . last_exc_back = None if arg_2 == 'call' : arg_0 . data_stack . append ( ( arg_0 . cur_file_data , arg_0 . last_line ) ) arg_8 = arg_1 . f_code . co_filename if arg_8 not in arg_0 . shouldFunc_cache : arg_9 = arg_0 . shouldFunc ( arg_8 , arg_1 ) arg_0 . shouldFunc_cache [ arg_8 ] = arg_9 else : arg_9 = arg_0 . shouldFunc_cache [ arg_8 ] if arg_9 : if arg_9 not in arg_0 . data : arg_0 . data [ arg_9 ] = { } arg_0 . cur_file_data = arg_0 . data [ arg_9 ] else : arg_0 . cur_file_data = None arg_0 . last_line = - 1 elif arg_2 == 'line' : if arg_0 . cur_file_data is not None : if arg_0 . arcs : arg_0 . cur_file_data [ ( arg_0 . last_line , arg_1 . f_lineno ) ] = None else : arg_0 . cur_file_data [ arg_1 . f_lineno ] = None arg_0 . last_line = arg_1 . f_lineno elif arg_2 == 'return' : if arg_0 . arcs and arg_0 . cur_file_data : arg_13 = arg_1 . f_code . co_firstlineno arg_0 . cur_file_data [ ( arg_0 . last_line , - arg_13 ) ] = None arg_0 . cur_file_data , arg_0 . last_line = arg_0 . data_stack . pop ( ) elif arg_2 == 'exception' : arg_0 . last_exc_back = arg_1 . f_back arg_0 . last_exc_firstlineno = arg_1 . f_code . co_firstlineno return arg_0 . Func


Question: A function to display sympy expression using inline style LaTeX in PNG .

def Func ( arg_0 ) : arg_1 = latex ( arg_0 , mode = 'inline' ) arg_1 = arg_1 . replace ( '\\operatorname' , '' ) arg_1 = arg_1 . replace ( '\\overline' , '\\bar' ) arg_2 = latex_to_png ( arg_1 ) return arg_2

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

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

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

    Returns:
        DataFrame: result


Question: This will execute the query returning the key where a ZSET of your results will be stored for pagination further operations etc .

def Func ( arg_0 , arg_1 ) : if not ( arg_0 . _filters or arg_0 . _order_by ) : raise QueryError ( "You are missing filter or order criteria" ) arg_1 = int ( arg_1 ) if arg_1 < 1 : raise QueryError ( "You must specify a timeout >= 1, you gave %r" % arg_1 ) return arg_0 . _model . _gindex . search ( _connect ( arg_0 . _model ) , arg_0 . _filters , arg_0 . _order_by , arg_1 = arg_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: Parse the string output from sox s stat function

def Func ( arg_0 ) : arg_1 = arg_0 . split ( '\n' ) arg_2 = { } for arg_3 in arg_1 : arg_4 = arg_3 . split ( ':' ) if len ( arg_4 ) == 2 : arg_5 = arg_4 [ 0 ] arg_6 = arg_4 [ 1 ] . strip ( ' ' ) try : arg_6 = float ( arg_6 ) except ValueError : arg_6 = None arg_2 [ arg_5 ] = arg_6 return arg_2

Loads many namespaces and combines their names.

    :param iter[str] locations: An iterable of URLs or file paths pointing to BEL namespaces.
    :param bool check_keywords: Should all the keywords be the same? Defaults to ``True``
    :return: A dictionary of {names: labels}
    :rtype: dict[str, str]

    Example Usage

    >>> from pybel.resources import write_namespace
    >>> from pybel_tools.definition_utils import export_namespace, get_merged_namespace_names
    >>> graph = ...
    >>> original_ns_url = ...
    >>> export_namespace(graph, 'MBS') # Outputs in current directory to MBS.belns
    >>> value_dict = get_merged_namespace_names([original_ns_url, 'MBS.belns'])
    >>> with open('merged_namespace.belns', 'w') as f:
    >>> ...  write_namespace('MyBrokenNamespace', 'MBS', 'Other', 'Charles Hoyt', 'PyBEL Citation', value_dict, file=f)


Question: The subparts are seperated by a comma . Make sure that commas inside the part themselves are not considered .

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] arg_3 = 0 arg_4 = ',' arg_5 = 0 for arg_6 in range ( len ( arg_1 ) ) : if arg_1 [ arg_6 ] == '(' : arg_3 += 1 elif arg_1 [ arg_6 ] == ')' : arg_3 -= 1 elif arg_1 [ arg_6 ] == arg_4 and arg_3 == 0 : arg_2 . append ( arg_1 [ arg_5 : arg_6 ] . strip ( ) ) arg_5 = arg_6 + 1 arg_2 . append ( arg_1 [ arg_5 : ] . strip ( ) ) return arg_2

Asynchronously request a URL and get the encoded text content of the
    body.

    Parameters
    ----------
    url : `str`
        URL to download.
    session : `aiohttp.ClientSession`
        An open aiohttp session.

    Returns
    -------
    content : `str`
        Content downloaded from the URL.


Question: Get the frequencies for Mel bins

def Func ( arg_0 , arg_1 = 0 , arg_2 = 11025.0 , ** arg_3 ) : if arg_1 is None : arg_1 = 0 if arg_2 is None : arg_2 = 11025.0 arg_4 = core . mel_frequencies ( arg_0 , arg_1 = arg_1 , arg_2 = arg_2 ) arg_4 [ 1 : ] -= 0.5 * np . diff ( arg_4 ) arg_4 = np . append ( np . maximum ( 0 , arg_4 ) , [ arg_2 ] ) return arg_4


Question: Compress a file only if needed .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_Funced_filename ( arg_1 ) if not arg_2 : return arg_0 . do_Func ( arg_1 , arg_2 )

source record and index must have been set


Question: Creates a new pypet leaf instance .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_0 . _all_get_from_attrs ( arg_3 , HDF5StorageService . CLASS_NAME ) arg_5 = arg_2 . _create_class ( arg_4 ) arg_6 = arg_2 . _construct_instance ( arg_5 , arg_1 ) return arg_6

r'''Method to calculate pressure-dependent liquid molar volume at
        temperature `T` and pressure `P` with a given method.

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

        Parameters
        ----------
        T : float
            Temperature at which to calculate molar volume, [K]
        P : float
            Pressure at which to calculate molar volume, [K]
        method : str
            Name of the method to use

        Returns
        -------
        Vm : float
            Molar volume of the liquid at T and P, [m^3/mol]


Question: Creates tuple of str tuple - str pairs representing resolved & sorted DAG .

def Func ( arg_0 ) : def _explore ( arg_1 ) : if arg_1 . depth < 0 : return if not arg_1 . parents : arg_8 . append ( ( arg_1 . name , arg_1 . parents ) ) arg_1 . depth = - 1 return arg_3 = ( arg_1 . name , [ ] ) arg_8 . append ( arg_3 ) arg_1 . depth = - 1 arg_4 = 0 for arg_5 in sorted ( ( arg_0 . get ( p ) for p in arg_1 . parents ) , key = lambda arg_5 : arg_5 . depth ) : arg_6 = len ( arg_8 ) _explore ( arg_5 ) arg_7 = len ( arg_8 ) arg_3 [ 1 ] . extend ( [ '_' ] * arg_4 + [ arg_5 . name ] ) arg_4 = arg_7 - arg_6 - 1 arg_0 = _depth ( arg_0 ) arg_8 = [ ] for arg_1 in sorted ( arg_0 . values ( ) , key = lambda arg_5 : arg_5 . depth , reverse = True ) : _explore ( arg_1 ) return tuple ( reversed ( arg_8 ) )

Add new java messages to ignore from user text file.  It first reads in the new java ignored messages
    from the user text file and generate a dict structure to out of the new java ignored messages.  This
    is achieved by function extract_message_to_dict.  Next, new java messages will be added to the original
    ignored java messages dict g_ok_java_messages.  Again, this is achieved by function update_message_dict.

    :return: none


Question: Make a symmetrical binary tree with

def Func ( arg_0 ) : arg_1 = nx . DiGraph ( ) arg_2 = '0' arg_1 . add_node ( arg_2 ) add_children ( arg_1 , arg_2 , arg_0 , 2 ) return arg_1

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


Question: Start local agent

def Func ( arg_0 ) : logger . info ( 'Starting agent on localhost' ) arg_1 = arg_0 . python . split ( ) + [ os . path . join ( arg_0 . workdir , arg_0 . AGENT_FILENAME ) , '--telegraf' , arg_0 . path [ 'TELEGRAF_LOCAL_PATH' ] , '--host' , arg_0 . host ] if arg_0 . kill_old : arg_1 . append ( arg_0 . kill_old ) arg_0 . session = arg_0 . popen ( arg_1 ) arg_0 . reader_thread = threading . Thread ( target = arg_0 . read_buffer ) arg_0 . reader_thread . setDaemon ( True ) return arg_0 . session

Implement a lookup for object level permissions. Basically the same as
        ModelAdmin.has_delete_permission, but also passes the obj parameter in.


Question: Validates the model using a series of checks on bits of the data .

def Func ( arg_0 , arg_1 ) : _validate_license ( arg_1 ) _validate_roles ( arg_1 ) arg_2 = ( 'title' , 'summary' , ) for arg_3 in arg_2 : if arg_1 . metadata . get ( arg_3 ) in [ None , '' , [ ] ] : raise exceptions . MissingRequiredMetadata ( arg_3 ) _validate_derived_from ( arg_0 , arg_1 ) _validate_subjects ( arg_0 , arg_1 )


Question: Make a TCP connection to the alarm system .

async def Func ( arg_0 ) : _LOGGER . debug ( "Connecting..." ) try : arg_0 . _reader , arg_0 . _writer = await asyncio . open_Funcion ( arg_0 . _host , arg_0 . _port , loop = arg_0 . _loop ) _LOGGER . debug ( "sucess Funcing..." ) except Exception as e : _LOGGER . warning ( "Exception during Funcing: %s." , e ) arg_0 . _writer = None arg_0 . _reader = None return False return True

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

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


Question: overridden from install_lib class

def Func ( arg_0 ) : install_lib . install_lib . Func ( arg_0 ) if include_dirs : for arg_1 in include_dirs : arg_2 = join ( arg_0 . install_dir , arg_1 ) if sys . version_info >= ( 3 , 0 ) : arg_3 = { "invalid_encoded_data*" , "unknown_encoding*" } else : arg_3 = set ( ) shutil . rmtree ( arg_2 , ignore_errors = True ) shutil . copytree ( arg_1 , arg_2 , ignore = shutil . ignore_patterns ( * arg_3 ) )

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: Attach an observer .

def Func ( arg_0 , arg_1 ) : if not arg_1 in arg_0 . _observers : arg_0 . _observers . append ( arg_1 ) return arg_0

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


Question: Levenberg - Marquardt optimization on a set of particles .

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

Register interface in implementation phase


Question: Given a filepath and a list of regex patterns this function returns true if filepath matches any one of those patterns

def Func ( arg_0 , arg_1 ) : if not arg_0 . only_blame_patterns : return True for arg_2 in arg_0 . only_blame_patterns : if arg_2 . match ( arg_1 ) : return True return False


Question: Sets a custom mock engine replacing the built - in one .

def Func ( arg_0 , arg_1 ) : if not arg_1 : raise TypeError ( 'engine must be a valid object' ) arg_2 = arg_1 ( arg_0 ) arg_3 = ( 'activate' , 'disable' ) if not all ( [ hasattr ( arg_2 , arg_4 ) for arg_4 in arg_3 ] ) : raise NotImplementedError ( 'engine must implementent the ' 'required methods' ) arg_0 . mock_engine = arg_2 if arg_0 . active : arg_0 . mock_engine . activate ( )

Asynchronously request a URL and get the encoded text content of the
    body.

    Parameters
    ----------
    url : `str`
        URL to download.
    session : `aiohttp.ClientSession`
        An open aiohttp session.

    Returns
    -------
    content : `str`
        Content downloaded from the URL.


Question: It will return the google url to be searched

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = '+' . join ( arg_1 ) arg_4 = 'https://www.google.co.in/search?q=' arg_2 = arg_2 . split ( " " ) arg_5 = '+' . join ( arg_2 ) arg_6 = arg_4 + arg_3 + arg_5 return arg_6

Load the configuration.

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

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

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


Question: Write data to Vault . Returns the JSON - decoded response .

def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_0 . request ( 'PUT' , '/v1/' + arg_1 , json = arg_2 ) return arg_3 . addCallback ( arg_0 . _handle_response , check_cas = True )

Get the Channel Id from the current Activity on the Turn Context.

        Args:
            turn_context (TurnContext): The Turn Context to retrieve the Activity's Channel Id from.

        Returns:
            str: The Channel Id from the Turn Context's Activity.


Question: Return a datetime oject from a string with optional time format .

def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_2 = du . parser . parse ( arg_0 ) else : arg_2 = dt . datetime . strftime ( arg_0 , arg_1 ) return arg_2

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Return the string representation of the job description XML .

def Func ( arg_0 ) : arg_1 = arg_0 . as_element ( ) indent ( arg_1 ) arg_2 = ET . Func ( arg_1 , encoding = "utf-8" ) arg_2 = re . sub ( r'_[A-Z]_' , '' , arg_2 ) arg_2 = '<?xml version="1.0" encoding="utf-8"?>\n' + arg_2 return arg_2

Save an image to self.storage at `save_path`.

        Arguments:
            `imagefile`: Raw image data, typically a BytesIO instance.
            `save_path`: The path within self.storage where the image should
                         be saved.
            `file_ext`: The file extension of the image-to-be-saved.
            `mime_type`: A valid image mime type (as found in
                         versatileimagefield.utils)


Question: Execute the enrich phase for a given backend section

def Func ( arg_0 , arg_1 ) : TaskProjects ( arg_0 ) . execute ( ) arg_2 = TaskEnrich ( arg_0 , arg_1 = arg_1 ) try : arg_2 . execute ( ) logging . info ( "Loading enriched data finished!" ) except Exception as e : logging . error ( str ( e ) ) sys . exit ( - 1 )

Delete old prices, leaving just the last.


Question: Level - 2 parser for a DX field object .

def Func ( arg_0 ) : try : arg_1 = arg_0 . __consume ( ) except DXParserNoTokens : return if arg_1 . equals ( 'component' ) : arg_2 = arg_0 . __consume ( ) . value ( ) if not arg_0 . __consume ( ) . equals ( 'value' ) : raise DXParseError ( 'field: "value" expected' ) arg_3 = arg_0 . __consume ( ) . value ( ) try : arg_0 . currentobject [ 'components' ] [ arg_2 ] = arg_3 except KeyError : arg_0 . currentobject [ 'components' ] = { arg_2 : arg_3 } else : raise DXParseError ( 'field: ' + str ( arg_1 ) + ' not recognized.' )

Return a standardized canonical tautomer SMILES string given a SMILES string.

    Note: This is a convenience function for quickly standardizing and finding the canonical tautomer for a single
    SMILES string. It is more efficient to use the :class:`~molvs.standardize.Standardizer` class directly when working
    with many molecules or when custom options are needed.

    :param string smiles: The SMILES for the molecule.
    :returns: The SMILES for the standardize canonical tautomer.
    :rtype: string.


Question: Called when a connection is made and used to send out headers

def Func ( arg_0 ) : arg_1 = [ "GET %s HTTP/1.1" % ( "/room/%s/live.json" % arg_0 . factory . get_stream ( ) . get_room_id ( ) ) ] arg_2 = arg_0 . factory . get_stream ( ) . get_connection ( ) . get_headers ( ) for arg_3 in arg_2 : arg_1 . append ( "%s: %s" % ( arg_3 , arg_2 [ arg_3 ] ) ) arg_1 . append ( "Host: streaming.campfirenow.com" ) arg_0 . transport . write ( "\r\n" . join ( arg_1 ) + "\r\n\r\n" ) arg_0 . factory . get_stream ( ) . set_protocol ( arg_0 )

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: The callable makes it possible to include rpcinterface in a Pyramid application .

def Func ( arg_0 ) : arg_1 = arg_0 . registry . settings if asbool ( arg_1 . get ( 'twitcher.rpcinterface' , True ) ) : LOGGER . debug ( 'Twitcher XML-RPC Interface enabled.' ) arg_0 . include ( 'twitcher.config' ) arg_0 . include ( 'twitcher.basicauth' ) arg_0 . include ( 'pyramid_rpc.xmlrpc' ) arg_0 . include ( 'twitcher.db' ) arg_0 . add_xmlrpc_endpoint ( 'api' , '/RPC2' ) arg_0 . add_xmlrpc_method ( RPCInterface , attr = 'generate_token' , endpoint = 'api' , method = 'generate_token' ) arg_0 . add_xmlrpc_method ( RPCInterface , attr = 'revoke_token' , endpoint = 'api' , method = 'revoke_token' ) arg_0 . add_xmlrpc_method ( RPCInterface , attr = 'revoke_all_tokens' , endpoint = 'api' , method = 'revoke_all_tokens' ) arg_0 . add_xmlrpc_method ( RPCInterface , attr = 'register_service' , endpoint = 'api' , method = 'register_service' ) arg_0 . add_xmlrpc_method ( RPCInterface , attr = 'unregister_service' , endpoint = 'api' , method = 'unregister_service' ) arg_0 . add_xmlrpc_method ( RPCInterface , attr = 'get_service_by_name' , endpoint = 'api' , method = 'get_service_by_name' ) arg_0 . add_xmlrpc_method ( RPCInterface , attr = 'get_service_by_url' , endpoint = 'api' , method = 'get_service_by_url' ) arg_0 . add_xmlrpc_method ( RPCInterface , attr = 'clear_services' , endpoint = 'api' , method = 'clear_services' ) arg_0 . add_xmlrpc_method ( RPCInterface , attr = 'list_services' , endpoint = 'api' , method = 'list_services' )

Click the right mouse button without modifiers pressed.

        Parameters: coordinates to click on scren (tuple (x, y))
        Returns: None


Question: Get s the IAM Group details .

def Func ( arg_0 , arg_1 = True , arg_2 = None , ** arg_3 ) : arg_4 = arg_2 . Func ( GroupName = arg_0 , ** arg_3 ) if arg_1 : if arg_4 . get ( 'IsTruncated' ) : arg_5 = { 'GroupName' : arg_0 } arg_5 . update ( arg_3 ) arg_6 = arg_4 [ 'Users' ] arg_5 [ 'Marker' ] = arg_4 [ 'Marker' ] arg_4 [ 'Users' ] = arg_6 + _get_users_for_group ( arg_2 , ** arg_5 ) else : arg_4 . pop ( 'Users' , None ) arg_4 . pop ( 'IsTruncated' , None ) arg_4 . pop ( 'Marker' , None ) return arg_4

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: r Method to calculate heat capacity of a gas mixture at temperature T pressure P mole fractions zs and weight fractions ws with a given method .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : if arg_5 == SIMPLE : arg_6 = [ i ( arg_1 ) for i in arg_0 . HeatCapacityGases ] return mixing_simple ( arg_3 , arg_6 ) else : raise Exception ( 'Method not valid' )

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: Pickle the Dataset instance to the provided file .

def Func ( arg_0 , arg_1 ) : if hasattr ( arg_0 , 'feature_table' ) : arg_0 . feature_table . _sdf_to_csr ( ) pickle . dump ( arg_0 , open ( arg_1 , 'wb' ) , - 1 ) if hasattr ( arg_0 , 'feature_table' ) : arg_0 . feature_table . _csr_to_sdf ( )

Return a warning message of code 'code'.

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


Question: the client will announce itself given that a command is not in a particular predefined list .

def Func ( arg_0 , arg_1 = None ) : if arg_1 is not None : if arg_1 not in [ 'get' ] and arg_0 . quiet is False : arg_0 . speak ( )


Question: This function will take in a port spec as specified by the port_spec compiler and will output an nginx web proxy config string . This string can then be written to a file and used running nginx

def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = "" , "" for arg_4 in arg_0 [ 'nginx' ] : if arg_4 [ 'type' ] == 'http' : arg_2 += _nginx_http_spec ( arg_4 , arg_1 ) elif arg_4 [ 'type' ] == 'stream' : arg_3 += _nginx_stream_spec ( arg_4 , arg_1 ) return { 'http' : arg_2 , 'stream' : arg_3 }


Question: XHDR command .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = arg_1 if range is not None : arg_3 += " " + utils . unparse_msgid_range ( arg_2 ) arg_4 , arg_5 = arg_0 . command ( "XHDR" , arg_3 ) if arg_4 != 221 : raise NNTPReplyError ( arg_4 , arg_5 ) return arg_0 . info ( arg_4 , arg_5 )

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


Question: Computes the resulting metadata statement from a compounded metadata statement . If something goes wrong during the evaluation an exception is raised

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = dict ( [ ( k , v ) for k , v in arg_1 . items ( ) if k not in IgnoreKeys ] ) arg_4 = [ ] if 'metadata_statements' in arg_1 : for arg_5 , arg_6 in arg_1 [ 'metadata_statements' ] . items ( ) : if isinstance ( arg_6 , str ) : arg_6 = json . loads ( arg_6 ) for arg_7 in arg_0 . Func ( arg_6 ) : if isinstance ( arg_6 , Message ) : arg_8 = LessOrEqual ( sup = arg_7 , ** arg_6 . to_dict ( ) ) else : arg_8 = LessOrEqual ( sup = arg_7 , ** arg_6 ) if arg_8 . is_expired ( ) : logger . error ( 'This metadata statement has expired: {}' . format ( arg_6 ) ) logger . info ( 'My time: {}' . format ( utc_time_sans_frac ( ) ) ) continue arg_8 . eval ( arg_3 ) arg_4 . append ( arg_8 ) return arg_4 else : try : arg_9 = arg_1 [ 'iss' ] except : arg_8 = LessOrEqual ( ) arg_8 . eval ( arg_3 ) else : arg_8 = LessOrEqual ( iss = arg_9 , exp = arg_1 [ 'exp' ] ) arg_8 . eval ( arg_3 ) arg_4 . append ( arg_8 ) return arg_4

Add an HTTP header to response object.

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


Question: Fix outgoing stanza .

def Func ( arg_0 , arg_1 ) : StreamBase . Func ( arg_0 , arg_1 ) if arg_0 . initiator : if arg_1 . from_jid : arg_1 . from_jid = None else : if not arg_1 . from_jid : arg_1 . from_jid = arg_0 . me

Does google-lint on a single file.

  Args:
    filename: The name of the file to parse.

    vlevel: The level of errors to report.  Every error of confidence
    >= verbose_level will be reported.  0 is a good default.

    extra_check_functions: An array of additional check functions that will be
                           run on each source line. Each function takes 4
                           arguments: filename, clean_lines, line, error


Question: Get the cast & crew credits for a TV season by season number .

def Func ( arg_0 , ** arg_1 ) : arg_2 = arg_0 . _get_series_id_season_number_path ( 'Func' ) arg_3 = arg_0 . _GET ( arg_2 , arg_1 ) arg_0 . _set_attrs_to_values ( arg_3 ) return arg_3

Bring the interrupt pin on the GPIO into Linux userspace.


Question: Returns a Google MLEngine service object .

def Func ( arg_0 ) : arg_1 = arg_0 . _authorize ( ) return build ( 'ml' , 'v1' , http = arg_1 , cache_discovery = False )

Sleep for the time specified in the exception. If not specified, wait
        for 60 seconds.


Question: Convert a pattern_jku annotation object to mir_eval format .

def Func ( arg_0 ) : arg_1 = defaultdict ( lambda : defaultdict ( list ) ) for arg_2 , arg_3 in zip ( * arg_0 . to_event_values ( ) ) : arg_4 = arg_3 [ 'pattern_id' ] arg_5 = arg_3 [ 'occurrence_id' ] arg_6 = ( arg_2 , arg_3 [ 'midi_pitch' ] ) arg_1 [ arg_4 ] [ arg_5 ] . append ( arg_6 ) return [ list ( arg_7 . values ( ) ) for arg_7 in six . itervalues ( arg_1 ) ]

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

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

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


Question: State size of the LSTMStateTuple .

def Func ( arg_0 ) : return ( LSTMStateTuple ( arg_0 . _num_units , arg_0 . _num_units ) if arg_0 . _state_is_tuple else 2 * arg_0 . _num_units )

Load Flickr25K dataset.

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

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

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

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

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

    Get all images

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


Question: Returns id of a OneDrive user .

def Func ( arg_0 ) : if arg_0 . _user_id is None : arg_0 . _user_id = arg_0 . get_user_data ( ) [ 'id' ] return arg_0 . _user_id

Initialize the bucket map assuming the given number of maxBuckets.


Question: Loads a node from hdf5 file and if desired recursively everything below

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 , arg_8 , arg_9 ) : if arg_5 is None : arg_5 = float ( 'inf' ) arg_10 = [ ( arg_1 , arg_6 , arg_9 ) ] while arg_10 : arg_1 , arg_6 , arg_9 = arg_10 . pop ( ) if isinstance ( arg_9 , pt . link . SoftLink ) : if arg_3 : arg_0 . _tree_load_link ( arg_1 , arg_2 = arg_2 , traj = arg_7 , arg_8 = arg_8 , hdf5_soft_link = arg_9 ) continue arg_11 = arg_9 . _v_name arg_12 = arg_0 . _all_get_from_attrs ( arg_9 , HDF5StorageService . LEAF ) arg_13 = arg_11 in arg_1 . _children if arg_12 : if arg_13 : arg_14 = arg_1 . _children [ arg_11 ] else : arg_14 = arg_0 . _tree_create_leaf ( arg_11 , arg_7 , arg_9 ) arg_1 . _add_leaf_from_storage ( arg_20 = ( arg_14 , ) , kwargs = { } ) arg_0 . _prm_load_parameter_or_result ( arg_14 , arg_2 = arg_2 , _hdf5_group = arg_9 ) if arg_8 : arg_14 . _stored = False else : if arg_13 : arg_16 = arg_1 . _children [ arg_11 ] if arg_2 == pypetconstants . OVERWRITE_DATA : arg_16 . v_annotations . f_empty ( ) arg_16 . v_comment = '' else : if HDF5StorageService . CLASS_NAME in arg_9 . _v_attrs : arg_18 = arg_0 . _all_get_from_attrs ( arg_9 , HDF5StorageService . CLASS_NAME ) arg_19 = arg_7 . _create_class ( arg_18 ) arg_14 = arg_7 . _construct_instance ( arg_19 , arg_11 ) arg_20 = ( arg_14 , ) else : arg_20 = ( arg_11 , ) arg_16 = arg_1 . _add_group_from_storage ( arg_20 = arg_20 , kwargs = { } ) arg_0 . _grp_load_group ( arg_16 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = False , arg_5 = arg_5 , _traj = arg_7 , _as_new = arg_8 , _hdf5_group = arg_9 ) if arg_4 and arg_6 < arg_5 : arg_21 = arg_6 + 1 for arg_22 in ( arg_9 . _v_groups , arg_9 . _v_links ) : for arg_23 in arg_22 : arg_24 = arg_22 [ arg_23 ] arg_10 . append ( ( arg_16 , arg_21 , arg_24 ) )

Called when there is an error in the websocket


Question: Gets the IP from the inet interfaces .

def Func ( ) : arg_0 = None arg_1 = psutil . net_if_addrs ( ) for arg_2 , arg_3 in arg_1 . items ( ) : for arg_4 in arg_3 : if arg_4 . family == socket . AF_INET : arg_5 = ipaddress . ip_address ( arg_4 . address ) if not ( arg_5 . is_link_local or arg_5 . is_loopback ) : arg_0 = str ( arg_5 ) break return arg_0

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

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


Question: Returns a dictionary of all leaves hanging immediately below this group .

def Func ( arg_0 , arg_1 = True ) : if arg_1 : return arg_0 . _leaves . copy ( ) else : return arg_0 . _leaves

initialize the merger model with a coalescent time

        Args:
            - Tc:   a float or an iterable, if iterable another argument T of same shape is required
            - T:    an array like of same shape as Tc that specifies the time pivots corresponding to Tc
        Returns:
            - None


Question: format an options section using as ReST formatted output

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : if arg_1 : print ( "%s\n%s" % ( arg_1 , "'" * len ( arg_1 ) ) , file = arg_0 ) if arg_3 : print ( normalize_text ( arg_3 , line_len = 79 , indent = "" ) , file = arg_0 ) print ( file = arg_0 ) for arg_4 , arg_5 , arg_6 in arg_2 : arg_7 = arg_5 . get ( "help" ) print ( ":%s:" % arg_4 , file = arg_0 ) if arg_7 : arg_7 = normalize_text ( arg_7 , line_len = 79 , indent = "  " ) print ( arg_7 , file = arg_0 ) if arg_6 : arg_6 = str ( _format_option_value ( arg_5 , arg_6 ) ) print ( file = arg_0 ) print ( "  Default: ``%s``" % arg_6 . replace ( "`` " , "```` ``" ) , file = arg_0 )

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: Returns a normalized house code i . e . upper case . Raises exception X10InvalidHouseCode if house code appears to be invalid

def Func ( arg_0 ) : if arg_0 is None : raise X10InvalidHouseCode ( '%r is not a valid house code' % arg_0 ) if not isinstance ( arg_0 , basestring ) : raise X10InvalidHouseCode ( '%r is not a valid house code' % arg_0 ) if len ( arg_0 ) != 1 : raise X10InvalidHouseCode ( '%r is not a valid house code' % arg_0 ) arg_0 = arg_0 . upper ( ) if not ( 'A' <= arg_0 <= 'P' ) : raise X10InvalidHouseCode ( '%r is not a valid house code' % arg_0 ) return arg_0

Stop streaming samples from device and delete samples buffer


Question: Stop logging to logfile and console .

def Func ( ) : from . import log arg_0 = logging . getLogger ( "gromacs" ) arg_0 . info ( "GromacsWrapper %s STOPPED logging" , get_version ( ) ) log . clear_handlers ( arg_0 )

Parses the version, data license, name, SPDX Identifier, namespace,
        and comment.


Question: An agent that keeps track of what locations are clean or dirty .

def Func ( ) : arg_0 = { loc_A : None , loc_B : None } def program ( ( arg_1 , arg_2 ) ) : arg_0 [ arg_1 ] = arg_2 if arg_0 [ loc_A ] == arg_0 [ loc_B ] == 'Clean' : return 'NoOp' elif arg_2 == 'Dirty' : return 'Suck' elif arg_1 == loc_A : return 'Right' elif arg_1 == loc_B : return 'Left' return Agent ( program )

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: Removes the data center and all its components such as servers NICs load balancers volumes .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _perform_request ( url = '/datacenters/%s' % ( arg_1 ) , method = 'DELETE' ) 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: Add this manager as an annotation to the graph .

def Func ( arg_0 , arg_1 : arg_2 ) -> None : if 'bio2bel' not in arg_1 . annotation_list : arg_1 . annotation_list [ 'bio2bel' ] = set ( ) arg_1 . annotation_list [ 'bio2bel' ] . add ( arg_0 . module_name )

Build transition noise distribution for a ConstrainedSeasonalSSM.


Question: Get the data sharing consent object associated with a certain user of a customer for a program .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = get_enterprise_customer ( arg_2 ) arg_4 = CourseCatalogApiServiceClient ( arg_3 . site ) arg_5 = arg_4 . get_program_course_keys ( arg_1 ) arg_6 = ( get_data_sharing_consent ( arg_0 , arg_2 , course_id = individual_course_id ) for individual_course_id in arg_5 ) return ProxyDataSharingConsent . from_children ( arg_1 , * arg_6 )

Compute the harmonic number from its analytic continuation.

  Derivation from [here](
  https://en.wikipedia.org/wiki/Digamma_function#Relation_to_harmonic_numbers)
  and [Euler's constant](
  https://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant).

  Args:
    x: input float.

  Returns:
    z: The analytic continuation of the harmonic number for the input.


Question: Change of basis of bipartite matrix represenation .

Send a completion status payload to the SuccessFactors OCN Completion Status endpoint

        Args:
            user_id (str): The sap user id that the completion status is being sent for.
            payload (str): JSON encoded object (serialized from SapSuccessFactorsLearnerDataTransmissionAudit)
                containing completion status fields per SuccessFactors documentation.

        Returns:
            The body of the response from SAP SuccessFactors, if successful
        Raises:
            HTTPError: if we received a failure response code from SAP SuccessFactors


Question: solve Tx = Z by a variation of Levinson algorithm where T is a complex hermitian toeplitz matrix

def Func ( arg_0 , arg_1 , arg_2 ) : assert len ( arg_1 ) > 0 arg_3 = len ( arg_1 ) arg_4 = numpy . zeros ( arg_3 + 1 , dtype = complex ) arg_5 = numpy . zeros ( arg_3 , dtype = complex ) arg_6 = arg_0 if arg_6 == 0 : raise ValueError ( "P must be different from zero" ) arg_4 [ 0 ] = arg_2 [ 0 ] / arg_0 for arg_7 in range ( 0 , arg_3 ) : arg_8 = arg_1 [ arg_7 ] arg_9 = arg_4 [ 0 ] * arg_1 [ arg_7 ] if arg_7 == 0 : arg_10 = - arg_8 / arg_6 else : for arg_11 in range ( 0 , arg_7 ) : arg_8 = arg_8 + arg_5 [ arg_11 ] * arg_1 [ arg_7 - arg_11 - 1 ] arg_9 = arg_9 + arg_4 [ arg_11 + 1 ] * arg_1 [ arg_7 - arg_11 - 1 ] arg_10 = - arg_8 / arg_6 arg_6 = arg_6 * ( 1. - ( arg_10 . real ** 2 + arg_10 . imag ** 2 ) ) if arg_6 <= 0 : raise ValueError ( "singular matrix" ) arg_5 [ arg_7 ] = arg_10 arg_12 = ( arg_2 [ arg_7 + 1 ] - arg_9 ) / arg_6 if arg_7 == 0 : arg_4 [ arg_7 + 1 ] = arg_12 for arg_11 in range ( 0 , arg_7 + 1 ) : arg_4 [ arg_11 ] = arg_4 [ arg_11 ] + arg_12 * arg_5 [ arg_7 - arg_11 ] . conjugate ( ) continue arg_13 = ( arg_7 + 1 ) // 2 for arg_11 in range ( 0 , arg_13 ) : arg_14 = arg_7 - arg_11 - 1 arg_8 = arg_5 [ arg_11 ] arg_5 [ arg_11 ] = arg_8 + arg_10 * arg_5 [ arg_14 ] . conjugate ( ) if arg_11 != arg_14 : arg_5 [ arg_14 ] = arg_5 [ arg_14 ] + arg_10 * arg_8 . conjugate ( ) arg_4 [ arg_7 + 1 ] = arg_12 for arg_11 in range ( 0 , arg_7 + 1 ) : arg_4 [ arg_11 ] = arg_4 [ arg_11 ] + arg_12 * arg_5 [ arg_7 - arg_11 ] . conjugate ( ) return arg_4

Register all messages from a checker.

        :param BaseChecker checker:


Question: write_file will open a file filename and write content content and properly close the file

def Func ( arg_0 , arg_1 = "r" , arg_2 = True ) : with open ( arg_0 , arg_1 ) as filey : if arg_2 is True : arg_3 = filey . readlines ( ) else : arg_3 = filey . read ( ) return arg_3

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Returns memory stats for a module .

def Func ( arg_0 ) : arg_1 = { arg_0 . _run_object } try : with open ( arg_0 . _run_object , 'rb' ) as srcfile , _CodeEventsTracker ( arg_1 ) as prof : arg_2 = compile ( srcfile . read ( ) , arg_0 . _run_object , 'exec' ) prof . compute_mem_overhead ( ) exec ( arg_2 , arg_0 . _globs , None ) except SystemExit : pass return prof , None


Question: This endpoint sets the job s stability .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = { "JobID" : arg_1 , "JobVersion" : arg_2 , "Stable" : arg_3 } return arg_0 . request ( arg_1 , "stable" , json = arg_4 , method = "post" ) . json ( )

Delete files in `root_folder` which match `regex` before file ext.

        Example values:
            * root_folder = 'foo/'
            * self.name = 'bar.jpg'
            * regex = re.compile('-baz')

            Result:
                * foo/bar-baz.jpg <- Deleted
                * foo/bar-biz.jpg <- Not deleted


Question: Resets the iterator to the start .

def Func ( arg_0 ) : arg_0 . __iterator , arg_0 . __saved = itertools . tee ( arg_0 . __saved )

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: Given a potentially complex type split it into its base type and specializers

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _canonicalize_type ( arg_1 ) if '(' not in arg_2 : return arg_2 , False , [ ] arg_3 , arg_4 = arg_2 . split ( '(' ) if len ( arg_4 ) == 0 or arg_4 [ - 1 ] != ')' : raise ArgumentError ( "syntax error in complex type, no matching ) found" , passed_type = arg_1 , basetype = arg_3 , subtype_string = arg_4 ) arg_4 = arg_4 [ : - 1 ] arg_5 = arg_4 . split ( ',' ) return arg_3 , True , arg_5

Check if a route needs ssl, and redirect it if not.  Also redirects back to http for non-ssl routes.  Static routes
    are served as both http and https

    :return: A response to be returned or None


Question: Build an xsd schema from a bridgepoint component .

def Func ( arg_0 , arg_1 ) : arg_2 = ET . Element ( 'xs:schema' ) arg_2 . set ( 'xmlns:xs' , 'http://www.w3.org/2001/XMLSchema' ) arg_3 = lambda selected : ooaofooa . is_global ( selected ) for arg_4 in arg_0 . select_many ( 'S_DT' , arg_3 ) : arg_5 = build_type ( arg_4 ) if arg_5 is not None : arg_2 . append ( arg_5 ) arg_6 = lambda selected : ooaofooa . is_contained_in ( selected , arg_1 ) for arg_4 in arg_0 . select_many ( 'S_DT' , arg_6 ) : arg_5 = build_type ( arg_4 ) if arg_5 is not None : arg_2 . append ( arg_5 ) arg_7 = build_component ( arg_0 , arg_1 ) arg_2 . append ( arg_7 ) return arg_2

Get distribution version.

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

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


Question: Return zoom level as integer or throw error .

def Func ( arg_0 , arg_1 ) : try : return int ( arg_0 . strip ( arg_1 ) ) except Exception as e : raise MapcheteConfigError ( "zoom level could not be determined: %s" % e )

update secrets will take a secrets credential file
        either located at .sregistry or the environment variable
        SREGISTRY_CLIENT_SECRETS and update the current client
        secrets as well as the associated API base.


Question: Train our network one batch at a time .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = 'rmsprop' , arg_4 = 'rmsprop' , arg_5 = 0 , arg_6 = None , ** arg_7 ) : if 'rng' not in arg_7 : arg_7 [ 'rng' ] = arg_0 . _rng def create_dataset ( arg_8 , ** arg_7 ) : arg_9 = arg_7 . get ( 'name' , 'dataset' ) arg_10 = '{}_batches' . format ( arg_9 ) return downhill . Dataset ( arg_8 , arg_9 = arg_9 , batch_size = arg_7 . get ( 'batch_size' , 32 ) , iteration_size = arg_7 . get ( 'iteration_size' , arg_7 . get ( arg_10 ) ) , axis = arg_7 . get ( 'axis' , 0 ) , rng = arg_7 [ 'rng' ] ) if arg_2 is None : arg_2 = arg_1 if not isinstance ( arg_2 , downhill . Dataset ) : arg_2 = create_dataset ( arg_2 , arg_9 = 'valid' , ** arg_7 ) if not isinstance ( arg_1 , downhill . Dataset ) : arg_1 = create_dataset ( arg_1 , arg_9 = 'train' , ** arg_7 ) if 'algorithm' in arg_7 : warnings . warn ( 'please use the "algo" keyword arg instead of "algorithm"' , DeprecationWarning ) arg_3 = arg_7 . pop ( 'algorithm' ) if isinstance ( arg_3 , ( list , tuple ) ) : arg_3 = arg_3 [ 0 ] if isinstance ( arg_3 , util . basestring ) : arg_3 = arg_3 . lower ( ) if arg_3 == 'sample' : arg_3 = trainer . SampleTrainer ( arg_0 ) elif arg_3 . startswith ( 'layer' ) or arg_3 . startswith ( 'sup' ) : arg_3 = trainer . SupervisedPretrainer ( arg_4 , arg_0 ) elif arg_3 . startswith ( 'pre' ) or arg_3 . startswith ( 'unsup' ) : arg_3 = trainer . UnsupervisedPretrainer ( arg_4 , arg_0 ) else : arg_3 = trainer . DownhillTrainer ( arg_3 , arg_0 ) def needs_saving ( arg_11 , arg_12 ) : if arg_6 is None : return False if isinstance ( arg_5 , float ) : return arg_11 > 60 * arg_5 if isinstance ( arg_5 , int ) : return arg_12 % arg_5 == 0 return False arg_13 = time . time ( ) for arg_14 , arg_15 in enumerate ( arg_3 . Func ( arg_1 , arg_2 , ** arg_7 ) ) : yield arg_15 arg_16 = time . time ( ) if arg_14 and needs_saving ( arg_16 - arg_13 , arg_14 ) : arg_17 = arg_6 if isinstance ( arg_17 , util . basestring ) : arg_17 = arg_6 . format ( int ( arg_16 ) ) arg_0 . save ( arg_17 ) arg_13 = arg_16

Return a list of not null values from the `col_name` column of `df`.


Question: Linear Prediction Coefficients via Burg s method

def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_1 , int ) or arg_1 < 1 : raise ParameterError ( "order must be an integer > 0" ) util . valid_audio ( arg_0 , mono = True ) return __Func ( arg_0 , arg_1 )

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


Question: This method obtains the actual features .

def Func ( arg_0 , arg_1 = [ "pcp" , "tonnetz" , "mfcc" , "cqt" , "tempogram" ] ) : if arg_0 . feature_str not in arg_1 : raise RuntimeError ( "Feature %s in not valid for algorithm: %s " "(valid features are %s)." % ( arg_0 . feature_str , __name__ , arg_1 ) ) else : try : arg_2 = arg_0 . features . features except KeyError : raise RuntimeError ( "Feature %s in not supported by MSAF" % ( arg_0 . feature_str ) ) 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: Password step of set commands

def Func ( arg_0 , arg_1 ) : arg_2 = False try : arg_3 = "0150310228" + binascii . hexlify ( arg_1 ) + "2903" arg_4 = arg_0 . calc_crc16 ( arg_3 [ 2 : ] . decode ( "hex" ) ) arg_5 = arg_3 + arg_4 arg_0 . m_serial_port . write ( arg_5 . decode ( "hex" ) ) if arg_0 . m_serial_port . getResponse ( arg_0 . getContext ( ) ) . encode ( "hex" ) == "06" : ekm_log ( "Password accepted (" + arg_0 . getContext ( ) + ")" ) arg_2 = True else : ekm_log ( "Password call failure no 06(" + arg_0 . getContext ( ) + ")" ) except : ekm_log ( "Password call failure by exception(" + arg_0 . getContext ( ) + ")" ) ekm_log ( traceback . format_exc ( sys . exc_info ( ) ) ) return arg_2

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


Question: Write a notebook to a file in a given format in the current nbformat version .

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

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


Question: r \ )

def Func ( arg_0 , arg_1 ) : arg_1 . endlexpos = arg_1 . lexpos + len ( arg_1 . value ) return arg_1

Set a property value or remove a property.

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

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

        This default implementation

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

        Removing a non-existing prop is NOT an error.

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

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


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

def Func ( arg_0 , arg_1 ) : info ( "relaying message: {message}" ) if not arg_1 . was_sent_by ( arg_0 . _id_factory ) : arg_0 . pipe . send ( arg_1 ) arg_0 . pipe . deliver ( )

Creates a service from a constructor and checks which kwargs are not used


Question: Return dict of traffic meter stats .

def Func ( arg_0 ) : _LOGGER . info ( "Get traffic meter" ) def parse_text ( arg_1 ) : def tofloats ( arg_2 ) : return ( float ( arg_3 ) for arg_3 in arg_2 ) try : if "/" in arg_1 : return tuple ( tofloats ( arg_1 . split ( '/' ) ) ) elif ":" in arg_1 : arg_4 , arg_5 = tofloats ( arg_1 . split ( ':' ) ) return timedelta ( hours = arg_4 , minutes = arg_5 ) else : return float ( arg_1 ) except ValueError : return None arg_6 , arg_7 = arg_0 . _make_request ( SERVICE_DEVICE_CONFIG , "GetTrafficMeterStatistics" ) if not arg_6 : return None arg_6 , arg_8 = _find_node ( arg_7 . text , ".//GetTrafficMeterStatisticsResponse" ) if not arg_6 : return None return { arg_3 . tag : parse_text ( arg_3 . text ) for arg_3 in arg_8 }

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

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


Question: Applies the settings to the index .

def Func ( arg_0 ) : if not arg_0 . settings : return try : arg_0 . __index . Func ( arg_0 . settings ) logger . info ( 'APPLY SETTINGS ON %s' , arg_0 . index_name ) except AlgoliaException as e : if DEBUG : raise e else : logger . warning ( 'SETTINGS NOT APPLIED ON %s: %s' , arg_0 . model , e )

Parse the conservation predictors

        Args:
            variant(dict): A variant dictionary

        Returns:
            conservations(dict): A dictionary with the conservations


Question: r Akaike Information Criterion

def Func ( arg_0 , arg_1 , arg_2 ) : from numpy import log , array arg_3 = arg_0 * log ( array ( arg_1 ) ) + 2. * ( array ( arg_2 ) + 1 ) return arg_3

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


Question: Replaces all occurrences of old with new

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . seq = arg_0 . seq . replace ( arg_1 , arg_2 )

Re-enable the FTDI drivers for the current platform.


Question: Walk a directory tree with configurable depth .

def Func ( arg_0 , arg_1 = arg_2 ( 'inf' ) ) : arg_3 = os . path . abspath ( arg_0 ) . count ( os . path . sep ) for arg_4 in os . walk ( arg_0 ) : arg_5 , arg_6 , arg_7 = arg_4 arg_8 = arg_5 . count ( os . path . sep ) - arg_3 yield arg_4 if arg_8 >= arg_1 : arg_6 [ : ] = [ ]

Regenerates the primary or secondary access key for the specified
        storage account.

        service_name:
            Name of the storage service account.
        key_type:
            Specifies which key to regenerate. Valid values are:
            Primary, Secondary


Question: deleteOne - Delete one object

def Func ( arg_0 , arg_1 , arg_2 = None ) : if not getattr ( arg_1 , '_id' , None ) : return 0 if arg_2 is None : arg_2 = arg_0 . _get_connection ( ) arg_3 = arg_2 . pipeline ( ) arg_4 = True else : arg_3 = arg_2 arg_4 = False arg_3 . delete ( arg_0 . _get_key_for_id ( arg_1 . _id ) ) arg_0 . _rem_id_from_keys ( arg_1 . _id , arg_3 ) for arg_5 in arg_0 . indexedFields : arg_0 . _rem_id_from_index ( arg_5 , arg_1 . _id , arg_1 . _origData [ arg_5 ] , arg_3 ) arg_1 . _id = None if arg_4 is True : arg_3 . execute ( ) return 1


Question: Assert that the argument has the specified type .

def Func ( arg_0 , * arg_1 , ** arg_2 ) : assert arg_1 , "The list of expected types was not provided" arg_3 = arg_1 [ 0 ] if len ( arg_1 ) == 1 else U ( * arg_1 ) if _check_type ( arg_0 , arg_3 ) : return assert set ( arg_2 ) . issubset ( { "message" , "skip_frames" } ) , "Unexpected keyword arguments: %r" % arg_2 arg_4 = arg_2 . get ( "message" , None ) arg_5 = arg_2 . get ( "skip_frames" , 1 ) arg_6 = _retrieve_assert_arguments ( ) arg_7 = arg_6 [ 0 ] arg_8 = _get_type_name ( arg_3 , dump = ", " . join ( arg_6 [ 1 : ] ) ) arg_9 = _get_type_name ( type ( arg_0 ) ) raise H2OTypeError ( var_name = arg_7 , var_value = arg_0 , var_type_name = arg_9 , exp_type_name = arg_8 , arg_4 = arg_4 , arg_5 = 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: Checks if any of expected matches received .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if not any ( map ( arg_2 . matches , arg_1 ) ) : raise errors . StatusCodeError ( arg_1 , arg_2 , arg_3 )


Question: Permanently erase one or more VM instances from existence .

def Func ( arg_0 = None , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = 1 , arg_5 = 1 ) : arg_5 = int ( arg_5 ) if env . vm_type == EC2 : arg_6 = get_ec2_connection ( ) arg_7 = list_instances ( arg_0 = arg_0 , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , ) for arg_8 , arg_9 in arg_7 . items ( ) : arg_10 = arg_9 [ 'public_dns_name' ] print ( '\nDeleting %s (%s)...' % ( arg_8 , arg_9 [ 'id' ] ) ) if not get_dryrun ( ) : arg_6 . terminate_instances ( instance_ids = [ arg_9 [ 'id' ] ] ) arg_11 = os . path . expanduser ( '~/.ssh/known_hosts' ) arg_12 = 'ssh-keygen -f "%s" -R %s' % ( arg_11 , arg_10 ) local_or_dryrun ( arg_12 ) else : raise NotImplementedError

Checks if a Pong message was received.

        :return:


Question: Given a mnemonic word string return a string of the computed checksum .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . split ( " " ) if len ( arg_2 ) < 12 : raise ValueError ( "Invalid mnemonic phrase" ) if len ( arg_2 ) > 13 : arg_1 = arg_2 [ : 24 ] else : arg_1 = arg_2 [ : 12 ] arg_3 = "" . join ( word [ : arg_0 . unique_prefix_length ] for word in arg_1 ) arg_3 = bytearray ( arg_3 . encode ( 'utf-8' ) ) arg_4 = ( ( crc32 ( arg_3 ) & 0xffffffff ) ^ 0xffffffff ) >> 0 arg_5 = ( ( arg_4 ^ 0xffffffff ) >> 0 ) % len ( arg_1 ) return arg_2 [ arg_5 ]


Question: Creates a solver from a specification dict .

def Func ( arg_0 , arg_1 = None ) : return util . get_object ( obj = arg_0 , predefined = tensorforce . core . optimizers . solvers . solvers , arg_1 = arg_1 )

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: Setting up and running GIES with all arguments .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = True ) : arg_4 = str ( uuid . uuid4 ( ) ) os . makedirs ( '/tmp/cdt_gies' + arg_4 + '/' ) arg_0 . arguments [ '{FOLDER}' ] = '/tmp/cdt_gies' + arg_4 + '/' def retrieve_result ( ) : return read_csv ( '/tmp/cdt_gies' + arg_4 + '/result.csv' , delimiter = ',' ) . values try : arg_1 . to_csv ( '/tmp/cdt_gies' + arg_4 + '/data.csv' , header = False , index = False ) if arg_2 is not None : arg_2 . to_csv ( '/tmp/cdt_gies' + arg_4 + '/fixedgaps.csv' , index = False , header = False ) arg_0 . arguments [ '{SKELETON}' ] = 'TRUE' else : arg_0 . arguments [ '{SKELETON}' ] = 'FALSE' arg_6 = launch_R_script ( "{}/R_templates/gies.R" . format ( os . path . dirname ( os . path . realpath ( __file__ ) ) ) , arg_0 . arguments , output_function = retrieve_result , arg_3 = arg_3 ) except Exception as e : rmtree ( '/tmp/cdt_gies' + arg_4 + '' ) raise e except KeyboardInterrupt : rmtree ( '/tmp/cdt_gies' + arg_4 + '/' ) raise KeyboardInterrupt rmtree ( '/tmp/cdt_gies' + arg_4 + '' ) return arg_6

Given an email address, check the email_remapping table to see if the email
        should be sent to a different address. This function also handles overriding
        the email domain if ignore_vcs_email_domain is set or the domain was missing


Question: Computes graph and static sample_shape .

def Func ( arg_0 , arg_1 ) : arg_2 = ( tf . rank ( arg_1 ) if tensorshape_util . rank ( arg_1 . shape ) is None else tensorshape_util . rank ( arg_1 . shape ) ) arg_3 = ( tf . size ( input = arg_0 . event_shape_tensor ( ) ) if tensorshape_util . rank ( arg_0 . event_shape ) is None else tensorshape_util . rank ( arg_0 . event_shape ) ) arg_4 = ( tf . size ( input = arg_0 . _batch_shape_unexpanded ) if tensorshape_util . rank ( arg_0 . batch_shape ) is None else tensorshape_util . rank ( arg_0 . batch_shape ) ) arg_5 = arg_2 - arg_4 - arg_3 if isinstance ( arg_5 , int ) : arg_6 = arg_1 . shape [ : arg_5 ] else : arg_6 = tf . TensorShape ( None ) if tensorshape_util . is_fully_defined ( arg_6 ) : arg_7 = np . int32 ( arg_6 ) else : arg_7 = tf . shape ( input = arg_1 ) [ : arg_5 ] return arg_7 , arg_6

Return HgResource object for path.

        See DAVProvider.get_resource_inst()


Question: Convert any non - DAVError exception to HTTP_INTERNAL_ERROR .

def Func ( arg_0 ) : if isinstance ( arg_0 , DAVError ) : return arg_0 elif isinstance ( arg_0 , Exception ) : return DAVError ( HTTP_INTERNAL_ERROR , src_exception = arg_0 ) else : return DAVError ( HTTP_INTERNAL_ERROR , "{}" . format ( arg_0 ) )

Configure the Python logging module for this file.


Question: Grab contents of doc and return it

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . get_start_iter ( ) arg_3 = arg_1 . get_end_iter ( ) arg_4 = arg_1 . get_text ( arg_2 , arg_3 , False ) return arg_4

Handle Error messages and log them accordingly.

        :param data:
        :param ts:


Question: docstring for build_clnsig

def Func ( arg_0 ) : arg_1 = dict ( value = arg_0 [ 'value' ] , accession = arg_0 . get ( 'accession' ) , revstat = arg_0 . get ( 'revstat' ) ) return arg_1

Default exchange proposal function, for replica exchange MC.

  With probability `prob_exchange` propose combinations of replica for exchange.
  When exchanging, create combinations of adjacent replicas in
  [Replica Exchange Monte Carlo](
  https://en.wikipedia.org/wiki/Parallel_tempering)

  ```
  exchange_fn = default_exchange_proposed_fn(prob_exchange=0.5)
  exchange_proposed = exchange_fn(num_replica=3)

  exchange_proposed.eval()
  ==> [[0, 1]]  # 1 exchange, 0 <--> 1

  exchange_proposed.eval()
  ==> []  # 0 exchanges
  ```

  Args:
    prob_exchange: Scalar `Tensor` giving probability that any exchanges will
      be generated.

  Returns:
    default_exchange_proposed_fn_: Python callable which take a number of
      replicas (a Python integer), and return combinations of replicas for
      exchange as an [n, 2] integer `Tensor`, `0 <= n <= num_replica // 2`,
      with *unique* values in the set `{0, ..., num_replica}`.


Question: Journey route decorator

def Func ( arg_0 , * arg_1 , ** arg_2 ) : arg_2 [ 'strict_slashes' ] = arg_2 . pop ( 'strict_slashes' , False ) arg_3 = _validate_schema ( arg_2 . pop ( '_body' , None ) ) arg_4 = _validate_schema ( arg_2 . pop ( '_query' , None ) ) arg_5 = _validate_schema ( arg_2 . pop ( 'marshal_with' , None ) ) arg_6 = arg_2 . pop ( 'validate' , True ) def decorator ( arg_7 ) : @ arg_0 . Func ( * arg_1 , ** arg_2 ) @ wraps ( arg_7 ) def wrapper ( * arg_8 , ** arg_9 ) : try : if arg_4 is not None : arg_4 . strict = arg_6 arg_11 = furl ( request . url ) arg_9 [ '_query' ] = arg_4 . load ( arg_13 = arg_11 . args ) if arg_3 is not None : arg_3 . strict = arg_6 arg_12 = request . get_json ( ) if arg_12 is None : arg_12 = { } arg_9 [ '_body' ] = arg_3 . load ( arg_13 = arg_12 ) except ValidationError as err : return jsonify ( err . messages ) , 422 if arg_5 : arg_13 = arg_5 . dump ( arg_7 ( * arg_8 , ** arg_9 ) ) return jsonify ( arg_13 [ 0 ] ) return arg_7 ( * arg_8 , ** arg_9 ) return arg_7 return decorator

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

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


Question: Check for escape character and return either a handler to handle it or None if there is no escape char .

def Func ( arg_0 , arg_1 ) : if arg_1 . line [ - 1 ] == ESC_HELP and arg_1 . esc != ESC_SHELL and arg_1 . esc != ESC_SH_CAP : return arg_0 . prefilter_manager . get_handler_by_name ( 'help' ) else : if arg_1 . pre : return None return arg_0 . prefilter_manager . get_handler_by_esc ( arg_1 . esc )

Write the index.html file for this report.


Question: Updates the binary annotations for the current span .

def Func ( arg_0 , arg_1 ) : if not arg_0 . logging_context : arg_0 . binary_annotations . update ( arg_1 ) else : arg_0 . logging_context . tags . update ( arg_1 )


Question: Find the location of a dataset on disk downloading if needed .

def Func ( arg_0 , arg_1 ) : arg_2 = os . path . join ( DATASETS , arg_0 ) arg_3 = os . path . dirname ( arg_2 ) if not os . path . exists ( arg_3 ) : print ( 'creating dataset directory: %s' , arg_3 ) os . makedirs ( arg_3 ) if not os . path . exists ( arg_2 ) : if sys . version_info < ( 3 , ) : urllib . urlretrieve ( arg_1 , arg_2 ) else : urllib . request . urlretrieve ( arg_1 , arg_2 ) return arg_2

Reassemble a Binder object coming out of the database.


Question: Create coverage reports and open them in the browser .

def Func ( ) : arg_0 = "Usage: %prog PATH_TO_PACKAGE" arg_1 = optparse . OptionParser ( arg_0 = arg_0 ) arg_1 . add_option ( "-v" , "--verbose" , action = "store_true" , dest = "verbose" , default = False , help = "Show debug output" ) arg_1 . add_option ( "-d" , "--output-dir" , action = "store" , type = "string" , dest = "output_dir" , default = '' , help = "" ) arg_1 . add_option ( "-t" , "--test-args" , action = "store" , type = "string" , dest = "test_args" , default = '' , help = ( "Pass argument on to bin/test. Quote the argument, " + "for instance \"-t '-m somemodule'\"." ) ) ( arg_2 , arg_3 ) = arg_1 . parse_args ( ) if arg_2 . verbose : arg_4 = logging . DEBUG else : arg_4 = logging . INFO logging . basicConfig ( level = arg_4 , format = "%(levelname)s: %(message)s" ) arg_5 = os . getcwd ( ) arg_6 = os . path . join ( arg_5 , 'bin' , 'test' ) if not os . path . exists ( arg_6 ) : raise RuntimeError ( "Test command doesn't exist: %s" % arg_6 ) arg_7 = os . path . join ( arg_5 , 'bin' , 'coverage' ) if not os . path . exists ( arg_7 ) : logger . debug ( "Trying globally installed coverage command." ) arg_7 = 'coverage' logger . info ( "Running tests in coverage mode (can take a long time)" ) arg_8 = [ arg_7 , 'run' , arg_6 ] if arg_2 . test_args : arg_8 . append ( arg_2 . test_args ) system ( " " . join ( arg_8 ) ) logger . debug ( "Creating coverage reports..." ) if arg_2 . output_dir : arg_9 = arg_2 . output_dir arg_10 = False else : arg_9 = 'htmlcov' arg_10 = True system ( "%s html --directory=%s" % ( arg_7 , arg_9 ) ) logger . info ( "Wrote coverage files to %s" , arg_9 ) if arg_10 : arg_11 = os . path . abspath ( os . path . join ( arg_9 , 'index.html' ) ) logger . debug ( "About to open %s in your webbrowser." , arg_11 ) webbrowser . open ( 'file://' + arg_11 ) logger . info ( "Opened reports in your browser." )


Question: Create a NamedTemporaryFile instance to be passed to atomic_writer

def Func ( arg_0 ) : return tempfile . NamedTemporaryFile ( mode = 'w' , dir = os . path . dirname ( arg_0 ) , prefix = os . path . basename ( arg_0 ) , suffix = os . fsencode ( '.tmp' ) , delete = False )


Question: Create the role_based_access_control switch if it does not already exist .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_model ( 'waffle' , 'Switch' ) arg_2 . objects . update_or_create ( name = ENTERPRISE_ROLE_BASED_ACCESS_CONTROL_SWITCH , defaults = { 'active' : False } )

Call the segmenter in order to split text in sentences.

        Args:
            text (str): Text to be segmented.

        Returns:
            dict, int: A dict containing a list of dicts with the offsets of
                each sentence; an integer representing the response code.


Question: Called when transport has been connected .

def Func ( arg_0 ) : with arg_0 . lock : if arg_0 . initiator : if arg_0 . _output_state is None : arg_0 . _initiate ( )

Generate a path value of type result_type.

    result_type can either be bytes or text_type


Question: Returns the Session currently used .

def Func ( arg_0 ) : arg_1 = _lib . SSL_get1_session ( arg_0 . _ssl ) if arg_1 == _ffi . NULL : return None arg_2 = Session . __new__ ( Session ) arg_2 . _session = _ffi . gc ( arg_1 , _lib . SSL_SESSION_free ) return arg_2

Wrapper method that calls the appropriate main updating methods of
        the inspection.

        It is meant to be used inside a loop (like while), so that it can
        continuously update the class attributes from the trace and log files.
        It already implements checks to parse these files only when they
        change, and they ignore entries that have been previously processes.


Question: Render the sourcecode .

def Func ( arg_0 ) : return SOURCE_TABLE_HTML % u'\n' . join ( arg_1 . render ( ) for arg_1 in arg_0 . get_annotated_lines ( ) )

Convenience function to efficiently construct a MultivariateNormalDiag.


Question: Returns molecular weight of molecule .

def Func ( arg_0 ) : arg_1 = elements ( ) arg_2 = re . compile ( '\(([A-z0-9]+)\)([0-9]+)?' ) arg_3 = re . compile ( '([A-Z][a-z]?)([0-9]+)?' ) arg_4 = arg_2 . findall ( arg_0 ) arg_5 = arg_2 . sub ( '' , arg_0 ) arg_6 = 0 if len ( arg_4 ) > 0 : for arg_7 , arg_8 in arg_4 : arg_9 = 0 for arg_10 , arg_11 in arg_3 . findall ( arg_7 ) : arg_12 = ( arg_1 . loc [ arg_10 , 'atomic_weight' ] * arg_1 . loc [ arg_10 , 'percent' ] / 100 ) . sum ( ) if arg_11 == '' : arg_11 = 1 else : arg_11 = int ( arg_11 ) arg_9 += arg_12 * arg_11 if arg_8 == '' : arg_8 = 1 else : arg_8 = int ( arg_8 ) arg_6 += arg_9 * arg_8 for arg_10 , arg_11 in arg_3 . findall ( arg_5 ) : arg_12 = ( arg_1 . loc [ arg_10 , 'atomic_weight' ] * arg_1 . loc [ arg_10 , 'percent' ] / 100 ) . sum ( ) if arg_11 == '' : arg_11 = 1 else : arg_11 = int ( arg_11 ) arg_6 += arg_12 * arg_11 return arg_6

Returns a DataFrame of offensive team splits for a season.

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


Question: Return a description of the given bit in the encoded output . This will include the field name and the offset within the field .

def Func ( arg_0 , arg_1 , arg_2 = False ) : ( arg_3 , arg_4 ) = ( None , None ) arg_5 = arg_0 . getDescription ( ) for arg_6 in xrange ( len ( arg_5 ) ) : ( arg_7 , arg_8 ) = arg_5 [ arg_6 ] if arg_2 : arg_8 = arg_8 + arg_6 if arg_1 == arg_8 - 1 : arg_3 = "separator" arg_4 = arg_1 break if arg_1 < arg_8 : break ( arg_3 , arg_4 ) = ( arg_7 , arg_8 ) arg_9 = arg_0 . getDisplayWidth ( ) if arg_2 else arg_0 . getWidth ( ) if arg_4 is None or arg_1 > arg_0 . getWidth ( ) : raise IndexError ( "Bit is outside of allowable range: [0 - %d]" % arg_9 ) return ( arg_3 , arg_1 - arg_4 )

Cycles through notifications with latest results from data feeds.


Question: Get Spotify catalog information about artists similar to a given artist .

async def Func ( arg_0 ) -> List [ Artist ] : arg_1 = await arg_0 . __client . http . artist_Func ( arg_0 . id ) return list ( Artist ( arg_0 . __client , arg_2 ) for arg_2 in arg_1 [ 'artists' ] )

Pickle the Dataset instance to the provided file.


Question: Get crate versions data

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . client . crate_attribute ( arg_1 , "versions" ) arg_3 = json . loads ( arg_2 ) return arg_3

bind user variable to `_wrapped`

        .. note::

            you don't need call this method by yourself.

            program will call it in  `cliez.parser.parse`

        .. expection::

            if path is not correct,will cause an `ImportError`

        :param str mod_path: module path, *use dot style,'mod.mod1'*
        :param str with_path: add path to `sys.path`,
            if path is file,use its parent.
        :return: A instance of `Settings`


Question: Fits a new component to an old component

def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_0 . category arg_0 . category = 'ilm' arg_5 = states . ImageState ( Image ( arg_1 . get ( ) . copy ( ) ) , [ arg_0 ] , pad = 0 , mdl = mdl . SmoothFieldModel ( ) ) do_levmarq ( arg_5 , arg_0 . params , ** arg_2 ) arg_0 . category = arg_3

Check if templates directories are setup and issue a warning and help.

    Set the environment variable  :envvar:`GROMACSWRAPPER_SUPPRESS_SETUP_CHECK`
    skip the check and make it always return ``True``

    :return ``True`` if directories were found and ``False`` otherwise

     .. versionchanged:: 0.3.1
        Uses :envvar:`GROMACSWRAPPER_SUPPRESS_SETUP_CHECK` to suppress check
        (useful for scripts run on a server)


Question: Return single program by name or None if not found .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _load_data ( arg_0 . PROGRAMS_ENDPOINT , default = [ ] ) arg_3 = [ program for program in arg_2 if program . get ( 'title' ) == arg_1 ] if len ( arg_3 ) > 1 : raise MultipleProgramMatchError ( len ( arg_3 ) ) elif len ( arg_3 ) == 1 : return arg_3 [ 0 ] else : return None

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.