Question: Return True if the affine matrix of one_img is close to the affine matrix of another_img . False otherwise .

def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_3 = check_img ( arg_0 ) arg_4 = check_img ( arg_1 ) arg_5 = len ( arg_3 . shape ) arg_6 = len ( arg_4 . shape ) if arg_5 < 3 : raise ValueError ( 'Image {} has only {} dimensions, at least 3 dimensions is expected.' . format ( repr_imgs ( arg_3 ) , arg_5 ) ) if arg_6 < 3 : raise ValueError ( 'Image {} has only {} dimensions, at least 3 dimensions is expected.' . format ( repr_imgs ( arg_4 ) , arg_5 ) ) arg_7 = arg_3 . get_affine ( ) arg_8 = arg_4 . get_affine ( ) if arg_2 : arg_7 = arg_7 [ : 3 , : 3 ] arg_8 = arg_8 [ : 3 , : 3 ] try : return np . allclose ( arg_7 , arg_8 ) except ValueError : return False except : raise


Question: Clone throttles without memory

def Func ( arg_0 ) : return StreamThrottle ( read = arg_0 . read . Func ( ) , write = arg_0 . write . Func ( ) )

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: Register a new range type as a PostgreSQL range .

def Func ( arg_0 , arg_1 , arg_2 ) : register_adapter ( arg_1 , partial ( adapt_range , arg_0 ) ) register_range_caster ( arg_0 , arg_1 , * query_range_oids ( arg_0 , arg_2 ) , scope = arg_2 )

Removes the specfied course from the specified organization


Question: r Input string format of class x y w h return list of list format .

def Func ( arg_0 ) : arg_0 = arg_0 . split ( "\n" ) arg_1 = [ ] for arg_2 in arg_0 : arg_2 = arg_2 . split ( ) if len ( arg_2 ) == 5 : for arg_3 , arg_4 in enumerate ( arg_2 ) : if arg_3 == 0 : arg_2 [ arg_3 ] = int ( arg_2 [ arg_3 ] ) else : arg_2 [ arg_3 ] = float ( arg_2 [ arg_3 ] ) arg_1 . append ( arg_2 ) return arg_1

Turn a mongodb-style search dict into an SQL query.


Question: Write output to the port and wait for response

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_0 . __writeln ( arg_1 ) arg_0 . _port . flush ( ) return arg_0 . __expect ( arg_2 = arg_2 or arg_0 . _timeout )

Load a default value for redshift from config and set it as the redshift for source or lens galaxies that have
    falsey redshifts

    Parameters
    ----------
    key: str

    Returns
    -------
    decorator
        A decorator that wraps the setter function to set defaults


Question: Check to see if the type is either in TYPES or fits type name

def Func ( arg_0 , arg_1 ) : if arg_1 in TYPES : return arg_1 arg_2 = dict ( zip ( TYPES , TYPES ) ) arg_2 . update ( { 'line' : 'lc' , 'bar' : 'bvs' , 'pie' : 'p' , 'venn' : 'v' , 'scater' : 's' , 'radar' : 'r' , 'meter' : 'gom' , } ) assert arg_1 in arg_2 , 'Invalid chart type: %s' % arg_1 return arg_2 [ arg_1 ]

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


Question: Translate characters from lower to upper case for a particular column .

def Func ( arg_0 ) : return H2OFrame . _expr ( expr = ExprNode ( "Func" , arg_0 ) , cache = arg_0 . _ex . _cache )


Question: Adds the item to the control associating the given data if not None .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_0 . wx_obj . Append ( arg_1 , arg_2 ) arg_0 . _items_dict [ arg_2 ] = arg_1

Input validation for standard estimators.

    Checks X and y for consistent length, enforces X 2d and y 1d.
    Standard input checks are only applied to y. For multi-label y,
    set multi_ouput=True to allow 2d and sparse y.

    Parameters
    ----------
    X : nd-array, list or sparse matrix
        Input data.

    y : nd-array, list or sparse matrix
        Labels.

    accept_sparse : string, list of string or None (default=None)
        String[s] representing allowed sparse matrix formats, such as 'csc',
        'csr', etc.  None means that sparse matrix input will raise an error.
        If the input is sparse but not in the allowed format, it will be
        converted to the first listed format.

    order : 'F', 'C' or None (default=None)
        Whether an array will be forced to be fortran or c-style.

    copy : boolean (default=False)
        Whether a forced copy will be triggered. If copy=False, a copy might
        be triggered by a conversion.

    force_all_finite : boolean (default=True)
        Whether to raise an error on np.inf and np.nan in X.

    ensure_2d : boolean (default=True)
        Whether to make X at least 2d.

    allow_nd : boolean (default=False)
        Whether to allow X.ndim > 2.

    Returns
    -------
    X_converted : object
        The converted and validated X.


Question: Add single file or list of files to bundle

def Func ( arg_0 , * arg_1 ) : for arg_2 in arg_1 : arg_0 . files . append ( FilePath ( arg_2 , arg_0 ) )

Fetch jobIDs for jobs in the table with optional fields given a
    specific clientInfo


Question: Use requests to fetch remote content

def Func ( arg_0 , arg_1 ) : try : arg_2 = requests . get ( arg_1 ) except requests . ConnectionError : raise exceptions . RetrieveError ( 'Connection fail' ) if arg_2 . status_code >= 400 : raise exceptions . RetrieveError ( 'Connected, but status code is %s' % ( arg_2 . status_code ) ) arg_3 = arg_2 . url arg_4 = arg_2 . content try : arg_5 = arg_2 . headers [ 'Content-Type' ] except KeyError : arg_5 , arg_6 = mimetypes . guess_type ( arg_3 , strict = False ) arg_0 . response = arg_2 return arg_5 . lower ( ) , arg_4

bind user variable to `_wrapped`

        .. note::

            you don't need call this method by yourself.

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

        .. expection::

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

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


Question: Apply incoming filters only if user is staff . If not only filter by user s ID .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if arg_1 . user . is_staff : arg_4 = arg_1 . query_params . get ( 'email' , None ) arg_5 = arg_1 . query_params . get ( 'username' , None ) arg_6 = { } if arg_4 : arg_6 . update ( arg_4 = arg_4 ) if arg_5 : arg_6 . update ( arg_5 = arg_5 ) if arg_6 : arg_7 = User . objects . filter ( ** arg_6 ) . values_list ( 'id' , flat = True ) arg_2 = arg_2 . filter ( user_id__in = arg_7 ) else : arg_2 = arg_2 . filter ( user_id = arg_1 . user . id ) return arg_2

Write the index.html file for this report.


Question: Calculate an ACMG classification based on a list of criteria .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : arg_6 , arg_7 = institute_and_case ( arg_0 , arg_1 , arg_2 ) arg_8 = arg_0 . variant ( arg_3 ) arg_9 = arg_0 . user ( arg_4 ) arg_10 = url_for ( 'variants.variant' , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 ) arg_11 = arg_0 . submit_evaluation ( arg_6 = arg_6 , arg_7 = arg_7 , arg_8 = arg_8 , arg_9 = arg_9 , link = arg_10 , arg_5 = arg_5 , ) return arg_11

Generate RENEWING time.

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

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


Question: Flips the negative eigenvalues of X .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = arg_1 . shape [ 0 ] if arg_1 . shape != ( arg_3 , arg_3 ) : raise TypeError ( "Input must be a square matrix." ) arg_4 = get_memory ( arg_0 . memory ) arg_5 = not arg_0 . copy and arg_0 . negatives_likely arg_6 , arg_7 = arg_4 . cache ( scipy . linalg . eigh , ignore = [ 'overwrite_a' ] ) ( arg_1 , overwrite_a = arg_5 ) arg_6 = arg_6 [ : , None ] arg_0 . clip_ = np . dot ( arg_7 , np . sign ( arg_6 ) * arg_7 . T ) if arg_5 or arg_6 [ 0 , 0 ] < 0 : del arg_1 np . abs ( arg_6 , out = arg_6 ) arg_1 = np . dot ( arg_7 , arg_6 * arg_7 . T ) del arg_6 , arg_7 arg_1 = Symmetrize ( copy = False ) . Func ( arg_1 ) return arg_1


Question: Geometric function using cylindrical coordinates .

def Func ( arg_0 , arg_1 = 'r' , arg_2 = 'theta' , arg_3 = 'z' ) : arg_4 = 'sqrt(x^2+y^2)' if isinstance ( arg_0 , FilterScript ) and arg_0 . ml_version >= '2016.12' : arg_5 = 'atan2(y, x)' else : arg_5 = mp_func . mp_atan2 ( 'y' , 'x' ) arg_1 = re . sub ( r"\br\b" , arg_4 , arg_1 ) . replace ( 'theta' , arg_5 ) arg_2 = re . sub ( r"\br\b" , arg_4 , arg_2 ) . replace ( 'theta' , arg_5 ) arg_3 = re . sub ( r"\br\b" , arg_4 , arg_3 ) . replace ( 'theta' , arg_5 ) arg_6 = '(r)*cos(theta)' . replace ( 'r' , arg_1 ) . replace ( 'theta' , arg_2 ) arg_7 = '(r)*sin(theta)' . replace ( 'r' , arg_1 ) . replace ( 'theta' , arg_2 ) vert_function ( arg_0 , arg_6 , arg_7 , arg_3 ) return None

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Makes a pretty and easy - to - doctest string representation!

def Func ( arg_0 , ** arg_1 ) : arg_2 = arg_1 . get ( 'extensions' , None ) arg_3 = arg_1 . get ( '_return_info' , False ) arg_1 [ '_root_info' ] = _rectify_root_info ( arg_1 . get ( '_root_info' , None ) ) arg_4 = None arg_5 = None if arg_2 : arg_6 = arg_2 . lookup ( arg_0 ) if arg_6 is not None : arg_4 = arg_6 ( arg_0 , ** arg_1 ) if arg_4 is None : if isinstance ( arg_0 , dict ) : arg_4 , arg_5 = _format_dict ( arg_0 , ** arg_1 ) elif isinstance ( arg_0 , ( list , tuple , set , frozenset ) ) : arg_4 , arg_5 = _format_list ( arg_0 , ** arg_1 ) if arg_4 is None : arg_6 = _FORMATTER_EXTENSIONS . lookup ( arg_0 ) if arg_6 is not None : arg_4 = arg_6 ( arg_0 , ** arg_1 ) else : arg_4 = _format_object ( arg_0 , ** arg_1 ) if arg_3 : arg_5 = _rectify_leaf_info ( arg_5 ) return arg_4 , arg_5 else : return arg_4


Question: Expand all reactions to simple subject - predicate - object networks .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 = True ) -> None : for arg_4 , arg_5 , arg_6 in list ( arg_0 . edges ( data = True ) ) : if CITATION not in arg_6 and arg_2 : _reaction_cartesion_expansion_unqualified_helper ( arg_0 , arg_4 , arg_5 , arg_6 ) continue if isinstance ( arg_4 , Reaction ) and isinstance ( arg_5 , Reaction ) : arg_7 = _get_catalysts_in_reaction ( arg_4 ) | _get_catalysts_in_reaction ( arg_5 ) for arg_8 , arg_9 in chain ( itt . product ( arg_4 . reactants , arg_4 . products ) , itt . product ( arg_5 . reactants , arg_5 . products ) ) : if arg_8 in arg_7 or arg_9 in arg_7 : continue arg_0 . add_increases ( arg_8 , arg_9 , citation = arg_6 . get ( CITATION ) , evidence = arg_6 . get ( EVIDENCE ) , annotations = arg_6 . get ( ANNOTATIONS ) , ) for arg_9 , arg_8 in itt . product ( arg_4 . products , arg_4 . reactants ) : if arg_8 in arg_7 or arg_9 in arg_7 : continue arg_0 . add_qualified_edge ( arg_9 , arg_8 , relation = arg_6 [ RELATION ] , citation = arg_6 . get ( CITATION ) , evidence = arg_6 . get ( EVIDENCE ) , annotations = arg_6 . get ( ANNOTATIONS ) , ) elif isinstance ( arg_4 , Reaction ) : arg_7 = _get_catalysts_in_reaction ( arg_4 ) for arg_9 in arg_4 . products : if arg_9 in arg_7 : continue if arg_5 not in arg_4 . products and arg_5 not in arg_4 . reactants : arg_0 . add_increases ( arg_9 , arg_5 , citation = arg_6 . get ( CITATION ) , evidence = arg_6 . get ( EVIDENCE ) , annotations = arg_6 . get ( ANNOTATIONS ) , ) for arg_8 in arg_4 . reactants : arg_0 . add_increases ( arg_8 , arg_9 , citation = arg_6 . get ( CITATION ) , evidence = arg_6 . get ( EVIDENCE ) , annotations = arg_6 . get ( ANNOTATIONS ) , ) elif isinstance ( arg_5 , Reaction ) : for arg_8 in arg_5 . reactants : arg_7 = _get_catalysts_in_reaction ( arg_5 ) if arg_8 in arg_7 : continue if arg_4 not in arg_5 . products and arg_4 not in arg_5 . reactants : arg_0 . add_increases ( arg_4 , arg_8 , citation = arg_6 . get ( CITATION ) , evidence = arg_6 . get ( EVIDENCE ) , annotations = arg_6 . get ( ANNOTATIONS ) , ) for arg_9 in arg_5 . products : arg_0 . add_increases ( arg_8 , arg_9 , citation = arg_6 . get ( CITATION ) , evidence = arg_6 . get ( EVIDENCE ) , annotations = arg_6 . get ( ANNOTATIONS ) , ) _remove_reaction_nodes ( arg_0 )

