Question: Return tuple of output dimension for specified subsystems .

def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : return arg_0 . _Func return tuple ( arg_0 . _Func [ arg_2 ] for arg_2 in arg_1 )

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


Question: Augmenter that runs an assert on each batch of input images using a lambda function as condition .

def Func ( arg_0 = None , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = False , arg_6 = None ) : def func_images_assert ( arg_7 , arg_6 , arg_8 , arg_9 ) : ia . do_assert ( arg_0 ( arg_7 , arg_6 , arg_8 , arg_9 ) , "Input images did not fulfill user-defined assertion in Func." ) return arg_7 def func_heatmaps_assert ( arg_10 , arg_6 , arg_8 , arg_9 ) : ia . do_assert ( arg_1 ( arg_10 , arg_6 , arg_8 , arg_9 ) , "Input heatmaps did not fulfill user-defined assertion in Func." ) return arg_10 def func_keypoints_assert ( arg_11 , arg_6 , arg_8 , arg_9 ) : ia . do_assert ( arg_2 ( arg_11 , arg_6 , arg_8 , arg_9 ) , "Input keypoints did not fulfill user-defined assertion in Func." ) return arg_11 def func_polygons_assert ( arg_12 , arg_6 , arg_8 , arg_9 ) : ia . do_assert ( arg_3 ( arg_12 , arg_6 , arg_8 , arg_9 ) , "Input polygons did not fulfill user-defined assertion in Func." ) return arg_12 if arg_4 is None : arg_4 = "Unnamed%s" % ( ia . caller_name ( ) , ) return Lambda ( func_images_assert if arg_0 is not None else None , func_heatmaps_assert if arg_1 is not None else None , func_keypoints_assert if arg_2 is not None else None , func_polygons_assert if arg_3 is not None else None , arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 )

Translates round trip symbols to sectors.

    Parameters
    ----------
    round_trips : pd.DataFrame
        DataFrame with one row per round trip trade.
        - See full explanation in round_trips.extract_round_trips
    sector_mappings : dict or pd.Series, optional
        Security identifier to sector mapping.
        Security ids as keys, sectors as values.

    Returns
    -------
    sector_round_trips : pd.DataFrame
        Round trips with symbol names replaced by sector names.


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

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_request_date ( arg_1 ) arg_3 = arg_2 . strftime ( '%Y%m%d' ) arg_0 . regenerate_signing_key ( date = arg_3 )

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

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


Question: Creates a session for a node .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None , arg_5 = None , arg_6 = None , arg_7 = None , arg_8 = None , arg_9 = None , arg_10 = False , arg_11 = True , ** arg_12 ) : arg_13 = arg_0 . _Func_initial ( arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 , arg_7 = arg_7 , arg_8 = arg_8 , arg_9 = arg_9 , arg_10 = True , ** arg_12 ) def get_long_running_output ( arg_14 ) : arg_15 = arg_0 . _deserialize ( 'SessionResource' , arg_14 ) if arg_10 : arg_16 = ClientRawResponse ( arg_15 , arg_14 ) return arg_16 return arg_15 arg_17 = arg_12 . get ( 'long_running_operation_timeout' , arg_0 . config . long_running_operation_timeout ) if arg_11 is True : arg_18 = ARMPolling ( arg_17 , ** arg_12 ) elif arg_11 is False : arg_18 = NoPolling ( ) else : arg_18 = arg_11 return LROPoller ( arg_0 . _client , arg_13 , get_long_running_output , arg_18 )

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


Question: Generate nearby points to this keypoint based on manhattan distance .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : arg_4 = np . zeros ( ( arg_1 + 1 + arg_1 + 2 * ( arg_1 ** 2 ) , 2 ) , dtype = np . float32 ) arg_5 = np . linspace ( arg_0 . y - arg_1 * arg_2 , arg_0 . y + arg_1 * arg_2 , arg_1 + 1 + arg_1 ) arg_6 = 1 arg_7 = 0 for arg_8 , arg_9 in enumerate ( arg_5 ) : if arg_6 == 1 : arg_10 = [ arg_0 . x ] else : arg_10 = np . linspace ( arg_0 . x - ( arg_6 - 1 ) // 2 * arg_2 , arg_0 . x + ( arg_6 - 1 ) // 2 * arg_2 , arg_6 ) for arg_11 in arg_10 : arg_4 [ arg_7 ] = [ arg_11 , arg_9 ] arg_7 += 1 if arg_8 < arg_1 : arg_6 += 2 else : arg_6 -= 2 if arg_3 : return arg_4 return [ arg_0 . deepcopy ( arg_11 = arg_4 [ arg_12 , 0 ] , arg_9 = arg_4 [ arg_12 , 1 ] ) for arg_12 in sm . xrange ( arg_4 . shape [ 0 ] ) ]


Question: Check if the node is in a TryExcept which handles the given exception .

def Func ( arg_0 : arg_1 . node_classes . NodeNG , arg_4 = arg_5 ) -> bool : arg_6 = get_exception_handlers ( arg_0 , arg_4 ) if not arg_6 : return False return any ( arg_6 )

compat_convertHashedIndexes - Reindex all fields for the provided objects, where the field value is hashed or not.
			If the field is unhashable, do not allow.

			NOTE: This works one object at a time. It is intended to be used while your application is offline,
			  as it doesn't make sense to be changing your model while applications are actively using it.

			@param objs <IndexedRedisModel objects to convert>
			@param conn <redis.Redis or None> - Specific Redis connection or None to reuse.


Question: Fill up the include_dict with new includes found from the file .

def Func ( arg_0 , arg_1 , arg_2 = arg_3 ) : arg_4 = None try : arg_4 = arg_2 . open ( arg_0 , 'r' , 'utf8' , 'replace' ) except IOError : return False arg_5 = 0 for arg_6 in arg_4 : arg_5 += 1 arg_7 = CleanseComments ( arg_6 ) arg_8 = _RE_PATTERN_INCLUDE . search ( arg_7 ) if arg_8 : arg_9 = arg_8 . group ( 2 ) arg_1 . setdefault ( arg_9 , arg_5 ) return True

Say the workers to finish their jobs and quit.


Question: Prepare & join phonetic numbers .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . split ( '-' ) arg_3 = ' ' . join ( [ arg_0 . _pnums_with_leading_space ( i ) [ 1 : ] for i in arg_2 ] ) return arg_3


Question: APEv2 tag value factory .

def Func ( arg_0 , arg_1 ) : if arg_1 in ( TEXT , EXTERNAL ) : if not isinstance ( arg_0 , text_type ) : if PY3 : raise TypeError ( "str only for text/external values" ) else : arg_0 = arg_0 . encode ( "utf-8" ) if arg_1 == TEXT : return APETextValue ( arg_0 , arg_1 ) elif arg_1 == BINARY : return APEBinaryValue ( arg_0 , arg_1 ) elif arg_1 == EXTERNAL : return APEExtValue ( arg_0 , arg_1 ) else : raise ValueError ( "kind must be TEXT, BINARY, or EXTERNAL" )


Question: Print top_n big dir in this dir .

def Func ( arg_0 , arg_1 = 5 ) : arg_0 . assert_is_dir_and_exists ( ) arg_2 = sorted ( [ ( arg_3 , arg_3 . dirsize ) for arg_3 in arg_0 . select_dir ( recursive = False ) ] , key = lambda x : x [ 1 ] , reverse = True , ) for arg_3 , arg_4 in arg_2 [ : arg_1 ] : print ( "{:<9}    {:<9}" . format ( repr_data_size ( arg_4 ) , arg_3 . abspath ) )

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

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

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


Question: Return the information about case groups

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : arg_4 = [ { 'status' : 'all' , 'count' : arg_1 , 'percent' : 1 } ] arg_5 = [ ] arg_6 = { '$group' : { '_id' : '$status' , 'count' : { '$sum' : 1 } } } arg_7 = { } if arg_2 and arg_3 : arg_7 = arg_0 . cases ( owner = arg_2 , name_query = arg_3 , yield_query = True ) elif arg_2 : arg_7 = arg_0 . cases ( owner = arg_2 , yield_query = True ) elif arg_3 : arg_7 = arg_0 . cases ( name_query = arg_3 , yield_query = True ) arg_8 = { '$match' : arg_7 } if arg_7 else { } if arg_8 : arg_5 . append ( arg_8 ) arg_5 . append ( arg_6 ) arg_9 = arg_0 . case_collection . aggregate ( arg_5 ) for arg_10 in arg_9 : arg_4 . append ( { 'status' : arg_10 [ '_id' ] , 'count' : arg_10 [ 'count' ] , 'percent' : arg_10 [ 'count' ] / arg_1 } ) return arg_4

Stop streaming samples from device and delete samples buffer


Question: Save a vectorized image to file .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : if not arg_3 : arg_3 = arg_2 . get_header ( ) arg_3 . set_data_dtype ( arg_0 . dtype ) arg_3 [ 'cal_max' ] = arg_0 . max ( ) arg_3 [ 'cal_min' ] = arg_0 . min ( ) arg_4 = nifti1 . Nifti1Image ( arg_2 . unmask ( arg_0 ) , None , arg_3 ) arg_4 . to_filename ( arg_1 )

Disconnect internal signals so unit can be reused by parent unit


Question: Find out what items are documented in the given object s docstring .

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : try : arg_3 , arg_4 , arg_5 = import_by_name ( arg_0 ) arg_6 = pydoc . getdoc ( arg_4 ) . splitlines ( ) return find_autosummary_in_lines ( arg_6 , arg_1 = arg_0 , arg_2 = arg_2 ) except AttributeError : pass except ImportError , e : print "Failed to import '%s': %s" % ( arg_0 , e ) return [ ]

Receive TCP response, looping to get whole thing or timeout.


Question: This calculates the difference in mags after EPD coefficients are calculated .

Save the vocabulary to a file so the model can be reloaded.

    Parameters
    ----------
    count : a list of tuple and list
        count[0] is a list : the number of rare words,
        count[1:] are tuples : the number of occurrence of each word,
        e.g. [['UNK', 418391], (b'the', 1061396), (b'of', 593677), (b'and', 416629), (b'one', 411764)]

    Examples
    ---------
    >>> words = tl.files.load_matt_mahoney_text8_dataset()
    >>> vocabulary_size = 50000
    >>> data, count, dictionary, reverse_dictionary = tl.nlp.build_words_dataset(words, vocabulary_size, True)
    >>> tl.nlp.save_vocab(count, name='vocab_text8.txt')
    >>> vocab_text8.txt
    UNK 418391
    the 1061396
    of 593677
    and 416629
    one 411764
    in 372201
    a 325873
    to 316376


Question: Render the segmentation map as an RGB image .

def Func ( arg_0 , arg_1 = None , arg_2 = 0.01 , arg_3 = None , arg_4 = None , arg_5 = False ) : arg_6 = arg_0 . get_arr_int ( arg_2 = arg_2 , arg_3 = arg_3 ) arg_7 = 1 + np . max ( arg_6 ) arg_8 = np . zeros ( ( arg_6 . shape [ 0 ] , arg_6 . shape [ 1 ] , 3 ) , dtype = np . uint8 ) if arg_4 is None : arg_4 = SegmentationMapOnImage . DEFAULT_SEGMENT_COLORS ia . do_assert ( arg_7 <= len ( arg_4 ) , "Can't Func all %d classes as it would exceed the maximum number of %d available colors." % ( arg_7 , len ( arg_4 ) , ) ) arg_9 = np . unique ( arg_6 ) for arg_10 , arg_11 in zip ( sm . xrange ( arg_7 ) , arg_4 ) : if arg_10 in arg_9 : arg_12 = ( arg_6 == arg_10 ) arg_8 [ arg_12 ] = arg_11 if arg_5 : arg_3 = 0 if arg_3 is None else arg_3 arg_13 = ( arg_6 != arg_3 ) else : arg_13 = None if arg_1 is not None : arg_8 = ia . imresize_single_image ( arg_8 , arg_1 , interpolation = "nearest" ) if arg_13 is not None : arg_13 = ia . imresize_single_image ( arg_13 . astype ( np . uint8 ) , arg_1 , interpolation = "nearest" ) > 0 if arg_13 is not None : return arg_8 , arg_13 return arg_8


Question: transpile one or more circuits .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = None ) : warnings . warn ( "qiskit.Funcr.Func() has been deprecated and will be " "removed in the 0.9 release. Use qiskit.compiler.Func() instead." , DeprecationWarning ) return compiler . Func ( arg_0 = arg_0 , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , seed_Funcr = arg_5 , arg_6 = arg_6 )

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: Return the value to player ; 1 for win - 1 for loss 0 otherwise .

