Question: Set the internal flag to true .

def Func ( arg_0 ) : with arg_0 . __cond : arg_0 . __flag = True arg_0 . __cond . notify_all ( )

Register a new range type as a PostgreSQL range.

        >>> register_range_type("int4range", intrange, conn)

    The above will make sure intrange is regarded as an int4range for queries
    and that int4ranges will be cast into intrange when fetching rows.

    pgrange should be the full name including schema for the custom range type.

    Note that adaption is global, meaning if a range type is passed to a regular
    psycopg2 connection it will adapt it to its proper range type. Parsing of
    rows from the database however is not global and just set on a per connection
    basis.


Question: Searches the paths for the required module .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = os . path . join ( * arg_1 . split ( MODULE_PATH_SEP ) ) for arg_4 in arg_0 . paths : arg_5 = os . path . join ( arg_4 , arg_3 ) arg_6 = False if os . path . isdir ( arg_5 ) : arg_7 = os . path . join ( arg_5 , '__init__.py' ) arg_6 = True else : arg_7 = '{}.py' . format ( arg_5 ) if os . path . exists ( arg_7 ) : return ModuleLoader ( arg_5 , arg_1 , arg_7 , arg_6 ) return None

Calculate the seconds to reset the token requests, by obtaining the different
        between the current date and the next date when the token is fully regenerated.


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

def Func ( arg_0 , arg_1 = None , ** arg_2 ) : arg_3 = arg_2 . copy ( ) arg_3 [ 'trajectory' ] = arg_1 arg_4 = get_matching_kwargs ( arg_0 , arg_3 ) arg_0 = arg_0 ( ** arg_4 ) arg_5 = set ( arg_2 . keys ( ) ) - set ( arg_4 . keys ( ) ) return arg_0 , arg_5

Get the first `nbits` from `value`.

    :param value: Source value from which to extract
    :type value: int or long or BitVec
    :param int nbits: How many bits to extract
    :return: Low `nbits` bits of `value`.
    :rtype int or long or BitVec


Question: Adds all necessary parameters to traj .

def Func ( arg_0 ) : arg_0 . v_standard_parameter = Brian2Parameter arg_0 . v_fast_access = True arg_0 . f_add_parameter ( 'Net.C' , 281 * pF ) arg_0 . f_add_parameter ( 'Net.gL' , 30 * nS ) arg_0 . f_add_parameter ( 'Net.EL' , - 70.6 * mV ) arg_0 . f_add_parameter ( 'Net.VT' , - 50.4 * mV ) arg_0 . f_add_parameter ( 'Net.DeltaT' , 2 * mV ) arg_0 . f_add_parameter ( 'Net.tauw' , 40 * ms ) arg_0 . f_add_parameter ( 'Net.a' , 4 * nS ) arg_0 . f_add_parameter ( 'Net.b' , 0.08 * nA ) arg_0 . f_add_parameter ( 'Net.I' , .8 * nA ) arg_0 . f_add_parameter ( 'Net.Vcut' , 'vm > 0*mV' ) arg_0 . f_add_parameter ( 'Net.N' , 50 ) arg_3 = '''    dvm/dt=(gL*(EL-vm)+gL*DeltaT*exp((vm-VT)/DeltaT)+I-w)/C : volt    dw/dt=(a*(vm-EL)-w)/tauw : amp    Vr:volt    ''' arg_0 . f_add_parameter ( 'Net.eqs' , arg_3 ) arg_0 . f_add_parameter ( 'reset' , 'vm=Vr;w+=b' )

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


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

def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : super ( LocateResponsePayload , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_6 = utils . BytearrayStream ( arg_1 . Func ( arg_0 . length ) ) if arg_0 . is_tag_next ( arg_3 . Tags . LOCATED_ITEMS , arg_6 ) : arg_0 . _located_items = primitives . Integer ( tag = arg_3 . Tags . LOCATED_ITEMS ) arg_0 . _located_items . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . _unique_identifiers = [ ] while arg_0 . is_tag_next ( arg_3 . Tags . UNIQUE_IDENTIFIER , arg_6 ) : arg_9 = primitives . TextString ( tag = arg_3 . Tags . UNIQUE_IDENTIFIER ) arg_9 . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . _unique_identifiers . append ( arg_9 ) arg_0 . is_oversized ( arg_6 )

Called by the environment to make some initial configurations before performing the
        individual runs.

        Checks if all parameters marked for presetting were preset. If not raises a
        DefaultReplacementError.

        Locks all parameters.

        Removal of potential results of previous runs in case the trajectory was expanded to avoid
        mixing up undesired shortcuts in natural naming.


Question: Converts Config protobuf message to python dictionary

def Func ( arg_0 ) : arg_1 = { } for arg_2 in arg_0 . kvs : if arg_2 . HasField ( "value" ) : assert arg_2 . type == topology_pb2 . ConfigValueType . Value ( "STRING_VALUE" ) if PhysicalPlanHelper . _is_number ( arg_2 . value ) : arg_1 [ arg_2 . key ] = PhysicalPlanHelper . _get_number ( arg_2 . value ) elif arg_2 . value . lower ( ) in ( "true" , "false" ) : arg_1 [ arg_2 . key ] = True if arg_2 . value . lower ( ) == "true" else False else : arg_1 [ arg_2 . key ] = arg_2 . value elif arg_2 . HasField ( "serialized_value" ) and arg_2 . type == topology_pb2 . ConfigValueType . Value ( "PYTHON_SERIALIZED_VALUE" ) : arg_1 [ arg_2 . key ] = default_serializer . deserialize ( arg_2 . serialized_value ) else : assert arg_2 . HasField ( "type" ) Log . error ( "Unsupported config <key:value> found: %s, with type: %s" % ( str ( arg_2 ) , str ( arg_2 . type ) ) ) continue return arg_1


Question: DEPRECATED Reads a mesh saved in the HDF5 format .

def Func ( arg_0 , arg_1 = "" ) : arg_2 = Mesh ( ) arg_2 . elements . data = hdf [ "elements/connectivity" ] arg_2 . nodes . data = hdf [ "nodes/xyz" ] for arg_6 in hdf . keys ( ) : if arg_6 . startswith ( "/nodes/sets" ) : arg_7 = arg_6 . replace ( "/nodes/sets/" , "" ) arg_2 . nodes . sets [ arg_7 ] = set ( hdf [ arg_6 ] ) if arg_6 . startswith ( "/elements/sets" ) : arg_7 = arg_6 . replace ( "/elements/sets/" , "" ) arg_2 . elements . sets [ arg_7 ] = set ( hdf [ arg_6 ] ) if arg_6 . startswith ( "/elements/surfaces" ) : arg_7 = arg_6 . replace ( "/elements/surfaces/" , "" ) arg_2 . elements . surfaces [ arg_7 ] = hdf [ arg_6 ] if arg_6 . startswith ( "/fields/" ) : if arg_6 . endswith ( "/metadata" ) : arg_10 = arg_6 . split ( "/" ) [ 2 ] arg_11 = Field ( ) arg_11 . metadata = hdf [ "fields/{0}/metadata" . format ( arg_10 ) ] arg_11 . metadata = hdf [ "fields/{0}/data" . format ( arg_10 ) ] arg_11 . master = arg_2 arg_2 . add_field ( arg_10 , arg_11 ) hdf . close ( ) return arg_2

Iterate over each learner and unlink inactive SAP channel learners.

        This method iterates over each enterprise learner and unlink learner
        from the enterprise if the learner is marked inactive in the related
        integrated channel.


Question: An alternative rotate implementation that uses a geometric function . This is more accurate than the built - in version .

def Func ( arg_0 , arg_1 = 'z' , arg_2 = 0.0 ) : arg_2 = math . radians ( arg_2 ) if arg_1 . lower ( ) == 'x' : vert_function ( arg_0 , x_func = 'x' , y_func = 'y*cos({angle})-z*sin({angle})' . format ( arg_2 = arg_2 ) , z_func = 'y*sin({angle})+z*cos({angle})' . format ( arg_2 = arg_2 ) ) elif arg_1 . lower ( ) == 'y' : vert_function ( arg_0 , x_func = 'z*sin({angle})+x*cos({angle})' . format ( arg_2 = arg_2 ) , y_func = 'y' , z_func = 'z*cos({angle})-x*sin({angle})' . format ( arg_2 = arg_2 ) ) elif arg_1 . lower ( ) == 'z' : vert_function ( arg_0 , x_func = 'x*cos({angle})-y*sin({angle})' . format ( arg_2 = arg_2 ) , y_func = 'x*sin({angle})+y*cos({angle})' . format ( arg_2 = arg_2 ) , z_func = 'z' ) else : print ( 'Axis name is not valid; exiting ...' ) sys . exit ( 1 ) return None

Calls consume_function for each element of this streamlet. This function returns nothing


Question: Utility function to store a function as a magic of a specific kind .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if arg_1 == 'line_cell' : arg_0 [ 'line' ] [ arg_2 ] = arg_0 [ 'cell' ] [ arg_2 ] = arg_3 else : arg_0 [ arg_1 ] [ arg_2 ] = arg_3

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


Question: Returns valid tags an extension module might have

def Func ( ) : import sysconfig arg_0 = [ ] if six . PY2 : arg_1 = sysconfig . get_config_var ( 'MULTIARCH' ) if arg_1 is not None : arg_0 . append ( arg_1 ) else : arg_0 . append ( sysconfig . get_config_var ( 'SOABI' ) ) arg_0 . append ( 'abi3' ) arg_0 = [ t for t in arg_0 if t ] return arg_0

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


Question: Load a measurement .

async def Func ( arg_0 , arg_1 ) : arg_2 = "Func %s" % arg_1 return await asyncio . wait_for ( arg_0 . _protocol . send_command ( arg_2 ) , timeout = arg_0 . _timeout )

Set a property value or remove a property.

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

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

        This default implementation

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

        Removing a non-existing prop is NOT an error.

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

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


Question: Handles HTTP GET requests .

def Func ( arg_0 ) : arg_1 = arg_0 . uri_map . get ( arg_0 . path ) or arg_0 . _handle_other arg_2 , arg_3 = arg_1 ( ) arg_4 = gzip . compress ( arg_2 ) arg_0 . _send_response ( 200 , headers = ( ( 'Content-type' , '%s; charset=utf-8' % arg_3 ) , ( 'Content-Encoding' , 'gzip' ) , ( 'Content-Length' , len ( arg_4 ) ) ) ) arg_0 . wfile . write ( arg_4 )


Question: sends raws to be chunked

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = os . path . join ( arg_0 . paramsdict [ "project_dir" ] , "tmp-chunks-" + arg_0 . name ) if os . path . exists ( arg_3 ) : shutil . rmtree ( arg_3 ) os . makedirs ( arg_3 ) arg_4 = estimate_optim ( arg_0 , arg_1 [ 0 ] [ 0 ] , arg_2 ) arg_5 = int ( 8e6 ) arg_6 = int ( arg_4 / ( arg_5 / 4. ) ) * len ( arg_1 ) arg_7 = 0 if ( len ( arg_1 ) > len ( arg_2 ) ) or ( arg_4 < arg_5 ) : arg_7 = 1 arg_8 = time . time ( ) arg_9 = { } for arg_10 , arg_11 in enumerate ( arg_1 ) : arg_12 = os . path . splitext ( os . path . basename ( arg_11 [ 0 ] ) ) [ 0 ] if arg_7 : arg_9 [ arg_12 ] = [ arg_11 ] else : arg_13 = zcat_make_temps ( arg_0 , arg_11 , arg_10 , arg_3 , arg_5 , arg_6 , arg_8 ) arg_9 [ arg_12 ] = arg_13 if not arg_7 : print ( "" ) return arg_9

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


Question: Triggers an event and associates some data to it so if there are any subscribers their callback will be called synchronously .

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

Selects an open lswitch for a network.

        Note that it does not select the most full switch, but merely one with
        ports available.


Question: Build a QuantumCircuit object from a DAGCircuit .

def Func ( arg_0 ) : arg_1 = collections . OrderedDict ( ) for arg_2 in arg_0 . qregs . values ( ) : arg_3 = QuantumRegister ( arg_2 . size , arg_4 = arg_2 . name ) arg_1 [ arg_2 . name ] = arg_3 arg_5 = collections . OrderedDict ( ) for arg_6 in arg_0 . cregs . values ( ) : arg_7 = ClassicalRegister ( arg_6 . size , arg_4 = arg_6 . name ) arg_5 [ arg_6 . name ] = arg_7 arg_4 = arg_0 . name or None arg_8 = QuantumCircuit ( * arg_1 . values ( ) , * arg_5 . values ( ) , arg_4 = arg_4 ) for arg_9 in arg_0 . topological_op_nodes ( ) : arg_10 = [ ] for arg_11 in arg_9 . qargs : arg_10 . append ( arg_1 [ arg_11 [ 0 ] . name ] [ arg_11 [ 1 ] ] ) arg_12 = [ ] for arg_13 in arg_9 . cargs : arg_12 . append ( arg_5 [ arg_13 [ 0 ] . name ] [ arg_13 [ 1 ] ] ) if arg_9 . condition is None : arg_14 = None else : arg_14 = ( arg_9 . condition [ 0 ] , arg_9 . condition [ 1 ] ) arg_15 = arg_9 . op . copy ( ) arg_15 . control = arg_14 arg_8 . append ( arg_15 , arg_10 , arg_12 ) return arg_8

Annotate a set of records with stored fields.

        Args:
            records: A list or iterator (can be a Query object)
            chunk_size: The number of records to annotate at once (max 500).

        Returns:
            A generator that yields one annotated record at a time.


Question: Return a list of all FT232H device serial numbers connected to the machine . You can use these serial numbers to open a specific FT232H device by passing it to the FT232H initializer s serial parameter .

def Func ( arg_0 = arg_1 , arg_2 = arg_3 ) : try : arg_4 = None arg_4 = ftdi . new ( ) arg_5 = None arg_6 , arg_5 = ftdi . usb_find_all ( arg_4 , arg_0 , arg_2 ) if arg_6 < 0 : raise RuntimeError ( 'ftdi_usb_find_all returned error {0}: {1}' . format ( arg_6 , ftdi . get_error_string ( self . _ctx ) ) ) arg_7 = [ ] while arg_5 is not None : arg_8 , arg_9 , arg_10 , arg_11 = ftdi . usb_get_strings ( arg_4 , arg_5 . dev , 256 , 256 , 256 ) if arg_11 is not None : arg_7 . append ( arg_11 ) arg_5 = arg_5 . next return arg_7 finally : if arg_5 is not None : ftdi . list_free ( arg_5 ) if arg_4 is not None : ftdi . free ( arg_4 )

Leave a one-to-one conversation.

        One-to-one conversations are "sticky"; they can't actually be deleted.
        This API clears the event history of the specified conversation up to
        ``delete_upper_bound_timestamp``, hiding it if no events remain.


Question: Process a custom unitary node .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . name if arg_1 . arguments is not None : arg_3 = arg_0 . _process_node ( arg_1 . arguments ) else : arg_3 = [ ] arg_4 = [ arg_0 . _process_bit_id ( node_element ) for node_element in arg_1 . bitlist . children ] if arg_2 in arg_0 . gates : arg_5 = arg_0 . gates [ arg_2 ] [ "args" ] arg_6 = arg_0 . gates [ arg_2 ] [ "bits" ] arg_7 = max ( map ( len , arg_4 ) ) for arg_8 in range ( arg_7 ) : arg_0 . arg_stack . append ( { arg_5 [ arg_9 ] : arg_3 [ arg_9 ] for arg_9 in range ( len ( arg_5 ) ) } ) arg_10 = [ arg_8 * x for x in [ len ( arg_4 [ arg_9 ] ) > 1 for arg_9 in range ( len ( arg_4 ) ) ] ] arg_0 . bit_stack . append ( { arg_6 [ arg_9 ] : arg_4 [ arg_9 ] [ arg_10 [ arg_9 ] ] for arg_9 in range ( len ( arg_6 ) ) } ) arg_0 . _create_dag_op ( arg_2 , [ arg_0 . arg_stack [ - 1 ] [ arg_11 ] . sym ( ) for arg_11 in arg_5 ] , [ arg_0 . bit_stack [ - 1 ] [ arg_11 ] for arg_11 in arg_6 ] ) arg_0 . arg_stack . pop ( ) arg_0 . bit_stack . pop ( ) else : raise QiskitError ( "internal error undefined gate:" , "line=%s" % arg_1 . line , "file=%s" % arg_1 . file )

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


Question: Returns a 0 . 0 - 1 . 0 brightness adjusted to a light source .

Routes Alexa requests to appropriate handlers.

        Args:
            request: Alexa request.
        Returns:
            response: Response conforming Alexa response specification.


Question: Extract agency information .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . tags . get ( 'operator' ) arg_3 = arg_0 . tags . get ( 'url' ) or arg_0 . tags . get ( 'contact_website' ) if not arg_2 : return arg_4 = int ( hashlib . sha256 ( arg_2 . encode ( 'utf8' ) ) . hexdigest ( ) , 16 ) % 10 ** 8 return Agency ( arg_4 , arg_3 , arg_2 , '' )

Helper function to get sample names from subset.

        Parameters
        ----------
        subset : str
            Subset name. If None, returns all samples.

        Returns
        -------
        List of sample names


Question: Run one of the Bayesian models .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = 500 , arg_5 = False , arg_6 = True ) : if arg_0 == 'alpha_beta' : arg_0 , arg_7 = model_returns_t_alpha_beta ( arg_1 , arg_3 , arg_4 , arg_6 = arg_6 ) elif arg_0 == 't' : arg_0 , arg_7 = model_returns_t ( arg_1 , arg_4 , arg_6 = arg_6 ) elif arg_0 == 'normal' : arg_0 , arg_7 = model_returns_normal ( arg_1 , arg_4 , arg_6 = arg_6 ) elif arg_0 == 'best' : arg_0 , arg_7 = model_best ( arg_1 , arg_2 , arg_4 = arg_4 , arg_6 = arg_6 ) else : raise NotImplementedError ( 'Model {} not found.' 'Use alpha_beta, t, normal, or best.' . format ( arg_0 ) ) if arg_5 : arg_8 = pm . sample_ppc ( arg_7 , arg_4 = arg_4 , arg_0 = arg_0 , size = len ( arg_2 ) , arg_6 = arg_6 ) return arg_7 , arg_8 [ 'returns' ] return arg_7

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: Called when CairoCanvas has rendered a bot

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_3 . get_target ( ) if arg_0 . format == 'png' : arg_4 . write_to_png ( arg_0 . _output_file ( arg_2 ) ) arg_4 . finish ( ) arg_4 . flush ( )

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: Helper function for secant square .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 ) : arg_7 = update ( arg_0 , arg_1 . left , arg_1 . right , arg_3 , arg_4 , arg_8 = arg_1 . active ) arg_8 = arg_1 . active & ~ arg_7 . failed arg_9 = arg_1 . failed | arg_7 . failed arg_10 = val_where ( arg_8 , arg_7 . left , arg_1 . left ) arg_11 = val_where ( arg_8 , arg_7 . right , arg_1 . right ) arg_12 = arg_8 & tf . equal ( arg_10 . x , arg_3 . x ) arg_13 = arg_8 & tf . equal ( arg_11 . x , arg_3 . x ) arg_14 = arg_12 | arg_13 arg_15 = tf . where ( arg_12 , _secant ( arg_1 . left , arg_10 ) , arg_3 . x ) arg_15 = tf . where ( arg_13 , _secant ( arg_1 . right , arg_11 ) , arg_15 ) arg_16 = ( arg_10 . x <= arg_15 ) & ( arg_15 <= arg_11 . x ) arg_17 = tf . reduce_any ( input_tensor = arg_16 & arg_14 ) arg_18 = arg_1 . num_evals + arg_7 . num_evals arg_18 = arg_18 + tf . cast ( arg_17 , arg_18 . dtype ) arg_19 = _Secant2Result ( arg_8 = arg_8 & arg_16 , converged = arg_1 . converged , arg_9 = arg_9 , arg_18 = arg_18 , left = arg_10 , right = arg_11 ) def _apply_inner_update ( ) : arg_20 = prefer_static . cond ( arg_17 , ( lambda : arg_0 ( arg_15 ) ) , ( lambda : arg_3 ) ) return Func_update ( arg_0 , arg_19 , arg_2 , arg_20 , arg_4 , arg_5 , arg_6 ) return prefer_static . cond ( tf . reduce_any ( input_tensor = arg_19 . active ) , _apply_inner_update , lambda : arg_19 )