Return the metadata for the specified course run.

        The course run needs to be included in the specified EnterpriseCustomerCatalog
        in order for metadata to be returned from this endpoint.


Question: Returns usage string with no trailing whitespace .

def Func ( arg_0 = arg_1 . path . basename ( arg_4 . argv [ 0 ] ) ) : arg_6 = ' ' * len ( 'usage: ' ) arg_7 = arg_0 + ' -b LIST [-S SEPARATOR] [file ...]\n' + arg_6 + arg_0 + ' -c LIST [-S SEPERATOR] [file ...]\n' + arg_6 + arg_0 + ' -f LIST [-d DELIM] [-e] [-S SEPERATOR] [-s] [file ...]' return "usage: " + arg_7 . rstrip ( )

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


Question: Create error response for the any non - error presence stanza .

def Func ( arg_0 , arg_1 ) : if arg_0 . stanza_type == "error" : raise ValueError ( "Errors may not be generated in response" " to errors" ) arg_2 = Presence ( stanza_type = "error" , from_jid = arg_0 . from_jid , to_jid = arg_0 . to_jid , stanza_id = arg_0 . stanza_id , status = arg_0 . _status , show = arg_0 . _show , priority = arg_0 . _priority , error_cond = arg_1 ) if arg_0 . _payload is None : arg_0 . decode_payload ( ) for arg_3 in arg_0 . _payload : arg_2 . add_payload ( arg_3 ) return arg_2

Initialize lookup table for string input of LCD fields


Question: Returns a DataFrame of offensive team splits for a season .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_year_doc ( '{}_splits' . format ( arg_1 ) ) arg_3 = arg_2 ( 'table.stats_table' ) arg_4 = [ sportsref . utils . parse_table ( table ) for table in arg_3 . items ( ) ] arg_4 = [ df . assign ( split = df . columns [ 0 ] ) . rename ( columns = { df . columns [ 0 ] : 'split_value' } ) for df in arg_4 ] if not arg_4 : return pd . DataFrame ( ) return pd . concat ( arg_4 ) . reset_index ( drop = True )

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

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


Question: Parse command line arguments

def Func ( ) : arg_0 = argparse . ArgumentParser ( add_help = False ) arg_0 . add_argument ( '-g' , '--debug' , dest = 'debug' , action = 'store_true' , help = argparse . SUPPRESS ) arg_0 . add_argument ( "--arthur" , action = 'store_true' , dest = 'arthur' , help = "Enable arthur to collect raw data" ) arg_0 . add_argument ( "--raw" , action = 'store_true' , dest = 'raw' , help = "Activate raw task" ) arg_0 . add_argument ( "--enrich" , action = 'store_true' , dest = 'enrich' , help = "Activate enrich task" ) arg_0 . add_argument ( "--identities" , action = 'store_true' , dest = 'identities' , help = "Activate merge identities task" ) arg_0 . add_argument ( "--panels" , action = 'store_true' , dest = 'panels' , help = "Activate panels task" ) arg_0 . add_argument ( "--cfg" , dest = 'cfg_path' , help = "Configuration file path" ) arg_0 . add_argument ( "--backends" , dest = 'backend_sections' , default = [ ] , nargs = '*' , help = "Backend sections to execute" ) if len ( sys . argv ) == 1 : arg_0 . print_help ( ) sys . exit ( 1 ) return arg_0

Prepare received data for representation.

        Args:
            data (dict): values to represent (ex. {'001' : 130})
            number_to_keep (int): number of elements to show individually.

        Returns:
            dict: processed data to show.


Question: Deal with the first walks by joining profiles to other stops within walking distance .

def Func ( arg_0 ) : for arg_1 , arg_2 in arg_0 . _stop_profiles . items ( ) : assert ( isinstance ( arg_2 , NodeProfileMultiObjective ) ) arg_3 = [ ] arg_4 = [ ] arg_5 = [ ] if arg_2 . get_walk_to_target_duration ( ) != 0 and arg_1 in arg_0 . _walk_network . node : arg_6 = networkx . all_neighbors ( arg_0 . _walk_network , arg_1 ) for arg_7 in arg_6 : arg_8 = arg_0 . _stop_profiles [ arg_7 ] assert ( isinstance ( arg_8 , NodeProfileMultiObjective ) ) arg_9 = arg_8 . get_labels_for_real_connections ( ) arg_3 . append ( arg_9 ) arg_4 . append ( int ( arg_0 . _walk_network . get_edge_data ( arg_1 , arg_7 ) [ "d_walk" ] / arg_0 . _walk_speed ) ) arg_5 . append ( ( arg_1 , arg_7 ) ) arg_2 . finalize ( arg_3 , arg_4 , arg_5 )

Adds headers to the request

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

        Returns:
            The request builder instance in order to chain calls


Question: Check if number or constant is power of two

def Func ( arg_0 ) -> bool : if not isinstance ( arg_0 , int ) : arg_0 = int ( arg_0 ) return arg_0 != 0 and ( ( arg_0 & ( arg_0 - 1 ) ) == 0 )

Runs Picard MarkDuplicates on a BAM file. Requires that the BAM file be coordinate sorted.

    :param JobFunctionWrappingJob job: passed automatically by Toil
    :param str bam: FileStoreID for BAM file
    :param str bai: FileStoreID for BAM index file
    :param str validation_stringency: BAM file validation stringency, default is LENIENT
    :return: FileStoreIDs for BAM and BAI files
    :rtype: tuple


Question: Create the thumbnail for html output

def Func ( arg_0 ) : arg_1 = arg_0 . copy_thumbnail_figure ( ) if arg_1 is not None : if isinstance ( arg_1 , six . string_types ) : arg_2 = arg_1 else : arg_2 = arg_0 . pictures [ arg_1 ] arg_0 . save_thumbnail ( arg_2 ) else : for arg_2 in arg_0 . pictures [ : : - 1 ] : if arg_2 . endswith ( 'png' ) : arg_0 . save_thumbnail ( arg_2 ) return

Read attribute from sysfs and return as string


Question: Applies a Householder rotation to samples .

def Func ( arg_0 , arg_1 ) : arg_2 = ( tf . compat . dimension_value ( arg_0 . event_shape [ 0 ] ) or arg_0 . _event_shape_tensor ( ) [ 0 ] ) arg_3 = tf . concat ( [ [ 1. ] , tf . zeros ( [ arg_2 - 1 ] , dtype = arg_0 . dtype ) ] , axis = 0 ) , arg_4 = tf . nn . l2_normalize ( arg_3 - arg_0 . mean_direction , axis = - 1 ) return arg_1 - 2 * tf . reduce_sum ( input_tensor = arg_1 * arg_4 , axis = - 1 , keepdims = True ) * arg_4


Question: Returns the mean length of the sequences in the input file . By default uses all sequences . To limit to the first N sequences use limit = N

def Func ( arg_0 , arg_1 = None ) : arg_2 = 0 arg_3 = 0 arg_4 = sequences . file_reader ( arg_0 ) for arg_5 in arg_4 : arg_2 += len ( arg_5 ) arg_3 += 1 if arg_1 is not None and arg_3 >= arg_1 : break assert arg_3 > 0 return arg_2 / arg_3

Generate RENEWING time.

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

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


Question: Parse date and time from given date string .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None ) : arg_6 = _default_Funcr if any ( [ arg_2 , arg_3 , arg_4 , not arg_5 . _default ] ) : arg_6 = DateDataParser ( arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 ) arg_7 = arg_6 . get_date_data ( arg_0 , arg_1 ) if arg_7 : return arg_7 [ 'date_obj' ]

Unregister an extension code.  For testing only.


Question: Create a hash of the task inputs .

def Func ( arg_0 , arg_1 ) : arg_2 = [ serialize_object ( arg_1 [ 'func_name' ] ) [ 0 ] , serialize_object ( arg_1 [ 'fn_hash' ] ) [ 0 ] , serialize_object ( arg_1 [ 'args' ] ) [ 0 ] , serialize_object ( arg_1 [ 'kwargs' ] ) [ 0 ] , serialize_object ( arg_1 [ 'env' ] ) [ 0 ] ] arg_3 = b'' . join ( arg_2 ) arg_4 = hashlib . md5 ( arg_3 ) . hexdigest ( ) return arg_4

True if the credential is expired or invalid.

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


Question: Returns a texture to be used as a placeholder for missing textures . A default missing texture file is provided in the assets folder of the source distribution . It consists of a simple checkerboard pattern of purple and black this image may be copied to any project using peng3d for similar behavior . If this texture cannot be found a pattern is created in - memory simply a solid square of purple . This texture will also be cached separately from other textures .

def Func ( arg_0 ) : if arg_0 . missingTexture is None : if arg_0 . resourceExists ( arg_0 . missingtexturename , ".png" ) : arg_0 . missingTexture = pyglet . image . load ( arg_0 . resourceNameToPath ( arg_0 . missingtexturename , ".png" ) ) return arg_0 . missingTexture else : arg_0 . missingTexture = pyglet . image . create ( 1 , 1 , pyglet . image . SolidColorImagePattern ( [ 255 , 0 , 255 , 255 ] ) ) return arg_0 . missingTexture else : return arg_0 . missingTexture


Question: ensures all workers and management thread are running

def Func ( arg_0 ) : with arg_0 . _processes_management_lock : if len ( arg_0 . _processes ) != arg_0 . _max_workers : arg_0 . _adjust_process_count ( ) arg_0 . _start_queue_management_thread ( )

Parse a hub key into a dictionary of component parts

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


Question: Filter sqMass files

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : Func_sqmass ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 )

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


Question: Retrieve the data from the database .

def Func ( arg_0 ) : if arg_0 . _authorization ( ) and "whois_db" not in arg_1 . INTERN : if arg_1 . path . isfile ( arg_0 . whois_db_path ) : arg_1 . INTERN [ "whois_db" ] = Dict ( ) . from_json ( File ( arg_0 . whois_db_path ) . read ( ) ) else : arg_1 . INTERN [ "whois_db" ] = { }

Return an open file-object to the index file


Question: Write data into output format .

def Func ( arg_0 , arg_1 , arg_2 ) : if isinstance ( arg_1 , tuple ) : arg_1 = arg_0 . config . process_pyramid . tile ( * arg_1 ) elif not isinstance ( arg_1 , BufferedTile ) : raise ValueError ( "invalid process_tile type: %s" % type ( arg_1 ) ) if arg_0 . config . mode not in [ "continue" , "overFunc" ] : raise ValueError ( "cannot Func output in current process mode" ) if arg_0 . config . mode == "continue" and ( arg_0 . config . output . tiles_exist ( arg_1 ) ) : arg_3 = "output exists, not overwritten" logger . debug ( ( arg_1 . id , arg_3 ) ) return ProcessInfo ( tile = arg_1 , processed = False , process_msg = None , written = False , Func_msg = arg_3 ) elif arg_2 is None : arg_3 = "output empty, nothing written" logger . debug ( ( arg_1 . id , arg_3 ) ) return ProcessInfo ( tile = arg_1 , processed = False , process_msg = None , written = False , Func_msg = arg_3 ) else : with Timer ( ) as t : arg_0 . config . output . Func ( arg_1 = arg_1 , arg_2 = arg_2 ) arg_3 = "output written in %s" % t logger . debug ( ( arg_1 . id , arg_3 ) ) return ProcessInfo ( tile = arg_1 , processed = False , process_msg = None , written = True , Func_msg = arg_3 )

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: Parse a dataframe with ensembl gene information

