Question: Making sure the selection if time and frequency are within the file limits .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = False ) : if arg_5 is True : if arg_3 is None : arg_3 = arg_0 . t_begin if arg_4 is None : arg_4 = arg_0 . t_end if arg_1 is None : arg_1 = arg_0 . f_begin if arg_2 is None : arg_2 = arg_0 . f_end else : if arg_1 is None : arg_1 = arg_0 . f_start if arg_2 is None : arg_2 = arg_0 . f_stop if arg_3 is None : arg_3 = arg_0 . t_start if arg_4 is None : arg_4 = arg_0 . t_stop if arg_4 >= 0 and arg_3 >= 0 and arg_4 < arg_3 : arg_4 , arg_3 = arg_3 , arg_4 logger . warning ( 'Given t_stop < t_start, assuming reversed values.' ) if arg_2 and arg_1 and arg_2 < arg_1 : arg_2 , arg_1 = arg_1 , arg_2 logger . warning ( 'Given f_stop < f_start, assuming reversed values.' ) if arg_3 >= arg_0 . t_begin and arg_3 < arg_0 . t_end : arg_0 . t_start = int ( arg_3 ) else : if arg_5 is False or arg_3 != None : logger . warning ( 'Setting t_start = %f, since t_start not given or not valid.' % arg_0 . t_begin ) arg_0 . t_start = arg_0 . t_begin if arg_4 <= arg_0 . t_end and arg_4 > arg_0 . t_begin : arg_0 . t_stop = int ( arg_4 ) else : if arg_5 is False or arg_4 : logger . warning ( 'Setting t_stop = %f, since t_stop not given or not valid.' % arg_0 . t_end ) arg_0 . t_stop = arg_0 . t_end if arg_1 >= arg_0 . f_begin and arg_1 < arg_0 . f_end : arg_0 . f_start = arg_1 else : if arg_5 is False or arg_1 : logger . warning ( 'Setting f_start = %f, since f_start not given or not valid.' % arg_0 . f_begin ) arg_0 . f_start = arg_0 . f_begin if arg_2 <= arg_0 . f_end and arg_2 > arg_0 . f_begin : arg_0 . f_stop = arg_2 else : if arg_5 is False or arg_2 : logger . warning ( 'Setting f_stop = %f, since f_stop not given or not valid.' % arg_0 . f_end ) arg_0 . f_stop = arg_0 . f_end arg_0 . selection_shape = arg_0 . _calc_selection_shape ( )

Remove `self` from the containing `DiscoItems` object.


Question: Append new content for a cell magic in line mode .

def Func ( arg_0 , arg_1 ) : arg_0 . _store ( arg_1 , arg_0 . _buffer_raw , 'source_raw' ) arg_0 . cell_magic_parts . append ( arg_1 ) arg_2 = arg_0 . cell_magic_parts [ - 1 ] arg_0 . _is_complete = last_blank ( arg_2 ) and arg_1 . isspace ( ) return arg_0 . _is_complete

Get a texture by its label

        Args:
            label (str): The Label for the texture

        Returns:
            The py:class:`moderngl.Texture` instance


Question: given text make it a temporary HTML file and launch it .

def Func ( arg_0 ) : arg_1 = tempfile . gettempdir ( ) + "/swhlab/temp.html" with open ( arg_1 , 'w' ) as f : f . write ( arg_0 ) webbrowser . open ( arg_1 )

Update boost factors when local inhibition is used


Question: Try to merge processes as much is possible

def Func ( arg_0 ) : arg_0 . sort ( key = lambda x : ( x . name , maxStmId ( x ) ) , reverse = True ) for arg_1 , arg_2 in groupedby ( arg_0 , lambda arg_7 : arg_7 . rank ) : for arg_3 , arg_4 in enumerate ( arg_2 ) : if arg_4 is None : continue for arg_5 , arg_6 in enumerate ( islice ( arg_2 , arg_3 + 1 , None ) ) : if arg_6 is None : continue try : arg_4 = tryToMerge ( arg_4 , arg_6 ) except IncompatibleStructure : continue arg_2 [ arg_3 + 1 + arg_5 ] = None for arg_7 in arg_2 : if arg_7 is not None : yield arg_7

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


Question: r Call given command with subprocess . call function .

def Func ( arg_0 , arg_1 = False , arg_2 = False , ** arg_3 ) : arg_4 , arg_5 = None , None if arg_1 : arg_6 = arg_0 if isinstance ( arg_0 , string_types ) else ' ' . join ( arg_0 ) arg_3 [ 'stdout' ] , arg_3 [ 'stderr' ] = sys . stdout , sys . stderr print_message ( '$ {0}' . format ( arg_6 ) ) else : arg_4 , arg_5 = get_temp_streams ( ) arg_3 [ 'stdout' ] , arg_3 [ 'stderr' ] = arg_4 , arg_5 try : arg_7 = subprocess . call ( arg_0 , ** arg_3 ) except subprocess . CalledProcessError as arg_5 : if arg_2 : return False print_error ( str ( arg_5 ) if IS_PY3 else unicode ( arg_5 ) ) finally : if arg_4 : arg_4 . close ( ) if arg_5 : arg_5 . close ( ) if arg_7 and arg_1 and not arg_2 : print_error ( 'Command {0!r} returned non-zero exit status {1}' . format ( arg_6 , arg_7 ) ) return arg_7

Unregister an extension code.  For testing only.


Question: Translate the date string to its English equivalent .

def Func ( arg_0 , arg_1 , arg_2 = False , arg_3 = None ) : arg_1 = arg_0 . _Func_numerals ( arg_1 ) if arg_3 . NORMALIZE : arg_1 = normalize_unicode ( arg_1 ) arg_1 = arg_0 . _simplify ( arg_1 , arg_3 = arg_3 ) arg_4 = arg_0 . _get_dictionary ( arg_3 ) arg_5 = arg_4 . split ( arg_1 , arg_2 ) arg_6 = arg_0 . _get_relative_translations ( arg_3 = arg_3 ) for arg_7 , arg_8 in enumerate ( arg_5 ) : arg_8 = arg_8 . lower ( ) for arg_9 , arg_10 in arg_6 . items ( ) : if arg_9 . match ( arg_8 ) : arg_5 [ arg_7 ] = arg_9 . sub ( arg_10 , arg_8 ) else : if arg_8 in arg_4 : arg_5 [ arg_7 ] = arg_4 [ arg_8 ] or '' if "in" in arg_5 : arg_5 = arg_0 . _clear_future_words ( arg_5 ) return arg_0 . _join ( list ( filter ( bool , arg_5 ) ) , separator = "" if arg_2 else " " , arg_3 = arg_3 )

Create a tar file based on the list of files passed


Question: This method is used mainly internally but it can be handy if you work with with raw MARC XML object and not using getters .

def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_1 not in ( 1 , 2 ) : raise ValueError ( "`num` parameter have to be 1 or 2!" ) if arg_2 is None : arg_2 = arg_0 . oai_marc arg_3 = "ind" if not arg_2 else "i" return arg_3 + str ( arg_1 )


Question: Fig . 3 . 10

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_1 . result ( arg_0 . state , arg_2 ) return Node ( arg_3 , arg_0 , arg_2 , arg_1 . path_cost ( arg_0 . path_cost , arg_0 . state , arg_2 , arg_3 ) )

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Compute the probability that the current value plus anomaly score represents an anomaly given the historical distribution of anomaly scores . The closer the number is to 1 the higher the chance it is an anomaly .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : if arg_3 is None : arg_3 = arg_0 . _iteration arg_4 = ( arg_3 , arg_1 , arg_2 ) if arg_0 . _iteration < arg_0 . _probationaryPeriod : arg_5 = 0.5 else : if ( ( arg_0 . _distribution is None ) or ( arg_0 . _iteration % arg_0 . _reestimationPeriod == 0 ) ) : arg_6 = arg_0 . _calcSkipRecords ( numIngested = arg_0 . _iteration , windowSize = arg_0 . _historicalScores . maxlen , learningPeriod = arg_0 . _learningPeriod ) arg_7 , arg_7 , arg_0 . _distribution = estimateAnomalyLikelihoods ( arg_0 . _historicalScores , skipRecords = arg_6 ) arg_9 , arg_7 , arg_0 . _distribution = updateAnomalyLikelihoods ( [ arg_4 ] , arg_0 . _distribution ) arg_5 = 1.0 - arg_9 [ 0 ] arg_0 . _historicalScores . append ( arg_4 ) arg_0 . _iteration += 1 return arg_5


Question: Reads a key with S3 Select .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = 'SELECT * FROM S3Object' , arg_4 = 'SQL' , arg_5 = None , arg_6 = None ) : if arg_5 is None : arg_5 = { 'CSV' : { } } if arg_6 is None : arg_6 = { 'CSV' : { } } if not arg_2 : ( arg_2 , arg_1 ) = arg_0 . parse_s3_url ( arg_1 ) arg_7 = arg_0 . get_conn ( ) . select_object_content ( Bucket = arg_2 , Key = arg_1 , Expression = arg_3 , ExpressionType = arg_4 , InputSerialization = arg_5 , OutputSerialization = arg_6 ) return '' . join ( arg_8 [ 'Records' ] [ 'Payload' ] . decode ( 'utf-8' ) for arg_8 in arg_7 [ 'Payload' ] if 'Records' in arg_8 )

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


Question: Look through the models table for an orphaned model which is a model that is not completed yet whose _eng_last_update_time is more than maxUpdateInterval seconds ago .

def Func ( arg_0 , arg_1 , arg_2 ) : @ g_retrySQL def findCandidateModelWithRetries ( ) : arg_3 = None with ConnectionFactory . get ( ) as conn : arg_4 = 'SELECT model_id FROM %s ' '   WHERE  status=%%s ' '          AND job_id=%%s ' '          AND TIMESTAMPDIFF(SECOND, ' '                            _eng_last_update_time, ' '                            UTC_TIMESTAMP()) > %%s ' '   LIMIT 1 ' % ( arg_0 . modelsTableName , ) arg_5 = [ arg_0 . STATUS_RUNNING , arg_1 , arg_2 ] arg_6 = conn . cursor . execute ( arg_4 , arg_5 ) arg_7 = conn . cursor . fetchall ( ) assert arg_6 <= 1 , "Unexpected numRows: %r" % arg_6 if arg_6 == 1 : ( arg_3 , ) = arg_7 [ 0 ] return arg_3 @ g_retrySQL def adoptModelWithRetries ( arg_3 ) : arg_8 = False with ConnectionFactory . get ( ) as conn : arg_4 = 'UPDATE %s SET _eng_worker_conn_id=%%s, ' '            _eng_last_update_time=UTC_TIMESTAMP() ' '        WHERE model_id=%%s ' '              AND status=%%s' '              AND TIMESTAMPDIFF(SECOND, ' '                                _eng_last_update_time, ' '                                UTC_TIMESTAMP()) > %%s ' '        LIMIT 1 ' % ( arg_0 . modelsTableName , ) arg_5 = [ arg_0 . _connectionID , arg_3 , arg_0 . STATUS_RUNNING , arg_2 ] arg_9 = conn . cursor . execute ( arg_4 , arg_5 ) assert arg_9 <= 1 , 'Unexpected numRowsAffected=%r' % ( arg_9 , ) if arg_9 == 1 : arg_8 = True else : ( arg_10 , arg_11 ) = arg_0 . _getOneMatchingRowNoRetries ( arg_0 . _models , conn , { 'model_id' : arg_3 } , [ 'status' , '_eng_worker_conn_id' ] ) arg_8 = ( arg_10 == arg_0 . STATUS_RUNNING and arg_11 == arg_0 . _connectionID ) return arg_8 arg_12 = None while True : arg_3 = findCandidateModelWithRetries ( ) if arg_3 is None : break if adoptModelWithRetries ( arg_3 ) : arg_12 = arg_3 break return arg_12

Returns a list of the dicom files within root_path

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

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


Question: Create a pyxtuml association from a R_REL in ooaofooa .