Download outputs for job.

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

    Examples:

    \b
    ```bash
    $ polyaxon job -j 1 outputs
    ```


Question: Report an error or warning

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = 0 ) : arg_0 . controller . Func ( linenumber = arg_3 , filename = arg_1 . path , severity = arg_0 . severity , arg_2 = arg_2 , rulename = arg_0 . __class__ . __name__ , char = arg_4 )

Configure the Outstation's database of input point definitions.

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


Question: Determines the most appropriate plotting unit for data .

def Func ( arg_0 , arg_1 = 0.1 , arg_2 = None , arg_3 = None ) : if not isinstance ( arg_0 , ( int , float ) ) : arg_0 = nominal_values ( arg_0 ) arg_0 = np . percentile ( arg_0 [ ~ np . isnan ( arg_0 ) ] , 25 ) if arg_2 is not None : arg_4 = pretty_element ( arg_2 ) else : arg_4 = '' if arg_3 == 'calibrated' : arg_5 = { 0 : 'mol/mol ' + arg_4 , 1 : 'mmol/mol ' + arg_4 , 2 : '$\mu$mol/mol ' + arg_4 , 3 : 'nmol/mol ' + arg_4 , 4 : 'pmol/mol ' + arg_4 , 5 : 'fmol/mol ' + arg_4 } elif arg_3 == 'ratios' : arg_5 = { 0 : 'counts/count ' + arg_4 , 1 : '$10^{-3}$ counts/count ' + arg_4 , 2 : '$10^{-6}$ counts/count ' + arg_4 , 3 : '$10^{-9}$ counts/count ' + arg_4 , 4 : '$10^{-12}$ counts/count ' + arg_4 , 5 : '$10^{-15}$ counts/count ' + arg_4 } elif arg_3 in ( 'rawdata' , 'despiked' , 'bkgsub' ) : arg_5 = arg_5 = { 0 : 'counts' , 1 : '$10^{-3}$ counts' , 2 : '$10^{-6}$ counts' , 3 : '$10^{-9}$ counts' , 4 : '$10^{-12}$ counts' , 5 : '$10^{-15}$ counts' } else : arg_5 = { 0 : '' , 1 : '' , 2 : '' , 3 : '' , 4 : '' , 5 : '' } arg_0 = abs ( arg_0 ) arg_6 = 0 if arg_0 < arg_1 : while arg_0 < arg_1 : arg_0 *= 1000 arg_6 += 1 return float ( 1000 ** arg_6 ) , arg_5 [ arg_6 ]

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: Returns True if this flag condition is met otherwise returns False . It determines if the condition is met by calling pre_filter with a queryset containing only self . condition .

def Func ( arg_0 , arg_1 , arg_2 = False ) : if arg_2 : return True return arg_0 . passes_filter ( arg_1 )

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


Question: Slices and returns a subset of feature data .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = True ) : arg_4 = arg_0 . data if arg_1 is not None : arg_4 = arg_4 . ix [ arg_1 ] if arg_2 is not None : arg_4 = arg_4 . ix [ : , arg_2 ] return arg_4 . to_dense ( ) if arg_3 else arg_4

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


Question: Adds a tag to the list of tags and makes sure the result list contains only unique results .

def Func ( arg_0 , arg_1 ) : arg_0 . tags = list ( set ( arg_0 . tags or [ ] ) | set ( [ arg_1 ] ) )

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: Computes the next closure for rules based on the symbol we got .

def Func ( arg_0 , arg_1 , arg_2 ) : return arg_0 . closure ( { arg_3 . move_dot ( ) for arg_3 in arg_1 if not arg_3 . at_end and arg_3 . rhs [ arg_3 . pos ] == arg_2 } , )

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


Question: Get the hyperparameters of a model explored by grid search .

