Question: Convenience method to wait for value attribute of given element to change .

def Func ( arg_0 , arg_1 = 10 ) : arg_2 = AXCallbacks . returnElemCallback arg_3 = None return arg_0 . waitFor ( arg_1 , 'AXValueChanged' , arg_2 = arg_2 , args = ( arg_3 , ) )

Deserialize a dataframe.

    Parameters
    ----------
    reader : file
        File-like object to read from. Must be opened in binary mode.
    data_type_id : dict
        Serialization format of the raw data.
        See the azureml.DataTypeIds class for constants.

    Returns
    -------
    pandas.DataFrame
        Dataframe object.


Question: Return a list with matching project arguments .

def Func ( ** arg_0 ) : try : arg_1 = _pybossa_req ( 'get' , 'project' , params = arg_0 ) if type ( arg_1 ) . __name__ == 'list' : return [ Project ( arg_2 ) for arg_2 in arg_1 ] else : return arg_1 except : raise

APEv2 tag value factory.

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


Question: REST Conference Mute helper

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

Reads the current "best model" for the job and returns whether or not the
    current model is better than the "best model" stored for the job

    Returns: (isBetter, storedBest, origResultsStr)

    isBetter:
      True if the current model is better than the stored "best model"
    storedResults:
      A dict of the currently stored results in the jobs table record
    origResultsStr:
      The json-encoded string that currently resides in the "results" field
      of the jobs record (used to create atomicity)


Question: Checks if a table exists in Cassandra

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . keyspace if '.' in arg_1 : arg_2 , arg_1 = arg_1 . split ( '.' , 1 ) arg_3 = arg_0 . get_conn ( ) . cluster . metadata return ( arg_2 in arg_3 . keyspaces and arg_1 in arg_3 . keyspaces [ arg_2 ] . tables )

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: Destroy the SQLStepQueue tables in the database

def Func ( arg_0 ) : with arg_0 . _db_conn ( ) as conn : for arg_1 in arg_0 . _tables : conn . execute ( 'DROP TABLE IF EXISTS %s' % arg_1 ) return arg_0

Parse a Supybot IRC log file.

        The method parses the Supybot IRC log file and returns an iterator of
        dictionaries. Each one of this, contains a message from the file.

        :param filepath: path to the IRC log file

        :returns: a generator of parsed messages

        :raises ParseError: raised when the format of the Supybot log file
            is invalid
        :raises OSError: raised when an error occurs reading the
            given file


Question: Create message content and properties to list all queues with QMFv2

def Func ( arg_0 ) : arg_1 = { "_what" : "OBJECT" , "_schema_id" : { "_class_name" : "queue" } } logger . debug ( "Message content -> {0}" . format ( arg_1 ) ) return arg_1 , arg_0 . query_properties

Register a file reader for use in parse_config_file.

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

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

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

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

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


Question: 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 .

def Func ( arg_0 ) : arg_1 = os . path . join ( arg_0 . temp_path , GDOCS_TRANS_CSV ) arg_2 = os . path . join ( arg_0 . temp_path , GDOCS_META_CSV ) arg_3 = os . path . join ( arg_0 . temp_path , LOCAL_TRANS_CSV ) arg_4 = os . path . join ( arg_0 . temp_path , LOCAL_META_CSV ) try : arg_5 = arg_0 . _download_csv_from_gdocs ( arg_1 , arg_2 ) except PODocsError as e : if 'Sheet 1 not found' in str ( e ) or 'Conversion failed unexpectedly' in str ( e ) : arg_0 . upload ( ) else : raise PODocsError ( e ) else : arg_0 . _merge_local_and_gdoc ( arg_5 , arg_3 , arg_4 , arg_1 , arg_2 ) try : csv_to_po ( arg_3 , arg_4 , arg_0 . locale_root , arg_0 . po_files_path , arg_0 . header ) except IOError as e : raise PODocsError ( e ) arg_0 . _clear_temp ( )

Extracts the wildcards and file replacements from the `trajectory`


Question: Configure the Python logging module for this file .

def Func ( arg_0 ) : arg_1 = logging . FileHandler ( arg_0 . path , delay = True ) if arg_0 . _format : arg_1 . setFormatter ( logging . Formatter ( arg_0 . _format ) ) if type ( arg_0 . _formatter ) == str : if arg_0 . _env and arg_0 . _env . config . logging . dict_config . formatters [ arg_0 . _formatter ] : arg_2 = arg_0 . _env . config . logging . dict_config . formatters [ arg_0 . _formatter ] . to_dict ( ) arg_1 . setFormatter ( logging . Formatter ( ** arg_2 ) ) elif type ( arg_0 . _formatter ) == dict : arg_1 . setFormatter ( logging . Formatter ( ** arg_0 . _formatter ) ) if len ( arg_0 . _loggers ) : for arg_3 in arg_0 . _loggers : logging . getLogger ( arg_3 ) . addHandler ( arg_1 ) else : logging . getLogger ( ) . addHandler ( arg_1 )


Question: Draw the Y axis labels

def Func ( arg_0 ) : if not arg_0 . show_y_labels : return arg_1 = arg_0 . get_y_labels ( ) arg_2 = len ( arg_1 ) arg_1 = enumerate ( iter ( arg_1 ) ) arg_3 = int ( not arg_0 . step_include_first_y_label ) arg_1 = itertools . islice ( arg_1 , arg_3 , None , arg_0 . step_y_labels ) list ( map ( arg_0 . draw_y_label , arg_1 ) ) arg_0 . draw_y_guidelines ( arg_0 . field_height ( ) , arg_2 )

Modify an existing lock's timeout.

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


Question: Set only the Fan power .

def Func ( arg_0 , arg_1 ) : if arg_1 > 255 : raise ValueError ( "The fan power should be a single byte (0-255)." ) arg_2 = arg_0 . cnxn . xfer ( [ 0x42 ] ) [ 0 ] sleep ( 10e-3 ) arg_3 = arg_0 . cnxn . xfer ( [ 0x00 ] ) [ 0 ] arg_4 = arg_0 . cnxn . xfer ( [ arg_1 ] ) [ 0 ] sleep ( 0.1 ) return True if arg_2 == 0xF3 and arg_3 == 0x42 and arg_4 == 0x00 else False

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


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

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = False ) : arg_4 = File ( arg_1 ) if arg_2 : arg_5 = Patch ( arg_2 ) else : arg_5 = arg_0 . db . top_patch ( ) if not arg_5 : raise NoAppliedPatch ( arg_0 . db ) arg_6 = arg_0 . _file_in_patch ( arg_1 , arg_5 , arg_3 ) if arg_6 : return arg_0 . _file_in_next_patches ( arg_1 , arg_5 ) if arg_4 . is_link ( ) : raise QuiltError ( "Cannot add symbolic link %s" % arg_1 ) arg_0 . _backup_file ( arg_4 , arg_5 ) if arg_4 . exists ( ) : os . chmod ( arg_1 , arg_4 . get_mode ( ) | stat . S_IWUSR | stat . S_IRUSR ) arg_0 . file_added ( arg_4 , arg_5 )

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


Question: Instantiate a GTFS object by computing

def Func ( arg_0 , arg_1 ) : from gtfspy . import_gtfs import import_gtfs arg_2 = sqlite3 . connect ( ":memory:" ) import_gtfs ( arg_1 , arg_2 , preserve_connection = True , print_progress = False ) return arg_0 ( arg_2 )

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


Question: rebuild the _dict index

def Func ( arg_0 ) : arg_0 . _dict = { v . id : k for k , v in enumerate ( arg_0 ) }

Try to convert a tar file containing a sequence of frames saved by the
    meshcat viewer into a single video file.

    This relies on having `ffmpeg` installed on your system.


Question: Inserts a point on the path at the mouse location . We first need to check if the mouse location is on the path . Inserting point is time intensive and experimental .

def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_3 = _ctx . ximport ( "bezier" ) except : from nodebox . graphics import arg_3 arg_4 = 100 arg_5 = None arg_6 = float ( "inf" ) arg_7 = float ( "inf" ) for arg_8 in range ( arg_4 ) : arg_9 = float ( arg_8 ) / arg_4 arg_10 = arg_0 . path . point ( arg_9 ) arg_11 = abs ( arg_10 . x - arg_1 ) arg_12 = abs ( arg_10 . y - arg_2 ) if arg_11 + arg_12 <= arg_6 + arg_7 : arg_6 = arg_11 arg_7 = arg_12 arg_5 = arg_9 arg_13 = [ 3 , 4 ] for arg_14 in arg_13 : arg_14 = 1.0 / pow ( 10 , arg_14 ) for arg_8 in range ( 20 ) : arg_9 = arg_5 - arg_14 + float ( arg_8 ) * arg_14 * 0.1 if arg_9 < 0.0 : arg_9 = 1.0 + arg_9 if arg_9 > 1.0 : arg_9 = arg_9 - 1.0 arg_10 = arg_0 . path . point ( arg_9 ) arg_11 = abs ( arg_10 . x - arg_1 ) arg_12 = abs ( arg_10 . y - arg_2 ) if arg_11 <= arg_6 and arg_12 <= arg_7 : arg_6 = arg_11 arg_7 = arg_12 arg_15 = arg_9 arg_5 = arg_15 arg_16 = arg_3 . Func ( arg_0 . path , arg_15 ) arg_8 , arg_9 , arg_10 = arg_3 . _locate ( arg_0 . path , arg_15 ) arg_8 += 1 arg_10 = PathElement ( ) arg_10 . cmd = arg_16 [ arg_8 ] . cmd arg_10 . x = arg_16 [ arg_8 ] . x arg_10 . y = arg_16 [ arg_8 ] . y arg_10 . ctrl1 = Point ( arg_16 [ arg_8 ] . ctrl1 . x , arg_16 [ arg_8 ] . ctrl1 . y ) arg_10 . ctrl2 = Point ( arg_16 [ arg_8 ] . ctrl2 . x , arg_16 [ arg_8 ] . ctrl2 . y ) arg_10 . freehand = False arg_0 . _points . insert ( arg_8 , arg_10 ) arg_0 . _points [ arg_8 - 1 ] . ctrl1 = Point ( arg_16 [ arg_8 - 1 ] . ctrl1 . x , arg_16 [ arg_8 - 1 ] . ctrl1 . y ) arg_0 . _points [ arg_8 + 1 ] . ctrl1 = Point ( arg_16 [ arg_8 + 1 ] . ctrl1 . x , arg_16 [ arg_8 + 1 ] . ctrl1 . y ) arg_0 . _points [ arg_8 + 1 ] . ctrl2 = Point ( arg_16 [ arg_8 + 1 ] . ctrl2 . x , arg_16 [ arg_8 + 1 ] . ctrl2 . y )

Main executor of the trimmomatic_report template.

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


Question: Validate that at least one of the user identifier fields has been passed in .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . get ( 'lms_user_id' ) arg_3 = arg_1 . get ( 'tpa_user_id' ) arg_4 = arg_1 . get ( 'user_email' ) if not arg_2 and not arg_3 and not arg_4 : raise serializers . ValidationError ( 'At least one of the following fields must be specified and map to an EnterpriseCustomerUser: ' 'lms_user_id, tpa_user_id, user_email' ) return arg_1

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


Question: Generate a default timescale legend . No arguments .

def Func ( arg_0 , arg_1 ) : arg_2 = { 'isc' : TIMESCALE__ISC , 'usgs_isc' : TIMESCALE__USGS_ISC , 'dnag' : TIMESCALE__DNAG , } return arg_0 . from_csv ( text = arg_2 [ arg_1 . lower ( ) ] )


Question: Helper method to get a value from the config

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = False , arg_5 = None ) : try : if arg_4 : return arg_0 . config . getboolean ( arg_1 [ 0 ] , arg_1 [ 1 ] ) arg_6 = arg_0 . config . get ( arg_1 [ 0 ] , arg_1 [ 1 ] ) if arg_3 is not None : arg_6 = arg_6 . split ( arg_3 ) if arg_2 is not None : return arg_2 ( arg_6 ) return arg_6 except ( KeyError , configparser . NoSectionError , configparser . NoOptionError ) as e : if arg_5 is not None : return arg_5 raise KeyError ( e )

Register a file reader for use in parse_config_file.

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

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

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

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

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


Question: Serial call to set LCD using meter object bufer .