def Func ( arg_0 , arg_1 ) : arg_2 = { 'R_SIMP' : mk_simple_association , 'R_ASSOC' : mk_linked_association , 'R_SUBSUP' : mk_subsuper_association , 'R_COMP' : mk_derived_association , } arg_3 = subtype ( arg_1 , 206 ) arg_4 = arg_2 . get ( type ( arg_3 ) . __name__ ) return arg_4 ( arg_0 , arg_3 )

Retrieve the list of courses contained within this catalog.

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


Question: Remove a process

def Func ( arg_0 , arg_1 ) : arg_2 = filepath . FilePath ( arg_0 . config ) arg_3 = arg_2 . child ( arg_1 ) arg_3 . Func ( )

Decimal adjusts AL after subtraction.

        Adjusts the result of the subtraction of two packed BCD values to create a packed BCD result.
        The AL register is the implied source and destination operand. If a decimal borrow is detected,
        the CF and AF flags are set accordingly. This instruction is not valid in 64-bit mode.

        The SF, ZF, and PF flags are set according to the result.::

                IF (AL AND 0FH) > 9 OR AF  =  1
                THEN
                    AL  =  AL - 6;
                    CF  =  CF OR BorrowFromLastSubtraction; (* CF OR borrow from AL  =  AL - 6 *)
                    AF  =  1;
                ELSE
                    AF  =  0;
                FI;
                IF ((AL > 99H) or OLD_CF  =  1)
                THEN
                    AL  =  AL - 60H;
                    CF  =  1;

        :param cpu: current CPU.


Question: Assigns force field parameters to Atoms in the AMPAL object .

def Func ( arg_0 , arg_1 ) : if hasattr ( arg_0 , 'ligands' ) : arg_2 = arg_0 . get_atoms ( ligands = True , inc_alt_states = True ) else : arg_2 = arg_0 . get_atoms ( inc_alt_states = True ) for arg_3 in arg_2 : arg_4 = None arg_5 = None if arg_3 . element == 'H' : continue elif arg_3 . parent . mol_code . upper ( ) in arg_1 : if arg_3 . res_label . upper ( ) in arg_1 [ arg_3 . parent . mol_code ] : arg_5 = ( arg_3 . parent . mol_code . upper ( ) , arg_3 . res_label . upper ( ) ) elif arg_3 . res_label . upper ( ) in arg_1 [ 'WLD' ] : arg_5 = ( 'WLD' , arg_3 . res_label . upper ( ) ) else : arg_4 = ( '{} atom is not parameterised in the selected ' 'force field for {} residues, this will be ' 'ignored.' ) . format ( arg_3 . res_label , arg_3 . parent . mol_code ) elif arg_3 . res_label . upper ( ) in arg_1 [ 'WLD' ] : arg_5 = ( 'WLD' , arg_3 . res_label . upper ( ) ) else : arg_4 = ( '{} ({}) atom is not parameterised in the selected' ' residue force field.' ) . format ( arg_3 . res_label , arg_3 . parent . mol_code ) if arg_4 : warnings . warn ( arg_4 , NotParameterisedWarning ) arg_3 . tags [ '_buff_ff_id' ] = arg_5 return

Places top drawdowns in a table.

    Parameters
    ----------
    returns : pd.Series
        Daily returns of the strategy, noncumulative.
         - See full explanation in tears.create_full_tear_sheet.
    top : int, optional
        The amount of top drawdowns to find (default 10).

    Returns
    -------
    df_drawdowns : pd.DataFrame
        Information about top drawdowns.


Question: Stop the profiler .

def Func ( arg_0 ) : CProfileWrapper . profiler . disable ( ) arg_0 . running = False arg_0 . set_status ( 204 ) arg_0 . finish ( )

A list of row indices to remove. There are two caveats. First, this is
    a potentially slow operation. Second, pattern indices will shift if
    patterns before them are removed.


Question: Returns a sorted copy with the colors arranged according to the given comparison .

def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_3 = arg_0 . copy ( ) _list . sort ( arg_3 , arg_1 ) if arg_2 : _list . reverse ( arg_3 ) return arg_3

Clean up stats file, if configured to do so.


Question: Saves the current entity to Redis . Will only save changed data by default but you can force a full save by passing full = True .

def Func ( arg_0 , arg_1 = False , arg_2 = False ) : arg_3 = arg_0 . _new if arg_3 : arg_0 . _before_insert ( ) else : arg_0 . _before_update ( ) arg_4 = arg_0 . to_dict ( ) arg_5 , arg_6 = arg_0 . _apply_changes ( arg_0 . _last , arg_4 , arg_1 or arg_0 . _new or arg_2 , is_new = arg_0 . _new or arg_2 ) arg_0 . _last = arg_6 arg_0 . _new = False arg_0 . _modified = False arg_0 . _deleted = False if arg_3 : arg_0 . _after_insert ( ) else : arg_0 . _after_update ( ) return arg_5

Return real, effective and saved user ids.


Question: Returns the year ID of the season in which this game took place . Useful for week 17 January games .

def Func ( arg_0 ) : arg_1 = arg_0 . date ( ) return arg_1 . year - 1 if arg_1 . month <= 3 else arg_1 . year

Disconnect internal signals so unit can be reused by parent unit


Question: Implements call to remove the documents from the index

def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : try : arg_4 = [ ] for arg_5 in arg_2 : log . debug ( "Removing document of type %s and index %s" , arg_1 , arg_5 ) arg_6 = { '_op_type' : 'delete' , "_index" : arg_0 . index_name , "_type" : arg_1 , "_id" : arg_5 } arg_4 . append ( arg_6 ) bulk ( arg_0 . _es , arg_4 , ** arg_3 ) except BulkIndexError as ex : arg_7 = [ error for error in ex . errors if error [ 'delete' ] [ 'status' ] != 404 ] if arg_7 : log . exception ( "An error occurred while removing documents from the index." ) raise

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: Get list information for this card . Returns a List object .

def Func ( arg_0 , ** arg_1 ) : arg_2 = arg_0 . Func_json ( arg_0 . base_uri , arg_1 = arg_1 ) return arg_0 . create_list ( arg_2 )

Simple and fast implementation of the covariance AR estimate

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

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

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

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

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

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

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

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

    :References: Mathworks


Question: Evaluate the forms in stdin into a Python module AST node .

def Func ( arg_0 , arg_1 : arg_2 . CompilerContext , arg_4 : arg_5 . ModuleType ) : arg_7 = None for arg_8 in reader . read ( arg_0 , resolver = runtime . resolve_alias ) : arg_7 = arg_2 . compile_and_exec_form ( arg_8 , arg_1 , arg_4 ) return arg_7


Question: Parses response of an exchange token request .

def Func ( arg_0 ) : arg_1 = { } arg_0 = _helpers . _from_bytes ( arg_0 ) try : arg_1 = json . loads ( arg_0 ) except Exception : arg_1 = _helpers . parse_unique_urlencoded ( arg_0 ) if arg_1 and 'expires' in arg_1 : arg_1 [ 'expires_in' ] = arg_1 . pop ( 'expires' ) return arg_1

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: Fill the matrix with the given RGB color

def Func ( arg_0 , arg_1 = None ) : md . fill_rect ( arg_0 . set , 0 , 0 , arg_0 . width , arg_0 . height , arg_1 )

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


Question: Check if the given node is from a fallback import block .

def Func ( arg_0 : arg_1 . node_classes . NodeNG ) -> bool : arg_4 = find_try_except_wrapper_node ( arg_0 ) if not arg_4 : return False if isinstance ( arg_4 , arg_1 . ExceptHandler ) : arg_5 = arg_4 . parent . body arg_6 = arg_4 . parent . handlers else : arg_5 = itertools . chain . from_iterable ( handler . body for handler in arg_4 . handlers ) arg_6 = arg_4 . handlers arg_7 = any ( isinstance ( import_node , ( arg_1 . ImportFrom , arg_1 . Import ) ) for import_node in arg_5 ) arg_8 = _except_handlers_ignores_exception ( arg_6 , ImportError ) return arg_8 or arg_7

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: Convert a string from a form into an Enum value .

def Func ( arg_0 , arg_1 ) : if arg_1 is None : return arg_1 if isinstance ( arg_1 , arg_0 . enum ) : return arg_1 return arg_0 . enum [ arg_1 ]


Question: Human - readable representation of a tensor s numpy value .

def Func ( arg_0 , arg_1 = False ) : if arg_0 . dtype . is_numpy_compatible : arg_2 = repr ( arg_0 . numpy ( ) ) if arg_1 else str ( arg_0 . numpy ( ) ) else : arg_2 = "<unprintable>" if "\n" in arg_2 : arg_2 = "\n" + arg_2 return arg_2

Apply all filters to issues and pull requests.

        :param dict older_tag: All issues before this tag's date will be
                               excluded. May be special value, if new tag is
                               the first tag. (Means **older_tag** is when
                               the repo  was created.)
        :param dict newer_tag: All issues after this tag's date  will be
                               excluded. May be title of unreleased section.
        :rtype: list(dict), list(dict)
        :return: Filtered issues and pull requests.


Question: Generates python code to capture text consumed by a clause .

def Func ( arg_0 , arg_1 : arg_2 . Capture ) -> [ ast . stmt ] or ast . expr : arg_4 = ast . Attribute ( ast . Name ( 'self' , ast . Load ( ) ) , 'beginTag' , ast . Load ( ) ) arg_5 = ast . Attribute ( ast . Name ( 'self' , ast . Load ( ) ) , 'endTag' , ast . Load ( ) ) arg_6 = ast . Call ( arg_4 , [ ast . Str ( arg_1 . tagname ) ] , [ ] , None , None ) arg_7 = ast . Call ( arg_5 , [ ast . Str ( arg_1 . tagname ) ] , [ ] , None , None ) arg_8 = [ arg_6 , arg_0 . visit ( arg_1 . pt ) , arg_7 ] for arg_9 in arg_8 : if not isinstance ( arg_9 , ast . expr ) : break else : return ast . BoolOp ( ast . And ( ) , arg_8 ) arg_10 = [ ] for arg_11 in map ( arg_0 . _clause , arg_8 ) : arg_10 . extend ( arg_11 ) return arg_10

Called by the PDFLite object to prompt creating
            the font objects.


Question: Updates a transfer job that runs periodically .

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


Question: applies read depths filter

def Func ( arg_0 , arg_1 ) : if sum ( arg_1 ) >= arg_0 . paramsdict [ "mindepth_majrule" ] and sum ( arg_1 ) <= arg_0 . paramsdict [ "maxdepth" ] : return 1 else : return 0

Set the rotation state of the camera

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


Question: Normalised data points using pure Python .

def Func ( arg_0 ) : arg_1 = ( arg_0 . screen . width / float ( len ( arg_0 . points ) ) ) arg_2 = ( arg_0 . screen . height ) for arg_3 , arg_4 in enumerate ( arg_0 . points ) : arg_5 = ( arg_4 - arg_0 . minimum ) * 4.0 / arg_0 . extents * arg_0 . size . y yield Point ( ( arg_1 * arg_3 , min ( arg_2 , arg_2 - arg_5 ) , ) )


Question: Processes DateTimes from the DB making sure it is always returning UTC . Not using timezone . convert_to_utc as that converts to configured TIMEZONE while the DB might be running with some other setting . We assume UTC datetimes in the database .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 is not None : if arg_1 . tzinfo is None : arg_1 = arg_1 . replace ( tzinfo = utc ) else : arg_1 = arg_1 . astimezone ( utc ) return arg_1

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: Format and return data from API calls which return Items