def Func ( arg_0 , arg_1 , arg_2 ) : return if_ ( arg_2 == 'X' , arg_1 . Func , - arg_1 . Func )

Produces a TidyPy configuration using the ``pyproject.toml`` in the
    project's directory.

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


Question: Save the Numpy array created from to_matrix function to the output_file .

def Func ( arg_0 , arg_1 , arg_2 = 0 , arg_3 = None ) : arg_4 , arg_5 , arg_6 = arg_0 . to_matrix ( arg_2 , arg_3 ) arg_7 = ExportData ( ) arg_8 = { 'data' : arg_4 , 'labels' : arg_0 . labels , 'mask_indices' : arg_5 , 'mask_shape' : arg_6 , } if arg_0 . others : arg_8 . update ( arg_0 . others ) log . debug ( 'Creating content in file {}.' . format ( arg_1 ) ) try : arg_7 . save_variables ( arg_1 , arg_8 ) except Exception as exc : raise Exception ( 'Error saving variables to file {}.' . format ( arg_1 ) ) from exc

Plots a probability distribution for the event of making
    a profitable trade.

    Parameters
    ----------
    round_trips : pd.DataFrame
        DataFrame with one row per round trip trade.
        - See full explanation in round_trips.extract_round_trips
    ax : matplotlib.Axes, optional
        Axes upon which to plot.

    Returns
    -------
    ax : matplotlib.Axes
        The axes that were plotted on.


Question: Returns the analog reference .

def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : return arg_0 . _Func ( None ) else : arg_2 = arg_0 . _pin_mapping . get ( arg_1 , None ) if arg_2 : return arg_0 . _Func ( arg_2 ) else : raise KeyError ( 'Requested pin is not mapped: %s' % arg_1 )

Decode the data passed in and potentially flush the decoder.


Question: Synchronous PUT request . There will be no returning output from the server because the request will be made with silent parameter . data must be a JSONable value .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None , arg_5 = None , arg_6 = None ) : assert arg_2 , 'Snapshot name must be specified' arg_4 = arg_4 or { } arg_5 = arg_5 or { } arg_7 = arg_0 . _build_endpoint_url ( arg_1 , arg_2 ) arg_0 . _authenticate ( arg_4 , arg_5 ) arg_3 = json . dumps ( arg_3 , cls = JSONEncoder ) return make_Func_request ( arg_7 , arg_3 , arg_4 , arg_5 , arg_6 = arg_6 )

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

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

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

    Returns:
        DataFrame: result


Question: Compose projects . json for bugzilla

def Func ( arg_0 , arg_1 ) : for arg_2 in [ project for project in arg_1 if len ( arg_1 [ project ] [ 'bugzilla' ] ) > 0 ] : if 'bugzilla' not in arg_0 [ arg_2 ] : arg_0 [ arg_2 ] [ 'bugzilla' ] = [ ] arg_3 = [ url [ 'query_url' ] for url in arg_1 [ arg_2 ] [ 'bugzilla' ] if url [ 'query_url' ] not in arg_0 [ arg_2 ] [ 'bugzilla' ] ] arg_0 [ arg_2 ] [ 'bugzilla' ] += arg_3 return arg_0

Deletes the video

        Authentication is required

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

        Return:
            True if successful

        Raise:
            OperationError: on unsuccessful deletion


Question: scan folder1 and folder2 into files1 and files2 . since we are on windows simplify things by making them all lowercase . this WILL cause problems on nix operating systems . If this is the case just run a script to rename every file to all lowercase .

def Func ( arg_0 ) : arg_1 = cm . timeit ( ) arg_0 . files1 = cm . list_to_lowercase ( sorted ( os . listdir ( arg_0 . folder1 ) ) ) arg_0 . files2 = cm . list_to_lowercase ( sorted ( os . listdir ( arg_0 . folder2 ) ) ) arg_0 . files1abf = [ x for x in arg_0 . files1 if x . endswith ( ".abf" ) ] arg_0 . files1abf = cm . list_to_lowercase ( cm . abfSort ( arg_0 . files1abf ) ) arg_0 . IDs = [ x [ : - 4 ] for x in arg_0 . files1abf ] arg_0 . log . debug ( "folder1 has %d files" , len ( arg_0 . files1 ) ) arg_0 . log . debug ( "folder1 has %d abfs" , len ( arg_0 . files1abf ) ) arg_0 . log . debug ( "folder2 has %d files" , len ( arg_0 . files2 ) ) arg_0 . log . debug ( "Funcning folders took %s" , cm . timeit ( arg_1 ) )


Question: Write a basic TOP file .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] for arg_4 in arg_1 : if arg_4 [ 0 ] . endswith ( '.o' ) : arg_3 . append ( tuple ( [ arg_4 [ 0 ] [ : - 2 ] ] + list ( arg_4 [ 1 : ] ) ) ) else : arg_3 . append ( arg_4 ) if arg_0 : with open ( arg_0 , "w" ) as top : print ( '#include "martini.itp"\n' , file = top ) print ( '[ system ]' , file = top ) print ( '; name' , file = top ) print ( arg_2 , file = top ) print ( '\n' , file = top ) print ( '[ molecules ]' , file = top ) print ( '; name  number' , file = top ) print ( "\n" . join ( "%-10s %7d" % arg_4 for arg_4 in arg_3 ) , file = top ) else : arg_5 = ( molecule for molecule in arg_3 if molecule [ 0 ] != 'Protein' ) print ( "\n" . join ( "%-10s %7d" % arg_4 for arg_4 in arg_5 ) , file = sys . stderr )

Receive ASGI websocket messages, ensuring valid state transitions.


Question: Return the duplicated items in values

def Func ( arg_0 : arg_1 ) : arg_2 = pd . Series ( arg_0 ) return arg_2 [ arg_2 . Func ( ) ]

Places top drawdowns in a table.

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

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


Question: Return median .

def Func ( arg_0 ) : arg_0 = sorted ( arg_0 ) arg_1 = len ( arg_0 ) if arg_1 % 2 : arg_1 = int ( ( arg_1 - 1 ) / 2 ) return arg_0 [ arg_1 ] arg_1 = int ( arg_1 / 2 ) arg_2 = ( arg_0 [ arg_1 - 1 ] + arg_0 [ arg_1 ] ) / 2 return arg_2 if not arg_2 . is_integer ( ) else int ( arg_2 )


Question: Return info about callers .

def Func ( arg_0 , arg_1 = 'snv' ) : arg_2 = set ( ) for arg_3 in CALLERS [ arg_1 ] : if arg_0 . get ( arg_3 [ 'id' ] ) : arg_2 . add ( ( arg_3 [ 'name' ] , arg_0 [ arg_3 [ 'id' ] ] ) ) return list ( arg_2 )

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: r Return the magnitude of the inverse Fast Fourier Transform of a waveform .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : return abs ( ifft ( arg_0 , arg_1 , arg_2 , arg_3 ) )

Process presence stanza.

        Pass it to a handler of the stanza's type and payload namespace.

        :Parameters:
            - `stanza`: presence stanza to be handled


Question: Verify basic http authentification

def Func ( arg_0 , arg_1 ) : arg_2 = models . User . objects ( arg_0 = arg_0 , arg_1 = arg_1 ) . first ( ) return arg_2 or None

Get a temp filename for atomic download.


Question: Ingest any kind of LSST document hosted on LSST the Docs from its source .

async def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : arg_4 = logging . getLogger ( __name__ ) arg_5 = await get_ltd_product ( arg_0 , url = arg_2 ) arg_6 = arg_5 [ 'slug' ] arg_7 = DOCUMENT_HANDLE_PATTERN . match ( arg_6 ) if arg_7 is None : arg_4 . debug ( '%s is not a document repo' , arg_6 ) return try : return await process_sphinx_technote ( arg_0 , arg_1 , arg_5 , arg_3 = arg_3 ) except NotSphinxTechnoteError : arg_4 . debug ( '%s is not a Sphinx-based technote.' , arg_6 ) except Exception : arg_4 . exception ( 'Unexpected error trying to process %s' , arg_6 ) return try : return await process_lander_page ( arg_0 , arg_1 , arg_5 , arg_3 = arg_3 ) except NotLanderPageError : arg_4 . debug ( '%s is not a Lander page with a metadata.jsonld file.' , arg_6 ) except Exception : arg_4 . exception ( 'Unexpected error trying to process %s' , arg_6 ) return

Adjust contrast of an Image.

    Args:
        img (PIL Image): PIL Image to be adjusted.
        contrast_factor (float): How much to adjust the contrast. Can be any
            non negative number. 0 gives a solid gray image, 1 gives the
            original image while 2 increases the contrast by a factor of 2.

    Returns:
        PIL Image: Contrast adjusted image.


Question: Pickle the Grid object

def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = dict ( grid = arg_0 . grid , edges = arg_0 . edges , metadata = arg_0 . metadata ) with open ( arg_1 , 'wb' ) as f : cPickle . dump ( arg_3 , f , cPickle . HIGHEST_PROTOCOL )

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: Return the normalized Euclidean similarity of two strings .

def Func ( arg_0 , arg_1 , arg_2 = 2 , arg_3 = None ) : return Euclidean ( ) . sim ( arg_0 , arg_1 , arg_2 , arg_3 )

Updates the target temperature on the NuHeat API

        :param temperature: The desired temperature in NuHeat format
        :param permanent: Permanently hold the temperature. If set to False, the schedule will
                          resume at the next programmed event


Question: This runs the pyeebls . eebls function using the given inputs .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 ) : arg_8 = npones ( arg_0 . size ) arg_9 = npones ( arg_0 . size ) arg_10 = eebls ( arg_0 , arg_1 , arg_8 , arg_9 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 ) return { 'power' : arg_10 [ 0 ] , 'bestperiod' : arg_10 [ 1 ] , 'bestpower' : arg_10 [ 2 ] , 'transdepth' : arg_10 [ 3 ] , 'transduration' : arg_10 [ 4 ] , 'transingressbin' : arg_10 [ 5 ] , 'transegressbin' : arg_10 [ 6 ] }

Sets the review comment. Raises CardinalityError if
        already set. OrderError if no reviewer defined before.
        Raises SPDXValueError if comment is not free form text.


Question: Evaluate the hook by its name

def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_4 ) -> Node : if arg_1 not in arg_0 . __class__ . _hooks : arg_0 . diagnostic . notify ( error . Severity . ERROR , "Unknown hook : %s" % arg_1 , error . LocationInfo . from_stream ( arg_0 . _stream , is_error = True ) ) raise arg_0 . diagnostic arg_0 . _lastRule = '#' + arg_1 arg_6 = arg_0 . __class__ . _hooks [ arg_1 ] ( arg_0 , * arg_3 ) if type ( arg_6 ) is not bool : raise TypeError ( "Your hook %r didn't return a bool value" % arg_1 ) return arg_6

Get the contents of a repository.

        This method returns an iterator that manages the pagination
        over contents. Take into account that the seconds of `from_date`
        parameter will be ignored because the API only works with
        hours and minutes.

        :param from_date: fetch the contents updated since this date
        :param offset: fetch the contents starting from this offset
        :param limit: maximum number of contents to fetch per request


Question: returns the first 10 segments for a specific list .

def Func ( arg_0 , arg_1 , ** arg_2 ) : return arg_0 . _mc_client . _get ( url = arg_0 . _build_path ( arg_1 , 'segments' ) , ** arg_2 )

Condition to stop when any batch member converges, or all have failed.


Question: Returns the current gamepad state . Buttons pressed is shown as a raw integer value . Use rController . buttons for a list of buttons pressed .

def Func ( arg_0 ) : arg_1 = _xinput_state ( ) _xinput . XInputGetState ( arg_0 . ControllerID - 1 , pointer ( arg_1 ) ) arg_0 . dwPacketNumber = arg_1 . dwPacketNumber return arg_1 . XINPUT_GAMEPAD