def Func ( arg_0 , arg_1 = "00000000" ) : arg_2 = False arg_0 . setContext ( "Func" ) try : arg_0 . clearCmdMsg ( ) if len ( arg_1 ) != 8 : arg_0 . writeCmdMsg ( "Invalid password length." ) arg_0 . setContext ( "" ) return arg_2 if not arg_0 . request ( ) : arg_0 . writeCmdMsg ( "Bad read CRC on setting" ) else : if not arg_0 . serialCmdPwdAuth ( arg_1 ) : arg_0 . writeCmdMsg ( "Password failure" ) else : arg_3 = "" arg_4 = 40 - len ( arg_0 . m_lcd_items ) for arg_5 in arg_0 . m_lcd_items : arg_6 = binascii . hexlify ( str ( arg_5 ) . zfill ( 2 ) ) arg_3 += arg_6 for arg_7 in range ( 0 , arg_4 ) : arg_6 = binascii . hexlify ( str ( 0 ) . zfill ( 2 ) ) arg_3 += arg_6 arg_8 = "015731023030443228" + arg_3 + "2903" arg_8 += arg_0 . calc_crc16 ( arg_8 [ 2 : ] . decode ( "hex" ) ) arg_0 . m_serial_port . write ( arg_8 . decode ( "hex" ) ) if arg_0 . m_serial_port . getResponse ( arg_0 . getContext ( ) ) . encode ( "hex" ) == "06" : arg_0 . writeCmdMsg ( "Success: 06 returned." ) arg_2 = True arg_0 . serialPostEnd ( ) except : ekm_log ( traceback . format_exc ( sys . exc_info ( ) ) ) arg_0 . setContext ( "" ) return arg_2

scan through the java output text and extract the bad java messages that may or may not happened when
    unit tests are run.  It will not record any bad java messages that are stored in g_ok_java_messages.

    :return: none


Question: Creates a overview of the hosts per range .

def Func ( ) : arg_0 = RangeSearch ( ) arg_1 = arg_0 . get_ranges ( ) if arg_1 : arg_2 = [ ] arg_3 = { } for arg_4 in arg_1 : arg_2 . append ( { 'mask' : arg_4 . range } ) arg_3 [ arg_4 . range ] = arg_4 . tags arg_6 = Host . search ( ) arg_6 = arg_6 . filter ( 'term' , status = 'up' ) arg_6 . aggs . bucket ( 'hosts' , 'ip_range' , field = 'address' , arg_1 = arg_2 ) arg_7 = arg_6 . execute ( ) print_line ( "{0:<18} {1:<6} {2}" . format ( "Range" , "Count" , "Tags" ) ) print_line ( "-" * 60 ) for arg_8 in arg_7 . aggregations . hosts . buckets : print_line ( "{0:<18} {1:<6} {2}" . format ( arg_8 . key , arg_8 . doc_count , arg_3 [ arg_8 . key ] ) ) else : print_error ( "No ranges defined." )

Flush the write buffers of the stream.

        This results in writing the current contents of the write buffer to
        the transport layer, initiating the HTTP/1.1 response. This initiates
        a streaming response. If the `Content-Length` header is not given
        then the chunked `Transfer-Encoding` is applied.


Question: get span distance for each locus in original seqarray

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


Question: Helper function to get component argument . Raises exception if argument is missing . Returns the component argument .

def Func ( arg_0 ) : try : arg_1 = arg_0 . get_argument ( constants . PARAM_COMPONENT ) return arg_1 except tornado . web . MissingArgumentError as e : raise Exception ( e . log_message )


Question: Parse a content type like header .

def Func ( arg_0 , arg_1 = True ) : arg_2 = _remove_comments ( arg_0 ) . split ( ';' ) arg_0 , arg_3 = arg_2 . pop ( 0 ) . split ( '/' ) if '+' in arg_3 : arg_3 , arg_4 = arg_3 . split ( '+' ) else : arg_4 = None arg_5 = _parse_parameter_list ( arg_2 , arg_1 = arg_1 ) return datastructures . ContentType ( arg_0 , arg_3 , dict ( arg_5 ) , arg_4 )

Construct or retrieve a semaphore with the given name

    If value is None, try to retrieve an existing named semaphore.
    Else create a new semaphore with the given value


Question: Adds a new source to the computation DAG

def Func ( arg_0 , arg_1 ) : arg_2 = None if callable ( arg_1 ) : arg_2 = SupplierStreamlet ( arg_1 ) elif isinstance ( arg_1 , Generator ) : arg_2 = GeneratorStreamlet ( arg_1 ) else : raise RuntimeError ( "Builder's new source has to be either a Generator or a function" ) arg_0 . _sources . append ( arg_2 ) return arg_2

Return user friendly help on program options.


Question: make the global evaluation report

def Func ( arg_0 ) : arg_1 = config . load_results ( arg_0 . file_state . base_name ) if arg_0 . stats [ "statement" ] == 0 : return arg_2 = arg_0 . config . evaluation try : arg_3 = eval ( arg_2 , { } , arg_0 . stats ) except Exception as ex : arg_4 = "An exception occurred while rating: %s" % ex else : arg_0 . stats [ "global_note" ] = arg_3 arg_4 = "Your code has been rated at %.2f/10" % arg_3 arg_6 = arg_1 . get ( "global_note" ) if arg_6 is not None : arg_4 += " (previous run: %.2f/10, %+.2f)" % ( arg_6 , arg_3 - arg_6 ) if arg_0 . config . score : arg_7 = report_nodes . EvaluationSection ( arg_4 ) arg_0 . reporter . display_reports ( arg_7 )


Question: An edge weight map indexed by node id s . A dictionary indexed by node id1 s in which each value is a dictionary of connected node id2 s linking to the edge weight . If directed edges go from id1 to id2 but not the other way . If stochastic all the weights for the neighbors of a given node sum to 1 . A heuristic can be a function that takes two node id s and returns and additional cost for movement between the two nodes .

def Func ( arg_0 , arg_1 = False , arg_2 = False , arg_3 = False , arg_4 = None ) : arg_5 = { } for arg_6 in arg_0 . nodes : arg_5 [ arg_6 . id ] = { } for arg_8 in arg_0 . edges : arg_9 = arg_8 . node1 . id arg_10 = arg_8 . node2 . id if arg_2 : arg_9 , arg_10 = arg_10 , arg_9 arg_5 [ arg_9 ] [ arg_10 ] = 1.0 - arg_8 . weight * 0.5 if arg_4 : arg_5 [ arg_9 ] [ arg_10 ] += arg_4 ( arg_9 , arg_10 ) if not arg_1 : arg_5 [ arg_10 ] [ arg_9 ] = arg_5 [ arg_9 ] [ arg_10 ] if arg_3 : for arg_9 in arg_5 : arg_11 = sum ( arg_5 [ arg_9 ] . values ( ) ) for arg_10 in arg_5 [ arg_9 ] : arg_5 [ arg_9 ] [ arg_10 ] /= arg_11 return arg_5

Upload all po files to GDocs ignoring conflicts.
        This method looks for all msgids in po_files and sends them
        as ods to GDocs Spreadsheet.


Question: Decode Erlang external term .

def Func ( arg_0 ) : if not arg_0 : raise IncompleteData ( arg_0 ) if arg_0 [ 0 ] != 131 : raise ValueError ( "unknown protocol version: %r" % arg_0 [ 0 ] ) if arg_0 [ 1 : 2 ] == b'P' : if len ( arg_0 ) < 16 : raise IncompleteData ( arg_0 ) arg_1 = decompressobj ( ) arg_2 = arg_1 . decompress ( arg_0 [ 6 : ] ) + arg_1 . flush ( ) arg_3 , = _int4_unpack ( arg_0 [ 2 : 6 ] ) if len ( arg_2 ) != arg_3 : raise ValueError ( "invalid compressed tag, " "%d bytes but got %d" % ( arg_3 , len ( arg_2 ) ) ) arg_4 , arg_5 = Func_term ( arg_2 ) return arg_4 , arg_1 . unused_data return Func_term ( arg_0 [ 1 : ] )

Returns a DataFrame of offensive team splits for a season.

        :year: int representing the season.
        :returns: Pandas DataFrame of split data.


Question: r This function handles the retrieval of a chemical s octanol - water partition coefficient . Lookup is based on CASRNs . Will automatically select a data source to use if no Method is provided ; returns None if the data is not available .

def Func ( arg_0 , arg_1 = False , arg_2 = None ) : def list_methods ( ) : arg_3 = [ ] if arg_0 in CRCFuncDict . index : arg_3 . append ( CRC ) if arg_0 in SyrresDict2 . index : arg_3 . append ( SYRRES ) arg_3 . append ( NONE ) return arg_3 if arg_1 : return list_methods ( ) if not arg_2 : arg_2 = list_methods ( ) [ 0 ] if arg_2 == CRC : return float ( CRCFuncDict . at [ arg_0 , 'Func' ] ) elif arg_2 == SYRRES : return float ( SyrresDict2 . at [ arg_0 , 'Func' ] ) elif arg_2 == NONE : return None else : raise Exception ( 'Failure in in function' )

calls `map` to shift the recover execution to flat_map_nvim_io


Question: Checks workflow status .

def Func ( arg_0 , arg_1 ) : arg_0 . logger . debug ( 'Get Func of workflow: ' + arg_1 ) arg_2 = '%(wf_url)s/%(wf_id)s' % { 'wf_url' : arg_0 . workflows_url , 'wf_id' : arg_1 } arg_3 = arg_0 . gbdx_connection . get ( arg_2 ) arg_3 . raise_for_Func ( ) return arg_3 . json ( ) [ 'state' ]

Deletes the specified file from the given S3 bucket.


Question: Convert an Open511 XML document or document fragment to JSON .

def Func ( arg_0 ) : arg_1 = { } if len ( arg_0 ) == 0 : return _maybe_intify ( arg_0 . text ) if len ( arg_0 ) == 1 and arg_0 [ 0 ] . tag . startswith ( '{' + NS_GML ) : return gml_to_geojson ( arg_0 [ 0 ] ) if arg_0 . tag == 'open511' : arg_1 [ 'meta' ] = { 'version' : arg_0 . get ( 'version' ) } for arg_2 in arg_0 : arg_3 = arg_2 . tag if arg_3 == 'link' and arg_2 . get ( 'rel' ) : arg_3 = arg_2 . get ( 'rel' ) + '_url' if arg_3 == 'self_url' : arg_3 = 'url' if arg_0 . tag == 'open511' : arg_1 [ 'meta' ] [ arg_3 ] = arg_2 . get ( 'href' ) continue elif arg_3 . startswith ( '{' + NS_PROTECTED ) : arg_3 = '!' + arg_3 [ arg_3 . index ( '}' ) + 1 : ] elif arg_3 [ 0 ] == '{' : arg_3 = '+' + arg_3 [ arg_3 . index ( '}' ) + 1 : ] if arg_3 in arg_1 : continue elif arg_2 . tag == 'link' and not arg_2 . text : arg_1 [ arg_3 ] = arg_2 . get ( 'href' ) elif len ( arg_2 ) : if arg_3 == 'grouped_events' : arg_1 [ arg_3 ] = [ xml_link_to_json ( arg_4 , to_dict = False ) for arg_4 in arg_2 ] elif arg_3 in ( 'attachments' , 'media_files' ) : arg_1 [ arg_3 ] = [ xml_link_to_json ( arg_4 , to_dict = True ) for arg_4 in arg_2 ] elif all ( ( arg_3 == pluralize ( arg_4 . tag ) for arg_4 in arg_2 ) ) : arg_1 [ arg_3 ] = [ Func ( arg_4 ) for arg_4 in arg_2 ] else : arg_1 [ arg_3 ] = Func ( arg_2 ) else : if arg_0 . tag == 'open511' and arg_3 . endswith ( 's' ) and not arg_2 . text : arg_1 [ arg_3 ] = [ ] else : arg_1 [ arg_3 ] = _maybe_intify ( arg_2 . text ) return arg_1

Auto-discover INSTALLED_APPS gadgets.py modules and fail silently when
    not present. This forces an import on them to register any gadgets they
    may want.


Question: Query existing reliable dictionary .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = None , arg_6 = None , arg_7 = None ) : arg_8 = Cluster . from_sfclient ( arg_0 ) arg_9 = arg_8 . get_application ( arg_1 ) . get_service ( arg_2 ) . get_dictionary ( arg_3 ) arg_10 = time . time ( ) if ( arg_6 != None ) : arg_11 = arg_9 . query ( arg_4 , PartitionLookup . ID , arg_6 ) elif ( arg_5 != None ) : arg_11 = arg_9 . query ( arg_4 , PartitionLookup . KEY , arg_5 ) else : arg_11 = arg_9 . query ( arg_4 ) if type ( arg_11 ) is str : print ( arg_11 ) return else : arg_11 = json . dumps ( arg_11 . get ( "value" ) , indent = 4 ) print ( "Query took " + str ( time . time ( ) - arg_10 ) + " seconds" ) if ( arg_7 == None ) : arg_7 = "{}-{}-{}-query-output.json" . format ( arg_1 , arg_2 , arg_3 ) with open ( arg_7 , "w" ) as output : output . write ( arg_11 ) print ( ) print ( 'Printed output to: ' + arg_7 ) print ( arg_11 )


Question: Rotate the shape in - place .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = [ arg_1 ] if arg_2 is not None : arg_3 . extend ( arg_2 ) arg_0 . poly . Func ( * arg_3 ) return arg_0

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