def Func ( arg_0 , arg_1 ) : arg_2 = { } if arg_0 . preserve_json_order : arg_2 [ "object_pairs_hook" ] = OrderedDict try : arg_3 = [ json . loads ( e [ "content" ] [ 0 ] [ "value" ] , ** arg_2 ) for e in arg_1 . entries ] except KeyError : return arg_0 . _tags_data ( arg_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: Delete a project . It will recursively delete all the content .

def Func ( arg_0 , arg_1 ) : if not is_valid_uuid ( arg_1 ) : raise StorageArgumentException ( 'Invalid UUID for project: {0}' . format ( arg_1 ) ) arg_0 . _authenticated_request . to_endpoint ( 'project/{}/' . format ( arg_1 ) ) . delete ( )

Handle marking messages as read and keeping client active.


Question: Get mappable parameters from YAML .

def Func ( arg_0 ) : arg_1 = Template ( arg_0 . yaml_string ) arg_2 = [ 'yaml_string' ] for arg_3 in re . finditer ( arg_1 . pattern , arg_1 . template ) : arg_4 = arg_3 . group ( 'named' ) or arg_3 . group ( 'braced' ) assert arg_4 is not None arg_2 . append ( arg_4 ) return arg_2

Modify an existing lock's timeout.

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


Question: Apply the argument parser .

def Func ( arg_0 , arg_1 = None ) : if arg_1 is not None : arg_2 = arg_0 . parse_args ( arg_1 ) else : arg_2 = arg_0 . parse_args ( ) return arg_2

Return a new function with the given meta. If the function f already
    has a meta map, then merge the


Question: Transfer children from old_parent to new_parent

def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_3 = arg_1 [ 'attributes' ] [ 'ID' ] except TypeError : try : arg_3 = arg_0 . lines [ arg_1 ] [ 'attributes' ] [ 'ID' ] except TypeError : arg_3 = arg_1 arg_4 = arg_0 . features [ arg_3 ] arg_5 = [ ld [ 'line_index' ] for ld in arg_4 ] try : arg_6 = arg_2 [ 'attributes' ] [ 'ID' ] except TypeError : try : arg_6 = arg_0 . lines [ arg_2 ] [ 'attributes' ] [ 'ID' ] except TypeError : arg_6 = arg_2 arg_7 = arg_0 . features [ arg_6 ] arg_8 = [ ld [ 'line_index' ] for ld in arg_7 ] arg_9 = arg_4 [ 0 ] [ 'children' ] arg_10 = set ( [ ld [ 'line_index' ] for ld in arg_7 [ 0 ] [ 'children' ] ] ) for arg_11 in arg_9 : if arg_11 [ 'line_index' ] not in arg_10 : arg_10 . add ( arg_11 [ 'line_index' ] ) for arg_12 in arg_7 : arg_12 [ 'children' ] . append ( arg_11 ) arg_11 [ 'parents' ] . append ( arg_7 ) arg_11 [ 'attributes' ] [ 'Parent' ] . append ( arg_6 ) arg_11 [ 'parents' ] = [ f for f in arg_11 [ 'parents' ] if f [ 0 ] [ 'attributes' ] [ 'ID' ] != arg_3 ] arg_11 [ 'attributes' ] [ 'Parent' ] = [ d for d in arg_11 [ 'attributes' ] [ 'Parent' ] if d != arg_3 ] for arg_13 in arg_4 : arg_13 [ 'children' ] = [ ] return arg_9

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

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


Question: Return exit status .

def Func ( arg_0 , arg_1 , arg_2 ) : import argparse arg_3 = argparse . ArgumentParser ( description = __doc__ , prog = 'autoflake' ) arg_3 . add_argument ( '-c' , '--check' , action = 'store_true' , help = 'return error code if changes are needed' ) arg_3 . add_argument ( '-i' , '--in-place' , action = 'store_true' , help = 'make changes to files instead of printing diffs' ) arg_3 . add_argument ( '-r' , '--recursive' , action = 'store_true' , help = 'drill down directories recursively' ) arg_3 . add_argument ( '--exclude' , metavar = 'globs' , help = 'exclude file/directory names that match these ' 'comma-separated globs' ) arg_3 . add_argument ( '--imports' , help = 'by default, only unused standard library ' 'imports are removed; specify a comma-separated ' 'list of additional modules/packages' ) arg_3 . add_argument ( '--expand-star-imports' , action = 'store_true' , help = 'expand wildcard star imports with undefined ' 'names; this only triggers if there is only ' 'one star import in the file; this is skipped if ' 'there are any uses of `__all__` or `del` in the ' 'file' ) arg_3 . add_argument ( '--remove-all-unused-imports' , action = 'store_true' , help = 'remove all unused imports (not just those from ' 'the standard library)' ) arg_3 . add_argument ( '--ignore-init-module-imports' , action = 'store_true' , help = 'exclude __init__.py when removing unused ' 'imports' ) arg_3 . add_argument ( '--remove-duplicate-keys' , action = 'store_true' , help = 'remove all duplicate keys in objects' ) arg_3 . add_argument ( '--remove-unused-variables' , action = 'store_true' , help = 'remove unused variables' ) arg_3 . add_argument ( '--version' , action = 'version' , version = '%(prog)s ' + __version__ ) arg_3 . add_argument ( 'files' , nargs = '+' , help = 'files to format' ) arg_4 = arg_3 . parse_args ( arg_0 [ 1 : ] ) if arg_4 . remove_all_unused_imports and arg_4 . imports : print ( 'Using both --remove-all and --imports is redundant' , file = arg_2 ) return 1 if arg_4 . exclude : arg_4 . exclude = _split_comma_separated ( arg_4 . exclude ) else : arg_4 . exclude = set ( [ ] ) arg_6 = list ( set ( arg_4 . files ) ) arg_7 = False for arg_8 in find_files ( arg_6 , arg_4 . recursive , arg_4 . exclude ) : try : fix_file ( arg_8 , arg_4 = arg_4 , arg_1 = arg_1 ) except IOError as exception : print ( unicode ( exception ) , file = arg_2 ) arg_7 = True return 1 if arg_7 else 0

Deletes the specified file from the given S3 bucket.


Question: Same as send_stream_error but expects lock acquired .

def Func ( arg_0 , arg_1 ) : if arg_0 . _output_state is "closed" : return if arg_0 . _output_state in ( None , "restart" ) : arg_0 . _send_stream_start ( ) arg_2 = StreamErrorElement ( arg_1 ) . as_xml ( ) arg_0 . transport . send_element ( arg_2 ) arg_0 . transport . disconnect ( ) arg_0 . _output_state = "closed"

Get type information for a Python object

    Args:
        obj: The Python object

    Returns:
        tuple: (object type "catagory", object type name)


Question: get properties from entry xml

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = False ) : arg_4 = { } arg_5 = arg_0 . getAttributeNS ( METADATA_NS , 'etag' ) if arg_5 : arg_4 [ 'etag' ] = arg_5 for arg_6 in _MinidomXmlToObject . get_child_nodes ( arg_0 , 'updated' ) : arg_4 [ 'updated' ] = arg_6 . firstChild . nodeValue for arg_7 in _MinidomXmlToObject . get_children_from_path ( arg_0 , 'author' , 'name' ) : if arg_7 . firstChild is not None : arg_4 [ 'author' ] = arg_7 . firstChild . nodeValue if arg_1 : if arg_3 : for arg_8 in _MinidomXmlToObject . get_child_nodes ( arg_0 , 'title' ) : arg_4 [ 'name' ] = arg_8 . firstChild . nodeValue else : for arg_9 in _MinidomXmlToObject . get_child_nodes ( arg_0 , 'id' ) : arg_4 [ 'name' ] = _get_readable_id ( arg_9 . firstChild . nodeValue , arg_2 ) return arg_4

