Question: Store the HTTP status and headers to be sent when self . write is called .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : if arg_3 : try : if arg_0 . headers_sent : raise finally : arg_3 = None elif arg_0 . header_set : raise AssertionError ( "Headers already set!" ) if PY3K and not isinstance ( arg_1 , str ) : arg_0 . status = str ( arg_1 , 'ISO-8859-1' ) else : arg_0 . status = arg_1 try : arg_0 . header_set = Headers ( arg_2 ) except UnicodeDecodeError : arg_0 . error = ( '500 Internal Server Error' , 'HTTP Headers should be bytes' ) arg_0 . err_log . error ( 'Received HTTP Headers from client that contain' ' invalid characters for Latin-1 encoding.' ) return arg_0 . write_warning

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

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


Question: Open input data .

def Func ( arg_0 , arg_1 , ** arg_2 ) : if not isinstance ( arg_1 , str ) : return arg_1 . Func ( arg_0 . tile , ** arg_2 ) if arg_1 not in arg_0 . params [ "input" ] : raise ValueError ( "%s not found in config as input file" % arg_1 ) return arg_0 . params [ "input" ] [ arg_1 ] . Func ( arg_0 . tile , ** arg_2 )

Creates the variational distribution for LDA.

  Args:
    activation: Activation function to use.
    num_topics: The number of topics.
    layer_sizes: The number of hidden units per layer in the encoder.

  Returns:
    lda_variational: A function that takes a bag-of-words Tensor as
      input and returns a distribution over topics.


Question: insert default options to sys . argv

def Func ( ) : arg_0 = get_default_options ( ) arg_0 . reverse ( ) for arg_1 in arg_0 : sys . argv . insert ( 1 , arg_1 )

Returns how the result count compares to the query options.

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

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


Question: Returns the envelope of a LogGabor

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 = True ) : arg_8 = np . multiply ( arg_0 . band ( arg_3 , arg_4 ) , arg_0 . orientation ( arg_5 , arg_6 ) ) if not ( arg_1 == 0. ) and not ( arg_2 == 0. ) : arg_8 = arg_8 . astype ( np . complex128 ) * arg_0 . trans ( arg_1 * 1. , arg_2 * 1. ) if arg_7 : arg_8 *= arg_0 . f_mask arg_8 /= np . sqrt ( ( np . abs ( arg_8 ) ** 2 ) . mean ( ) ) arg_8 *= np . sqrt ( 2. ) return arg_8

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: Given a kmip . pie object and a list of attribute names attempt to get all of the existing attribute values from the object .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = attribute_factory . AttributeFactory ( ) arg_4 = list ( ) if not arg_2 : arg_2 = arg_0 . _attribute_policy . get_all_attribute_names ( ) for arg_5 in arg_2 : arg_6 = arg_1 . _object_type if not arg_0 . _attribute_policy . is_attribute_supported ( arg_5 ) : continue if arg_0 . _attribute_policy . is_attribute_applicable_to_object_type ( arg_5 , arg_6 ) : try : arg_7 = arg_0 . _get_attribute_from_managed_object ( arg_1 , arg_5 ) except Exception : arg_7 = None if arg_7 is not None : if arg_0 . _attribute_policy . is_attribute_multivalued ( arg_5 ) : for arg_8 , arg_9 in enumerate ( arg_7 ) : arg_10 = arg_3 . create_attribute ( enums . AttributeType ( arg_5 ) , arg_9 , arg_8 ) arg_4 . append ( arg_10 ) else : arg_10 = arg_3 . create_attribute ( enums . AttributeType ( arg_5 ) , arg_7 ) arg_4 . append ( arg_10 ) return arg_4

Overriding the default JSONEncoder.default for NDB support.


Question: Replace function name

def Func ( arg_0 : arg_1 , arg_2 : arg_1 ) : arg_3 = arg_0 . splitlines ( ) arg_4 = asttokens . ASTTokens ( arg_0 , parse = True ) for arg_5 in ast . walk ( arg_4 . tree ) : if isinstance ( arg_5 , ast . FunctionDef ) : break arg_6 = arg_5 . first_token . index for arg_6 in range ( arg_5 . first_token . index , arg_5 . last_token . index ) : if ( arg_4 . tokens [ arg_6 ] . type == token . NAME and arg_4 . tokens [ arg_6 ] . string == "def" ) : break arg_7 , arg_8 = arg_4 . tokens [ arg_6 + 1 ] . start arg_9 , arg_10 = arg_4 . tokens [ arg_6 + 1 ] . end assert arg_7 == arg_9 arg_3 [ arg_7 - 1 ] = ( arg_3 [ arg_7 - 1 ] [ : arg_8 ] + arg_2 + arg_3 [ arg_7 - 1 ] [ arg_10 : ] ) return "\n" . join ( arg_3 ) + "\n"

Read attribute from sysfs and return as string


Question: Check the model for integrity violations on an association in a particular direction .

def Func ( arg_0 , arg_1 ) : arg_2 = 0 for arg_3 in arg_1 . from_metaclass . select_many ( ) : arg_4 = list ( arg_1 . navigate ( arg_3 ) ) if ( len ( arg_4 ) < 1 and not arg_1 . conditional ) or ( ( len ( arg_4 ) > 1 and not arg_1 . many ) ) : arg_2 += 1 logger . warning ( 'integrity violation in ' '%s --(%s)--> %s' % ( pretty_from_link ( arg_3 , arg_1 ) , arg_1 . rel_id , pretty_to_link ( arg_3 , arg_1 ) ) ) return arg_2

Calls `fn` with `args`, possibly expanding `args`.

  Use this function when calling a user-provided callable using user-provided
  arguments.

  The expansion rules are as follows:

  `fn(*args)` if `args` is a `list` or a `tuple`, but not a `namedtuple`.
  `fn(**args)` if `args` is a `dict`.
  `fn(args)` otherwise.

  Args:
    fn: A callable that takes either `args` as an argument(s).
    args: Arguments to `fn`.

  Returns:
    result: Return value of `fn`.


Question: Check the main diagonal of Q and fix it in case it does not corresond the definition of the rate matrix . Should be run every time when creating custom GTR model .

def Func ( arg_0 , arg_1 = False ) : arg_0 . Pi /= arg_0 . Pi . sum ( ) arg_0 . W += arg_0 . break_degen + arg_0 . break_degen . T np . fill_diagonal ( arg_0 . W , 0 ) arg_2 = - ( arg_0 . Q ) . sum ( axis = 0 ) / arg_0 . Pi np . fill_diagonal ( arg_0 . W , arg_2 ) arg_3 = - np . sum ( np . diagonal ( arg_0 . Q ) * arg_0 . Pi ) arg_0 . W /= arg_3 if not arg_1 : arg_0 . mu *= arg_3 if ( arg_0 . Q . sum ( axis = 0 ) < 1e-10 ) . sum ( ) < arg_0 . alphabet . shape [ 0 ] : print ( "Cannot fix the diagonal of the GTR rate matrix. Should be all zero" , arg_0 . Q . sum ( axis = 0 ) ) import ipdb ipdb . set_trace ( ) raise ArithmeticError ( "Cannot fix the diagonal of the GTR rate matrix." )

Cycles through notifications with latest results from data feeds.


Question: Get list of items in given GUI .

def Func ( arg_0 , arg_1 ) : try : arg_2 , arg_3 , arg_4 = arg_0 . _get_window_handle ( arg_1 , True ) arg_5 = arg_0 . _get_appmap ( arg_2 , arg_3 , True ) except atomac . _a11y . ErrorInvalidUIElement : arg_0 . _windows = { } arg_2 , arg_3 , arg_4 = arg_0 . _get_window_handle ( arg_1 , True ) arg_5 = arg_0 . _get_appmap ( arg_2 , arg_3 , True ) return arg_5 . keys ( )

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


Question: Creates a TFS TFVC Client to pull TFVC repo info

def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_1 = os . environ . get ( 'TFS_API_TOKEN' , None ) arg_2 = create_tfs_connection ( arg_0 , arg_1 ) arg_3 = arg_2 . get_client ( 'vsts.tfvc.v4_1.tfvc_client.TfvcClient' ) if arg_3 is None : arg_4 = 'Unable to create TFS Git Client, failed to connect to TFS Enterprise (%s) with provided token.' raise RuntimeError ( arg_4 , arg_0 ) return arg_3

Does this schedule include the provided time?
        query_date and query_time are date and time objects, interpreted
        in this schedule's timezone


Question: When calculating the rowspan for a given cell it is required to find all table cells below the initial cell with a v_merge . This function will return the td element at the passed in index taking into account colspans .

def Func ( arg_0 , arg_1 ) : arg_2 = 0 for arg_3 in arg_0 . xpath ( './/w:tc' , namespaces = arg_0 . nsmap ) : if arg_1 == arg_2 : return arg_3 arg_2 += get_grid_span ( arg_3 )


Question: Return a list of bits in the given condition .

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] if arg_1 is not None : arg_2 . extend ( [ ( arg_1 [ 0 ] , arg_3 ) for arg_3 in range ( arg_0 . cregs [ arg_1 [ 0 ] . name ] . size ) ] ) return arg_2

Update the profile picture for the current user.

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


Question: Emit a warning message .

def Func ( arg_0 ) : _flush ( ) sys . stderr . write ( "\033[1;7;33;40mWARNING: {}\033[0m\n" . format ( arg_0 ) ) sys . stderr . flush ( )


Question: Construct a list of CodeUnits from polymorphic inputs .

def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_0 , ( list , tuple ) ) : arg_0 = [ arg_0 ] arg_2 = [ ] for arg_3 in arg_0 : if isinstance ( arg_3 , string_class ) and ( '?' in arg_3 or '*' in arg_3 ) : arg_2 . extend ( glob . glob ( arg_3 ) ) else : arg_2 . append ( arg_3 ) arg_0 = arg_2 arg_4 = [ CodeUnit ( arg_3 , arg_1 ) for arg_3 in arg_0 ] return arg_4

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Copy outputs from local disk to GCS .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = [ ] for arg_5 in arg_2 : if arg_5 . recursive or not arg_5 . value : continue arg_6 = arg_5 . uri . path arg_7 = arg_1 + '/' + _DATA_SUBDIR + '/' + arg_5 . docker_path if arg_5 . file_provider == job_model . P_LOCAL : arg_4 . append ( 'mkdir -p "%s"' % arg_6 ) if arg_5 . file_provider in [ job_model . P_LOCAL , job_model . P_GCS ] : if arg_3 : arg_8 = 'gsutil -u %s -mq cp "%s" "%s"' % ( arg_3 , arg_7 , arg_6 ) else : arg_8 = 'gsutil -mq cp "%s" "%s"' % ( arg_7 , arg_6 ) arg_4 . append ( arg_8 ) return '\n' . join ( arg_4 )

Reassemble a Binder object coming out of the database.


Question: Start analyzing function body .

def Func ( arg_0 , arg_1 ) : arg_0 . in_a_function = True arg_0 . lines_in_function = 0 arg_0 . current_function = arg_1

Unlock a message for processing by other receivers on a given
        subscription. This operation deletes the lock object, causing the
        message to be unlocked. A message must have first been locked by a
        receiver before this operation is called.

        topic_name:
            Name of the topic.
        subscription_name:
            Name of the subscription.
        sequence_number:
            The sequence number of the message to be unlocked as returned in
            BrokerProperties['SequenceNumber'] by the Peek Message operation.
        lock_token:
            The ID of the lock as returned by the Peek Message operation in
            BrokerProperties['LockToken']


Question: Build SQL with decryption and casting .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 , arg_4 = super ( DecryptedCol , arg_0 ) . Func ( arg_1 , arg_2 ) arg_3 = arg_0 . target . get_decrypt_sql ( arg_2 ) % ( arg_3 , arg_0 . target . get_cast_sql ( ) ) return arg_3 , arg_4

Returns HTML5 Boilerplate CSS file.
    Included in HTML5 Boilerplate.


Question: Add an example to the list of examples checking it first .

def Func ( arg_0 , arg_1 ) : arg_0 . check_example ( arg_1 ) arg_0 . examples . append ( arg_1 )

Decode the data passed in and potentially flush the decoder.


Question: Get the number of the shell command .

def Func ( arg_0 ) : arg_0 . __results = arg_0 . execute ( arg_0 . args . command ) arg_0 . close ( ) arg_0 . logger . debug ( "results: {}" . format ( arg_0 . __results ) ) if not arg_0 . __results : arg_0 . unknown ( "{} return nothing." . format ( arg_0 . args . command ) ) if len ( arg_0 . __results ) != 1 : arg_0 . unknown ( "{} return more than one number." . format ( arg_0 . args . command ) ) arg_0 . __result = int ( arg_0 . __results [ 0 ] ) arg_0 . logger . debug ( "result: {}" . format ( arg_0 . __result ) ) if not isinstance ( arg_0 . __result , ( int , long ) ) : arg_0 . unknown ( "{} didn't return single number." . format ( arg_0 . args . command ) ) arg_3 = arg_0 . ok if arg_0 . __result > arg_0 . args . warning : arg_3 = arg_0 . warning if arg_0 . __result > arg_0 . args . critical : arg_3 = arg_0 . critical arg_0 . shortoutput = "{0} return {1}." . format ( arg_0 . args . command , arg_0 . __result ) [ arg_0 . longoutput . append ( arg_5 ) for arg_5 in arg_0 . __results if arg_0 . __results ] arg_0 . perfdata . append ( "{command}={result};{warn};{crit};0;" . format ( crit = arg_0 . args . critical , warn = arg_0 . args . warning , result = arg_0 . __result , command = arg_0 . args . command ) ) arg_3 ( arg_0 . output ( long_output_limit = None ) ) arg_0 . logger . debug ( "Return status and exit to Nagios." )