Question: Prepare search request send and return parsed data as a dict .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = None , arg_7 = None , arg_8 = None , arg_9 = None , arg_10 = None , arg_11 = None , arg_12 = None , arg_13 = None , arg_14 = None , arg_15 = False , arg_16 = None , arg_17 = 0 , arg_18 = arg_19 [ 'transferMarket' ] , arg_20 = False ) : arg_21 = 'GET' arg_22 = 'transfermarket' if arg_17 == 0 : arg_23 = [ arg_0 . pin . event ( 'page_view' , 'Hub - Transfers' ) , arg_0 . pin . event ( 'page_view' , 'Transfer Market Search' ) ] arg_0 . pin . send ( arg_23 , arg_20 = arg_20 ) arg_24 = { 'start' : arg_17 , 'num' : arg_18 , 'type' : arg_1 , } if arg_2 : arg_24 [ 'lev' ] = arg_2 if arg_3 : arg_24 [ 'cat' ] = arg_3 if arg_4 : arg_24 [ 'maskedDefId' ] = arg_4 if arg_5 : arg_24 [ 'definitionId' ] = arg_5 if arg_6 : arg_24 [ 'micr' ] = arg_6 if arg_7 : arg_24 [ 'macr' ] = arg_7 if arg_8 : arg_24 [ 'minb' ] = arg_8 if arg_9 : arg_24 [ 'maxb' ] = arg_9 if arg_10 : arg_24 [ 'leag' ] = arg_10 if arg_11 : arg_24 [ 'team' ] = arg_11 if arg_12 : arg_24 [ 'pos' ] = arg_12 if arg_13 : arg_24 [ 'zone' ] = arg_13 if arg_14 : arg_24 [ 'nat' ] = arg_14 if arg_15 : arg_24 [ 'rare' ] = 'SP' if arg_16 : arg_24 [ 'playStyle' ] = arg_16 arg_25 = arg_0 . __request__ ( arg_21 , arg_22 , arg_24 = arg_24 , arg_20 = arg_20 ) if arg_17 == 0 : arg_23 = [ arg_0 . pin . event ( 'page_view' , 'Transfer Market Results - List View' ) , arg_0 . pin . event ( 'page_view' , 'Item - Detail View' ) ] arg_0 . pin . send ( arg_23 , arg_20 = arg_20 ) return [ itemParse ( arg_26 ) for arg_26 in arg_25 . get ( 'auctionInfo' , ( ) ) ]

Return True if this new candidate representation satisfies all our overlap
    rules. Since we know that neighboring representations differ by at most
    one bit, we compute running overlaps.


Question: Handle the kernel s death by asking if the user wants to restart .

def Func ( arg_0 , arg_1 ) : arg_0 . log . debug ( "kernel died: %s" , arg_1 ) if arg_0 . custom_restart : arg_0 . custom_restart_kernel_died . emit ( arg_1 ) else : arg_2 = 'The kernel heartbeat has been inactive for %.2f ' 'seconds. Do you want to restart the kernel? You may ' 'first want to check the network connection.' % arg_1 arg_0 . restart_kernel ( arg_2 , now = True )

Collects memory stats for specified Python program.


Question: Uninstalls all blacklisted packages .

def Func ( arg_0 ) : from burlap . system import distrib_family arg_1 = arg_0 . env . blacklisted_packages if not arg_1 : print ( 'No blacklisted packages.' ) return else : arg_2 = distrib_family ( ) if arg_2 == DEBIAN : arg_0 . sudo ( 'DEBIAN_FRONTEND=noninteractive apt-get -yq purge %s' % ' ' . join ( arg_1 ) ) else : raise NotImplementedError ( 'Unknown family: %s' % arg_2 )

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


Question: Push one or more lines of IPython input .

def Func ( arg_0 , arg_1 ) : if not arg_1 : return super ( IPythonInputSplitter , arg_0 ) . push ( arg_1 ) arg_1 = cast_unicode ( arg_1 , arg_0 . encoding ) if arg_1 . startswith ( '%%' ) and not ( len ( arg_1 . splitlines ( ) ) == 1 and arg_1 . strip ( ) . endswith ( '?' ) ) : return arg_0 . _handle_cell_magic ( arg_1 ) if arg_0 . input_mode == 'line' and arg_0 . processing_cell_magic : return arg_0 . _line_mode_cell_append ( arg_1 ) arg_2 = arg_1 . splitlines ( ) arg_3 = [ transform_ipy_prompt , transform_classic_prompt , transform_help_end , transform_escaped , transform_assign_system , transform_assign_magic ] arg_4 = False if arg_0 . input_mode == 'cell' : arg_0 . reset ( ) arg_4 = True arg_5 = 'cell' arg_0 . input_mode = 'line' arg_0 . _store ( arg_1 , arg_0 . _buffer_raw , 'source_raw' ) try : Func = super ( IPythonInputSplitter , arg_0 ) . push arg_8 = arg_0 . _buffer for arg_9 in arg_2 : if arg_0 . _is_complete or not arg_8 or ( arg_8 and arg_8 [ - 1 ] . rstrip ( ) . endswith ( ( ':' , ',' ) ) ) : for arg_10 in arg_3 : arg_9 = arg_10 ( arg_9 ) arg_11 = Func ( arg_9 ) finally : if arg_4 : arg_0 . input_mode = arg_5 return arg_11

Register unit object on interface level object


Question: Get the OS distribution ID .

def Func ( ) : with settings ( hide ( 'running' , 'stdout' ) ) : arg_0 = ( run ( 'uname -s' ) or '' ) . strip ( ) . lower ( ) if arg_0 == LINUX : if is_file ( '/usr/bin/lsb_release' ) : arg_1 = run ( 'lsb_release --id --short' ) . strip ( ) . lower ( ) if id in [ 'arch' , 'archlinux' ] : arg_1 = ARCH return arg_1 else : if is_file ( '/etc/debian_version' ) : return DEBIAN elif is_file ( '/etc/fedora-release' ) : return FEDORA elif is_file ( '/etc/arch-release' ) : return ARCH elif is_file ( '/etc/redhat-release' ) : arg_2 = run ( 'cat /etc/redhat-release' ) if arg_2 . startswith ( 'Red Hat Enterprise Linux' ) : return REDHAT elif arg_2 . startswith ( 'CentOS' ) : return CENTOS elif arg_2 . startswith ( 'Scientific Linux' ) : return SLES elif is_file ( '/etc/gentoo-release' ) : return GENTOO elif arg_0 == SUNOS : return SUNOS


Question: Return a string as hex dump .

def Func ( arg_0 ) : if compat . is_bytes ( arg_0 ) : arg_1 = "{!r}: " . format ( arg_0 ) for arg_2 in arg_0 : if type ( arg_2 ) is str : arg_2 = ord ( arg_2 ) arg_1 += "%02x " % arg_2 return arg_1 return "{}" . format ( arg_0 )

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

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

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


Question: Overrides Django s default to_python to allow correct translation to instance .

def Func ( arg_0 , arg_1 ) : if arg_1 is None or isinstance ( arg_1 , arg_0 . model_container ) : return arg_1 assert isinstance ( arg_1 , dict ) arg_2 = make_mdl ( arg_0 . model_container , arg_1 ) return arg_2

Decode the data passed in and potentially flush the decoder.


Question: Get item with max key of tree raises ValueError if tree is empty .

def Func ( arg_0 ) : if arg_0 . is_empty ( ) : raise ValueError ( "Tree is empty" ) arg_1 = arg_0 . _root while arg_1 . right is not None : arg_1 = arg_1 . right return arg_1 . key , arg_1 . value


Question: Error handler for HTTP requests

def Func ( arg_0 ) : arg_1 = { 400 : ze . UnsupportedParams , 401 : ze . UserNotAuthorised , 403 : ze . UserNotAuthorised , 404 : ze . ResourceNotFound , 409 : ze . Conflict , 412 : ze . PreConditionFailed , 413 : ze . RequestEntityTooLarge , 428 : ze . PreConditionRequired , 429 : ze . TooManyRequests , } def err_msg ( arg_0 ) : return "\nCode: %s\nURL: %s\nMethod: %s\nResponse: %s" % ( arg_0 . status_code , arg_0 . url , arg_0 . request . method , arg_0 . text , ) if arg_1 . get ( arg_0 . status_code ) : if arg_0 . status_code == 429 : arg_2 = backoff . delay if arg_2 > 32 : backoff . reset ( ) raise ze . TooManyRetries ( "Continuing to receive HTTP 429 \responses after 62 seconds. You are being rate-limited, try again later" ) time . sleep ( arg_2 ) arg_3 = requests . Session ( ) arg_4 = arg_3 . send ( arg_0 . request ) try : arg_4 . raise_for_status ( ) except requests . exceptions . HTTPError : Func ( arg_4 ) else : raise arg_1 . get ( arg_0 . status_code ) ( err_msg ( arg_0 ) ) else : raise ze . HTTPError ( err_msg ( arg_0 ) )

Returns time format preferred for Internet standards.

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

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


Question: Return random paragraphs .

def Func ( arg_0 = 2 , arg_1 = '\n\n' , arg_2 = '' , arg_3 = '' , arg_4 = False , arg_5 = 3 , arg_6 = False ) : if arg_4 : arg_2 = '<p>' arg_3 = '</p>' arg_1 = '\n\n' arg_7 = [ ] try : for arg_8 in xrange ( 0 , arg_0 ) : arg_7 . append ( arg_2 + sentences ( arg_5 ) + arg_3 ) except NameError : for arg_8 in range ( 0 , arg_0 ) : arg_7 . append ( arg_2 + sentences ( arg_5 ) + arg_3 ) if arg_6 : return arg_7 else : return arg_1 . join ( arg_7 )

Bit Test.

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

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


Question: we need to be flexible in order to determine which plugin s configuration specified and make appropriate configs to metrics collector

def Func ( arg_0 ) : try : arg_1 = arg_0 . core . get_option ( 'telegraf' , "config" ) except KeyError : arg_1 = None try : arg_2 = arg_0 . core . get_option ( 'monitoring' , "config" ) except KeyError : arg_2 = None if arg_1 and arg_2 : raise ValueError ( 'Both telegraf and monitoring configs specified. ' 'Clean up your config and delete one of them' ) if arg_1 and not arg_2 : return 'telegraf' if not arg_1 and arg_2 : return 'monitoring' if not arg_1 and not arg_2 : try : arg_3 = arg_0 . core . get_option ( 'telegraf' ) except NoOptionError : arg_3 = None try : arg_4 = arg_0 . core . get_option ( 'monitoring' ) except BaseException : arg_4 = None if arg_3 and arg_4 : raise ValueError ( 'Both telegraf and monitoring default targets specified. ' 'Clean up your config and delete one of them' ) if arg_3 and not arg_4 : return if not arg_3 and arg_4 : arg_0 . core . set_option ( "telegraf" , "default_target" , arg_4 ) if not arg_3 and not arg_4 : return

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


Question: Translates a regular TPOT configuration to a PMML - compatible TPOT configuration .

def Func ( arg_0 , arg_1 = [ ] ) : arg_2 = set ( arg_0 . keys ( ) ) arg_3 = _supported_classes ( arg_1 ) arg_4 = ( set ( arg_3 ) ) . union ( set ( [ _strip_module ( class_ ) for class_ in arg_3 ] ) ) return { arg_5 : arg_0 [ arg_5 ] for arg_5 in ( arg_2 ) . intersection ( arg_4 ) }

Get object properties.

        @param window_name: Window name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string

        @return: list of properties
        @rtype: list


Question: Clears any state left in this checker from last module checked .

def Func ( arg_0 , arg_1 ) : arg_0 . _logging_names = set ( ) arg_3 = arg_0 . config . logging_modules arg_0 . _format_style = arg_0 . config . logging_format_style arg_0 . _logging_modules = set ( arg_3 ) arg_0 . _from_imports = { } for arg_7 in arg_3 : arg_8 = arg_7 . rsplit ( "." , 1 ) if len ( arg_8 ) > 1 : arg_0 . _from_imports [ arg_8 [ 0 ] ] = arg_8 [ 1 ]

Sets the new size and buffer size internally


Question: Computes all features for the given file .

def Func ( arg_0 , arg_1 ) : for arg_2 in msaf . features_registry : logging . info ( "Computing %s for file %s" % ( arg_2 , arg_0 . audio_file ) ) arg_3 = Features . select_features ( arg_2 , arg_0 , False , arg_1 ) arg_3 . features

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


Question: Produces the content of output_tensor only after dependencies .

def Func ( arg_0 , arg_1 , arg_2 = None ) : if tf . executing_eagerly ( ) : return arg_1 with tf . name_scope ( arg_2 or "control_dependency" ) as arg_2 : with tf . control_dependencies ( arg_3 for arg_3 in arg_0 if arg_3 is not None ) : arg_1 = tf . convert_to_tensor ( value = arg_1 ) if isinstance ( arg_1 , tf . Tensor ) : return tf . identity ( arg_1 , arg_2 = arg_2 ) else : return tf . IndexedSlices ( tf . identity ( arg_1 . values , arg_2 = arg_2 ) , arg_1 . indices , arg_1 . dense_shape )

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: Generates a JSON string with the params to be used when sending CONNECT to the server .