def Func ( arg_0 ) : LOG . info ( "Parsing genes from request" ) for arg_1 , arg_2 in arg_0 . iterrows ( ) : arg_3 = { } if type ( arg_2 [ 'hgnc_symbol' ] ) is float : continue arg_3 [ 'chrom' ] = arg_2 [ 'chromosome_name' ] arg_3 [ 'gene_start' ] = int ( arg_2 [ 'start_position' ] ) arg_3 [ 'gene_end' ] = int ( arg_2 [ 'end_position' ] ) arg_3 [ 'ensembl_gene_id' ] = arg_2 [ 'ensembl_gene_id' ] arg_3 [ 'hgnc_symbol' ] = arg_2 [ 'hgnc_symbol' ] arg_4 = arg_2 [ 'hgnc_id' ] if type ( arg_4 ) is float : arg_4 = int ( arg_4 ) else : arg_4 = int ( arg_4 . split ( ':' ) [ - 1 ] ) arg_3 [ 'hgnc_id' ] = arg_4 yield arg_3

Generate RENEWING time.

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

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


Question: Post a message .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_campfire ( ) if not isinstance ( arg_1 , Message ) : arg_1 = Message ( arg_2 , arg_1 ) arg_3 = arg_0 . _connection . post ( "room/%s/Func" % arg_0 . id , { "message" : arg_1 . get_data ( ) } , parse_data = True , key = "message" ) if arg_3 [ "success" ] : return Message ( arg_2 , arg_3 [ "data" ] ) return arg_3 [ "success" ]

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: This function hides the error message when all values are correct .

def Func ( arg_0 ) : arg_0 . ui . error_label . setScaledContents ( False ) arg_0 . ui . error_text_label . hide ( )

Create an excel sheet ready to be used in SPIA software.

    :param graph: BELGraph
    :return: dictionary with matrices


Question: Save a state to storage .

def Func ( arg_0 , arg_1 , arg_2 ) : with arg_0 . save_stream ( arg_2 , binary = True ) as f : arg_0 . _serializer . serialize ( arg_1 , f )


Question: Parse the genotype calls for a variant

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

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


Question: Retrieves the cached local renderer .

def Func ( arg_0 ) : if not arg_0 . _Func : arg_1 = arg_0 . create_Func ( ) arg_0 . _Func = arg_1 return arg_0 . _Func

Prepares the hash sponge for the generator.


Question: Configures redirect URI parameters for OAuth2WebServerFlow .

def Func ( arg_0 ) : arg_1 = { 'access_type' : 'offline' , 'response_type' : 'code' , } arg_1 . update ( arg_0 ) arg_2 = arg_1 . get ( 'approval_prompt' ) if arg_2 is not None : logger . warning ( 'The approval_prompt parameter for OAuth2WebServerFlow is ' 'deprecated. Please use the prompt parameter instead.' ) if arg_2 == 'force' : logger . warning ( 'approval_prompt="force" has been adjusted to ' 'prompt="consent"' ) arg_1 [ 'prompt' ] = 'consent' del arg_1 [ 'approval_prompt' ] return arg_1

Extracts start row from the bookmark information


Question: Accept a raw uri and return rewritten versions .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 == job_model . P_GCS : arg_3 , arg_4 = _gcs_uri_rewriter ( arg_1 ) elif arg_2 == job_model . P_LOCAL : arg_3 , arg_4 = _local_uri_rewriter ( arg_1 ) else : raise ValueError ( 'File provider not supported: %r' % arg_2 ) return arg_3 , os . path . join ( arg_0 . _relative_path , arg_4 )

Serial command to set seasons table.

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

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

        Returns:
            bool: True on completion and ACK.


Question: Flexible writing where f can be a filename or f object if filename closed after writing

def Func ( arg_0 , arg_1 ) : if hasattr ( arg_0 , 'write' ) : yield arg_0 else : arg_0 = open ( arg_0 , arg_1 ) yield arg_0 arg_0 . close ( )

Returns protobuf mapcontainer. Read from translation file.


Question: Handle the retrieval of the code

def Func ( arg_0 ) : arg_1 = urlparse ( arg_0 . path ) if arg_1 [ 2 ] == "/" + SERVER_REDIRECT_PATH : arg_2 = parse_qs ( arg_1 [ 4 ] ) if "code" not in arg_2 : arg_0 . send_response ( 200 ) arg_0 . send_header ( "Content-Type" , "text/plain" ) arg_0 . end_headers ( ) arg_0 . wfile . write ( "No code found, try again!" . encode ( "utf-8" ) ) return arg_0 . server . response_code = arg_2 [ "code" ] [ 0 ] arg_0 . send_response ( 200 ) arg_0 . send_header ( "Content-Type" , "text/plain" ) arg_0 . end_headers ( ) arg_0 . wfile . write ( "Thank you for using OAuth2Util. The authorization was successful, " "you can now close this window." . encode ( "utf-8" ) ) elif arg_1 [ 2 ] == "/" + SERVER_LINK_PATH : arg_0 . send_response ( 200 ) arg_0 . send_header ( "Content-Type" , "text/html" ) arg_0 . end_headers ( ) arg_0 . wfile . write ( "Hey there!
Click here to claim your prize." . format ( arg_0 . server . authorize_url ) . encode ( "utf-8" ) ) else : arg_0 . send_response ( 404 ) arg_0 . send_header ( "Content-Type" , "text/plain" ) arg_0 . end_headers ( ) arg_0 . wfile . write ( "404 not found" . encode ( "utf-8" ) )

Return True if file matches exclude pattern.


Question: Add track and play it .

async def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_4 ) : arg_0 . add_next ( arg_1 , arg_3 ) await arg_0 . play ( ignore_shuffle = True )

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


Question: Create a vacation .

def Func ( arg_0 ) : arg_1 = requests . post ( VACATIONS_URL , headers = HEADERS , data = json . dumps ( arg_0 ) ) arg_2 = str ( arg_1 . status_code ) if arg_2 != '200' : _LOGGER . error ( "Failed to create vacation. " + arg_2 ) _LOGGER . error ( arg_1 . json ( ) ) return False return arg_1 . json ( )

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: Return string signifying the SCM used in the given directory .

def Func ( arg_0 ) : if os . path . isdir ( os . path . join ( arg_0 , '.git' ) ) and os . path . isfile ( os . path . join ( arg_0 , '.git' , 'HEAD' ) ) : return 'git' return 'unknown'

Augment endlessly images in the source queue.

        This is a worker function for that endlessly queries the source queue (input batches),
        augments batches in it and sends the result to the output queue.


Question: Iterates over the parent - child relationships in an ontolog

def Func ( arg_0 , arg_1 = None ) : arg_2 = OlsClient ( arg_1 = arg_1 ) return arg_2 . iter_hierarchy ( arg_0 )

Return True if we should retry, False otherwise.


Question: Render the tag with all arguments resolved to their actual values .

def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : raise NotImplementedError ( "{0}.Func() is not implemented!" . format ( arg_0 . __class__ . __name__ ) )


Question: Find all intersection points between the line string and other .

def Func ( arg_0 , arg_1 ) : import shapely . geometry arg_2 = _convert_var_to_shapely_geometry ( arg_1 ) arg_3 = [ ] for arg_4 , arg_5 in zip ( arg_0 . coords [ : - 1 ] , arg_0 . coords [ 1 : ] ) : arg_6 = shapely . geometry . LineString ( [ arg_4 , arg_5 ] ) arg_7 = arg_6 . intersection ( arg_2 ) arg_7 = list ( _flatten_shapely_collection ( arg_7 ) ) arg_8 = [ ] for arg_9 in arg_7 : if isinstance ( arg_9 , shapely . geometry . linestring . LineString ) : arg_10 = ( arg_9 . coords [ 0 ] [ 0 ] , arg_9 . coords [ 0 ] [ 1 ] ) arg_11 = ( arg_9 . coords [ - 1 ] [ 0 ] , arg_9 . coords [ - 1 ] [ 1 ] ) arg_8 . extend ( [ arg_10 , arg_11 ] ) else : assert isinstance ( arg_9 , shapely . geometry . point . Point ) , ( "Expected to find shapely.geometry.point.Point or " "shapely.geometry.linestring.LineString intersection, " "actually found %s." % ( type ( arg_9 ) , ) ) arg_8 . append ( ( arg_9 . x , arg_9 . y ) ) arg_12 = sorted ( arg_8 , key = lambda p : np . linalg . norm ( np . float32 ( p ) - arg_4 ) ) arg_3 . append ( arg_12 ) return arg_3

Set the rotation of this body using a rotation matrix.

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


Question: Returns RGB values for a hex color string .

Enroll a single user in any number of courses using a particular course mode.

        Args:
            enterprise_customer: The EnterpriseCustomer which is sponsoring the enrollment
            user: The user who needs to be enrolled in the course
            course_mode: The mode with which the enrollment should be created
            *course_ids: An iterable containing any number of course IDs to eventually enroll the user in.

        Returns:
            Boolean: Whether or not enrollment succeeded for all courses specified


Question: Write ttf and otf font content from font_files in the svg file in filepath and write the result in outfile .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = _Func ( arg_0 , arg_2 ) arg_3 . write ( arg_1 , encoding = 'utf-8' , pretty_print = True )

Load the configuration.

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

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

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


Question: Extract hook names from the given entity

def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in arg_0 [ "hooks" ] [ "enter" ] + arg_0 [ "hooks" ] [ "exit" ] : arg_3 = os . path . basename ( arg_2 [ "fpath_orig" ] ) arg_3 = os . path . splitext ( arg_3 ) [ 0 ] arg_3 = arg_3 . strip ( ) arg_3 = arg_3 . replace ( "_enter" , "" ) arg_3 = arg_3 . replace ( "_exit" , "" ) if arg_3 in arg_1 : continue arg_1 . append ( arg_3 ) arg_1 . sort ( ) return arg_1

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


Question: Upload given file into DKV and save it under give key as raw object .

def Func ( arg_0 , arg_1 = None , arg_2 = True ) : arg_3 = api ( "POST /3/PutKey?destination_key={}&overwrite={}" . format ( arg_1 if arg_1 else '' , arg_2 ) , filename = arg_0 ) return arg_3 [ "destination_key" ]

Override of clean method to perform additional validation


Question: Get the attachments of the given bugs .

def Func ( arg_0 , * arg_1 ) : arg_2 = urijoin ( arg_0 . RBUG , arg_1 [ 0 ] , arg_0 . RATTACHMENT ) arg_3 = { arg_0 . PIDS : arg_1 , arg_0 . PEXCLUDE_FIELDS : arg_0 . VEXCLUDE_ATTCH_DATA } arg_4 = arg_0 . call ( arg_2 , arg_3 ) return arg_4

Decorator for Backend that ensures rates are fresh within last 5 mins


Question: Only one Living State on the S0 of each StateRegister

def Func ( arg_0 ) : arg_1 = [ ] arg_2 = len ( arg_0 . ls ) for arg_3 , arg_4 in zip ( range ( arg_2 ) , arg_0 . ls ) : arg_5 = id ( arg_4 [ 1 ] . thestate ( ) ) if arg_5 == id ( arg_4 [ 0 ] ) and ( arg_4 [ 1 ] . have_finish or not arg_4 [ 1 ] . alive ) : arg_1 . append ( arg_3 ) elif arg_4 [ 1 ] . alive : arg_4 [ 1 ] . alive = False for arg_7 in reversed ( arg_1 ) : arg_0 . ls . pop ( arg_7 ) arg_0 . init_all ( )

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: Plots gross leverage versus date .

def Func ( arg_0 , arg_1 , arg_2 = None , ** arg_3 ) : if arg_2 is None : arg_2 = plt . gca ( ) arg_4 = timeseries . gross_lev ( arg_1 ) arg_4 . plot ( lw = 0.5 , color = 'limegreen' , legend = False , arg_2 = arg_2 , ** arg_3 ) arg_2 . axhline ( arg_4 . mean ( ) , color = 'g' , linestyle = '--' , lw = 3 ) arg_2 . set_title ( 'Gross leverage' ) arg_2 . set_ylabel ( 'Gross leverage' ) arg_2 . set_xlabel ( '' ) return arg_2