def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_3 = arg_1 if is_type ( arg_1 , int ) else arg_0 . model_ids . index ( arg_1 ) arg_4 = arg_0 [ arg_3 ] if arg_4 . _is_xvalidated : arg_4 = h2o . get_model ( arg_4 . _xval_keys [ 0 ] ) arg_5 = [ arg_4 . params [ h ] [ 'actual' ] [ 0 ] if isinstance ( arg_4 . params [ h ] [ 'actual' ] , list ) else arg_4 . params [ h ] [ 'actual' ] for h in arg_0 . hyper_params ] if arg_2 : print ( 'Hyperparameters: [' + ', ' . join ( list ( arg_0 . hyper_params . keys ( ) ) ) + ']' ) return arg_5

Update annotations of discretized continuous pulse function with duration.

    Args:
        discretized_pulse: Discretized decorated continuous pulse.


Question: The list of compilers used to build asset .

def Func ( arg_0 ) : return [ arg_0 . environment . Func . get ( arg_1 ) for arg_1 in arg_0 . compiler_extensions ]

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: Download the model in MOJO format .

def Func ( arg_0 , arg_1 = "." , arg_2 = False , arg_3 = "" ) : assert_is_type ( arg_1 , str ) assert_is_type ( arg_2 , bool ) if not arg_0 . have_mojo : raise H2OValueError ( "Export to MOJO not supported" ) if arg_2 : if arg_3 == "" : h2o . api ( "GET /3/h2o-genmodel.jar" , save_to = os . path . join ( arg_1 , "h2o-genmodel.jar" ) ) else : h2o . api ( "GET /3/h2o-genmodel.jar" , save_to = os . path . join ( arg_1 , arg_3 ) ) return h2o . api ( "GET /3/Models/%s/mojo" % arg_0 . model_id , save_to = arg_1 )


Question: Attempts to fill the result cache with at least the given number of results .

def Func ( arg_0 , arg_1 ) : try : while len ( arg_0 . _result_cache ) < arg_1 : arg_0 . _result_cache . append ( next ( arg_0 . _result_iter ) ) return True except StopIteration : return False

Takes a list of dictionaries with keys corresponding to ``stream_command``
    arguments, and runs all concurrently.

    :param commands: A list of dictionaries, the keys of which should line up
                     with the arguments to ``stream_command`` function.
    :type commands: ``list`` of ``dict``
    :param parallel: If true, commands will be run in parallel.
    :type parallel: ``bool``


Question: Generate the context dict for the given path .

def Func ( arg_0 , arg_1 ) : from . import __url__ as sigal_link arg_0 . logger . info ( "Output album : %r" , arg_1 ) return { 'album' : arg_1 , 'index_title' : arg_0 . index_title , 'settings' : arg_0 . settings , 'sigal_link' : sigal_link , 'theme' : { 'name' : os . path . basename ( arg_0 . theme ) , 'url' : url_from_path ( os . path . relpath ( arg_0 . theme_path , arg_1 . dst_path ) ) } , }

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: Complementary error function .

Stop streaming samples from device and delete samples buffer


Question: Draw line from point x0 y0 to x 1 y1 . Will draw beyond matrix bounds .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = None , arg_6 = None ) : arg_7 = abs ( arg_4 - arg_2 ) > abs ( arg_3 - arg_1 ) if arg_7 : arg_1 , arg_2 = arg_2 , arg_1 arg_3 , arg_4 = arg_4 , arg_3 if arg_1 > arg_3 : arg_1 , arg_3 = arg_3 , arg_1 arg_2 , arg_4 = arg_4 , arg_2 arg_8 = arg_3 - arg_1 arg_9 = abs ( arg_4 - arg_2 ) arg_10 = arg_8 / 2 if arg_2 < arg_4 : arg_11 = 1 else : arg_11 = - 1 arg_12 = 0 for arg_13 in range ( arg_1 , arg_3 + 1 ) : if arg_6 : arg_5 = arg_6 ( arg_12 ) arg_12 += 1 if arg_7 : arg_0 ( arg_2 , arg_13 , arg_5 ) else : arg_0 ( arg_13 , arg_2 , arg_5 ) arg_10 -= arg_9 if arg_10 < 0 : arg_2 += arg_11 arg_10 += arg_8

Parse the conservation predictors

        Args:
            variant(dict): A variant dictionary

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


Question: override to allow old - pylab flag with deprecation warning

def Func ( arg_0 , arg_1 = None ) : arg_1 = sys . argv [ 1 : ] if arg_1 is None else arg_1 if '-pylab' in arg_1 : arg_1 = arg_1 [ : ] arg_2 = arg_1 . index ( '-pylab' ) warn . warn ( "`-pylab` flag has been deprecated.\n" "    Use `--pylab` instead, or `--pylab=foo` to specify a backend." ) arg_3 = '--pylab' if len ( arg_1 ) > arg_2 + 1 : arg_4 = arg_1 [ arg_2 + 1 ] if arg_4 in ( 'wx' , 'qt' , 'qt4' , 'gtk' , 'auto' ) : arg_3 = '--pylab=' + arg_4 arg_1 . pop ( arg_2 + 1 ) arg_1 [ arg_2 ] = arg_3 return super ( TerminalIPythonApp , arg_0 ) . Func ( arg_1 )

Processes a scheduled consumption request that has completed

        :type token: RequestToken
        :param token: The token associated to the consumption
            request that is used to identify the request.


Question: Form for selecting products from an individual product category .

def Func ( arg_0 , arg_1 ) : arg_2 = "products" arg_3 = "vouchers" arg_4 = _handle_voucher ( arg_0 , arg_3 ) arg_5 , arg_6 = arg_4 arg_1 = int ( arg_1 ) arg_7 = inventory . Category . objects . get ( pk = arg_1 ) with BatchController . batch ( arg_0 . user ) : arg_8 = ProductController . available_products ( arg_0 . user , arg_7 = arg_7 , ) if not arg_8 : messages . warning ( arg_0 , ( "There are no products available from category: " + arg_7 . name ) , ) return redirect ( "dashboard" ) arg_9 = _handle_products ( arg_0 , arg_7 , arg_8 , arg_2 ) arg_10 , arg_11 , arg_12 = arg_9 if arg_0 . POST and not arg_6 and not arg_10 . errors : if arg_10 . has_changed ( ) : messages . success ( arg_0 , "Your reservations have been updated." , ) return redirect ( review ) arg_13 = { "category" : arg_7 , "discounts" : arg_11 , "form" : arg_10 , "voucher_form" : arg_5 , } return render ( arg_0 , "registrasion/Func.html" , arg_13 )

Send the message via HTTP POST, default is json-encoded.


Question: Convert Python object to string .

def Func ( arg_0 , arg_1 = 'utf-8' , arg_2 = 'strict' ) : if not IS_PY3 and isinstance ( arg_0 , unicode ) : return arg_0 . encode ( arg_1 , arg_2 ) return str ( arg_0 )

Run stochastic volatility model.

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

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

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

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


Question: The endpoint state machine failed due to protocol error .

def Func ( arg_0 , arg_1 ) : super ( Connection , arg_0 ) . Func ( arg_1 ) arg_0 . _connection_failed ( "Protocol error occurred." )

Bit Test.

        Selects the bit in a bit string (specified with the first operand, called the bit base) at the
        bit-position designated by the bit offset (specified by the second operand) and stores the value
        of the bit in the CF flag. The bit base operand can be a register or a memory location; the bit
        offset operand can be a register or an immediate value:
            - If the bit base operand specifies a register, the instruction takes the modulo 16, 32, or 64
              of the bit offset operand (modulo size depends on the mode and register size; 64-bit operands
              are available only in 64-bit mode).
            - If the bit base operand specifies a memory location, the operand represents the address of the
              byte in memory that contains the bit base (bit 0 of the specified byte) of the bit string. The
              range of the bit position that can be referenced by the offset operand depends on the operand size.

        :param cpu: current CPU.
        :param dest: bit base.
        :param src: bit offset.


Question: iterate through the attributes of every logger s handler

def Func ( ) : arg_0 = namedtuple ( "Members" , [ "name" , "handler" , "member_name" , "member" ] ) arg_1 = logging . Logger . manager arg_2 = [ ] arg_3 = set ( [ modname ( ) ] ) if arg_1 . root : arg_2 = list ( arg_1 . loggerDict . items ( ) ) arg_2 . append ( ( "root" , arg_1 . root ) ) for arg_4 , arg_5 in arg_2 : if arg_4 in arg_3 : continue for arg_6 in getattr ( arg_5 , "handlers" , [ ] ) : arg_7 = inspect . getmembers ( arg_6 ) for arg_8 , arg_9 in arg_7 : yield arg_0 ( arg_4 , arg_6 , arg_8 , arg_9 )

Internal ``RUN_TASK`` consumer to run the task's callable


Question: Parse a Git log file .

def Func ( arg_0 ) : with open ( arg_0 , 'r' , errors = 'surrogateescape' , newline = os . linesep ) as f : arg_1 = GitParser ( f ) for arg_2 in arg_1 . parse ( ) : yield arg_2


Question: Get the first unmasked entry of each time series in the batch .

def Func ( arg_0 , arg_1 ) : arg_2 = tf . shape ( input = arg_0 ) [ - 1 ] arg_3 = ( tf . cast ( ~ arg_1 , tf . int32 ) * tf . range ( arg_2 , 0 , - 1 ) ) arg_4 = arg_2 - tf . reduce_max ( input_tensor = arg_3 , axis = - 1 ) if arg_4 . shape . ndims is None : raise NotImplementedError ( 'Cannot compute initial values of a masked time series with' 'dynamic rank.' ) return tf . squeeze ( tf . compat . v1 . batch_gather ( params = arg_0 , indices = arg_4 [ ... , tf . newaxis ] ) , axis = - 1 )

Disconnect internal signals so unit can be reused by parent unit


Question: Creates dist_fn dist_fn_wrapped dist_fn_args dist_fn_name .

def Func ( arg_0 , arg_1 ) : if not _is_dict_like ( arg_1 ) : raise TypeError ( '`model` must be convertible to `dict` (saw: {}).' . format ( type ( arg_1 ) . __name__ ) ) [ arg_0 . _dist_fn , arg_0 . _dist_fn_wrapped , arg_0 . _dist_fn_args , arg_0 . _dist_fn_name , ] = _prob_chain_rule_flatten ( arg_1 )

a "list all" search that doesn't require a query. Here we return to
       the user all objects that have custom properties value type set to
       container, which is set when the image is pushed.

       IMPORTANT: the upload function adds this metadata. For a container to
       be found by the client, it must have the properties value with type
       as container. It also should have a "uri" in properties to show the
       user, otherwise the user will have to query / download based on the id


Question: Return jid tuple from an Unicode string .

def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_3 = arg_1 . split ( u"/" , 1 ) arg_4 = arg_3 [ 0 ] . split ( u"@" , 1 ) if len ( arg_4 ) == 2 : arg_5 = arg_4 [ 0 ] arg_6 = arg_4 [ 1 ] if arg_2 : arg_5 = arg_0 . __prepare_local ( arg_5 ) arg_6 = arg_0 . __prepare_domain ( arg_6 ) else : arg_5 = None arg_6 = arg_4 [ 0 ] if arg_2 : arg_6 = arg_0 . __prepare_domain ( arg_6 ) if len ( arg_3 ) == 2 : arg_7 = arg_3 [ 1 ] if arg_2 : arg_7 = arg_0 . __prepare_resource ( arg_3 [ 1 ] ) else : arg_7 = None if not arg_6 : raise JIDError ( "Domain is required in JID." ) return ( arg_5 , arg_6 , arg_7 )

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


Question: Empties cached sitetree data .

def Func ( arg_0 , ** arg_1 ) : cache . delete ( 'sitetrees' ) cache . delete ( 'sitetrees_reset' ) arg_1 . get ( 'init' , True ) and arg_0 . init ( )

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


Question: Returns mappable data for a random subset of voxels .

def Func ( arg_0 , arg_1 ) : arg_2 = np . arange ( arg_0 . masker . n_vox_in_vol ) np . random . shuffle ( arg_2 ) arg_3 = arg_2 [ 0 : arg_1 ] return arg_0 . get_image_data ( arg_2 = arg_3 )