Clean up stats file, if configured to do so.


Question: use 1 colormap for the whole abf . You can change it! .

def Func ( arg_0 , arg_1 = None , arg_2 = False ) : if arg_1 is None : arg_1 = pylab . cm . Dark2 arg_0 . cm = arg_1 arg_0 . colormap = [ ] for arg_4 in range ( arg_0 . sweeps ) : arg_0 . colormap . append ( arg_1 ( arg_4 / arg_0 . sweeps ) ) if arg_2 : arg_0 . colormap . reverse ( )

Returns uptime in seconds or None, on MINIX.


Question: Construct an activation function by name .

def Func ( arg_0 , arg_1 , ** arg_2 ) : if isinstance ( arg_0 , Activation ) : return arg_0 if '+' in arg_0 : return functools . reduce ( Compose , ( Func ( arg_3 , arg_1 , ** arg_2 ) for arg_3 in arg_0 . split ( '+' ) ) ) arg_4 = COMMON . get ( arg_0 ) if arg_4 is not None : arg_4 . name = arg_0 arg_4 . params = [ ] return arg_4 if arg_0 . lower ( ) . startswith ( 'maxout' ) and ':' in arg_0 : arg_0 , arg_6 = arg_0 . split ( ':' , 1 ) arg_2 [ 'pieces' ] = int ( arg_6 ) arg_2 [ 'name' ] = arg_0 arg_2 [ 'layer' ] = arg_1 return Activation . Func ( arg_0 , ** arg_2 )


Question: Inserts all given nifti files from file_list into one dataset in fname . This will not check if the dimensionality of all files match .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = 0 , arg_5 = None , arg_6 = True ) : def isalambda ( arg_7 ) : return isinstance ( arg_7 , type ( lambda : None ) ) and arg_7 . __name__ == '<lambda>' arg_8 = 'w' if os . path . exists ( arg_0 ) : if arg_6 : arg_8 = 'a' arg_9 = [ nib . load ( vol ) for vol in arg_2 ] arg_10 = [ np . array ( arg_19 . get_shape ( ) ) for arg_19 in arg_9 ] if arg_3 is not None : if isalambda ( arg_3 ) : arg_11 = np . array ( [ arg_3 ( arg_22 ) for arg_22 in arg_10 ] ) else : arg_11 = np . array ( [ arg_22 for arg_22 in arg_10 ] ) for arg_12 in arg_11 : assert ( len ( arg_12 ) - 1 < arg_4 ) arg_13 = arg_11 . shape [ 1 ] arg_14 = np . zeros ( arg_13 , arg_5 = np . int ) for arg_15 in list ( range ( arg_13 ) ) : if arg_15 == arg_4 : arg_14 [ arg_15 ] = np . sum ( arg_11 [ : , arg_4 ] ) else : arg_14 [ arg_15 ] = np . max ( arg_11 [ : , arg_15 ] ) if arg_5 is None : arg_5 = arg_9 [ 0 ] . get_data_dtype ( ) with h5py . File ( arg_0 , arg_8 ) as f : try : arg_16 = 0 arg_17 = f . create_group ( os . path . dirname ( arg_1 ) ) arg_18 = arg_17 . create_dataset ( os . path . basename ( arg_1 ) , arg_14 , arg_5 ) for arg_19 in arg_9 : arg_12 = arg_11 [ arg_16 , : ] def append_to_dataset ( arg_18 , arg_20 , arg_21 , arg_4 ) : arg_22 = arg_21 . shape arg_23 = len ( arg_22 ) if arg_23 == 1 : if arg_4 == 0 : arg_18 [ arg_20 ] = arg_21 elif arg_23 == 2 : if arg_4 == 0 : arg_18 [ arg_20 ] = arg_21 elif arg_4 == 1 : arg_18 [ arg_20 ] = arg_21 elif arg_23 == 3 : if arg_4 == 0 : arg_18 [ arg_20 ] = arg_21 elif arg_4 == 1 : arg_18 [ arg_20 ] = arg_21 elif arg_4 == 2 : arg_18 [ arg_20 ] = arg_21 append_to_dataset ( arg_18 , arg_16 , np . reshape ( arg_19 . get_data ( ) , tuple ( arg_12 ) ) , arg_4 ) arg_16 += 1 except ValueError as ve : raise Exception ( 'Error creating group {} in hdf file {}' . format ( arg_1 , arg_0 ) ) from ve

Calculate the alpha value given the material state.

        :param **state: material state

        :returns: float


Question: Wait until we can make a socket connection to sphinx .

def Func ( arg_0 , arg_1 ) : arg_2 = False arg_3 = 10 arg_4 = 0 arg_5 = 0.5 while not arg_2 or arg_4 >= arg_3 : time . sleep ( arg_5 ) try : arg_6 = socket . AF_INET arg_7 = ( '127.0.0.1' , arg_1 ) arg_8 = socket . socket ( arg_6 , socket . SOCK_STREAM ) arg_8 . connect ( arg_7 ) except socket . error : if arg_8 : arg_8 . close ( ) arg_4 += 1 continue arg_2 = True if not arg_2 : print ( "Error connecting to sphinx searchd" , file = sys . stderr )

Unsigned divide.

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

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

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


Question: Turn a funcs list element into a class object .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { "__set__" : create_setter ( arg_1 , arg_2 ) } if len ( arg_2 ) > 0 : arg_3 [ "__init__" ] = create_init ( arg_2 ) arg_4 = type ( str ( arg_0 ) , ( Descriptor , ) , arg_3 ) arg_4 . __doc__ = docstrings . get ( arg_0 ) return arg_4


Question: Utility function for creating enumerations in python

def Func ( * arg_0 , ** arg_1 ) : def arg_9 ( arg_2 , arg_3 ) : return arg_2 . __labels [ arg_3 ] def arg_10 ( arg_2 , arg_3 ) : return arg_3 in arg_2 . __values def arg_11 ( arg_2 ) : return list ( arg_2 . __values ) def arg_12 ( arg_2 ) : return list ( arg_2 . __labels . values ( ) ) def arg_13 ( arg_2 , arg_4 ) : return arg_2 . __labels [ arg_4 ] for arg_5 in list ( arg_0 ) + arg_1 . keys ( ) : if type ( arg_5 ) is not str : raise TypeError ( "Func arg {0} must be a string" . format ( arg_5 ) ) if not __isidentifier ( arg_5 ) : raise ValueError ( "Invalid enum value '{0}'. " "'{0}' is not a valid identifier" . format ( arg_5 ) ) arg_1 . update ( zip ( arg_0 , arg_0 ) ) arg_6 = type ( "Func" , ( object , ) , arg_1 ) arg_6 . __labels = dict ( ( v , k ) for k , v in arg_1 . iteritems ( ) ) arg_6 . __values = set ( arg_6 . __labels . keys ( ) ) arg_6 . getLabel = functools . partial ( arg_9 , arg_6 ) arg_6 . validate = functools . partial ( arg_10 , arg_6 ) arg_6 . getValues = functools . partial ( arg_11 , arg_6 ) arg_6 . getLabels = functools . partial ( arg_12 , arg_6 ) arg_6 . getValue = functools . partial ( arg_13 , arg_6 ) return arg_6

Split file name and extension

    :type path: str|unicode
    :rtype: one str|unicode


Question: Get the full object from spotify with a href attribute .

async def Func ( arg_0 ) : if not hasattr ( arg_0 , 'href' ) : raise TypeError ( 'Spotify object has no `href` attribute, therefore cannot be retrived' ) elif hasattr ( arg_0 , 'http' ) : return await arg_0 . http . request ( ( 'GET' , arg_0 . href ) ) else : arg_1 = type ( arg_0 ) try : arg_2 = getattr ( arg_0 , '_{0}__client' . format ( arg_1 . __name__ ) ) except AttributeError : raise TypeError ( 'Spotify object has no way to access a HTTPClient.' ) else : arg_3 = arg_2 . http arg_4 = await arg_3 . request ( ( 'GET' , arg_0 . href ) ) return arg_1 ( arg_2 , arg_4 )

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


Question: Draw a line between pos1 and pos2 on the canvas .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = ( 255 , 0 , 0 ) ) : arg_4 , arg_5 = tuple ( [ int ( round ( i , 0 ) ) for i in arg_1 ] ) arg_6 , arg_7 = tuple ( [ int ( round ( i , 0 ) ) for i in arg_2 ] ) arg_8 , arg_9 = skimage . draw . line ( arg_4 , arg_5 , arg_6 , arg_7 ) arg_0 [ arg_8 , arg_9 ] = arg_3

Set the rotation of this body using a rotation matrix.

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


Question: Context manager that GETs a given url and provides it as a local file .

def Func ( arg_0 , arg_1 = None ) : if arg_1 : arg_1 = '.' + arg_1 . strip ( '.' ) arg_2 = 'www-{}-' . format ( urlparse ( arg_0 ) . hostname or 'any' ) if arg_0 . startswith ( 'file://' ) : arg_0 = os . path . abspath ( arg_0 [ len ( 'file://' ) : ] ) if os . path . isabs ( arg_0 ) : with open ( arg_0 , 'rb' ) as handle : arg_3 = handle . read ( ) else : arg_3 = requests . get ( arg_0 ) . content with tempfile . NamedTemporaryFile ( suffix = arg_1 or '' , prefix = arg_2 , delete = False ) as handle : handle . write ( arg_3 ) try : yield handle . name finally : if os . path . exists ( handle . name ) : os . remove ( handle . name )

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: Index all the keys added so far and make them searchable .

def Func ( arg_0 ) : for arg_1 , arg_2 in enumerate ( arg_0 . hashtables ) : arg_0 . sorted_hashtables [ arg_1 ] = [ H for H in arg_2 . keys ( ) ] arg_0 . sorted_hashtables [ arg_1 ] . sort ( )


Question: Download H2O log files to disk .

def Func ( arg_0 = "." , arg_1 = None ) : assert_is_type ( arg_0 , str ) assert_is_type ( arg_1 , str , None ) arg_2 = "%s/3/Logs/download" % h2oconn . base_url arg_3 = urlopen ( ) arg_4 = arg_3 ( arg_2 ) if not os . path . exists ( arg_0 ) : os . mkdir ( arg_0 ) if arg_1 is None : if PY3 : arg_5 = [ arg_6 [ 1 ] for arg_6 in arg_4 . headers . _headers ] else : arg_5 = arg_4 . headers . headers for arg_6 in arg_5 : if "filename=" in arg_6 : arg_1 = arg_6 . split ( "filename=" ) [ 1 ] . strip ( ) break arg_7 = os . path . join ( arg_0 , arg_1 ) arg_4 = arg_3 ( arg_2 ) . read ( ) print ( "Writing H2O logs to " + arg_7 ) with open ( arg_7 , "wb" ) as f : f . write ( arg_4 ) return arg_7

Chooses the best model for a given job.

    Parameters
    -----------------------------------------------------------------------
    forceUpdate:  (True/False). If True, the update will ignore all the
                  restrictions on the minimum time to update and the minimum
                  number of records to update. This should typically only be
                  set to true if the model has completed running


Question: pgrep returns an error code if no process was found

def Func ( arg_0 ) : try : arg_1 = sh . Command ( '/usr/bin/pgrep' ) arg_1 ( arg_0 ) arg_2 = True except sh . ErrorReturnCode_1 : arg_2 = False return arg_2

Returns the maximum delay for the InferenceElements in the inference
    dictionary

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


Question: Picks only a coda from a decimal .

def Func ( arg_0 ) : arg_0 = Decimal ( arg_0 ) arg_1 , arg_2 , arg_3 = arg_0 . as_tuple ( ) if arg_3 < 0 : return DIGIT_CODAS [ arg_2 [ - 1 ] ] arg_1 , arg_2 , arg_3 = arg_0 . normalize ( ) . as_tuple ( ) arg_4 = bisect_right ( EXP_INDICES , arg_3 ) - 1 if arg_4 < 0 : return DIGIT_CODAS [ arg_2 [ - 1 ] ] else : return EXP_CODAS [ EXP_INDICES [ arg_4 ] ]

Configure session for particular device

        Returns:
            tensorflow.Session