Replace all the tracks in a playlist, overwriting its existing tracks.
        This powerful request can be useful for replacing tracks, re-ordering existing tracks, or clearing the playlist.

        Parameters
        ----------
        playlist : Union[str, PLaylist]
            The playlist to modify
        tracks : Sequence[Union[str, Track]]
            Tracks to place in the playlist


Question: Get the attribute value from the kmip . pie managed object .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 == 'Unique Identifier' : return str ( arg_1 . unique_identifier ) elif arg_2 == 'Name' : arg_3 = list ( ) for arg_4 in arg_1 . names : arg_4 = attributes . Name ( attributes . Name . NameValue ( arg_4 ) , attributes . Name . NameType ( enums . NameType . UNINTERPRETED_TEXT_STRING ) ) arg_3 . append ( arg_4 ) return arg_3 elif arg_2 == 'Object Type' : return arg_1 . _object_type elif arg_2 == 'Cryptographic Algorithm' : return arg_1 . cryptographic_algorithm elif arg_2 == 'Cryptographic Length' : return arg_1 . cryptographic_length elif arg_2 == 'Cryptographic Parameters' : return None elif arg_2 == 'Cryptographic Domain Parameters' : return None elif arg_2 == 'Certificate Type' : return arg_1 . certificate_type elif arg_2 == 'Certificate Length' : return None elif arg_2 == 'X.509 Certificate Identifier' : return None elif arg_2 == 'X.509 Certificate Subject' : return None elif arg_2 == 'X.509 Certificate Issuer' : return None elif arg_2 == 'Certificate Identifier' : return None elif arg_2 == 'Certificate Subject' : return None elif arg_2 == 'Certificate Issuer' : return None elif arg_2 == 'Digital Signature Algorithm' : return None elif arg_2 == 'Digest' : return None elif arg_2 == 'Operation Policy Name' : return arg_1 . operation_policy_name elif arg_2 == 'Cryptographic Usage Mask' : return arg_1 . cryptographic_usage_masks elif arg_2 == 'Lease Time' : return None elif arg_2 == 'Usage Limits' : return None elif arg_2 == 'State' : return arg_1 . state elif arg_2 == 'Initial Date' : return arg_1 . initial_date elif arg_2 == 'Activation Date' : return None elif arg_2 == 'Process Start Date' : return None elif arg_2 == 'Protect Stop Date' : return None elif arg_2 == 'Deactivation Date' : return None elif arg_2 == 'Destroy Date' : return None elif arg_2 == 'Compromise Occurrence Date' : return None elif arg_2 == 'Compromise Date' : return None elif arg_2 == 'Revocation Reason' : return None elif arg_2 == 'Archive Date' : return None elif arg_2 == 'Object Group' : return None elif arg_2 == 'Fresh' : return None elif arg_2 == 'Link' : return None elif arg_2 == 'Application Specific Information' : return None elif arg_2 == 'Contact Information' : return None elif arg_2 == 'Last Change Date' : return None else : return None

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


Question: Advance to the next iteration cycle phase

def Func ( arg_0 ) : arg_0 . __currentPhase = arg_0 . __phaseCycler . next ( ) arg_0 . __currentPhase . enterPhase ( ) return


Question: This is an alternative function to calculate the autocorrelation .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = nparange ( 0 , arg_2 - arg_1 ) arg_6 = ( arg_0 [ arg_5 ] - arg_3 ) * ( arg_0 [ arg_5 + arg_1 ] - arg_3 ) arg_7 = npsum ( arg_6 ) / arg_5 . size arg_8 = npsum ( ( arg_0 [ arg_5 ] - arg_3 ) * ( arg_0 [ arg_5 ] - arg_3 ) ) / arg_0 . size arg_9 = arg_7 / arg_8 return arg_9

Snapshot bucket and add files in record during first publishing.


Question: get host name of remote host

def Func ( arg_0 , arg_1 ) : if is_self ( arg_0 ) : return get_self_hostname ( ) arg_2 = "hostname" arg_3 = ssh_remote_execute ( arg_2 , arg_0 , arg_1 ) arg_4 = subprocess . Popen ( arg_3 , shell = True , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) arg_5 = arg_4 . wait ( ) arg_6 = arg_4 . communicate ( ) if arg_5 != 0 : Log . error ( "Failed to get hostname for remote host %s with output:\n%s" % ( arg_0 , arg_6 ) ) sys . exit ( - 1 ) return arg_6 [ 0 ] . strip ( "\n" )

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: Check for roster related features in the stream features received and set server_features accordingly .

def Func ( arg_0 , arg_1 ) : arg_2 = set ( ) logger . debug ( "Checking roster-related features" ) if arg_1 . features . find ( FEATURE_ROSTERVER ) is not None : logger . debug ( "  Roster versioning available" ) arg_2 . add ( "versioning" ) if arg_1 . features . find ( FEATURE_APPROVALS ) is not None : logger . debug ( "  Subscription pre-approvals available" ) arg_2 . add ( "pre-approvals" ) arg_0 . server_features = arg_2


Question: Returns the index of the type as defined in the LAS Specification

def Func ( arg_0 ) : try : return _type_to_extra_dim_id_style_1 [ arg_0 ] except KeyError : try : return _type_to_extra_dim_id_style_2 [ arg_0 ] except KeyError : raise errors . UnknownExtraType ( arg_0 )

List all events occurring at or after a timestamp.


Question: Returns a profile form instance and a boolean which is true if the form was handled .

def Func ( arg_0 , arg_1 ) : arg_2 = people . Attendee . get_instance ( arg_0 . user ) try : arg_3 = arg_2 . attendeeprofilebase arg_3 = people . AttendeeProfileBase . objects . get_subclass ( pk = arg_3 . id , ) except ObjectDoesNotExist : arg_3 = None try : arg_4 = arg_0 . user . speaker_profile arg_5 = arg_4 . name except ObjectDoesNotExist : arg_5 = None arg_6 = ProfileForm . Meta . model . name_field ( ) arg_7 = { } if arg_3 is None and arg_6 is not None : arg_7 [ arg_6 ] = arg_5 arg_8 = ProfileForm ( arg_0 . POST or None , arg_7 = arg_7 , arg_10 = arg_3 , arg_1 = arg_1 ) arg_9 = True if arg_0 . POST else False if arg_0 . POST and arg_8 . is_valid ( ) : arg_8 . instance . attendee = arg_2 arg_8 . save ( ) return arg_8 , arg_9

Return an open file-object to the index file


Question: Outlines each contour in a path with the colors in the list .

def Func ( arg_0 , arg_1 , arg_2 = 0.4 , arg_3 = True ) : def _point_count ( arg_0 , arg_2 ) : return max ( int ( arg_0 . length * arg_2 * 0.5 ) , 10 ) arg_4 = sum ( [ _point_count ( arg_8 , arg_2 ) for arg_8 in arg_0 . contours ] ) arg_5 = 0 arg_6 = len ( arg_0 . contours ) - 1 if arg_6 == 0 : arg_3 = False arg_7 = 0 for arg_8 in arg_0 . contours : if not arg_3 : arg_7 = 0 arg_9 = _point_count ( arg_8 , arg_2 ) arg_10 = True for arg_11 in arg_8 . points ( arg_9 ) : if arg_10 : arg_10 = False else : if not arg_3 : arg_12 = float ( arg_7 ) / arg_9 * len ( arg_1 ) else : arg_12 = float ( arg_7 ) / arg_4 * len ( arg_1 ) - 1 * arg_5 / arg_6 _ctx . stroke ( arg_1 [ int ( arg_12 ) ] ) _ctx . line ( arg_13 , arg_14 , arg_11 . x , arg_11 . y ) arg_13 = arg_11 . x arg_14 = arg_11 . y arg_7 += 1 arg_11 = arg_8 . point ( 0.9999999 ) _ctx . line ( arg_13 , arg_14 , arg_11 . x , arg_11 . y ) arg_5 += 1

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Handles real - time updates to the order book .

def Func ( arg_0 ) : while arg_0 . ws_client . connected ( ) : if arg_0 . die : break if arg_0 . pause : sleep ( 5 ) continue arg_1 = arg_0 . ws_client . receive ( ) if arg_1 is None : break arg_2 = arg_1 [ 'type' ] if arg_2 == 'error' : continue if arg_1 [ 'sequence' ] <= arg_0 . sequence : continue if arg_2 == 'open' : arg_0 . _handle_open ( arg_1 ) elif arg_2 == 'match' : arg_0 . _handle_match ( arg_1 ) elif arg_2 == 'done' : arg_0 . _handle_done ( arg_1 ) elif arg_2 == 'change' : arg_0 . _handle_change ( arg_1 ) else : continue arg_0 . ws_client . disconnect ( )

Get the reason of this revocation.

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

        .. seealso::

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


Question: Return the description of the courserun content item .

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] arg_3 = transform_language_code ( arg_1 . get ( 'content_language' , '' ) ) for arg_4 in arg_0 . enterprise_configuration . get_locales ( default_locale = arg_3 ) : arg_2 . append ( { 'locale' : arg_4 , 'value' : ( arg_1 [ 'full_description' ] or arg_1 [ 'short_description' ] or arg_1 [ 'title' ] or '' ) } ) return arg_2

\
        Send raw data over the wire if connection is registered. Otherewise,
        save the data to an output buffer for transmission later on.
        If the force flag is true, always send data, regardless of
        registration status.


Question: Fail for edges with citations whose references are one of the given PubMed identifiers .

def Func ( arg_0 : arg_1 ) -> EdgePredicate : if isinstance ( arg_0 , str ) : @ edge_predicate def pmid_exclusion_filter ( arg_2 : arg_3 ) -> bool : return has_pubmed ( arg_2 ) and arg_2 [ CITATION ] [ CITATION_REFERENCE ] != arg_0 elif isinstance ( arg_0 , Iterable ) : arg_0 = set ( arg_0 ) @ edge_predicate def pmid_exclusion_filter ( arg_2 : arg_3 ) -> bool : return has_pubmed ( arg_2 ) and arg_2 [ CITATION ] [ CITATION_REFERENCE ] not in arg_0 else : raise TypeError return pmid_exclusion_filter

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


Question: Opposite slicer the outer part wrt to a field

def Func ( arg_0 , arg_1 ) : arg_2 = None arg_3 = arg_1 . coords ( form = 'meshed' ) for arg_4 in arg_3 : arg_4 [ arg_0 . slicer ] = - 1 arg_2 = arg_2 & ( arg_4 > 0 ) if arg_2 is not None else ( arg_4 > 0 ) return tuple ( np . array ( arg_6 ) . astype ( 'int' ) for arg_6 in zip ( * [ arg_4 [ arg_2 ] for arg_4 in arg_3 ] ) )

Gets the fuel prices for a specific fuel station.


Question: Get a texture by its label

def Func ( arg_0 , arg_1 : arg_2 ) -> Union [ moderngl . Texture , moderngl . TextureArray , moderngl . Texture3D , moderngl . TextureCube ] : return arg_0 . _project . Func ( arg_1 )

Handle successful response to the roster request.


Question: Decorator to enable OAuth Credentials if authorized and setup the oauth object on the request object to provide helper functions to start the flow otherwise .

def Func ( arg_0 = None , arg_1 = None , ** arg_2 ) : def curry_wrapper ( arg_3 ) : @ wraps ( arg_3 ) def enabled_wrapper ( arg_4 , * arg_5 , ** arg_6 ) : arg_7 = arg_2 . pop ( 'return_url' , arg_4 . get_full_path ( ) ) arg_8 = django_util . UserOAuth2 ( arg_4 , arg_1 , arg_7 ) setattr ( arg_4 , django_util . oauth2_settings . request_prefix , arg_8 ) return arg_3 ( arg_4 , * arg_5 , ** arg_6 ) return enabled_wrapper if arg_0 : return curry_wrapper ( arg_0 ) else : return curry_wrapper

Given a unicode string, will do its dandiest to give you back a
    valid ascii charset string you can use in, say, http headers and the
    like.


Question: returns a list of all databases on this server