Question: Update the cache stats . If no cache - result is specified we iniitialize the key . Otherwise we increment the correct cache - result .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 is None : arg_0 . _CACHE_STATS [ 'access_stats' ] . setdefault ( arg_1 , { 'hit' : 0 , 'miss' : 0 , 'expired' : 0 } ) else : arg_0 . _CACHE_STATS [ 'access_stats' ] [ arg_1 ] [ arg_2 ] += 1


Question: Read block type switch descriptor for given kind of blockType .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . verboseRead ( TypeCountAlphabet ( 'BT#' + arg_1 [ 0 ] . upper ( ) , description = '{} block types' . format ( arg_1 ) , ) ) arg_0 . numberOfBlockTypes [ arg_1 ] = arg_2 if arg_2 >= 2 : arg_0 . FuncCodes [ arg_1 ] = arg_0 . readPrefixCode ( BlockTypeAlphabet ( 'BT' + arg_1 [ 0 ] . upper ( ) , arg_2 ) ) arg_0 . blockCountCodes [ arg_1 ] = arg_0 . readPrefixCode ( BlockCountAlphabet ( 'BC' + arg_1 [ 0 ] . upper ( ) ) ) arg_6 = arg_0 . verboseRead ( arg_0 . blockCountCodes [ arg_1 ] ) else : arg_6 = 1 << 24 arg_0 . currentBlockCounts [ arg_1 ] = arg_6


Question: Find the distance to the nearest pois from each source node . The bigger values in this case mean less accessibility .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 1 , arg_4 = None , arg_5 = None , arg_6 = False ) : if arg_4 is None : arg_4 = arg_1 if arg_2 not in arg_0 . poi_category_names : assert 0 , "Need to call set_pois for this category" if arg_3 > arg_0 . max_pois : assert 0 , "Asking for more pois than set in init_pois" arg_7 = arg_0 . _imp_name_to_num ( arg_5 ) arg_8 , arg_9 = arg_0 . net . find_all_Func ( arg_1 , arg_3 , arg_2 . encode ( 'utf-8' ) , arg_7 ) arg_8 [ arg_8 == - 1 ] = arg_4 arg_10 = pd . DataFrame ( arg_8 , index = arg_0 . node_ids ) arg_10 . columns = list ( range ( 1 , arg_3 + 1 ) ) if arg_6 : arg_12 = pd . DataFrame ( arg_9 , index = arg_0 . node_ids ) arg_12 . columns = [ "poi%d" % i for i in range ( 1 , arg_3 + 1 ) ] for arg_13 in arg_12 . columns : arg_14 = arg_12 [ arg_13 ] . astype ( 'int' ) arg_12 [ arg_13 ] = arg_0 . poi_category_indexes [ arg_2 ] . values [ arg_14 ] arg_12 . loc [ arg_14 == - 1 , arg_13 ] = np . nan arg_10 = pd . concat ( [ arg_10 , arg_12 ] , axis = 1 ) return arg_10

Operates on item_dict

        Promotes the resource_name and resource_type fields to the
        top-level of the serialization so they can be printed as columns.
        Also makes a copies name field to type, which is a default column.


Question: Calculate the margin in pixels above the plot area setting border_top .

def Func ( arg_0 ) : arg_0 . border_top = 5 if arg_0 . show_graph_title : arg_0 . border_top += arg_0 . title_font_size arg_0 . border_top += 5 if arg_0 . show_graph_subtitle : arg_0 . border_top += arg_0 . subtitle_font_size

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: Creates a new Cloud SQL instance .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = arg_0 . get_conn ( ) . instances ( ) . insert ( project = arg_2 , arg_1 = arg_1 ) . execute ( num_retries = arg_0 . num_retries ) arg_4 = arg_3 [ "name" ] arg_0 . _wait_for_operation_to_complete ( arg_2 = arg_2 , arg_4 = arg_4 )

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: Sends PUB command to the NATS server .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : if arg_1 == "" : raise ErrBadSubject arg_5 = ( "%d" % arg_4 ) . encode ( ) arg_6 = b'' . join ( [ PUB_OP , _SPC_ , arg_1 . encode ( ) , _SPC_ , arg_2 , _SPC_ , arg_5 , _CRLF_ , arg_3 , _CRLF_ ] ) arg_0 . stats [ 'out_msgs' ] += 1 arg_0 . stats [ 'out_bytes' ] += arg_4 yield from arg_0 . _send_command ( arg_6 ) if arg_0 . _flush_queue . empty ( ) : yield from arg_0 . _flush_pending ( )

Returns a dictionary of formatted data understood by the storage service.

        The data is put into an :class:`~pypet.parameter.ObjectTable` named 'data'.
        If the parameter is explored, the exploration range is also put into another table
        named 'explored_data'.

        :return: Dictionary containing the data and optionally the exploration range.


Question: Post a review

def Func ( arg_0 , arg_1 ) : arg_2 = make_post_request ( arg_0 , 'reviews' , arg_3 = arg_1 ) arg_3 = arg_2 . json ( ) if arg_2 . status_code == 200 : return arg_3 [ 'status' ] else : raise ReviewNotPostedException ( message = arg_3 [ 'message' ] , error_code = arg_3 [ 'error_code' ] , request_id = arg_3 [ 'request_id' ] )

Initialize all ephemerals used by derived classes.


Question: Remove a patch from the patches list

def Func ( arg_0 , arg_1 ) : arg_0 . _check_patch ( arg_1 ) arg_2 = arg_0 . patch2line [ arg_1 ] del arg_0 . patch2line [ arg_1 ] arg_0 . patchlines . remove ( arg_2 )

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


Question: Remove the key from the index .

def Func ( arg_0 , arg_1 ) : if arg_0 . prepickle : arg_1 = pickle . dumps ( arg_1 ) if arg_1 not in arg_0 . keys : raise ValueError ( "The given key does not exist" ) for arg_2 , arg_3 in zip ( arg_0 . keys [ arg_1 ] , arg_0 . hashtables ) : arg_3 . Func_val ( arg_2 , arg_1 ) if not arg_3 . get ( arg_2 ) : arg_3 . Func ( arg_2 ) arg_0 . keys . Func ( arg_1 )

Disallow users other than the user whose email is being reset.


Question: Get a printable fuzzed object

def Func ( arg_0 ) : try : if arg_0 . config . strong_fuzz : arg_1 = PJFMutators ( arg_0 . config ) if arg_0 . config . url_encode : if sys . version_info >= ( 3 , 0 ) : return urllib . parse . quote ( arg_1 . fuzz ( json . dumps ( arg_0 . config . json ) ) ) else : return urllib . quote ( arg_1 . fuzz ( json . dumps ( arg_0 . config . json ) ) ) else : if type ( arg_0 . config . json ) in [ list , dict ] : return arg_1 . fuzz ( json . dumps ( arg_0 . config . json ) ) else : return arg_1 . fuzz ( arg_0 . config . json ) else : if arg_0 . config . url_encode : if sys . version_info >= ( 3 , 0 ) : return urllib . parse . quote ( arg_0 . get_Func ( arg_0 . config . indent , arg_0 . config . utf8 ) ) else : return urllib . quote ( arg_0 . get_Func ( arg_0 . config . indent , arg_0 . config . utf8 ) ) else : return arg_0 . get_Func ( arg_0 . config . indent , arg_0 . config . utf8 ) except Exception as e : raise PJFBaseException ( e . message if hasattr ( e , "message" ) else str ( e ) )


Question: Create a callable that generates samples from a dataset .

def Func ( arg_0 , arg_1 = 100 , arg_2 = 64 , arg_3 = None ) : assert arg_2 >= 2 , 'batch_size must be at least 2!' assert isinstance ( arg_0 , ( tuple , list ) ) , 'arrays must be a tuple or list!' if arg_3 is None or isinstance ( arg_3 , int ) : arg_3 = np . random . RandomState ( arg_3 ) def sample ( ) : arg_4 = [ np . zeros ( ( arg_2 , arg_1 , arg_8 . shape [ 1 ] ) , arg_8 . dtype ) for arg_8 in arg_0 ] for arg_5 in range ( arg_2 ) : arg_6 = arg_3 . randint ( len ( arg_0 [ 0 ] ) - arg_1 ) for arg_7 , arg_8 in zip ( arg_4 , arg_0 ) : arg_7 [ arg_5 ] = arg_8 [ arg_6 : arg_6 + arg_1 ] return arg_4 return sample

Calculate hexadecimal representation of the phrase.


Question: This is the residual objective function to be minimized by scipy . leastsq .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = _fourier_func ( arg_0 , arg_1 , arg_2 ) arg_4 = arg_2 - arg_3 return arg_4


Question: Insert size bytes of empty space starting at offset .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 2 ** 16 ) : assert 0 < arg_1 assert 0 <= arg_2 arg_4 = False arg_0 . seek ( 0 , 2 ) arg_5 = arg_0 . tell ( ) arg_6 = arg_5 - arg_2 arg_0 . write ( b'\x00' * arg_1 ) arg_0 . flush ( ) try : try : import mmap arg_7 = mmap . mmap ( arg_0 . fileno ( ) , arg_5 + arg_1 ) try : arg_7 . move ( arg_2 + arg_1 , arg_2 , arg_6 ) finally : arg_7 . close ( ) except ( ValueError , EnvironmentError , ImportError ) : arg_4 = lock ( arg_0 ) arg_0 . truncate ( arg_5 ) arg_0 . seek ( 0 , 2 ) arg_8 = arg_1 while arg_8 : arg_9 = min ( arg_3 , arg_8 ) arg_0 . write ( b"\x00" * arg_9 ) arg_8 -= arg_9 arg_0 . seek ( arg_5 , 0 ) while arg_6 : arg_10 = min ( arg_3 , arg_6 ) arg_0 . seek ( - arg_10 , 1 ) arg_11 = arg_0 . tell ( ) arg_12 = arg_0 . read ( arg_10 ) arg_0 . seek ( - arg_10 + arg_1 , 1 ) arg_0 . write ( arg_12 ) arg_0 . seek ( arg_11 ) arg_6 -= arg_10 arg_0 . flush ( ) finally : if arg_4 : unlock ( arg_0 )

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: check that a node is inside a for or while loop

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_1 . parent while arg_3 : if isinstance ( arg_3 , ( astroid . For , astroid . While ) ) : if arg_1 not in arg_3 . orelse : return if isinstance ( arg_3 , ( astroid . ClassDef , astroid . FunctionDef ) ) : break if ( isinstance ( arg_3 , astroid . TryFinally ) and arg_1 in arg_3 . finalbody and isinstance ( arg_1 , astroid . Continue ) ) : arg_0 . add_message ( "continue-in-finally" , arg_1 = arg_1 ) arg_3 = arg_3 . parent arg_0 . add_message ( "not-in-loop" , arg_1 = arg_1 , args = arg_2 )

Returns an authorized HTTP object to be used to build a Google cloud
        service hook connection.


Question: Set the location of all the pois of this category . The pois are connected to the closest node in the Pandana network which assumes no impedance between the location of the variable and the location of the closest network node .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : if arg_1 not in arg_0 . poi_category_names : arg_0 . poi_category_names . append ( arg_1 ) arg_0 . max_pois = arg_3 arg_7 = arg_0 . get_node_ids ( arg_4 , arg_5 ) arg_0 . poi_category_indexes [ arg_1 ] = arg_7 . index arg_9 = arg_0 . _node_indexes ( arg_7 ) arg_0 . net . initialize_category ( arg_2 , arg_3 , arg_1 . encode ( 'utf-8' ) , arg_9 . values )

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

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

        req -- a requests prepared request object


Question: Resolve the names of outputs for this layer into shape tuples .

def Func ( arg_0 ) : arg_1 = None for arg_2 , arg_3 in enumerate ( arg_0 . _input_shapes . values ( ) ) : if arg_2 == 0 : arg_1 = arg_3 if len ( arg_1 ) != len ( arg_3 ) or any ( arg_4 is not None and arg_5 is not None and arg_4 != arg_5 for arg_4 , arg_5 in zip ( arg_1 [ : - 1 ] , arg_3 [ : - 1 ] ) ) : raise util . ConfigurationError ( 'layer "{}" incompatible input shapes {}' . format ( arg_0 . name , arg_0 . _input_shapes ) ) arg_6 = arg_0 . kwargs . get ( 'size' ) arg_3 = arg_0 . kwargs . get ( 'shape' ) if arg_3 is not None : pass elif arg_6 is not None : arg_3 = tuple ( arg_1 [ : - 1 ] ) + ( arg_6 , ) else : raise util . ConfigurationError ( 'layer "{}" does not specify a size' . format ( arg_0 . name ) ) arg_0 . _output_shapes [ 'out' ] = arg_3