Delete the Provisioning Service Certificate.

        Deletes the specified certificate assosciated with the Provisioning
        Service.

        :param resource_group_name: Resource group identifier.
        :type resource_group_name: str
        :param if_match: ETag of the certificate
        :type if_match: str
        :param provisioning_service_name: The name of the provisioning
         service.
        :type provisioning_service_name: str
        :param certificate_name: This is a mandatory field, and is the logical
         name of the certificate that the provisioning service will access by.
        :type certificate_name: str
        :param certificatename: This is optional, and it is the Common Name of
         the certificate.
        :type certificatename: str
        :param certificateraw_bytes: Raw data within the certificate.
        :type certificateraw_bytes: bytearray
        :param certificateis_verified: Indicates if certificate has been
         verified by owner of the private key.
        :type certificateis_verified: bool
        :param certificatepurpose: A description that mentions the purpose of
         the certificate. Possible values include: 'clientAuthentication',
         'serverAuthentication'
        :type certificatepurpose: str or
         ~azure.mgmt.iothubprovisioningservices.models.CertificatePurpose
        :param certificatecreated: Time the certificate is created.
        :type certificatecreated: datetime
        :param certificatelast_updated: Time the certificate is last updated.
        :type certificatelast_updated: datetime
        :param certificatehas_private_key: Indicates if the certificate
         contains a private key.
        :type certificatehas_private_key: bool
        :param certificatenonce: Random number generated to indicate Proof of
         Possession.
        :type certificatenonce: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorDetailsException<azure.mgmt.iothubprovisioningservices.models.ErrorDetailsException>`


Question: Handles display of the graph dot traits .

def Func ( arg_0 , arg_1 ) : if arg_1 . initialized : arg_0 . model . edit_traits ( parent = arg_1 . ui . control , kind = "live" , view = attr_view )

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


Question: Connects to an Arduino UNO on serial port port .

def Func ( arg_0 , arg_1 ) : arg_1 = str ( arg_1 ) arg_0 . _serial = serial . Serial ( arg_1 , 115200 , timeout = 2 ) time . sleep ( 2 ) if not arg_0 . _serial . is_open : raise RuntimeError ( 'Could not connect to Arduino' ) arg_0 . _serial . write ( b'\x01' ) if arg_0 . _serial . read ( ) != b'\x06' : raise RuntimeError ( 'Could not connect to Arduino' ) arg_3 = [ p for p in arg_0 . available_pins ( ) if p [ 'digital' ] [ 'output' ] ] for arg_4 in arg_3 : arg_0 . _set_pin_direction ( arg_4 [ 'id' ] , ahio . Direction . Output )


Question: Generates a random REQID for request

def Func ( ) : arg_0 = bytearray ( random . getrandbits ( 8 ) for i in range ( REQID . REQID_SIZE ) ) return REQID ( arg_0 )


Question: Retrieves the number of teams of the organization .

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

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


Question: Returns an invoice object for a given cart at its current revision . If such an invoice does not exist the cart is validated and if valid an invoice is generated .

def Func ( arg_0 , arg_1 ) : arg_1 . refresh_from_db ( ) try : arg_2 = commerce . Invoice . objects . exclude ( status = commerce . Invoice . STATUS_VOID , ) . get ( arg_1 = arg_1 , cart_revision = arg_1 . revision , ) except ObjectDoesNotExist : arg_3 = CartController ( arg_1 ) arg_3 . validate_cart ( ) arg_0 . update_old_invoices ( arg_1 ) arg_2 = arg_0 . _generate_from_cart ( arg_1 ) return arg_0 ( arg_2 )

Stop the timer

        Returns:
            The time the timer was stopped


Question: Delete files in root_folder which match regex before file ext .

def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_0 . name : return try : arg_3 , arg_4 = arg_0 . storage . listdir ( arg_1 ) except OSError : pass else : arg_5 , arg_6 = os . path . split ( arg_0 . name ) arg_7 , arg_8 = os . path . splitext ( arg_6 ) for arg_9 in arg_4 : if not arg_9 . startswith ( arg_7 ) or not arg_9 . endswith ( arg_8 ) : continue arg_10 = arg_9 [ len ( arg_7 ) : - len ( arg_8 ) ] assert arg_9 == arg_7 + arg_10 + arg_8 if arg_2 . match ( arg_10 ) is not None : arg_11 = os . path . join ( arg_1 , arg_9 ) arg_0 . storage . delete ( arg_11 ) cache . delete ( arg_0 . storage . url ( arg_11 ) ) print ( "Deleted {file} (created from: {original})" . format ( file = os . path . join ( arg_1 , arg_9 ) , original = arg_0 . name ) )


Question: Update terminal color scheme based on the pygments color scheme colors

def Func ( arg_0 ) : arg_0 . color_scheme = arg_0 . create_color_scheme ( background = arg_0 . syntax_highlighter . color_scheme . background , foreground = arg_0 . syntax_highlighter . color_scheme . formats [ 'normal' ] . foreground ( ) . color ( ) )

Returns a list of the dicom files within root_path

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

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


Question: Built a transformed - normal variational dist over a parameter s support .

def Func ( arg_0 , arg_1 ) : arg_2 = tf . compat . v1 . get_variable ( arg_0 . name + '_loc' , initializer = lambda : arg_1 ( arg_0 ) , dtype = arg_0 . prior . dtype , use_resource = True ) arg_3 = tf . nn . softplus ( tf . compat . v1 . get_variable ( arg_0 . name + '_scale' , initializer = lambda : - 4 * tf . ones_like ( arg_1 ( arg_0 ) ) , dtype = arg_0 . prior . dtype , use_resource = True ) ) arg_4 = tfd . Normal ( arg_2 = arg_2 , arg_3 = arg_3 ) if ( arg_0 . prior . event_shape . ndims is None or arg_0 . prior . event_shape . ndims > 0 ) : arg_4 = tfd . Independent ( arg_4 , reinterpreted_batch_ndims = arg_0 . prior . event_shape . ndims ) return tfd . TransformedDistribution ( arg_4 , arg_0 . bijector )


Question: Remove comments from a zonefile

def Func ( arg_0 ) : arg_1 = [ ] arg_2 = arg_0 . split ( "\n" ) for arg_3 in arg_2 : if len ( arg_3 ) == 0 : continue arg_3 = serialize ( tokenize_line ( arg_3 ) ) arg_1 . append ( arg_3 ) return "\n" . join ( arg_1 )

Whether a connection can be established between those two meshes.


Question: Returns the order for a coordinate .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _hashCoordinate ( arg_1 ) arg_3 = Random ( arg_2 ) return arg_3 . getReal64 ( )

Given two TM instances, see if any parameters are different.


Question: Tries decoding a byte string from the OS into a unicode string

def Func ( arg_0 ) : try : return str_cls ( arg_0 , _encoding ) except ( UnicodeDecodeError ) : for arg_1 in _fallback_encodings : try : return str_cls ( arg_0 , arg_1 , errors = 'strict' ) except ( UnicodeDecodeError ) : pass return str_cls ( arg_0 , errors = 'replace' )

Run migrations in 'online' mode.

    In this scenario we need to create an Engine
    and associate a connection with the context.


Question: Main Entry point for translator and argument parser

def Func ( ) : arg_0 = command_line ( ) arg_1 = partial ( translator , arg_0 . source , arg_0 . dest , version = ' ' . join ( [ __version__ , __build__ ] ) ) return source ( spool ( set_task ( arg_1 , translit = arg_0 . translit ) ) , arg_0 . text )

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: Function internally used to detect the notation of the given IP or netmask .

def Func ( arg_0 , arg_1 ) : arg_0 = str ( arg_0 ) if len ( arg_0 ) > 1 : if arg_0 [ 0 : 2 ] == '0x' : if _CHECK_FUNCT [ IP_HEX ] [ arg_1 ] ( arg_0 ) : return IP_HEX elif arg_0 [ 0 ] == '0' : if _CHECK_FUNCT [ IP_OCT ] [ arg_1 ] ( arg_0 ) : return IP_OCT if _CHECK_FUNCT [ IP_DOT ] [ arg_1 ] ( arg_0 ) : return IP_DOT elif arg_1 and _CHECK_FUNCT [ NM_BITS ] [ arg_1 ] ( arg_0 ) : return NM_BITS elif _CHECK_FUNCT [ IP_DEC ] [ arg_1 ] ( arg_0 ) : return IP_DEC elif arg_1 and _CHECK_FUNCT [ NM_WILDCARD ] [ arg_1 ] ( arg_0 ) : return NM_WILDCARD elif _CHECK_FUNCT [ IP_BIN ] [ arg_1 ] ( arg_0 ) : return IP_BIN return IP_UNKNOWN

Take a snapshot of a droplet

    Parameters
    ----------
    name: str
        name for snapshot


Question: Kills the running loop and waits till it gets killed .

def Func ( arg_0 ) : assert arg_0 . has_started ( ) , "called Func() on a non-active GeventLoop" arg_0 . _stop_event . set ( ) arg_0 . _greenlet . Func ( ) arg_0 . _clear ( )

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: Log msg % args with severity WARNING .

def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : arg_0 . _baseLogger . Func ( arg_0 , arg_0 . getExtendedMsg ( arg_1 ) , * arg_2 , ** arg_3 )

Request the api endpoint to retrieve information about the inventory

        :return: Main Collection
        :rtype: Collection


Question: Checks if a Pong message was received .

def Func ( arg_0 ) : arg_0 . pong_timer . cancel ( ) if arg_0 . pong_received : arg_0 . log . debug ( "Func(): Pong received in time." ) arg_0 . pong_received = False else : arg_0 . log . debug ( "Func(): Pong not received in time." "Issuing reconnect.." ) arg_0 . reconnect ( )

Add file to the patch with patch_name.
        If patch_name is None or empty the topmost patch will be used.
        Adding an already added patch will raise an QuiltError if ignore is
        False.


Question: Constructs a message class and sends the message . Defaults to sending synchronously . Set send_async = True to send asynchronously .

def Func ( arg_0 , arg_1 = False , * arg_2 , ** arg_3 ) : arg_4 = message_factory ( arg_0 , * arg_2 , ** arg_3 ) try : if arg_1 : arg_4 . Func_async ( ) else : arg_4 . Func ( ) except MessageSendError as e : err_exit ( "Unable to Func message: " , e )

Return a dictionary of circuit properties.


Question: Initialize a MucStatus element from a status code .

def Func ( arg_0 , arg_1 ) : arg_1 = int ( arg_1 ) if arg_1 < 0 or arg_1 > 999 : raise ValueError ( "Bad status code" ) arg_0 . code = arg_1

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: Compute the center frequencies of Constant - Q bins .

def Func ( arg_0 , arg_1 , arg_2 = 12 , arg_3 = 0.0 ) : arg_4 = 2.0 ** ( float ( arg_3 ) / arg_2 ) arg_5 = 2.0 ** ( np . arange ( 0 , arg_0 , dtype = float ) / arg_2 ) return arg_4 * arg_1 * arg_5

Illustrate what the various input flags are and the options should be.

    :return: none


Question: Convert a ChaLearn Cause effect pairs challenge format into numpy . ndarray .

def Func ( arg_0 , arg_1 = True , ** arg_2 ) : def convert_row ( arg_3 , arg_1 ) : arg_4 = arg_3 [ "A" ] . split ( " " ) arg_5 = arg_3 [ "B" ] . split ( " " ) if arg_4 [ 0 ] == "" : arg_4 . pop ( 0 ) arg_5 . pop ( 0 ) if arg_4 [ - 1 ] == "" : arg_4 . pop ( - 1 ) arg_5 . pop ( - 1 ) arg_4 = array ( [ float ( i ) for i in arg_4 ] ) arg_5 = array ( [ float ( i ) for i in arg_5 ] ) if arg_1 : arg_4 = scaler ( arg_4 ) arg_5 = scaler ( arg_5 ) return arg_3 [ 'SampleID' ] , arg_4 , arg_5 if isinstance ( arg_0 , str ) : arg_6 = read_csv ( arg_0 , ** arg_2 ) elif isinstance ( arg_0 , DataFrame ) : arg_6 = arg_0 else : raise TypeError ( "Type not supported." ) arg_7 = [ ] for arg_8 , arg_3 in arg_6 . iterrows ( ) : arg_7 . append ( convert_row ( arg_3 , arg_1 ) ) arg_9 = DataFrame ( arg_7 , columns = [ 'SampleID' , 'A' , 'B' ] ) arg_9 = arg_9 . set_index ( "SampleID" ) return arg_9

Return the maximum file descriptor value.


Question: Takes the given mask and stft which must be matrices of shape frequencies times and downsamples one of them into the other one s times so that the time dimensions are equal . Leaves the frequency dimension untouched .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : assert len ( arg_0 . shape ) == 2 , "Expected a two-dimensional `mask`, but got one of {} dimensions." . format ( len ( arg_0 . shape ) ) assert len ( arg_2 . shape ) == 2 , "Expected a two-dimensional `stft`, but got one of {} dimensions." . format ( len ( arg_2 . shape ) ) if arg_0 . shape [ 1 ] > arg_2 . shape [ 1 ] : arg_4 = arg_0 . shape [ 1 ] / arg_2 . shape [ 1 ] arg_5 = _get_downsampled_indexes ( arg_0 , arg_4 ) arg_0 = arg_0 [ : , arg_5 ] arg_1 = np . array ( arg_5 ) elif arg_0 . shape [ 1 ] < arg_2 . shape [ 1 ] : arg_4 = arg_2 . shape [ 1 ] / arg_0 . shape [ 1 ] arg_5 = _get_downsampled_indexes ( arg_2 , arg_4 ) arg_2 = arg_2 [ : , arg_5 ] arg_3 = np . array ( arg_5 ) return arg_0 , arg_1 , arg_2 , arg_3

Add an HTTP header to response object.

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


Question: Import customer s service modules .

def Func ( arg_0 ) : if not arg_0 . config : raise ValueError ( "please read your config file." ) log . debug ( "begin to import customer's service modules." ) arg_1 = ServiceModules ( arg_0 . config ) arg_1 . import_modules ( ) log . debug ( "end to import customer's service modules." )

Returns how the result count compares to the query options.

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

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


Question: Save the weights of the trainable variables given a checkpoint each one in a different file in output_path .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : check_input_checkpoint ( arg_0 ) with tf . Session ( ) as sess : restore_from_checkpoint ( sess , arg_0 ) save_weights ( sess , arg_1 , arg_2 = arg_2 , arg_3 = arg_3 )


Question: Start running .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , ** arg_4 ) : assert isinstance ( arg_1 , list ) assert mmcv . is_list_of ( arg_2 , tuple ) assert len ( arg_1 ) == len ( arg_2 ) arg_0 . _max_epochs = arg_3 arg_6 = arg_0 . work_dir if arg_0 . work_dir is not None else 'NONE' arg_0 . logger . info ( 'Start Funcning, host: %s, work_dir: %s' , get_host_info ( ) , arg_6 ) arg_0 . logger . info ( 'workflow: %s, max: %d epochs' , arg_2 , arg_3 ) arg_0 . call_hook ( 'before_Func' ) while arg_0 . epoch < arg_3 : for arg_7 , arg_8 in enumerate ( arg_2 ) : arg_9 , arg_10 = arg_8 if isinstance ( arg_9 , str ) : if not hasattr ( arg_0 , arg_9 ) : raise ValueError ( 'Funcner has no method named "{}" to Func an epoch' . format ( arg_9 ) ) arg_11 = getattr ( arg_0 , arg_9 ) elif callable ( arg_9 ) : arg_11 = arg_9 else : raise TypeError ( 'mode in workflow must be a str or ' 'callable function, not {}' . format ( type ( arg_9 ) ) ) for arg_12 in range ( arg_10 ) : if arg_9 == 'train' and arg_0 . epoch >= arg_3 : return arg_11 ( arg_1 [ arg_7 ] , ** arg_4 ) time . sleep ( 1 ) arg_0 . call_hook ( 'after_Func' )


Question: Check if there are exceptions that should be raised

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 [ 'rCode' ] != 100 : raise exceptions . get_exception_for_code ( arg_1 [ 'rCode' ] ) ( arg_1 ) arg_3 = arg_1 [ 'results' ] if len ( arg_3 ) == 0 : raise exceptions . ZipTaxNoResults ( 'No results found' ) if len ( arg_3 ) > 1 and not arg_2 : arg_4 = [ result [ 'taxSales' ] for result in arg_3 ] if len ( set ( arg_4 ) ) != 1 : raise exceptions . ZipTaxMultipleResults ( 'Multiple results found but requested only one' )

simple timer. returns a time object, or a string.


Question: Wraps the output of a user provided function that may yield or return a value and returns a generator that asserts it only yields a single value .

def Func ( arg_0 , arg_1 , arg_2 ) : check . callable_param ( arg_0 , 'user_fn' ) check . subclass_param ( arg_1 , 'error_cls' , DagsterUserCodeExecutionError ) with user_code_error_boundary ( arg_1 , arg_2 ) : arg_3 = arg_0 ( ) arg_4 = _ensure_gen ( arg_3 ) try : arg_5 = next ( arg_4 ) except StopIteration : check . failed ( 'Must yield one item. You did not yield anything.' ) yield arg_5 arg_6 = False try : next ( arg_4 ) except StopIteration : arg_6 = True check . invariant ( arg_6 , 'Must yield one item. Yielded more than one item' )

Get an IO write task for the requested set of data

        This task can be ran immediately or be submitted to the IO executor
        for it to run.

        :type fileobj: file-like object
        :param fileobj: The file-like object to write to

        :type data: bytes
        :param data: The data to write out

        :type offset: integer
        :param offset: The offset to write the data to in the file-like object

        :returns: An IO task to be used to write data to a file-like object


Question: Returns the medium size image URL .

def Func ( arg_0 ) : if arg_0 . is_gif ( ) : return arg_0 . get_absolute_url ( ) return '%s%s-%s.jpg' % ( settings . MEDIA_URL , arg_0 . get_name ( ) , 'medium' )

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


Question: write a map file with linkage information for SNPs file

def Func ( arg_0 ) : arg_1 = time . time ( ) arg_2 = os . path . join ( arg_0 . dirs . outfiles , "tmp-{}.h5" . format ( arg_0 . name ) ) with h5py . File ( arg_2 , 'r' ) as io5 : arg_3 = io5 [ "maparr" ] [ : ] arg_4 = np . where ( np . all ( arg_3 [ : ] == 0 , axis = 1 ) ) [ 0 ] if np . any ( arg_4 ) : arg_4 = arg_4 . min ( ) else : arg_4 = arg_3 . shape [ 0 ] arg_5 = [ ] with open ( arg_0 . outfiles . snpsmap , 'w' ) as out : for arg_6 in xrange ( arg_4 ) : arg_7 = arg_3 [ arg_6 , : ] arg_5 . append ( "{}\trad{}_snp{}\t{}\t{}\n" . format ( arg_7 [ 0 ] , arg_7 [ 1 ] , arg_7 [ 2 ] , 0 , arg_7 [ 3 ] ) ) if not arg_6 % 10000 : out . write ( "" . join ( arg_5 ) ) arg_5 = [ ] out . write ( "" . join ( arg_5 ) ) LOGGER . debug ( "finished writing snps_map in: %s" , time . time ( ) - arg_1 )

This attempts to fix the easy errors raised by ValidationError.
        This includes removing items from the cart that are no longer
        available, recalculating all of the discounts, and removing voucher
        codes that are no longer available.


Question: This function returns a list of Firewall objects .

def Func ( arg_0 ) : arg_1 = arg_0 . get_data ( "firewalls" ) arg_2 = list ( ) for arg_3 in arg_1 [ 'firewalls' ] : arg_4 = Firewall ( ** arg_3 ) arg_4 . token = arg_0 . token arg_6 = list ( ) for arg_7 in arg_3 [ 'inbound_rules' ] : arg_6 . append ( InboundRule ( ** arg_7 ) ) arg_4 . inbound_rules = arg_6 arg_9 = list ( ) for arg_7 in arg_3 [ 'outbound_rules' ] : arg_9 . append ( OutboundRule ( ** arg_7 ) ) arg_4 . outbound_rules = arg_9 arg_2 . append ( arg_4 ) return arg_2

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


Question: Make a guess about the cache file location an try loading it .

def Func ( arg_0 , * arg_1 , ** arg_2 ) : arg_3 = os . path . join ( Cache . cache_dir , Cache . cache_name ) return arg_0 . from_file ( arg_3 , * arg_1 , ** arg_2 )

Multiply tensor of matrices by vectors assuming values stored are logs.


Question: Construct a _HTMClassificationRecord based on the state of the model passed in through the inputs .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 [ "spBottomUpOut" ] arg_3 = arg_2 . nonzero ( ) [ 0 ] arg_4 = anomaly . computeRawAnomalyScore ( arg_3 , arg_0 . _prevPredictedColumns ) arg_5 = len ( arg_2 ) arg_6 = arg_1 [ 'tpTopDownOut' ] arg_7 = len ( arg_1 [ 'tpLrnActiveStateT' ] ) arg_8 = arg_11 . array ( [ ] ) if arg_0 . classificationVectorType == 1 : arg_8 = arg_11 . zeros ( arg_7 ) arg_9 = arg_1 [ "tpLrnActiveStateT" ] . reshape ( arg_7 , 1 ) arg_10 = arg_11 . where ( arg_9 > 0 ) [ 0 ] if arg_10 . shape [ 0 ] > 0 : arg_8 [ arg_11 . array ( arg_10 , arg_13 = arg_11 . uint16 ) ] = 1 elif arg_0 . classificationVectorType == 2 : arg_8 = arg_11 . zeros ( arg_5 + arg_5 ) if arg_3 . shape [ 0 ] > 0 : arg_8 [ arg_3 ] = 1.0 arg_15 = arg_11 . setdiff1d ( arg_0 . _prevPredictedColumns , arg_3 ) if arg_15 . shape [ 0 ] > 0 : arg_16 = ( arg_11 . array ( arg_15 , arg_13 = arg_11 . uint16 ) + arg_5 ) arg_8 [ arg_16 ] = 1.0 else : raise TypeError ( "Classification vector type must be either 'tpc' or" " 'sp_tpe', current value is %s" % ( arg_0 . classificationVectorType ) ) arg_17 = len ( arg_0 . _prevPredictedColumns ) arg_18 = arg_6 . nonzero ( ) [ 0 ] arg_0 . _prevPredictedColumns = copy . deepcopy ( arg_18 ) if arg_0 . _anomalyVectorLength is None : arg_0 . _anomalyVectorLength = len ( arg_8 ) arg_21 = _CLAClassificationRecord ( ROWID = arg_0 . _iteration , anomalyScore = arg_4 , anomalyVector = arg_8 . nonzero ( ) [ 0 ] . tolist ( ) , anomalyLabel = [ ] ) return arg_21

Modify an existing lock's timeout.

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


Question: Parse a Gerrit reviews list .

def Func ( arg_0 ) : arg_1 = "[" + arg_0 . replace ( "\n" , "," ) + "]" arg_1 = arg_1 . replace ( ",]" , "]" ) arg_2 = json . loads ( arg_1 ) arg_3 = [ ] for arg_4 in arg_2 : if 'project' in arg_4 . keys ( ) : arg_3 . append ( arg_4 ) return arg_3


Question: Return the list of default arguments of obj if it is callable or empty list otherwise .

def Func ( arg_0 , arg_1 ) : if not ( inspect . isfunction ( arg_1 ) or inspect . ismethod ( arg_1 ) ) : if inspect . isclass ( arg_1 ) : arg_1 = ( getattr ( arg_1 , '__init__' , None ) or getattr ( arg_1 , '__new__' , None ) ) elif hasattr ( arg_1 , '__call__' ) : arg_1 = arg_1 . __call__ try : arg_2 , arg_3 , arg_4 , arg_5 = inspect . getargspec ( arg_1 ) if arg_5 : return arg_2 [ - len ( arg_5 ) : ] except TypeError : pass return [ ]

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: Get the Grant object with the given client ID and code

def Func ( arg_0 , arg_1 , arg_2 ) : return arg_0 . query . filter_by ( arg_1 = arg_1 , arg_2 = arg_2 ) . first ( )


Question: deliver on edge of timeout_window

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = ConsensusManager . round_timeout assert arg_4 > 0 print "in slow transport Func" super ( SlowTransport , arg_0 ) . Func ( arg_1 , arg_2 , arg_3 , add_delay = arg_4 )

A list of row indices to remove. There are two caveats. First, this is
    a potentially slow operation. Second, pattern indices will shift if
    patterns before them are removed.


Question: Run an instance of GNN testing causal direction .

def Func ( arg_0 , arg_1 = 0 , arg_2 = None , arg_3 = 20 , ** arg_4 ) : arg_2 = SETTINGS . get_default ( arg_2 = arg_2 ) arg_5 = scale ( arg_0 ) . astype ( 'float32' ) arg_6 = th . FloatTensor ( arg_5 [ : , [ 0 ] ] ) . to ( arg_2 ) arg_7 = th . FloatTensor ( arg_5 [ : , [ 1 ] ] ) . to ( arg_2 ) arg_8 = GNN_model ( arg_0 . shape [ 0 ] , arg_2 = arg_2 , arg_3 = arg_3 ) . to ( arg_2 ) arg_9 = GNN_model ( arg_0 . shape [ 0 ] , arg_2 = arg_2 , arg_3 = arg_3 ) . to ( arg_2 ) arg_8 . reset_parameters ( ) arg_9 . reset_parameters ( ) arg_10 = arg_8 . run ( arg_6 , arg_7 , ** arg_4 ) arg_11 = arg_9 . run ( arg_7 , arg_6 , ** arg_4 ) return [ arg_10 , arg_11 ]

Stop streaming samples from device and delete samples buffer


Question: Fetch the pages from the backend url for MediaWiki > = 1 . 27

def Func ( arg_0 , arg_1 = None ) : logger . info ( "Looking for pages at url '%s'" , arg_0 . url ) arg_2 = 0 arg_3 = 0 arg_4 = [ ] arg_5 = arg_0 . __get_namespaces_contents ( ) arg_6 = '' while arg_6 is not None : arg_7 = arg_0 . client . get_pages_from_allrevisions ( arg_5 , arg_1 , arg_6 ) arg_8 = json . loads ( arg_7 ) arg_6 = arg_8 [ 'continue' ] [ 'arvcontinue' ] if 'continue' in arg_8 else None arg_9 = arg_8 [ 'query' ] [ 'allrevisions' ] for arg_10 in arg_9 : if arg_10 [ 'pageid' ] in arg_4 : logger . debug ( "Page %s already processed; skipped" , arg_10 [ 'pageid' ] ) continue arg_3 += 1 arg_4 . append ( arg_10 [ 'pageid' ] ) arg_11 = arg_0 . __get_page_reviews ( arg_10 ) if not arg_11 : logger . warning ( "Revisions not found in %s [page id: %s], page skipped" , arg_10 [ 'title' ] , arg_10 [ 'pageid' ] ) continue yield arg_11 arg_2 += 1 logger . info ( "Total number of pages: %i, skipped %i" , arg_3 , arg_3 - arg_2 )

Set the rotation of this body using a rotation matrix.

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


Question: Adds data to the summary tables and returns if instance s comment has to be stored .

def Func ( arg_0 , arg_1 ) : if arg_1 . v_comment == '' : return False arg_2 = arg_1 . v_branch arg_3 = True arg_4 = arg_1 . v_comment . encode ( 'utf-8' ) arg_5 = hashlib . sha1 ( arg_4 ) . hexdigest ( ) arg_5 = arg_5 . encode ( 'utf-8' ) arg_6 = arg_2 + '_summary' if arg_6 in arg_0 . _overview_group : arg_7 = getattr ( arg_0 . _overview_group , arg_6 ) else : return arg_3 try : arg_8 = { 'hexdigestcol' : arg_7 . cols . hexdigest , 'hexdigest' : arg_5 } arg_9 = """(hexdigestcol == hexdigest)""" arg_10 = arg_7 . where ( arg_9 , arg_8 = arg_8 ) arg_11 = None try : arg_11 = next ( arg_10 ) except StopIteration : pass if arg_11 is None : arg_0 . _all_store_param_or_result_table_entry ( arg_1 , arg_7 , flags = ( HDF5StorageService . ADD_ROW , ) , additional_info = { 'hexdigest' : arg_5 } ) arg_3 = True else : arg_3 = False arg_0 . _all_kill_iterator ( arg_10 ) except pt . NoSuchNodeError : arg_3 = True return arg_3

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


Question: Determine if a vif is on isonet

def Func ( arg_0 ) : arg_1 = arg_0 . record . get ( 'other_config' ) . get ( 'nicira-iface-id' ) if arg_1 : return True return False

Gets the base class for the custom database back-end.

    This should be the Django PostgreSQL back-end. However,
    some people are already using a custom back-end from
    another package. We are nice people and expose an option
    that allows them to configure the back-end we base upon.

    As long as the specified base eventually also has
    the PostgreSQL back-end as a base, then everything should
    work as intended.


Question: \ Low - level dispatching of socket data based on regex matching in general handles

def Func ( arg_0 ) : return ( ( arg_0 . nick_re , arg_0 . new_nick ) , ( arg_0 . nick_change_re , arg_0 . handle_nick_change ) , ( arg_0 . ping_re , arg_0 . handle_ping ) , ( arg_0 . part_re , arg_0 . handle_part ) , ( arg_0 . join_re , arg_0 . handle_join ) , ( arg_0 . quit_re , arg_0 . handle_quit ) , ( arg_0 . chanmsg_re , arg_0 . handle_channel_message ) , ( arg_0 . privmsg_re , arg_0 . handle_private_message ) , ( arg_0 . registered_re , arg_0 . handle_registered ) , )

Remove any metadata associated with the provided CoreBluetooth object.


Question: Take a snapshot of a droplet

def Func ( arg_0 , arg_1 ) : print "powering off" arg_0 . power_off ( ) arg_0 . wait ( ) print "taking snapshot" arg_0 . Func ( arg_1 ) arg_0 . wait ( ) arg_2 = arg_0 . snapshots ( ) print "Current snapshots" print arg_2

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

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


Question: Return True if URI is locked .

def Func ( arg_0 ) : if arg_0 . provider . lock_manager is None : return False return arg_0 . provider . lock_manager . is_url_locked ( arg_0 . get_ref_url ( ) )

Creates a layer from its config.

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

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

    Returns:
      layer: A layer instance.


Question: Move detections in direction dx dy .

def Func ( arg_0 , arg_1 , arg_2 ) : for arg_3 in arg_0 . keys ( ) : if arg_3 . startswith ( "detection" ) : arg_4 = arg_0 [ arg_3 ] for arg_5 in arg_4 : arg_5 . move_image ( - arg_2 , - arg_1 )

Delete the Provisioning Service Certificate.

        Deletes the specified certificate assosciated with the Provisioning
        Service.

        :param resource_group_name: Resource group identifier.
        :type resource_group_name: str
        :param if_match: ETag of the certificate
        :type if_match: str
        :param provisioning_service_name: The name of the provisioning
         service.
        :type provisioning_service_name: str
        :param certificate_name: This is a mandatory field, and is the logical
         name of the certificate that the provisioning service will access by.
        :type certificate_name: str
        :param certificatename: This is optional, and it is the Common Name of
         the certificate.
        :type certificatename: str
        :param certificateraw_bytes: Raw data within the certificate.
        :type certificateraw_bytes: bytearray
        :param certificateis_verified: Indicates if certificate has been
         verified by owner of the private key.
        :type certificateis_verified: bool
        :param certificatepurpose: A description that mentions the purpose of
         the certificate. Possible values include: 'clientAuthentication',
         'serverAuthentication'
        :type certificatepurpose: str or
         ~azure.mgmt.iothubprovisioningservices.models.CertificatePurpose
        :param certificatecreated: Time the certificate is created.
        :type certificatecreated: datetime
        :param certificatelast_updated: Time the certificate is last updated.
        :type certificatelast_updated: datetime
        :param certificatehas_private_key: Indicates if the certificate
         contains a private key.
        :type certificatehas_private_key: bool
        :param certificatenonce: Random number generated to indicate Proof of
         Possession.
        :type certificatenonce: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorDetailsException<azure.mgmt.iothubprovisioningservices.models.ErrorDetailsException>`