Question: Computes the walk paths between stops and updates these to the gtfs database .

def Func ( arg_0 , arg_1 , arg_2 = 1000 ) : if isinstance ( arg_0 , str ) : arg_0 = GTFS ( arg_0 ) assert ( isinstance ( arg_0 , GTFS ) ) print ( "Reading in walk network" ) arg_3 = create_walk_network_from_osm ( arg_1 ) print ( "Matching stops to the OSM network" ) arg_4 , arg_5 = match_stops_to_nodes ( arg_0 , arg_3 ) arg_6 = arg_0 . get_straight_line_transfer_distances ( ) arg_7 = { stop_I : set ( ) for stop_I in arg_4 } for arg_8 in arg_6 . itertuples ( ) : arg_9 = arg_8 . from_stop_I arg_10 = arg_8 . to_stop_I arg_7 [ arg_9 ] . add ( arg_10 ) print ( "Computing walking distances" ) for arg_9 , arg_11 in arg_7 . items ( ) : arg_12 = arg_4 [ arg_9 ] arg_13 = arg_5 [ arg_9 ] arg_14 = networkx . single_source_dijkstra_path_length ( arg_3 , arg_12 , cutoff = arg_2 - arg_13 , weight = "distance" ) for arg_10 in arg_11 : arg_15 = arg_5 [ arg_10 ] arg_16 = arg_4 [ arg_10 ] arg_17 = arg_14 . get ( arg_16 , float ( 'inf' ) ) arg_18 = arg_13 + arg_17 + arg_15 arg_19 = arg_6 [ arg_6 [ 'from_stop_I' ] == arg_9 ] arg_20 = arg_19 [ arg_19 [ "to_stop_I" ] == arg_10 ] [ "d" ] . values [ 0 ] assert ( arg_20 < arg_18 + 2 ) if arg_18 <= arg_2 : arg_0 . conn . execute ( "UPDATE stop_distances " "SET d_walk = " + str ( int ( arg_18 ) ) + " WHERE from_stop_I=" + str ( arg_9 ) + " AND to_stop_I=" + str ( arg_10 ) ) arg_0 . conn . commit ( )

Add an HTTP header to response object.

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


Question: Boots a server for the app if it isn t already booted .

def Func ( arg_0 ) : if not arg_0 . responsive : arg_1 ( arg_0 ) . _ports [ arg_0 . port_key ] = arg_0 . port arg_4 = capybara . servers [ capybara . server_name ] arg_5 = ( arg_0 . middleware , arg_0 . port , arg_0 . host ) arg_0 . server_thread = Thread ( target = arg_4 , args = arg_5 ) arg_0 . server_thread . daemon = True arg_0 . server_thread . start ( ) arg_8 = Timer ( 60 ) while not arg_0 . responsive : if arg_8 . expired : raise RuntimeError ( "WSGI application timed out during Func" ) arg_0 . server_thread . join ( 0.1 ) return arg_0

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: Override _serialize for customizing the exception raised .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : try : return super ( ) . Func ( arg_1 , arg_2 , arg_3 ) except TypeError as ex : if 'serialization_schema_selector' in str ( ex ) : raise ValidationError ( 'Data from an invalid schema' ) raise

Bloomberg reference data

    Args:
        tickers: tickers
        flds: fields to query
        **kwargs: bbg overrides

    Returns:
        pd.DataFrame

    Examples:
        >>> bdp('IQ US Equity', 'Crncy', raw=True)
                 ticker  field value
        0  IQ US Equity  Crncy   USD
        >>> bdp('IQ US Equity', 'Crncy').reset_index()
                 ticker crncy
        0  IQ US Equity   USD


Question: Query for segment allocations .

def Func ( arg_0 , arg_1 = False , ** arg_2 ) : arg_3 = arg_2 . pop ( "segment_allocation_range_ids" , None ) arg_4 = arg_0 . session . query ( models . SegmentAllocation ) if arg_1 : arg_4 = arg_4 . with_lockmode ( "update" ) arg_4 = arg_4 . filter_by ( ** arg_2 ) if arg_3 : arg_4 . filter ( models . SegmentAllocation . segment_allocation_range_id . in_ ( arg_3 ) ) return arg_4

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


Question: Search for a file named name from cwd or given directory to root . Return None if nothing s found .

def Func ( arg_0 , arg_1 = None ) : arg_1 = arg_1 or os . getcwd ( ) while arg_1 != os . path . dirname ( arg_1 ) : if os . path . exists ( os . path . join ( arg_1 , arg_0 ) ) : return arg_1 arg_1 = os . path . dirname ( arg_1 ) return None


Question: Unpack sub field using its mask

def Func ( arg_0 , arg_1 , arg_2 = arg_3 . uint8 ) : arg_5 = least_significant_bit ( arg_1 ) return ( ( arg_0 & arg_1 ) >> arg_5 ) . astype ( arg_2 )

Return whether the input course or program exist.


Question: Implements various kinds of feature selection

def Func ( arg_0 , arg_1 , arg_2 ) : if re . match ( '.*-best' , arg_0 ) is not None : arg_3 = int ( arg_0 . split ( '-' ) [ 0 ] ) arg_4 = SelectKBest ( k = arg_3 ) import warnings with warnings . catch_warnings ( ) : warnings . simplefilter ( 'ignore' , category = UserWarning ) arg_5 = np . where ( arg_4 . fit ( arg_1 , arg_2 ) . get_support ( ) is True ) [ 0 ] elif re . match ( '.*-randombest' , arg_0 ) is not None : arg_3 = int ( arg_0 . split ( '-' ) [ 0 ] ) from random import shuffle arg_6 = range ( 0 , arg_1 . shape [ 1 ] ) shuffle ( arg_6 ) arg_5 = arg_6 [ : arg_3 ] return arg_5

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


Question: Set parent Expression for this object .

def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_1 , Expression ) : raise FiqlObjectException ( "Parent must be of %s not %s" % ( Expression , type ( arg_1 ) ) ) arg_0 . parent = arg_1

Gets a 3D CoordinateMap from img.

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

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


Question: Converts an HSV tuple to RGB . Intended for internal use . You should use hsv2rgb_spectrum or hsv2rgb_rainbow instead .

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: Sign specified data using a specified signing key .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None ) : arg_5 = Operation ( OperationEnum . SIGN ) arg_6 = payloads . SignRequestPayload ( arg_2 = arg_2 , arg_3 = arg_3 , arg_1 = arg_1 ) arg_7 = messages . RequestBatchItem ( arg_5 = arg_5 , arg_6 = arg_6 ) arg_8 = arg_0 . _build_request_message ( arg_4 , [ arg_7 ] ) arg_9 = arg_0 . _send_and_receive_message ( arg_8 ) arg_7 = arg_9 . batch_items [ 0 ] arg_10 = arg_7 . response_payload arg_11 = { } if arg_10 : arg_11 [ 'unique_identifier' ] = arg_10 . unique_identifier arg_11 [ 'Funcature' ] = arg_10 . Funcature_data arg_11 [ 'result_status' ] = arg_7 . result_status . value try : arg_11 [ 'result_reason' ] = arg_7 . result_reason . value except Exception : arg_11 [ 'result_reason' ] = arg_7 . result_reason try : arg_11 [ 'result_message' ] = arg_7 . result_message . value except Exception : arg_11 [ 'result_message' ] = arg_7 . result_message return arg_11

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


Question: Merges all segments in mask which are touching .

def Func ( arg_0 ) : arg_1 = [ arg_2 for arg_2 in np . unique ( arg_0 ) if arg_2 != 0 ] for arg_2 in arg_1 : arg_3 , arg_4 = np . where ( arg_0 == arg_2 ) for arg_5 in arg_1 : if arg_2 == arg_5 : continue else : arg_6 , arg_7 = np . where ( arg_0 == arg_5 ) if _segments_are_adjacent ( ( arg_3 , arg_4 ) , ( arg_6 , arg_7 ) ) : arg_0 [ arg_6 , arg_7 ] = arg_2

Rename this conversation.

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

        Args:
            name (str): New name.

        Raises:
            .NetworkError: If conversation cannot be renamed.


Question: Returns a deep copy of the list .

def Func ( arg_0 ) : return ColorList ( [ color ( arg_1 . r , arg_1 . g , arg_1 . b , arg_1 . a , mode = "rgb" ) for arg_1 in arg_0 ] , name = arg_0 . name , tags = arg_0 . tags )

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

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


Question: Add a normal file including its source

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = os . path . basename ( arg_0 ) if arg_1 != "." : arg_6 = os . path . join ( arg_1 , arg_5 ) else : arg_6 = arg_5 arg_7 = os . path . relpath ( arg_0 , os . getcwd ( ) ) arg_8 = 'data' if arg_3 : arg_8 = 'script' if arg_2 : arg_8 = 'generator' arg_9 = OrderedDict ( [ ( 'type' , arg_8 ) , ( 'generator' , arg_2 ) , ( 'relativepath' , arg_6 ) , ( 'content' , "" ) , ( 'source' , arg_4 ) , ( 'localfullpath' , arg_0 ) , ( 'localrelativepath' , arg_7 ) ] ) arg_9 = annotate_record ( arg_9 ) return ( arg_5 , arg_9 )

Prepare received data for representation.

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

        Returns:
            dict: processed data to show.


Question: Constructs the middle line of the element

def Func ( arg_0 ) : arg_1 = arg_0 . Func_format % arg_0 . Func_content . center ( arg_0 . width , arg_0 . _Func_padding ) if arg_0 . right_fill : arg_1 = arg_1 . ljust ( arg_0 . right_fill , arg_0 . _Func_padding ) if arg_0 . left_fill : arg_1 = arg_1 . rjust ( arg_0 . left_fill , arg_0 . _Func_padding ) arg_1 = arg_1 . center ( arg_0 . layer_width , arg_0 . Func_bck ) return arg_1

This method is called before first step of simulation.


Question: Scan and report all compatible serial devices on system .

def Func ( arg_0 ) : if arg_0 . devices is not None : return arg_0 . devices arg_0 . devices = { } arg_2 = "(?i)" + arg_0 . hardware_id for arg_3 in serial . tools . list_ports . grep ( arg_2 ) : arg_4 = arg_3 [ 0 ] try : arg_5 = arg_0 . get_device_id ( arg_4 ) arg_6 = arg_0 . _get_device_version ( arg_4 ) except : log . debug ( 'Error getting device_id for %s, %s' , arg_4 , arg_0 . baudrate ) if True : raise continue if getattr ( arg_3 , '__len__' , lambda : 0 ) ( ) : log . debug ( 'Multi-port device %s:%s:%s with %s ports found' , arg_0 . hardware_id , arg_5 , arg_6 , len ( arg_3 ) ) if arg_5 < 0 : log . debug ( 'Serial device %s:%s:%s with id %s < 0' , arg_0 . hardware_id , arg_5 , arg_6 ) else : arg_0 . devices [ arg_5 ] = arg_4 , arg_6 return arg_0 . devices


Question: Get the default parameters as defined in the Settings instance .

def Func ( arg_0 , * arg_1 , ** arg_2 ) : def retrieve_param ( arg_3 ) : try : return arg_0 . __getattribute__ ( arg_3 ) except AttributeError : if arg_3 == "device" : return arg_0 . default_device else : return arg_0 . __getattribute__ ( arg_3 . upper ( ) ) if len ( arg_1 ) == 0 : if len ( arg_2 ) == 1 and arg_2 [ list ( arg_2 . keys ( ) ) [ 0 ] ] is not None : return arg_2 [ list ( arg_2 . keys ( ) ) [ 0 ] ] elif len ( arg_2 ) == 1 : return retrieve_param ( list ( arg_2 . keys ( ) ) [ 0 ] ) else : raise TypeError ( "As dict is unordered, it is impossible to give" "the parameters in the correct order." ) else : arg_4 = [ ] for arg_3 in arg_1 : if arg_3 [ 1 ] is None : arg_4 . append ( retrieve_param ( arg_3 [ 0 ] ) ) else : arg_4 . append ( arg_3 [ 1 ] ) return arg_4


Question: Creates the specified Cloud Bigtable table . Raises google . api_core . exceptions . AlreadyExists if the table exists .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : if arg_3 is None : arg_3 = { } if arg_2 is None : arg_2 = [ ] arg_4 = Table ( arg_1 , arg_0 ) arg_4 . create ( arg_2 , arg_3 )

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

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