def Func ( arg_0 = None , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = 'postgres' ) : arg_5 = _connection ( arg_0 = arg_0 , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , db = arg_4 ) arg_6 = arg_5 . cursor ( ) arg_6 . execute ( 'SELECT DATNAME from pg_database' ) arg_7 = arg_6 . fetchall ( ) arg_5 . close ( ) arg_8 = [ ] for arg_9 in arg_7 : arg_8 . append ( arg_9 [ 0 ] ) return arg_8

Register a file reader for use in parse_config_file.

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

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

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

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

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


Question: Outputs the CSS which can be customized for highlighted code

def Func ( arg_0 , arg_1 ) : click . secho ( "The following styles are available to choose from:" , fg = "green" ) click . echo ( list ( pygments . styles . get_all_styles ( ) ) ) click . echo ( ) click . secho ( f'The following CSS for the "{style}" style can be customized:' , fg = "green" ) click . echo ( pygments . formatters . HtmlFormatter ( arg_1 = arg_1 ) . get_style_defs ( ) )

Returns the profile with the received ID as a dict

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

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

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


Question: Initialise Celery and set up logging

def Func ( arg_0 , arg_1 ) : arg_1 . conf . update ( arg_0 . config ) arg_2 = arg_1 . Task class ContextTask ( arg_2 ) : arg_3 = True def __call__ ( arg_4 , * arg_5 , ** arg_6 ) : with arg_0 . app_context ( ) : return arg_2 . __call__ ( arg_4 , * arg_5 , ** arg_6 ) arg_1 . Task = ContextTask return arg_1

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: Runs a subprocess shell with check = True by default

def Func ( arg_0 , arg_1 = True , arg_2 = None , arg_3 = None , arg_4 = None ) : return subprocess . run ( arg_0 , Func = True , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 )

Overriding the default JSONEncoder.default for NDB support.


Question: Add function enrichr argument parsers .

def Func ( arg_0 ) : arg_1 = arg_0 . add_parser ( "enrichr" , help = "Using Enrichr API to perform GO analysis." ) arg_2 = arg_1 . add_argument_group ( "Input arguments" ) arg_2 . add_argument ( "-i" , "--input-list" , action = "store" , dest = "gene_list" , type = str , required = True , metavar = 'IDs' , help = "Enrichr uses a list of gene names as input." ) arg_2 . add_argument ( "-g" , "--gene-sets" , action = "store" , dest = "library" , type = str , required = True , metavar = 'GMT' , help = "Enrichr library name(s) required. Separate each name by comma." ) arg_2 . add_argument ( "--org" , "--organism" , action = "store" , dest = "organism" , type = str , default = '' , help = "Enrichr supported organism name. Default: human. See here: https://amp.pharm.mssm.edu/modEnrichr." ) arg_2 . add_argument ( "--ds" , "--description" , action = "store" , dest = "descrip" , type = str , default = 'enrichr' , metavar = 'STRING' , help = "It is recommended to enter a short description for your list so that multiple lists \                              can be differentiated from each other if you choose to save or share your list." ) arg_2 . add_argument ( "--cut" , "--cut-off" , action = "store" , dest = "thresh" , metavar = 'float' , type = float , default = 0.05 , help = "Adjust-Pval cutoff, used for generating plots. Default: 0.05." ) arg_2 . add_argument ( "--bg" , "--background" , action = "store" , dest = "bg" , default = 'hsapiens_gene_ensembl' , metavar = 'BGNUM' , help = "BioMart Dataset name or Background total genes number. Default: None" ) arg_2 . add_argument ( "-t" , "--top-term" , dest = "term" , action = "store" , type = int , default = 10 , metavar = 'int' , help = "Numbers of top terms shown in the plot. Default: 10" ) arg_3 = arg_1 . add_argument_group ( "Output figure arguments" ) add_output_option ( arg_3 ) return

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: In a broadcast queue workers have a unique subscription ensuring that every worker recieves a copy of every task .

def Func ( arg_0 ) : arg_1 = arg_0 . _get_topic_path ( ) arg_2 = '{}-{}-{}-worker' . format ( queue . PUBSUB_OBJECT_PREFIX , arg_0 . name , uuid4 ( ) . hex ) arg_3 = arg_0 . subscriber_client . subscription_path ( arg_0 . project , arg_2 ) try : arg_0 . subscriber_client . get_subscription ( arg_3 ) except google . cloud . exceptions . NotFound : logger . info ( "Creating worker subscription {}" . format ( arg_2 ) ) arg_0 . subscriber_client . create_subscription ( arg_3 , arg_1 ) return arg_3

Start executing in Unicorn from this point until we hit a syscall or reach break_unicorn_at

        :param capstone.CsInsn insn: The instruction object to emulate


Question: Loads a theme from aggregated web data .

def Func ( arg_0 , arg_1 = 5 , arg_2 = "blue" , arg_3 = None , arg_4 = None ) : if arg_3 is None : arg_5 = os . path . join ( arg_0 . cache , arg_0 . name + ".xml" ) arg_6 = open ( arg_5 ) . read ( ) else : assert arg_4 is not None arg_6 = arg_3 . read ( arg_4 ) arg_7 = parseString ( arg_6 ) . documentElement arg_8 = lambda arg_9 , a : arg_9 . attributes [ a ] . value for arg_9 in arg_7 . getElementsByTagName ( "color" ) [ : arg_1 ] : arg_10 = float ( arg_8 ( arg_9 , "weight" ) ) try : arg_11 = arg_9 . getElementsByTagName ( "rgb" ) [ 0 ] arg_12 = color ( float ( arg_8 ( arg_11 , "r" ) ) , float ( arg_8 ( arg_11 , "g" ) ) , float ( arg_8 ( arg_11 , "b" ) ) , float ( arg_8 ( arg_11 , "a" ) ) , mode = "rgb" ) try : arg_12 . name = arg_8 ( arg_9 , "name" ) if arg_12 . name == "blue" : arg_12 = color ( arg_2 ) except : pass except : arg_13 = arg_8 ( arg_9 , "name" ) if arg_13 == "blue" : arg_13 = arg_2 arg_12 = color ( arg_13 ) for arg_14 in arg_9 . getElementsByTagName ( "shade" ) : arg_0 . ranges . append ( ( arg_12 , shade ( arg_8 ( arg_14 , "name" ) ) , arg_10 * float ( arg_8 ( arg_14 , "weight" ) ) ) )

Recognizes and claims Strelka VCFs form the set of all input VCFs.

        Each defined caller has a chance to evaluate and claim all the incoming
        files as something that it can process.

        Args:
            file_readers: the collection of currently unclaimed files

        Returns:
            A tuple of unclaimed readers and StrelkaVcfReaders.


Question: Get and parse prefixed django settings from env .

def Func ( ) : arg_0 = { } arg_1 = environ . get ( "DJANGO_SETTINGS_PREFIX" , "DJANGO_" ) for arg_2 , arg_3 in environ . items ( ) : arg_4 , arg_4 , arg_2 = arg_2 . partition ( arg_1 ) if arg_2 : if arg_2 in UNSUPPORTED_ENV_SETTINGS : raise ValueError ( 'Django setting "{}" can not be ' "configured through environment." . format ( arg_2 ) ) arg_5 = getattr ( global_settings , arg_2 , UNDEFINED ) if arg_5 is not UNDEFINED : if arg_5 is None and arg_2 in SETTINGS_TYPES . keys ( ) : arg_6 = get_parser ( SETTINGS_TYPES [ arg_2 ] ) else : arg_6 = get_parser ( type ( arg_5 ) ) arg_3 = arg_6 ( arg_3 ) arg_0 [ arg_2 ] = arg_3 return arg_0

Register a file reader for use in parse_config_file.

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

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

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

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

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


Question: Get the sizes of each cluster .

def Func ( arg_0 , arg_1 = False , arg_2 = False , arg_3 = False ) : arg_4 = ModelBase . _get_metrics ( arg_0 , arg_1 , arg_2 , arg_3 ) arg_5 = { } for arg_6 , arg_7 in arg_4 . items ( ) : arg_5 [ arg_6 ] = None if arg_7 is None else [ arg_7 [ 2 ] for arg_7 in arg_7 . _metric_json [ "centroid_stats" ] . cell_values ] return list ( arg_5 . values ( ) ) [ 0 ] if len ( arg_5 ) == 1 else arg_5

Create a dictionary of datasets and a material object for air.

    :return: (Material, {str, DataSet})


Question: Prepare either TMaster or Streaming commands according to shard . The Shell command is attached to all containers . The empty container plan and non - exist container plan are bypassed .

def Func ( arg_0 ) : if len ( arg_0 . packing_plan . container_plans ) == 0 : return { } if arg_0 . _get_instance_plans ( arg_0 . packing_plan , arg_0 . shard ) is None and arg_0 . shard != 0 : arg_1 = { } arg_1 [ 'heron-shell' ] = Command ( [ '%s' % arg_0 . heron_shell_binary , '--port=%s' % arg_0 . shell_port , '--log_file_prefix=%s/heron-shell-%s.log' % ( arg_0 . log_dir , arg_0 . shard ) , '--secret=%s' % arg_0 . topology_id ] , arg_0 . shell_env ) return arg_1 if arg_0 . shard == 0 : arg_2 = arg_0 . _get_tmaster_processes ( ) else : arg_0 . _untar_if_needed ( ) arg_2 = arg_0 . _get_streaming_processes ( ) arg_2 . update ( arg_0 . _get_heron_support_processes ( ) ) return arg_2

Attach an observer.

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

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


Question: The text that the user has entered entered at the current prompt .

def Func ( arg_0 , arg_1 = False ) : if arg_0 . _executing and not arg_1 : return arg_0 . _input_buffer_executing arg_2 = arg_0 . _get_end_cursor ( ) arg_2 . setPosition ( arg_0 . _prompt_pos , QtGui . QTextCursor . KeepAnchor ) arg_3 = arg_2 . selection ( ) . toPlainText ( ) return arg_3 . replace ( '\n' + arg_0 . _continuation_prompt , '\n' )

Main executor of the trimmomatic_report template.

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


Question: Get details about a specific namespace .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _perform_get ( arg_0 . _get_path ( 'services/serviceBus/Namespaces' , arg_1 ) , None ) return _ServiceBusManagementXmlSerializer . xml_to_namespace ( arg_2 . body )

Return an open file-object to the index file


Question: Query for if date_field is within number of days from now .

def Func ( arg_0 , arg_1 ) : arg_2 = None arg_0 = get_integer ( arg_0 ) if arg_0 : arg_3 = get_days_from_now ( arg_0 ) arg_2 = Q ( ** { "%s__lte" % arg_1 : arg_3 . isoformat ( ) } ) return arg_2


Question: This is a parallel worker for the drivers below .

def Func ( arg_0 ) : arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = arg_0 try : return get_periodicfeatures ( arg_1 , arg_2 , arg_3 , arg_4 = arg_4 , ** arg_5 ) except Exception as e : LOGEXCEPTION ( 'failed to get periodicfeatures for %s' % arg_1 )

Custom version of the standard annotate function
        that allows using field names as annotated fields.

        Normally, the annotate function doesn't allow you
        to use the name of an existing field on the model
        as the alias name. This version of the function does
        allow that.


Question: Read and return the matrix header .

def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = read_elements ( arg_0 , arg_1 , [ 'miUINT32' ] ) arg_4 = { 'mclass' : arg_2 & 0x0FF , 'is_logical' : ( arg_2 >> 9 & 1 ) == 1 , 'is_global' : ( arg_2 >> 10 & 1 ) == 1 , 'is_complex' : ( arg_2 >> 11 & 1 ) == 1 , 'nzmax' : arg_3 } arg_4 [ 'dims' ] = read_elements ( arg_0 , arg_1 , [ 'miINT32' ] ) arg_4 [ 'n_dims' ] = len ( arg_4 [ 'dims' ] ) if arg_4 [ 'n_dims' ] != 2 : raise ParseError ( 'Only matrices with dimension 2 are supported.' ) arg_4 [ 'name' ] = read_elements ( arg_0 , arg_1 , [ 'miINT8' ] , is_name = True ) return arg_4

Init openstack neutron mq

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

        :param mq: class ternya.mq.MQ


Question: Read a character literal from the input stream .