Question: Compare twolists using given comparing function .

def Func ( arg_0 , arg_1 , arg_2 ) : if len ( arg_0 ) != len ( arg_1 ) : return False for arg_3 , arg_4 in zip ( arg_0 , arg_1 ) : if not arg_2 ( arg_3 , arg_4 ) : return False return True


Question: Recursively merge two dictionaries with the elements from top taking precedence over elements from top .

def Func ( arg_0 , arg_1 ) : arg_2 = dict ( arg_1 ) for arg_3 in arg_0 : if arg_3 in arg_1 : if isinstance ( arg_0 [ arg_3 ] , dict ) and isinstance ( arg_1 [ arg_3 ] , dict ) : arg_2 [ arg_3 ] = Func ( arg_0 [ arg_3 ] , arg_1 [ arg_3 ] ) else : arg_2 [ arg_3 ] = arg_0 [ arg_3 ] return arg_2

Delete latex comments from TeX source.

    Parameters
    ----------
    tex_source : str
        TeX source content.

    Returns
    -------
    tex_source : str
        TeX source without comments.


Question: List experiments for this project .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 ) : arg_8 , arg_9 = get_project_or_local ( arg_0 . obj . get ( 'project' ) ) arg_7 = arg_7 or 1 try : arg_10 = PolyaxonClient ( ) . project . list_Func ( username = arg_8 , arg_9 = arg_9 , arg_3 = arg_3 , arg_4 = arg_4 , arg_1 = arg_1 , arg_2 = arg_2 , arg_5 = arg_5 , arg_6 = arg_6 , arg_7 = arg_7 ) except ( PolyaxonHTTPError , PolyaxonShouldExitError , PolyaxonClientException ) as e : Printer . print_error ( 'Could not get Func for project `{}`.' . format ( arg_9 ) ) Printer . print_error ( 'Error message `{}`.' . format ( e ) ) sys . exit ( 1 ) arg_11 = get_meta_response ( arg_10 ) if arg_11 : Printer . print_header ( 'Experiments for project `{}/{}`.' . format ( arg_8 , arg_9 ) ) Printer . print_header ( 'Navigation:' ) dict_tabulate ( arg_11 ) else : Printer . print_header ( 'No Func found for project `{}/{}`.' . format ( arg_8 , arg_9 ) ) if arg_1 : arg_12 = get_Func_with_metrics ( arg_10 ) elif arg_2 : arg_12 = get_Func_with_declarations ( arg_10 ) else : arg_12 = [ Printer . add_status_color ( o . to_light_dict ( humanize_values = True ) ) for o in arg_10 [ 'results' ] ] arg_12 = list_dicts_to_tabulate ( arg_12 ) if arg_12 : Printer . print_header ( "Experiments:" ) arg_12 . pop ( 'project_name' , None ) dict_tabulate ( arg_12 , is_list_dict = True )