Processes and saves a resized thumbnail version of the image.


Question: Return Lovins condition K .

Returns opened file object for writing dialog logs.

        Returns:
            log_file: opened Python file object.


Question: Writes out Gin s operative config and maybe adds a summary of it .

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_3 = config . operative_config_str ( ) if not tf . gfile . IsDirectory ( arg_0 . _output_dir ) : tf . gfile . MakeDirs ( arg_0 . _output_dir ) arg_4 = 0 if arg_1 is not None : arg_5 = tf . train . get_global_step ( ) if arg_5 is not None : arg_4 = arg_1 . run ( arg_5 ) arg_6 = '%s-%s.gin' % ( arg_0 . _base_name , arg_4 ) arg_7 = os . path . join ( arg_0 . _output_dir , arg_6 ) with tf . gfile . GFile ( arg_7 , 'w' ) as f : f . write ( arg_3 ) if arg_0 . _summarize_config : arg_8 = arg_0 . _markdownify_operative_config_str ( arg_3 ) arg_9 = summary_pb2 . SummaryMetadata ( ) arg_9 . plugin_data . plugin_name = 'text' arg_9 . plugin_data . content = b'{}' arg_13 = tf . make_tensor_proto ( arg_8 ) arg_14 = summary_pb2 . Summary ( ) arg_14 . value . add ( tag = 'gin/' + arg_0 . _base_name , tensor = arg_13 , metadata = arg_9 ) if not arg_0 . _summary_writer : arg_0 . _summary_writer = tf . summary . FileWriterCache . get ( arg_0 . _output_dir ) arg_0 . _summary_writer . add_summary ( arg_14 , arg_4 ) arg_0 . _summary_writer . flush ( )

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


Question: Verify and remove magic

def Func ( arg_0 , arg_1 ) : if not arg_0 . magic : return arg_1 arg_2 = len ( arg_0 . magic ) arg_3 = arg_1 [ : arg_2 ] if arg_3 != arg_0 . magic : raise Exception ( 'Invalid magic' ) arg_1 = arg_1 [ arg_2 : ] return arg_1

CD sled position control case study of Chapter 18.

    The function returns the closed-loop and open-loop
    system function for a CD/DVD sled position control
    system. The loop amplifier gain is the only variable
    that may be changed. The returned system function can
    however be changed.

    Parameters
    ----------
    Ka : loop amplifier gain, start with 50.
    out_type : 'open_loop' for open loop system function
    out_type : 'fb_approx' for closed-loop approximation
    out_type : 'fb_exact' for closed-loop exact

    Returns
    -------
    b : numerator coefficient ndarray
    a : denominator coefficient ndarray

    Notes
    -----
    With the exception of the loop amplifier gain, all
    other parameters are hard-coded from Case Study example.

    Examples
    --------
    >>> b,a = position_CD(Ka,'fb_approx')
    >>> b,a = position_CD(Ka,'fb_exact')


Question: synthesize all subunits make connections between them build entity and component for this unit

def Func ( arg_0 , arg_1 : arg_2 ) : assert not arg_0 . _wasSynthetised ( ) arg_0 . _targetPlatform = arg_1 if not hasattr ( arg_0 , "_name" ) : arg_0 . _name = arg_0 . _getDefaultName ( ) for arg_5 in arg_1 . beforeToRtl : arg_5 ( arg_0 ) arg_0 . _ctx . params = arg_0 . _buildParams ( ) arg_0 . _externInterf = [ ] for arg_9 in arg_0 . _units : yield from arg_9 . Func ( arg_1 ) for arg_9 in arg_0 . _units : arg_10 = arg_9 . _name arg_9 . _signalsForMyEntity ( arg_0 . _ctx , "sig_" + arg_10 ) for arg_11 in arg_0 . _interfaces : arg_12 = arg_11 . _signalsForInterface ( arg_0 . _ctx ) if arg_11 . _isExtern : arg_0 . _externInterf . extend ( arg_12 ) for arg_5 in arg_1 . beforeToRtlImpl : arg_5 ( arg_0 ) arg_0 . _loadMyImplementations ( ) yield from arg_0 . _lazyLoaded if not arg_0 . _externInterf : raise IntfLvlConfErr ( "Can not find any external interface for unit %s" "- unit without interfaces are not allowed" % arg_0 . _name ) for arg_5 in arg_1 . afterToRtlImpl : arg_5 ( arg_0 ) yield from arg_0 . _synthetiseContext ( arg_0 . _externInterf ) arg_0 . _checkArchCompInstances ( ) for arg_5 in arg_1 . afterToRtl : arg_5 ( arg_0 )

Write the index.html file for this report.


Question: Takes a record and returns true if record meets filter criteria false otherwise

def Func ( arg_0 , arg_1 ) : for ( arg_2 , arg_3 , arg_4 ) in arg_0 : arg_5 = dict ( ) arg_5 [ 'value' ] = arg_1 [ arg_2 ] arg_5 [ 'acceptValues' ] = arg_4 [ 'acceptValues' ] arg_5 [ 'min' ] = arg_4 [ 'min' ] arg_5 [ 'max' ] = arg_4 [ 'max' ] if not arg_3 ( arg_5 ) : return False return True

Return True if we should retry, False otherwise.


Question: Ensure that the wrapped API client s response brings us valid data . If not raise an error and log it .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : if not arg_2 : arg_3 = ( arg_3 or "Unable to fetch API response from endpoint '{}'." . format ( arg_1 . get_full_path ( ) ) ) LOGGER . error ( arg_3 ) raise NotFound ( arg_3 )


Question: Decode something with SECRET_KEY .

def Func ( arg_0 ) : arg_1 = current_app . config . get ( 'SECRET_KEY' ) arg_2 = URLSafeSerializer ( arg_1 ) try : return arg_2 . loads ( arg_0 ) except BadSignature : return None

Rename this conversation.

        Hangouts only officially supports renaming group conversations, so
        custom names for one-to-one conversations may or may not appear in all
        first party clients.

        Args:
            name (str): New name.

        Raises:
            .NetworkError: If conversation cannot be renamed.


Question: Spawn a server process for this manager object

def Func ( arg_0 , arg_1 = None , arg_2 = ( ) ) : assert arg_0 . _state . value == State . INITIAL if ( arg_1 is not None and not hasattr ( arg_1 , '__call__' ) ) : raise TypeError ( 'initializer must be a callable' ) arg_3 , arg_4 = mp . Pipe ( duplex = False ) arg_0 . _process = Process ( target = type ( arg_0 ) . _run_server , args = ( arg_0 . _registry , arg_0 . _address , bytes ( arg_0 . _authkey ) , arg_0 . _serializer , arg_4 , arg_1 , arg_2 ) , ) arg_6 = ':' . join ( str ( i ) for i in arg_0 . _process . _identity ) arg_0 . _process . name = type ( arg_0 ) . __name__ + '-' + arg_6 arg_0 . _process . Func ( ) arg_4 . close ( ) arg_0 . _address = arg_3 . recv ( ) arg_3 . close ( ) arg_0 . _state . value = State . STARTED arg_0 . shutdown = mp . util . Finalize ( arg_0 , type ( arg_0 ) . _finalize_manager , args = ( arg_0 . _process , arg_0 . _address , arg_0 . _authkey , arg_0 . _state , arg_0 . _Client ) , exitpriority = 0 )

APEv2 tag value factory.

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


Question: Try to read a SVG file if svg_file is a string . Raise an exception in case of error or return the svg object .

def Func ( arg_0 ) : if isinstance ( arg_0 , str ) : try : arg_1 = sg . fromfile ( arg_0 ) except Exception as exc : raise Exception ( 'Error reading svg file {}.' . format ( arg_0 ) ) from exc else : return arg_1 if isinstance ( arg_0 , sg . SVGFigure ) : return arg_0 raise ValueError ( 'Expected `svg_file` to be `str` or `svgutils.SVG`, got {}.' . format ( type ( arg_0 ) ) )


Question: Write as a BEL annotation .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 ) : arg_4 = get_data_dir ( arg_0 ) arg_5 = f'http://purl.obolibrary.org/obo/{keyword}.obo' arg_6 = os . path . join ( arg_4 , f'{keyword}.obo' ) arg_7 = os . path . join ( arg_4 , f'{keyword}.obo.pickle' ) arg_8 = make_obo_getter ( arg_5 , arg_6 , preparsed_path = arg_7 ) arg_9 = arg_8 ( ) convert_obo_graph_to_Func ( arg_9 , arg_2 = arg_2 , )

Override of clean method to perform additional validation


Question: Search for a decoding of the ciphertext .

def Func ( arg_0 , arg_1 ) : arg_0 . ciphertext = arg_1 arg_2 = PermutationDecoderProblem ( Funcr = arg_0 ) return search . best_first_tree_search ( arg_2 , lambda node : arg_0 . score ( node . state ) )

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: Plots a given tree containing hierarchical segmentation .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = "Pastel2" ) : import matplotlib . pyplot as plt def round_time ( arg_4 , arg_1 = 0.1 ) : arg_5 = int ( arg_4 / float ( arg_1 ) ) * arg_1 return arg_5 arg_6 = plt . get_cmap ( arg_3 ) arg_7 = [ ] for arg_8 in arg_0 . levels : if arg_8 == "root" : continue arg_9 = arg_0 . get_segments_in_level ( arg_8 ) arg_7 . append ( arg_9 ) arg_10 = float ( len ( arg_7 ) ) for arg_11 , arg_9 in enumerate ( arg_7 ) : arg_12 = utils . segment_labels_to_floats ( arg_9 ) for arg_13 , arg_14 in zip ( arg_9 , arg_12 ) : if arg_1 is None : arg_15 = arg_13 . start arg_16 = arg_13 . end arg_17 = "Time (seconds)" else : arg_15 = int ( round_time ( arg_13 . start , arg_1 = arg_1 ) / arg_1 ) arg_16 = int ( round_time ( arg_13 . end , arg_1 = arg_1 ) / arg_1 ) arg_17 = "Time (frames)" plt . axvspan ( arg_15 , arg_16 , ymax = ( len ( arg_7 ) - arg_11 ) / arg_10 , ymin = ( len ( arg_7 ) - arg_11 - 1 ) / arg_10 , facecolor = arg_6 ( arg_14 ) ) arg_18 = float ( len ( arg_0 . levels ) - 1 ) plt . yticks ( np . linspace ( 0 , ( arg_18 - 1 ) / arg_18 , num = arg_18 ) + 1 / arg_18 / 2. , arg_0 . levels [ 1 : ] [ : : - 1 ] ) plt . xlabel ( arg_17 ) if arg_2 is not None : plt . title ( arg_2 ) plt . gca ( ) . set_xlim ( [ 0 , arg_16 ] )


Question: check if all menu items are enabled

def Func ( arg_0 , * arg_1 , ** arg_2 ) : for arg_3 in range ( arg_0 . GetMenuItemCount ( ) ) : arg_4 = arg_0 . FindItemByPosition ( arg_3 ) if not arg_4 . Func ( ) : return False return True


Question: Export panel to PDF file

def Func ( arg_0 ) : arg_1 = store . panel ( arg_0 ) arg_2 = controllers . Func ( store , arg_1 ) arg_2 [ 'report_created_at' ] = datetime . datetime . now ( ) . strftime ( "%Y-%m-%d" ) arg_3 = render_template ( 'panels/panel_pdf_simple.html' , ** arg_2 ) return render_pdf ( HTML ( string = arg_3 ) , download_filename = arg_2 [ 'panel' ] [ 'panel_name' ] + '_' + str ( arg_2 [ 'panel' ] [ 'version' ] ) + '_' + datetime . datetime . now ( ) . strftime ( "%Y-%m-%d" ) + '_scout.pdf' )

Whether a connection can be established between those two meshes.


Question: Converts stdout string to a list .

def Func ( arg_0 ) : if arg_0 . _streaming : Func = [ ] while not arg_0 . __stdout . empty ( ) : try : arg_2 = arg_0 . __stdout . get_nowait ( ) Func . append ( arg_2 ) except : pass else : Func = arg_0 . __stdout return Func

Compares and exchanges.

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

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

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

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


Question: Return reStructuredText code block from code string

def Func ( arg_0 , arg_1 = 'python' ) : arg_2 = "\n.. code-block:: {0}\n\n" . format ( arg_1 ) arg_3 = indent ( arg_0 , ' ' * 4 ) return arg_2 + arg_3

Returns the profile with the received ID as a dict

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

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

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