Question: Final optimization for the best - possible state .

def Func ( arg_0 , arg_1 = 'finish-state' , arg_2 = 'guess' ) : for arg_3 in [ None , 0 ] : for arg_4 in range ( 3 ) : arg_5 , arg_6 = addsub . add_subtract_locally ( arg_0 , region_depth = 7 , arg_3 = arg_3 , arg_2 = arg_2 ) if arg_5 == 0 : break opt . finish ( arg_0 , n_loop = 1 , separate_psf = True , arg_1 = arg_1 , dowarn = False ) opt . burn ( arg_0 , mode = 'polish' , arg_1 = arg_1 , n_loop = 2 , dowarn = False ) arg_7 = opt . finish ( arg_0 , arg_1 = arg_1 , n_loop = 4 , dowarn = False ) if not arg_7 [ 'converged' ] : RLOG . warn ( 'Optimization did not converge; consider re-running' )

Read attribute from sysfs and return as string


Question: This will try to pull in a stream from an external source . Once a stream has been successfully pulled it is assigned a local stream name which can be used to access the stream from the EMS .

def Func ( arg_0 , arg_1 , ** arg_2 ) : return arg_0 . protocol . execute ( 'pullStream' , arg_1 = arg_1 , ** arg_2 )

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


Question: Save a given Tensor into an image file .

def Func ( arg_0 , arg_1 , arg_2 = 8 , arg_3 = 2 , arg_4 = False , arg_5 = None , arg_6 = False , arg_7 = 0 ) : from PIL import Image arg_8 = make_grid ( arg_0 , arg_2 = arg_2 , arg_3 = arg_3 , arg_7 = arg_7 , arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 ) arg_9 = arg_8 . mul_ ( 255 ) . add_ ( 0.5 ) . clamp_ ( 0 , 255 ) . permute ( 1 , 2 , 0 ) . to ( 'cpu' , torch . uint8 ) . numpy ( ) arg_10 = Image . fromarray ( arg_9 ) arg_10 . save ( arg_1 )

Receive ASGI websocket messages, ensuring valid state transitions.


Question: Fetch the reviews

def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_2 [ 'from_date' ] if arg_0 . client . version [ 0 ] == 2 and arg_0 . client . version [ 1 ] == 8 : arg_4 = arg_0 . _fetch_gerrit28 ( arg_3 ) else : arg_4 = arg_0 . _fetch_gerrit ( arg_3 ) for arg_5 in arg_4 : yield arg_5

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

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

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


Question: Console script for satel_integra .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = getattr ( logging , arg_3 . upper ( ) , None ) if not isinstance ( arg_4 , int ) : raise ValueError ( 'Invalid log level: %s' % arg_3 ) logging . basicConfig ( level = arg_4 ) click . echo ( "Demo of satel_integra library" ) if arg_2 == "demo" : demo ( arg_1 , arg_0 )


Question: Raises ValueError if this sandbox instance is currently running .

def Func ( arg_0 , arg_1 : arg_2 ) : if arg_0 . _is_running : raise ValueError ( "Cannot change network access settings on a running sandbox" ) arg_0 . _Func = arg_1

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


Question: Move this object up one position .

def Func ( arg_0 ) : arg_0 . swap ( arg_0 . get_ordering_queryset ( ) . filter ( order__lt = arg_0 . order ) . order_by ( '-order' ) )

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

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

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

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


Question: Validate access token .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : log . debug ( 'Validate bearer token %r' , arg_1 ) arg_4 = arg_0 . _tokengetter ( arg_7 = arg_1 ) if not arg_4 : arg_5 = 'Bearer token not found.' arg_3 . error_message = arg_5 log . debug ( arg_5 ) return False if arg_4 . expires is not None and datetime . datetime . utcnow ( ) > arg_4 . expires : arg_5 = 'Bearer token is expired.' arg_3 . error_message = arg_5 log . debug ( arg_5 ) return False if arg_2 and not set ( arg_4 . scopes ) & set ( arg_2 ) : arg_5 = 'Bearer token scope not valid.' arg_3 . error_message = arg_5 log . debug ( arg_5 ) return False arg_3 . access_token = arg_4 arg_3 . user = arg_4 . user arg_3 . scopes = arg_2 if hasattr ( arg_4 , 'client' ) : arg_3 . client = arg_4 . client elif hasattr ( arg_4 , 'client_id' ) : arg_3 . client = arg_0 . _clientgetter ( arg_4 . client_id ) return True

Convenience function to efficiently construct a MultivariateNormalDiag.


Question: Set renewal rebinding times .

def Func ( arg_0 ) : logger . debug ( 'setting timeouts' ) arg_0 . set_timeout ( arg_0 . current_state , arg_0 . renewing_time_expires , arg_0 . client . lease . renewal_time ) arg_0 . set_timeout ( arg_0 . current_state , arg_0 . rebinding_time_expires , arg_0 . client . lease . rebinding_time )

Assign MUC stanza handlers to the `self.stream`.

        :Parameters:
            - `priority`: priority for the handlers.
        :Types:
            - `priority`: `int`


Question: Update a cache entry and return its list of lines . If something s wrong print a message discard the cache entry and return an empty list .

def Func ( arg_0 , arg_1 = None ) : if arg_0 in arg_9 : del arg_9 [ arg_0 ] if not arg_0 or ( arg_0 . startswith ( '<' ) and arg_0 . endswith ( '>' ) ) : return [ ] arg_2 = arg_0 try : arg_3 = os . stat ( arg_2 ) except OSError : arg_4 = arg_0 if arg_1 and '__loader__' in arg_1 : arg_5 = arg_1 . get ( '__name__' ) arg_6 = arg_1 [ '__loader__' ] arg_7 = getattr ( arg_6 , 'get_source' , None ) if arg_5 and arg_7 : try : arg_8 = arg_7 ( arg_5 ) except ( ImportError , IOError ) : pass else : if arg_8 is None : return [ ] arg_9 [ arg_0 ] = ( len ( arg_8 ) , None , [ line + '\n' for line in arg_8 . splitlines ( ) ] , arg_2 ) return arg_9 [ arg_0 ] [ 2 ] if os . path . isabs ( arg_0 ) : return [ ] for arg_10 in sys . path : try : arg_2 = os . path . join ( arg_10 , arg_4 ) except ( TypeError , AttributeError ) : continue try : arg_3 = os . stat ( arg_2 ) break except os . error : pass else : return [ ] try : with open ( arg_2 , 'rU' ) as fp : arg_11 = fp . readlines ( ) except IOError : return [ ] if arg_11 and not arg_11 [ - 1 ] . endswith ( '\n' ) : arg_11 [ - 1 ] += '\n' arg_12 , arg_13 = arg_3 . st_size , arg_3 . st_mtime arg_9 [ arg_0 ] = arg_12 , arg_13 , arg_11 , arg_2 return arg_11

Set your typing status in this conversation.

        Args:
            typing: (optional) ``TYPING_TYPE_STARTED``, ``TYPING_TYPE_PAUSED``,
                or ``TYPING_TYPE_STOPPED`` to start, pause, or stop typing,
                respectively. Defaults to ``TYPING_TYPE_STARTED``.

        Raises:
            .NetworkError: If typing status cannot be set.


Question: Print header information and other derived information .

def Func ( arg_0 ) : print ( "\n--- File Info ---" ) for arg_1 , arg_2 in arg_0 . file_header . items ( ) : if arg_1 == 'src_raj' : arg_2 = arg_2 . to_string ( unit = u . hour , sep = ':' ) if arg_1 == 'src_dej' : arg_2 = arg_2 . to_string ( unit = u . deg , sep = ':' ) print ( "%16s : %32s" % ( arg_1 , arg_2 ) ) print ( "\n%16s : %32s" % ( "Num ints in file" , arg_0 . n_ints_in_file ) ) print ( "%16s : %32s" % ( "File shape" , arg_0 . file_shape ) ) print ( "--- Selection Info ---" ) print ( "%16s : %32s" % ( "Data selection shape" , arg_0 . selection_shape ) ) print ( "%16s : %32s" % ( "Minimum freq (MHz)" , arg_0 . container . f_start ) ) print ( "%16s : %32s" % ( "Maximum freq (MHz)" , arg_0 . container . f_stop ) )

Fill up the include_dict with new includes found from the file.

  Args:
    filename: the name of the header to read.
    include_dict: a dictionary in which the headers are inserted.
    io: The io factory to use to read the file. Provided for testability.

  Returns:
    True if a header was successfully added. False otherwise.


Question: Prompt the objects to output pdf code and save to file .

def Func ( arg_0 ) : arg_0 . document . _set_page_numbers ( ) arg_0 . _put_header ( ) arg_0 . _put_pages ( ) arg_0 . _put_resources ( ) arg_0 . _put_information ( ) arg_0 . _put_catalog ( ) arg_0 . _put_trailer ( ) if hasattr ( arg_0 . destination , "write" ) : arg_1 = arg_0 . _output_to_io ( ) elif arg_0 . destination == 'string' : arg_1 = arg_0 . _output_to_string ( ) else : arg_0 . _output_to_file ( ) arg_1 = None return arg_1

Whether a connection can be established between those two meshes.


Question: given a list of files return a dict organized by extension .

def Func ( arg_0 ) : arg_1 = { "abf" : [ ] , "jpg" : [ ] , "tif" : [ ] } for arg_2 in arg_0 : arg_3 = os . path . splitext ( arg_2 ) [ 1 ] . replace ( "." , '' ) . lower ( ) if not arg_3 in arg_1 . keys ( ) : arg_1 [ arg_3 ] = [ ] arg_1 [ arg_3 ] = arg_1 [ arg_3 ] + [ arg_2 ] return arg_1


Question: Set the correct version for each gene Loop over the genes in the new panel

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : LOG . info ( 'Updating versions for new genes' ) arg_4 = arg_2 [ 'version' ] for arg_5 in arg_2 [ 'genes' ] : arg_6 = arg_5 [ 'hgnc_id' ] if arg_6 in arg_1 : arg_5 [ 'database_entry_version' ] = arg_4 continue arg_5 [ 'database_entry_version' ] = arg_3 return

Returns protobuf mapcontainer. Read from translation file.


Question: Adds a new item to the tree .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 , arg_8 ) : try : arg_9 = arg_1 arg_10 = len ( arg_2 ) - 1 arg_11 = arg_3 == LINK arg_12 = False for arg_13 , arg_14 in enumerate ( arg_2 ) : if arg_14 not in arg_9 . _children : if arg_13 == arg_10 : if arg_11 : arg_15 = arg_0 . _create_link ( arg_9 , arg_14 , arg_5 ) arg_12 = True elif arg_4 != arg_3 : arg_15 = arg_0 . _create_any_param_or_result ( arg_9 , arg_14 , arg_3 , arg_5 , arg_6 , arg_7 , arg_8 ) arg_0 . _flat_leaf_storage_dict [ arg_15 . v_full_name ] = arg_15 else : arg_15 = arg_0 . _create_any_group ( arg_9 , arg_14 , arg_4 , arg_5 , arg_6 , arg_7 , arg_8 ) else : arg_15 = arg_0 . _create_any_group ( arg_9 , arg_14 , arg_4 ) if arg_14 in arg_0 . _root_instance . _run_information : arg_0 . _root_instance . _run_parent_groups [ arg_9 . v_full_name ] = arg_9 if arg_0 . _root_instance . _is_run : if arg_12 : arg_0 . _root_instance . _new_links [ ( arg_9 . v_full_name , arg_14 ) ] = ( arg_9 , arg_15 ) else : arg_0 . _root_instance . _new_nodes [ ( arg_9 . v_full_name , arg_14 ) ] = ( arg_9 , arg_15 ) else : if arg_14 in arg_9 . _links : raise AttributeError ( 'You cannot hop over links when adding ' 'data to the tree. ' 'There is a link called `%s` under `%s`.' % ( arg_14 , arg_9 . v_full_name ) ) if arg_13 == arg_10 : if arg_0 . _root_instance . _no_clobber : arg_0 . _logger . warning ( 'You already have a group/instance/link `%s` ' 'under `%s`. ' 'However, you set `v_no_clobber=True`, ' 'so I will ignore your addition of ' 'data.' % ( arg_14 , arg_9 . v_full_name ) ) else : raise AttributeError ( 'You already have a group/instance/link `%s` ' 'under `%s`' % ( arg_14 , arg_9 . v_full_name ) ) arg_9 = arg_9 . _children [ arg_14 ] return arg_9 except : arg_0 . _logger . error ( 'Failed adding `%s` under `%s`.' % ( arg_14 , arg_1 . v_full_name ) ) raise