def Func ( arg_0 ) : arg_1 = { "verbose" : arg_0 . options [ "verbose" ] , "pedantic" : arg_0 . options [ "pedantic" ] , "lang" : __lang__ , "version" : __version__ , "protocol" : PROTOCOL } if "auth_required" in arg_0 . _server_info : if arg_0 . _server_info [ "auth_required" ] : if arg_0 . options [ "user" ] is not None and arg_0 . options [ "password" ] is not None : arg_1 [ "user" ] = arg_0 . options [ "user" ] arg_1 [ "pass" ] = arg_0 . options [ "password" ] elif arg_0 . options [ "token" ] is not None : arg_1 [ "auth_token" ] = arg_0 . options [ "token" ] elif arg_0 . _current_server . uri . password is None : arg_1 [ "auth_token" ] = arg_0 . _current_server . uri . username else : arg_1 [ "user" ] = arg_0 . _current_server . uri . username arg_1 [ "pass" ] = arg_0 . _current_server . uri . password if arg_0 . options [ "name" ] is not None : arg_1 [ "name" ] = arg_0 . options [ "name" ] if arg_0 . options [ "no_echo" ] is not None : arg_1 [ "echo" ] = not arg_0 . options [ "no_echo" ] arg_2 = json . dumps ( arg_1 , sort_keys = True ) return b'' . join ( [ CONNECT_OP + _SPC_ + arg_2 . encode ( ) + _CRLF_ ] )

Unregister an extension code.  For testing only.


Question: Create the installation order .

def Func ( arg_0 ) : arg_1 = [ ] arg_2 = set ( ) def schedule ( arg_3 ) : if arg_3 . satisfied_by or arg_3 in arg_2 : return arg_2 . add ( arg_3 ) for arg_4 in arg_0 . _dependencies [ arg_3 ] : schedule ( arg_4 ) arg_1 . append ( arg_3 ) for arg_5 in arg_0 . requirements . values ( ) : schedule ( arg_5 ) return arg_1

delete a backend, and update the secrets file


Question: lists compartments the metabolites are in

def Func ( arg_0 ) : if arg_0 . _Func is None : arg_0 . _Func = { met . compartment for met in arg_0 . _metabolites if met . compartment is not None } return arg_0 . _Func

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Parsing of some custom sv frequencies These are very specific at the moment this will hopefully get better over time when the field of structural variants is more developed .

def Func ( arg_0 ) : arg_1 = [ 'clingen_cgh_benignAF' , 'clingen_cgh_benign' , 'clingen_cgh_pathogenicAF' , 'clingen_cgh_pathogenic' , 'clingen_ngi' , 'clingen_ngiAF' , 'swegen' , 'swegenAF' , 'decipherAF' , 'decipher' ] arg_2 = { } for arg_3 in arg_1 : arg_4 = arg_0 . INFO . get ( arg_3 , 0 ) if 'AF' in arg_3 : arg_4 = float ( arg_4 ) else : arg_4 = int ( arg_4 ) if arg_4 > 0 : arg_2 [ arg_3 ] = arg_4 return arg_2

Attach an observer.

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

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


Question: Serializes into a bytestring .

def Func ( arg_0 ) : arg_1 = arg_0 . __getstate__ ( ) return pickle . dumps ( { 'name' : arg_1 [ 'name' ] , 'seg' : pickle . dumps ( arg_1 [ 'seg' ] , protocol = - 1 ) , } , protocol = - 1 )

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


Question: Transform a supported data type to a list of lists and a list of headers .

def Func ( arg_0 , arg_1 , arg_2 = True ) : if hasattr ( arg_0 , "keys" ) and hasattr ( arg_0 , "values" ) : if hasattr ( arg_0 . values , "__call__" ) : arg_3 = list ( arg_0 . keys ( ) ) arg_4 = list ( izip_longest ( * list ( arg_0 . values ( ) ) ) ) elif hasattr ( arg_0 , "index" ) : arg_3 = list ( arg_0 . keys ( ) ) arg_5 = arg_0 . values arg_6 = arg_0 . index arg_4 = [ [ v ] + list ( row ) for v , row in zip ( arg_6 , arg_5 ) ] else : raise ValueError ( "tabular data doesn't appear to be a dict " "or a DataFrame" ) if arg_1 == "keys" : arg_1 = list ( map ( _text_type , arg_3 ) ) else : arg_4 = list ( arg_0 ) if arg_1 == "keys" and len ( arg_4 ) > 0 : arg_1 = list ( map ( _text_type , list ( range ( len ( arg_4 [ 0 ] ) ) ) ) ) if arg_1 == "firstrow" and len ( arg_4 ) > 0 : arg_1 = list ( map ( _text_type , arg_4 [ 0 ] ) ) arg_4 = arg_4 [ 1 : ] arg_1 = list ( arg_1 ) arg_4 = list ( map ( list , arg_4 ) ) if arg_2 and len ( arg_4 ) > 1 : arg_4 = sorted ( arg_4 , key = lambda x : x [ 0 ] ) if arg_1 and len ( arg_4 ) > 0 : arg_7 = len ( arg_1 ) arg_8 = len ( arg_4 [ 0 ] ) if arg_7 < arg_8 : arg_1 = [ "" ] * ( arg_8 - arg_7 ) + arg_1 return arg_4 , arg_1

Return the current statevector in JSON Result spec format


Question: Get source from filename and make a code object of it .

def Func ( arg_0 ) : try : arg_1 = open_source ( arg_0 ) except IOError : raise NoSource ( "No file to run: %r" % arg_0 ) try : arg_2 = arg_1 . read ( ) finally : arg_1 . close ( ) if not arg_2 or arg_2 [ - 1 ] != '\n' : arg_2 += '\n' arg_3 = compile ( arg_2 , arg_0 , "exec" ) return arg_3

Whether a connection can be established between those two meshes.


Question: Return a check digit of the given credit card number .

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


Question: This method fetches missing params for PR and filter them by specified options . It include add all PR s with labels from options . include_labels and exclude all from options . exclude_labels .

def Func ( arg_0 , arg_1 ) : arg_1 = arg_0 . filter_by_labels ( arg_1 , "pull requests" ) arg_1 = arg_0 . filter_merged_pull_requests ( arg_1 ) if arg_0 . options . verbose > 1 : print ( "\tremaining pull requests: {}" . format ( len ( arg_1 ) ) ) return arg_1

Set item of the dictionary.

        :Parameters:
            - `key`: the key.
            - `value`: the object to store.
            - `timeout`: timeout value for the object (in seconds from now).
            - `timeout_callback`: function to be called when the item expires.
              The callback should accept none, one (the key) or two (the key
              and the value) arguments.
        :Types:
            - `key`: any hashable value
            - `value`: any python object
            - `timeout`: `int`
            - `timeout_callback`: callable


Question: Provide a useful representation of the register .

def Func ( arg_0 ) -> str : arg_1 = fmt . end ( ";\n" , [ ] ) arg_2 = fmt . sep ( ', ' , [ ] ) for arg_3 in sorted ( arg_0 . states . keys ( ) ) : arg_2 . lsdata . append ( str ( arg_3 ) ) arg_1 . lsdata . append ( fmt . block ( '(' , ')' , [ arg_2 ] ) ) arg_1 . lsdata . append ( "events:" + repr ( arg_0 . events ) ) arg_1 . lsdata . append ( "named_events:" + repr ( list ( arg_0 . named_events . keys ( ) ) ) ) arg_1 . lsdata . append ( "uid_events:" + repr ( list ( arg_0 . uid_events . keys ( ) ) ) ) return 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: Shortcut to read a csv file using pandas and convert to a DataFrame directly .

def Func ( arg_0 , arg_1 = True , ** arg_2 ) : import pandas as pd return from_pandas ( pd . read_csv ( arg_0 , ** arg_2 ) , arg_1 = arg_1 )

iterate through the attributes of every logger's handler

    this is used to switch out stderr and stdout in tests when buffer is True

    :returns: generator of tuples, each tuple has (name, handler, member_name, member_val)


Question: If you want to use functionalities related to Controls and Patterns in a new thread . You must call InitializeUIAutomationInCurrentThread first in the thread and call UninitializeUIAutomationInCurrentThread when the thread exits . But you can t use use a Control or a Pattern created in a different thread . So you can t create a Control or a Pattern in main thread and then pass it to a new thread and use it .

def Func ( arg_0 ) : arg_1 = threading . currentThread ( ) auto . Logger . WriteLine ( '\nThis is running in a new thread. {} {}' . format ( arg_1 . ident , arg_1 . name ) , auto . ConsoleColor . Cyan ) time . sleep ( 2 ) auto . InitializeUIAutomationInCurrentThread ( ) auto . GetConsoleWindow ( ) . CaptureToImage ( 'console_newthread.png' ) arg_2 = auto . GetRootControl ( ) auto . EnumAndLogControl ( arg_2 , 1 ) auto . UninitializeUIAutomationInCurrentThread ( ) auto . Logger . WriteLine ( '\nThread exits. {} {}' . format ( arg_1 . ident , arg_1 . name ) , auto . ConsoleColor . Cyan )

Makes the python dict corresponding to the
    JSON that needs to be sent for a failed
    response. Message is the message that is
    sent as the reason for failure.


Question: Run Bayesian model assuming returns are normally distributed .

def Func ( arg_0 , arg_1 = 500 , arg_2 = True ) : with pm . Model ( ) as model : arg_3 = pm . Normal ( 'mean returns' , arg_3 = 0 , sd = .01 , testval = arg_0 . mean ( ) ) arg_4 = pm . HalfCauchy ( 'volatility' , beta = 1 , testval = arg_0 . std ( ) ) arg_5 = pm . Normal ( 'returns' , arg_3 = arg_3 , sd = arg_4 , observed = arg_0 ) pm . Deterministic ( 'annual volatility' , arg_5 . distribution . variance ** .5 * np . sqrt ( 252 ) ) pm . Deterministic ( 'sharpe' , arg_5 . distribution . mean / arg_5 . distribution . variance ** .5 * np . sqrt ( 252 ) ) arg_6 = pm . sample ( arg_1 , arg_2 = arg_2 ) return model , arg_6


Question: A list of axes of rotation for this joint .

def Func ( arg_0 ) : return [ np . array ( arg_0 . ode_obj . getAxis1 ( ) ) , np . array ( arg_0 . ode_obj . getAxis2 ( ) ) ]

Shorthand access to the color table scheme selector method.


Question: If entity pairs in a relation is as close as another relations only keep one relation of such set .

def Func ( arg_0 , arg_1 = 0.97 ) : logging . debug ( "remove duplicate" ) _assert_threshold ( arg_1 ) arg_2 = defaultdict ( list ) arg_3 = set ( ) for arg_4 in arg_0 : arg_2 [ arg_4 . relation ] . append ( f"{t.head} {t.tail}" ) arg_3 . add ( arg_4 . relation ) arg_3 = list ( arg_3 ) arg_5 = len ( arg_0 ) arg_6 = set ( ) for arg_7 , arg_8 in arg_2 . items ( ) : arg_2 [ arg_7 ] = Superminhash ( arg_8 ) for arg_9 in arg_3 : for arg_10 in arg_3 : if arg_9 == arg_10 or arg_9 in arg_6 or arg_10 in arg_6 : continue arg_11 = [ arg_9 ] if _set_close_to ( arg_2 [ arg_9 ] , arg_2 [ arg_10 ] , arg_1 ) : arg_11 . append ( arg_10 ) if len ( arg_11 ) > 1 : arg_11 . pop ( np . random . randint ( len ( arg_11 ) ) ) arg_6 |= set ( arg_11 ) logging . info ( "Removing {} relations: {}" . format ( len ( arg_6 ) , str ( arg_6 ) ) ) return list ( filterfalse ( lambda x : x . relation in arg_6 , arg_0 ) )

Factory for GromacsCommand derived types.


Question: List the roles for an account for the passed Canvas account ID .

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

Set the global config values.

    Example:

    \b
    ```bash
    $ polyaxon config set --hots=localhost http_port=80
    ```


Question: Parse the rank score

def Func ( arg_0 , arg_1 ) : arg_2 = None if arg_0 : for arg_3 in arg_0 . split ( ',' ) : arg_4 = arg_3 . split ( ':' ) if arg_1 == arg_4 [ 0 ] : arg_2 = float ( arg_4 [ 1 ] ) return arg_2

Override of clean method to perform additional validation


Question: Cuts string data to the maximum length allowed in a pytables column if string is too long .

def Func ( arg_0 , arg_1 , arg_2 ) : if len ( arg_0 ) > arg_1 : arg_2 . debug ( 'The string `%s` was too long I truncated it to' ' %d characters' % ( arg_0 , arg_1 ) ) arg_0 = arg_0 [ 0 : arg_1 - 3 ] + '...' . encode ( 'utf-8' ) return arg_0

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


Question: Hook for type - checking invoked during assignment . Allows size 1 numpy arrays and lists but raises TypeError if value can not be cast to a scalar .

def Func ( arg_0 , arg_1 ) : try : arg_2 = asscalar ( arg_1 ) except ValueError as e : raise TypeError ( e ) super ( Parameter , arg_0 ) . Func ( arg_2 )