The similarity of two patterns in the bit-encoding space is displayed alongside
  their similarity in the sp-coinc space.


Question: Close the policy instance .

def Func ( arg_0 ) : arg_0 . _logger . info ( "Closing" ) if arg_0 . _opened : arg_0 . _opened = False else : arg_0 . _logger . warning ( "Func() called, but connection policy was alredy Funcd" ) return

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: Visualizes a qualitative analysis of a given model .

def Func ( arg_0 , arg_1 , arg_2 = 1 , arg_3 = 3 , arg_4 = 8 ) : arg_5 = lambda dist : tf . reduce_mean ( input_tensor = dist . mean ( ) , axis = 0 ) with tf . compat . v1 . name_scope ( "val_reconstruction" ) : arg_6 = functools . partial ( arg_1 . reconstruct , arg_0 = arg_0 , arg_2 = arg_2 ) visualize_reconstruction ( arg_0 , arg_5 ( arg_6 ( ) ) ) visualize_reconstruction ( arg_0 , arg_5 ( arg_6 ( sample_static = True ) ) , name = "static_prior" ) visualize_reconstruction ( arg_0 , arg_5 ( arg_6 ( sample_dynamic = True ) ) , name = "dynamic_prior" ) visualize_reconstruction ( arg_0 , arg_5 ( arg_6 ( swap_static = True ) ) , name = "swap_static" ) visualize_reconstruction ( arg_0 , arg_5 ( arg_6 ( swap_dynamic = True ) ) , name = "swap_dynamic" ) with tf . compat . v1 . name_scope ( "generation" ) : arg_7 = functools . partial ( arg_1 . generate , arg_3 = arg_3 , arg_4 = arg_4 , arg_2 = arg_2 ) image_summary ( arg_5 ( arg_7 ( fix_static = True ) ) , "fix_static" ) image_summary ( arg_5 ( arg_7 ( fix_dynamic = True ) ) , "fix_dynamic" )

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


Question: Async fetching of all tags dates .

def Func ( arg_0 ) : if arg_0 . options . verbose : print ( "Fetching dates for {} tags..." . format ( len ( arg_0 . filtered_tags ) ) ) def worker ( arg_1 ) : arg_0 . get_time_of_tag ( arg_1 ) arg_2 = [ ] arg_3 = 50 arg_4 = len ( arg_0 . filtered_tags ) for arg_5 in range ( 0 , ( arg_4 // arg_3 ) + 1 ) : for arg_6 in range ( arg_3 ) : arg_7 = arg_5 * 50 + arg_6 if arg_7 == arg_4 : break arg_8 = threading . Thread ( target = worker , args = ( arg_0 . filtered_tags [ arg_7 ] , ) ) arg_2 . append ( arg_8 ) arg_8 . start ( ) if arg_0 . options . verbose > 2 : print ( "." , end = "" ) for arg_8 in arg_2 : arg_8 . join ( ) if arg_0 . options . verbose > 2 : print ( "." ) if arg_0 . options . verbose > 1 : print ( "Fetched dates for {} tags." . format ( len ( arg_0 . tag_times_dict ) ) )

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

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


Question: Returns a treemix plot on a toyplot . axes object .

def Func ( arg_0 , arg_1 ) : arg_2 = toytree . tree ( newick = arg_0 . results . tree ) arg_2 . Func ( arg_1 = arg_1 , use_edge_lengths = True , tree_style = 'c' , tip_labels_align = True , edge_align_style = { "stroke-width" : 1 } ) for arg_3 in arg_0 . results . admixture : arg_4 , arg_5 , arg_6 , arg_7 , arg_8 = arg_3 arg_9 = _get_admix_point ( arg_2 , arg_4 , arg_5 ) arg_10 = _get_admix_point ( arg_2 , arg_6 , arg_7 ) arg_11 = arg_1 . plot ( arg_9 = ( arg_9 [ 0 ] , arg_10 [ 0 ] ) , arg_10 = ( arg_9 [ 1 ] , arg_10 [ 1 ] ) , style = { "stroke-width" : 10 * arg_8 , "stroke-opacity" : 0.95 , "stroke-linecap" : "round" } ) arg_1 . scatterplot ( arg_9 = ( arg_10 [ 0 ] ) , arg_10 = ( arg_10 [ 1 ] ) , size = 8 , title = "weight: {}" . format ( arg_8 ) , ) arg_1 . y . show = False arg_1 . x . ticks . show = True arg_1 . x . label . text = "Drift parameter" return arg_1

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: Sets the classification of this CompanyDetailCompany . Classification of Company

def Func ( arg_0 , Func ) : arg_2 = [ "Public Limited Indian Non-Government Company" , "Private Limited Indian Non-Government Company" , "One Person Company" , "Private Limited Foreign Company Incorporated in India" , "Public Limited Foreign Company Incorporated in India" , "Union Government Company" , "State Government Company" , "Guarantee & Association Public" , "Guarantee & Association Private" , "Not For Profit Company" , "Unlimited Liabilities Public" , "Unlimited Liabilities Private" , "Undefined" ] if Func not in arg_2 : raise ValueError ( "Invalid value for `classification`, must be one of {0}" . format ( arg_2 ) ) arg_0 . _classification = Func

Set a property value or remove a property.

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

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

        This default implementation

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

        Removing a non-existing prop is NOT an error.

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

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


Question: Decorator to add route for a request with any HTTP method .

def Func ( arg_0 , arg_1 , arg_2 ) : def decorator ( arg_3 ) : arg_0 . _Funcr . add ( arg_1 , arg_2 , arg_3 ) return arg_3 return decorator

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


Question: This is the EPD function to fit .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : arg_6 = ( arg_0 [ 0 ] + arg_0 [ 1 ] * npsin ( 2 * MPI * arg_2 ) + arg_0 [ 2 ] * npcos ( 2 * MPI * arg_2 ) + arg_0 [ 3 ] * npsin ( 2 * MPI * arg_3 ) + arg_0 [ 4 ] * npcos ( 2 * MPI * arg_3 ) + arg_0 [ 5 ] * npsin ( 4 * MPI * arg_2 ) + arg_0 [ 6 ] * npcos ( 4 * MPI * arg_2 ) + arg_0 [ 7 ] * npsin ( 4 * MPI * arg_3 ) + arg_0 [ 8 ] * npcos ( 4 * MPI * arg_3 ) + arg_0 [ 9 ] * arg_4 + arg_0 [ 10 ] * arg_5 ) return arg_6

Parses data from Wikipedia page markup.

        The markup comes from Wikipedia's edit page.
        We parse it here into objects containing plain text.
        The light version parses only links to other articles, it's faster than a full parse.


Question: Callback for an option that adds to the actions list .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_4 . values . actions . append ( arg_1 . action_code )

Returns the maximum delay for the InferenceElements in the inference
    dictionary

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


Question: Helper function to record errors to the flawless backend

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None ) : arg_5 = [ ] arg_6 , arg_7 , arg_8 = arg_1 while arg_8 is not None : arg_5 . append ( arg_8 ) arg_8 = arg_8 . tb_next arg_9 = [ ] for arg_10 in arg_2 or [ ] : arg_9 . append ( api_ttypes . StackLine ( arg_13 = os . path . abspath ( arg_10 [ 0 ] ) , line_number = arg_10 [ 1 ] , function_name = arg_10 [ 2 ] , text = arg_10 [ 3 ] ) ) for arg_11 , arg_12 in enumerate ( arg_5 ) : arg_13 = arg_12 . tb_frame . f_code . co_filename arg_14 = arg_12 . tb_frame . f_code . co_name arg_15 = arg_12 . tb_lineno arg_16 = linecache . getline ( arg_13 , arg_15 , arg_12 . tb_frame . f_globals ) arg_17 = None if arg_11 >= ( len ( arg_5 ) - NUM_FRAMES_TO_SAVE ) : arg_17 = dict ( ( arg_18 , _myrepr ( arg_18 , arg_19 ) ) for arg_18 , arg_19 in list ( arg_12 . tb_frame . f_locals . items ( ) ) [ : MAX_LOCALS ] if arg_18 != "self" ) if "self" in arg_12 . tb_frame . f_locals and hasattr ( arg_12 . tb_frame . f_locals [ "self" ] , "__dict__" ) : arg_17 . update ( dict ( ( "self." + arg_18 , _myrepr ( arg_18 , arg_19 ) ) for arg_18 , arg_19 in list ( arg_12 . tb_frame . f_locals [ "self" ] . __dict__ . items ( ) ) [ : MAX_LOCALS ] if arg_18 != "self" ) ) arg_9 . append ( api_ttypes . StackLine ( arg_13 = os . path . abspath ( arg_13 ) , line_number = arg_15 , function_name = arg_14 , text = arg_16 , arg_17 = arg_17 ) ) arg_20 = CachedErrorInfo . get_hash_key ( arg_9 ) arg_21 = arg_22 . get ( arg_20 ) or CachedErrorInfo ( ) arg_21 . increment ( ) arg_22 [ arg_20 ] = arg_21 if arg_21 . should_report ( ) : arg_23 = arg_21 . mark_reported ( ) _send_request ( api_ttypes . RecordErrorRequest ( traceback = arg_9 , exception_message = repr ( arg_7 ) , exception_type = arg_6 . __module__ + "." + arg_6 . __name__ , arg_0 = arg_0 , arg_3 = arg_3 , arg_4 = arg_4 , arg_23 = arg_23 , ) )

Load the configuration.

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

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

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


Question: Extract the objects to be saved in the clinvar database collection . object_type param specifies if these objects are variant or casedata objects

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] if arg_2 == 'variant' : arg_3 = CLINVAR_HEADER else : arg_3 = CASEDATA_HEADER arg_4 = [ ] for arg_5 in arg_0 : arg_6 = { } if arg_2 == 'casedata' and 'casedata_' + arg_5 not in arg_1 : continue arg_6 [ 'csv_type' ] = arg_2 arg_6 [ 'case_id' ] = arg_1 . get ( 'case_id' ) arg_6 [ 'category' ] = arg_1 . get ( 'category@' + arg_5 ) for arg_7 , arg_8 in arg_3 . items ( ) : arg_9 = arg_1 . get ( arg_7 + '@' + arg_5 ) if arg_9 and not arg_9 == '-' : if arg_7 == 'ref_seq' : arg_10 = arg_9 . split ( '|' ) arg_6 [ 'ref_seq' ] = arg_10 [ 0 ] arg_6 [ 'hgvs' ] = arg_10 [ 1 ] else : arg_6 [ arg_7 ] = arg_9 if arg_2 == 'casedata' : arg_6 [ '_id' ] = str ( arg_6 [ 'case_id' ] ) + '_' + arg_5 + '_' + str ( arg_6 [ 'individual_id' ] ) else : arg_6 [ '_id' ] = str ( arg_6 [ 'case_id' ] ) + '_' + arg_5 arg_4 . append ( arg_6 ) return arg_4

Stop the timer

        Returns:
            The time the timer was stopped


Question: Call the disambiguation service in order to disambiguate a search query .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : arg_4 = { "shortText" : arg_1 , "entities" : [ ] , "onlyNER" : "false" , "customisation" : "generic" } if arg_2 : arg_4 [ 'language' ] = { "lang" : arg_2 } if arg_3 : arg_4 [ 'entities' ] = arg_3 arg_5 = { 'query' : str ( arg_4 ) } logger . debug ( 'About to submit the following query {}' . format ( arg_4 ) ) arg_6 , arg_7 = arg_0 . post ( arg_0 . disambiguate_service , arg_5 = arg_5 , headers = { 'Accept' : 'application/json' } , ) if arg_7 == 200 : return arg_0 . decode ( arg_6 ) , arg_7 else : logger . debug ( 'Disambiguation failed.' ) return None , arg_7