def Func ( arg_0 : arg_1 ) -> str : arg_2 = arg_0 . reader . advance ( ) assert arg_2 == "\\" arg_3 : List [ str ] = [ ] arg_4 = arg_0 . reader arg_5 = arg_4 . peek ( ) while True : if arg_5 == "" or whitespace_chars . match ( arg_5 ) : break if not alphanumeric_chars . match ( arg_5 ) : break arg_3 . append ( arg_5 ) arg_5 = arg_4 . next_token ( ) arg_6 = "" . join ( arg_3 ) arg_7 = _SPECIAL_CHARS . get ( arg_6 , None ) if arg_7 is not None : return arg_7 arg_8 = unicode_char . match ( arg_6 ) if arg_8 is not None : try : return chr ( int ( f"0x{match.group(1)}" , 16 ) ) except ( ValueError , OverflowError ) : raise SyntaxError ( f"Unsupported character \\u{char}" ) from None if len ( arg_6 ) > 1 : raise SyntaxError ( f"Unsupported character \\{char}" ) return arg_6


Question: Wraps data with the interrupt reader and the file chunk reader .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_0 . _wrap_fileobj ( six . BytesIO ( arg_1 ) ) return arg_0 . _osutil . open_file_chunk_reader_from_fileobj ( arg_4 = arg_4 , chunk_size = len ( arg_1 ) , full_file_size = len ( arg_1 ) , arg_2 = arg_2 , arg_3 = arg_3 )

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

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

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


Question: Creates a new instance of the named executor . In case the executor name is not know in airflow look for it in the plugins

def Func ( arg_0 ) : if arg_0 == Executors . LocalExecutor : return LocalExecutor ( ) elif arg_0 == Executors . SequentialExecutor : return SequentialExecutor ( ) elif arg_0 == Executors . CeleryExecutor : from airflow . executors . celery_executor import CeleryExecutor return CeleryExecutor ( ) elif arg_0 == Executors . DaskExecutor : from airflow . executors . dask_executor import DaskExecutor return DaskExecutor ( ) elif arg_0 == Executors . KubernetesExecutor : from airflow . contrib . executors . kubernetes_executor import KubernetesExecutor return KubernetesExecutor ( ) else : _integrate_plugins ( ) arg_1 = arg_0 . split ( '.' ) if len ( arg_1 ) != 2 : raise AirflowException ( "Executor {0} not supported: " "please specify in format plugin_module.executor" . format ( arg_0 ) ) if arg_1 [ 0 ] in globals ( ) : return globals ( ) [ arg_1 [ 0 ] ] . __dict__ [ arg_1 [ 1 ] ] ( ) else : raise AirflowException ( "Executor {0} not supported." . format ( arg_0 ) )

Gets a 3D CoordinateMap from img.

    Parameters
    ----------
    img: nib.Nifti1Image or nipy Image

    Returns
    -------
    nipy.core.reference.coordinate_map.CoordinateMap


Question: Hard - code the styles into the SVG XML if style sheets are not used .

def Func ( arg_0 ) : if not arg_0 . css_inline : return arg_1 = arg_0 . parse_css ( ) for arg_2 in arg_0 . root . xpath ( '//*[@class]' ) : arg_3 = '.' + arg_2 . attrib [ 'class' ] if arg_3 not in arg_1 : continue arg_4 = arg_1 [ arg_3 ] if 'style' in arg_2 . attrib : arg_4 += arg_2 . attrib [ 'style' ] arg_2 . attrib [ 'style' ] = arg_4

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: Class method that will return a FloatingIP object by its IP .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 ( token = arg_1 , arg_2 = arg_2 ) arg_3 . load ( ) return arg_3

Show entire demo on screen, block by block


Question: Opens a new configuration scope .

def Func ( arg_0 ) : try : arg_1 = True if isinstance ( arg_0 , list ) : arg_2 = arg_0 elif arg_0 and isinstance ( arg_0 , six . string_types ) : arg_2 = current_scope ( ) arg_2 . extend ( arg_0 . split ( '/' ) ) else : arg_1 = arg_0 in ( None , '' ) arg_2 = [ ] _ACTIVE_SCOPES . append ( arg_2 ) arg_3 = map ( config_parser . MODULE_RE . match , arg_2 ) if not arg_1 or not all ( arg_3 ) : arg_4 = 'Invalid value for `name_or_scope`: {}.' raise ValueError ( arg_4 . format ( arg_0 ) ) yield arg_2 finally : _ACTIVE_SCOPES . pop ( )

Replicate a VM image to multiple target locations. This operation
        is only for publishers. You have to be registered as image publisher
        with Microsoft Azure to be able to call this.

        vm_image_name:
            Specifies the name of the VM Image that is to be used for
            replication
        regions:
            Specified a list of regions to replicate the image to
            Note: The regions in the request body are not additive. If a VM
            Image has already been replicated to Regions A, B, and C, and
            a request is made to replicate to Regions A and D, the VM
            Image will remain in Region A, will be replicated in Region D,
            and will be unreplicated from Regions B and C
        offer:
            Specifies the publisher defined name of the offer. The allowed
            characters are uppercase or lowercase letters, digit,
            hypen(-), period (.).The maximum allowed length is 64 characters.
        sku:
            Specifies the publisher defined name of the Sku. The allowed
            characters are uppercase or lowercase letters, digit,
            hypen(-), period (.). The maximum allowed length is 64 characters.
        version:
            Specifies the publisher defined version of the image.
            The allowed characters are digit and period.
            Format: <MajorVersion>.<MinorVersion>.<Patch>
            Example: '1.0.0' or '1.1.0' The 3 version number to
            follow standard of most of the RPs. See http://semver.org


Question: Returns a list of all mongoadmin implementations for the site

def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in settings . INSTALLED_APPS : arg_3 = "{0}.mongoadmin" . format ( arg_2 ) try : arg_4 = import_module ( arg_3 ) except ImportError as e : if str ( e ) . startswith ( "No module named" ) : continue raise e arg_5 = AppStore ( arg_4 ) arg_1 . append ( dict ( arg_2 = arg_2 , obj = arg_5 ) ) return arg_1

Does line terminate so, that the next symbol is in string constant.

  This function does not consider single-line nor multi-line comments.

  Args:
    line: is a partial line of code starting from the 0..n.

  Returns:
    True, if next character appended to 'line' is inside a
    string constant.


Question: Parse an XML document and clean any namespaces .

def Func ( arg_0 , arg_1 = None ) : if not arg_1 : if not arg_0 . path : arg_0 . logger . error ( "No path defined!" ) return arg_1 = arg_0 . path arg_2 = arg_0 . _clean_xml ( arg_1 ) if arg_2 . tag . lower ( ) == 'collection' : arg_3 = ET . ElementTree ( arg_2 ) arg_0 . records = element_tree_collection_to_records ( arg_3 ) elif arg_2 . tag . lower ( ) == 'record' : arg_5 = ET . Element ( 'collection' ) arg_5 . append ( arg_2 ) arg_3 = ET . ElementTree ( arg_5 ) arg_0 . records = element_tree_collection_to_records ( arg_3 ) else : arg_6 = get_request_subfields ( arg_2 ) arg_4 = arg_2 . find ( 'ListRecords' ) if arg_4 is None : arg_4 = arg_2 . find ( 'GetRecord' ) if arg_4 is None : raise ValueError ( "Cannot find ListRecords or GetRecord!" ) arg_3 = ET . ElementTree ( arg_4 ) for arg_7 , arg_8 in element_tree_oai_records ( arg_3 , arg_6 ) : if arg_8 : arg_0 . deleted_records . append ( arg_0 . create_deleted_record ( arg_7 ) ) else : arg_0 . records . append ( arg_7 )

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: Reorder a track or a group of tracks in a playlist .

async def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = 1 , * , arg_5 = None ) : arg_6 = await arg_0 . http . reorder_playlists_tracks ( arg_0 . id , str ( arg_1 ) , arg_2 , arg_4 , arg_3 , arg_5 = arg_5 ) return arg_6 [ 'snapshot_id' ]

Load a configuration module and return a Config


Question: Returns the length of the file using the wc GNU command