Bring the interrupt pin on the GPIO into Linux userspace.


Question: Generate an XML report of coverage results .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None ) : arg_0 . _harvest_data ( ) arg_0 . config . from_args ( arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , xml_output = arg_2 , ) arg_6 = None arg_7 = False if arg_0 . config . xml_output : if arg_0 . config . xml_output == '-' : arg_2 = sys . stdout else : arg_2 = open ( arg_0 . config . xml_output , "w" ) arg_6 = arg_2 try : try : arg_8 = XmlReporter ( arg_0 , arg_0 . config ) return arg_8 . report ( arg_1 , arg_2 = arg_2 ) except CoverageException : arg_7 = True raise finally : if arg_6 : arg_6 . close ( ) if arg_7 : file_be_gone ( arg_0 . config . xml_output )

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


Question: Return local folder path of header files .

def Func ( ) -> str : import os return os . path . abspath ( os . path . dirname ( os . path . realpath ( __file__ ) ) ) + '/headers/'

Whether a connection can be established between those two meshes.


Question: Create a vector of values over an interval with a specified step size .

def Func ( arg_0 , arg_1 , arg_2 = 1 ) : arg_3 = _np . int ( ( arg_1 - arg_0 ) / arg_2 ) return _np . linspace ( arg_0 , arg_0 + arg_2 * arg_3 , arg_3 + 1 )


Question: Call right func to save data according to file extension

def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = get_file_extension ( arg_1 ) arg_4 = json_Func if arg_3 == '.json' else yaml_Func return arg_4 ( arg_0 , arg_1 )

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: shallow copy of the instruction .

def Func ( arg_0 , arg_1 = None ) : arg_2 = Func . Func ( arg_0 ) if arg_1 : arg_2 . name = arg_1 return arg_2

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


Question: Add the attachments from the message from the commandline options .

def Func ( arg_0 , arg_1 ) : if 'attachment' not in arg_0 : return arg_0 , 0 arg_0 = make_message_multipart ( arg_0 ) arg_2 = arg_0 . get_all ( 'attachment' , failobj = [ ] ) arg_3 = os . path . dirname ( arg_1 ) for arg_4 in arg_2 : arg_4 = os . path . expanduser ( arg_4 . strip ( ) ) if not arg_4 : continue if not os . path . isabs ( arg_4 ) : arg_4 = os . path . join ( arg_3 , arg_4 ) arg_5 = os . path . abspath ( arg_4 ) if not os . path . exists ( arg_5 ) : print ( "Error: can't find attachment " + arg_5 ) sys . exit ( 1 ) arg_6 = os . path . basename ( arg_5 ) with open ( arg_5 , "rb" ) as attachment : arg_7 = email . mime . application . MIMEApplication ( attachment . read ( ) , Name = arg_6 ) arg_7 . add_header ( 'Content-Disposition' , 'attachment; filename="{}"' . format ( arg_6 ) ) arg_0 . attach ( arg_7 ) print ( ">>> attached {}" . format ( arg_5 ) ) del arg_0 [ 'attachment' ] return arg_0 , len ( arg_2 )

Calculate the concurrence.

    Args:
        state (np.array): a quantum state (1x4 array) or a density matrix (4x4
                          array)
    Returns:
        float: concurrence.
    Raises:
        Exception: if attempted on more than two qubits.


Question: puts products in a normalized format

def Func ( arg_0 , arg_1 = None ) : arg_2 = arg_0 . product if arg_1 is None else arg_1 if arg_2 is None : return None if not isinstance ( arg_2 , ( list , tuple ) ) : arg_2 = [ arg_2 ] return arg_2

Produces a list of ports to be updated async.


Question: Obtain slices for the given dimensions padding and chunks .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] for arg_4 , arg_5 , arg_6 in zip ( arg_0 , arg_1 , arg_2 ) : arg_7 = int ( floor ( arg_6 / arg_4 ) ) arg_8 = arg_6 % arg_4 arg_9 = 0 arg_10 = [ ] for arg_11 in range ( arg_7 ) : arg_12 = arg_9 + arg_4 if arg_11 == 0 : arg_13 = arg_9 else : arg_13 = arg_9 - arg_5 if arg_11 == arg_7 : arg_14 = arg_12 else : arg_14 = arg_12 + arg_5 arg_10 . append ( slice ( arg_13 , arg_14 , 1 ) ) arg_9 = arg_12 if arg_8 : arg_10 . append ( slice ( arg_12 - arg_5 , arg_6 , 1 ) ) arg_3 . append ( arg_10 ) return arg_3

Calculate the phase's magnetic contribution to heat capacity at the
        specified temperature.

        :param T: [K] temperature

        :returns: [J/mol/K] The magnetic heat capacity of the compound phase.

        Dinsdale, A. T. (1991). SGTE data for pure elements. Calphad, 15(4),
        317–425. http://doi.org/10.1016/0364-5916(91)90030-N


Question: Check that wiremap neither fragments nor leaves duplicate registers .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = True ) : arg_5 = set ( ) arg_6 = { } for arg_7 in arg_2 . values ( ) : arg_6 [ arg_7 ] = { j : False for j in range ( len ( arg_7 ) ) } for arg_8 in arg_1 . keys ( ) : if arg_8 [ 0 ] . name in arg_2 : arg_6 [ arg_8 [ 0 ] ] [ arg_8 [ 1 ] ] = True for arg_8 , arg_7 in arg_6 . items ( ) : arg_9 = set ( arg_7 . values ( ) ) if len ( arg_9 ) == 2 : raise DAGCircuitError ( "edge_map fragments reg %s" % arg_8 ) elif arg_9 == set ( [ False ] ) : if arg_8 in arg_0 . qregs . values ( ) or arg_8 in arg_0 . cregs . values ( ) : raise DAGCircuitError ( "unmapped duplicate reg %s" % arg_8 ) else : arg_5 . add ( arg_8 ) else : if arg_4 : if not arg_1 [ ( arg_8 , 0 ) ] [ 0 ] . name in arg_3 : arg_10 = max ( map ( lambda x : x [ 1 ] , filter ( lambda x : x [ 0 ] == arg_1 [ ( arg_8 , 0 ) ] [ 0 ] , arg_1 . values ( ) ) ) ) arg_11 = QuantumRegister ( arg_10 + 1 , arg_1 [ ( arg_8 , 0 ) ] [ 0 ] . name ) arg_5 . add ( arg_11 ) return arg_5


Question: Set command option defaults .

def Func ( arg_0 ) : setuptools . command . build_py . build_py . Func ( arg_0 ) arg_0 . meteor = 'meteor' arg_0 . meteor_debug = False arg_0 . build_lib = None arg_0 . package_dir = None arg_0 . meteor_builds = [ ] arg_0 . no_prune_npm = None arg_0 . inplace = True

Get the reason of this revocation.

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

        .. seealso::

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


Question: Return the thresholded z - scored icc .

def Func ( arg_0 , arg_1 , arg_2 = '+' ) : return thr_img ( icc_img_to_zscore ( arg_0 ) , arg_1 = arg_1 , arg_2 = arg_2 ) . get_data ( )

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

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

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


Question: Yield filenames .

def Func ( arg_0 , arg_1 , arg_2 ) : while arg_0 : arg_3 = arg_0 . pop ( 0 ) if arg_1 and os . path . isdir ( arg_3 ) : for arg_4 , arg_5 , arg_6 in os . walk ( arg_3 ) : arg_0 += [ os . path . join ( arg_4 , arg_7 ) for arg_7 in arg_6 if match_file ( os . path . join ( arg_4 , arg_7 ) , arg_2 ) ] arg_5 [ : ] = [ d for d in arg_5 if match_file ( os . path . join ( arg_4 , d ) , arg_2 ) ] else : if not is_exclude_file ( arg_3 , arg_2 ) : yield arg_3


Question: Fast %Y - %m - %d parsing .

def Func ( arg_0 ) : try : return datetime . date ( int ( arg_0 [ : 4 ] ) , int ( arg_0 [ 5 : 7 ] ) , int ( arg_0 [ 8 : 10 ] ) ) except ValueError : return datetime . datetime . strptime ( arg_0 , '%d %B %Y' ) . date ( )


Question: Chooses the best model for a given job .

def Func ( arg_0 , arg_1 = True ) : arg_2 = time . time ( ) - arg_0 . _lastUpdateAttemptTime if arg_2 < arg_0 . _MIN_UPDATE_INTERVAL and not arg_1 : return arg_0 . logger . info ( "Attempting model selection for jobID=%d: time=%f" "  lastUpdate=%f" % ( arg_0 . _jobID , time . time ( ) , arg_0 . _lastUpdateAttemptTime ) ) arg_3 = arg_0 . _cjDB . jobUpdateSelectionSweep ( arg_0 . _jobID , arg_0 . _MIN_UPDATE_INTERVAL ) if not arg_3 : arg_0 . logger . info ( "Unable to update selection sweep timestamp: jobID=%d" " updateTime=%f" % ( arg_0 . _jobID , arg_0 . _lastUpdateAttemptTime ) ) if not arg_1 : return arg_0 . _lastUpdateAttemptTime = time . time ( ) arg_0 . logger . info ( "Succesfully updated selection sweep timestamp jobid=%d updateTime=%f" % ( arg_0 . _jobID , arg_0 . _lastUpdateAttemptTime ) ) arg_5 = arg_0 . _MIN_UPDATE_THRESHOLD arg_6 = arg_0 . _getJobResults ( ) if arg_1 or arg_6 is None : arg_5 = 0 arg_7 , arg_8 = arg_0 . _cjDB . modelsGetCandidates ( arg_0 . _jobID , arg_5 ) arg_0 . logger . info ( "Candidate models=%s, metric=%s, jobID=%s" % ( arg_7 , arg_8 , arg_0 . _jobID ) ) if len ( arg_7 ) == 0 : return arg_0 . _jobUpdateCandidate ( arg_7 [ 0 ] , arg_8 , results = arg_6 )

Return HgResource object for path.

        See DAVProvider.get_resource_inst()


Question: Log the beginning of an API request .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : arg_0 . _requests_counter += 1 if not arg_0 . _is_logging : return arg_6 = "\n---- %d --------------------------------------------------------\n" % arg_0 . _requests_counter arg_6 += "[%s] %s\n" % ( time . strftime ( "%H:%M:%S" ) , arg_1 ) if arg_5 is not None : arg_6 += "     params: {%s}\n" % ", " . join ( "%s:%s" % arg_7 for arg_7 in viewitems ( arg_5 ) ) if arg_2 is not None : arg_6 += "     body: {%s}\n" % ", " . join ( "%s:%s" % arg_7 for arg_7 in viewitems ( arg_2 ) ) if arg_3 is not None : import arg_3 as j arg_6 += "     json: %s\n" % j . dumps ( arg_3 ) if arg_4 is not None : arg_6 += "     file: %s\n" % ", " . join ( arg_8 . name for arg_8 in viewvalues ( arg_4 ) ) arg_0 . _log_message ( arg_6 + "\n" )

Return the revocations in this certificate revocation list.

        These revocations will be provided by value, not by reference.
        That means it's okay to mutate them: it won't affect this CRL.

        :return: The revocations in this CRL.
        :rtype: :class:`tuple` of :class:`Revocation`


Question: Compute Krippendorff s alpha .

def Func ( arg_0 = None , arg_1 = None , arg_2 = None , arg_3 = 'interval' , arg_4 = arg_5 . float64 ) : if ( arg_0 is None ) == ( arg_1 is None ) : raise ValueError ( "Either reliability_data or value_counts must be provided, but not both." ) if arg_1 is None : if type ( arg_0 ) is not arg_5 . ndarray : arg_0 = arg_5 . array ( arg_0 ) arg_2 = arg_2 or arg_5 . unique ( arg_0 [ ~ arg_5 . isnan ( arg_0 ) ] ) arg_1 = _reliability_data_to_value_counts ( arg_0 , arg_2 ) else : if arg_2 : assert arg_1 . shape [ 1 ] == len ( arg_2 ) , "The value domain should be equal to the number of columns of value_counts." else : arg_2 = tuple ( range ( arg_1 . shape [ 1 ] ) ) arg_7 = _distance_metric ( arg_3 ) arg_8 = _coincidences ( arg_1 , arg_2 , arg_4 = arg_4 ) arg_9 = arg_5 . sum ( arg_8 , axis = 0 ) arg_10 = arg_5 . sum ( arg_9 ) arg_11 = _random_coincidences ( arg_2 , arg_10 , arg_9 ) arg_12 = _distances ( arg_2 , arg_7 , arg_9 ) return 1 - arg_5 . sum ( arg_8 * arg_12 ) / arg_5 . sum ( arg_11 * arg_12 )

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


Question: This function prepares a list of hiveconf params from a dictionary of key value pairs .

def Func ( arg_0 ) : if not arg_0 : return [ ] return as_flattened_list ( zip ( [ "-hiveconf" ] * len ( arg_0 ) , [ "{}={}" . format ( arg_1 , arg_2 ) for arg_1 , arg_2 in arg_0 . items ( ) ] ) )

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