Question: Extract shape of one route .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = 0 for arg_4 , arg_5 , arg_6 in arg_0 . member_info : if arg_5 in arg_1 : yield Shape ( arg_0 . id , arg_1 [ arg_5 ] . lat , arg_1 [ arg_5 ] . lon , arg_3 ) arg_3 += 1 elif arg_5 in arg_2 : continue else : pass

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: Creates and connects the underlying paging widget .

def Func ( arg_0 ) : if arg_0 . custom_page_control : arg_1 = arg_0 . custom_page_control ( ) elif arg_0 . kind == 'plain' : arg_1 = QtGui . QPlainTextEdit ( ) elif arg_0 . kind == 'rich' : arg_1 = QtGui . QTextEdit ( ) arg_1 . installEventFilter ( arg_0 ) arg_2 = arg_1 . viewport ( ) arg_2 . installEventFilter ( arg_0 ) arg_1 . setReadOnly ( True ) arg_1 . setUndoRedoEnabled ( False ) arg_1 . setVerticalScrollBarPolicy ( QtCore . Qt . ScrollBarAlwaysOn ) return arg_1


Question: Use SequenceMatcher to return list of the best good enough matches .

def Func ( arg_0 , arg_1 , arg_2 = 3 , arg_3 = 0.6 ) : if not arg_2 > 0 : raise ValueError ( "n must be > 0: %r" % ( arg_2 , ) ) if not 0.0 <= arg_3 <= 1.0 : raise ValueError ( "cutoff must be in [0.0, 1.0]: %r" % ( arg_3 , ) ) arg_4 = [ ] arg_5 = SequenceMatcher ( ) arg_5 . set_seq2 ( arg_0 ) for arg_6 in arg_1 : arg_5 . set_seq1 ( arg_6 ) if arg_5 . real_quick_ratio ( ) >= arg_3 and arg_5 . quick_ratio ( ) >= arg_3 and arg_5 . ratio ( ) >= arg_3 : arg_4 . append ( ( arg_5 . ratio ( ) , arg_6 ) ) arg_4 = heapq . nlargest ( arg_2 , arg_4 ) return [ arg_6 for arg_7 , arg_6 in arg_4 ]


Question: Convenience to convert to Tensor or leave as None .

def Func ( arg_0 , arg_1 , arg_2 ) : return None if arg_0 is None else tf . convert_to_tensor ( value = arg_0 , arg_1 = arg_1 , arg_2 = arg_2 )

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


Question: Interactive prompting to populate the readme .

def Func ( arg_0 ) : arg_1 = dtoolcore . ProtoDataSet . from_uri ( uri = arg_0 , config_path = CONFIG_PATH ) arg_2 = _get_readme_template ( ) arg_3 = YAML ( ) arg_3 . explicit_start = True arg_3 . indent ( mapping = 2 , sequence = 4 , offset = 2 ) arg_5 = arg_3 . load ( arg_2 ) arg_5 = _prompt_for_values ( arg_5 ) arg_6 = StringIO ( ) arg_3 . dump ( arg_5 , arg_6 ) arg_1 . put_readme ( arg_6 . getvalue ( ) ) click . secho ( "Updated readme " , fg = "green" ) click . secho ( "To edit the readme using your default editor:" ) click . secho ( "dtool readme edit {}" . format ( arg_0 ) , fg = "cyan" )

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

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

		  This method will be called automatically after calling setDefaultRedisConnectionParams.

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


Question: Generate a string that can be added to a mdp include = line .

def Func ( arg_0 ) : arg_1 = [ os . path . expanduser ( p ) for p in arg_0 ] return ' -I' . join ( [ '' ] + arg_1 )

Unregister the SizedImage subclass currently assigned to `attr_name`.

        If a SizedImage subclass isn't already registered to `attr_name`
        NotRegistered will raise.


Question: Get the user public organizations

def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . _users_orgs : return arg_0 . _users_orgs [ arg_1 ] arg_2 = urijoin ( arg_0 . base_url , 'users' , arg_1 , 'orgs' ) try : arg_3 = arg_0 . fetch ( arg_2 ) arg_4 = arg_3 . text except requests . exceptions . HTTPError as error : if error . response . status_code == 404 : logger . error ( "Can't get github login orgs: %s" , error ) arg_4 = '[]' else : raise error arg_0 . _users_orgs [ arg_1 ] = arg_4 return arg_4

Unmarks the remote server as currently being deployed to.


Question: Generate a path value of type result_type .

def Func ( arg_0 , arg_1 = None ) : arg_2 = characters ( min_codepoint = 0x01 , max_codepoint = 0x7f ) if os . name == 'nt' : arg_3 = characters ( min_codepoint = 0xD800 , max_codepoint = 0xDFFF ) arg_4 = characters ( min_codepoint = 0x1 ) arg_5 = text ( alphabet = one_of ( arg_4 , arg_3 , arg_2 ) ) def text_to_bytes ( arg_6 ) : arg_7 = sys . getfilesystemencoding ( ) try : return arg_6 . encode ( arg_7 , 'surrogatepass' ) except UnicodeEncodeError : return arg_6 . encode ( arg_7 , 'replace' ) arg_8 = arg_5 . map ( text_to_bytes ) else : arg_9 = characters ( min_codepoint = 0x01 , max_codepoint = 0xff ) arg_8 = text ( alphabet = one_of ( arg_9 , arg_2 ) ) . map ( lambda t : t . encode ( 'latin-1' ) ) arg_10 = arg_8 . map ( lambda b : b . decode ( sys . getfilesystemencoding ( ) , 'surrogateescape' if PY3 else 'ignore' ) ) arg_5 = permutations ( arg_0 ( arg_10 ) ) . map ( u"" . join ) if arg_1 is None : return arg_0 ( one_of ( arg_8 , arg_5 ) ) elif arg_1 is bytes : return arg_0 ( arg_8 ) else : return arg_0 ( arg_5 )

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: Like safe_execfile but for . ipy files with IPython syntax .

def Func ( arg_0 , arg_1 ) : arg_1 = os . path . abspath ( os . path . expanduser ( arg_1 ) ) try : with open ( arg_1 ) as thefile : pass except : warn ( 'Could not open file <%s> for safe execution.' % arg_1 ) return arg_2 = os . path . dirname ( arg_1 ) with prepended_to_syspath ( arg_2 ) : try : with open ( arg_1 ) as thefile : arg_0 . run_cell ( thefile . read ( ) , store_history = False ) except : arg_0 . showtraceback ( ) warn ( 'Unknown failure executing file: <%s>' % arg_1 )

Extract the list of NIFT names from the BEL resource and builds a dictionary mapping from the lowercased version
    to the uppercase version.


Question: Returns a dictionary containing the full result names as keys and the corresponding result objects or result data items as values .

def Func ( arg_0 , arg_1 = False , arg_2 = True ) : return arg_0 . _return_item_dictionary ( arg_0 . _results , arg_1 , arg_2 )

Return the value to player; 1 for win, -1 for loss, 0 otherwise.


Question: Flask like implementation of getting the applicaiton name via the filename of the including file

def Func ( ) : arg_0 = getattr ( sys . modules [ '__main__' ] , '__file__' , None ) if arg_0 is None : return '__main__' return os . path . splitext ( os . path . basename ( arg_0 ) ) [ 0 ]

Whether a connection can be established between those two meshes.


Question: Returns a response with a template depending if the request is ajax or not and it renders with the given context .

def Func ( arg_0 , arg_1 , ** arg_2 ) : if arg_0 . request . is_ajax ( ) : arg_3 = arg_0 . page_template else : arg_3 = arg_0 . get_template_names ( ) return arg_0 . response_class ( request = arg_0 . request , arg_3 = arg_3 , arg_1 = arg_1 , ** arg_2 )

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


Question: Reboots the server and waits for it to come back .

def Func ( arg_0 , * arg_1 , ** arg_2 ) : warnings . warn ( 'Use self.run() instead.' , DeprecationWarning , stacklevel = 2 ) arg_0 . reboot ( * arg_1 , ** arg_2 )

Main executor of the trimmomatic_report template.

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


Question: r Method to calculate surface tension of a liquid mixture at temperature T pressure P mole fractions zs and weight fractions ws with a given method .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : if arg_5 == SIMPLE : arg_6 = [ i ( arg_1 ) for i in arg_0 . SurfaceTensions ] return mixing_simple ( arg_3 , arg_6 ) elif arg_5 == DIGUILIOTEJA : return Diguilio_Teja ( arg_1 = arg_1 , xs = arg_3 , sigmas_Tb = arg_0 . sigmas_Tb , Tbs = arg_0 . Tbs , Tcs = arg_0 . Tcs ) elif arg_5 == WINTERFELDSCRIVENDAVIS : arg_6 = [ i ( arg_1 ) for i in arg_0 . SurfaceTensions ] arg_7 = [ 1. / i ( arg_1 , arg_2 ) for i in arg_0 . VolumeLiquids ] return Winterfeld_Scriven_Davis ( arg_3 , arg_6 , arg_7 ) else : raise Exception ( 'Method not valid' )

count number of sites with cov=4, and number of variable sites.


Question: Report the scores and record them in the log .

def Func ( arg_0 , arg_1 , arg_2 = "valid" , arg_3 = - 1 , arg_4 = False ) : arg_5 = arg_2 if len ( arg_5 ) < 5 : arg_5 += " " * ( 5 - len ( arg_5 ) ) arg_6 = " " . join ( "%s=%.2f" % el for el in arg_1 . items ( ) ) arg_7 = arg_3 if arg_3 > 0 else arg_0 . current_epoch ( ) arg_8 = "epoch={}" . format ( arg_7 + 1 ) if arg_3 < 0 : arg_8 = "dryrun" sys . stdout . write ( "\r" ) sys . stdout . flush ( ) arg_9 = " *" if arg_4 else "" arg_10 = "{} ({}) {}{}" . format ( arg_5 , arg_8 , arg_6 , arg_9 ) arg_0 . network . train_logger . record ( arg_10 ) logging . info ( arg_10 )

Get a texture by its label

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

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


Question: Imports and returns a setup function .

def Func ( arg_0 = 'dist' , arg_1 = None , arg_2 = None , arg_3 = True , arg_4 = False , arg_5 = False , ) : if not arg_1 == arg_2 == None : import sys if not arg_1 <= sys . version < ( arg_2 or 'Any' ) : sys . stderr . write ( '%s: requires python version in <%s, %s), not %s\n' % ( sys . argv [ 0 ] , arg_1 or 'any' , arg_2 or 'any' , sys . version . split ( ) [ 0 ] ) ) sys . exit ( 1 ) if arg_5 : from distribute_setup import use_setuptools use_setuptools ( to_dir = arg_0 ) from arg_6 import setup else : try : from arg_6 import setup except ImportError : from distutils . core import setup if arg_3 : try : import arg_6 . command . sdist arg_6 . command . sdist . READMES = tuple ( list ( getattr ( arg_6 . command . sdist , 'READMES' , ( ) ) ) + [ 'README.md' ] ) except ImportError : pass if arg_4 : import platform if 'debian' in platform . dist ( ) : try : import stdeb except ImportError : pass return setup

Deletes the video

        Authentication is required

        Params:
            entry: video entry fetch via 'fetch_video()'

        Return:
            True if successful

        Raise:
            OperationError: on unsuccessful deletion


Question: Produce two gametes an egg and a sperm from the input strings . Combine them to produce a genome a la sexual reproduction .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . generate_gamete ( arg_1 ) arg_4 = arg_0 . generate_gamete ( arg_2 ) arg_0 . genome = list ( set ( arg_3 + arg_4 ) ) arg_0 . generation = 1 arg_0 . divinity = god

Returns the maximum delay for the InferenceElements in the inference
    dictionary

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


Question: Creates an archive from a directory and returns the file that was created .

def Func ( arg_0 , arg_1 , arg_2 = { } , arg_3 = None , arg_4 = [ '.git' , '.svn' ] ) : with zipfile . ZipFile ( arg_1 , 'w' , compression = zipfile . ZIP_DEFLATED ) as zip_file : arg_5 = len ( os . path . abspath ( arg_0 ) ) out ( "Creating archive: " + str ( arg_1 ) ) for arg_6 , arg_7 , arg_8 in os . walk ( arg_0 , followlinks = True ) : arg_9 = os . path . abspath ( arg_6 ) [ arg_5 + 1 : ] for arg_10 in arg_8 : arg_11 = os . path . join ( arg_6 , arg_10 ) arg_12 = os . path . join ( arg_9 , arg_10 ) if arg_1 in arg_11 : continue if arg_4 is not None : for arg_13 in arg_4 : if arg_11 . endswith ( arg_13 ) : out ( "Skipping: " + str ( arg_13 ) ) continue if arg_3 is not None : if not arg_3 ( arg_12 ) : out ( "Skipping: " + str ( arg_12 ) ) continue out ( "Adding: " + str ( arg_12 ) ) zip_file . write ( arg_11 , arg_12 , zipfile . ZIP_DEFLATED ) return arg_1

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


Question: Turn tokens into a tokens of n - grams