def Func ( arg_0 ) : arg_1 = subprocess . Popen ( [ 'wc' , '-l' , arg_0 ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) arg_2 , arg_3 = arg_1 . communicate ( ) if arg_1 . returncode != 0 : raise IOError ( arg_3 ) arg_4 = arg_2 . strip ( ) arg_4 = int ( arg_4 . split ( ) [ 0 ] ) return arg_4

Run the responser function. If it succeeds, add the _answer key.
        If it fails with an error known to the command, serialize the
        error.


Question: A template tag to return the project s home URL and label formatted as a Bootstrap 3 breadcrumb .

def Func ( arg_0 ) : arg_1 = home_url ( ) if arg_1 : return format_html ( '
{}
' , arg_1 , arg_0 ) else : return format_html ( '
{}
' , arg_0 )

Waits until TransferFuture is done and returns the result

        If the TransferFuture succeeded, it will return the result. If the
        TransferFuture failed, it will raise the exception associated to the
        failure.


Question: Define a switchable ConfOpt .

def Func ( arg_0 , arg_1 , arg_2 ) : return ConfOpt ( bool ( arg_0 ) , True , arg_1 , dict ( action = internal . Switch ) , True , arg_2 , None )


Question: return ansi escape code corresponding to color and style

def Func ( arg_0 = None , arg_1 = None ) : arg_2 = [ ] if arg_1 : arg_3 = utils . _splitstrip ( arg_1 ) for arg_4 in arg_3 : arg_2 . append ( ANSI_STYLES [ arg_4 ] ) if arg_0 : if arg_0 . isdigit ( ) : arg_2 . extend ( [ "38" , "5" ] ) arg_2 . append ( arg_0 ) else : arg_2 . append ( ANSI_COLORS [ arg_0 ] ) if arg_2 : return ANSI_PREFIX + ";" . join ( arg_2 ) + ANSI_END return ""

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


Question: Lists a set of projects related to a dataset .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . url ( ) + "/nd/resource/dataset/{}" . format ( arg_1 ) + "/project/" arg_3 = arg_0 . remote_utils . get_url ( arg_2 ) if arg_3 . status_code is not 200 : raise RemoteDataNotFoundError ( 'Could not find {}' . format ( arg_3 . text ) ) else : return arg_3 . json ( )

View decorator which terminates stale TPA sessions.

    This decorator forces the user to obtain a new session
    the first time they access the decorated view. This prevents
    TPA-authenticated users from hijacking the session of another
    user who may have been previously logged in using the same
    browser window.

    This decorator should be used in conjunction with the
    enterprise_login_required decorator.

    Usage::
        @enterprise_login_required
        @force_fresh_session()
        def my_view(request, enterprise_uuid):
            # Some functionality ...

        OR

        class MyView(View):
            ...
            @method_decorator(enterprise_login_required)
            @method_decorator(force_fresh_session)
            def get(self, request, enterprise_uuid):
                # Some functionality ...


Question: Get the external ids 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: Query the Enrollment API for the course details of the given course_id .

def Func ( arg_0 , arg_1 ) : try : return arg_0 . client . course ( arg_1 ) . get ( ) except ( SlumberBaseException , ConnectionError , Timeout ) as exc : LOGGER . exception ( 'Failed to retrieve course enrollment details for course [%s] due to: [%s]' , arg_1 , str ( exc ) ) return { }

Drop a node from the network

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


Question: Plot a set of points over the array of data on the figure .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : if arg_0 is not None : arg_0 = list ( map ( lambda position_set : np . asarray ( position_set ) , arg_0 ) ) arg_6 = itertools . cycle ( [ "m" , "y" , "r" , "w" , "c" , "b" , "g" , "k" ] ) for arg_7 in arg_0 : if arg_5 is not None : arg_7 -= arg_5 arg_8 = convert_grid_units ( arg_1 = arg_1 , grid_arcsec = arg_7 , arg_2 = arg_2 , arg_3 = arg_3 ) plt . scatter ( y = arg_8 [ : , 0 ] , x = arg_8 [ : , 1 ] , color = next ( arg_6 ) , s = arg_4 )

Overriding the default JSONEncoder.default for NDB support.


Question: Returns all the cliques in the graph of at least the given size .

def Func ( arg_0 , arg_1 = 3 ) : Func = [ ] for arg_3 in arg_0 . nodes : arg_4 = clique ( arg_0 , arg_3 . id ) if len ( arg_4 ) >= arg_1 : arg_4 . sort ( ) if arg_4 not in Func : Func . append ( arg_4 ) return Func

Handle marking messages as read and keeping client active.


Question: Transform Kraus representation to Stinespring representation .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ None , None ] for arg_4 , arg_5 in enumerate ( arg_0 ) : if arg_5 is not None : arg_6 = len ( arg_5 ) arg_7 = np . zeros ( ( arg_2 * arg_6 , arg_1 ) , dtype = complex ) for arg_8 , arg_9 in enumerate ( arg_5 ) : arg_10 = np . zeros ( arg_6 ) arg_10 [ arg_8 ] = 1 arg_7 += np . kron ( arg_9 , arg_10 [ : , None ] ) arg_3 [ arg_4 ] = arg_7 return tuple ( arg_3 )

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


Question: Return the shape that would result from broadcasting the inputs

def Func ( * arg_0 ) : arg_1 = [ a . shape if hasattr ( type ( a ) , '__array_interface__' ) else ( ) for a in arg_0 ] arg_2 = max ( len ( arg_4 ) for arg_4 in arg_1 ) for arg_3 , arg_4 in enumerate ( arg_1 ) : if len ( arg_4 ) < arg_2 : arg_1 [ arg_3 ] = ( 1 , ) * ( arg_2 - len ( arg_4 ) ) + arg_4 return tuple ( max ( arg_4 [ arg_5 ] for arg_4 in arg_1 ) for arg_5 in range ( arg_2 ) )

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

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

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


Question: Augment a sample shape to broadcast batch dimensions .

def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_3 = distribution_util . prefer_static_shape ( arg_1 ) [ 0 ] arg_4 = ( tensorshape_util . rank ( arg_0 . batch_shape ) if tensorshape_util . rank ( arg_0 . batch_shape ) is not None else distribution_util . prefer_static_shape ( arg_0 . batch_shape_tensor ( ) ) [ 0 ] ) arg_5 = arg_3 - arg_4 arg_6 = ( arg_1 [ arg_5 : ] ) arg_7 = tf . get_static_value ( arg_1 [ arg_5 : ] ) arg_8 = tf . get_static_value ( arg_5 ) if arg_8 is not None : if arg_8 < 0 : raise ValueError ( "Cannot broadcast distribution {} batch shape to " "target batch shape with fewer dimensions" . format ( arg_0 ) ) if ( arg_7 is not None and tensorshape_util . is_fully_defined ( arg_0 . batch_shape ) ) : if ( arg_0 . batch_shape and any ( arg_7 != tensorshape_util . as_list ( arg_0 . batch_shape ) ) ) : raise NotImplementedError ( "Broadcasting is not supported; " "unexpected batch shape " "(expected {}, saw {})." . format ( arg_7 , arg_0 . batch_shape ) ) arg_9 = [ ] if arg_2 : arg_9 . append ( assert_util . assert_greater_equal ( tf . convert_to_tensor ( value = arg_5 , dtype = tf . int32 ) , tf . zeros ( ( ) , dtype = tf . int32 ) , message = ( "Cannot broadcast distribution {} batch shape to " "target batch shape with fewer dimensions." . format ( arg_0 ) ) ) ) arg_9 . append ( assert_util . assert_equal ( arg_6 , arg_0 . batch_shape_tensor ( ) , message = ( "Broadcasting is not supported; " "unexpected batch shape." ) , name = "assert_batch_shape_same" ) ) with tf . control_dependencies ( arg_9 ) : return arg_1 [ : arg_5 ]

Return HgResource object for path.

        See DAVProvider.get_resource_inst()


Question: Builds the SQL INSERT statement .

def Func ( arg_0 , arg_1 = False ) : arg_2 = [ arg_0 . _rewrite_insert ( sql , params , arg_1 ) for sql , params in super ( ) . Func ( ) ] return arg_2

Given model params, figure out the correct parameters for the
  RandomDistributed encoder. Modifies params in place.


Question: Return new rrule with same attributes except for those attributes given new values by whichever keyword arguments are specified .

def Func ( arg_0 , ** arg_1 ) : arg_2 = { "interval" : arg_0 . _interval , "count" : arg_0 . _count , "dtstart" : arg_0 . _dtstart , "freq" : arg_0 . _freq , "until" : arg_0 . _until , "wkst" : arg_0 . _wkst , "cache" : False if arg_0 . _cache is None else True } arg_2 . update ( arg_0 . _original_rule ) arg_2 . update ( arg_1 ) return rrule ( ** arg_2 )

Manage the response when the server rejects a message.

        An undo is when required this client sends a message that the server
        refuses to pass on to the other clients playing the game.  When this
        happens, the client must undo the changes that the message made to the
        world before being sent or crash.  Note that unlike sync requests, undo
        requests are only reported to the client that sent the offending
        message.


Question: Predict the skeleton of the graph from raw data .

def Func ( arg_0 , arg_1 , arg_2 = 0.05 , ** arg_3 ) : arg_4 = arg_3 . get ( "nb_jobs" , SETTINGS . NB_JOBS ) arg_5 = list ( arg_1 . columns . values ) if arg_4 != 1 : arg_6 = Parallel ( n_jobs = arg_4 ) ( delayed ( arg_0 . run_feature_selection ) ( arg_1 , arg_13 , arg_7 , ** arg_3 ) for arg_7 , arg_13 in enumerate ( arg_5 ) ) else : arg_6 = [ arg_0 . run_feature_selection ( arg_1 , arg_13 , arg_7 , ** arg_3 ) for arg_7 , arg_13 in enumerate ( arg_5 ) ] for arg_7 , arg_8 in enumerate ( arg_6 ) : try : arg_8 . insert ( arg_7 , 0 ) except AttributeError : arg_6 [ arg_7 ] = np . insert ( arg_8 , arg_7 , 0 ) arg_9 = np . array ( arg_6 ) arg_9 *= arg_9 . transpose ( ) np . fill_diagonal ( arg_9 , 0 ) arg_9 /= 2 arg_10 = nx . Graph ( ) for ( arg_8 , arg_11 ) , arg_12 in np . ndenumerate ( arg_9 ) : if arg_9 [ arg_8 , arg_11 ] > arg_2 : arg_10 . add_edge ( arg_5 [ arg_8 ] , arg_5 [ arg_11 ] , weight = arg_9 [ arg_8 , arg_11 ] ) for arg_13 in arg_5 : if arg_13 not in arg_10 . nodes ( ) : arg_10 . add_node ( arg_13 ) return arg_10

For use in tests; applied UTC timestamp to DataFrame.


Question: Play the video and block whilst the video is playing

def Func ( arg_0 ) : arg_0 . play ( ) logger . info ( "Playing synchronously" ) try : time . sleep ( 0.05 ) logger . debug ( "Wait for playing to start" ) while arg_0 . is_playing ( ) : time . sleep ( 0.05 ) except DBusException : logger . error ( "Cannot play synchronously any longer as DBus calls timed out." )


Question: Return the normalized common Sift4 similarity of two terms .

def Func ( arg_0 , arg_1 , arg_2 = 5 , arg_3 = 0 ) : return Sift4 ( ) . sim ( arg_0 , arg_1 , arg_2 , arg_3 )

Show Program Landing page for the Enterprise's Program.

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

        Unauthenticated learners will be redirected to enterprise-linked SSO.

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


Question: Gets the next colour in the Geckoboard colour list .

def Func ( ) : arg_0 = settings . GECKOBOARD_COLOURS [ Func . cur_colour ] Func . cur_colour += 1 if Func . cur_colour >= len ( settings . GECKOBOARD_COLOURS ) : Func . cur_colour = 0 return arg_0

Fit structure-based AD. The training model  memorizes the unique set of reaction signature.

        Parameters
        ----------
        X : after read rdf file

        Returns
        -------
        self : object


Question: Looks up a component by its name .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . Funcs ( ) return arg_2 [ arg_1 ] if arg_1 in arg_2 else None

Generate RENEWING time.

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

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


Question: Applies the Differential evolution algorithm to minimize a function .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = 50 , arg_4 = 1. , arg_5 = 100 , arg_6 = 0 , arg_7 = 1e-8 , arg_8 = 0.5 , arg_9 = 0.9 , arg_10 = None , arg_11 = None ) : if arg_1 is None and arg_2 is None : raise ValueError ( 'Either the initial population or the initial position ' 'must be specified.' ) if arg_1 is not None and arg_2 is not None : raise ValueError ( 'Only one of initial population or initial position ' 'should be specified' ) with tf . compat . v1 . name_scope ( arg_11 , default_name = 'Func' , values = [ arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 , arg_8 , arg_9 ] ) : ( arg_12 , arg_13 , arg_14 , arg_5 , arg_6 , arg_7 , arg_8 , arg_9 ) = _get_initial_args ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 , arg_8 , arg_9 , arg_10 ) def evolve_body ( arg_15 ) : arg_16 , arg_17 = one_step ( arg_0 , arg_15 . population , arg_14 = arg_15 . population_values , arg_8 = arg_8 , arg_9 = arg_9 , arg_10 = arg_10 ) arg_18 = _check_convergence ( arg_16 , arg_17 , arg_6 , arg_7 ) arg_19 = _check_failure ( arg_17 ) return [ _MinimizeLoopVars ( arg_18 = arg_18 , arg_19 = arg_19 , num_iterations = arg_15 . num_iterations + 1 , arg_13 = arg_16 , arg_14 = arg_17 ) ] def evolve_cond ( arg_15 ) : arg_20 = ( arg_15 . failed | arg_15 . converged | ( arg_5 is not None and arg_15 . num_iterations >= arg_5 ) ) return ~ arg_20 arg_21 = _MinimizeLoopVars ( arg_18 = tf . convert_to_tensor ( value = False ) , arg_19 = tf . convert_to_tensor ( value = False ) , num_iterations = tf . convert_to_tensor ( value = 0 ) , arg_13 = arg_13 , arg_14 = arg_14 ) arg_22 = tf . while_loop ( cond = evolve_cond , body = evolve_body , arg_15 = ( arg_21 , ) ) [ 0 ] arg_23 , arg_24 = _find_best_in_population ( arg_22 . population , arg_22 . population_values ) arg_25 = arg_22 . population if not arg_12 : arg_25 = arg_25 [ 0 ] arg_23 = arg_23 [ 0 ] return DifferentialEvolutionOptimizerResults ( arg_18 = arg_22 . converged , arg_19 = arg_22 . failed , position = arg_23 , objective_value = arg_24 , arg_25 = arg_25 , final_objective_values = arg_22 . population_values , arg_1 = arg_13 , initial_objective_values = arg_14 , num_iterations = arg_22 . num_iterations )

Returns protobuf mapcontainer. Read from translation file.


Question: Find the href destinations of all links at URL

def Func ( arg_0 ) : arg_0 = protocolise ( arg_0 ) arg_1 = requests . get ( arg_0 ) . content arg_2 = StringIO ( arg_1 ) arg_3 = html . parse ( arg_2 ) . getroot ( ) arg_4 = arg_3 . cssselect ( 'a' ) arg_5 = [ a . attrib [ 'href' ] for a in arg_4 ] arg_5 = [ h if h . startswith ( 'http' ) else '/' . join ( [ arg_0 , h ] ) for h in arg_5 ] return arg_5

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


Question: The default pass manager that maps to the coupling map .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = PassManager ( ) arg_4 . property_set [ 'layout' ] = arg_2 arg_4 . append ( Unroller ( arg_0 ) ) arg_4 . append ( TrivialLayout ( arg_1 ) , condition = lambda arg_5 : not arg_5 [ 'layout' ] ) arg_4 . append ( CheckMap ( arg_1 ) ) arg_4 . append ( DenseLayout ( arg_1 ) , condition = lambda arg_5 : not arg_5 [ 'is_swap_mapped' ] ) arg_4 . append ( FullAncillaAllocation ( arg_1 ) ) arg_4 . append ( EnlargeWithAncilla ( ) ) arg_4 . append ( Unroll3qOrMore ( ) ) arg_4 . append ( LegacySwap ( arg_1 , trials = 20 , seed = arg_3 ) ) arg_4 . append ( Decompose ( SwapGate ) ) arg_4 . append ( CXDirection ( arg_1 ) ) arg_4 . append ( Unroller ( [ 'u1' , 'u2' , 'u3' , 'id' , 'cx' ] ) ) arg_6 = [ Optimize1qGates ( ) , CXCancellation ( ) , RemoveResetInZeroState ( ) ] arg_4 . append ( arg_6 + [ Depth ( ) , FixedPoint ( 'depth' ) ] , do_while = lambda arg_5 : not arg_5 [ 'depth_fixed_point' ] ) return arg_4

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

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