Question: Pagination utility . Obnoxious .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = { } if 'basic' in arg_0 . auth : arg_3 [ 'auth' ] = arg_0 . auth [ 'basic' ] arg_4 = [ ] arg_5 = dict ( next = arg_1 ) while 'next' in arg_5 : arg_6 = arg_0 . session . get ( arg_5 [ 'next' ] , ** arg_3 ) if arg_6 . status_code == 404 and 'token' in arg_0 . auth : log . warn ( "A '404' from github may indicate an auth " "failure. Make sure both that your token is correct " "and that it has 'public_repo' and not 'public " "access' rights." ) arg_7 = arg_0 . json_response ( arg_6 ) if arg_2 is not None : arg_7 = arg_7 [ arg_2 ] arg_4 += arg_7 arg_5 = arg_0 . _link_field_to_dict ( arg_6 . headers . get ( 'link' , None ) ) return arg_4

Updates the SIS ID for the account identified by the passed account ID.

        https://canvas.instructure.com/doc/api/accounts.html#method.accounts.update


Question: Use SoftmaxNormal quantiles to form quadrature on K - 1 simplex .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False , arg_4 = None ) : with tf . name_scope ( arg_4 or "softmax_normal_grid_and_probs" ) : arg_0 = tf . convert_to_tensor ( value = arg_0 , arg_4 = "normal_loc" ) arg_5 = dtype_util . base_dtype ( arg_0 . dtype ) arg_1 = tf . convert_to_tensor ( value = arg_1 , dtype = arg_5 , arg_4 = "normal_scale" ) arg_1 = maybe_check_quadrature_param ( arg_1 , "normal_scale" , arg_3 ) arg_6 = normal . Normal ( loc = arg_0 , scale = arg_1 ) def _get_batch_ndims ( ) : arg_7 = tensorshape_util . rank ( arg_6 . batch_shape ) if arg_7 is None : arg_7 = tf . shape ( input = arg_6 . batch_shape_tensor ( ) ) [ 0 ] return arg_7 arg_8 = _get_batch_ndims ( ) def _get_final_shape ( arg_9 ) : arg_10 = tensorshape_util . with_rank_at_least ( arg_6 . batch_shape , 1 ) arg_11 = tf . compat . dimension_value ( arg_10 [ - 1 ] ) if arg_11 is not None : arg_11 += 1 arg_12 = tf . TensorShape ( [ arg_11 , arg_9 ] ) return arg_10 [ : - 1 ] . concatenate ( arg_12 ) def _compute_quantiles ( ) : arg_13 = tf . zeros ( [ ] , dtype = arg_6 . dtype ) arg_14 = tf . linspace ( arg_13 , 1. , arg_2 + 3 ) [ 1 : - 1 ] arg_14 = tf . reshape ( arg_14 , shape = tf . concat ( [ [ - 1 ] , tf . ones ( [ arg_8 ] , dtype = tf . int32 ) ] , axis = 0 ) ) arg_15 = arg_6 . quantile ( arg_14 ) arg_15 = softmax_centered_bijector . SoftmaxCentered ( ) . forward ( arg_15 ) arg_16 = tf . concat ( [ tf . range ( 1 , 1 + arg_8 ) , [ 0 ] ] , axis = 0 ) arg_15 = tf . transpose ( a = arg_15 , arg_16 = arg_16 ) tensorshape_util . set_shape ( arg_15 , _get_final_shape ( arg_2 + 1 ) ) return arg_15 arg_15 = _compute_quantiles ( ) arg_17 = ( arg_15 [ ... , : - 1 ] + arg_15 [ ... , 1 : ] ) / 2. tensorshape_util . set_shape ( arg_17 , _get_final_shape ( arg_2 ) ) arg_18 = tf . fill ( dims = [ arg_2 ] , value = 1. / tf . cast ( arg_2 , arg_6 . dtype ) ) return arg_17 , arg_18

Copy a path from inside a Dusty container to a path on the
    local filesystem. The path on the local filesystem must be
    wrist-accessible by the user specified in mac_username.


Question: Resize an array to a new size by extracting a sub - set of the array .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = ( arg_2 - arg_1 , arg_4 - arg_3 ) arg_6 = np . zeros ( shape = arg_5 ) for arg_7 , arg_8 in enumerate ( range ( arg_1 , arg_2 ) ) : for arg_9 , arg_10 in enumerate ( range ( arg_3 , arg_4 ) ) : arg_6 [ arg_7 , arg_9 ] = arg_0 [ arg_8 , arg_10 ] return arg_6

Gets the fuel prices for a specific fuel station.


Question: Perform the actual uncompression .

def Func ( arg_0 , arg_1 ) : arg_2 = zipfile . ZipFile ( arg_0 ) for arg_3 in arg_2 . namelist ( ) : arg_4 = os . path . join ( arg_1 , arg_3 ) arg_5 , arg_6 = os . path . split ( arg_4 ) try : if arg_4 . endswith ( os . sep ) and not os . path . exists ( arg_5 ) : os . makedirs ( arg_4 ) elif not os . path . exists ( arg_4 ) : arg_5 = os . path . join ( arg_1 , os . path . dirname ( arg_3 ) ) if os . path . dirname ( arg_3 ) and not os . path . exists ( arg_5 ) : os . makedirs ( arg_5 ) arg_7 = open ( arg_4 , "w" ) arg_7 . write ( arg_2 . read ( arg_3 ) ) arg_7 . close ( ) except IOError , e : raise e return arg_1

returns a seq array with 'RSKYWM' randomly replaced with resolved bases


Question: Generate . rst document for PyPi .

def Func ( ) : import argparse arg_0 = argparse . ArgumentParser ( ) arg_0 . add_argument ( '--doc' , dest = "doc" , action = "store_true" , default = False ) arg_1 , arg_2 . argv = arg_0 . parse_known_args ( arg_2 . argv ) if arg_1 . doc : import doc2md , pypandoc arg_4 = doc2md . doc2md ( doc2md . __doc__ , "doc2md" , toc = False ) Func = pypandoc . convert ( arg_4 , 'rst' , format = 'md' ) else : return None

Frees the memory used by all of the dynamically allocated C arrays.


Question: Extracts the year out of a datetime sample .

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

Attaches a bundle object

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


Question: Retrieves connection to Cloud Translate

def Func ( arg_0 ) : if not arg_0 . _client : arg_0 . _client = Client ( credentials = arg_0 . _get_credentials ( ) ) return arg_0 . _client

Set a property value or remove a property.

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

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

        This default implementation

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

        Removing a non-existing prop is NOT an error.

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

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


Question: Writes the graph G in dot file format for graphviz visualization .

def Func ( arg_0 , arg_1 ) : with io . open ( arg_1 , "w" ) as fh : fh . write ( "strict digraph DependencyDiagram {\n" ) arg_2 = arg_0 . edges ( ) arg_3 = set ( arg_0 . nodes ( ) ) if arg_2 : for arg_4 in sorted ( arg_2 ) : arg_5 , arg_6 = arg_4 arg_3 = arg_3 - set ( arg_5 ) arg_3 = arg_3 - set ( arg_6 ) arg_7 = '"{}" -> "{}";\n' fh . write ( arg_7 . format ( arg_5 , arg_6 ) ) if arg_3 : for arg_8 in sorted ( arg_3 ) : arg_7 = '"{}"\n' . format ( arg_8 ) fh . write ( arg_7 ) fh . write ( "}" )

This method increases the permanence values of synapses of columns whose
    activity level has been too low. Such columns are identified by having an
    overlap duty cycle that drops too much below those of their peers. The
    permanence values for such columns are increased.


Question: This validates the day_start_ut of the days table .

def Func ( arg_0 ) : arg_1 = GTFS ( arg_0 ) arg_2 = arg_0 . execute ( 'SELECT date, day_start_ut FROM days' ) for arg_3 , arg_4 in arg_2 : assert arg_4 == arg_1 . get_day_start_ut ( arg_3 )

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

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


Question: Check if hdl process has event depenency on signal

def Func ( arg_0 , arg_1 ) -> bool : if arg_0 is None : return False return arg_1 in arg_0 . simFallingSensProcs or arg_1 in arg_0 . simRisingSensProcs

Generate RENEWING time.

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

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


Question: Send X10 commands when module is used from the command line .

def Func ( arg_0 = None ) : if len ( arg_0 ) : arg_1 = ' ' . join ( arg_0 ) arg_2 , arg_1 = arg_1 . split ( None , 1 ) sendCommands ( arg_2 , arg_1 ) return 0

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Cut off all parts of the polygon that are outside of the image .

def Func ( arg_0 , arg_1 ) : import shapely . geometry if arg_0 . is_out_of_image ( arg_1 , fully = True , partly = False ) : return [ ] arg_2 , arg_3 = arg_1 . shape [ 0 : 2 ] if ia . is_np_array ( arg_1 ) else arg_1 [ 0 : 2 ] arg_4 = arg_0 . to_shapely_polygon ( ) arg_5 = shapely . geometry . Polygon ( [ ( 0 , 0 ) , ( arg_3 , 0 ) , ( arg_3 , arg_2 ) , ( 0 , arg_2 ) ] ) arg_6 = arg_4 . intersection ( arg_5 ) if not isinstance ( arg_6 , shapely . geometry . MultiPolygon ) : ia . do_assert ( isinstance ( arg_6 , shapely . geometry . Polygon ) ) arg_6 = shapely . geometry . MultiPolygon ( [ arg_6 ] ) arg_7 = [ ] for arg_8 in arg_6 . geoms : arg_7 . append ( Polygon . from_shapely ( arg_8 , label = arg_0 . label ) ) arg_9 = [ ] for arg_10 in arg_7 : arg_11 = False for arg_12 , arg_13 in arg_0 . exterior : arg_14 , arg_15 = arg_10 . find_closest_point_index ( arg_12 = arg_12 , arg_13 = arg_13 , return_distance = True ) if arg_15 < 1e-6 : arg_16 = arg_10 . change_first_point_by_index ( arg_14 ) arg_9 . append ( arg_16 ) arg_11 = True break ia . do_assert ( arg_11 ) return arg_9

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

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

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

    Returns:
        dataframe: result


Question: Dump a PKCS12 object as a string .

def Func ( arg_0 , arg_1 = None , arg_2 = 2048 , arg_3 = 1 ) : arg_1 = _text_to_bytes_and_warn ( "passphrase" , arg_1 ) if arg_0 . _cacerts is None : arg_4 = _ffi . NULL else : arg_4 = _lib . sk_X509_new_null ( ) arg_4 = _ffi . gc ( arg_4 , _lib . sk_X509_free ) for arg_5 in arg_0 . _cacerts : _lib . sk_X509_push ( arg_4 , arg_5 . _x509 ) if arg_1 is None : arg_1 = _ffi . NULL arg_6 = arg_0 . _friendlyname if arg_6 is None : arg_6 = _ffi . NULL if arg_0 . _pkey is None : arg_7 = _ffi . NULL else : arg_7 = arg_0 . _pkey . _pkey if arg_0 . _cert is None : arg_5 = _ffi . NULL else : arg_5 = arg_0 . _cert . _x509 arg_8 = _lib . PKCS12_create ( arg_1 , arg_6 , arg_7 , arg_5 , arg_4 , _lib . NID_pbe_WithSHA1And3_Key_TripleDES_CBC , _lib . NID_pbe_WithSHA1And3_Key_TripleDES_CBC , arg_2 , arg_3 , 0 ) if arg_8 == _ffi . NULL : _raise_current_error ( ) arg_8 = _ffi . gc ( arg_8 , _lib . PKCS12_free ) arg_9 = _new_mem_buf ( ) _lib . i2d_PKCS12_bio ( arg_9 , arg_8 ) return _bio_to_string ( arg_9 )

Propagate negative reset "rst_n" signal
    to all subcomponents


Question: Append to self accessible via Qt . QtCompat

def Func ( arg_0 , arg_1 , arg_2 ) : self . _Funced__ . append ( arg_1 ) setattr ( arg_0 , arg_1 , arg_2 )

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