APEv2 tag value factory.

    Use this if you need to specify the value's type manually.  Binary
    and text data are automatically detected by APEv2.__setitem__.


Question: Convert a 2D array of items into a Markdown table .

def Func ( arg_0 , * , arg_1 = arg_2 , arg_3 = '|' , arg_4 = '-' ) : arg_0 = normalize_cols ( arg_0 ) arg_0 = pad_cells ( arg_0 ) arg_5 = arg_0 [ 0 ] arg_6 = arg_0 [ 1 : ] arg_7 = [ len ( cell ) for cell in arg_5 ] arg_8 = horiz_div ( arg_7 , arg_4 , arg_3 , arg_1 ) arg_5 = add_dividers ( arg_5 , arg_3 , arg_1 ) arg_6 = [ add_dividers ( row , arg_3 , arg_1 ) for row in arg_6 ] arg_0 = [ arg_5 , arg_8 ] arg_0 . extend ( arg_6 ) arg_0 = [ row . rstrip ( ) for row in arg_0 ] return '\n' . join ( arg_0 )

Helper function to get packing_plan with
    a callback. The future watch is placed
    only if isWatching is True.


Question: Returns coordinate for given GPS position .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : arg_4 = PROJ ( arg_1 , arg_2 ) if arg_3 is not None : arg_4 = transform ( PROJ , geocentric , arg_4 [ 0 ] , arg_4 [ 1 ] , arg_3 ) arg_5 = numpy . array ( arg_4 ) arg_5 = arg_5 / arg_0 . scale return arg_5 . astype ( int )

Reassemble a Binder object coming out of the database.


Question: Dotted decimal notation to decimal conversion .

def Func ( arg_0 , arg_1 = True ) : if arg_1 and not is_dot ( arg_0 ) : raise ValueError ( 'Func: invalid IP: "%s"' % arg_0 ) arg_2 = str ( arg_0 ) . split ( '.' ) arg_3 = 0 arg_3 |= int ( arg_2 [ 0 ] ) << 24 arg_3 |= int ( arg_2 [ 1 ] ) << 16 arg_3 |= int ( arg_2 [ 2 ] ) << 8 arg_3 |= int ( arg_2 [ 3 ] ) return arg_3

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

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

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

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


Question: Ensure that if a link can be found for this that it is found .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . link is None : arg_0 . link = arg_1 . find_requirement ( arg_0 , arg_2 )

Put us back at the beginning of the file again.


Question: Returns value as a valid Go string literal .

def Func ( arg_0 ) : arg_1 = StringIO . StringIO ( ) arg_1 . write ( '"' ) for arg_2 in arg_0 : if arg_2 in _ESCAPES : arg_1 . write ( _ESCAPES [ arg_2 ] ) elif arg_2 in _SIMPLE_CHARS : arg_1 . write ( arg_2 ) else : arg_1 . write ( r'\x{:02x}' . format ( ord ( arg_2 ) ) ) arg_1 . write ( '"' ) return arg_1 . getvalue ( )

Unregister an extension code.  For testing only.


Question: Apply update to serialization metrics

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . update_count ( arg_0 . TUPLE_SERIALIZATION_TIME_NS , incr_by = arg_2 , key = arg_1 )

Add noise to the given input.

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


Question: Given two list or arrays pad with zeros the shortest array

def Func ( arg_0 , arg_1 ) : arg_2 = abs ( len ( arg_0 ) - len ( arg_1 ) ) if arg_2 != 0 : if len ( arg_1 ) > len ( arg_0 ) : try : arg_0 . extend ( [ 0. ] * arg_2 ) except : arg_0 = np . append ( arg_0 , [ 0 ] * arg_2 ) elif len ( arg_0 ) > len ( arg_1 ) : try : arg_1 . extend ( [ 0. ] * arg_2 ) except : arg_1 = np . append ( arg_1 , [ 0 ] * arg_2 ) return arg_0 , arg_1 else : return arg_0 , arg_1


Question: Call the API with a PUT request .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None , ** arg_5 ) : return arg_0 . call_api ( "PUT" , arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , ** arg_5 )

Stop streaming samples from device and delete samples buffer


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