def Func ( arg_0 , arg_1 ) : if arg_0 . stop_words is not None : arg_1 = [ w for w in arg_1 if w not in arg_0 . stop_words ] arg_2 , arg_3 = arg_0 . ngram_range if arg_3 != 1 : arg_4 = arg_1 if arg_2 == 1 : arg_1 = list ( arg_4 ) arg_2 += 1 else : arg_1 = [ ] arg_5 = len ( arg_4 ) arg_6 = arg_1 . append arg_7 = " " . join for arg_8 in range ( arg_2 , min ( arg_3 + 1 , arg_5 + 1 ) ) : for arg_9 in range ( arg_5 - arg_8 + 1 ) : arg_6 ( arg_7 ( arg_4 [ arg_9 : arg_9 + arg_8 ] ) ) return arg_1

Get build job.

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

    Examples:

    \b
    ```bash
    $ polyaxon build -b 1 get
    ```

    \b
    ```bash
    $ polyaxon build --build=1 --project=project_name get
    ```


Question: Clear the window buffer

def Func ( arg_0 ) : arg_0 . ctx . fbo . Func ( red = arg_0 . Func_color [ 0 ] , green = arg_0 . Func_color [ 1 ] , blue = arg_0 . Func_color [ 2 ] , alpha = arg_0 . Func_color [ 3 ] , depth = arg_0 . Func_depth , )


Question: Return NumPy arrays from an input raster .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = "nearest" , arg_4 = None , arg_5 = None , arg_6 = None ) : with rasterio . Env ( ** get_gdal_options ( arg_6 , is_remote = path_is_remote ( arg_0 [ 0 ] if isinstance ( arg_0 , list ) else arg_0 , s3 = True ) ) ) as env : logger . debug ( "reading %s with GDAL options %s" , arg_0 , env . options ) return _Func ( arg_0 , arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 )

Calculate the margin in pixels above the plot area, setting
		border_top.


Question: Encrypts a value using an RSA public key via CryptoAPI

def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_3 = 0 if arg_2 : arg_3 = Advapi32Const . CRYPT_OAEP arg_4 = new ( advapi32 , 'DWORD *' , len ( arg_1 ) ) arg_5 = advapi32 . CryptEncrypt ( arg_0 . ex_key_handle , null ( ) , True , arg_3 , null ( ) , arg_4 , 0 ) handle_error ( arg_5 ) arg_6 = deref ( arg_4 ) arg_7 = buffer_from_bytes ( arg_6 ) write_to_buffer ( arg_7 , arg_1 ) pointer_set ( arg_4 , len ( arg_1 ) ) arg_5 = advapi32 . CryptEncrypt ( arg_0 . ex_key_handle , null ( ) , True , arg_3 , arg_7 , arg_4 , arg_6 ) handle_error ( arg_5 ) return bytes_from_buffer ( arg_7 , deref ( arg_4 ) ) [ : : - 1 ]

Creates the Nginx configuration for the project


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

def Func ( arg_0 ) : try : arg_0 . log_parser ( ) except ( FileNotFoundError , StopIteration ) as e : logger . debug ( "ERROR: " + str ( sys . exc_info ( ) [ 0 ] ) ) arg_0 . log_retry += 1 if arg_0 . log_retry == arg_0 . MAX_RETRIES : raise e try : arg_0 . trace_parser ( ) except ( FileNotFoundError , StopIteration ) as e : logger . debug ( "ERROR: " + str ( sys . exc_info ( ) [ 0 ] ) ) arg_0 . trace_retry += 1 if arg_0 . trace_retry == arg_0 . MAX_RETRIES : raise e

Downloads the sprites data and returns the saved filepath.


Question: Save an image to self . storage at save_path .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = InMemoryUploadedFile ( arg_1 , None , 'foo.%s' % arg_3 , arg_4 , arg_1 . tell ( ) , None ) arg_5 . seek ( 0 ) arg_0 . storage . save ( arg_2 , arg_5 )

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

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


Question: Peeks into the error stack and pulls out the lib func and reason

def Func ( ) : arg_0 = libcrypto . ERR_peek_error ( ) arg_1 = int ( ( arg_0 >> 24 ) & 0xff ) arg_2 = int ( ( arg_0 >> 12 ) & 0xfff ) arg_3 = int ( arg_0 & 0xfff ) return ( arg_1 , arg_2 , arg_3 )

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: Assert that there is exactly one node in the give list and return it .

def Func ( arg_0 , arg_1 = False ) : if not arg_0 and arg_1 : return NFunc assert len ( arg_0 ) == 1 , 'Expected 1 result. Received %d results.' % ( len ( arg_0 ) ) return arg_0 [ 0 ]

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: Adds a user object to the user manager

def Func ( arg_0 , arg_1 ) : arg_0 . log . info ( "Loading user information for %s/%s" , arg_1 . id , arg_1 . username ) arg_0 . load_user_info ( arg_1 ) arg_0 . log . info ( "Loading user rights for %s/%s" , arg_1 . id , arg_1 . username ) arg_0 . load_user_rights ( arg_1 ) arg_0 . log . info ( "Added user: %s/%s" , arg_1 . id , arg_1 . username ) arg_0 . _add_user_to_cache ( arg_1 ) return arg_1

Yield egg or source distribution objects based on basename


Question: Backs up a trajectory .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_0 . _logger . info ( 'Storing backup of %s.' % arg_1 . v_name ) arg_3 , arg_4 = os . path . split ( arg_0 . _filename ) if arg_2 is None : arg_2 = os . path . join ( '%s' % arg_3 , 'backup_%s.hdf5' % arg_1 . v_name ) arg_5 = pt . open_file ( filename = arg_2 , mode = 'a' , title = arg_2 ) if '/' + arg_0 . _trajectory_name in arg_5 : raise ValueError ( 'I cannot backup  `%s` into file `%s`, there is already a ' 'trajectory with that name.' % ( arg_1 . v_name , arg_2 ) ) arg_6 = arg_5 . root arg_0 . _trajectory_group . _f_copy ( newparent = arg_6 , recursive = True ) arg_5 . flush ( ) arg_5 . close ( ) arg_0 . _logger . info ( 'Finished backup of %s.' % arg_1 . v_name )

Create required links from a sensor region to a classifier region.


Question: Like os . makedirs but takes care about race conditions

def Func ( arg_0 ) : if os . path . isfile ( arg_0 ) : raise IOError ( 'Path `%s` is already a file not a directory' ) while True : try : if os . path . isdir ( arg_0 ) : break os . makedirs ( arg_0 ) except EnvironmentError as exc : if exc . errno != 17 : raise

Parses a FastQC summary report file and returns it as a dictionary.

    This function parses a typical FastQC summary report file, retrieving
    only the information on the first two columns. For instance, a line could
    be::

        'PASS	Basic Statistics	SH10762A_1.fastq.gz'

    This parser will build a dictionary with the string in the second column
    as a key and the QC result as the value. In this case, the returned
    ``dict`` would be something like::

        {"Basic Statistics": "PASS"}

    Parameters
    ----------
    summary_file: str
        Path to FastQC summary report.

    Returns
    -------
    summary_info: :py:data:`OrderedDict`
        Returns the information of the FastQC summary report as an ordered
        dictionary, with the categories as strings and the QC result as values.


Question: Check that a Starred expression is used in an assignment target .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 . parent , astroid . Call ) : return if PY35 and isinstance ( arg_1 . parent , ( astroid . List , astroid . Tuple , astroid . Set , astroid . Dict ) ) : return arg_2 = arg_1 . statement ( ) if not isinstance ( arg_2 , astroid . Assign ) : return if arg_2 . value is arg_1 or arg_2 . value . parent_of ( arg_1 ) : arg_0 . add_message ( "star-needs-assignment-target" , arg_1 = arg_1 )

Shift the model result and return the new instance.

    Queues up the T(i+1) prediction value and emits a T(i)
    input/prediction pair, if possible. E.g., if the previous T(i-1)
    iteration was learn-only, then we would not have a T(i) prediction in our
    FIFO and would not be able to emit a meaningful input/prediction pair.

    :param modelResult: A :class:`~.nupic.frameworks.opf.opf_utils.ModelResult`
                        instance to shift.
    :return: A :class:`~.nupic.frameworks.opf.opf_utils.ModelResult` instance that
             has been shifted


Question: Return the length of a variant

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = None , arg_6 = None ) : arg_7 = - 1 if arg_2 in ( 'snv' , 'indel' , 'cancer' ) : if arg_1 == arg_0 : arg_7 = arg_0 else : arg_7 = abs ( arg_1 - arg_0 ) elif arg_2 == 'sv' : if arg_5 == 'bnd' : arg_7 = int ( 10e10 ) else : if arg_6 : arg_7 = abs ( int ( arg_6 ) ) elif arg_4 : if arg_4 != arg_3 : arg_7 = arg_4 - arg_3 return arg_7

Find out if this signal is something indexed


Question: Return source code based on tokens .

def Func ( arg_0 ) : arg_1 = '' arg_2 = '' arg_3 = 0 arg_4 = - 1 arg_5 = None for ( arg_6 , arg_7 , arg_8 , arg_9 , arg_10 ) in arg_0 : if TOKENIZE_HAS_ENCODING and arg_6 == tokenize . ENCODING : continue ( arg_11 , arg_12 ) = arg_8 ( arg_13 , arg_14 ) = arg_9 if ( arg_5 != tokenize . COMMENT and arg_11 > arg_3 and arg_2 . endswith ( ( '\\\n' , '\\\r\n' , '\\\r' ) ) ) : arg_1 += arg_2 [ len ( arg_2 . rstrip ( ' \t\n\r\\' ) ) : ] if arg_11 > arg_3 : arg_4 = 0 if arg_12 > arg_4 : arg_1 += arg_10 [ arg_4 : arg_12 ] arg_1 += arg_7 arg_2 = arg_10 arg_3 = arg_13 arg_4 = arg_14 if arg_6 not in WHITESPACE_TOKENS : arg_5 = arg_6 return arg_1

Reshape input and output dimensions of operator.

        Arg:
            input_dims (tuple): new subsystem input dimensions.
            output_dims (tuple): new subsystem output dimensions.

        Returns:
            Operator: returns self with reshaped input and output dimensions.

        Raises:
            QiskitError: if combined size of all subsystem input dimension or
            subsystem output dimensions is not constant.