Update the profile picture for the current user.

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


Question: Retun an instance of TibberHome for given home id .

def Func ( arg_0 , arg_1 ) : if arg_1 not in arg_0 . _all_home_ids : _LOGGER . error ( "Could not find any Tibber home with id: %s" , arg_1 ) return None if arg_1 not in arg_0 . _homes . keys ( ) : arg_0 . _homes [ arg_1 ] = TibberHome ( arg_1 , arg_0 ) return arg_0 . _homes [ arg_1 ]

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


Question: Identify the kind of release by comparing to existing ones .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . split ( "." ) arg_3 = [ intify ( basename ( f ) ) for f in glob ( join ( arg_0 , "[0-9]*.md" ) ) ] arg_4 = max ( arg_3 ) if int ( arg_2 [ 0 ] ) > arg_4 [ 0 ] : return "major" elif int ( arg_2 [ 1 ] ) > arg_4 [ 1 ] : return "minor" else : return "patch"

Configure session for particular device

        Returns:
            tensorflow.Session


Question: Append data to this frame row - wise .

def Func ( arg_0 , arg_1 ) : assert_is_type ( arg_1 , H2OFrame , [ H2OFrame ] ) arg_2 = [ arg_1 ] if not isinstance ( arg_1 , list ) else arg_1 for arg_3 in arg_2 : if arg_3 . ncol != arg_0 . ncol : raise H2OValueError ( "Cannot row-bind a dataframe with %d columns to a data frame with %d columns: " "the columns must match" % ( arg_3 . ncol , arg_0 . ncol ) ) if arg_3 . columns != arg_0 . columns or arg_3 . types != arg_0 . types : raise H2OValueError ( "Column names and types must match for Func() to work" ) arg_4 = H2OFrame . _expr ( expr = ExprNode ( "Func" , arg_0 , * arg_2 ) , cache = arg_0 . _ex . _cache ) arg_4 . _ex . _cache . nrows = arg_0 . nrow + sum ( arg_3 . nrow for arg_3 in arg_2 ) return arg_4

Delete the Provisioning Service Certificate.

        Deletes the specified certificate assosciated with the Provisioning
        Service.

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


Question: The value used for processing . Can be a tuple . with optional extra bits

def Func ( arg_0 , arg_1 = None ) : if isinstance ( arg_0 . code , WithExtra ) : if not 0 <= arg_1 < 1 << arg_0 . extraBits ( ) : raise ValueError ( "Func: extra Func doesn't fit in extraBits" ) return arg_0 . code . Func ( arg_0 . index , arg_1 ) if arg_1 is not None : raise ValueError ( 'Func: no extra bits for this code' ) return arg_0 . code . Func ( arg_0 . index )

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: Get the location of a given service from Opencast and add it to the current configuration .

def Func ( arg_0 ) : while not arg_1 ( ) . get ( 'service-' + arg_0 ) and not terminate ( ) : try : arg_1 ( ) [ 'service-' + arg_0 ] = get_service ( 'org.opencastproject.' + arg_0 ) except pycurl . error as e : logger . error ( 'Could not get %s endpoint: %s. Retrying in 5s' % ( arg_0 , e ) ) time . sleep ( 5.0 )


Question: Creates a DSMR asyncio protocol coroutine using TCP connection .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None ) : arg_5 , arg_6 = create_dsmr_protocol ( arg_2 , arg_3 , arg_4 = None ) arg_7 = arg_4 . create_connection ( arg_5 , arg_0 , arg_1 ) return arg_7

Remove all binary files in the adslib directory.


Question: Start listening .

def Func ( arg_0 ) : _LOGGER . info ( 'Creating Multicast Socket' ) arg_0 . _mcastsocket = arg_0 . _create_mcast_socket ( ) arg_0 . _Funcing = True arg_3 = Thread ( target = arg_0 . _Func_to_msg , args = ( ) ) arg_0 . _threads . append ( arg_3 ) arg_3 . daemon = True arg_3 . start ( )


Question: Runs the current phase .

def Func ( arg_0 , arg_1 ) : if arg_1 . reverse : arg_0 . engine . reverse ( ) if arg_0 . engine . empty : raise AssertionError ( 'grappa: no assertions to Func' ) try : return arg_0 . Func_assertions ( arg_1 ) except Exception as _err : if getattr ( _err , '__legit__' , False ) : raise _err return arg_0 . render_error ( arg_1 , _err )

Clean up stats file, if configured to do so.


Question: Recursively removes nested brackets

def Func ( arg_0 ) : arg_1 = 1 while arg_1 : arg_0 , arg_1 = re . subn ( r'\([^()]*\)' , '' , arg_0 ) return arg_0

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


Question: Does the given port have this tag?

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

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: Check whether the file is empty reading the single byte .

def Func ( arg_0 ) : arg_1 = arg_0 . read ( 1 ) if arg_1 : if arg_0 . buf : arg_0 . buf = arg_1 + arg_0 . buf else : arg_0 . buf = arg_1 return False else : return True

translate gui2py attribute name from pythoncard legacy code


Question: Returns a list of string which are the virtual columns that are not used in any other virtual column .

def Func ( arg_0 ) : arg_1 = [ ] arg_2 = [ ] def walk ( arg_3 ) : if isinstance ( arg_3 , six . string_types ) : arg_2 . append ( arg_3 ) if arg_3 in arg_1 : arg_1 . remove ( arg_3 ) else : arg_4 , arg_5 , arg_6 , arg_7 = arg_3 if arg_4 in arg_0 . virtual_columns : arg_2 . append ( arg_4 ) if arg_4 in arg_1 : arg_1 . remove ( arg_4 ) for arg_8 in arg_7 : walk ( arg_8 ) for arg_9 in arg_0 . virtual_columns . keys ( ) : if arg_9 not in arg_2 : arg_1 . append ( arg_9 ) arg_3 = arg_0 [ arg_9 ] . _graph ( ) arg_4 , arg_5 , arg_6 , arg_7 = arg_3 for arg_8 in arg_7 : walk ( arg_8 ) return arg_1

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


Question: If there is space it sends data to server

def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_0 . start ( test_connection = False ) while True : arg_3 = arg_0 . _req_rep ( QueuingServerMessageListener . SPACE ) if arg_3 == QueuingServerMessageListener . SPACE_AVAILABLE : arg_0 . _req_rep ( ( QueuingServerMessageListener . DATA , arg_1 ) ) break else : time . sleep ( 0.01 )

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

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


Question: recover triples from mapping .

def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_2 ) : arg_4 = [ ] for arg_5 in arg_0 : arg_4 . append ( kgedata . Triple ( arg_1 . inverse [ arg_5 . head ] , arg_3 . inverse [ arg_5 . relation ] , arg_1 . inverse [ arg_5 . tail ] ) ) return arg_4


Question: set option on the correct option provider

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . _all_options [ arg_1 ] . set_option ( arg_1 , arg_2 )

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


Question: Finalize canonical averages

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , ) : arg_4 = ( ( 'percolation_probability_mean' in arg_2 . dtype . names ) and 'percolation_probability_m2' in arg_2 . dtype . names ) arg_5 = np . empty_like ( arg_2 , dtype = finalized_canonical_averages_dtype ( arg_4 = arg_4 ) , ) arg_6 = arg_2 [ 'number_of_runs' ] arg_7 = np . sqrt ( arg_2 [ 'number_of_runs' ] ) arg_5 [ 'number_of_runs' ] = arg_6 arg_5 [ 'p' ] = arg_1 arg_5 [ 'alpha' ] = arg_3 def _transform ( arg_8 , arg_9 = None , arg_10 = False , arg_11 = False , ) : if arg_9 is None : arg_9 = arg_8 arg_12 = [ '{}_mean' . format ( key ) for key in [ arg_8 , arg_9 ] ] arg_13 = [ '{}_m2' . format ( arg_8 ) , '{}_std' . format ( arg_9 ) , ] arg_14 = '{}_ci' . format ( arg_9 ) arg_5 [ arg_12 [ 1 ] ] = arg_2 [ arg_12 [ 0 ] ] if arg_10 : arg_5 [ arg_12 [ 1 ] ] /= arg_0 arg_15 = arg_2 [ arg_13 [ 0 ] ] arg_16 = np . sqrt ( ( arg_15 . T if arg_11 else arg_15 ) / ( arg_6 - 1 ) ) arg_5 [ arg_13 [ 1 ] ] = ( arg_16 . T if arg_11 else arg_16 ) if arg_10 : arg_5 [ arg_13 [ 1 ] ] /= arg_0 arg_15 = arg_5 [ arg_13 [ 1 ] ] arg_17 = ( arg_15 . T if arg_11 else arg_15 ) / arg_7 arg_15 = arg_5 [ arg_12 [ 1 ] ] arg_18 = ( arg_15 . T if arg_11 else arg_15 ) arg_16 = scipy . stats . t . interval ( 1 - arg_3 , df = arg_6 - 1 , loc = arg_18 , arg_17 = arg_17 , ) ( arg_5 [ arg_14 ] [ ... , 0 ] , arg_5 [ arg_14 ] [ ... , 1 ] ) = ( [ my_array . T for my_array in arg_16 ] if arg_11 else arg_16 ) if arg_4 : _transform ( 'percolation_probability' ) _transform ( 'max_cluster_size' , 'percolation_strength' , arg_10 = True ) _transform ( 'moments' , arg_10 = True , arg_11 = True ) return arg_5

Returns the min and max possible values for x within given constraints


Question: private function to perform a single D - stat test

def Func ( arg_0 , arg_1 , arg_2 = 1 , arg_3 = 1000 , arg_4 = 0 ) : if isinstance ( arg_0 , list ) : arg_5 , arg_6 = _loci_to_arr ( arg_0 , arg_1 , arg_2 ) if arg_5 . shape [ 1 ] == 4 : arg_7 , arg_8 = _get_signif_4 ( arg_5 , arg_3 ) arg_7 = pd . DataFrame ( arg_7 , columns = [ arg_4 ] , index = [ "Dstat" , "bootmean" , "bootstd" , "Z" , "ABBA" , "BABA" , "nloci" ] ) else : arg_7 , arg_8 = _get_signif_5 ( arg_5 , arg_3 ) arg_7 = pd . DataFrame ( arg_7 , index = [ "p3" , "p4" , "shared" ] , columns = [ "Dstat" , "bootmean" , "bootstd" , "Z" , "ABxxA" , "BAxxA" , "nloci" ] ) return arg_7 . T , arg_8

Build a notebook model from database record.


Question: Get the hash of the given file

def Func ( arg_0 , arg_1 ) : arg_2 = getattr ( hashlib , arg_1 ) ( ) with open ( arg_0 . path , "rb" ) as file : arg_3 = file . read ( ) arg_2 . update ( arg_3 ) return arg_2 . hexdigest ( )

This method is called before first step of simulation.


Question: Calls a transition operator with args unpacking args if its a sequence .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 [ arg_4 [ arg_5 ] , arg_5 ] ) -> arg_5 : if isinstance ( arg_2 , ( list , tuple ) ) and not mcmc_util . is_namedtuple_like ( arg_2 ) : arg_2 = arg_2 return arg_0 ( * arg_2 ) else : return arg_0 ( arg_2 )

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


Question: Make an HTTP request with an HTTP object and arguments .

def Func ( arg_0 , arg_1 , arg_2 = 'GET' , arg_3 = None , arg_4 = None , arg_5 = arg_6 . DEFAULT_MAX_REDIRECTS , arg_8 = None ) : arg_9 = getattr ( arg_0 , 'Func' , arg_0 ) return arg_9 ( arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_8 = arg_8 )

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


Question: Return full version nr inc . rc beta etc tags .