def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : super ( SignatureVerifyResponsePayload , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_6 = utils . BytearrayStream ( arg_1 . Func ( arg_0 . length ) ) if arg_0 . is_tag_next ( arg_3 . Tags . UNIQUE_IDENTIFIER , arg_6 ) : arg_0 . _unique_identifier = primitives . TextString ( tag = arg_3 . Tags . UNIQUE_IDENTIFIER ) arg_0 . _unique_identifier . Func ( arg_6 , arg_2 = arg_2 ) else : raise ValueError ( "Parsed payload encoding is missing the unique identifier " "field." ) if arg_0 . is_tag_next ( arg_3 . Tags . VALIDITY_INDICATOR , arg_6 ) : arg_0 . _validity_indicator = primitives . Enumeration ( arg_3 . ValidityIndicator , tag = arg_3 . Tags . VALIDITY_INDICATOR ) arg_0 . _validity_indicator . Func ( arg_6 , arg_2 = arg_2 ) else : raise ValueError ( "Parsed payload encoding is missing the validity indicator " "field." ) if arg_0 . is_tag_next ( arg_3 . Tags . DATA , arg_6 ) : arg_0 . _data = primitives . ByteString ( tag = arg_3 . Tags . DATA ) arg_0 . _data . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( arg_3 . Tags . CORRELATION_VALUE , arg_6 ) : arg_0 . _correlation_value = primitives . ByteString ( tag = arg_3 . Tags . CORRELATION_VALUE ) arg_0 . _correlation_value . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . is_oversized ( arg_6 )

Drop a node from the network

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


Question: Update the HyperLogLog with a new data value in bytes . The value will be hashed using the hash function specified by the hashfunc argument in the constructor .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . hashfunc ( arg_1 ) arg_3 = arg_2 & ( arg_0 . m - 1 ) arg_4 = arg_2 >> arg_0 . p arg_0 . reg [ arg_3 ] = max ( arg_0 . reg [ arg_3 ] , arg_0 . _get_rank ( arg_4 ) )


Question: Implements Pulsar Spout s initialize method

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . logger . info ( "Initializing PulsarSpout with the following" ) arg_0 . logger . info ( "Component-specific config: \n%s" % str ( arg_1 ) ) arg_0 . logger . info ( "Context: \n%s" % str ( arg_2 ) ) arg_0 . emit_count = 0 arg_0 . ack_count = 0 arg_0 . fail_count = 0 if not PulsarSpout . serviceUrl in arg_1 or not PulsarSpout . topicName in arg_1 : arg_0 . logger . fatal ( "Need to specify both serviceUrl and topicName" ) arg_0 . pulsar_cluster = str ( arg_1 [ PulsarSpout . serviceUrl ] ) arg_0 . topic = str ( arg_1 [ PulsarSpout . topicName ] ) arg_8 = arg_1 [ api_constants . TOPOLOGY_RELIABILITY_MODE ] if arg_8 == api_constants . TopologyReliabilityMode . ATLEAST_ONCE : arg_0 . acking_timeout = 1000 * int ( arg_1 [ api_constants . TOPOLOGY_MESSAGE_TIMEOUT_SECS ] ) else : arg_0 . acking_timeout = 30000 if PulsarSpout . receiveTimeoutMs in arg_1 : arg_0 . receive_timeout_ms = arg_1 [ PulsarSpout . receiveTimeoutMs ] else : arg_0 . receive_timeout_ms = 10 if PulsarSpout . deserializer in arg_1 : arg_0 . deserializer = arg_1 [ PulsarSpout . deserializer ] if not callable ( arg_0 . deserializer ) : arg_0 . logger . fatal ( "Pulsar Message Deserializer needs to be callable" ) else : arg_0 . deserializer = arg_0 . default_deserializer arg_0 . logConfFileName = GenerateLogConfig ( arg_2 ) arg_0 . logger . info ( "Generated LogConf at %s" % arg_0 . logConfFileName ) arg_0 . client = pulsar . Client ( arg_0 . pulsar_cluster , log_conf_file_path = arg_0 . logConfFileName ) arg_0 . logger . info ( "Setup Client with cluster %s" % arg_0 . pulsar_cluster ) try : arg_0 . consumer = arg_0 . client . subscribe ( arg_0 . topic , arg_2 . get_topology_name ( ) , consumer_type = pulsar . ConsumerType . Failover , unacked_messages_timeout_ms = arg_0 . acking_timeout ) except Exception as e : arg_0 . logger . fatal ( "Pulsar client subscription failed: %s" % str ( e ) ) arg_0 . logger . info ( "Subscribed to topic %s" % arg_0 . topic )

Returns a list of the dicom files within root_path

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

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


Question: Get the basic movie information for a specific movie id .

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

Retrieve public information about a user.

        Args:
            id (str): user identifier to lookup

        Returns:
            SkypeUser: resulting user object


Question: Method to request a PIN from ecobee for authorization

def Func ( arg_0 ) : arg_1 = 'https://api.ecobee.com/authorize' arg_2 = { 'response_type' : 'ecobeePin' , 'client_id' : arg_0 . api_key , 'scope' : 'smartWrite' } try : arg_3 = requests . get ( arg_1 , arg_2 = arg_2 ) except RequestException : logger . warn ( "Error connecting to Ecobee.  Possible connectivity outage." "Could not request pin." ) return arg_0 . authorization_code = arg_3 . json ( ) [ 'code' ] arg_0 . pin = arg_3 . json ( ) [ 'ecobeePin' ] logger . error ( 'Please authorize your ecobee developer app with PIN code ' + arg_0 . pin + '\nGoto https://www.ecobee.com/consumerportal' '/index.html, click\nMy Apps, Add application, Enter Pin' ' and click Authorize.\nAfter authorizing, call request_' 'tokens() method.' )


Question: Return a dict with the raw IPTC data .

def Func ( arg_0 ) : arg_1 = logging . getLogger ( __name__ ) arg_2 = { } arg_3 = { } try : arg_4 = _read_image ( arg_0 ) arg_3 = IptcImagePlugin . getiptcinfo ( arg_4 ) except SyntaxError : arg_1 . info ( 'IPTC Error in %s' , arg_0 ) if arg_3 and ( 2 , 5 ) in arg_3 : arg_2 [ "title" ] = arg_3 [ ( 2 , 5 ) ] . decode ( 'utf-8' , errors = 'replace' ) if arg_3 and ( 2 , 120 ) in arg_3 : arg_2 [ "description" ] = arg_3 [ ( 2 , 120 ) ] . decode ( 'utf-8' , errors = 'replace' ) if arg_3 and ( 2 , 105 ) in arg_3 : arg_2 [ "headline" ] = arg_3 [ ( 2 , 105 ) ] . decode ( 'utf-8' , errors = 'replace' ) return arg_2

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: saves an object to the REST service gets the object s REST location and the data from the object then POSTS the request .

def Func ( arg_0 , arg_1 , arg_2 = "application/xml" ) : arg_3 = arg_1 . href arg_4 = arg_1 . message ( ) arg_5 = { "Content-type" : arg_2 , "Accept" : arg_2 } logger . debug ( "{} {}" . format ( arg_1 . Func_method , arg_1 . href ) ) arg_6 = arg_0 . http_request ( arg_3 , method = arg_1 . Func_method . lower ( ) , arg_4 = arg_4 , arg_5 = arg_5 ) if arg_6 . status_code not in ( 200 , 201 ) : raise FailedRequestError ( 'Failed to Func to Geoserver catalog: {}, {}' . format ( arg_6 . status_code , arg_6 . text ) ) arg_0 . _cache . clear ( ) return arg_6


Question: Uses Heron s formula to find the area of a triangle based on the coordinates of three points .

def Func ( arg_0 , arg_1 , arg_2 ) : """Lengths of the three sides of the triangle""" arg_3 = point_distance ( arg_0 , arg_1 ) arg_4 = point_distance ( arg_0 , arg_2 ) arg_5 = point_distance ( arg_1 , arg_2 ) """Where s is the semiperimeter""" arg_6 = ( arg_3 + arg_4 + arg_5 ) / 2.0 """Return the area of the triangle (using Heron's formula)""" return math . sqrt ( arg_6 * ( arg_6 - arg_3 ) * ( arg_6 - arg_4 ) * ( arg_6 - arg_5 ) )

Add an HTTP header to response object.

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


Question: Literally encodes the plus sign input is a string returns the string with plus signs encoded

def Func ( arg_0 ) : arg_1 = r"\+" arg_2 = re . compile ( arg_1 ) return arg_2 . sub ( "%2B" , arg_0 )

Writes a report from multiple samples.

    Parameters
    ----------
    storage_dic : dict or :py:class:`OrderedDict`
        Storage containing the trimming statistics. See :py:func:`parse_log`
        for its generation.
    output_file : str
        Path where the output file will be generated.
    sample_id : str
        Id or name of the current sample.


Question: This exposes the celery app . The app is actually created as part of the configuration . However this does make the celery app functional as a stand - alone celery application .

def Func ( arg_0 ) : arg_0 . registry . celery_app . conf [ 'pyramid_config' ] = arg_0 return arg_0 . registry . celery_app

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


Question: Function that adds team and opp columns to the features by iterating through the rows in order . A precondition is that the features dicts are in order in a continuous game sense and that all rows are from the same game .

def Func ( arg_0 ) : arg_0 = arg_0 . to_dict ( 'records' ) arg_1 = arg_4 = None arg_2 = False for arg_3 in arg_0 : if arg_3 [ 'isKickoff' ] or arg_2 : arg_1 , arg_4 = _team_and_opp ( arg_3 ) else : arg_1 , arg_4 = _team_and_opp ( arg_3 , arg_1 , arg_4 ) arg_3 [ 'team' ] , arg_3 [ 'opp' ] = arg_1 , arg_4 arg_2 = arg_3 [ 'isKickoff' ] arg_0 = pd . DataFrame ( arg_0 ) arg_0 . team . fillna ( method = 'bfill' , inplace = True ) arg_0 . opp . fillna ( method = 'bfill' , inplace = True ) arg_0 . team . fillna ( method = 'ffill' , inplace = True ) arg_0 . opp . fillna ( method = 'ffill' , inplace = True ) return arg_0

Verify a certificate in a context.

        .. versionadded:: 0.15

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


Question: Restarts the specified virtual machine .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : _validate_not_none ( 'service_name' , arg_1 ) _validate_not_none ( 'deployment_name' , arg_2 ) _validate_not_none ( 'role_name' , arg_3 ) return arg_0 . _perform_post ( arg_0 . _get_role_instance_operations_path ( arg_1 , arg_2 , arg_3 ) , _XmlSerializer . Func_operation_to_xml ( ) , as_async = True )

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


Question: map f over the traversable then fold over the result using the supplied initial element z and operation g defaulting to addition for the latter .

def Func ( arg_0 , arg_1 : arg_2 [ arg_3 ] , arg_4 : arg_5 , arg_6 : arg_7 [ [ arg_3 ] , arg_5 ] , arg_8 : arg_7 [ [ arg_9 , arg_5 ] , arg_9 ] = arg_10 . add ) -> arg_9 : arg_12 = Functor . fatal ( type ( arg_1 ) ) . map ( arg_1 , arg_6 ) return arg_0 . fold_left ( arg_12 ) ( arg_4 ) ( arg_8 )

clearRedisPools - Disconnect all managed connection pools,
		   and clear the connectiobn_pool attribute on all stored managed connection pools.

		   A "managed" connection pool is one where REDIS_CONNECTION_PARAMS does not define the "connection_pool" attribute.
		   If you define your own pools, IndexedRedis will use them and leave them alone.

		  This method will be called automatically after calling setDefaultRedisConnectionParams.

		  Otherwise, you shouldn't have to call it.. Maybe as some sort of disaster-recovery call..


Question: Returns a SettingDict object .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 is None : arg_3 = arg_0 . setting_model . objects . as_dict ( ) else : arg_3 = arg_0 . setting_model . objects . as_dict ( arg_2 = arg_2 ) return arg_3

Randomly crop an image and corresponding keypoints without influence scales, given by ``keypoint_random_resize_shortestedge``.

    Parameters
    -----------
    image : 3 channel image
        The given image for augmentation.
    annos : list of list of floats
        The keypoints annotation of people.
    mask : single channel image or None
        The mask if available.
    size : tuple of int
        The size of returned image.

    Returns
    ----------
    preprocessed image, annotation, mask


Question: Load lexer with content from file which can be a path or a file like object .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , string_types ) : with open ( arg_1 ) as f : arg_0 . lexer . Func ( f . read ( ) ) else : arg_0 . lexer . Func ( arg_1 . read ( ) )

One way to calibrate the band pass is to take the median value
            for every frequency fine channel, and divide by it.


Question: Assigns a parameter value to matching instructions in - place .

def Func ( arg_0 , arg_1 , arg_2 ) : for ( arg_3 , arg_4 ) in arg_0 . _parameter_table [ arg_1 ] : arg_3 . params [ arg_4 ] = arg_2

Returns a decorator to swallow a requests exception for modules that
        are not accessible without logging in, and turn it into an Unavailable
        exception.


Question: Check for conflicts and problems in the options .

def Func ( arg_0 , arg_1 , arg_2 ) : for arg_3 in [ 'erase' , 'execute' ] : for arg_4 in [ 'annotate' , 'html' , 'report' , 'combine' ] : if ( arg_3 in arg_1 . actions ) and ( arg_4 in arg_1 . actions ) : arg_0 . help_fn ( "You can't specify the '%s' and '%s' " "options at the same time." % ( arg_3 , arg_4 ) ) return False if not arg_1 . actions : arg_0 . help_fn ( "You must specify at least one of -e, -x, -c, -r, -a, or -b." ) return False arg_5 = ( 'execute' in arg_1 . actions or 'annotate' in arg_1 . actions or 'html' in arg_1 . actions or 'debug' in arg_1 . actions or 'report' in arg_1 . actions or 'xml' in arg_1 . actions ) if not arg_5 and arg_2 : arg_0 . help_fn ( "Unexpected arguments: %s" % " " . join ( arg_2 ) ) return False if 'execute' in arg_1 . actions and not arg_2 : arg_0 . help_fn ( "Nothing to do." ) return False return True

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