Question: Return a recursive implementation of a multiplexor circuit where each instruction itself has a decomposition based on smaller multiplexors .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = len ( arg_2 ) arg_4 = int ( math . log2 ( arg_3 ) ) + 1 arg_5 = QuantumRegister ( arg_4 ) arg_6 = QuantumCircuit ( arg_5 , name = "multiplex" + arg_4 . __str__ ( ) ) arg_7 = arg_5 [ 0 ] arg_8 = arg_5 [ arg_4 - 1 ] if arg_4 == 1 : arg_6 . append ( arg_1 ( arg_2 [ 0 ] ) , [ arg_5 [ 0 ] ] ) return arg_6 arg_9 = scipy . kron ( [ [ 0.5 , 0.5 ] , [ 0.5 , - 0.5 ] ] , np . identity ( 2 ** ( arg_4 - 2 ) ) ) arg_2 = arg_9 . dot ( np . array ( arg_2 ) ) . tolist ( ) arg_10 = arg_0 . Func ( arg_1 , arg_2 [ 0 : ( arg_3 // 2 ) ] ) arg_6 . append ( arg_10 . to_instruction ( ) , arg_5 [ 0 : - 1 ] ) arg_6 . append ( CnotGate ( ) , [ arg_8 , arg_7 ] ) arg_11 = arg_0 . Func ( arg_1 , arg_2 [ ( arg_3 // 2 ) : ] ) if arg_3 > 1 : arg_6 . append ( arg_11 . to_instruction ( ) . mirror ( ) , arg_5 [ 0 : - 1 ] ) else : arg_6 . append ( arg_11 . to_instruction ( ) , arg_5 [ 0 : - 1 ] ) arg_6 . append ( CnotGate ( ) , [ arg_8 , arg_7 ] ) return arg_6

Set a smoothing Gaussian kernel given its FWHM in mm.


Question: Parses arguments .

def Func ( arg_0 , arg_1 = [ ] , arg_2 = False ) : global arg_5 arg_3 = sys . argv [ 1 : ] for arg_4 in filter ( os . path . isfile , arg_1 ) : arg_3 . insert ( 0 , "@" + arg_4 ) arg_5 , arg_6 = arg_0 . parse_known_args ( arg_3 ) if arg_6 and not arg_2 : arg_7 = gettext ( 'unrecognized arguments: %s' ) arg_0 . error ( arg_7 % ' ' . join ( arg_6 ) ) if arg_5 . stream : arg_5 . stream = [ arg_8 . lower ( ) for arg_8 in arg_5 . stream ] if not arg_5 . url and arg_5 . url_param : arg_5 . url = arg_5 . url_param


Question: Encodes a vCard field into an RFC2425 line .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = "utf-8" ) : if not arg_2 : arg_2 = { } if type ( arg_1 ) is unicode : arg_1 = arg_1 . replace ( u"\r\n" , u"\\n" ) arg_1 = arg_1 . replace ( u"\n" , u"\\n" ) arg_1 = arg_1 . replace ( u"\r" , u"\\n" ) arg_1 = arg_1 . encode ( arg_3 , "replace" ) elif type ( arg_1 ) is not str : raise TypeError ( "Bad type for rfc2425 value" ) elif not valid_string_re . match ( arg_1 ) : arg_2 [ "encoding" ] = "b" arg_1 = binascii . b2a_base64 ( arg_1 ) arg_4 = str ( arg_0 ) . lower ( ) for arg_5 , arg_6 in arg_2 . items ( ) : arg_4 += ";%s=%s" % ( str ( arg_5 ) , str ( arg_6 ) ) arg_4 += ":" while ( len ( arg_1 ) > 70 ) : arg_4 += arg_1 [ : 70 ] + "\r\n " arg_1 = arg_1 [ 70 : ] arg_4 += arg_1 + "\r\n" return arg_4

Save the state of hooks in the sys module.

        This has to be called after self.user_module is created.


Question: Delete a container group

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . connection . container_groups . Func ( arg_1 , arg_2 )

Sparse matrix roll

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

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

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

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

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

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

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


Question: Return the field contributions statistics .

def Func ( arg_0 ) : if arg_0 . _hsObj . _fixedFields is not None : return dict ( ) , dict ( ) arg_1 = arg_0 . _hsObj . _predictedFieldEncoder arg_2 = [ ] for arg_3 , arg_4 in arg_0 . _state [ 'swarms' ] . iteritems ( ) : arg_5 = arg_3 . split ( '.' ) if len ( arg_5 ) != 1 : continue arg_6 = arg_0 . getEncoderNameFromKey ( arg_5 [ 0 ] ) arg_7 = arg_4 [ 'bestErrScore' ] if arg_7 is None : ( arg_8 , arg_7 ) = arg_0 . _hsObj . _resultsDB . bestModelIdAndErrScore ( arg_3 ) arg_2 . append ( ( arg_7 , arg_6 ) ) if arg_0 . _hsObj . _searchType == HsSearchType . legacyTemporal : assert ( len ( arg_2 ) == 1 ) ( arg_9 , arg_10 ) = arg_2 [ 0 ] for arg_3 , arg_4 in arg_0 . _state [ 'swarms' ] . iteritems ( ) : arg_5 = arg_3 . split ( '.' ) if len ( arg_5 ) != 2 : continue arg_11 = [ arg_0 . getEncoderNameFromKey ( name ) for name in arg_5 ] arg_11 . remove ( arg_10 ) arg_2 . append ( ( arg_4 [ 'bestErrScore' ] , arg_11 [ 0 ] ) ) else : arg_2 . sort ( reverse = True ) if arg_0 . _hsObj . _maxBranching > 0 and len ( arg_2 ) > arg_0 . _hsObj . _maxBranching : arg_9 = arg_2 [ - arg_0 . _hsObj . _maxBranching - 1 ] [ 0 ] else : arg_9 = arg_2 [ 0 ] [ 0 ] arg_12 = dict ( ) arg_13 = dict ( ) if arg_9 is not None : if abs ( arg_9 ) < 0.00001 : arg_9 = 0.00001 for ( arg_14 , arg_6 ) in arg_2 : if arg_14 is not None : arg_15 = ( arg_9 - arg_14 ) * 100.0 / arg_9 else : arg_15 = 0.0 arg_14 = arg_9 arg_12 [ arg_6 ] = arg_15 arg_13 [ arg_6 ] = arg_9 - arg_14 arg_0 . logger . debug ( "FieldContributions: %s" % ( arg_12 ) ) return arg_12 , arg_13

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


Question: Return the MRA comparison rating of two strings .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 == arg_2 : return 6 if arg_1 == '' or arg_2 == '' : return 0 arg_1 = list ( mra ( arg_1 ) ) arg_2 = list ( mra ( arg_2 ) ) if abs ( len ( arg_1 ) - len ( arg_2 ) ) > 2 : return 0 arg_3 = len ( arg_1 ) + len ( arg_2 ) if arg_3 < 5 : arg_4 = 5 elif arg_3 < 8 : arg_4 = 4 elif arg_3 < 12 : arg_4 = 3 else : arg_4 = 2 for arg_5 in range ( 2 ) : arg_6 = [ ] arg_7 = [ ] arg_8 = min ( len ( arg_1 ) , len ( arg_2 ) ) for arg_9 in range ( arg_8 ) : if arg_1 [ arg_9 ] != arg_2 [ arg_9 ] : arg_6 . append ( arg_1 [ arg_9 ] ) arg_7 . append ( arg_2 [ arg_9 ] ) arg_1 = arg_6 + arg_1 [ arg_8 : ] arg_2 = arg_7 + arg_2 [ arg_8 : ] arg_1 . reverse ( ) arg_2 . reverse ( ) arg_10 = 6 - max ( len ( arg_1 ) , len ( arg_2 ) ) if arg_10 >= arg_4 : return arg_10 return 0

Stop streaming samples from device and delete samples buffer


Question: wrap the crawling functionality

def Func ( arg_0 , arg_1 ) : def crawler_wrapper ( arg_2 , arg_3 , arg_1 ) : try : arg_4 = Crawler ( arg_0 . config , arg_0 . fetcher ) arg_5 = arg_4 . crawl ( arg_1 ) except ( UnicodeDecodeError , ValueError ) as ex : if arg_3 : arg_2 = arg_3 . pop ( 0 ) return crawler_wrapper ( arg_2 , arg_3 , arg_1 ) else : raise ex return arg_5 arg_6 = list ( arg_0 . config . available_parsers ) arg_6 . remove ( arg_0 . config . parser_class ) return crawler_wrapper ( arg_0 . config . parser_class , arg_6 , arg_1 )

Returns time format preferred for Internet standards.

    Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, updated by RFC 1123

    According to RFC 1123, day and month names must always be in
    English.  If not for that, this code could use strftime().  It
    can't because strftime() honors the locale and could generate
    non-English names.


Question: A simple memoize decorator for functions .

def Func ( arg_0 ) : arg_1 = { } def memf ( * arg_2 ) : if arg_2 not in arg_1 : arg_1 [ arg_2 ] = arg_0 ( * arg_2 ) return arg_1 [ arg_2 ] return memf


Question: Start monitoring of the alarm status .

async def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : arg_0 . _alarm_status_callback = arg_1 arg_0 . _zone_changed_callback = arg_2 arg_0 . _output_changed_callback = arg_3 _LOGGER . info ( "Starting Func loop" ) while not arg_0 . closed : _LOGGER . debug ( "Iteration... " ) while not arg_0 . connected : _LOGGER . info ( "Not connected, re-connecting... " ) await arg_0 . connect ( ) if not arg_0 . connected : _LOGGER . warning ( "Not connected, sleeping for 10s... " ) await asyncio . sleep ( arg_0 . _reconnection_timeout ) continue await arg_0 . start_monitoring ( ) if not arg_0 . connected : _LOGGER . warning ( "Start monitoring failed, sleeping for 10s..." ) await asyncio . sleep ( arg_0 . _reconnection_timeout ) continue while True : await arg_0 . _update_status ( ) _LOGGER . debug ( "Got status!" ) if not arg_0 . connected : _LOGGER . info ( "Got connection broken, reconnecting!" ) break _LOGGER . info ( "Closed, quit monitoring." )

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


Question: run this to turn all folder1 TIFs and JPGs into folder2 data . TIFs will be treated as micrographs and converted to JPG with enhanced contrast . JPGs will simply be copied over .

def Func ( arg_0 ) : arg_1 = [ '.jpg' , '.png' ] for arg_2 in [ x for x in arg_0 . files1 if cm . ext ( x ) in arg_1 ] : arg_3 = "UNKNOWN" if len ( arg_2 ) > 8 and arg_2 [ : 8 ] in arg_0 . IDs : arg_3 = arg_2 [ : 8 ] arg_4 = arg_3 + "_jpg_" + arg_2 if not arg_4 in arg_0 . files2 : arg_0 . log . info ( "copying over [%s]" % arg_4 ) shutil . copy ( os . path . join ( arg_0 . folder1 , arg_2 ) , os . path . join ( arg_0 . folder2 , arg_4 ) ) if not arg_2 [ : 8 ] + ".abf" in arg_0 . files1 : arg_0 . log . error ( "orphan image: %s" , arg_2 ) arg_1 = [ '.tif' , '.tiff' ] for arg_2 in [ x for x in arg_0 . files1 if cm . ext ( x ) in arg_1 ] : arg_3 = "UNKNOWN" if len ( arg_2 ) > 8 and arg_2 [ : 8 ] in arg_0 . IDs : arg_3 = arg_2 [ : 8 ] arg_4 = arg_3 + "_tif_" + arg_2 + ".jpg" if not arg_4 in arg_0 . files2 : arg_0 . log . info ( "converting micrograph [%s]" % arg_4 ) imaging . TIF_to_jpg ( os . path . join ( arg_0 . folder1 , arg_2 ) , saveAs = os . path . join ( arg_0 . folder2 , arg_4 ) ) if not arg_2 [ : 8 ] + ".abf" in arg_0 . files1 : arg_0 . log . error ( "orphan image: %s" , arg_2 )

Total time since the timer is started.

        Returns (float): Time in seconds.


Question: Jumps short if not greater .

def Func ( arg_0 , arg_1 ) : arg_0 . PC = Operators . ITEBV ( arg_0 . address_bit_size , Operators . OR ( arg_0 . ZF , arg_0 . SF != arg_0 . OF ) , arg_1 . read ( ) , arg_0 . PC )

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

    :param graph: BELGraph
    :return: dictionary with matrices


Question: Add a route .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 , arg_5 = arg_0 . _normalize_pattern ( arg_2 ) if arg_4 == 'literal' : arg_0 . _literal [ arg_1 ] [ arg_5 ] = arg_3 elif arg_4 == 'wildcard' : arg_0 . _wildcard [ arg_1 ] . append ( WildcardRoute ( arg_5 , arg_3 ) ) else : arg_0 . _regex [ arg_1 ] . append ( RegexRoute ( arg_5 , arg_3 ) )

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: Saves a value to session .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . session [ arg_0 . _session_key ( arg_1 ) ] = arg_2

Match a literal sequence.

    In the `TextParsers`` context, this matches the literal string
    provided. In the ``GeneralParsers`` context, this matches a sequence of
    input.

    If multiple literals are provided, they are treated as alternatives. e.g.
    ``lit('+', '-')`` is the same as ``lit('+') | lit('-')``.

    Args:
        literal: A literal to match
        *literals: Alternative literals to match

    Returns:
        A ``LiteralParser`` in the ``GeneralContext``, a ``LiteralStringParser``
        in the ``TextParsers`` context, and an ``AlternativeParser`` if multiple
        arguments are provided.


Question: Return a Message representation or raise a KeyError .

def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = arg_0 . _lookup ( arg_1 ) arg_0 . _file . seek ( arg_2 ) arg_4 = arg_0 . _file . readline ( ) . replace ( mailbox . linesep , b'' ) arg_5 = arg_0 . _file . read ( arg_3 - arg_0 . _file . tell ( ) ) arg_6 = arg_0 . _message_factory ( arg_5 . replace ( mailbox . linesep , b'\n' ) ) try : arg_6 . set_from ( arg_4 [ 5 : ] . decode ( 'ascii' ) ) return arg_6 except UnicodeDecodeError : pass try : arg_6 . set_from ( arg_4 [ 5 : ] . decode ( 'utf-8' ) ) except UnicodeDecodeError : arg_6 . set_from ( arg_4 [ 5 : ] . decode ( 'iso-8859-1' ) ) return arg_6

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


Question: The the time value of an ASN1 time object .

def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_1 , bytes ) : raise TypeError ( "when must be a byte string" ) arg_2 = _lib . ASN1_TIME_set_string ( arg_0 , arg_1 ) if arg_2 == 0 : raise ValueError ( "Invalid string" )

Drop a node from the network

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


Question: Return representation of html end tag .

def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . mathml_elements : arg_0 . fed . append ( "</{0}>" . format ( arg_1 ) )

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: Close TensorFlow session TensorBoard and Nvidia - process if available .

def Func ( arg_0 = None , arg_1 = 6006 ) : arg_2 = "[TL] Close tensorboard and nvidia-process if available" arg_3 = "[TL] Close tensorboard and nvidia-process not yet supported by this function (tl.ops.exit_tf) on " if arg_0 is not None : arg_0 . close ( ) if _platform == "linux" or _platform == "linux2" : tl . logging . info ( 'linux: %s' % arg_2 ) os . system ( 'nvidia-smi' ) os . system ( 'fuser ' + arg_1 + '/tcp -k' ) os . system ( "nvidia-smi | grep python |awk '{print $3}'|xargs kill" ) _exit ( ) elif _platform == "darwin" : tl . logging . info ( 'OS X: %s' % arg_2 ) subprocess . Popen ( "lsof -i tcp:" + str ( arg_1 ) + "  | grep -v PID | awk '{print $2}' | xargs kill" , shell = True ) elif _platform == "win32" : raise NotImplementedError ( "this function is not supported on the Windows platform" ) else : tl . logging . info ( arg_3 + _platform )


Question: Returns the user s permissions .

def Func ( arg_0 ) : arg_1 = '' if arg_0 . groups . filter ( name = 'Admin' ) . exists ( ) or arg_0 . is_superuser : arg_1 = 'admin' return arg_1

Returns the maximum delay for the InferenceElements in the inference
    dictionary

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


Question: Count the mapped two - qubit gates less the number of added SWAPs .

def Func ( arg_0 ) : return len ( [ arg_1 for arg_1 in arg_0 [ 'gates_mapped' ] if len ( arg_1 . qargs ) == 2 ] ) - 3 * arg_0 [ 'swaps_added' ]

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


Question: Run build .

def Func ( arg_0 ) : if ON_READ_THE_DOCS : return try : arg_1 = 'pyside-rcc' if sys . platform == 'win32' : import PySide arg_1 = os . path . join ( os . path . dirname ( PySide . __file__ ) , 'pyside-rcc.exe' ) subprocess . check_call ( [ arg_1 , '-o' , arg_0 . resource_target_path , arg_0 . resource_source_path ] ) except ( subprocess . CalledProcessError , OSError ) : print ( 'Error compiling resource.py using pyside-rcc. Possibly ' 'pyside-rcc could not be found. You might need to manually add ' 'it to your PATH.' ) raise SystemExit ( )


Question: Extracts the second out of a datetime samples .

def Func ( arg_0 ) : import pandas as pd return pd . Series ( arg_0 ) . dt . second . values

Attaches a bundle object

        :param bundle: :class:`flask_journey.BlueprintBundle` object
        :raises:
            - IncompatibleBundle if the bundle is not of type `BlueprintBundle`
            - ConflictingPath if a bundle already exists at bundle.path
            - MissingBlueprints if the bundle doesn't contain any blueprints


Question: Compute edge ngram of token from min . Does not include token itself .

def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_1 = config . MIN_EDGE_NGRAMS arg_0 = arg_0 [ : config . MAX_EDGE_NGRAMS + 1 ] return [ arg_0 [ : arg_2 ] for arg_2 in range ( arg_1 , len ( arg_0 ) ) ]

Apply the criteria to filter out on the output required


Question: Make a WSGI app that has all the HTTPie pieces baked in .

def Func ( ) : arg_0 = Environment ( ) arg_1 = parser . parse_args ( arg_1 = [ '/' , '--ignore-stdin' ] , arg_0 = arg_0 ) arg_1 . output_options = 'HB' arg_3 = 'HTTPony/{0}' . format ( __version__ ) def application ( arg_4 , arg_5 ) : if arg_4 . get ( 'CONTENT_LENGTH' ) == '' : del arg_4 [ 'CONTENT_LENGTH' ] if arg_4 . get ( 'CONTENT_TYPE' ) == '' : del arg_4 [ 'CONTENT_TYPE' ] arg_6 = WerkzeugRequest ( arg_4 ) arg_7 = arg_6 . get_data ( ) arg_8 = Request ( method = arg_6 . method , url = arg_6 . url , headers = arg_6 . headers , arg_7 = arg_7 , ) arg_9 = arg_8 . prepare ( ) arg_10 = streams . build_output_stream ( arg_1 , arg_0 , arg_9 , arg_11 = None , arg_2 = arg_1 . output_options ) streams . write_stream ( arg_10 , arg_0 . stdout , arg_0 . stdout_isatty ) if arg_7 : print ( "\n" , file = arg_0 . stdout ) arg_11 = Response ( headers = { 'Server' : arg_3 } ) return arg_11 ( arg_4 , arg_5 ) return application

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

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


Question: Wraps new_fn with the doc of original_fn .

def Func ( arg_0 , arg_1 ) : arg_2 = tf_inspect . getfullargspec ( arg_0 ) arg_3 = tf_inspect . getfullargspec ( arg_1 ) if arg_2 != arg_3 : raise ValueError ( 'Arg specs do not match: original={}, new={}, fn={}' . format ( arg_2 , arg_3 , arg_0 ) ) @ decorator . decorator def wrap ( arg_4 , * arg_5 , ** arg_6 ) : del arg_4 return arg_1 ( * arg_5 , ** arg_6 ) return wrap ( arg_0 )

Say the workers to finish their jobs and quit.


Question: REST Conference Play helper

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

Unsigned divide.

        Divides (unsigned) the value in the AX register, DX:AX register pair,
        or EDX:EAX or RDX:RAX register pair (dividend) by the source operand
        (divisor) and stores the result in the AX (AH:AL), DX:AX, EDX:EAX or
        RDX:RAX registers. The source operand can be a general-purpose register
        or a memory location. The action of this instruction depends of the
        operand size (dividend/divisor). Division using 64-bit operand is
        available only in 64-bit mode. Non-integral results are truncated
        (chopped) towards 0. The reminder is always less than the divisor in
        magnitude. Overflow is indicated with the #DE (divide error) exception
        rather than with the CF flag::

            IF SRC  =  0
                THEN #DE; FI;(* divide error *)
            IF OperandSize  =  8 (* word/byte operation *)
                THEN
                    temp  =  AX / SRC;
                    IF temp > FFH
                        THEN #DE; (* divide error *) ;
                        ELSE
                            AL  =  temp;
                            AH  =  AX MOD SRC;
                    FI;
                ELSE IF OperandSize  =  16 (* doubleword/word operation *)
                    THEN
                        temp  =  DX:AX / SRC;
                        IF temp > FFFFH
                            THEN #DE; (* divide error *) ;
                        ELSE
                            AX  =  temp;
                            DX  =  DX:AX MOD SRC;
                        FI;
                    FI;
                ELSE If OperandSize = 32 (* quadword/doubleword operation *)
                    THEN
                        temp  =  EDX:EAX / SRC;
                        IF temp > FFFFFFFFH
                            THEN #DE; (* divide error *) ;
                        ELSE
                            EAX  =  temp;
                            EDX  =  EDX:EAX MOD SRC;
                        FI;
                    FI;
                ELSE IF OperandSize = 64 (*Doublequadword/quadword operation*)
                    THEN
                        temp = RDX:RAX / SRC;
                        IF temp > FFFFFFFFFFFFFFFFH
                            THEN #DE; (* Divide error *)
                        ELSE
                            RAX = temp;
                            RDX = RDX:RAX MOD SRC;
                        FI;
                    FI;
            FI;

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


Question: Helper function to get sample names from subset .

def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_2 = arg_0 . subsets [ 'All_Samples' ] else : try : arg_2 = arg_0 . subsets [ arg_1 ] except KeyError : raise KeyError ( ( "Subset '{:s}' does not " . format ( arg_1 ) + "exist.\nUse 'make_subset' to create a" + "subset." ) ) return arg_2

This is a parallel worker for running period-recovery.

    Parameters
    ----------

    task : tuple
        This is used to pass args to the `periodicvar_recovery` function::

            task[0] = period-finding result pickle to work on
            task[1] = simbasedir
            task[2] = period_tolerance

    Returns
    -------

    dict
        This is the dict produced by the `periodicvar_recovery` function for the
        input period-finding result pickle.


Question: Is real time subscription running .

def Func ( arg_0 ) : return ( arg_0 . _tibber_control . sub_manager is not None and arg_0 . _tibber_control . sub_manager . is_running and arg_0 . _subscription_id is not None )

Dump a certificate revocation list to a buffer.

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

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


Question: returns a seq array with RSKYWM randomly replaced with resolved bases

def Func ( arg_0 ) : for arg_1 in np . uint8 ( [ 82 , 83 , 75 , 87 , 89 , 77 ] ) : arg_2 , arg_3 = np . where ( arg_0 == arg_1 ) arg_4 , arg_5 = AMBIGS [ arg_1 . view ( "S1" ) ] arg_6 = np . random . choice ( [ True , False ] , arg_2 . shape [ 0 ] ) for arg_7 in xrange ( arg_6 . shape [ 0 ] ) : if arg_6 [ arg_7 ] : arg_0 [ arg_2 [ arg_7 ] , arg_3 [ arg_7 ] ] = np . array ( arg_4 ) . view ( np . uint8 ) else : arg_0 [ arg_2 [ arg_7 ] , arg_3 [ arg_7 ] ] = np . array ( arg_5 ) . view ( np . uint8 ) return arg_0

Deletes the video from youtube

        Raises:
            OperationError


Question: Creates a SRV record attached to this hosted zone .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 60 ) : arg_0 . _halt_if_already_deleted ( ) arg_2 = locals ( ) del arg_2 [ 'self' ] return arg_0 . _add_record ( SRVResourceRecordSet , ** arg_2 )

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


Question: Runs the commands supplied as an argument It will exit the program if the commands return a non - zero code

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 [ "sprint" ] arg_3 = arg_1 [ "quiet" ] arg_4 = arg_1 [ "error" ] arg_5 = True arg_6 = None if arg_1 [ "no_enhanced_errors" ] : arg_5 = False if "shell" in arg_1 : arg_6 = arg_1 [ "shell" ] arg_7 = sys . platform == "win32" arg_8 = None arg_9 = None if arg_3 : arg_8 = PIPE arg_9 = PIPE arg_0 = arg_0 . rstrip ( ) arg_2 ( "About to run commands '{}'" . format ( arg_0 ) , level = "verbose" ) if not arg_3 : arg_2 ( arg_0 ) if arg_6 : arg_10 = shlex . split ( arg_6 ) arg_6 = arg_10 [ 0 ] arg_10 = arg_10 [ 1 : ] if arg_5 and not arg_7 : arg_10 . append ( "-e" ) arg_10 . append ( arg_0 ) arg_0 = arg_10 else : if arg_5 and not arg_7 : arg_0 = [ "-e" , arg_0 ] arg_11 = Popen ( arg_0 , shell = True , stdout = arg_8 , stderr = arg_9 , executable = arg_6 ) arg_12 , arg_13 = arg_11 . communicate ( ) if arg_11 . returncode : if arg_3 : arg_4 ( arg_13 . decode ( locale . getpreferredencoding ( ) ) ) arg_4 ( "Command failed to run" ) sys . exit ( 1 )

Extracts start row from the bookmark information


Question: Get build job .

def Func ( arg_0 ) : arg_1 , arg_2 , arg_3 = Func_build_or_local ( arg_0 . obj . Func ( 'project' ) , arg_0 . obj . Func ( 'build' ) ) try : arg_4 = PolyaxonClient ( ) . build_job . Func_build ( arg_1 , arg_2 , arg_3 ) cache . cache ( config_manager = BuildJobManager , arg_4 = arg_4 ) except ( PolyaxonHTTPError , PolyaxonShouldExitError , PolyaxonClientException ) as e : Printer . print_error ( 'Could not Func build job `{}`.' . format ( arg_3 ) ) Printer . print_error ( 'Error message `{}`.' . format ( e ) ) sys . exit ( 1 ) Func_build_details ( arg_4 )


Question: Reads a data or define tag from the given node .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_2 . getAttribute ( 'name' ) arg_4 = arg_2 . getAttribute ( 'value' ) return arg_3 , arg_4

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


Question: Set bookmark for starting next aggregation .

def Func ( arg_0 ) : def _success_date ( ) : arg_1 = { 'date' : arg_0 . new_bookmark or datetime . datetime . utcnow ( ) . strftime ( arg_0 . doc_id_suffix ) } yield dict ( _index = arg_0 . last_index_written , _type = arg_0 . bookmark_doc_type , _source = arg_1 ) if arg_0 . last_index_written : bulk ( arg_0 . client , _success_date ( ) , stats_only = True )

Dump a certificate revocation list to a buffer.

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

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


Question: Create a new institute and add it to the database

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_0 . obj [ 'adapter' ] if not arg_1 : logger . warning ( "A Func has to have an internal id" ) arg_0 . abort ( ) if not arg_2 : arg_2 = arg_1 if arg_3 : arg_3 = list ( arg_3 ) try : load_Func ( arg_4 = arg_4 , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 ) except Exception as e : logger . warning ( e ) arg_0 . abort ( )

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


Question: Checks if a backup file of the filename in the applied patches after patch exists

def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_0 . db . is_patch ( arg_2 ) : return arg_3 = arg_0 . db . patches_after ( arg_2 ) for arg_2 in arg_3 : arg_4 = arg_0 . quilt_pc + File ( os . path . join ( arg_2 . get_name ( ) , arg_1 ) ) if arg_4 . exists ( ) : raise QuiltError ( "File %s is modified by patch %s" % ( arg_1 , arg_2 . get_name ( ) ) )

Say the workers to finish their jobs and quit.


Question: Detect profanity and match against custom and shared blacklists .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = False , arg_5 = False , arg_6 = None , arg_7 = False , arg_8 = None , arg_9 = False , arg_10 = None , ** arg_11 ) : arg_12 = arg_0 . Func . metadata [ 'url' ] arg_13 = { 'Endpoint' : arg_0 . _serialize . url ( "self.config.endpoint" , arg_0 . config . endpoint , 'str' , skip_quote = True ) } arg_12 = arg_0 . _client . format_url ( arg_12 , ** arg_13 ) arg_14 = { } if arg_3 is not None : arg_14 [ 'language' ] = arg_0 . _serialize . query ( "language" , arg_3 , 'str' ) if arg_4 is not None : arg_14 [ 'autocorrect' ] = arg_0 . _serialize . query ( "autocorrect" , arg_4 , 'bool' ) if arg_5 is not None : arg_14 [ 'PII' ] = arg_0 . _serialize . query ( "pii" , arg_5 , 'bool' ) if arg_6 is not None : arg_14 [ 'listId' ] = arg_0 . _serialize . query ( "list_id" , arg_6 , 'str' ) if arg_7 is not None : arg_14 [ 'classify' ] = arg_0 . _serialize . query ( "classify" , arg_7 , 'bool' ) arg_15 = { } arg_15 [ 'Accept' ] = 'application/json' arg_15 [ 'Content-Type' ] = 'text/plain' if arg_8 : arg_15 . update ( arg_8 ) arg_15 [ 'Content-Type' ] = arg_0 . _serialize . header ( "text_content_type" , arg_1 , 'str' ) arg_16 = arg_0 . _client . stream_upload ( arg_2 , arg_10 ) arg_17 = arg_0 . _client . post ( arg_12 , arg_14 , arg_15 , arg_16 ) arg_18 = arg_0 . _client . send ( arg_17 , stream = False , ** arg_11 ) if arg_18 . status_code not in [ 200 ] : raise models . APIErrorException ( arg_0 . _deserialize , arg_18 ) arg_19 = None if arg_18 . status_code == 200 : arg_19 = arg_0 . _deserialize ( 'Screen' , arg_18 ) if arg_9 : arg_20 = ClientRawResponse ( arg_19 , arg_18 ) return arg_20 return arg_19

Stop streaming samples from device and delete samples buffer


Question: Whether a connection can be established between those two meshes .

def Func ( arg_0 , arg_1 ) : assert arg_1 . is_mesh ( ) arg_2 = not arg_1 . is_connected ( ) and not arg_0 . is_connected ( ) arg_3 = arg_0 . _is_consumed_mesh ( ) != arg_1 . _is_consumed_mesh ( ) return arg_2 and 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: For OS X versions before Yosemite many launchd processes run simultaneously under different users and different permission models . The simpler asuser trick we use in Yosemite doesn t work since it gets routed to the wrong launchd . We instead need to find the running ssh - agent process and use its PID to navigate ourselves to the correct launchd .

def Func ( ) : for arg_0 in psutil . process_iter ( ) : if arg_0 . name ( ) == 'ssh-agent' : ssh_auth_sock = subprocess . check_output ( [ 'launchctl' , 'bsexec' , str ( arg_0 . pid ) , 'launchctl' , 'getenv' , 'SSH_AUTH_SOCK' ] ) . rstrip ( ) if ssh_auth_sock : _set_ssh_auth_sock ( ssh_auth_sock ) break else : daemon_warnings . warn ( 'ssh' , 'No running ssh-agent found linked to SSH_AUTH_SOCK' )

Add an HTTP header to response object.

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


Question: Gets a value of w for use in generating a pattern .

def Func ( arg_0 ) : arg_1 = arg_0 . _w if type ( arg_1 ) is list : return arg_1 [ arg_0 . _random . getUInt32 ( len ( arg_1 ) ) ] else : return arg_1


Question: Launches a new bolt from the player .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if arg_3 . get ( 'last_player_shot' ) == arg_3 . frame : return arg_3 [ 'last_player_shot' ] = arg_3 . frame arg_4 , arg_5 = arg_2 [ 'P' ] . position arg_0 . _teleport ( ( arg_4 - 1 , arg_5 ) )

Based on the config and the dataset, get the file name to store the
    results.


Question: Translate the given RGB color into the appropriate ANSI escape code for the given color mode . The offset is used for the base color which is used .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : if arg_4 == terminal . NO_COLORS : return '' , '' if arg_4 == terminal . ANSI_8_COLORS or arg_4 == terminal . ANSI_16_COLORS : arg_5 = ansi . rgb_to_ansi16 ( arg_0 , arg_1 , arg_2 ) arg_6 = ansi . ANSI_ESCAPE_CODE . format ( code = arg_5 + arg_3 - ansi . FOREGROUND_COLOR_OFFSET ) arg_7 = ansi . ANSI_ESCAPE_CODE . format ( code = arg_3 + ansi . COLOR_CLOSE_OFFSET ) return arg_6 , arg_7 if arg_4 == terminal . ANSI_256_COLORS : arg_5 = ansi . rgb_to_ansi256 ( arg_0 , arg_1 , arg_2 ) arg_6 = ansi . ANSI_ESCAPE_CODE . format ( code = '{base};5;{code}' . format ( base = 8 + arg_3 , code = arg_5 ) ) arg_7 = ansi . ANSI_ESCAPE_CODE . format ( code = arg_3 + ansi . COLOR_CLOSE_OFFSET ) return arg_6 , arg_7 if arg_4 == terminal . TRUE_COLORS : arg_6 = ansi . ANSI_ESCAPE_CODE . format ( code = '{base};2;{red};{green};{blue}' . format ( base = 8 + arg_3 , arg_0 = arg_0 , arg_1 = arg_1 , arg_2 = arg_2 ) ) arg_7 = ansi . ANSI_ESCAPE_CODE . format ( code = arg_3 + ansi . COLOR_CLOSE_OFFSET ) return arg_6 , arg_7 raise ColorfulError ( 'invalid color mode "{0}"' . format ( arg_4 ) )

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


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

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . in_bound_idxs is not None : arg_3 = arg_0 . _preprocess ( ) arg_2 = U . synchronize_labels ( arg_0 . in_bound_idxs , arg_1 , arg_2 , arg_3 . shape [ 0 ] ) arg_1 = arg_0 . in_bound_idxs arg_1 , arg_2 = U . remove_empty_segments ( arg_1 , arg_2 ) assert len ( arg_1 ) - 1 == len ( arg_2 ) , "Number of boundaries " "(%d) and number of labels(%d) don't match" % ( len ( arg_1 ) , len ( arg_2 ) ) arg_1 = np . asarray ( arg_1 , dtype = int ) return arg_1 , arg_2

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Get the minimum and maximum of the normalization of the array which sets the lower and upper limits of the \ colormap .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 is None : arg_1 = arg_0 . min ( ) if arg_2 is None : arg_2 = arg_0 . max ( ) return arg_1 , arg_2

Scale in the number of active blocks by the specified number.


Question: Fetch user data .

def Func ( arg_0 , Func ) : arg_2 = arg_0 . RUSERS + '/' + Func arg_3 = arg_0 . _fetch ( arg_2 , None ) return arg_3

Creates the variational distribution for LDA.

  Args:
    activation: Activation function to use.
    num_topics: The number of topics.
    layer_sizes: The number of hidden units per layer in the encoder.

  Returns:
    lda_variational: A function that takes a bag-of-words Tensor as
      input and returns a distribution over topics.


Question: Returns participation data for the given account_id and term_id .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = ( "/api/v1/accounts/sis_account_id:%s/analytics/" "terms/sis_term_id:%s/activity.json" ) % ( arg_1 , arg_2 ) return arg_0 . _get_resource ( arg_3 )

Called to create the control, which must derive from wxControl.


Question: Collapse pairs of nodes with the given namespaces that have the given relationship .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 , arg_4 : arg_5 , arg_6 : arg_3 ) -> None : arg_7 = build_relation_predicate ( arg_6 ) arg_8 = build_source_namespace_filter ( arg_2 ) arg_9 = build_target_namespace_filter ( arg_4 ) arg_10 = [ arg_7 , arg_8 , arg_9 ] _collapse_edge_passing_predicates ( arg_0 , arg_10 = arg_10 )

REST Add soundtouch audio effects to a Call


Question: Flush incomming socket messages .

def Func ( arg_0 ) : debug ( 'Funcing incomming socket messages' ) try : while True : arg_1 = arg_0 . socket . recv ( arg_0 . buffer_size ) debug ( b'< ' + arg_1 ) except socket . error : pass

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


Question: parse gene_sets input file type

def Func ( arg_0 ) : arg_1 = arg_0 . get_libraries ( ) if isinstance ( arg_0 . gene_sets , list ) : arg_2 = arg_0 . gene_sets elif isinstance ( arg_0 . gene_sets , str ) : arg_2 = [ arg_4 . strip ( ) for arg_4 in arg_0 . gene_sets . strip ( ) . split ( "," ) ] elif isinstance ( arg_0 . gene_sets , dict ) : arg_2 = [ arg_0 . gene_sets ] else : raise Exception ( "Error parsing enrichr libraries, please provided corrected one" ) arg_3 = [ ] for arg_4 in arg_2 : if isinstance ( arg_4 , dict ) : arg_3 . append ( arg_4 ) continue if isinstance ( arg_4 , str ) : if arg_4 in arg_1 : arg_3 . append ( arg_4 ) continue if arg_4 . lower ( ) . endswith ( ".gmt" ) and os . path . exists ( arg_4 ) : arg_0 . _logger . info ( "User Defined gene sets is given: %s" % arg_4 ) with open ( arg_4 ) as genesets : arg_5 = { line . strip ( ) . split ( "\t" ) [ 0 ] : line . strip ( ) . split ( "\t" ) [ 2 : ] for line in genesets . readlines ( ) } arg_3 . append ( arg_5 ) return arg_3

An interface for get requests that handles errors more gracefully to
        prevent data loss


Question: Convert a string of JSON which represents a NIST randomness beacon value into a NistBeaconValue object .

def Func ( arg_0 , arg_1 : arg_2 ) -> 'NistBeaconValue' : try : arg_3 = json . loads ( arg_1 ) except ValueError : return None arg_4 = { arg_0 . _KEY_FREQUENCY : None , arg_0 . _KEY_OUTPUT_VALUE : None , arg_0 . _KEY_PREVIOUS_OUTPUT_VALUE : None , arg_0 . _KEY_SEED_VALUE : None , arg_0 . _KEY_SIGNATURE_VALUE : None , arg_0 . _KEY_STATUS_CODE : None , arg_0 . _KEY_TIMESTAMP : None , arg_0 . _KEY_VERSION : None , } for arg_5 in arg_4 : if arg_5 in arg_3 : arg_4 [ arg_5 ] = arg_3 [ arg_5 ] if None in arg_4 . values ( ) : return None return arg_0 ( version = arg_4 [ arg_0 . _KEY_VERSION ] , frequency = int ( arg_4 [ arg_0 . _KEY_FREQUENCY ] ) , timestamp = int ( arg_4 [ arg_0 . _KEY_TIMESTAMP ] ) , seed_value = arg_4 [ arg_0 . _KEY_SEED_VALUE ] , previous_output_value = arg_4 [ arg_0 . _KEY_PREVIOUS_OUTPUT_VALUE ] , signature_value = arg_4 [ arg_0 . _KEY_SIGNATURE_VALUE ] , output_value = arg_4 [ arg_0 . _KEY_OUTPUT_VALUE ] , status_code = arg_4 [ arg_0 . _KEY_STATUS_CODE ] , )

Computes the outer product of two possibly batched vectors.

  Args:
    t1: A `tf.Tensor` of shape `[..., n]`.
    t2: A `tf.Tensor` of shape `[..., m]`.

  Returns:
    A tensor of shape `[..., n, m]` with matching batch dimensions, let's call
    it `r`, whose components are:

    ```None
      r[..., i, j] = t1[..., i] * t2[..., j]
    ```


Question: Returns the jQuery ScrollTo plugin file according to version number . TEMPLATE_DEBUG returns full file otherwise returns minified file .

def Func ( arg_0 = None ) : if arg_0 is None : arg_0 = getattr ( settings , 'DJFRONTEND_JQUERY_SCROLLTO' , DJFRONTEND_JQUERY_SCROLLTO_DEFAULT ) if getattr ( settings , 'TEMPLATE_DEBUG' , False ) : arg_1 = '<script src="{static}djfrontend/js/jquery/jquery.scrollTo/{v}/jquery.scrollTo.js"></script>' else : arg_1 = ( '<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/{v}/jquery.scrollTo.min.js"></script>' '<script>window.jQuery.fn.scrollTo || document.write(\'<script src="{static}djfrontend/js/jquery/jquery.scrollTo/{v}/jquery.scrollTo.min.js"><\/script>\')</script>' ) return format_html ( arg_1 , static = _static_url , v = arg_0 )

Create Session by desiredCapabilities

        Support:
            Android iOS Web(WebView)

        Returns:
            WebDriver Object.


Question: Given a varaible return the list of attributes that are available inside of a template

def Func ( arg_0 ) : arg_1 = partial ( is_valid_in_template , arg_0 ) return list ( filter ( arg_1 , dir ( arg_0 ) ) )

Remove cards from watchlist.

        :params trade_id: Trade id.


Question: Creates a new layer from file Layer PIL Image . If img is an image file or PIL Image object Creates a new layer with the given image file . The image is positioned on the canvas at x y . If img is a Layer uses that layer s x and y position and name .

def Func ( arg_0 , arg_1 , arg_2 = 0 , arg_3 = 0 , arg_4 = "" ) : from types import StringType if isinstance ( arg_1 , Image . Image ) : arg_1 = arg_1 . convert ( "RGBA" ) arg_0 . Funcs . append ( Layer ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) ) return len ( arg_0 . Funcs ) - 1 if isinstance ( arg_1 , Layer ) : arg_1 . canvas = arg_0 arg_0 . Funcs . append ( arg_1 ) return len ( arg_0 . Funcs ) - 1 if type ( arg_1 ) == StringType : arg_1 = Image . open ( arg_1 ) arg_1 = arg_1 . convert ( "RGBA" ) arg_0 . Funcs . append ( Layer ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) ) return len ( arg_0 . Funcs ) - 1

Whether a connection can be established between those two meshes.


Question: Returns a count of effective members for the group identified by the passed group ID .

def Func ( arg_0 , arg_1 ) : arg_0 . _valid_group_id ( arg_1 ) arg_2 = "{}/group/{}/effective_member?view=count" . format ( arg_0 . API , arg_1 ) arg_3 = arg_0 . _get_resource ( arg_2 ) arg_4 = arg_3 . get ( "data" ) . get ( "count" ) return int ( arg_4 )

Creates a tempfile and starts the given editor, returns the data afterwards.


Question: Provide resultset in our desired format from elasticsearch results

def Func ( arg_0 ) : def translate_result ( arg_1 ) : arg_2 = copy . copy ( arg_1 ) arg_3 = arg_2 . pop ( "_source" ) arg_2 . update ( { "data" : arg_3 , "score" : arg_2 [ "_score" ] } ) return arg_2 def translate_facet ( arg_1 ) : arg_4 = { term [ "term" ] : term [ "count" ] for term in arg_1 [ "terms" ] } return { "terms" : arg_4 , "total" : arg_1 [ "total" ] , "other" : arg_1 [ "other" ] , } arg_5 = [ translate_result ( hit ) for hit in arg_0 [ "hits" ] [ "hits" ] ] arg_6 = { "took" : arg_0 [ "took" ] , "total" : arg_0 [ "hits" ] [ "total" ] , "max_score" : arg_0 [ "hits" ] [ "max_score" ] , "results" : arg_5 , } if "facets" in arg_0 : arg_6 [ "facets" ] = { facet : translate_facet ( arg_0 [ "facets" ] [ facet ] ) for facet in arg_0 [ "facets" ] } return arg_6

use a thread lock on current method, if self.lock is defined


Question: Resources include feature stores coverage stores and WMS stores however does not include layer groups . names stores and workspaces can be provided as a comma delimited strings or as arrays and are used for filtering . Will always return an array .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : arg_2 = arg_0 . get_stores ( arg_1 = arg_2 , arg_3 = arg_3 ) arg_4 = [ ] for arg_5 in arg_2 : try : arg_4 . extend ( arg_5 . Func ( ) ) except FailedRequestError : continue if arg_1 is None : arg_1 = [ ] elif isinstance ( arg_1 , basestring ) : arg_1 = [ arg_5 . strip ( ) for arg_5 in arg_1 . split ( ',' ) if arg_5 . strip ( ) ] if arg_4 and arg_1 : return ( [ arg_6 for arg_6 in arg_4 if arg_6 . name in arg_1 ] ) return arg_4

Returns all objects that are considered a profiler overhead.
        Objects are hardcoded for convenience.


Question: Logs into the specified ftp server and returns connector .

def Func ( arg_0 ) : for arg_1 in range ( CFG_FTP_CONNECTION_ATTEMPTS ) : try : arg_0 . ftp = FtpHandler ( arg_0 . config . OXFORD . URL , arg_0 . config . OXFORD . LOGIN , arg_0 . config . OXFORD . PASSWORD ) arg_0 . logger . debug ( ( "Successful Funcion to the " "Oxford University Press server" ) ) return except socket_timeout_exception as err : arg_0 . logger . error ( ( 'Failed to Func %d of %d times. ' 'Will sleep for %d seconds and try again.' ) % ( arg_1 + 1 , CFG_FTP_CONNECTION_ATTEMPTS , CFG_FTP_TIMEOUT_SLEEP_DURATION ) ) time . sleep ( CFG_FTP_TIMEOUT_SLEEP_DURATION ) except Exception as err : arg_0 . logger . error ( ( 'Failed to Func to the Oxford ' 'University Press server. %s' ) % ( err , ) ) break raise LoginException ( err )


Question: Get the list of xformer functions for the given signature .

def Func ( arg_0 ) : return [ ( _wrapper ( arg_1 ) , arg_2 ) for ( arg_1 , arg_2 ) in _XFORMER . PARSER . parseString ( arg_0 , parseAll = True ) ]

Set the input or output mode for a specified pin.  Mode should be
        either GPIO.OUT or GPIO.IN.


Question: create a dict mapping model attributes to arrays

def Func ( arg_0 ) : arg_1 = arg_0 . reactions arg_2 = arg_0 . metabolites arg_3 = OrderedDict ( ) arg_3 [ "mets" ] = _cell ( [ met_id for met_id in create_mat_metabolite_id ( arg_0 ) ] ) arg_3 [ "metNames" ] = _cell ( arg_2 . list_attr ( "name" ) ) arg_3 [ "metFormulas" ] = _cell ( [ str ( m . formula ) for m in arg_2 ] ) try : arg_3 [ "metCharge" ] = array ( arg_2 . list_attr ( "charge" ) ) * 1. except TypeError : pass arg_3 [ "genes" ] = _cell ( arg_0 . genes . list_attr ( "id" ) ) arg_4 = scipy_sparse . dok_matrix ( ( len ( arg_0 . reactions ) , len ( arg_0 . genes ) ) ) if min ( arg_4 . shape ) > 0 : for arg_5 , arg_6 in enumerate ( arg_0 . reactions ) : for arg_7 in arg_6 . genes : arg_4 [ arg_5 , arg_0 . genes . index ( arg_7 ) ] = 1 arg_3 [ "rxnGeneMat" ] = arg_4 arg_3 [ "grRules" ] = _cell ( arg_1 . list_attr ( "gene_reaction_rule" ) ) arg_3 [ "rxns" ] = _cell ( arg_1 . list_attr ( "id" ) ) arg_3 [ "rxnNames" ] = _cell ( arg_1 . list_attr ( "name" ) ) arg_3 [ "subSystems" ] = _cell ( arg_1 . list_attr ( "subsystem" ) ) arg_10 = create_stoichiometric_matrix ( arg_0 ) arg_3 [ "S" ] = arg_10 if arg_10 is not None else [ [ ] ] arg_3 [ "lb" ] = array ( arg_1 . list_attr ( "lower_bound" ) ) * 1. arg_3 [ "ub" ] = array ( arg_1 . list_attr ( "upper_bound" ) ) * 1. arg_3 [ "b" ] = array ( arg_2 . list_attr ( "_bound" ) ) * 1. arg_3 [ "c" ] = array ( arg_1 . list_attr ( "objective_coefficient" ) ) * 1. arg_3 [ "rev" ] = array ( arg_1 . list_attr ( "reversibility" ) ) * 1 arg_3 [ "description" ] = str ( arg_0 . id ) return arg_3

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: Replace in text all occurences of any key in the given dictionary by its corresponding value . Returns the new string .

def Func ( arg_0 , arg_1 ) : arg_2 = re . compile ( "(%s)" % "|" . join ( map ( re . escape , arg_0 . keys ( ) ) ) ) return arg_2 . sub ( lambda mo : arg_0 [ mo . string [ mo . start ( ) : mo . end ( ) ] ] , arg_1 )

Create a platform without an ELF loaded.

        :param str arch: The architecture of the new platform
        :rtype: Linux


Question: Helper to get optional details about named references

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

Bring the interrupt pin on the GPIO into Linux userspace.


Question: Normalize the string according to normalization list

def Func ( arg_0 , arg_1 ) : return '' . join ( [ arg_0 . _Func . get ( arg_2 , arg_2 ) for arg_2 in nfd ( arg_1 ) ] )

Returns an SPI control byte.

        The MCP23S17 is a slave SPI device. The slave address contains
        four fixed bits and three user-defined hardware address bits
        (if enabled via IOCON.HAEN) (pins A2, A1 and A0) with the
        read/write bit filling out the control byte::

            +--------------------+
            |0|1|0|0|A2|A1|A0|R/W|
            +--------------------+
             7 6 5 4 3  2  1   0

        :param read_write_cmd: Read or write command.
        :type read_write_cmd: int


Question: Convert a Traceback into a dictionary representation

def Func ( arg_0 ) : if arg_0 . tb_next is None : arg_1 = None else : arg_1 = arg_0 . tb_next . Func ( ) arg_2 = { 'co_filename' : arg_0 . tb_frame . f_code . co_filename , 'co_name' : arg_0 . tb_frame . f_code . co_name , } arg_3 = { 'f_globals' : arg_0 . tb_frame . f_globals , 'f_code' : arg_2 , } return { 'tb_frame' : arg_3 , 'tb_lineno' : arg_0 . tb_lineno , 'tb_next' : arg_1 , }


Question: Basic demo of the monitoring capabilities .

def Func ( arg_0 , arg_1 ) : arg_2 = asyncio . get_event_loop ( ) arg_3 = AsyncSatel ( arg_0 , arg_1 , arg_2 , [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 25 , 26 , 27 , 28 , 29 , 30 ] , [ 8 , 9 , 10 ] ) arg_2 . run_until_complete ( arg_3 . connect ( ) ) arg_2 . create_task ( arg_3 . arm ( "3333" , 1 ) ) arg_2 . create_task ( arg_3 . disarm ( "3333" ) ) arg_2 . create_task ( arg_3 . keep_alive ( ) ) arg_2 . create_task ( arg_3 . monitor_status ( ) ) arg_2 . run_forever ( ) arg_2 . close ( )

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


Question: Instantiate a BlockadeConfig instance based on a given dictionary of configuration values

def Func ( arg_0 ) : try : arg_1 = arg_0 [ 'containers' ] arg_2 = { } for arg_3 , arg_4 in arg_1 . items ( ) : try : for arg_5 in BlockadeContainerConfig . Func ( arg_3 , arg_4 ) : if arg_5 . container_name : arg_6 = arg_5 . container_name arg_7 = [ c for c in arg_2 . values ( ) if c . container_name == arg_6 ] if arg_7 : raise BlockadeConfigError ( "Duplicate 'container_name' definition: %s" % ( arg_6 ) ) arg_2 [ arg_5 . name ] = arg_5 except Exception as err : raise BlockadeConfigError ( "Container '%s' config problem: %s" % ( arg_3 , err ) ) arg_8 = arg_0 . get ( 'network' ) if arg_8 : arg_9 = _DEFAULT_NETWORK_CONFIG . copy ( ) arg_9 . update ( arg_8 ) arg_8 = arg_9 else : arg_8 = _DEFAULT_NETWORK_CONFIG . copy ( ) return BlockadeConfig ( arg_2 , arg_8 = arg_8 ) except KeyError as err : raise BlockadeConfigError ( "Config missing value: " + str ( err ) ) except Exception as err : raise BlockadeConfigError ( "Failed to load config: " + str ( err ) )


Question: Run when a task finishes correctly .

def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = "failed" in arg_1 . _result arg_4 = "unreachable" in arg_1 . _result if ( "print_action" in arg_1 . _task . tags or arg_3 or arg_4 or arg_0 . _display . verbosity > 1 ) : arg_0 . _print_task ( ) arg_0 . last_skipped = False arg_6 = unicode ( arg_1 . _result . get ( "msg" , "" ) ) or unicode ( arg_1 . _result . get ( "reason" , "" ) ) or unicode ( arg_1 . _result . get ( "message" , "" ) ) arg_7 = [ arg_1 . _result . get ( "exception" , None ) , arg_1 . _result . get ( "module_stderr" , None ) , ] arg_7 = "\n" . join ( [ e for e in arg_7 if e ] ) . strip ( ) arg_0 . _print_host_or_item ( arg_1 . _host , arg_1 . _result . get ( "changed" , False ) , arg_6 , arg_1 . _result . get ( "diff" , None ) , is_host = True , error = arg_3 or arg_4 , stdout = arg_1 . _result . get ( "module_stdout" , None ) , arg_7 = arg_7 . strip ( ) , ) if "results" in arg_1 . _result : for arg_8 in arg_1 . _result [ "results" ] : arg_3 = "failed" in arg_8 arg_7 = [ arg_8 . get ( "exception" , None ) , arg_8 . get ( "module_stderr" , None ) ] arg_7 = "\n" . join ( [ e for e in arg_7 if e ] ) . strip ( ) arg_0 . _print_host_or_item ( arg_8 [ "item" ] , arg_8 . get ( "changed" , False ) , unicode ( arg_8 . get ( "msg" , "" ) ) , arg_8 . get ( "diff" , None ) , is_host = False , error = arg_3 , stdout = arg_8 . get ( "module_stdout" , None ) , arg_7 = arg_7 . strip ( ) , ) else : arg_0 . last_skipped = True print ( "." , end = "" )

Initialize configuration.

        :param app: An instance of :class:`~flask.Flask`.