def Func ( arg_0 = None ) : arg_1 = arg_0 or __version__ if len ( arg_1 ) == 4 : return '{0}{1}' . format ( short_version ( arg_1 ) , arg_1 [ 3 ] ) return short_version ( arg_1 )


Question: \ Generates a new nickname based on original nickname followed by a random number

def Func ( arg_0 ) : arg_1 = arg_0 . nick arg_0 . nick = '%s_%s' % ( arg_0 . base_nick , random . randint ( 1 , 1000 ) ) arg_0 . logger . warn ( 'Nick %s already taken, trying %s' % ( arg_1 , arg_0 . nick ) ) arg_0 . register_nick ( ) arg_0 . handle_nick_change ( arg_1 , arg_0 . nick )

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


Question: Return a list of parser function objects .

def Func ( arg_0 ) -> List [ 'ParserFunction' ] : arg_1 = arg_0 . _lststr arg_2 = arg_0 . _type_to_spans return [ ParserFunction ( arg_1 , arg_2 , arg_3 , 'ParserFunction' ) for arg_3 in arg_0 . _subspans ( 'ParserFunction' ) ]

Utility method to visualize decision boundaries in R^2.

  Args:
    features: Input points, as a Numpy `array` of shape `[num_examples, 2]`.
    labels: Numpy `float`-like array of shape `[num_examples, 1]` giving a
      label for each point.
    true_w_b: A `tuple` `(w, b)` where `w` is a Numpy array of
       shape `[2]` and `b` is a scalar `float`, interpreted as a
       decision rule of the form `dot(features, w) + b > 0`.
    candidate_w_bs: Python `iterable` containing tuples of the same form as
       true_w_b.
    fname: The filename to save the plot as a PNG image (Python `str`).


Question: Initializes eventlet and starts wait for workers to exit .

def Func ( arg_0 ) : arg_1 = eventlet . GreenPool ( ) arg_2 = arg_0 . serve_rpc ( ) arg_1 . spawn ( arg_2 . wait ) arg_1 . waitall ( )

Generate a header for a tag section with specific parameters.

        :param str newer_tag_name: Name (title) of newer tag.
        :param str newer_tag_link: Tag name of newer tag, used for links.
                               Could be same as **newer_tag_name** or some
                               specific value, like `HEAD`.
        :param datetime newer_tag_time: Date and time when
                                        newer tag was created.
        :param str older_tag_link: Tag name of older tag, used for links.
        :param str project_url: URL for current project.
        :rtype: str
        :return: Generated ready-to-add tag section.


Question: Return list of subaccounts within the account with the passed canvas id .

def Func ( arg_0 , arg_1 , arg_2 = { } ) : arg_3 = ACCOUNTS_API . format ( arg_1 ) + "/sub_accounts" arg_4 = [ ] for arg_5 in arg_0 . _get_paged_resource ( arg_3 , arg_2 = arg_2 ) : arg_4 . append ( CanvasAccount ( data = arg_5 ) ) return arg_4

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


Question: Initializes a map representation of this tag s attributes if not already initialized .

def Func ( arg_0 ) : if not getattr ( arg_0 , 'attrMap' ) : arg_0 . attrMap = { } for ( arg_2 , arg_3 ) in arg_0 . attrs : arg_0 . attrMap [ arg_2 ] = arg_3 return arg_0 . attrMap

Click the right mouse button without modifiers pressed.

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


Question: Prior versions of keyring would search for the config in XDG_DATA_HOME but should probably have been searching for config in XDG_CONFIG_HOME . If the config exists in the former but not in the latter raise a RuntimeError to force the change .

def Func ( ) : arg_0 ( ) [ 'Func' ] = lambda : None arg_1 = os . path . join ( _config_root_Linux ( ) , 'keyringrc.cfg' ) arg_2 = os . path . join ( _data_root_Linux ( ) , 'keyringrc.cfg' ) if os . path . isfile ( arg_2 ) and not os . path . isfile ( arg_1 ) : arg_3 = ( "Keyring config exists only in the old location " "{config_file_old} and should be moved to {config_file_new} " "to work with this version of keyring." ) raise RuntimeError ( arg_3 . format ( ** locals ( ) ) )


Question: Updates the tip based on user cursor movement .

def Func ( arg_0 ) : arg_1 = arg_0 . _text_edit . textCursor ( ) if arg_1 . position ( ) <= arg_0 . _start_position : arg_0 . hide ( ) else : arg_2 , arg_3 = arg_0 . _find_parenthesis ( arg_0 . _start_position + 1 ) if arg_2 != - 1 : arg_0 . hide ( )

Put us back at the beginning of the file again.


Question: Delete a room .

def Func ( arg_0 , arg_1 ) : check_type ( arg_1 , basestring , may_be_none = False ) arg_0 . _session . Func ( API_ENDPOINT + '/' + arg_1 )

Dump a certificate revocation list to a buffer.

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

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


Question: Half - duplex SPI write . The specified array of bytes will be clocked out the MOSI line .

def Func ( arg_0 , arg_1 ) : if ( len ( arg_1 ) > 65536 ) : print ( 'the FTDI chip is limited to 65536 bytes (64 KB) of input/output per command!' ) print ( 'use for loops for larger reads' ) exit ( 1 ) arg_2 = 0x10 | ( arg_0 . lsbfirst << 3 ) | arg_0 . Func_clock_ve logger . debug ( 'SPI Func with command {0:2X}.' . format ( arg_2 ) ) arg_3 = arg_1 [ : len ( arg_1 ) / 2 ] arg_4 = arg_1 [ len ( arg_1 ) / 2 : ] arg_5 = ( len ( arg_3 ) - 1 ) & 0xFF arg_6 = ( ( len ( arg_3 ) - 1 ) >> 8 ) & 0xFF arg_7 = ( len ( arg_4 ) - 1 ) & 0xFF arg_8 = ( ( len ( arg_4 ) - 1 ) >> 8 ) & 0xFF arg_0 . _assert_cs ( ) if len ( arg_3 ) > 0 : arg_0 . _ft232h . _Func ( str ( bytearray ( ( arg_2 , arg_5 , arg_6 ) ) ) ) arg_0 . _ft232h . _Func ( str ( bytearray ( arg_3 ) ) ) if len ( arg_4 ) > 0 : arg_0 . _ft232h . _Func ( str ( bytearray ( ( arg_2 , arg_7 , arg_8 ) ) ) ) arg_0 . _ft232h . _Func ( str ( bytearray ( arg_4 ) ) ) arg_0 . _deassert_cs ( )

Read a config file and set config values accordingly.

        Returns:
            dict: content of config file.


Question: Hook to override default showwarning .

def Func ( arg_0 , arg_1 , arg_2 = "" , arg_3 = - 1 , arg_4 = None , arg_5 = None ) : if arg_4 is None : arg_4 = sys . stderr if arg_4 is None : return arg_6 = "%s: %s\n" % ( arg_1 . __name__ , arg_0 ) try : arg_4 . write ( arg_6 ) except OSError : pass

Give a database cursor and model, check the subjects against
    the subject vocabulary.


Question: Create a hook

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None ) : arg_5 = { 'name' : arg_1 , 'triggers' : arg_2 , 'sources' : arg_4 or [ ] , 'groups' : [ ] , 'actions' : arg_3 } return arg_0 . _post ( request = ApiActions . CREATE . value , uri = ApiUri . HOOKS . value , params = arg_5 )


Question: A tuple consisting of the TLS client certificate and key if they have been provided otherwise None .

def Func ( arg_0 ) : if arg_0 . tls_cert and arg_0 . tls_key : return ( arg_0 . tls_cert , arg_0 . tls_key ) return None

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


Question: Return a list of values between min and max within an interval .

def Func ( arg_0 , arg_1 , arg_2 = 0 , arg_3 = 100 ) : arg_4 = arg_2 arg_5 = [ ] if arg_0 < arg_2 : while arg_4 >= arg_0 : arg_4 -= arg_3 while arg_4 <= arg_1 : if arg_4 >= arg_0 : arg_5 . append ( arg_4 ) arg_4 += arg_3 return arg_5

Returns protobuf mapcontainer. Read from translation file.


Question: Create a tuning job

def Func ( arg_0 , arg_1 , arg_2 = True , arg_3 = 30 , arg_4 = None ) : arg_0 . check_tuning_config ( arg_1 ) arg_5 = arg_0 . get_conn ( ) . create_hyper_parameter_tuning_job ( ** arg_1 ) if arg_2 : arg_0 . check_status ( arg_1 [ 'HyperParameterTuningJobName' ] , 'HyperParameterTuningJobStatus' , arg_0 . describe_tuning_job , arg_3 , arg_4 ) return arg_5

Return HgResource object for path.

        See DAVProvider.get_resource_inst()


Question: Create a command class with the given optional prerelease class .

def Func ( arg_0 = None , arg_1 = None , arg_2 = None ) : arg_3 = [ arg_0 ] if arg_0 else [ ] if arg_1 or arg_2 : arg_3 . append ( 'handle_files' ) arg_4 = functools . partial ( _wrap_command , arg_3 ) arg_5 = _get_file_handler ( arg_1 , arg_2 ) if 'bdist_egg' in sys . argv : arg_6 = arg_4 ( bdist_egg , strict = True ) else : arg_6 = bdist_egg_disabled arg_7 = dict ( build_py = arg_4 ( build_py , strict = is_repo ) , bdist_egg = arg_6 , sdist = arg_4 ( sdist , strict = True ) , arg_5 = arg_5 , ) if bdist_wheel : arg_7 [ 'bdist_wheel' ] = arg_4 ( bdist_wheel , strict = True ) arg_7 [ 'develop' ] = arg_4 ( develop , strict = True ) return arg_7

Simple and fast implementation of the covariance AR estimate

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

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

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

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

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

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

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

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

    :References: Mathworks


Question: Count occurrences of values AND return it as a string .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . conn . cursor ( ) arg_3 . execute ( 'SELECT {column}, count(*) ' 'FROM {table} GROUP BY {column} ' 'ORDER BY {column}' . format ( arg_2 = arg_2 , arg_1 = arg_1 ) ) return ' ' . join ( '%s:%s' % ( arg_4 , arg_5 ) for arg_4 , arg_5 in arg_3 )

Serial command to set seasons table.

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

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

        Returns:
            bool: True on completion and ACK.


Question: Comprehensively adds a new logging level to the logging module and the currently configured logging class .

def Func ( arg_0 , arg_1 , arg_2 = None ) : if not arg_2 : arg_2 = arg_0 . lower ( ) if hasattr ( logging , arg_0 ) : raise AttributeError ( '{} already defined in logging module' . format ( arg_0 ) ) if hasattr ( logging , arg_2 ) : raise AttributeError ( '{} already defined in logging module' . format ( arg_2 ) ) if hasattr ( logging . getLoggerClass ( ) , arg_2 ) : raise AttributeError ( '{} already defined in logger class' . format ( arg_2 ) ) def logForLevel ( arg_3 , arg_4 , * arg_5 , ** arg_6 ) : if arg_3 . isEnabledFor ( arg_1 ) : arg_3 . _log ( arg_1 , arg_4 , arg_5 , ** arg_6 ) def logToRoot ( arg_4 , * arg_5 , ** arg_6 ) : logging . log ( arg_1 , arg_4 , * arg_5 , ** arg_6 ) logging . addLevelName ( arg_1 , arg_0 ) setattr ( logging , arg_0 , arg_1 ) setattr ( logging . getLoggerClass ( ) , arg_2 , logForLevel ) setattr ( logging , arg_2 , logToRoot )

expression_terminal = identifier
                           | terminal
                           | option_group
                           | repetition_group
                           | grouping_group
                           | special_handling ;


Question: Updates the profile s auth entry with values set by the user . This will overwrite existing values .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . __class__ . __name__ . lower ( ) arg_3 = arg_0 . profile + "_" + arg_2 if isinstance ( arg_0 . _auth , ( MutableSequence , tuple ) ) : arg_1 . pwd [ arg_3 ] = " :: " . join ( arg_0 . _auth ) else : arg_1 . pwd [ arg_3 ] = arg_0 . _auth

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


Question: Convert an AST alternate op to python source code .