Question: Installs system packages listed as required by services this host uses .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = 0 , ** arg_4 ) : arg_5 = arg_0 . local_renderer arg_3 = int ( arg_3 ) arg_1 = ( arg_1 or '' ) . lower ( ) . strip ( ) assert not arg_1 or arg_1 in PACKAGE_TYPES , 'Unknown package type: %s' % ( arg_1 , ) arg_6 = [ ] if arg_1 : arg_7 = [ arg_1 ] else : arg_7 = PACKAGE_TYPES for arg_8 in arg_7 : if arg_8 == SYSTEM : arg_9 = '\n' . join ( arg_0 . list_required ( arg_1 = arg_8 , arg_2 = arg_2 ) ) if arg_3 : arg_6 . extend ( arg_10 for arg_10 in arg_9 . split ( '\n' ) if arg_10 . strip ( ) ) if arg_0 . verbose : print ( 'content:' , arg_9 ) break arg_11 , arg_12 = tempfile . mkstemp ( ) arg_13 = open ( arg_12 , 'w' ) arg_13 . write ( arg_9 ) arg_13 . close ( ) arg_0 . install_custom ( arg_12 = arg_12 ) else : raise NotImplementedError return arg_6

Get course's duration as a timedelta.

        Arguments:
            obj (CourseOverview): CourseOverview object

        Returns:
            (timedelta): Duration of a course.


Question: Checks for a C - style cast by looking for the pattern .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : arg_6 = arg_1 . elided [ arg_2 ] arg_7 = Search ( arg_4 , arg_6 ) if not arg_7 : return False arg_8 = arg_6 [ 0 : arg_7 . start ( 1 ) - 1 ] if Match ( r'.*\b(?:sizeof|alignof|alignas|[_A-Z][_A-Z0-9]*)\s*$' , arg_8 ) : return False if arg_2 > 0 : for arg_9 in xrange ( arg_2 - 1 , max ( 0 , arg_2 - 5 ) , - 1 ) : arg_8 = arg_1 . elided [ arg_9 ] + arg_8 if Match ( r'.*\b[_A-Z][_A-Z0-9]*\s*\((?:\([^()]*\)|[^()])*$' , arg_8 ) : return False if arg_8 . endswith ( ' operator++' ) or arg_8 . endswith ( ' operator--' ) : return False arg_10 = arg_6 [ arg_7 . end ( 0 ) : ] if Match ( r'^\s*(?:;|const\b|throw\b|final\b|override\b|[=>{),]|->)' , arg_10 ) : return False arg_5 ( arg_0 , arg_2 , 'readability/casting' , 4 , 'Using C-style cast.  Use %s<%s>(...) instead' % ( arg_3 , arg_7 . group ( 1 ) ) ) return True

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


Question: Copies the specified file into the working directory of this sandbox and renames it to new_filename .

def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_2 ) -> None : arg_4 = os . path . join ( arg_0 . name + ':' + SANDBOX_WORKING_DIR_NAME , arg_3 ) subprocess . check_call ( [ 'docker' , 'cp' , arg_1 , arg_4 ] ) arg_0 . _chown_files ( [ arg_3 ] )

Return list of GATT characteristics that have been discovered for this
        service.


Question: Encodes text using a code which is a permutation of the alphabet .

def Func ( arg_0 , arg_1 ) : from string import maketrans arg_2 = maketrans ( alphabet + alphabet . upper ( ) , arg_1 + arg_1 . upper ( ) ) return arg_0 . translate ( arg_2 )

Returns participation data for the given account_id and term_id.

        https://canvas.instructure.com/doc/api/analytics.html#method.analytics_api.department_participation


Question: Read a file from Azure Blob Storage and return as a string .

def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : return arg_0 . connection . get_blob_to_text ( arg_1 , arg_2 , ** arg_3 ) . content


Question: Frame - wise non - silent indicator for audio input .

def Func ( arg_0 , arg_1 = 2048 , arg_2 = 512 , arg_3 = 60 , arg_4 = arg_5 . max ) : arg_7 = core . to_mono ( arg_0 ) arg_8 = feature . rms ( arg_0 = arg_7 , arg_1 = arg_1 , arg_2 = arg_2 ) ** 2 return ( core . power_to_db ( arg_8 . squeeze ( ) , arg_4 = arg_4 , arg_3 = None ) > - arg_3 )


Question: Guess the appropriate data type from file extension .

def Func ( arg_0 ) : arg_0 = arg_0 . strip ( '.' ) arg_1 = [ ] for arg_2 in FILE_FORMATS : if arg_0 in FILE_FORMATS [ arg_2 ] : arg_1 . append ( arg_2 ) if arg_1 == [ ] or len ( arg_1 ) > 1 : return False return arg_1 [ 0 ]

Stop streaming samples from device and delete samples buffer


Question: For performance reasons a lasso selection is handled differently .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = "replace" , arg_6 = "default" , arg_7 = None ) : def create ( arg_8 ) : return selections . SelectionLasso ( arg_1 , arg_2 , arg_3 , arg_4 , arg_8 , arg_5 ) arg_0 . _selection ( create , arg_6 , arg_7 = arg_7 )


Question: Send stream tail via the transport .

def Func ( arg_0 ) : with arg_0 . lock : if not arg_0 . _socket or arg_0 . _hup : logger . debug ( u"Cannot send stream closing tag: already closed" ) return arg_1 = arg_0 . _serializer . emit_tail ( ) try : arg_0 . _write ( arg_1 . encode ( "utf-8" ) ) except ( IOError , SystemError , socket . error ) , err : logger . debug ( u"Sending stream closing tag failed: {0}" . format ( err ) ) arg_0 . _serializer = None arg_0 . _hup = True if arg_0 . _tls_state is None : try : arg_0 . _socket . shutdown ( socket . SHUT_WR ) except socket . error : pass arg_0 . _set_state ( "closing" ) arg_0 . _write_queue . clear ( ) arg_0 . _write_queue_cond . notify ( )


Question: A rule that accepts a token of kind kind and returns it or returns None .

def Func ( arg_0 , arg_1 = None ) : @ llrule ( arg_1 , lambda arg_2 : [ arg_0 ] ) def rule ( arg_2 ) : return arg_2 . _accept ( arg_0 ) return rule

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: Select best remaining CNOT in the hardware for the next program edge .

def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in arg_0 . gate_list : arg_3 = arg_2 [ 0 ] in arg_0 . available_hw_qubits arg_4 = arg_2 [ 1 ] in arg_0 . available_hw_qubits if arg_3 and arg_4 : arg_1 . append ( arg_2 ) arg_5 = 0 arg_6 = None for arg_7 in arg_1 : if arg_0 . gate_cost [ arg_7 ] > arg_5 : arg_5 = arg_0 . gate_cost [ arg_7 ] arg_6 = arg_7 return arg_6

Gets a list of snapshots for a cluster

        :param cluster_identifier: unique identifier of a cluster
        :type cluster_identifier: str


Question: Check if current line contains an out - of - line method definition .

def Func ( arg_0 , arg_1 ) : for arg_2 in xrange ( arg_1 , max ( - 1 , arg_1 - 10 ) , - 1 ) : if Match ( r'^([^()]*\w+)\(' , arg_0 . elided [ arg_2 ] ) : return Match ( r'^[^()]*\w+::\w+\(' , arg_0 . elided [ arg_2 ] ) is not None return False

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: Add a thing to the environment setting its location . For convenience if thing is an agent program we make a new agent for it . ( Shouldn t need to override this .

def Func ( arg_0 , arg_1 , arg_2 = None ) : if not isinstance ( arg_1 , Thing ) : arg_1 = Agent ( arg_1 ) assert arg_1 not in arg_0 . things , "Don't add the same thing twice" arg_1 . location = arg_2 or arg_0 . default_location ( arg_1 ) arg_0 . things . append ( arg_1 ) if isinstance ( arg_1 , Agent ) : arg_1 . performance = 0 arg_0 . agents . append ( arg_1 )

Respond when the server indicates that the client is out of sync.

        The server can request a sync when this client sends a message that
        fails the check() on the server.  If the reason for the failure isn't
        very serious, then the server can decide to send it as usual in the
        interest of a smooth gameplay experience.  When this happens, the
        server sends out an extra response providing the clients with the
        information they need to resync themselves.


Question: Returns ancestor of level deep recursively

def Func ( arg_0 , arg_1 , arg_2 = 1 ) : if arg_1 . parent is None : return arg_1 if arg_2 <= 1 : return arg_1 . parent return arg_0 . Func ( arg_1 . parent , arg_2 = arg_2 - 1 )

Returns all of the items from queryset where the user has a
        product invoking that item's condition in one of their carts.


Question: Try to load schedule from the Matterhorn core . Returns a valid schedule or None on failure .

def Func ( ) : arg_0 = { 'agentid' : config ( ) [ 'agent' ] [ 'name' ] . encode ( 'utf8' ) } arg_1 = config ( ) [ 'agent' ] [ 'cal_lookahead' ] * 24 * 60 * 60 if arg_1 : arg_0 [ 'cutoff' ] = str ( ( timestamp ( ) + arg_1 ) * 1000 ) arg_2 = '%s/calendars?%s' % ( config ( ) [ 'service-scheduler' ] [ 0 ] , urlencode ( arg_0 ) ) try : arg_3 = http_request ( arg_2 ) except pycurl . error as arg_7 : logger . error ( 'Could not get schedule: %s' % arg_7 ) return try : arg_4 = parse_ical ( arg_3 . decode ( 'utf-8' ) ) except Exception : logger . error ( 'Could not parse ical' ) logger . error ( traceback . format_exc ( ) ) return arg_5 = get_session ( ) arg_5 . query ( UpcomingEvent ) . delete ( ) for arg_6 in arg_4 : if arg_6 [ 'dtend' ] <= timestamp ( ) : continue arg_7 = UpcomingEvent ( ) arg_7 . start = arg_6 [ 'dtstart' ] arg_7 . end = arg_6 [ 'dtend' ] arg_7 . uid = arg_6 . get ( 'uid' ) arg_7 . title = arg_6 . get ( 'summary' ) arg_7 . set_data ( arg_6 ) arg_5 . add ( arg_7 ) arg_5 . commit ( )

Return a new individual crossing self and other.


Question: Sends a batch of messages into the specified queue . The limit to the number of messages which may be present in the topic is governed by the message size the MaxTopicSizeInMegaBytes . If this message will cause the queue to exceed its quota a quota exceeded error is returned and the message will be rejected .

def Func ( arg_0 , arg_1 , arg_2 = None ) : _validate_not_none ( 'queue_name' , arg_1 ) _validate_not_none ( 'messages' , arg_2 ) arg_3 = HTTPRequest ( ) arg_3 . method = 'POST' arg_3 . host = arg_0 . _get_host ( ) arg_3 . path = '/' + _str ( arg_1 ) + '/messages' arg_3 . headers . append ( ( 'Content-Type' , 'application/vnd.microsoft.servicebus.json' ) ) arg_3 . body = _get_request_body ( json . dumps ( [ m . as_batch_body ( ) for m in arg_2 ] ) ) arg_3 . path , arg_3 . query = arg_0 . _httpclient . _update_request_uri_query ( arg_3 ) arg_3 . headers = arg_0 . _update_service_bus_header ( arg_3 ) arg_0 . _perform_request ( arg_3 )

Execute the enrich phase for a given backend section

    :param config: a Mordred config object
    :param backend_section: the backend section where the enrich phase is executed


Question: Pretty - print a jobject .

def Func ( arg_0 , ** arg_1 ) : arg_2 = { k : v for k , v in six . iteritems ( arg_0 . __json__ ) if v } arg_3 = json . dumps ( arg_2 , ** arg_1 ) arg_3 = re . sub ( r'[{}"]' , '' , arg_3 ) arg_3 = re . sub ( r',\n' , '\n' , arg_3 ) arg_3 = re . sub ( r'^\s*$' , '' , arg_3 ) return arg_3

Remove cards from watchlist.

        :params trade_id: Trade id.


Question: Configure from cli and run the server

def Func ( arg_0 , arg_1 = arg_2 , arg_3 = '' ) : arg_4 = 0 if isinstance ( arg_1 , str ) : arg_5 = docopt ( arg_1 , version = arg_3 ) elif isinstance ( arg_1 , dict ) : arg_5 = arg_1 else : raise ValueError ( 'unknown configuration object ({})' . format ( type ( arg_1 ) ) ) arg_6 = arg_5 . get ( '--log' , 'debug' ) arg_7 = arg_5 . get ( '--debug' , False ) arg_8 = 'stdout' if arg_7 else 'apy.log' arg_9 = arg_5 . get ( '--bind' , '127.0.0.1' ) arg_10 = int ( arg_5 . get ( '--port' , 5000 ) ) arg_11 = dna . logging . setup ( level = arg_6 , output = arg_8 ) with arg_11 . applicationbound ( ) : try : log . info ( 'Funcr ready' , version = arg_3 , log = arg_6 , debug = arg_7 , bind = '{}:{}' . format ( arg_9 , arg_10 ) ) arg_0 . app . run ( host = arg_9 , port = arg_10 , debug = arg_7 ) except Exception as error : if arg_7 : raise log . error ( '{}: {}' . format ( type ( error ) . __name__ , str ( error ) ) ) arg_4 = 1 finally : log . info ( 'session ended with status {}' . format ( arg_4 ) ) return arg_4

Overriding the default JSONEncoder.default for NDB support.


Question: Samples n rows .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = True ) : arg_7 = list ( arg_0 ) if arg_5 is not None : arg_8 = arg_7 [ 0 ] [ arg_5 ] arg_9 = arg_7 [ 1 ] [ arg_5 ] - arg_8 if arg_3 is None : arg_3 = 0 if arg_4 is None : arg_4 = len ( arg_7 ) - 1 arg_10 = arg_4 - arg_3 + 1 arg_11 = arg_10 - arg_2 for arg_12 in xrange ( arg_11 ) : arg_13 = random . randint ( arg_3 , arg_4 - arg_12 ) del arg_7 [ arg_13 ] if arg_6 : arg_7 = arg_7 [ arg_3 : arg_3 + arg_2 ] if arg_5 is not None : arg_8 = arg_7 [ 0 ] [ arg_5 ] for arg_14 in arg_7 : if arg_5 is not None : arg_14 [ arg_5 ] = arg_8 arg_8 += arg_9 arg_1 . appendRecord ( arg_14 )