Question: Write Stokes - calibrated filterbank file for a given observation with a calibrator noise diode measurement on the source

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = True , arg_4 = 'l' , ** arg_5 ) : arg_6 = Waterfall ( arg_1 , max_load = 150 ) arg_7 = arg_6 . data arg_8 = arg_6 . header [ 'tsamp' ] arg_9 = arg_6 . calc_n_coarse_chan ( ) arg_10 = arg_6 . header [ 'nchans' ] arg_11 = arg_10 / arg_9 arg_6 = None arg_12 , arg_13 , arg_14 , arg_15 = get_stokes ( arg_7 , arg_4 ) arg_7 = None print ( 'Calculating Mueller Matrix variables' ) arg_16 = gain_offsets ( arg_12 , arg_13 , arg_14 , arg_15 , arg_8 , arg_11 , arg_4 , ** arg_5 ) arg_17 = phase_offsets ( arg_12 , arg_13 , arg_14 , arg_15 , arg_8 , arg_11 , arg_4 , ** arg_5 ) arg_12 = None arg_13 = None arg_14 = None arg_15 = None print ( 'Opening ' + arg_0 ) arg_18 = Waterfall ( arg_0 , max_load = 150 ) arg_19 = arg_18 . calc_n_coarse_chan ( ) arg_20 = arg_18 . header [ 'nchans' ] arg_21 = arg_20 / arg_19 print ( 'Grabbing Stokes parameters' ) arg_22 , arg_23 , arg_24 , arg_25 = get_stokes ( arg_18 . data , arg_4 ) print ( 'Applying Mueller Matrix' ) arg_22 , arg_23 , arg_24 , arg_25 = apply_Mueller ( arg_22 , arg_23 , arg_24 , arg_25 , arg_16 , arg_17 , arg_21 , arg_4 ) if arg_3 == True : arg_18 . data [ : , 0 , : ] = np . squeeze ( arg_22 ) arg_18 . data [ : , 1 , : ] = np . squeeze ( arg_23 ) arg_18 . data [ : , 2 , : ] = np . squeeze ( arg_24 ) arg_18 . data [ : , 3 , : ] = np . squeeze ( arg_25 ) arg_18 . write_to_fil ( arg_0 [ : - 15 ] + '.SIQUV.polcal.fil' ) print ( 'Calibrated Stokes parameters written to ' + arg_0 [ : - 15 ] + '.SIQUV.polcal.fil' ) return arg_6 = Waterfall ( obs_I , max_load = 150 ) arg_6 . data = arg_22 arg_6 . write_to_fil ( arg_0 [ : - 15 ] + '.SI.polcal.fil' ) print ( 'Calibrated Stokes I written to ' + arg_0 [ : - 15 ] + '.SI.polcal.fil' ) arg_6 . data = arg_23 arg_6 . write_to_fil ( arg_0 [ : - 15 ] + '.Q.polcal.fil' ) print ( 'Calibrated Stokes Q written to ' + arg_0 [ : - 15 ] + '.Q.polcal.fil' ) arg_6 . data = arg_24 arg_6 . write_to_fil ( arg_0 [ : - 15 ] + '.U.polcal.fil' ) print ( 'Calibrated Stokes U written to ' + arg_0 [ : - 15 ] + '.U.polcal.fil' ) arg_6 . data = arg_25 arg_6 . write_to_fil ( arg_0 [ : - 15 ] + '.V.polcal.fil' ) print ( 'Calibrated Stokes V written to ' + arg_0 [ : - 15 ] + '.V.polcal.fil' )

Resolves VirtualEnvironments in CPENV_HOME


Question: Returns first occurrence of value of filter column matching filter criterion .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_0 . _get_column_index ( arg_1 ) arg_5 = arg_0 . _get_column_index ( arg_2 ) arg_6 = { float : lambda x : float ( x ) == arg_3 , int : lambda x : int ( x ) == arg_3 , str : lambda x : x . lower ( ) == arg_3 . lower ( ) } [ type ( arg_3 ) ] for arg_7 , arg_8 in enumerate ( arg_0 . _data ) : if arg_6 ( arg_8 [ arg_5 ] ) : break else : raise ValueError ( "Filter did not return any values." ) return arg_0 . _data [ arg_7 ] [ arg_4 ]

Reshape input and output dimensions of operator.

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

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

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


Question: Fit MeanShift clustering algorithm to data .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = False , ** arg_4 ) : if arg_2 is None : arg_2 = cl . estimate_bandwidth ( arg_1 ) arg_5 = cl . MeanShift ( arg_2 = arg_2 , arg_3 = arg_3 ) arg_5 . fit ( arg_1 ) return arg_5

activates error messages, useful during development


Question: Use msg as a warning .

def Func ( arg_0 , arg_1 ) : arg_0 . Funcings . append ( arg_1 ) sys . stderr . write ( "Coverage.py warning: %s\n" % arg_1 )

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


Question: Discover systems using WS - Discovery

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 : arg_3 = getattr ( logging , arg_1 , None ) if not arg_3 : print ( "Invalid log level '%s'" % arg_1 ) return logger . setLevel ( arg_3 ) run ( arg_0 = arg_0 , arg_2 = arg_2 )

Calculates bubble point for a given pressure

    Parameters
    ----------
    P : float
        Pressure, [Pa]
    zs : list[float]
        Overall mole fractions of all species, [-]
    vapor_pressure_eqns : list[functions]
        Temperature dependent function for each specie, Returns Psat, [Pa]
    fugacities : list[float], optional
        fugacities of each species, defaults to list of ones, [-]
    gammas : list[float], optional
        gammas of each species, defaults to list of ones, [-]

    Returns
    -------
    Tbubble : float, optional
        Temperature of bubble point at pressure `P`, [K]


Question: Process current member with op operation .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = None ) : unrarlib . RARProcessFileW ( arg_1 , arg_2 , arg_3 , arg_4 )

Resolves environment from .cpenv file...recursively walks up the tree
    in attempt to find a .cpenv file


Question: display connection info and store ports

def Func ( arg_0 ) : arg_1 = os . path . basename ( arg_0 . connection_file ) if arg_1 == arg_0 . connection_file or os . path . dirname ( arg_0 . connection_file ) == arg_0 . profile_dir . security_dir : arg_2 = arg_1 if arg_0 . profile != 'default' : arg_2 += " --profile %s" % arg_0 . profile else : arg_2 = arg_0 . connection_file arg_0 . log . critical ( "--existing %s" , arg_2 ) arg_0 . ports = dict ( shell = arg_0 . shell_port , iopub = arg_0 . iopub_port , stdin = arg_0 . stdin_port , hb = arg_0 . hb_port )

Refresh the project from the original cookiecutter template.


Question: Reimplemented for execution interruption and smart backspace .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . key ( ) if arg_0 . _control_key_down ( arg_1 . modifiers ( ) , include_command = False ) : if arg_2 == QtCore . Qt . Key_C and arg_0 . _executing : arg_0 . request_interrupt_kernel ( ) return True elif arg_2 == QtCore . Qt . Key_Period : arg_0 . request_restart_kernel ( ) return True elif not arg_1 . modifiers ( ) & QtCore . Qt . AltModifier : if arg_2 == QtCore . Qt . Key_Backspace : arg_3 = arg_0 . _get_input_buffer_cursor_column ( ) arg_4 = arg_0 . _control . textCursor ( ) if arg_3 > 3 and not arg_4 . hasSelection ( ) : arg_5 = arg_0 . _get_input_buffer_cursor_line ( ) [ : arg_3 ] if arg_5 . endswith ( '    ' ) and not arg_5 . strip ( ) : arg_4 . movePosition ( QtGui . QTextCursor . Left , QtGui . QTextCursor . KeepAnchor , 4 ) arg_4 . removeSelectedText ( ) return True return super ( FrontendWidget , arg_0 ) . Func ( arg_1 )

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: Function decorator that provides a session if it isn t provided . If you want to reuse a session or run the function as part of a database transaction you pass it to the function if not this wrapper will create one and close it for you .

def Func ( arg_0 ) : @ wraps ( arg_0 ) def wrapper ( * arg_1 , ** arg_2 ) : arg_3 = 'session' arg_4 = arg_0 . __code__ . co_varnames arg_5 = arg_3 in arg_4 and arg_4 . index ( arg_3 ) < len ( arg_1 ) arg_6 = arg_3 in arg_2 if arg_6 or arg_5 : return arg_0 ( * arg_1 , ** arg_2 ) else : with create_session ( ) as session : arg_2 [ arg_3 ] = session return arg_0 ( * arg_1 , ** arg_2 ) return wrapper

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


Question: Get available filters from dataset you ve selected

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . filters ( arg_1 ) arg_3 = [ ( k , v [ 0 ] ) for k , v in arg_2 . items ( ) ] return pd . DataFrame ( arg_3 , columns = [ "Filter" , "Description" ] )

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: Returns a list with the last n lines of the nextflow log file

def Func ( arg_0 , arg_1 = 300 ) : with open ( arg_0 . log_file ) as fh : arg_2 = fh . readlines ( ) [ - arg_1 : ] return arg_2


Question: Import assets into Tower .

def Func ( arg_0 = None , arg_1 = None , arg_2 = None , arg_3 = 'default' , arg_4 = False ) : from tower_cli . cli . transfer . Func import Sender arg_5 = Sender ( arg_4 ) arg_5 . Func ( arg_0 , arg_1 , arg_2 , arg_3 )


Question: Show a temporary message .

def Func ( arg_0 , arg_1 ) : if arg_0 . _message_handle is not None : arg_0 . _message_handle . cancel ( ) arg_0 . _message_handle = asyncio . get_event_loop ( ) . call_later ( arg_0 . _MESSAGE_DELAY_SECS , arg_0 . _clear_message ) arg_0 . _message = arg_1 arg_0 . _update ( )

Enables uniform interface to value and batch jacobian calculation.

  Works in both eager and graph modes.

  Arguments:
    f: The scalar function to evaluate.
    x: The value at which to compute the value and the batch jacobian.

  Returns:
    A tuple (f(x), J(x)), where J(x) is the batch jacobian.


Question: Deserialize a dataframe .

def Func ( arg_0 , arg_1 ) : _not_none ( 'reader' , arg_0 ) _not_none_or_empty ( 'data_type_id' , arg_1 ) arg_2 = _SERIALIZERS . get ( arg_1 ) if arg_2 is None : raise UnsupportedDatasetTypeError ( arg_1 ) return arg_2 [ 1 ] ( arg_0 = arg_0 )


Question: Return a record where all the duplicate fields have been removed .

def Func ( arg_0 ) : arg_1 = { } arg_2 = 0 arg_3 = sorted ( arg_0 . keys ( ) ) for arg_4 in arg_3 : arg_5 = arg_0 [ arg_4 ] arg_1 [ arg_4 ] = [ ] arg_6 = set ( ) for arg_7 in arg_5 : arg_8 = ( tuple ( arg_7 [ 0 ] ) , ) + arg_7 [ 1 : 4 ] if arg_8 not in arg_6 : arg_6 . add ( arg_8 ) arg_2 += 1 arg_1 [ arg_4 ] . append ( arg_7 [ : 4 ] + ( arg_2 , ) ) return 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: Only scott should do this . Upload new version to site .

def Func ( arg_0 , arg_1 = "nibjb" ) : print ( "popping up pasword window..." ) arg_2 = TK_askPassword ( "FTP LOGIN" , "enter password for %s" % arg_1 ) if not arg_2 : return print ( "username:" , arg_1 ) print ( "password:" , "*" * ( len ( arg_2 ) ) ) print ( "connecting..." ) arg_3 = ftplib . FTP ( "swharden.com" ) arg_3 . login ( arg_1 , arg_2 ) print ( "successful login!" ) arg_3 . cwd ( "/software/swhlab/versions" ) print ( "uploading" , os . path . basename ( arg_0 ) ) arg_3 . storbinary ( "STOR " + os . path . basename ( arg_0 ) , open ( arg_0 , "rb" ) , 1024 ) print ( "disconnecting..." ) arg_3 . quit ( )

Iterate over each learner and unlink inactive SAP channel learners.

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


Question: Close any of open connections

async def Func ( arg_0 ) : if arg_0 . _ws is not None : await arg_0 . _ws . Func ( ) if arg_0 . polygon is not None : await arg_0 . polygon . Func ( )

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: Execute create update delete operations on existing reliable dictionaries .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = Cluster . from_sfclient ( arg_0 ) arg_5 = arg_4 . get_application ( arg_1 ) . get_service ( arg_2 ) with open ( arg_3 ) as json_file : arg_6 = json . load ( json_file ) arg_5 . execute ( arg_6 ) return


Question: Inherit some functions from the components that we own . In particular let s grab all functions that begin with param_ so the super class knows how to get parameter groups . Also take anything that is listed under Component . exports and rename with the category type i . e . SphereCollection . add_particle - > Component . obj_add_particle

def Func ( arg_0 ) : arg_0 . _nopickle = [ ] for arg_2 in arg_0 . comps : arg_3 = inspect . getmembers ( arg_2 , predicate = inspect . ismethod ) for arg_4 in arg_3 : if arg_4 [ 0 ] . startswith ( 'param_' ) : setattr ( arg_0 , arg_4 [ 0 ] , arg_4 [ 1 ] ) arg_0 . _nopickle . append ( arg_4 [ 0 ] ) arg_3 = arg_2 . exports ( ) for arg_4 in arg_3 : arg_5 = arg_2 . category + '_' + arg_4 . __func__ . __name__ setattr ( arg_0 , arg_5 , arg_4 ) arg_0 . _nopickle . append ( arg_5 )


Question: Returns the fragment in a dictionary representation .

def Func ( arg_0 ) : return { 'content' : arg_0 . content , 'resources' : [ arg_1 . _asdict ( ) for arg_1 in arg_0 . resources ] , 'js_init_fn' : arg_0 . js_init_fn , 'js_init_version' : arg_0 . js_init_version , 'json_init_args' : arg_0 . json_init_args }