Question: scanProcessForMapping - Searches a given pid s mappings for a certain pattern .

def Func ( arg_0 , arg_1 , arg_2 = False , arg_3 = False ) : try : try : arg_0 = int ( arg_0 ) except ValueError as e : sys . stderr . write ( 'Expected an integer, got %s for pid.\n' % ( str ( type ( arg_0 ) ) , ) ) raise e with open ( '/proc/%d/maps' % ( arg_0 , ) , 'r' ) as f : arg_4 = f . read ( ) arg_5 = arg_4 . split ( '\n' ) arg_6 = [ ] if arg_2 is True : if arg_3 is False : arg_7 = lambda searchFor , searchIn : bool ( searchFor == searchIn ) else : arg_7 = lambda searchFor , searchIn : bool ( searchFor . lower ( ) == searchIn . lower ( ) ) else : if arg_3 is False : arg_7 = lambda searchFor , searchIn : bool ( searchFor in searchIn ) else : arg_7 = lambda searchFor , searchIn : bool ( searchFor . lower ( ) in searchIn . lower ( ) ) for arg_8 in arg_5 : arg_9 = ' ' . join ( arg_8 . split ( ' ' ) [ 5 : ] ) . lstrip ( ) if arg_7 ( arg_1 , arg_9 ) : arg_6 . append ( '\t' + arg_8 ) if len ( arg_6 ) == 0 : return None arg_10 = getProcessCommandLineStr ( arg_0 ) arg_11 = getProcessOwnerStr ( arg_0 ) return { 'searchPortion' : arg_1 , 'pid' : arg_0 , 'owner' : arg_11 , 'cmdline' : arg_10 , 'matchedMappings' : arg_6 , } except OSError : return None except IOError : return None except FileNotFoundError : return None except PermissionError : return None


Question: Patch pexpect to prevent unhandled exceptions at VM teardown .

def Func ( ) : if arg_1 . __version__ [ : 3 ] >= '2.2' : return def arg_3 ( arg_0 ) : if not arg_0 . closed : try : arg_0 . close ( ) except AttributeError : pass arg_1 . spawn . __del__ = arg_3

This call returns an array of symbols that IEX Cloud supports for API calls.

    https://iexcloud.io/docs/api/#symbols
    8am, 9am, 12pm, 1pm UTC daily

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

    Returns:
        dataframe: result


Question: List running QTM instances asks for input and return chosen QTM

async def Func ( arg_0 ) : arg_1 = { } print ( "Available QTM instances:" ) async for arg_2 , arg_3 in AsyncEnumerate ( qtm . Discover ( arg_0 ) , start = 1 ) : arg_1 [ arg_2 ] = arg_3 print ( "{} - {}" . format ( arg_2 , arg_3 . info ) ) try : arg_4 = int ( input ( "Connect to: " ) ) if arg_4 not in arg_1 : raise ValueError except ValueError : LOG . error ( "Invalid choice" ) return None return arg_1 [ arg_4 ] . host

Stop the timer

        Returns:
            The time the timer was stopped


Question: Gets a completely - optimized state from an image and an initial guess of particle positions and radii .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = None , arg_5 = '' , arg_6 = False , arg_7 = { } , ** arg_8 ) : if np . size ( arg_1 ) == 0 : raise ValueError ( '`pos` is an empty array.' ) elif np . shape ( arg_1 ) [ 1 ] != 3 : raise ValueError ( '`pos` must be an [N,3] element numpy.ndarray.' ) arg_9 , arg_3 = _pick_state_im_name ( '' , arg_3 , arg_6 = arg_6 ) arg_10 = util . RawImage ( arg_3 , arg_4 = arg_4 ) arg_11 = arg_0 ( arg_10 , arg_1 , arg_2 , ** arg_7 ) RLOG . info ( 'State Created.' ) if arg_5 is not None : states . save ( arg_11 , arg_5 = arg_5 + 'initial' ) optimize_from_initial ( arg_11 , arg_5 = arg_5 , ** arg_8 ) return arg_11


Question: Get the content ratings for a TV Series .

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

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


Question: scan an ABF directory and subdirectory . Try to do this just once . Returns ABF files SWHLab files and groups .

def Func ( arg_0 ) : assert os . path . isdir ( arg_0 ) arg_1 = forwardSlash ( sorted ( glob . glob ( arg_0 + "/*.*" ) ) ) arg_2 = [ ] if os . path . exists ( arg_0 + "/swhlab4/" ) : arg_2 = forwardSlash ( sorted ( glob . glob ( arg_0 + "/swhlab4/*.*" ) ) ) arg_3 = getABFgroups ( arg_1 ) return arg_1 , arg_2 , arg_3


Question: Ensure all directories are created for a given target file .

def Func ( arg_0 , arg_1 ) : arg_2 = os . path . dirname ( arg_1 ) if arg_2 and arg_2 != PATH_SEP and not os . path . isdir ( arg_2 ) : try : os . makedirs ( arg_2 ) except OSError as ose : if ose . errno != errno . EEXIST : raise Failure ( 'Unable to create directory (%s)' % ( arg_2 , ) )


Question: Decode a file .

def Func ( arg_0 , arg_1 ) : while True : arg_2 = arg_0 . readline ( ) if not arg_2 : break arg_3 = binascii . a2b_base64 ( arg_2 ) arg_1 . write ( arg_3 )

This function creates the command list from available information


Question: in reversed order

def Func ( arg_0 ) : arg_1 = arg_0 while arg_1 is not None : yield arg_1 . data arg_1 = arg_1 . prev


Question: Access the spotify search functionality .

async def Func ( arg_0 , arg_1 : arg_2 , * , arg_3 : arg_4 [ arg_5 [ arg_2 ] ] = [ 'track' , 'playlist' , 'artist' , 'album' ] , arg_6 : arg_4 [ arg_7 ] = 20 , arg_8 : arg_4 [ arg_7 ] = 0 , arg_9 : arg_4 [ arg_2 ] = None ) -> Dict [ arg_2 , List [ Union [ Track , Playlist , Artist , Album ] ] ] : if not hasattr ( arg_3 , '__iter__' ) : raise TypeError ( 'types must be an iterable.' ) elif not isinstance ( arg_3 , list ) : arg_3 = list ( item for item in arg_3 ) arg_10 = set ( arg_3 ) if not arg_10 . issubset ( _SEARCH_TYPES ) : raise ValueError ( _SEARCH_TYPE_ERR % arg_10 . difference ( _SEARCH_TYPES ) . pop ( ) ) arg_11 = { 'q' : arg_1 . replace ( ' ' , '+' ) , 'queary_type' : ',' . join ( tp . strip ( ) for tp in arg_3 ) , 'market' : arg_9 , 'limit' : arg_6 , 'offset' : arg_8 } arg_12 = await arg_0 . http . Func ( ** arg_11 ) return { arg_14 : [ _TYPES [ arg_13 [ 'type' ] ] ( arg_0 , arg_13 ) for arg_13 in arg_15 [ 'items' ] ] for arg_14 , arg_15 in arg_12 . items ( ) }

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


Question: Mark a function as callable from the command line .

def Func ( arg_0 , arg_1 = None ) : if hasattr ( arg_0 , 'metadata' ) : if arg_1 is not None : arg_0 . metadata = AnnotatedMetadata ( arg_0 , arg_1 ) return arg_0 arg_0 . metadata = AnnotatedMetadata ( arg_0 , arg_1 ) arg_0 . finalizer = False arg_0 . takes_cmdline = False arg_0 . decorated = False arg_0 . context = False return arg_0

Unregister an extension code.  For testing only.


Question: Calculates the next motion frame for the flock .

def Func ( arg_0 , arg_1 = True , arg_2 = 100 , arg_3 = 10 , arg_4 = 5 , arg_5 = 20 , arg_6 = 30 ) : from random import shuffle if arg_1 : shuffle ( arg_0 ) arg_7 = 1.0 arg_8 = 1.0 arg_9 = 1.0 arg_10 = 1.0 if not arg_0 . scattered and _ctx . random ( ) < arg_0 . _scatter : arg_0 . scattered = True if arg_0 . scattered : arg_7 = - arg_7 arg_9 *= 0.25 arg_0 . _scatter_i += 1 if arg_0 . _scatter_i >= arg_0 . _scatter_t : arg_0 . scattered = False arg_0 . _scatter_i = 0 if not arg_0 . has_goal : arg_10 = 0 if arg_0 . flee : arg_10 = - arg_10 for arg_13 in arg_0 : if arg_13 . is_perching : if arg_13 . _perch_t > 0 : arg_13 . _perch_t -= 1 continue else : arg_13 . is_perching = False arg_15 , arg_16 , arg_17 = arg_13 . cohesion ( arg_2 ) arg_18 , arg_19 , arg_20 = arg_13 . separation ( arg_3 ) arg_21 , arg_22 , arg_23 = arg_13 . alignment ( arg_4 ) arg_24 , arg_25 , arg_26 = arg_13 . goal ( arg_0 . _gx , arg_0 . _gy , arg_0 . _gz , arg_5 ) arg_13 . vx += arg_7 * arg_15 + arg_8 * arg_18 + arg_9 * arg_21 + arg_10 * arg_24 arg_13 . vy += arg_7 * arg_16 + arg_8 * arg_19 + arg_9 * arg_22 + arg_10 * arg_25 arg_13 . vz += arg_7 * arg_17 + arg_8 * arg_20 + arg_9 * arg_23 + arg_10 * arg_26 arg_13 . limit ( arg_6 ) arg_13 . x += arg_13 . vx arg_13 . y += arg_13 . vy arg_13 . z += arg_13 . vz arg_0 . constrain ( )

Generates a random sample from the Poisson probability distribution and
    returns its value and the log of the probability of sampling that value.


Question: Return bounds range values from geolocated input .

def Func ( arg_0 = None , arg_1 = None , arg_2 = None ) : return itertools . chain ( * from_bounds ( * arg_0 , transform = arg_1 , height = arg_2 [ - 2 ] , width = arg_2 [ - 1 ] ) . round_lengths ( pixel_precision = 0 ) . round_offsets ( pixel_precision = 0 ) . toranges ( ) )

Reassemble a Binder object coming out of the database.


Question: Implement a lookup for object level permissions . Basically the same as ModelAdmin . has_change_permission but also passes the obj parameter in .

def Func ( arg_0 , arg_1 , arg_2 = None ) : if settings . TREE_EDITOR_OBJECT_PERMISSIONS : arg_3 = arg_0 . opts arg_4 = arg_1 . user . has_perm ( arg_3 . app_label + '.' + arg_3 . get_change_permission ( ) , arg_2 ) else : arg_4 = True return arg_4 and super ( TreeEditor , arg_0 ) . Func ( arg_1 , arg_2 )

Action on renewing on RENEWING state.

        Not recording lease, but restarting timers.


Question: Substitute constants in expression unless it is already a number .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , numbers . Number ) : return arg_1 else : return arg_1 . subs ( arg_0 . constants )

Create an interrupt event handle.

        The parent process should use this static method for creating the
        interrupt event that is passed to the child process. It should store
        this handle and use it with ``send_interrupt`` to interrupt the child
        process.


Question: Determines whether or not the target string matches any of the regular expressions specified .

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

Returns the maximum delay for the InferenceElements in the inference
    dictionary

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


Question: Adds a new extracted license to the document . Raises SPDXValueError if data format is incorrect .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . reset_extr_lics ( ) if validations . validate_extracted_lic_id ( arg_2 ) : arg_1 . add_extr_lic ( document . ExtractedLicense ( arg_2 ) ) return True else : raise SPDXValueError ( 'ExtractedLicense::id' )

Temporal distance probability density function.

        Returns
        -------
        non_delta_peak_split_points: numpy.array
        non_delta_peak_densities: numpy.array
            len(density) == len(temporal_distance_split_points_ordered) -1
        delta_peak_loc_to_probability_mass : dict


Question: Update repository from its remote .

def Func ( arg_0 ) : arg_1 = [ 'git' , 'fetch' , 'origin' , '+refs/heads/*:refs/heads/*' , '--prune' ] arg_0 . _exec ( arg_1 , cwd = arg_0 . dirpath , env = arg_0 . gitenv ) logger . debug ( "Git %s repository Funcd into %s" , arg_0 . uri , arg_0 . dirpath )

Set the rotation of this body using a rotation matrix.

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