Show Program Landing page for the Enterprise's Program.

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

        Unauthenticated learners will be redirected to enterprise-linked SSO.

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


Question: delete request use with caution

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = True , arg_4 = True ) : bot . debug ( 'DELETE %s' % arg_1 ) return arg_0 . _call ( arg_1 , arg_2 = arg_2 , func = requests . Func , arg_3 = arg_3 , arg_4 = arg_4 )

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


Question: Checks to see if the specified hosted service name is available or if it has already been taken .

def Func ( arg_0 , arg_1 ) : _validate_not_none ( 'service_name' , arg_1 ) return arg_0 . _perform_get ( '/' + arg_0 . subscription_id + '/services/hostedservices/operations/isavailable/' + _str ( arg_1 ) + '' , AvailabilityResponse )

Returns a list of the dicom files within root_path

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

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


Question: Render data with template and then write to path

def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : arg_4 = arg_0 . render ( arg_2 , ** arg_3 ) with open ( arg_1 , 'w' ) as f : f . write ( arg_4 . encode ( charset ) )

Plots your graph summary statistics on the given axes.

    After, you should run :func:`plt.tight_layout` and you must run :func:`plt.show` to view.

    Shows:
    1. Count of nodes, grouped by function type
    2. Count of edges, grouped by relation type

    :param pybel.BELGraph graph: A BEL graph
    :param lax: An axis object from matplotlib
    :param rax: An axis object from matplotlib

    Example usage:

    >>> import matplotlib.pyplot as plt
    >>> from pybel import from_pickle
    >>> from pybel_tools.summary import plot_summary_axes
    >>> graph = from_pickle('~/dev/bms/aetionomy/parkinsons.gpickle')
    >>> fig, axes = plt.subplots(1, 2, figsize=(10, 4))
    >>> plot_summary_axes(graph, axes[0], axes[1])
    >>> plt.tight_layout()
    >>> plt.show()


Question: Generate declaration statements for arrays .

def Func ( arg_0 , arg_1 = True ) : arg_2 = deepcopy ( arg_0 . get_array_declarations ( ) ) arg_3 = [ ] for arg_4 in arg_2 : arg_3 . append ( transform_multidim_to_1d_decl ( arg_4 ) ) transform_array_decl_to_malloc ( arg_4 , arg_1 = arg_1 ) return arg_2 , dict ( arg_3 )

Add feedback on a specific campaign.

        :param campaign_id: The unique id for the campaign.
        :type campaign_id: :py:class:`str`
        :param data: The request body parameters
        :type data: :py:class:`dict`
        data = {
            "message": string*
        }
        :param queryparams: The query string parameters
        queryparams['fields'] = []
        queryparams['exclude_fields'] = []


Question: Parse a . obo formated hpo line

def Func ( arg_0 ) : arg_1 = { } for arg_2 in arg_0 : if len ( arg_2 ) == 0 : continue arg_2 = arg_2 . rstrip ( ) if arg_2 == '[Term]' : if arg_1 : yield arg_1 arg_1 = { } elif arg_2 . startswith ( 'id' ) : arg_1 [ 'hpo_id' ] = arg_2 [ 4 : ] elif arg_2 . startswith ( 'name' ) : arg_1 [ 'description' ] = arg_2 [ 6 : ] elif arg_2 . startswith ( 'alt_id' ) : if 'aliases' not in arg_1 : arg_1 [ 'aliases' ] = [ ] arg_1 [ 'aliases' ] . append ( arg_2 [ 8 : ] ) elif arg_2 . startswith ( 'is_a' ) : if 'ancestors' not in arg_1 : arg_1 [ 'ancestors' ] = [ ] arg_1 [ 'ancestors' ] . append ( arg_2 [ 6 : 16 ] ) if arg_1 : yield arg_1


Question: Square of the euclidean distance

def Func ( arg_0 , arg_1 ) : arg_2 = ( ( i - j ) for i , j in zip ( arg_0 , arg_1 ) ) return sum ( arg_3 * arg_3 for arg_3 in arg_2 )

Delete the Provisioning Service Certificate.

        Deletes the specified certificate assosciated with the Provisioning
        Service.

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


Question: Retrieves the set of firewall rules for an Azure SQL Database Server .

def Func ( arg_0 , arg_1 ) : _validate_not_none ( 'server_name' , arg_1 ) arg_2 = arg_0 . _perform_get ( arg_0 . _get_firewall_rules_path ( arg_1 ) , None ) return _MinidomXmlToObject . parse_service_resources_response ( arg_2 , FirewallRule )

Sort list of string with number in human order.

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

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


Question: Shuffle the relations .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 [ arg_4 ] = None ) -> arg_1 : arg_2 = arg_2 or 0.3 assert 0 < arg_2 <= 1 arg_5 = arg_0 . number_of_edges ( ) arg_6 = int ( arg_2 * arg_5 * ( arg_5 - 1 ) / 2 ) arg_7 : arg_1 = arg_0 . copy ( ) arg_8 = arg_7 . edges ( keys = True ) for arg_9 in range ( arg_6 ) : ( arg_10 , arg_11 , arg_12 ) , ( arg_13 , arg_14 , arg_15 ) = random . sample ( arg_8 , 2 ) arg_7 [ arg_10 ] [ arg_11 ] [ arg_12 ] , arg_7 [ arg_13 ] [ arg_14 ] [ arg_15 ] = arg_7 [ arg_13 ] [ arg_14 ] [ arg_15 ] , arg_7 [ arg_10 ] [ arg_11 ] [ arg_12 ] return arg_7


Question: Cache for heavy function calls .

def Func ( arg_0 ) : arg_1 = { } @ wraps ( arg_0 ) def wrap ( * arg_2 , ** arg_3 ) : arg_4 = '{0}{1}' . format ( arg_2 , arg_3 ) if arg_4 not in arg_1 : arg_1 [ arg_4 ] = arg_0 ( * arg_2 , ** arg_3 ) return arg_1 [ arg_4 ] return wrap

Retrieve the list of courses contained within this catalog.

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


Question: Show device heap size

def Func ( arg_0 ) : log . info ( 'Heap' ) arg_1 = arg_0 . __exchange ( 'print(node.heap())' ) log . info ( arg_1 ) return int ( arg_1 . split ( '\r\n' ) [ 1 ] )

Return single program by name, or None if not found.

        Arguments:
            program_title(string): Program title as seen by students and in Course Catalog Admin

        Returns:
            dict: Program data provided by Course Catalog API


Question: Read header version from data

def Func ( arg_0 , arg_1 ) : arg_2 = ord ( arg_1 [ 0 ] ) if arg_2 not in arg_0 . VERSIONS : raise Exception ( 'Version not defined: %d' % arg_2 ) return arg_2

Return a normalized form of the pattern.

        Normalize the pattern by removing pattern type prefix if it
        exists in the pattern. Then return the pattern type and the
        pattern as a tuple of two strings.

        Arguments:
          pattern (str): Route pattern to match request paths

        Returns:
          tuple: Ruple of pattern type (str) and pattern (str)


Question: Generates CSRF token .

def Func ( arg_0 ) : arg_1 = hashlib . md5 ( uuid . uuid4 ( ) . bytes + six . b ( arg_0 ) ) . hexdigest ( ) arg_2 = 5 arg_3 = random . randint ( 0 , arg_2 ) return arg_1 [ arg_3 : arg_3 - arg_2 - 1 ]

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


Question: Produce ids for Protocol packets outliving their sessions

def Func ( arg_0 ) : arg_0 . id = ( arg_0 . id + 1 ) % 65536 arg_0 . id = arg_0 . id or 1 return arg_0 . id

Appends transactions that close out all positions at the end of
    the timespan covered by positions data. Utilizes pricing information
    in the positions DataFrame to determine closing price.

    Parameters
    ----------
    positions : pd.DataFrame
        The positions that the strategy takes over time.
    transactions : pd.DataFrame
        Prices and amounts of executed round_trips. One row per trade.
        - See full explanation in tears.create_full_tear_sheet

    Returns
    -------
    closed_txns : pd.DataFrame
        Transactions with closing transactions appended.


Question: Project polygons from one image to a new one .

def Func ( arg_0 , arg_1 ) : arg_2 = normalize_shape ( arg_1 ) if arg_2 [ 0 : 2 ] == arg_0 . shape [ 0 : 2 ] : return arg_0 . deepcopy ( ) arg_3 = [ poly . project ( arg_0 . shape , arg_2 ) for poly in arg_0 . polygFuncs ] return PolygFuncsOnImage ( arg_3 , arg_2 )

Return the metadata for the specified course run.

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


Question: Set the subject of this certificate .

def Func ( arg_0 , arg_1 ) : arg_0 . _set_name ( _lib . X509_Func_name , arg_1 ) arg_0 . _subject_invalidator . clear ( )

Deletes the video

        Authentication is required

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

        Return:
            True if successful

        Raise:
            OperationError: on unsuccessful deletion


Question: Decode attributes of the stanza XML element and put them into the stanza properties .

def Func ( arg_0 ) : try : arg_1 = arg_0 . _element . get ( 'from' ) if arg_1 : arg_0 . _from_jid = JID ( arg_1 ) arg_3 = arg_0 . _element . get ( 'to' ) if arg_3 : arg_0 . _to_jid = JID ( arg_3 ) except ValueError : raise JIDMalformedProtocolError arg_0 . _stanza_type = arg_0 . _element . get ( 'type' ) arg_0 . _stanza_id = arg_0 . _element . get ( 'id' ) arg_7 = arg_0 . _element . get ( XML_LANG_QNAME ) if arg_7 : arg_0 . _language = arg_7

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: Patch isBase64 to prevent Base64 encoding of JSON content

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 . get ( "mode" , "" ) == "base64" : return 0 if arg_0 . contentparams [ "type" ] . startswith ( "text/" ) : return 0 if arg_0 . contentparams [ "type" ] . endswith ( "+xml" ) : return 0 if arg_0 . contentparams [ "type" ] . endswith ( "/xml" ) : return 0 if arg_0 . contentparams [ "type" ] . endswith ( "/json" ) : return 0 return 0

Find the necessary file for the given test case.

    Args:
        device(napalm device connection): for which device
        filename(str): file to find
        path(str): where to find it relative to where the module is installed


Question: Update panel to a new version .