r"""
    Return the maximum of a waveform's dependent variable vector.

    :param wave: Waveform
    :type  wave: :py:class:`peng.eng.Waveform`

    :param indep_min: Independent vector start point of computation
    :type  indep_min: integer or float

    :param indep_max: Independent vector stop point of computation
    :type  indep_max: integer or float

    :rtype: float

    .. [[[cog cog.out(exobj_eng.get_sphinx_autodoc(raised=True)) ]]]
    .. Auto-generated exceptions documentation for
    .. peng.wave_functions.nmax

    :raises:
     * RuntimeError (Argument \`indep_max\` is not valid)

     * RuntimeError (Argument \`indep_min\` is not valid)

     * RuntimeError (Argument \`wave\` is not valid)

     * RuntimeError (Incongruent \`indep_min\` and \`indep_max\`
       arguments)

    .. [[[end]]]


Question: Parse the given color files .

def Func ( arg_0 ) : if arg_0 . endswith ( ".txt" ) : return parse_rgb_txt_file ( arg_0 ) elif arg_0 . endswith ( ".json" ) : return parse_json_color_file ( arg_0 ) raise TypeError ( "colorful only supports .txt and .json files for colors" )

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


Question: Propagate negative reset rst_n signal to all subcomponents

def Func ( arg_0 ) : arg_1 = arg_0 . rst_n for arg_2 in arg_0 . _units : _tryConnect ( arg_1 , arg_2 , 'rst_n' ) _tryConnect ( ~ arg_1 , arg_2 , 'rst' )

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


Question: Checks for common mistakes in comments .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = arg_0 . find ( '//' ) if arg_5 != - 1 : if re . sub ( r'\\.' , '' , arg_0 [ 0 : arg_5 ] ) . count ( '"' ) % 2 == 0 : if ( not ( Match ( r'^.*{ *//' , arg_0 ) and arg_3 == arg_5 ) and ( ( arg_5 >= 1 and arg_0 [ arg_5 - 1 ] not in string . whitespace ) or ( arg_5 >= 2 and arg_0 [ arg_5 - 2 ] not in string . whitespace ) ) ) : arg_4 ( arg_1 , arg_2 , 'whitespace/comments' , 2 , 'At least two spaces is best between code and comments' ) arg_6 = arg_0 [ arg_5 : ] arg_7 = _RE_PATTERN_TODO . match ( arg_6 ) if arg_7 : arg_8 = arg_7 . group ( 1 ) if len ( arg_8 ) > 1 : arg_4 ( arg_1 , arg_2 , 'whitespace/todo' , 2 , 'Too many spaces before TODO' ) arg_9 = arg_7 . group ( 2 ) if not arg_9 : arg_4 ( arg_1 , arg_2 , 'readability/todo' , 2 , 'Missing username in TODO; it should look like ' '"// TODO(my_username): Stuff."' ) arg_10 = arg_7 . group ( 3 ) if arg_10 != ' ' and arg_10 != '' : arg_4 ( arg_1 , arg_2 , 'whitespace/todo' , 2 , 'TODO(my_username) should be followed by a space' ) if ( Match ( r'//[^ ]*\w' , arg_6 ) and not Match ( r'(///|//\!)(\s+|$)' , arg_6 ) ) : arg_4 ( arg_1 , arg_2 , 'whitespace/comments' , 4 , 'Should have a space between // and comment' )


Question: Converts a Las from one point format to another Automatically upgrades the file version if source file version is not compatible with the new point_format_id

def Func ( arg_0 , * , arg_1 = None , arg_2 = None ) : if arg_1 is None : arg_1 = arg_0 . points_data . point_format . id if arg_2 is None : arg_2 = max ( arg_0 . header . version , dims . min_file_version_for_point_format ( arg_1 ) , ) else : arg_2 = str ( arg_2 ) dims . raise_if_version_not_compatible_with_fmt ( arg_1 , arg_2 ) arg_3 = headers . HeaderFactory . Func_header ( arg_0 . header , arg_2 ) arg_3 . point_format_id = arg_1 arg_4 = PointFormat ( arg_1 , arg_0 . points_data . point_format . extra_dims ) arg_5 = record . PackedPointRecord . from_point_record ( arg_0 . points_data , arg_4 ) try : arg_6 = arg_0 . evlrs except ValueError : arg_6 = [ ] if arg_2 >= "1.4" : arg_7 = las14 . LasData ( arg_3 = arg_3 , vlrs = arg_0 . vlrs , arg_5 = arg_5 , arg_6 = arg_6 ) else : if arg_6 : logger . warning ( "The source contained {} EVLRs," " they will be lost as version {} doest not support them" . format ( len ( arg_6 ) , arg_2 ) ) arg_7 = las12 . LasData ( arg_3 = arg_3 , vlrs = arg_0 . vlrs , arg_5 = arg_5 ) return arg_7

Configure session for particular device

        Returns:
            tensorflow.Session


Question: Windows helper for ub . symlink

def Func ( arg_0 , arg_1 , arg_2 = 0 , arg_3 = 0 ) : if exists ( arg_1 ) and not os . path . islink ( arg_1 ) : if arg_3 : print ( 'link location already exists' ) arg_4 = _win32_is_junction ( arg_1 ) if os . path . isdir ( arg_1 ) : if arg_4 : arg_5 = _win32_read_junction ( arg_1 ) if arg_0 == arg_5 : if arg_3 : print ( '...and is a junction that points to the same place' ) return arg_1 else : if arg_3 : if not exists ( arg_5 ) : print ( '...and is a broken junction that points somewhere else' ) else : print ( '...and is a junction that points somewhere else' ) else : if arg_3 : print ( '...and is an existing real directory!' ) raise IOError ( 'Cannot overwrite a real directory' ) elif os . path . isfile ( arg_1 ) : if _win32_is_hardlinked ( arg_1 , arg_0 ) : if arg_3 : print ( '...and is a hard link that points to the same place' ) return arg_1 else : if arg_3 : print ( '...and is a hard link that points somewhere else' ) if _win32_canFunc ( ) : raise IOError ( 'Cannot overwrite potentially real file if we can symlink' ) if arg_2 : if arg_3 : print ( '...overwriting' ) util_io . delete ( arg_1 , arg_3 > 1 ) else : if exists ( arg_1 ) : raise IOError ( 'Link already exists' ) _win32Func2 ( arg_0 , arg_1 , arg_3 = arg_3 )

Return the metadata for the specified course run.

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


Question: Expands all environment variables in a settings dictionary .

def Func ( arg_0 ) : return dict ( ( arg_1 , os . path . expandvars ( arg_2 ) ) for arg_1 , arg_2 in arg_0 . iteritems ( ) )

Create a deep copy of the segmentation map object.

        Returns
        -------
        imgaug.SegmentationMapOnImage
            Deep copy.


Question: Converts output audio to the specified format .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : arg_4 = [ 8 , 16 , 24 , 32 , 64 ] if arg_3 is not None : if arg_3 not in arg_4 : raise ValueError ( "bitdepth must be one of {}." . format ( str ( arg_4 ) ) ) arg_0 . output_format . extend ( [ '-b' , '{}' . format ( arg_3 ) ] ) if arg_2 is not None : if not isinstance ( arg_2 , int ) or arg_2 <= 0 : raise ValueError ( "n_channels must be a positive integer." ) arg_0 . output_format . extend ( [ '-c' , '{}' . format ( arg_2 ) ] ) if arg_1 is not None : if not is_number ( arg_1 ) or arg_1 <= 0 : raise ValueError ( "samplerate must be a positive number." ) arg_0 . rate ( arg_1 ) return arg_0

Get a Connection instance.

    Parameters:
    ----------------------------------------------------------------
    retval:       A ConnectionWrapper instance. NOTE: Caller
                    is responsible for calling the  ConnectionWrapper
                    instance's release() method or use it in a context manager
                    expression (with ... as:) to release resources.


Question: Remove hidden notes and tag a CERN if detected .

def Func ( arg_0 ) : if not arg_0 . tag_as_cern : arg_1 = record_get_field_instances ( arg_0 . record , tag = "595" ) for arg_2 in arg_1 : for arg_3 , arg_4 in arg_2 [ 0 ] : if arg_4 == "CDS" : arg_0 . tag_as_cern = True record_delete_fields ( arg_0 . record , tag = "595" )

Setup a regular padded grid from a 2D array shape, psf-shape and pixel-scale.

        The center of every pixel is used to setup the grid's (y,x) arc-second coordinates, including padded pixels \
        which are beyond the input shape but will blurred light into the 2D array's shape due to the psf.

        Parameters
        ----------
        shape : (int, int)
            The (y,x) shape of the masked-grid's 2D image in units of pixels.
        psf_shape : (int, int)
           The shape of the psf which defines the blurring region and therefore size of padding.
        pixel_scale : float
            The scale of each pixel in arc seconds


Question: Prepare pending handlers .

def Func ( arg_0 ) : if not arg_0 . _unprepared_pending : return for arg_1 in list ( arg_0 . _unprepared_pending ) : arg_0 . _configure_io_handler ( arg_1 ) arg_0 . check_events ( )

Generate requested statistics for a dataset and cache to a file.
  If filename is None, then don't cache to a file


Question: Renames an existing database .

def Func ( arg_0 , arg_1 , arg_2 ) : log . info ( 'renaming database from %s to %s' % ( arg_1 , arg_2 ) ) arg_0 . _run_stmt ( 'alter database %s Func to %s' % ( arg_1 , arg_2 ) )

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

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

        req -- a requests prepared request object


Question: initialize VCGWriter for a UML graph

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . graph_file = open ( arg_1 , "w+" ) arg_0 . printer = VCGPrinter ( arg_0 . graph_file ) arg_0 . printer . open_graph ( title = arg_2 , layoutalgorithm = "dfs" , late_edge_labels = "yes" , port_sharing = "no" , manhattan_edges = "yes" , ) arg_0 . printer . emit_node = arg_0 . printer . node arg_0 . printer . emit_edge = arg_0 . printer . edge

Play the video and block whilst the video is playing


Question: Return flake8 badge color .

def Func ( arg_0 ) : arg_1 = ( 0 , 20 , 50 , 100 , 200 ) for arg_2 in range ( len ( arg_1 ) ) : if arg_0 <= arg_1 [ arg_2 ] : return BADGE_COLORS [ arg_2 ] return BADGE_COLORS [ - 1 ]

Renew the message lock.

        This will maintain the lock on the message to ensure
        it is not returned to the queue to be reprocessed. In order to complete (or otherwise settle)
        the message, the lock must be maintained. Messages received via ReceiveAndDelete mode are not
        locked, and therefore cannot be renewed. This operation can also be performed as an asynchronous
        background task by registering the message with an `azure.servicebus.aio.AutoLockRenew` instance.
        This operation is only available for non-sessionful messages.

        :raises: TypeError if the message is sessionful.
        :raises: ~azure.servicebus.common.errors.MessageLockExpired is message lock has already expired.
        :raises: ~azure.servicebus.common.errors.SessionLockExpired if session lock has already expired.
        :raises: ~azure.servicebus.common.errors.MessageAlreadySettled is message has already been settled.


Question: Returns paramters used to process data .

def Func ( arg_0 ) : arg_1 = [ 'sample' , 'ratio_params' , 'despike_params' , 'autorange_params' , 'bkgcorrect_params' ] arg_2 = { } for arg_3 in arg_1 : arg_2 [ arg_3 ] = getattr ( arg_0 , arg_3 ) arg_2 [ 'filter_params' ] = arg_0 . filt . params arg_2 [ 'filter_sequence' ] = arg_0 . filt . sequence arg_2 [ 'filter_used' ] = arg_0 . filt . make_keydict ( ) return arg_2

Create the prior distribution.

  Args:
    num_topics: Number of topics.
    initial_value: The starting value for the prior parameters.

  Returns:
    prior: A `callable` that returns a `tf.distribution.Distribution`
        instance, the prior distribution.
    prior_variables: A `list` of `Variable` objects, the trainable parameters
        of the prior.


Question: Identify the release type and create a new target file with TOML header .

def Func ( arg_0 ) : arg_1 , arg_2 , arg_3 = arg_0 if "a" in arg_3 : arg_4 = "alpha" if "b" in arg_3 : arg_4 = "beta" else : arg_4 = find_bump ( arg_2 , arg_3 ) arg_5 = "{}.md" . format ( arg_3 ) arg_6 = copy ( join ( arg_1 , arg_5 ) , arg_2 ) build_hugo_md ( arg_6 , arg_3 , arg_4 )

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

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


Question: parses a chunk of bytes to integer using big - endian representation

def Func ( arg_0 , arg_1 ) : return sum ( [ 256 ** ( arg_0 . chunklen [ 0 ] - 1 - arg_2 ) * ord_byte ( arg_1 [ arg_2 ] ) for arg_2 in range ( arg_0 . chunklen [ 0 ] ) ] )

Print informations about PyFunceble and the date of generation of a file
        into a given path, if doesn't exist.