Question: Prepare the entity for execution .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . period_count = arg_2 arg_0 . _exec_year_end_datetime = arg_1 . get_datetime_at_period_ix ( arg_2 ) arg_0 . _prev_year_end_datetime = arg_1 . start_datetime arg_0 . _curr_year_end_datetime = arg_1 . start_datetime + relativedelta ( years = 1 ) del arg_0 . gl . transactions [ : ] for arg_6 in arg_0 . components : arg_6 . Func ( arg_1 , arg_2 ) arg_0 . negative_income_tax_total = 0

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: Initializes profiler with a package .

def Func ( arg_0 , arg_1 ) : arg_0 . profile = arg_0 . profile_package arg_0 . _run_object , arg_4 , arg_0 . _run_args = arg_1 . partition ( ' ' ) arg_0 . _object_name = '%s (package)' % arg_0 . _run_object arg_0 . _replace_sysargs ( )

Reconstruct the given input sequences.

    Args:
      inputs: A batch of image sequences `x_{1:T}` of shape
        `[batch_size, timesteps, height, width, channels]`.
      samples: Number of samples to draw from the latent distributions.
      sample_static: Boolean for whether or not to randomly sample the
        static latent variable `f` from its prior distribution.
      sample_dynamic: Boolean for whether or not to randomly sample the
        dynamic latent variable `z_{1:T}` from its prior distribution.
      swap_static: Boolean for whether or not to swap the encodings for
        the static latent variable `f` between the examples.
      swap_dynamic: Boolean for whether or not to swap the encodings for
        the dynamic latent variable `z_{1:T}` between the examples.
      fix_static: Boolean for whether or not to share the same random
        sample of the static latent variable `f` from its prior across
        all examples.
      fix_dynamic: Boolean for whether or not to share the same random
        sample of the dynamic latent variable `z_{1:T}` from its prior
        across all examples.

    Returns:
      A batched Independent distribution wrapping a set of Normal
      distributions over the pixels of the reconstruction of the input,
      where the Independent distribution has event shape [height, width,
      channels], batch shape [samples, batch_size, timesteps], and
      sample shape [sample_shape, samples, batch_size, timesteps,
      height, width, channels].


Question: Loops if ECX counter is nonzero .

def Func ( arg_0 , arg_1 ) : arg_2 = { 16 : 'CX' , 32 : 'ECX' , 64 : 'RCX' } [ arg_0 . address_bit_size ] arg_3 = arg_0 . write_register ( arg_2 , arg_0 . read_register ( arg_2 ) - 1 ) arg_0 . PC = Operators . ITEBV ( arg_0 . address_bit_size , arg_3 != 0 , ( arg_0 . PC + arg_1 . read ( ) ) & ( ( 1 << arg_1 . size ) - 1 ) , arg_0 . PC + arg_0 . instruction . size )


Question: Update a webhook by ID .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , ** arg_4 ) : check_type ( arg_1 , basestring , may_be_none = False ) check_type ( arg_2 , basestring ) check_type ( arg_3 , basestring ) arg_5 = dict_from_items_with_values ( arg_4 , arg_2 = arg_2 , arg_3 = arg_3 , ) arg_6 = arg_0 . _session . put ( API_ENDPOINT + '/' + arg_1 , json = arg_5 ) return arg_0 . _object_factory ( OBJECT_TYPE , arg_6 )

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: Crop to a new depth range .

def Func ( arg_0 , arg_1 , arg_2 = False ) : try : if arg_1 [ 0 ] is None : arg_1 = ( arg_0 . start . z , arg_1 [ 1 ] ) if arg_1 [ 1 ] is None : arg_1 = ( arg_1 [ 0 ] , arg_0 . stop . z ) except : arg_3 = "You must provide a 2-tuple for the new extents. Use None for" arg_3 += " the existing start or stop." raise StriplogError ( arg_3 ) arg_4 = arg_0 . read_at ( arg_1 [ 0 ] , index = True ) arg_5 = arg_0 . read_at ( arg_1 [ 1 ] , index = True ) arg_6 = arg_0 [ arg_4 ] . split_at ( arg_1 [ 0 ] ) [ 1 ] arg_7 = arg_0 [ arg_5 ] . split_at ( arg_1 [ 1 ] ) [ 0 ] arg_8 = arg_0 . __list [ arg_4 : arg_5 + 1 ] . copy ( ) arg_8 [ 0 ] = arg_6 arg_8 [ - 1 ] = arg_7 if arg_2 : return Striplog ( arg_8 ) else : arg_0 . __list = arg_8 return

Overriding the default JSONEncoder.default for NDB support.


Question: Get all combo box item

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . _get_object_handle ( arg_1 , arg_2 ) if not arg_3 . AXEnabled : raise LdtpServerException ( u"Object %s state disabled" % arg_2 ) arg_3 . Press ( ) arg_0 . wait ( 1 ) arg_4 = None try : if not arg_3 . AXChildren : raise LdtpServerException ( u"Unable to find menu" ) arg_5 = arg_3 . AXChildren [ 0 ] if not arg_5 : raise LdtpServerException ( u"Unable to find menu" ) arg_5 = arg_5 . AXChildren arg_6 = [ ] for arg_4 in arg_5 : arg_7 = arg_0 . _get_title ( arg_4 ) if arg_7 : arg_6 . append ( arg_7 ) finally : if arg_4 : arg_4 . Cancel ( ) return arg_6

Show Program Landing page for the Enterprise's Program.

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

        Unauthenticated learners will be redirected to enterprise-linked SSO.

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


Question: since the user needs a job id and other parameters save this for them .

def Func ( arg_0 ) : arg_1 = { 'SREGISTRY_GITLAB_FOLDER' : arg_0 . artifacts , 'api_base' : arg_0 . api_base , 'SREGISTRY_GITLAB_BASE' : arg_0 . base , 'SREGISTRY_GITLAB_JOB' : arg_0 . job } return arg_1

Compares and exchanges.

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

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

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

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


Question: Uploads file from given url and returns FileFromUrl instance .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : if arg_2 is None : arg_2 = 'auto' elif arg_2 : arg_2 = '1' else : arg_2 = '0' arg_4 = { 'source_url' : arg_1 , 'store' : arg_2 , } if arg_3 : arg_4 [ 'filename' ] = arg_3 arg_5 = uploading_request ( 'POST' , 'from_url/' , arg_4 = arg_4 ) if 'token' not in arg_5 : raise APIError ( 'could not find token in result: {0}' . format ( arg_5 ) ) arg_6 = arg_0 . FileFromUrl ( arg_5 [ 'token' ] ) return arg_6

Attach an observer.

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

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


Question: self . parsed_data - > self . config parse unrecognized extra args via KVLoader .

def Func ( arg_0 ) : if '_flags' in arg_0 . parsed_data : arg_1 = arg_0 . parsed_data . _flags del arg_0 . parsed_data . _flags else : arg_1 = [ ] for arg_2 , arg_3 in vars ( arg_0 . parsed_data ) . iteritems ( ) : if arg_3 is None : arg_1 . append ( arg_0 . alias_flags [ arg_2 ] ) else : arg_0 . _exec_config_str ( arg_2 , arg_3 ) for arg_4 in arg_1 : arg_0 . _load_flag ( arg_4 ) if arg_0 . extra_args : arg_5 = KeyValueConfigLoader ( ) arg_5 . load_config ( arg_0 . extra_args ) arg_0 . config . _merge ( arg_5 . config ) arg_0 . extra_args = arg_5 . extra_args

Set the value,bounds,free,errors based on corresponding kwargs

        The invokes hooks for type-checking and bounds-checking that
        may be implemented by sub-classes.


Question: Format a paragraph of free - form text for inclusion in the help output at the current indentation level .

def Func ( arg_0 , arg_1 ) : arg_2 = max ( arg_0 . width - arg_0 . current_indent , 11 ) arg_3 = " " * arg_0 . current_indent return textwrap . fill ( arg_1 , arg_2 , initial_indent = arg_3 , subsequent_indent = arg_3 )

A utility function that creates a list of enumeration values from a bit
    mask for a specific mask enumeration class.

    Args:
        enumeration (class): The enumeration class from which to draw
            enumeration values.
        mask (int): The bit mask from which to identify enumeration values.

    Returns:
        list: A list of enumeration values corresponding to the bit mask.


Question: Actual method to read celery settings from app configuration and initialize the celery instance .

def Func ( arg_0 , arg_1 ) : arg_2 . _register_app = arg_0 . original_register_app if not hasattr ( arg_1 , 'extensions' ) : arg_1 . extensions = dict ( ) if 'celery' in arg_1 . extensions : raise ValueError ( 'Already registered extension CELERY.' ) arg_1 . extensions [ 'celery' ] = _CeleryState ( arg_0 , arg_1 ) super ( Celery , arg_0 ) . __init__ ( arg_1 . import_name , broker = arg_1 . config [ 'CELERY_BROKER_URL' ] ) if 'CELERY_RESULT_BACKEND' in arg_1 . config : arg_0 . _preconf [ 'CELERY_RESULT_BACKEND' ] = arg_1 . config [ 'CELERY_RESULT_BACKEND' ] arg_0 . conf . update ( arg_1 . config ) arg_6 = arg_0 . Task class ContextTask ( arg_6 ) : def __call__ ( arg_0 , * arg_7 , ** arg_8 ) : with arg_1 . app_context ( ) : return arg_6 . __call__ ( arg_0 , * arg_7 , ** arg_8 ) setattr ( ContextTask , 'abstract' , True ) setattr ( arg_0 , 'Task' , ContextTask )


Question: r Interface for drawing a 2D image of the molecule . Requires an HTML5 browser and the libraries RDKit and IPython . An exception is raised if either of these libraries is absent .

def Func ( arg_0 , arg_1 = 300 , arg_2 = 300 , arg_3 = False ) : try : from rdkit . Chem import Draw from rdkit . Chem . Draw import IPythonConsole if arg_3 : arg_4 = arg_0 . rdkitmol_Hs else : arg_4 = arg_0 . rdkitmol return Draw . MolToImage ( arg_4 , size = ( arg_1 , arg_2 ) ) except : return 'Rdkit is required for this feature.'

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


Question: Sends a json GCM message

def Func ( arg_0 , arg_1 = None ) : arg_2 = arg_1 or arg_0 . _registration_id arg_3 = { "registration_ids" : arg_2 } if arg_0 . _data is not None : arg_3 [ "data" ] = arg_0 . _data for arg_4 , arg_5 in arg_0 . _kwargs . items ( ) : if arg_5 : arg_3 [ arg_4 ] = arg_5 arg_6 = json . dumps ( arg_3 , separators = ( "," , ":" ) , sort_keys = True ) . encode ( arg_0 . encoding ) arg_7 = json . loads ( arg_0 . _send ( arg_6 , "application/json" ) ) if ( "failure" in arg_7 ) and ( arg_7 [ "failure" ] ) : arg_8 = [ ] arg_9 = False for arg_10 , arg_11 in enumerate ( arg_7 . get ( "results" , [ ] ) ) : arg_11 = arg_11 . get ( "error" , "" ) if arg_11 in ( "NotRegistered" , "InvalidRegistration" ) : arg_8 . append ( arg_2 [ arg_10 ] ) elif arg_11 != "" : arg_9 = True arg_0 . deactivate_unregistered_devices ( arg_8 ) if arg_9 : raise GCMPushError ( arg_7 ) return arg_7

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

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


Question: Handle authenticated POST requests

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_1 = urljoin ( arg_0 . base_url , arg_1 ) try : arg_3 = arg_0 . _make_request ( ** dict ( method = 'POST' , arg_1 = arg_1 , json = arg_2 , auth = arg_0 . auth , timeout = arg_0 . timeout , hooks = arg_0 . request_hooks , headers = arg_0 . request_headers ) ) except requests . exceptions . RequestException as e : raise e else : if arg_3 . status_code >= 400 : try : arg_4 = arg_3 . json ( ) except ValueError : arg_4 = { "response" : arg_3 } raise MailChimpError ( arg_4 ) if arg_3 . status_code == 204 : return None return arg_3 . json ( )

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

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