def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = OP_ALTERNATE arg_4 = arg_0 . _hoist_operands ( arg_1 . operands , lambda t : isinstance ( t , OptreeNode ) and t . opnode . operator is arg_3 ) arg_5 = [ "alternation([" ] for arg_6 in arg_4 : arg_5 . extend ( arg_0 . _indent ( arg_0 . _ast_to_code ( arg_6 ) ) ) arg_5 [ - 1 ] += "," arg_5 . append ( "])" ) return arg_5

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


Question: Evaluate a PEP 426 environment marker using markerlib . Return a boolean indicating the marker result in this environment . Raise SyntaxError if marker is invalid .

def Func ( arg_0 , arg_1 ) : from pip . _vendor import _markerlib arg_2 = _markerlib . default_environment ( ) for arg_3 in arg_2 . keys ( ) : arg_4 = arg_3 . replace ( '.' , '_' ) arg_2 [ arg_4 ] = arg_2 . pop ( arg_3 ) try : arg_5 = _markerlib . interpret ( arg_1 , arg_2 ) except NameError as e : raise SyntaxError ( e . args [ 0 ] ) return arg_5

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


Question: Make a new project using recursion and alias resolution .

def Func ( * arg_0 , arg_1 = None ) : arg_2 . ROOT_FILE = arg_1 arg_4 = merge . merge ( merge . DEFAULT_PROJECT , * arg_0 ) arg_5 = arg_4 . get ( 'path' , '' ) if arg_1 : arg_6 = os . path . dirname ( arg_1 ) if arg_5 : arg_5 += ':' + arg_6 else : arg_5 = arg_6 with arg_2 . extender ( arg_5 ) : arg_4 = recurse . recurse ( arg_4 ) Func = construct . construct ( ** arg_4 ) Func . desc = arg_4 return Func

The factory method to create WebDriverResult from JSON Object.

        Args:
            obj(dict): The JSON Object returned by server.


Question: Return normalized Hamming similarity between Eudex hashes of two terms .

def Func ( arg_0 , arg_1 , arg_2 = 'exponential' , arg_3 = 8 ) : return Eudex ( ) . sim ( arg_0 , arg_1 , arg_2 , arg_3 )

Cycles through notifications with latest results from data feeds.


Question: Returns a dictionary where the keys are the feature names and the values are the number of studies tagged with the feature .

def Func ( arg_0 , arg_1 = 0.001 ) : arg_2 = np . sum ( arg_0 . get_feature_data ( ) >= arg_1 , 0 ) return dict ( zip ( arg_0 . get_feature_names ( ) , list ( arg_2 ) ) )

Dumps a database table into a tab-delimited file


Question: Calculate dendrite segment activity using the current active cells .

def Func ( arg_0 , arg_1 = True ) : ( arg_2 , arg_3 ) = arg_0 . connections . computeActivity ( arg_0 . activeCells , arg_0 . connectedPermanence ) arg_4 = ( arg_0 . connections . segmentForFlatIdx ( i ) for i in xrange ( len ( arg_2 ) ) if arg_2 [ i ] >= arg_0 . activationThreshold ) arg_5 = ( arg_0 . connections . segmentForFlatIdx ( i ) for i in xrange ( len ( arg_3 ) ) if arg_3 [ i ] >= arg_0 . minThreshold ) arg_0 . activeSegments = sorted ( arg_4 , key = arg_0 . connections . segmentPositionSortKey ) arg_0 . matchingSegments = sorted ( arg_5 , key = arg_0 . connections . segmentPositionSortKey ) arg_0 . numActiveConnectedSynapsesForSegment = arg_2 arg_0 . numActivePotentialSynapsesForSegment = arg_3 if arg_1 : for arg_8 in arg_0 . activeSegments : arg_0 . lastUsedIterationForSegment [ arg_8 . flatIdx ] = arg_0 . iteration arg_0 . iteration += 1

Build a mongo query across multiple cases.
        Translate query options from a form into a complete mongo query dictionary.

        Beware that unindexed queries against a large variant collection will
        be extremely slow.

        Currently indexed query options:
            hgnc_symbols
            rank_score
            variant_type
            category

        Args:
            query(dict): A query dictionary for the database, from a query form.
            category(str): 'snv', 'sv', 'str' or 'cancer'
            variant_type(str): 'clinical' or 'research'

        Returns:
            mongo_query : A dictionary in the mongo query format.


Question: Add a heart to a service collection

def Func ( arg_0 ) : arg_1 = makeService ( ) if arg_1 is None : return arg_1 . setName ( 'heart' ) arg_1 . setServiceParent ( arg_0 )


Question: Lazily load a callable .

def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 , arg_4 = arg_1 . partition ( ',' ) arg_5 = importlib . import_module ( arg_2 ) if arg_4 == "" : arg_3 , arg_6 = annotate . context_from_module ( arg_5 ) return arg_6 if hasattr ( arg_5 , arg_4 ) : return getattr ( arg_5 , arg_4 ) raise ArgumentError ( "Attempted to import nonexistent object from module" , arg_2 = arg_2 , object = arg_4 )

Removes the video from youtube and from db
    Requires POST


Question: Creates a preprocessing stack from a specification dict .

def Func ( arg_0 , arg_1 = None ) : if isinstance ( arg_0 , dict ) : arg_0 = [ arg_0 ] arg_2 = PreprocessorStack ( ) for arg_3 in arg_0 : arg_4 = copy . deepcopy ( arg_1 ) arg_5 = util . get_object ( obj = arg_3 , predefined_objects = tensorforce . core . preprocessors . preprocessors , arg_1 = arg_4 ) assert isinstance ( arg_5 , Preprocessor ) arg_2 . preprocessors . append ( arg_5 ) return arg_2

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


Question: Jumps short if not overflow .

def Func ( arg_0 , arg_1 ) : arg_0 . PC = Operators . ITEBV ( arg_0 . address_bit_size , False == arg_0 . OF , arg_1 . read ( ) , arg_0 . PC )

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

    :param graph: BELGraph
    :return: dictionary with matrices


Question: Return a new individual crossing self and other .

def Func ( arg_0 , arg_1 ) : arg_2 = random . randrange ( len ( arg_0 . genes ) ) return arg_0 . __class__ ( arg_0 . genes [ : arg_2 ] + arg_1 . genes [ arg_2 : ] )

Unsubscribe to the passed pair's OHLC data channel.

        :param timeframe: str, {1m, 5m, 15m, 30m, 1h, 3h, 6h, 12h,
                                1D, 7D, 14D, 1M}
        :param kwargs:
        :return:


Question: Determine the Fitch profile for a single character of the node s sequence . The profile is essentially the intersection between the children s profiles or if the former is empty the union of the profiles .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . _fitch_intersect ( [ k . state [ arg_2 ] for k in arg_1 . clades ] ) if len ( arg_3 ) == 0 : arg_3 = np . concatenate ( [ k . state [ arg_2 ] for k in arg_1 . clades ] ) return arg_3

Return local folder path of header files.


Question: Command line interface for YOURLS .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : if arg_1 is None : raise Funcck . UsageError ( "apiurl missing. See 'yourls --help'" ) arg_5 = dict ( arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 ) try : arg_0 . obj = YOURLSClient ( arg_1 = arg_1 , ** arg_5 ) except TypeError : raise Funcck . UsageError ( "authentication paremeters overspecified. " "See 'yourls --help'" )


Question: run the update command

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : Log . debug ( "Update Args: %s" , arg_2 ) arg_4 = jars . packing_jars ( ) arg_5 = "update topology%s" % ( ' in dry-Func mode' if arg_2 [ "dry_Func" ] else '' ) arg_6 = { } try : arg_6 = build_extra_args_dict ( arg_2 ) except Exception as err : return SimpleResult ( Status . InvocationError , err . message ) if arg_2 [ 'deploy_mode' ] == config . SERVER_MODE : return cli_helper . Func_server ( arg_0 , arg_2 , arg_5 , arg_6 ) else : arg_7 = convert_args_dict_to_list ( arg_6 ) return cli_helper . Func_direct ( arg_0 , arg_2 , arg_5 , arg_7 , arg_4 )

Due to verilog restrictions it is not posible to use array constants
        and rom memories has to be hardcoded as process


Question: Similar to validate but validates multiple objects at once each with their own specification . Fill objects that were specified but not provided with NotPassed or default values Apply value_condition to object dictionary as a whole

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 ) : arg_7 = builtins . dict ( ) arg_8 = set ( arg_0 . keys ( ) ) - set ( arg_1 . keys ( ) ) if arg_8 : if not arg_5 : raise ValueError ( ( 'Arguments {} were passed but not specified (use ' + '`allow_unknowns=True` to avoid this error)' . format ( arg_8 ) ) ) else : for arg_9 in arg_8 : if arg_6 is not None : arg_1 [ arg_9 ] = arg_6 if arg_3 : validate ( arg_0 , Dict ( arg_3 = arg_3 ) ) for arg_9 in arg_1 : if ( not arg_9 in arg_0 ) or NotPassed ( arg_0 [ arg_9 ] ) : if arg_9 in arg_2 : if isinstance ( arg_2 [ arg_9 ] , DefaultGenerator ) : arg_7 [ arg_9 ] = arg_2 [ arg_9 ] ( ) else : arg_7 [ arg_9 ] = arg_2 [ arg_9 ] else : arg_7 [ arg_9 ] = NotPassed else : arg_7 [ arg_9 ] = validate ( arg_0 [ arg_9 ] , arg_1 [ arg_9 ] ) if arg_4 : arg_7 = validate ( arg_7 , arg_4 ) return arg_7

Send a completion status call to Degreed using the client.

        Args:
            payload: The learner completion data payload to send to Degreed


Question: Stops all the running channels for this kernel .

def Func ( arg_0 ) : if arg_0 . shell_channel . is_alive ( ) : arg_0 . shell_channel . stop ( ) if arg_0 . sub_channel . is_alive ( ) : arg_0 . sub_channel . stop ( ) if arg_0 . stdin_channel . is_alive ( ) : arg_0 . stdin_channel . stop ( ) if arg_0 . hb_channel . is_alive ( ) : arg_0 . hb_channel . stop ( )

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: Connects this task to the indicating outgoing task with the details in the sequence flow . A subclass can override this method to get extra information from the node .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_0 . task . Func ( arg_1 , arg_3 . get ( 'id' ) , arg_3 . get ( 'name' , None ) , arg_0 . parser . _parse_documentation ( arg_3 , task_parser = arg_0 ) )

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

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


Question: Perform the App s actions as configured

def Func ( arg_0 ) : super ( JupyterTensorboardApp , arg_0 ) . Func ( ) arg_1 = ", " . join ( sorted ( arg_0 . subcommands ) ) sys . exit ( "Please supply at least one subcommand: %s" % arg_1 )

Get the reason of this revocation.

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

        .. seealso::

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


Question: Create an item from the local file in the Midas Server folder corresponding to the parent folder id .

def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_3 = os . path . basename ( arg_0 ) arg_4 = None if arg_2 : arg_5 = session . communicator . folder_children ( session . token , arg_1 ) arg_6 = arg_5 [ 'items' ] for arg_7 in arg_6 : if arg_7 [ 'name' ] == arg_3 : arg_4 = arg_7 [ 'item_id' ] break if arg_4 is None : arg_8 = session . communicator . create_item ( session . token , arg_3 , arg_1 ) arg_4 = arg_8 [ 'item_id' ] return arg_4

Whether a connection can be established between those two meshes.


Question: Return an instance of a backend from its class .

def Func ( arg_0 , arg_1 ) : try : arg_2 = arg_1 ( provider = arg_0 ) except Exception as err : raise QiskitError ( 'Backend %s could not be instantiated: %s' % ( arg_1 , err ) ) return arg_2

Put us back at the beginning of the file again.


Question: Convert a list of nodes in postfix order to an Optree .

def Func ( arg_0 ) : while len ( arg_0 ) > 1 : arg_0 = _reduce ( arg_0 ) if len ( arg_0 ) == 0 : raise OperatorError ( "Empty node list" ) arg_1 = arg_0 [ 0 ] if isinstance ( arg_1 , OperatorNode ) : raise OperatorError ( "Operator without operands" ) if isinstance ( arg_1 , OptreeNode ) : return arg_1 return OptreeNode ( None , ( arg_1 , ) )

Initialize configuration.

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