def Func ( arg_0 ) : arg_1 = store . panel ( arg_0 ) arg_2 = request . form . get ( 'version' , None ) arg_3 = store . apply_pending ( arg_1 , arg_2 ) return redirect ( url_for ( 'panels.panel' , arg_0 = arg_3 ) )

For a 2D array and mask, map the values of all unmasked pixels to a 1D array.

    The pixel coordinate origin is at the top left corner of the 2D array and goes right-wards and downwards, such
    that for an array of shape (3,3) where all pixels are unmasked:

    - pixel [0,0] of the 2D array will correspond to index 0 of the 1D array.
    - pixel [0,1] of the 2D array will correspond to index 1 of the 1D array.
    - pixel [1,0] of the 2D array will correspond to index 4 of the 1D array.

    Parameters
     ----------
    mask : ndarray
        A 2D array of bools, where *False* values mean unmasked and are included in the mapping.
    array_2d : ndarray
        The 2D array of values which are mapped to a 1D array.

    Returns
    --------
    ndarray
        A 1D array of values mapped from the 2D array with dimensions (total_unmasked_pixels).

    Examples
    --------
    mask = np.array([[True, False, True],
                     [False, False, False]
                     [True, False, True]])

    array_2d = np.array([[1.0, 2.0, 3.0],
                          [4.0, 5.0, 6.0],
                          [7.0, 8.0, 9.0]])

    array_1d = map_2d_array_to_masked_1d_array_from_array_2d_and_mask(mask=mask, array_2d=array_2d)


Question: Write header into po file for specific lang . Metadata are read from settings file .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = open ( arg_0 , 'w' ) arg_3 . write ( arg_2 + '\n' ) arg_3 . write ( 'msgid ""' + '\nmsgstr ""' + '\n"MIME-Version: ' + settings . METADATA [ 'MIME-Version' ] + r'\n"' '\n"Content-Type: ' + settings . METADATA [ 'Content-Type' ] + r'\n"' '\n"Content-Transfer-Encoding: ' + settings . METADATA [ 'Content-Transfer-Encoding' ] + r'\n"' '\n"Language: ' + arg_1 + r'\n"' + '\n' ) arg_3 . close ( )

Expand the rank of x up to static_event_rank times for broadcasting.

    The static event rank was checked to not be None at construction time.

    Args:
      x: A tensor to expand.
    Returns:
      The expanded tensor.


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

def Func ( arg_0 , arg_1 ) : if not arg_0 . emu : arg_0 . emu = ConcreteUnicornEmulator ( arg_0 ) arg_0 . emu . _stop_at = arg_0 . _break_unicorn_at try : arg_0 . emu . emulate ( arg_1 ) except unicorn . UcError as e : if e . errno == unicorn . UC_ERR_INSN_INVALID : arg_4 = ' ' . join ( '%02x' % x for x in arg_1 . bytes ) logger . error ( "Unimplemented instruction: 0x%016x:\t%s\t%s\t%s" , arg_1 . address , arg_4 , arg_1 . mnemonic , arg_1 . op_str ) raise InstructionEmulationError ( str ( e ) )

Setup this colorful object by setting a ``colormode`` and
        the ``colorpalette`. The ``extend_colors`` flag is used
        to extend the currently active color palette instead of
        replacing it.

        :param int colormode: the color mode to use. See ``translate_rgb_to_ansi_code``
        :parma dict colorpalette: the colorpalette to use. This ``dict`` should map
                                  color names to it's corresponding RGB value
        :param bool extend_colors: extend the active color palette instead of replacing it


Question: Return the multiprocessing . Pool instance or create it if not done yet .

def Func ( arg_0 ) : if arg_0 . _Func is None : arg_1 = arg_0 . processes if arg_1 is not None and arg_1 < 0 : try : arg_1 = multiprocessing . cpu_count ( ) - abs ( arg_1 ) arg_1 = max ( arg_1 , 1 ) except ( ImportError , NotImplementedError ) : arg_1 = None arg_0 . _Func = multiprocessing . Pool ( arg_1 , initializer = _Pool_initialize_worker , initargs = ( arg_0 . augseq , arg_0 . seed ) , maxtasksperchild = arg_0 . maxtasksperchild ) return arg_0 . _Func

Main executor of the trimmomatic_report template.

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


Question: Makes the HTTP request using RESTClient .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = None ) : if arg_1 == "GET" : return arg_0 . rest_client . GET ( arg_2 , arg_3 = arg_3 , arg_4 = arg_4 ) elif arg_1 == "HEAD" : return arg_0 . rest_client . HEAD ( arg_2 , arg_3 = arg_3 , arg_4 = arg_4 ) elif arg_1 == "OPTIONS" : return arg_0 . rest_client . OPTIONS ( arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 ) elif arg_1 == "POST" : return arg_0 . rest_client . POST ( arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 ) elif arg_1 == "PUT" : return arg_0 . rest_client . PUT ( arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 ) elif arg_1 == "PATCH" : return arg_0 . rest_client . PATCH ( arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 ) elif arg_1 == "DELETE" : return arg_0 . rest_client . DELETE ( arg_2 , arg_3 = arg_3 , arg_4 = arg_4 ) else : raise ValueError ( "http method must be `GET`, `HEAD`," " `POST`, `PATCH`, `PUT` or `DELETE`." )

Factory for loading the ccd data from .fits files, as well as computing properties like the noise-map,
    exposure-time map, etc. from the ccd-data.

    This factory also includes a number of routines for converting the ccd-data from units not supported by PyAutoLens \
    (e.g. adus, electrons) to electrons per second.

    Parameters
    ----------
    lens_name
    image_path : str
        The path to the image .fits file containing the image (e.g. '/path/to/image.fits')
    pixel_scale : float
        The size of each pixel in arc seconds.
    image_hdu : int
        The hdu the image is contained in the .fits file specified by *image_path*.
    image_hdu : int
        The hdu the image is contained in the .fits file that *image_path* points too.
    resized_ccd_shape : (int, int) | None
        If input, the ccd arrays that are image sized, e.g. the image, noise-maps) are resized to these dimensions.
    resized_ccd_origin_pixels : (int, int) | None
        If the ccd arrays are resized, this defines a new origin (in pixels) around which recentering occurs.
    resized_ccd_origin_arcsec : (float, float) | None
        If the ccd arrays are resized, this defines a new origin (in arc-seconds) around which recentering occurs.
    psf_path : str
        The path to the psf .fits file containing the psf (e.g. '/path/to/psf.fits')
    psf_hdu : int
        The hdu the psf is contained in the .fits file specified by *psf_path*.
    resized_psf_shape : (int, int) | None
        If input, the psf is resized to these dimensions.
    renormalize_psf : bool
        If True, the PSF is renoralized such that all elements sum to 1.0.
    noise_map_path : str
        The path to the noise_map .fits file containing the noise_map (e.g. '/path/to/noise_map.fits')
    noise_map_hdu : int
        The hdu the noise_map is contained in the .fits file specified by *noise_map_path*.
    noise_map_from_image_and_background_noise_map : bool
        If True, the noise-map is computed from the observed image and background noise-map \
        (see NoiseMap.from_image_and_background_noise_map).
    convert_noise_map_from_weight_map : bool
        If True, the noise-map loaded from the .fits file is converted from a weight-map to a noise-map (see \
        *NoiseMap.from_weight_map).
    convert_noise_map_from_inverse_noise_map : bool
        If True, the noise-map loaded from the .fits file is converted from an inverse noise-map to a noise-map (see \
        *NoiseMap.from_inverse_noise_map).
    background_noise_map_path : str
        The path to the background_noise_map .fits file containing the background noise-map \
        (e.g. '/path/to/background_noise_map.fits')
    background_noise_map_hdu : int
        The hdu the background_noise_map is contained in the .fits file specified by *background_noise_map_path*.
    convert_background_noise_map_from_weight_map : bool
        If True, the bacground noise-map loaded from the .fits file is converted from a weight-map to a noise-map (see \
        *NoiseMap.from_weight_map).
    convert_background_noise_map_from_inverse_noise_map : bool
        If True, the background noise-map loaded from the .fits file is converted from an inverse noise-map to a \
        noise-map (see *NoiseMap.from_inverse_noise_map).
    poisson_noise_map_path : str
        The path to the poisson_noise_map .fits file containing the Poisson noise-map \
         (e.g. '/path/to/poisson_noise_map.fits')
    poisson_noise_map_hdu : int
        The hdu the poisson_noise_map is contained in the .fits file specified by *poisson_noise_map_path*.
    poisson_noise_map_from_image : bool
        If True, the Poisson noise-map is estimated using the image.
    convert_poisson_noise_map_from_weight_map : bool
        If True, the Poisson noise-map loaded from the .fits file is converted from a weight-map to a noise-map (see \
        *NoiseMap.from_weight_map).
    convert_poisson_noise_map_from_inverse_noise_map : bool
        If True, the Poisson noise-map loaded from the .fits file is converted from an inverse noise-map to a \
        noise-map (see *NoiseMap.from_inverse_noise_map).
    exposure_time_map_path : str
        The path to the exposure_time_map .fits file containing the exposure time map \
        (e.g. '/path/to/exposure_time_map.fits')
    exposure_time_map_hdu : int
        The hdu the exposure_time_map is contained in the .fits file specified by *exposure_time_map_path*.
    exposure_time_map_from_single_value : float
        The exposure time of the ccd imaging, which is used to compute the exposure-time map as a single value \
        (see *ExposureTimeMap.from_single_value*).
    exposure_time_map_from_inverse_noise_map : bool
        If True, the exposure-time map is computed from the background noise_map map \
        (see *ExposureTimeMap.from_background_noise_map*)
    background_sky_map_path : str
        The path to the background_sky_map .fits file containing the background sky map \
        (e.g. '/path/to/background_sky_map.fits').
    background_sky_map_hdu : int
        The hdu the background_sky_map is contained in the .fits file specified by *background_sky_map_path*.
    convert_from_electrons : bool
        If True, the input unblurred_image_1d are in units of electrons and all converted to electrons / second using the exposure \
        time map.
    gain : float
        The image gain, used for convert from ADUs.
    convert_from_adus : bool
        If True, the input unblurred_image_1d are in units of adus and all converted to electrons / second using the exposure \
        time map and gain.


Question: Stable wrapper around inspect . getdoc .

def Func ( arg_0 ) : try : arg_1 = arg_0 . Func ( ) except Exception : pass else : if isinstance ( arg_1 , basestring ) : return inspect . cleandoc ( arg_1 ) try : return inspect . Func ( arg_0 ) except Exception : return None

Called when characteristic value was read or updated.


Question: Converts a %Y%m%dT%H%M%S . %fZ to a UNIX timestamp or a datetime . datetime object

def Func ( arg_0 , arg_1 : arg_2 , arg_3 = True ) : arg_4 = datetime . strptime ( arg_1 , '%Y%m%dT%H%M%S.%fZ' ) if arg_3 : return int ( arg_4 . timestamp ( ) ) else : return arg_4

Guesses an appropriate MODS XML genre type.


Question: Return a squad .

def Func ( arg_0 , arg_1 = 0 , arg_2 = None ) : arg_3 = 'GET' arg_4 = 'Func/%s/user/%s' % ( arg_1 , arg_2 or arg_0 . persona_id ) arg_5 = [ arg_0 . pin . event ( 'page_view' , 'Hub - Squads' ) ] arg_0 . pin . send ( arg_5 ) arg_6 = arg_0 . __request__ ( arg_3 , arg_4 ) arg_5 = [ arg_0 . pin . event ( 'page_view' , 'Squad Details' ) , arg_0 . pin . event ( 'page_view' , 'Squads - Squad Overview' ) ] arg_0 . pin . send ( arg_5 ) return [ itemParse ( arg_7 ) for arg_7 in arg_6 . get ( 'players' , ( ) ) ]

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


Question: Gets the configuration stored in environment variables

def Func ( arg_0 ) : if 'TSP_EMAIL' in os . environ : arg_0 . _email = os . environ [ 'TSP_EMAIL' ] if 'TSP_API_TOKEN' in os . environ : arg_0 . _api_token = os . environ [ 'TSP_API_TOKEN' ] if 'TSP_API_HOST' in os . environ : arg_0 . _api_host = os . environ [ 'TSP_API_HOST' ] else : arg_0 . _api_host = 'api.truesight.bmc.com'

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.