Question: Add or change list of logbooks .

def Func ( arg_0 , arg_1 = None , arg_2 = [ ] , arg_3 = "" ) : if arg_1 is not None and len ( arg_2 ) != 0 : if arg_1 in arg_0 . logList : for arg_4 in arg_2 : if arg_4 not in arg_0 . logList . get ( arg_1 ) [ 0 ] : arg_0 . logList . get ( arg_1 ) [ 0 ] . append ( arg_4 ) else : arg_0 . logList [ arg_1 ] = [ ] arg_0 . logList [ arg_1 ] . append ( arg_2 ) if len ( arg_0 . logList [ arg_1 ] ) > 1 and arg_3 != "" : arg_0 . logList . get ( arg_1 ) [ 1 ] == arg_3 else : arg_0 . logList . get ( arg_1 ) . append ( arg_3 ) arg_0 . logType . clear ( ) arg_0 . logType . addItems ( list ( arg_0 . logList . keys ( ) ) ) arg_0 . changeLogType ( )


Question: Register classes that could be initialized from JSON configuration file . If name is not passed the class name is converted to snake - case .

def Func ( arg_0 : arg_1 = None ) -> arg_3 : def decorate ( arg_2 : arg_3 , arg_4 : arg_1 = None ) -> arg_3 : arg_5 = arg_4 or short_name ( arg_2 ) global arg_7 arg_6 = arg_2 . __module__ + ':' + arg_2 . __name__ if arg_5 in arg_7 and arg_7 [ arg_5 ] != arg_6 : logger . warning ( 'Registry name "{}" has been already Funced and will be overwritten.' . format ( arg_5 ) ) arg_7 [ arg_5 ] = arg_6 return arg_2 return lambda model_cls_name : decorate ( model_cls_name , arg_0 )

Checks if a data is csr, csc, bsr, or dia Scipy sparse matrix


Question: Construct a validation schema for a given namespace .

def Func ( arg_0 ) : if arg_0 not in __NAMESPACE__ : raise NamespaceError ( 'Unknown Func: {:s}' . format ( arg_0 ) ) arg_1 = copy . deepcopy ( JAMS_SCHEMA [ 'definitions' ] [ 'SparseObservation' ] ) for arg_2 in [ 'value' , 'confidence' ] : try : arg_1 [ 'properties' ] [ arg_2 ] = __NAMESPACE__ [ arg_0 ] [ arg_2 ] except KeyError : pass return arg_1

Return an open file-object to the index file


Question: Reduce dicts of dicts to dot separated keys .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = { } for arg_5 , arg_6 , arg_3 in iterate_schema ( arg_1 , arg_2 , arg_3 ) : arg_7 = arg_5 [ 'name' ] arg_8 = arg_5 [ 'type' ] arg_9 = arg_5 [ 'label' ] arg_10 = arg_6 [ arg_7 ] if arg_7 in arg_6 else None arg_4 [ arg_3 ] = { 'name' : arg_7 , 'value' : arg_10 , 'type' : arg_8 , 'label' : arg_9 } return arg_4

r"""Bernoulli likelihood sampling.

    Sample according to

    .. math::

        \mathbf y \sim \prod_{i=1}^n
        \text{Bernoulli}(\mu_i = \text{logit}(z_i))
        \mathcal N(~ o \mathbf 1 + \mathbf a^\intercal \boldsymbol\alpha;
        ~ (h^2 - v_c)\mathrm G^\intercal\mathrm G +
        (1-h^2-v_c)\mathrm I ~)

    using the canonical Logit link function to define the conditional Bernoulli
    mean :math:`\mu_i`.

    The causal :math:`\mathbf a` covariates and the corresponding effect-sizes
    are randomly draw according to the following idea. The ``causal_variants``,
    if given, are first mean-zero and std-one normalized and then having
    its elements divided by the squared-root the the number of variances::

        causal_variants = _stdnorm(causal_variants, axis=0)
        causal_variants /= sqrt(causal_variants.shape[1])

    The causal effect-sizes :math:`\boldsymbol\alpha` are draw from
    :math:`\{-1, +1\}` and subsequently normalized for mean-zero and std-one""

    Parameters
    ----------
    random_state : random_state
        Set the initial random state.

    Example
    -------

    .. doctest::

        >>> from glimix_core.random import bernoulli_sample
        >>> from numpy.random import RandomState
        >>> offset = 5
        >>> G = [[1, -1], [2, 1]]
        >>> bernoulli_sample(offset, G, random_state=RandomState(0))
        array([1., 1.])


Question: Population parameter vals == average member parameter vals

def Func ( arg_0 ) : if len ( arg_0 . __members ) != 0 : if arg_0 . __num_processes > 1 : arg_1 = [ m . get ( ) for m in arg_0 . __members ] else : arg_1 = arg_0 . __members arg_2 = { } for arg_3 in arg_0 . __Func : arg_2 [ arg_3 . name ] = sum ( m . Func [ arg_3 . name ] for m in arg_1 ) / len ( arg_1 ) return arg_2 else : return None

Using the record length and appropriate start points, seek to the
        country that corresponds to the converted IP address integer.
        Return offset of record.

        :arg ipnum: Result of ip2long conversion


Question: Creates a connection based upon the given configuration object .

def Func ( arg_0 ) : arg_1 = { } arg_1 [ 'hosts' ] = [ arg_0 . get ( 'jackal' , 'host' ) ] if int ( arg_0 . get ( 'jackal' , 'use_ssl' ) ) : arg_1 [ 'use_ssl' ] = True if arg_0 . get ( 'jackal' , 'ca_certs' ) : arg_1 [ 'ca_certs' ] = arg_0 . get ( 'jackal' , 'ca_certs' ) if int ( arg_0 . get ( 'jackal' , 'client_certs' ) ) : arg_1 [ 'client_cert' ] = arg_0 . get ( 'jackal' , 'client_cert' ) arg_1 [ 'client_key' ] = arg_0 . get ( 'jackal' , 'client_key' ) arg_1 [ 'ssl_assert_hostname' ] = False connections . Func ( ** arg_1 )

Builds fake MNIST-style data for unit testing.


Question: A free - text query resolver by Wolfram|Alpha . Returns the first result if available .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_0 = wolframalpha . Client ( pmxbot . config [ 'Wolfram|Alpha API key' ] ) arg_5 = arg_0 . query ( arg_4 ) return next ( arg_5 . results ) . text

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


Question: Sends commands to QTM

def Func ( arg_0 , arg_1 , arg_2 = True , arg_3 = arg_4 . PacketCommand ) : if arg_0 . transport is not None : arg_6 = len ( arg_1 ) LOG . debug ( "S: %s" , arg_1 ) arg_0 . transport . write ( struct . pack ( RTCommand % arg_6 , RTheader . size + arg_6 + 1 , arg_3 . value , arg_1 . encode ( ) , b"\0" , ) ) arg_7 = arg_0 . loop . create_future ( ) if arg_2 : arg_0 . request_queue . append ( arg_7 ) else : arg_7 . set_result ( None ) return arg_7 raise QRTCommandException ( "Not connected!" )

Return a list of all enrollments for the passed section_id.

        https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index


Question: Delete a model on the h2o cluster given its key .

def Func ( arg_0 , arg_1 , arg_2 = True , arg_3 = 60 , ** arg_4 ) : assert arg_1 is not None , '"key" parameter is null' arg_5 = arg_0 . do_json_request ( '/3/Models.json/' + arg_1 , cmd = 'delete' , timeout = arg_3 ) if not arg_2 and 'f00b4r' in arg_5 : raise ValueError ( 'Model key not found: ' + arg_1 ) verboseprint ( "Func result:" , dump_json ( arg_5 ) ) return arg_5

Decode the data passed in and potentially flush the decoder.


Question: Get a rate for a given currency and date .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 == arg_0 . ref_currency : return 1.0 if arg_2 not in arg_0 . _rates [ arg_1 ] : arg_3 , arg_4 = arg_0 . bounds [ arg_1 ] if not arg_0 . fallback_on_wrong_date : raise RateNotFoundError ( '{0} not in {1} bounds {2}/{3}' . format ( arg_2 , arg_1 , arg_3 , arg_4 ) ) if arg_2 < arg_3 : arg_5 = arg_3 elif arg_2 > arg_4 : arg_5 = arg_4 else : raise AssertionError ( 'Should never happen, bug in the code!' ) if arg_0 . verbose : print ( r'/!\ {0} not in {1} bounds {2}/{3}, falling back to {4}' . format ( arg_2 , arg_1 , arg_3 , arg_4 , arg_5 ) ) arg_2 = arg_5 arg_6 = arg_0 . _rates [ arg_1 ] [ arg_2 ] if arg_6 is None : raise RateNotFoundError ( '{0} has no rate for {1}' . format ( arg_1 , arg_2 ) ) return arg_6

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


Question: Provide the run IDs of failed jobs

def Func ( arg_0 , arg_1 ) : for arg_2 in arg_1 : try : arg_0 . clusterprocids_finished . remove ( arg_2 ) except ValueError : pass

initialize the merger model with a coalescent time

        Args:
            - Tc:   a float or an iterable, if iterable another argument T of same shape is required
            - T:    an array like of same shape as Tc that specifies the time pivots corresponding to Tc
        Returns:
            - None


Question: Tokenize a document and add an annotation attribute to each token

def Func ( arg_0 , arg_1 ) : arg_2 = tokenize ( arg_0 , include_hrefs = False ) for arg_3 in arg_2 : arg_3 . annotation = arg_1 return arg_2

Destroy the SQLStepQueue tables in the database


Question: Generator that yields one by one the return value for self . read_dcm for each file within this set

def Func ( arg_0 ) : try : for arg_1 in arg_0 . items : yield arg_0 . read_dcm ( arg_1 ) except IOError as ioe : raise IOError ( 'Error reading DICOM file: {}.' . format ( arg_1 ) ) from ioe

Called when there is an error in the websocket


Question: Return binding energies instead of mass excesses

Returns Hugo Larochelle's binary static MNIST tf.data.Dataset.


Question: Debugging method to print out frames in hex .

def Func ( arg_0 ) : arg_1 = "" for arg_2 in arg_0 : arg_1 += "\\x" + format ( arg_2 , "02x" ) _LOGGER . debug ( arg_1 )


Question: Get the name of the item .

def Func ( arg_0 ) : arg_1 = arg_0 . xmlnode . prop ( "name" ) if not arg_1 : arg_1 = "" return arg_1 . decode ( "utf-8" )

Convert a 2D array of items into a Markdown table.

    padding: the number of padding spaces on either side of each divider
    divider: the vertical divider to place between columns
    header_div: the horizontal divider to place between the header row and
        body cells


Question: Break out a date from Omnimeter read .

def Func ( arg_0 ) : arg_1 = str ( arg_0 ) arg_2 = namedtuple ( 'EkmDate' , [ 'yy' , 'mm' , 'dd' , 'weekday' , 'hh' , 'minutes' , 'ss' ] ) if len ( arg_1 ) != 14 : arg_2 . yy = arg_2 . mm = arg_2 . dd = arg_2 . weekday = arg_2 . hh = arg_2 . minutes = arg_2 . ss = 0 return arg_2 arg_2 . yy = int ( arg_1 [ 0 : 2 ] ) arg_2 . mm = int ( arg_1 [ 2 : 4 ] ) arg_2 . dd = int ( arg_1 [ 4 : 6 ] ) arg_2 . weekday = int ( arg_1 [ 6 : 8 ] ) arg_2 . hh = int ( arg_1 [ 8 : 10 ] ) arg_2 . minutes = int ( arg_1 [ 10 : 12 ] ) arg_2 . ss = int ( arg_1 [ 12 : 14 ] ) return arg_2

Check the spacing of a single equals sign.


Question: Extract metadata entries from an xml node

def Func ( arg_0 ) : arg_1 = None arg_2 = None if 'key' in arg_0 . attrib : arg_1 = arg_0 . attrib [ 'key' ] else : arg_1 = None if arg_1 in [ 'time' , 'elevation' ] or arg_1 . startswith ( 'custom_dimension' ) : arg_2 = md_dimension_info ( arg_1 , arg_0 . find ( "dimensionInfo" ) ) elif arg_1 == 'DynamicDefaultValues' : arg_2 = md_dynamic_default_values_info ( arg_1 , arg_0 . find ( "DynamicDefaultValues" ) ) elif arg_1 == 'JDBC_VIRTUAL_TABLE' : arg_2 = md_jdbc_virtual_table ( arg_1 , arg_0 . find ( "virtualTable" ) ) else : arg_2 = arg_0 . text if None in [ arg_1 , arg_2 ] : return None else : return ( arg_1 , arg_2 )


Question: Alias for _assemble_with_columns

def Func ( arg_0 , arg_1 , arg_2 , * arg_3 , ** arg_4 ) : warnings . warn ( "Func has been depreciated for _assemble_with_columns. It will be removed in a future version." , DeprecationWarning ) return arg_0 . _assemble_with_columns ( arg_1 , arg_2 , * arg_3 , ** arg_4 )

Implementation of the Context Likelihood or Relatedness Network algorithm.

    Args:
     mat (numpy.ndarray): matrix, if it is a square matrix, the program assumes
         it is a relevance matrix where mat(i,j) represents the similarity content
         between nodes i and j. Elements of matrix should be
         non-negative.

    Returns:
    mat_nd (numpy.ndarray): Output deconvolved matrix (direct dependency matrix). Its components
        represent direct edge weights of observed interactions.

    .. note::
       Ref:Jeremiah J. Faith, Boris Hayete, Joshua T. Thaden, Ilaria Mogno, Jamey
       Wierzbowski, Guillaume Cottarel, Simon Kasif, James J. Collins, and Timothy
       S. Gardner. Large-scale mapping and validation of escherichia coli
       transcriptional regulation from a compendium of expression profiles.
       PLoS Biology, 2007


Question: Open authorize page in a browser print the url if it didn t work

async def Func ( arg_0 ) : arg_1 = "https://api.twitter.com/oauth/authorize?oauth_token=" + arg_0 try : arg_2 = webbrowser . open ( arg_1 ) await asyncio . sleep ( 2 ) if not arg_2 : raise RuntimeError except RuntimeError : print ( "could not open a browser\ngo here to enter your PIN: " + arg_1 ) arg_3 = input ( "\nEnter your PIN: " ) return arg_3

Set's the package's description.
        Raises CardinalityError if description already set.
        Raises OrderError if no package previously defined.


Question: Adds a memory to an event .

def Func ( arg_0 , arg_1 ) : arg_2 = get_object_or_404 ( Event , arg_1 = arg_1 ) arg_3 = MemoryForm ( arg_0 . POST or None , arg_0 . FILES or None ) if arg_3 . is_valid ( ) : arg_4 = arg_3 . save ( commit = False ) arg_4 . user = arg_0 . user arg_4 . event = arg_2 arg_4 . save ( ) arg_6 = "Your thoughts were added. " if arg_0 . FILES : arg_7 = arg_0 . FILES . getlist ( 'photos' ) arg_8 = len ( arg_7 ) for arg_9 in arg_7 : process_upload ( arg_9 , arg_4 , arg_3 , arg_2 , arg_0 ) if arg_8 > 1 : arg_6 += "{} images were added and should appear soon." . format ( arg_8 ) else : arg_6 += "{} image was added and should appear soon." . format ( arg_8 ) messages . success ( arg_0 , arg_6 ) return HttpResponseRedirect ( '../' ) return render ( arg_0 , 'happenings/add_memories.html' , { 'form' : arg_3 , 'event' : arg_2 } )

Attempts to fetch streams repeatedly
       until some are returned or limit hit.


Question: Compare generated mechanisms to actual ones .

def Func ( arg_0 : arg_1 , arg_2 : arg_3 = 'Subgraph' ) -> Mapping [ arg_3 , Mapping [ arg_3 , float ] ] : arg_4 = get_subgraphs_by_annotation ( arg_0 , arg_2 ) arg_5 = _transform_graph_dict_to_node_dict ( arg_4 ) arg_6 = generate_bioprocess_mechanisms ( arg_0 ) arg_7 = _transform_graph_dict_to_node_dict ( arg_6 ) arg_8 : Dict [ arg_3 , Dict [ arg_3 , float ] ] = defaultdict ( dict ) arg_9 = itt . product ( arg_5 . items ( ) , arg_7 . items ( ) ) for ( arg_10 , arg_11 ) , ( arg_12 , arg_13 ) in arg_9 : arg_14 = tanimoto_set_similarity ( arg_7 , arg_5 ) arg_8 [ arg_10 ] [ arg_12 ] = arg_14 return dict ( arg_8 )

Print STDOUT resulting from a Bash shell command formatted in reStructuredText.

    :param command: Bash shell command
    :type  command: string

    :param nindent: Indentation level
    :type  nindent: integer

    :param env: Environment variable replacement dictionary. The Bash
                command is pre-processed and any environment variable
                represented in the full notation (:bash:`${...}`) is replaced.
                The dictionary key is the environment variable name and the
                dictionary value is the replacement value. For example, if
                **command** is :code:`'${PYTHON_CMD} -m "x=5"'` and **env**
                is :code:`{'PYTHON_CMD':'python3'}` the actual command issued
                is :code:`'python3 -m "x=5"'`
    :type  env: dictionary

    :param fpointer: Output function pointer. Normally is :code:`cog.out` but
                     :code:`print` or other functions can be used for
                     debugging
    :type  fpointer: function object

    :param cols: Number of columns of output
    :type  cols: integer


Question: Execute a BigQuery query multiple times with different parameters .

def Func ( arg_0 , arg_1 , arg_2 ) : for arg_3 in arg_2 : arg_0 . execute ( arg_1 , arg_3 )

Manage the response when the server rejects a message.

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


Question: r Method to set the T P and composition dependent property methods desired for consideration by the user . Can be used to exclude certain methods which might have unacceptable accuracy .

def Func ( arg_0 , arg_1 , arg_2 = False ) : if isinstance ( arg_1 , str ) : arg_1 = [ arg_1 ] arg_0 . user_methods = arg_1 arg_0 . forced = arg_2 if set ( arg_0 . user_methods ) . difference ( arg_0 . all_methods ) : raise Exception ( "One of the given methods is not available for this mixture" ) if not arg_0 . user_methods and arg_0 . forced : raise Exception ( 'Only user specified methods are considered when forced is True, but no methods were provided' ) arg_0 . method = None arg_0 . sorted_valid_methods = [ ] arg_0 . TP_zs_ws_cached = ( None , None , None , None )

This function adds the given stream to the logger, but does not check with a ConnectorDB database
        to make sure that the stream exists. Use at your own risk.


Question: Run all abort tasks then all exit tasks then exit with error return status

def Func ( arg_0 , arg_1 ) : arg_0 . log . info ( 'Signal handler received Func request' ) arg_0 . _Func ( arg_1 ) arg_0 . _exit ( arg_1 ) os . _exit ( 1 )

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


Question: Build change - of - basis matrices for constrained seasonal effects .

def Func ( arg_0 , arg_1 ) : arg_2 = np . eye ( arg_0 ) - 1. / arg_0 arg_2 [ - 1 , : ] = 1. / arg_0 arg_3 = np . linalg . inv ( arg_2 ) arg_4 = arg_2 [ : - 1 , : ] arg_5 = arg_3 [ : , : - 1 ] arg_4 = tf . cast ( arg_4 , arg_1 = arg_1 , name = 'effects_to_residuals' ) arg_5 = tf . cast ( arg_5 , arg_1 = arg_1 , name = 'residuals_to_effects' ) return arg_4 , arg_5


Question: Return the PhoneticSpanish coding of word .

def Func ( arg_0 , arg_1 , arg_2 = - 1 ) : arg_1 = unicode_normalize ( 'NFKD' , text_type ( arg_1 . upper ( ) ) ) arg_1 = '' . join ( c for c in arg_1 if c in arg_0 . _uc_set ) arg_1 = arg_1 . replace ( 'LL' , 'L' ) arg_1 = arg_1 . replace ( 'R' , 'R' ) arg_3 = arg_1 . translate ( arg_0 . _trans ) if arg_2 > 0 : arg_3 = ( arg_3 + ( '0' * arg_2 ) ) [ : arg_2 ] return arg_3

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: Create a map of command names and handlers

def Func ( ) : return { 'activate' : activate , 'config' : hconfig , 'deactivate' : deactivate , 'help' : cli_help , 'kill' : kill , 'restart' : restart , 'submit' : submit , 'update' : update , 'version' : version }

Generates and writes the media pages for all media in the gallery


Question: Increase the processed task counter and show progress message

def Func ( arg_0 ) : arg_0 . Func_tasks += 1 arg_1 = arg_0 . tasks . qsize ( ) if arg_1 > 0 : progress ( '[%d task(s) completed, %d remaining, %d thread(s)]' , arg_0 . Func_tasks , arg_1 , len ( arg_0 . workers ) ) else : progress ( '[%d task(s) completed, %d thread(s)]' , arg_0 . Func_tasks , len ( arg_0 . workers ) )

Configure the Outstation's database of input point definitions.

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


Question: Return a map from the input stream .

def Func ( arg_0 : arg_1 ) -> lmap . Map : arg_2 = arg_0 . reader arg_3 = arg_2 . advance ( ) assert arg_3 == "{" arg_4 : MutableMapping [ Any , Any ] = { } while True : if arg_2 . peek ( ) == "}" : arg_2 . next_token ( ) break arg_5 = _read_next ( arg_0 ) if arg_5 is COMMENT : continue while True : if arg_2 . peek ( ) == "}" : raise SyntaxError ( "Unexpected token '}'; expected map value" ) arg_6 = _read_next ( arg_0 ) if arg_6 is COMMENT : continue if arg_5 in arg_4 : raise SyntaxError ( f"Duplicate key '{k}' in map literal" ) break arg_4 [ arg_5 ] = arg_6 return lmap . map ( arg_4 )

Create a tuning job

        :param config: the config for tuning
        :type config: dict
        :param wait_for_completion: if the program should keep running until job finishes
        :type wait_for_completion: bool
        :param check_interval: the time interval in seconds which the operator
            will check the status of any SageMaker job
        :type check_interval: int
        :param max_ingestion_time: the maximum ingestion time in seconds. Any
            SageMaker jobs that run longer than this will fail. Setting this to
            None implies no timeout for any SageMaker job.
        :type max_ingestion_time: int
        :return: A response to tuning job creation


Question: Convert types of task fields .

def Func ( arg_0 , arg_1 ) : arg_2 = [ 'last-update' , 'create-time' , 'start-time' , 'end-time' ] arg_3 = [ 'task-attempt' ] for arg_4 in arg_2 : if arg_4 in arg_1 : arg_1 [ arg_4 ] = arg_0 . default_format_date ( arg_1 [ arg_4 ] ) for arg_4 in arg_3 : if arg_4 in arg_1 and arg_1 [ arg_4 ] is not None : arg_1 [ arg_4 ] = int ( arg_1 [ arg_4 ] ) return arg_1

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: Exchange an Authorization Code for an Access Token .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : check_type ( arg_1 , basestring , may_be_none = False ) check_type ( arg_2 , basestring , may_be_none = False ) check_type ( arg_3 , basestring , may_be_none = False ) check_type ( arg_4 , basestring , may_be_none = False ) arg_5 = dict_from_items_with_values ( grant_type = "authorization_code" , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , ) arg_6 = requests . post ( arg_0 . _endpoint_url , data = arg_5 , ** arg_0 . _request_kwargs ) check_response_code ( arg_6 , EXPECTED_RESPONSE_CODE [ 'POST' ] ) arg_7 = extract_and_parse_json ( arg_6 ) return arg_0 . _object_factory ( OBJECT_TYPE , arg_7 )

Does this filename match any of the patterns?


Question: Retrieve a list of actions supported by the object .

def Func ( arg_0 ) : arg_1 = _a11y . AXUIElement . Func ( arg_0 ) return [ arg_2 [ 2 : ] for arg_2 in arg_1 ]

Returns the Session currently used.

        :return: An instance of :class:`OpenSSL.SSL.Session` or
            :obj:`None` if no session exists.

        .. versionadded:: 0.14


Question: Flip the shape in the x direction in - place .

def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_0 . poly . flip ( ) else : arg_0 . poly . flip ( arg_1 [ 0 ] )

Stop streaming samples from device and delete samples buffer


Question: Assign parent statement and propagate dependency flags if necessary

def Func ( arg_0 , arg_1 : "HdlStatement" ) : arg_2 = arg_0 . parentStm is None arg_0 . parentStm = arg_1 if not arg_0 . _now_is_event_dependent and arg_1 . _now_is_event_dependent : arg_0 . _on_parent_event_dependent ( ) arg_3 = arg_1 while arg_3 . parentStm is not None : arg_3 = arg_3 . parentStm arg_4 = arg_3 . _outputs . append arg_5 = arg_3 . _inputs . append if arg_2 : for arg_6 in arg_0 . _inputs : arg_6 . endpoints . discard ( arg_0 ) arg_6 . endpoints . append ( arg_3 ) arg_5 ( arg_6 ) for arg_7 in arg_0 . _outputs : arg_7 . drivers . discard ( arg_0 ) arg_7 . drivers . append ( arg_3 ) arg_4 ( arg_7 ) arg_8 = arg_0 . _get_rtl_context ( ) arg_8 . statements . discard ( arg_0 ) arg_1 . rank += arg_0 . rank

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: Saves a model instance to the database .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = True ) : if arg_4 : arg_3 . save ( ) return arg_3

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

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


Question: Stops running proxy .

def Func ( arg_0 ) : if not arg_0 . sql_proxy_process : raise AirflowException ( "The sql proxy is not started yet" ) else : arg_0 . log . info ( "Stopping the cloud_sql_proxy pid: %s" , arg_0 . sql_proxy_process . pid ) arg_0 . sql_proxy_process . kill ( ) arg_0 . sql_proxy_process = None arg_0 . log . info ( "Removing the socket directory: %s" , arg_0 . cloud_sql_proxy_socket_directory ) shutil . rmtree ( arg_0 . cloud_sql_proxy_socket_directory , ignore_errors = True ) if arg_0 . sql_proxy_was_downloaded : arg_0 . log . info ( "Removing downloaded proxy: %s" , arg_0 . sql_proxy_path ) try : os . remove ( arg_0 . sql_proxy_path ) except OSError as e : if not e . errno == errno . ENOENT : raise else : arg_0 . log . info ( "Skipped removing proxy - it was not downloaded: %s" , arg_0 . sql_proxy_path ) if os . path . isfile ( arg_0 . credentials_path ) : arg_0 . log . info ( "Removing generated credentials file %s" , arg_0 . credentials_path ) os . remove ( arg_0 . credentials_path )

Returns a list of dicts representing issues from a remote service.


Question: Extract the base of the given element .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , list ) : return [ arg_0 . Func ( arg_2 ) for arg_2 in arg_1 ] arg_3 = arg_0 . checker . is_url_valid ( url = arg_1 , return_base = True ) if arg_3 : return arg_3 if "/" in arg_1 : return arg_1 . split ( "/" ) [ 0 ] return arg_1

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


Question: Return list of choices s keys

def Func ( arg_0 ) : for arg_1 , arg_2 in arg_0 : if isinstance ( arg_2 , ( list , tuple ) ) : for arg_1 , arg_3 in arg_2 : yield arg_1 else : yield arg_1

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

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


Question: Apply U to q .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : return arg_0 . append ( UBase ( arg_1 , arg_2 , arg_3 ) , [ arg_4 ] , [ ] )

Handle GET request - render linked learners list and "Link learner" form.

        Arguments:
            request (django.http.request.HttpRequest): Request instance
            customer_uuid (str): Enterprise Customer UUID

        Returns:
            django.http.response.HttpResponse: HttpResponse


Question: Return the composition channel .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : arg_4 = list ( arg_0 . input_dims ( ) ) arg_5 = list ( arg_0 . output_dims ( ) ) if arg_3 : arg_6 = len ( arg_0 . input_dims ( ) ) arg_7 = 2 * len ( arg_0 . output_dims ( ) ) arg_8 = True for arg_9 , arg_10 in enumerate ( arg_2 ) : arg_4 [ arg_10 ] = arg_1 . _input_dims [ arg_9 ] else : arg_6 = len ( arg_0 . output_dims ( ) ) arg_7 = 0 arg_8 = False for arg_9 , arg_10 in enumerate ( arg_2 ) : arg_5 [ arg_10 ] = arg_1 . _output_dims [ arg_9 ] arg_11 = np . reshape ( arg_0 . data , arg_0 . _shape ) arg_12 = np . reshape ( arg_1 . data , arg_1 . _shape ) arg_13 = [ 2 * arg_6 - 1 - arg_10 for arg_10 in arg_2 ] + [ arg_6 - 1 - arg_10 for arg_10 in arg_2 ] arg_14 = [ np . product ( arg_5 ) ** 2 , np . product ( arg_4 ) ** 2 ] arg_15 = np . reshape ( arg_0 . _einsum_matmul ( arg_11 , arg_12 , arg_13 , arg_7 , arg_8 ) , arg_14 ) return SuperOp ( arg_15 , arg_4 , arg_5 )

This function creates the command list from available information


Question: Read the contents of a file located relative to setup . py

def Func ( * arg_0 ) : with open ( join ( abspath ( dirname ( __file__ ) ) , * arg_0 ) ) as thefile : return thefile . Func ( )

Remove cards from watchlist.

        :params trade_id: Trade id.


Question: Specify a callback function that will be called when a server offers Next Protocol Negotiation options .

def Func ( arg_0 , arg_1 ) : _warn_npn ( ) arg_0 . _npn_select_helper = _NpnSelectHelper ( arg_1 ) arg_0 . _npn_select_callback = arg_0 . _npn_select_helper . callback _lib . SSL_CTX_set_next_proto_select_cb ( arg_0 . _context , arg_0 . _npn_select_callback , _ffi . NULL )

Return the number of combinations for n choose k.

    Args:
        n (int): the total number of options .
        k (int): The number of elements.

    Returns:
        int: returns the binomial coefficient


Question: Store a training sample and associated category label

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 0 ) : if arg_0 . _samples is None : arg_0 . _samples = numpy . zeros ( ( 0 , len ( arg_1 ) ) , dtype = RealNumpyDType ) assert arg_0 . _labels is None arg_0 . _labels = [ ] arg_0 . _samples = numpy . concatenate ( ( arg_0 . _samples , numpy . atleast_2d ( arg_1 ) ) , axis = 0 ) arg_0 . _labels += [ arg_2 ] if arg_0 . _partitions is None : arg_0 . _partitions = [ ] if arg_3 is None : arg_3 = 0 arg_0 . _partitions += [ arg_3 ]

Checks if an blob_name is updated in Google Cloud Storage.

        :param bucket_name: The Google cloud storage bucket where the object is.
        :type bucket_name: str
        :param object_name: The name of the object to check in the Google cloud
            storage bucket.
        :type object_name: str
        :param ts: The timestamp to check against.
        :type ts: datetime.datetime


Question: Extract required fields from an array

def Func ( arg_0 , arg_1 ) : arg_2 = { } for arg_3 in arg_1 : arg_4 = arg_0 . extract_fields ( arg_3 ) arg_2 [ arg_3 [ 'name' ] ] = arg_4 return arg_2


Question: Compare against another Jwt .

def Func ( arg_0 , arg_1 : 'Jwt' , arg_2 : arg_3 = False ) -> arg_3 : if arg_0 . secret != arg_1 . secret : return False if arg_0 . payload != arg_1 . payload : return False if arg_0 . alg != arg_1 . alg : return False if arg_0 . header != arg_1 . header : return False arg_4 = arg_0 . registered_claims arg_5 = arg_1 . registered_claims if not arg_2 : arg_6 = [ 'exp' , 'nbf' , 'iat' ] arg_4 = { k : { v if k not in arg_6 else None } for k , v in arg_4 . items ( ) } arg_5 = { k : { v if k not in arg_6 else None } for k , v in arg_5 . items ( ) } if arg_4 != arg_5 : return False return True

Load the configuration.

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

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

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


Question: Determines all modules that script transitively depends upon .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = set ( ) def calc ( arg_0 , arg_1 ) : if arg_0 in arg_3 : return arg_3 . add ( arg_0 ) for arg_4 in collect_imports ( arg_0 , arg_1 , arg_2 ) : if arg_4 . is_native : arg_3 . add ( arg_4 . name ) continue arg_5 = arg_4 . name . split ( '.' ) calc ( arg_4 . name , arg_4 . script ) if len ( arg_5 ) == 1 : continue arg_6 , arg_7 = os . path . split ( arg_4 . script ) if arg_7 == '__init__.py' : arg_6 = os . path . dirname ( arg_6 ) for arg_8 in xrange ( len ( arg_5 ) - 1 , 0 , - 1 ) : arg_0 = '.' . join ( arg_5 [ : arg_8 ] ) arg_1 = os . path . join ( arg_6 , '__init__.py' ) calc ( arg_0 , arg_1 ) arg_6 = os . path . dirname ( arg_6 ) calc ( arg_0 , arg_1 ) arg_3 . remove ( arg_0 ) return arg_3

Returns the profile with the received ID as a dict

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

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

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


Question: Get all variants for an institute having Sanger validations ordered but still not evaluated

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . sanger_ordered ( arg_1 , arg_2 ) arg_4 = [ ] for arg_5 in arg_3 : arg_6 = arg_5 [ '_id' ] arg_7 = arg_0 . case ( arg_6 = arg_6 ) if not arg_7 : continue arg_8 = arg_7 . get ( 'display_name' ) arg_9 = arg_5 [ 'vars' ] arg_10 = { } arg_10 [ arg_8 ] = [ ] for arg_11 in arg_9 : arg_12 = arg_0 . variant ( document_id = arg_11 , arg_6 = arg_6 ) if arg_12 is None or arg_12 . get ( 'sanger_ordered' ) is None or arg_12 . get ( 'sanger_ordered' ) is False : continue arg_13 = arg_12 . get ( 'validation' , 'not_evaluated' ) if arg_13 in [ 'True positive' , 'False positive' ] : continue arg_10 [ arg_8 ] . append ( arg_12 [ '_id' ] ) if len ( arg_10 [ arg_8 ] ) > 0 : arg_4 . append ( arg_10 ) return arg_4

The 1D index mappings between the masked sparse-grid and unmasked sparse grid.


Question: Wait for the termination of a process and log its stdout & stderr

def Func ( arg_0 , arg_1 , arg_2 ) : proc . stream_process_stdout ( arg_2 , stdout_log_fn ( arg_1 ) ) arg_2 . wait ( )

Test whether FILENAME matches PATTERN, including case.

    This is a version of fnmatch() which doesn't case-normalize
    its arguments.


Question: returns a random tuple representing person information

def Func ( arg_0 = None , arg_1 = None ) : arg_0 = arg_0 or [ 'en' ] arg_1 = arg_1 or ( GENDER_FEMALE , GENDER_MALE ) arg_2 = random . choice ( arg_0 ) arg_3 = random . choice ( arg_1 ) arg_4 = title ( [ arg_2 ] , [ arg_3 ] ) return first_name ( [ arg_2 ] , [ arg_3 ] ) , last_name ( [ arg_2 ] ) , arg_4 , arg_3


Question: Prints all currently defined configurations .

def Func ( ) : arg_0 , arg_1 = read_latoolscfg ( ) arg_2 = arg_1 [ 'DEFAULT' ] [ 'config' ] arg_3 = '\nCurrently defined LAtools configurations:\n\n' for arg_4 in arg_1 . sections ( ) : if arg_4 == arg_2 : arg_3 += arg_4 + ' [DEFAULT]\n' elif arg_4 == 'REPRODUCE' : arg_3 += arg_4 + ' [DO NOT ALTER]\n' else : arg_3 += arg_4 + '\n' for arg_5 , arg_6 in arg_1 [ arg_4 ] . items ( ) : if arg_5 != 'config' : if arg_6 [ : 9 ] == 'resources' : arg_6 = pkgrs . resource_filename ( 'latools' , arg_6 ) arg_3 += '   ' + arg_5 + ': ' + arg_6 + '\n' arg_3 += '\n' print ( arg_3 ) return


Question: Convert a figure to svg or png for inline display .

def Func ( arg_0 , arg_1 = 'png' ) : if not arg_0 . axes and not arg_0 . lines : return arg_2 = arg_0 . get_facecolor ( ) arg_3 = arg_0 . get_edgecolor ( ) arg_0 . set_facecolor ( 'white' ) arg_0 . set_edgecolor ( 'white' ) try : arg_4 = BytesIO ( ) arg_0 . canvas . Func ( arg_4 , format = arg_1 , bbox_inches = 'tight' ) arg_5 = arg_4 . getvalue ( ) finally : arg_0 . set_facecolor ( arg_2 ) arg_0 . set_edgecolor ( arg_3 ) return arg_5

Sets the package verification code, if not already set.
        code - A string.
        Raises CardinalityError if already defined.
        Raises OrderError if no package previously defined.
        Raises Value error if doesn't match verifcode form


Question: Convert the table and column descriptions of a TableGroup into specifications for the DB schema .

def Func ( arg_0 ) : arg_1 = { } for arg_2 , arg_3 in arg_0 . tabledict . items ( ) : arg_4 = TableSpec . from_table_metadata ( arg_3 ) arg_1 [ arg_4 . name ] = arg_4 for arg_6 in arg_4 . many_to_many . values ( ) : arg_1 [ arg_6 . name ] = arg_6 arg_7 = OrderedDict ( ) arg_8 = 0 while arg_1 and arg_8 < 100 : arg_8 += 1 for arg_3 in list ( arg_1 . keys ( ) ) : if all ( ( arg_9 [ 1 ] in arg_7 ) or arg_9 [ 1 ] == arg_3 for arg_9 in arg_1 [ arg_3 ] . foreign_keys ) : arg_7 [ arg_3 ] = arg_1 . pop ( arg_3 ) break if arg_1 : raise ValueError ( 'there seem to be cyclic dependencies between the tables' ) return list ( arg_7 . values ( ) )

An integer-valued dimension bounded between `min` <= x <= `max`.
        Note that the right endpoint of the interval includes `max`.

        When `warp` is None, the base measure associated with this dimension
        is a categorical distribution with each weight on each of the integers
        in [min, max]. With `warp == 'log'`, the base measure is a uniform
        distribution on the log of the variable, with bounds at `log(min)` and
        `log(max)`. This is appropriate for variables that are "naturally" in
        log-space. Other `warp` functions are not supported (yet), but may be
        at a later time. Please note that this functionality is not supported
        for `hyperopt_tpe`.


Question: Verifies the signature for the given value .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . derive_key ( ) try : arg_2 = base64_decode ( arg_2 ) except Exception : return False return arg_0 . algorithm . Func ( arg_3 , arg_1 , 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: Displays a dialog for exporting HTML generated by Qt s rich text system .

def Func ( arg_0 ) : arg_1 = arg_0 . control . window ( ) arg_2 = QtGui . QFileDialog ( arg_1 , 'Save as...' ) arg_2 . setAcceptMode ( QtGui . QFileDialog . AcceptSave ) arg_3 = [ 'HTML with PNG figures (*.html *.htm)' , 'XHTML with inline SVG figures (*.xhtml *.xml)' ] arg_2 . setNameFilters ( arg_3 ) if arg_0 . filename : arg_2 . selectFile ( arg_0 . filename ) arg_4 , arg_5 = os . path . splitext ( arg_0 . filename ) if arg_5 . lower ( ) in ( '.xml' , '.xhtml' ) : arg_2 . selectNameFilter ( arg_3 [ - 1 ] ) if arg_2 . exec_ ( ) : arg_0 . filename = arg_2 . selectedFiles ( ) [ 0 ] arg_7 = arg_2 . selectedNameFilter ( ) arg_8 = arg_0 . control . document ( ) . toHtml ( ) . encode ( 'utf-8' ) if arg_7 . startswith ( 'XHTML' ) : arg_9 = Func_xhtml else : arg_10 = arg_0 . inline_png if arg_10 is None and IMG_RE . search ( arg_8 ) : arg_2 = QtGui . QDialog ( arg_1 ) arg_2 . setWindowTitle ( 'Save as...' ) arg_11 = QtGui . QVBoxLayout ( arg_2 ) arg_12 = "Exporting HTML with PNGs" arg_13 = "Would you like inline PNGs (single large html " "file) or external image files?" arg_14 = QtGui . QCheckBox ( "&Don't ask again" ) arg_14 . setShortcut ( 'D' ) arg_15 = QtGui . QPushButton ( "&Inline" ) arg_15 . setShortcut ( 'I' ) arg_16 = QtGui . QPushButton ( "&External" ) arg_16 . setShortcut ( 'E' ) arg_17 = QtGui . QMessageBox ( QtGui . QMessageBox . Question , arg_2 . windowTitle ( ) , arg_12 ) arg_17 . setInformativeText ( arg_13 ) arg_17 . addButton ( arg_15 , QtGui . QMessageBox . NoRole ) arg_17 . addButton ( arg_16 , QtGui . QMessageBox . YesRole ) arg_11 . setSpacing ( 0 ) arg_11 . addWidget ( arg_17 ) arg_11 . addWidget ( arg_14 ) arg_2 . setLayout ( arg_11 ) arg_2 . show ( ) arg_18 = arg_17 . exec_ ( ) arg_2 . hide ( ) arg_10 = ( arg_18 == 0 ) if arg_14 . checkState ( ) : arg_0 . inline_png = arg_10 arg_9 = lambda h , f , i : Func_html ( h , f , i , arg_10 ) try : return arg_9 ( arg_8 , arg_0 . filename , arg_0 . image_tag ) except Exception , e : arg_12 = "Error Funcing HTML to %s\n" % arg_0 . filename + str ( e ) arg_18 = QtGui . QMessageBox . warning ( arg_1 , 'Error' , arg_12 , QtGui . QMessageBox . Ok , QtGui . QMessageBox . Ok ) return None

Returns assignment data for the given course_id.

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


Question: Encode list of messages . Expects messages to be unicode .

def Func ( arg_0 , arg_1 ) : if not arg_1 or arg_1 [ 0 ] is None : return '' if len ( arg_1 ) == 1 : return arg_1 [ 0 ] . encode ( 'utf-8' ) arg_2 = u'' . join ( [ ( u'\ufffd%d\ufffd%s' % ( len ( p ) , p ) ) for p in arg_1 if p is not None ] ) return arg_2 . encode ( 'utf-8' )

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


Question: Like os . path . join but acts relative to this packages bin path .

def Func ( * arg_0 ) : arg_1 = os . path . dirname ( __file__ ) return os . path . normpath ( os . path . join ( arg_1 , 'bin' , * arg_0 ) )

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


Question: Write the text to the stream and flush immediately .

def Func ( arg_0 , arg_1 ) : arg_0 . stream . write ( arg_1 ) arg_0 . stream . flush ( )

validate source directory names in components


Question: Given some error text it will log the text if self . log_errors is True

def Func ( arg_0 , arg_1 : arg_2 ) -> None : if arg_0 . Funcs : with arg_0 . _log_fp . open ( 'a+' ) as log_file : log_file . write ( f'{text}\n' )

Returns the maximum delay for the InferenceElements in the inference
    dictionary

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


Question: Build fake CIFAR10 - style data for unit testing .

def Func ( ) : arg_0 = 10 arg_1 = np . random . rand ( arg_0 , * IMAGE_SHAPE ) . astype ( np . float32 ) arg_2 = np . random . permutation ( np . arange ( arg_0 ) ) . astype ( np . int32 ) arg_3 = np . random . rand ( arg_0 , * IMAGE_SHAPE ) . astype ( np . float32 ) arg_4 = np . random . permutation ( np . arange ( arg_0 ) ) . astype ( np . int32 ) return ( arg_1 , arg_2 ) , ( arg_3 , arg_4 )

Start listening for events from Marathon, running a sync when we first
        successfully subscribe and triggering a sync on API request events.


Question: Print top_n big dir and top_n big file in each dir .

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

Return True if we should retry. False otherwise.

  Args:
    exception: An exception to test for transience.

  Returns:
    True if we should retry. False otherwise.


Question: The complete content of an info response .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : return "" . join ( [ arg_4 for arg_4 in arg_0 . Func_gen ( arg_1 , arg_2 , arg_3 ) ] )

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


Question: Get the list of movies for a particular genre by id . By default only movies with 10 or more votes are included .

def Func ( arg_0 , ** arg_1 ) : arg_2 = arg_0 . _get_id_path ( 'Func' ) arg_3 = arg_0 . _GET ( arg_2 , arg_1 ) arg_0 . _set_attrs_to_values ( arg_3 ) return arg_3


Question: Add a new watching rule .

def Func ( arg_0 , arg_1 , arg_2 , * , arg_3 = None ) : if arg_3 is None : arg_3 = arg_1 if arg_3 in arg_0 . requests : raise ValueError ( "A Func request is already scheduled for alias %s" % arg_3 ) arg_0 . requests [ arg_3 ] = ( arg_1 , arg_2 ) if arg_0 . _fd is not None : arg_0 . _setup_Func ( arg_3 , arg_1 , arg_2 )

Given a single spinn3r feed entry, produce a single StreamItem.

    Returns 'None' if a complete item can't be constructed.


Question: Confirm a build upload is complete .

def Func ( arg_0 , arg_1 ) : arg_2 = { 'uploaded' : True } arg_3 = requests . patch ( arg_0 , auth = ( arg_1 , '' ) , json = arg_2 ) if arg_3 . status_code != 200 : raise KeeperError ( arg_3 )

r'''Method to calculate heat capacity of a solid at temperature `T`
        with a given method.

        This method has no exception handling; see `T_dependent_property`
        for that.

        Parameters
        ----------
        T : float
            Temperature at which to calculate heat capacity, [K]
        method : str
            Name of the method to use

        Returns
        -------
        Cp : float
            Heat capacity of the solid at T, [J/mol/K]


Question: Declare an environment variable as a special variable . This can be used even if the environment variable is not present .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if arg_1 in arg_0 . _special : arg_4 = arg_0 . _special [ arg_1 ] if not isinstance ( arg_4 , arg_3 ) or arg_2 != arg_4 . _sep : raise ValueError ( 'variable %s already declared as %s ' 'with separator "%s"' % ( arg_1 , arg_4 . __class__ . __name__ , arg_4 . _sep ) ) else : arg_0 . _special [ arg_1 ] = arg_3 ( arg_0 , arg_1 , arg_2 )

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


Question: Converts the input format to a regular expression as well as extracting fields

def Func ( arg_0 , arg_1 ) : arg_1 = arg_1 . strip ( ) arg_1 = re . sub ( '[ \t]+' , ' ' , arg_1 ) arg_2 = [ ] arg_3 = re . compile ( r'^\\"' ) arg_4 = re . compile ( 'Referer|User-Agent' ) arg_5 = re . compile ( '^%.*t$' ) arg_6 = re . compile ( r'^\\"' ) arg_7 = re . compile ( r'\\"$' ) arg_8 = re . compile ( r'.*%\{([^\}]+)\}i' ) for arg_9 in arg_1 . split ( ' ' ) : arg_10 = 0 if arg_3 . search ( arg_9 ) : arg_10 = 1 if arg_10 : arg_9 = arg_6 . sub ( '' , arg_9 ) arg_9 = arg_7 . sub ( '' , arg_9 ) arg_11 = arg_8 . match ( arg_9 ) if arg_11 : arg_0 . _names . append ( arg_11 . groups ( ) [ 0 ] . lower ( ) ) arg_0 . _types . append ( str ) else : arg_0 . _names . append ( arg_0 . alias ( arg_9 ) ) arg_0 . _types . append ( arg_0 . types . get ( arg_9 , [ None , str ] ) [ 1 ] ) arg_12 = '(\S*)' if arg_10 : if arg_9 == '%r' or arg_4 . search ( arg_9 ) : arg_12 = r'\"([^"\\]*(?:\\.[^"\\]*)*)\"' else : arg_12 = r'\"([^\"]*)\"' elif arg_5 . search ( arg_9 ) : arg_12 = r'(\[[^\]]+\])' elif arg_9 == '%U' : arg_12 = '(.+?)' arg_2 . append ( arg_12 ) arg_0 . _pattern = '^' + ' ' . join ( arg_2 ) + '$' try : arg_0 . _regex = re . compile ( arg_0 . _pattern ) except Exception as e : raise ApacheLogParserError ( e )


Question: Make a protobuf Descriptor given a DescriptorProto protobuf .

def Func ( arg_0 , arg_1 = '' , arg_2 = True , arg_3 = None ) : if api_implementation . Type ( ) == 'cpp' and arg_2 : from typy . google . protobuf import descriptor_pb2 arg_4 = descriptor_pb2 . FileDescriptorProto ( ) arg_4 . message_type . add ( ) . MergeFrom ( arg_0 ) arg_5 = str ( uuid . uuid4 ( ) ) if arg_1 : arg_4 . name = os . path . join ( arg_1 . replace ( '.' , '/' ) , arg_5 + '.proto' ) arg_4 . package = arg_1 else : arg_4 . name = arg_5 + '.proto' _message . default_pool . Add ( arg_4 ) arg_7 = _message . default_pool . FindFileByName ( arg_4 . name ) if _USE_C_DESCRIPTORS : return arg_7 . message_types_by_name [ arg_0 . name ] arg_8 = [ arg_0 . name ] if arg_1 : arg_8 . insert ( 0 , arg_1 ) arg_9 = { } for arg_10 in arg_0 . enum_type : arg_11 = '.' . join ( arg_8 + [ arg_10 . name ] ) arg_12 = EnumDescriptor ( arg_10 . name , arg_11 , None , [ EnumValueDescriptor ( enum_val . name , ii , enum_val . number ) for ii , enum_val in enumerate ( arg_10 . value ) ] ) arg_9 [ arg_11 ] = arg_12 arg_13 = { } for arg_14 in arg_0 . nested_type : arg_11 = '.' . join ( arg_8 + [ arg_14 . name ] ) arg_15 = Func ( arg_14 , arg_1 = '.' . join ( arg_8 ) , arg_2 = False , arg_3 = arg_3 ) arg_13 [ arg_11 ] = arg_15 arg_16 = [ ] for arg_17 in arg_0 . field : arg_11 = '.' . join ( arg_8 + [ arg_17 . name ] ) arg_12 = None arg_15 = None if arg_17 . HasField ( 'type_name' ) : arg_18 = arg_17 . type_name arg_19 = '.' . join ( arg_8 + [ arg_18 [ arg_18 . rfind ( '.' ) + 1 : ] ] ) if arg_19 in arg_13 : arg_15 = arg_13 [ arg_19 ] elif arg_19 in arg_9 : arg_12 = arg_9 [ arg_19 ] arg_20 = FieldDescriptor ( arg_17 . name , arg_11 , arg_17 . number - 1 , arg_17 . number , arg_17 . type , FieldDescriptor . ProtoTypeToCppProtoType ( arg_17 . type ) , arg_17 . label , None , arg_15 , arg_12 , None , False , None , options = arg_17 . options , has_default_value = False ) arg_16 . append ( arg_20 ) arg_21 = '.' . join ( arg_8 ) return Descriptor ( arg_0 . name , arg_21 , None , None , arg_16 , list ( arg_13 . values ( ) ) , list ( arg_9 . values ( ) ) , [ ] , options = arg_0 . options )

Utility for creating continuous palette from the cubehelix system.

    This produces a colormap with linearly-decreasing (or increasing)
    brightness. That means that information will be preserved if printed to
    black and white or viewed by someone who is colorblind.

    Parameters
    ----------
    start : float (0 <= start <= 3)
        The hue at the start of the helix.
    rot : float
        Rotations around the hue wheel over the range of the palette.
    gamma : float (0 <= gamma)
        Gamma factor to emphasize darker (gamma < 1) or lighter (gamma > 1)
        colors.
    hue : float (0 <= hue <= 1)
        Saturation of the colors.
    dark : float (0 <= dark <= 1)
        Intensity of the darkest color in the palette.
    light : float (0 <= light <= 1)
        Intensity of the lightest color in the palette.
    reverse : bool
        If True, the palette will go from dark to light.

    Returns
    -------
    out : function
        Continuous color palette that takes a single
        :class:`int` parameter ``n`` and returns ``n``
        equally spaced colors.

    References
    ----------
    Green, D. A. (2011). "A colour scheme for the display of astronomical
    intensity images". Bulletin of the Astromical Society of India, Vol. 39,
    p. 289-295.

    Examples
    --------
    >>> palette = cubehelix_pal()
    >>> palette(5)
    ['#edd1cb', '#d499a7', '#aa688f', '#6e4071', '#2d1e3e']


Question: Add a tier . When no linguistic type is given and the default linguistic type is unavailable then the assigned linguistic type will be the first in the list .

def Func ( arg_0 , arg_1 , arg_2 = 'default-lt' , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = None , arg_7 = None , arg_8 = None ) : if not arg_1 : raise ValueError ( 'Tier id is empty...' ) if arg_2 not in arg_0 . linguistic_types : arg_2 = sorted ( arg_0 . linguistic_types . keys ( ) ) [ 0 ] if arg_4 and arg_4 not in arg_0 . locales : arg_4 = None if arg_7 and arg_7 not in arg_0 . languages : arg_7 = None if arg_8 is None : arg_0 . tiers [ arg_1 ] = ( { } , { } , { 'TIER_ID' : arg_1 , 'LINGUISTIC_TYPE_REF' : arg_2 , 'PARENT_REF' : arg_3 , 'PARTICIPANT' : arg_5 , 'DEFAULT_LOCALE' : arg_4 , 'LANG_REF' : arg_7 , 'ANNOTATOR' : arg_6 } , len ( arg_0 . tiers ) ) else : arg_0 . tiers [ arg_1 ] = ( { } , { } , arg_8 , len ( arg_0 . tiers ) )

Transforms predictions into probability values.

    Parameters
    ----------
    logits : array_like
        The logits predicted by the model.

    Returns
    -------
    `numpy.ndarray`
        Probability values corresponding to the logits.


Question: Attempt to import tensorflow and ensure its version is sufficient .

def Func ( ) : try : import tensorflow as tf except ImportError : print ( "\n\nFailed to import TensorFlow. Please note that TensorFlow is not " "installed by default when you install TensorFlow Probability. This " "is so that users can decide whether to install the GPU-enabled " "TensorFlow package. To use TensorFlow Probability, please install " "the most recent version of TensorFlow, by following instructions at " "https://tensorflow.org/install.\n\n" ) raise import distutils . version arg_0 = "1.13" if ( distutils . version . LooseVersion ( tf . __version__ ) < distutils . version . LooseVersion ( arg_0 ) ) : raise ImportError ( "This version of TensorFlow Probability requires TensorFlow " "version >= {required}; Detected an installation of version {present}. " "Please upgrade TensorFlow to proceed." . format ( required = arg_0 , present = tf . __version__ ) )

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


Question: Finds and returns a model architecture and its parameters from the database which matches the requirement .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = 'model' , ** arg_4 ) : arg_4 . update ( { 'model_name' : arg_3 } ) arg_0 . _fill_project_info ( arg_4 ) arg_5 = time . time ( ) arg_6 = arg_0 . db . Model . find_one ( filter = arg_4 , arg_2 = arg_2 ) arg_7 = '_find_one_model_ztemp_file' if arg_6 is not None : arg_8 = arg_6 [ 'params_id' ] arg_9 = arg_6 [ 'architecture' ] arg_10 = arg_6 [ 'time' ] exists_or_mkdir ( arg_7 , False ) with open ( os . path . join ( arg_7 , 'graph.pkl' ) , 'wb' ) as file : pickle . dump ( arg_9 , file , protocol = pickle . HIGHEST_PROTOCOL ) else : print ( "[Database] FAIL! Cannot find model: {}" . format ( arg_4 ) ) return False try : arg_11 = arg_0 . _deserialization ( arg_0 . model_fs . get ( arg_8 ) . read ( ) ) np . savez ( os . path . join ( arg_7 , 'params.npz' ) , arg_11 = arg_11 ) arg_12 = load_graph_and_params ( name = arg_7 , arg_1 = arg_1 ) del_folder ( arg_7 ) arg_13 = arg_0 . db . Model . find ( arg_4 ) print ( "[Database] Find one model SUCCESS. kwargs:{} sort:{} save time:{} took: {}s" . format ( arg_4 , arg_2 , arg_10 , round ( time . time ( ) - arg_5 , 2 ) ) ) for arg_14 in arg_6 : arg_12 . __dict__ . update ( { "_%s" % arg_14 : arg_6 [ arg_14 ] } ) arg_15 = arg_13 . distinct ( 'params_id' ) arg_16 = len ( arg_15 ) if arg_16 != 1 : print ( "     Note that there are {} models match the kwargs" . format ( arg_16 ) ) return arg_12 except Exception as e : arg_17 , arg_18 , arg_19 = sys . exc_info ( ) arg_20 = os . path . split ( arg_19 . tb_frame . f_code . co_filename ) [ 1 ] logging . info ( "{}  {}  {}  {}  {}" . format ( arg_17 , arg_18 , arg_20 , arg_19 . tb_lineno , e ) ) return False

Return a datetime with the same value as ``dt``, to a
        resolution of days.


Question: Decide whether to trace execution in filename .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 , arg_4 = arg_0 . Func_with_reason ( arg_1 , arg_2 ) if arg_0 . debug . should ( 'trace' ) : if not arg_3 : arg_5 = "Not tracing %r: %s" % ( arg_1 , arg_4 ) else : arg_5 = "Tracing %r" % ( arg_1 , ) arg_0 . debug . write ( arg_5 ) return arg_3


Question: Get the clipboard s text on OS X .

def Func ( ) : arg_0 = subprocess . Popen ( [ 'pbpaste' , '-Prefer' , 'ascii' ] , stdout = subprocess . PIPE ) arg_1 , arg_2 = arg_0 . communicate ( ) arg_1 = arg_1 . replace ( '\r' , '\n' ) return arg_1

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: Store the given text contents so that they are later retrievable by the given key .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . _blobservice . create_blob_from_text ( arg_0 . uuid , arg_1 , arg_2 )

Create an iterable from the iterables that contains each element once.

    :return: an iterable over the iterables. Each element of the result
      appeared only once in the result. They are ordered by the first
      occurrence in the iterables.


Question: r Get the count of an n - gram in the corpus .

def Func ( arg_0 , arg_1 , arg_2 = None ) : if not arg_2 : arg_2 = arg_0 . ngcorpus if not arg_1 : return arg_2 [ None ] if isinstance ( arg_1 , ( text_type , str ) ) : arg_1 = text_type ( arg_1 ) . split ( ) if arg_1 [ 0 ] in arg_2 : return arg_0 . Func ( arg_1 [ 1 : ] , arg_2 [ arg_1 [ 0 ] ] ) return 0


Question: Run WsgiDAV using wsgiref . simple_server on Python 2 . 5 + .

def Func ( arg_0 , arg_1 , arg_2 ) : from wsgiref . simple_server import make_server , software_version arg_3 = "WsgiDAV/{} {}" . format ( __version__ , software_version ) _logger . info ( "Running {}..." . format ( arg_3 ) ) _logger . warning ( "WARNING: This single threaded server (wsgiref) is not meant for production." ) arg_4 = make_server ( arg_1 [ "host" ] , arg_1 [ "port" ] , arg_0 ) try : arg_4 . serve_forever ( ) except KeyboardInterrupt : _logger . warning ( "Caught Ctrl-C, shutting down..." ) return

Stops a timer if it hasn't fired yet

        * func - the function passed in start_timer


Question: Retrieve all of the relevant key wrapping data fields and return them as a dictionary .

def Func ( arg_0 ) : Func = { } arg_2 = { 'unique_identifier' : arg_0 . _kdw_eki_unique_identifier , 'cryptographic_parameters' : { 'block_cipher_mode' : arg_0 . _kdw_eki_cp_block_cipher_mode , 'padding_method' : arg_0 . _kdw_eki_cp_padding_method , 'hashing_algorithm' : arg_0 . _kdw_eki_cp_hashing_algorithm , 'key_role_type' : arg_0 . _kdw_eki_cp_key_role_type , 'digital_signature_algorithm' : arg_0 . _kdw_eki_cp_digital_signature_algorithm , 'cryptographic_algorithm' : arg_0 . _kdw_eki_cp_cryptographic_algorithm , 'random_iv' : arg_0 . _kdw_eki_cp_random_iv , 'iv_length' : arg_0 . _kdw_eki_cp_iv_length , 'tag_length' : arg_0 . _kdw_eki_cp_tag_length , 'fixed_field_length' : arg_0 . _kdw_eki_cp_fixed_field_length , 'invocation_field_length' : arg_0 . _kdw_eki_cp_invocation_field_length , 'counter_length' : arg_0 . _kdw_eki_cp_counter_length , 'initial_counter_value' : arg_0 . _kdw_eki_cp_initial_counter_value } } if not any ( arg_2 [ 'cryptographic_parameters' ] . values ( ) ) : arg_2 [ 'cryptographic_parameters' ] = { } if not any ( arg_2 . values ( ) ) : arg_2 = { } arg_3 = { 'unique_identifier' : arg_0 . _kdw_mski_unique_identifier , 'cryptographic_parameters' : { 'block_cipher_mode' : arg_0 . _kdw_mski_cp_block_cipher_mode , 'padding_method' : arg_0 . _kdw_mski_cp_padding_method , 'hashing_algorithm' : arg_0 . _kdw_mski_cp_hashing_algorithm , 'key_role_type' : arg_0 . _kdw_mski_cp_key_role_type , 'digital_signature_algorithm' : arg_0 . _kdw_mski_cp_digital_signature_algorithm , 'cryptographic_algorithm' : arg_0 . _kdw_mski_cp_cryptographic_algorithm , 'random_iv' : arg_0 . _kdw_mski_cp_random_iv , 'iv_length' : arg_0 . _kdw_mski_cp_iv_length , 'tag_length' : arg_0 . _kdw_mski_cp_tag_length , 'fixed_field_length' : arg_0 . _kdw_mski_cp_fixed_field_length , 'invocation_field_length' : arg_0 . _kdw_mski_cp_invocation_field_length , 'counter_length' : arg_0 . _kdw_mski_cp_counter_length , 'initial_counter_value' : arg_0 . _kdw_mski_cp_initial_counter_value } } if not any ( arg_3 [ 'cryptographic_parameters' ] . values ( ) ) : arg_3 [ 'cryptographic_parameters' ] = { } if not any ( arg_3 . values ( ) ) : arg_3 = { } Func [ 'wrapping_method' ] = arg_0 . _kdw_wrapping_method Func [ 'encryption_key_information' ] = arg_2 Func [ 'mac_signature_key_information' ] = arg_3 Func [ 'mac_signature' ] = arg_0 . _kdw_mac_signature Func [ 'iv_counter_nonce' ] = arg_0 . _kdw_iv_counter_nonce Func [ 'encoding_option' ] = arg_0 . _kdw_encoding_option if not any ( Func . values ( ) ) : Func = { } return Func

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


Question: Match a parser zero or more times repeatedly .

def Func ( arg_0 : arg_1 [ arg_2 , arg_3 [ arg_4 ] ] ) -> RepeatedParser : if isinstance ( arg_0 , str ) : arg_0 = lit ( arg_0 ) return RepeatedParser ( arg_0 )


Question: Return pairs of run ids and results .

def Func ( arg_0 ) : arg_1 = arg_0 . communicationChannel . Func_all ( ) arg_0 . nruns -= len ( arg_1 ) if arg_0 . nruns > 0 : import logging arg_2 = logging . getLogger ( __name__ ) arg_2 . warning ( 'too few results Funcd: {} results Funcd, {} more expected' . format ( len ( arg_1 ) , arg_0 . nruns ) ) elif arg_0 . nruns < 0 : import logging arg_2 = logging . getLogger ( __name__ ) arg_2 . warning ( 'too many results Funcd: {} results Funcd, {} too many' . format ( len ( arg_1 ) , - arg_0 . nruns ) ) return arg_1

Decorator for methods accepting old_path and new_path.


Question: Reorder levels of an H2O factor for one single column of a H2O frame

def Func ( arg_0 , arg_1 ) : return H2OFrame . _expr ( expr = ExprNode ( "Func" , arg_0 , quote ( arg_1 ) ) )

Get the changeset using the OSM API and return the content as a XML
    ElementTree.

    Args:
        changeset: the id of the changeset.


Question: Convert the specification into an instruction

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _instruction_class ( arg_1 ) arg_3 = arg_2 . type if arg_3 in arg_0 . _type_to_instruction : arg_2 . inherit_from ( arg_0 . _type_to_instruction [ arg_3 ] ) return arg_2

Returns a DataFrame of offensive team splits for a season.

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


Question: Creates a sequence .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 8 , arg_4 = 0 ) : arg_5 = ( arg_1 [ 0 ] + arg_2 ) * FRAME_SIZE arg_6 = ( arg_1 [ 0 ] + arg_2 + 1 ) * FRAME_SIZE arg_7 = arg_0 [ arg_5 : arg_6 , ... ] arg_8 = tf . stack ( tf . split ( arg_7 , 13 , axis = 1 ) ) arg_8 = arg_8 [ 0 : arg_1 [ 1 ] ] arg_8 = tf . roll ( arg_8 , shift = - arg_4 , axis = 0 ) arg_8 = tf . tile ( arg_8 , [ 2 , 1 , 1 , 1 ] ) arg_8 = arg_8 [ : arg_3 ] arg_8 = tf . cast ( arg_8 , dtype = tf . float32 ) arg_8 . set_shape ( [ arg_3 , FRAME_SIZE , FRAME_SIZE , CHANNELS ] ) return arg_8

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


Question: pre - processed the data frame . new filtering methods will be implement here .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_0 . data , pd . DataFrame ) : arg_2 = arg_0 . data . copy ( ) if arg_2 . index . dtype == 'O' : arg_2 = arg_2 . reset_index ( ) elif os . path . isfile ( arg_0 . data ) : if arg_0 . data . endswith ( "gct" ) : arg_2 = pd . read_csv ( arg_0 . data , skiprows = 1 , comment = '#' , sep = "\t" ) else : arg_2 = pd . read_csv ( arg_0 . data , comment = '#' , sep = "\t" ) else : raise Exception ( 'Error parsing gene expression DataFrame!' ) if arg_2 . iloc [ : , 0 ] . duplicated ( ) . sum ( ) > 0 : arg_0 . _logger . warning ( "Warning: dropping duplicated gene names, only keep the first values" ) arg_2 . drop_duplicates ( subset = arg_2 . columns [ 0 ] , inplace = True ) if arg_2 . isnull ( ) . any ( ) . sum ( ) > 0 : arg_0 . _logger . warning ( "Warning: Input data contains NA, filled NA with 0" ) arg_2 . dropna ( how = 'all' , inplace = True ) arg_2 = arg_2 . fillna ( 0 ) arg_2 . set_index ( keys = arg_2 . columns [ 0 ] , inplace = True ) arg_3 = arg_2 . select_dtypes ( include = [ np . number ] ) arg_4 = arg_3 . groupby ( by = arg_1 , axis = 1 ) . std ( ) arg_3 = arg_3 [ ~ arg_4 . isin ( [ 0 ] ) . any ( axis = 1 ) ] arg_3 = arg_3 + 0.00001 return arg_3

Returns location data.

        http://dev.wheniwork.com/#get-existing-location


Question: Manually add a subscriber to a workflow bypassing the default trigger settings . You can also use this endpoint to trigger a series of automated emails in an API 3 . 0 workflow type or add subscribers to an automated email queue that uses the API request delay type .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_0 . workflow_id = arg_1 arg_0 . email_id = arg_2 if 'email_address' not in arg_3 : raise KeyError ( 'The automation email queue must have an email_address' ) check_email ( arg_3 [ 'email_address' ] ) arg_4 = arg_0 . _mc_client . _post ( url = arg_0 . _build_path ( arg_1 , 'emails' , arg_2 , 'queue' ) , arg_3 = arg_3 ) if arg_4 is not None : arg_0 . subscriber_hash = arg_4 [ 'id' ] else : arg_0 . subscriber_hash = None return arg_4

Returns the value specified in the XDG_CONFIG_HOME environment variable
        or the appropriate default.


Question: For bold italics and underline . Simply checking to see if the various tags are present will not suffice . If the tag is present and set to False then the style should not be present .

def Func ( arg_0 ) : if arg_0 is None : return False arg_1 = get_namespace ( arg_0 , 'w' ) return arg_0 . get ( '%sval' % arg_1 ) != 'false'

Extract Packed Floating-Point Values

        Extracts 128-bits of packed floating-point values from the source
        operand (second operand) at an 128-bit offset from imm8[0] into the
        destination operand (first operand). The destination may be either an
        XMM register or an 128-bit memory location.


Question: The speed limit for a boid . Boids can momentarily go very fast something that is impossible for real animals .

def Func ( arg_0 , arg_1 = 30 ) : if abs ( arg_0 . vx ) > arg_1 : arg_0 . vx = arg_0 . vx / abs ( arg_0 . vx ) * arg_1 if abs ( arg_0 . vy ) > arg_1 : arg_0 . vy = arg_0 . vy / abs ( arg_0 . vy ) * arg_1 if abs ( arg_0 . vz ) > arg_1 : arg_0 . vz = arg_0 . vz / abs ( arg_0 . vz ) * 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: Customized version of get_data to directly get the data without using the authentication method .

def Func ( arg_0 , arg_1 , arg_2 = arg_3 ( ) , arg_4 = arg_3 ( ) , arg_5 = True ) : arg_1 = urljoin ( arg_0 . end_point , arg_1 ) arg_6 = requests . get ( arg_1 , arg_2 = arg_2 , arg_4 = arg_4 , timeout = arg_0 . get_timeout ( ) ) if arg_5 : return arg_6 . json ( ) return arg_6 . content


Question: Most of this method is from docutils . parser . rst . Directive .

def Func ( arg_0 ) : if not arg_0 . state . document . settings . file_insertion_enabled : raise arg_0 . warning ( '"%s" directive disabled.' % arg_0 . name ) arg_1 = arg_0 . state_machine . input_lines . source ( arg_0 . lineno - arg_0 . state_machine . input_offset - 1 ) arg_2 = os . path . dirname ( os . path . abspath ( arg_1 ) ) arg_3 = rst . directives . path ( arg_0 . arguments [ 0 ] ) arg_3 = os . path . normpath ( os . path . join ( arg_2 , arg_3 ) ) arg_3 = utils . relative_path ( None , arg_3 ) arg_3 = nodes . repFuncicode ( arg_3 ) arg_4 = arg_0 . options . get ( 'encoding' , arg_0 . state . document . settings . input_encoding ) arg_5 = arg_0 . state . document . settings . input_encoding_error_handler arg_6 = arg_0 . options . get ( 'tab-width' , arg_0 . state . document . settings . tab_width ) try : arg_0 . state . document . settings . record_dependencies . add ( arg_3 ) arg_7 = io . FileInput ( source_path = arg_3 , arg_4 = arg_4 , error_handler = arg_5 ) except UnicodeEncodeError as error : raise arg_0 . severe ( 'Problems with "%s" directive path:\n' 'Cannot encode input file path "%s" ' '(wrong locale?).' % ( arg_0 . name , SafeString ( arg_3 ) ) ) except IOError as error : raise arg_0 . severe ( 'Problems with "%s" directive path:\n%s.' % ( arg_0 . name , ErrorString ( error ) ) ) try : arg_8 = arg_7 . read ( ) except UnicodeError as error : raise arg_0 . severe ( 'Problem with "%s" directive:\n%s' % ( arg_0 . name , ErrorString ( error ) ) ) arg_9 = arg_0 . state . document . settings . env . config arg_10 = M2R ( no_underscore_emphasis = arg_9 . no_underscore_emphasis ) arg_11 = statemachine . string2lines ( arg_10 ( arg_8 ) , arg_6 , convert_whitespace = True ) arg_0 . state_machine . insert_input ( arg_11 , arg_3 ) return [ ]

Augment a sample shape to broadcast batch dimensions.

  Computes an augmented sample shape, so that any batch dimensions not
  part of the distribution `partial_batch_dist` are treated as identical
  distributions.

  # partial_batch_dist.batch_shape  = [      7]
  # full_sample_and_batch_shape     = [3, 4, 7]
  # => return an augmented sample shape of [3, 4] so that
  #    partial_batch_dist.sample(augmented_sample_shape) has combined
  #    sample and batch shape of [3, 4, 7].

  Args:
    partial_batch_dist: `tfd.Distribution` instance with batch shape a
      prefix of `full_sample_and_batch_shape`.
    full_sample_and_batch_shape: a Tensor or Tensor-like shape.
    validate_args: if True, check for shape errors at runtime.
  Returns:
    augmented_sample_shape: sample shape such that
      `partial_batch_dist.sample(augmented_sample_shape)` has combined
      sample and batch shape of `full_sample_and_batch_shape`.

  Raises:
    ValueError: if `partial_batch_dist.batch_shape` has more dimensions than
      `full_sample_and_batch_shape`.
    NotImplementedError: if broadcasting would be required to make
      `partial_batch_dist.batch_shape` into a prefix of
      `full_sample_and_batch_shape` .


Question: A more flexible str function which intelligently handles stringifying strings lists and other iterables . The results are lexographically sorted to ensure generated responses are consistent when iterables such as Set are used .

def Func ( arg_0 ) : if arg_0 is None : return None elif ( not isinstance ( arg_0 , str ) and isinstance ( arg_0 , collections . abc . Iterable ) ) : return ', ' . join ( str ( arg_1 ) for arg_1 in sorted ( arg_0 ) ) else : return str ( arg_0 )

Extract Packed Floating-Point Values

        Extracts 128-bits of packed floating-point values from the source
        operand (second operand) at an 128-bit offset from imm8[0] into the
        destination operand (first operand). The destination may be either an
        XMM register or an 128-bit memory location.


Question: On Windows returns a list of mapped network drives

def Func ( ) : if sys . platform != 'win32' : raise NotImplementedError arg_0 = [ ] arg_1 = _CallWindowsNetCommand ( [ 'use' ] ) for arg_2 in arg_1 . split ( EOL_STYLE_WINDOWS ) : arg_3 = re . match ( "(\w*)\s+(\w:)\s+(.+)" , arg_2 . rstrip ( ) ) if arg_3 : arg_0 . append ( ( arg_3 . group ( 2 ) , arg_3 . group ( 3 ) , arg_3 . group ( 1 ) == 'OK' ) ) return arg_0

It will poll the URL to grab the latest status resource in a given
        timeout and time interval.

        Args:
            poll_interval (int): how often to poll the status service.
            timeout (int): how long to poll the URL until giving up. Use <= 0
                to wait forever


Question: Get the items contained in self .

def Func ( arg_0 ) : arg_1 = [ ] arg_2 = arg_0 . xpath_ctxt . xpathEval ( "d:item" ) if arg_2 is not None : for arg_3 in arg_2 : arg_1 . append ( DiscoItem ( arg_0 , arg_3 ) ) return arg_1

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


Question: This method takes a list of labels and returns a unique category number . This enables this class to store a list of categories for each point since the KNN classifier only stores a single number category for each record .

def Func ( arg_0 , arg_1 ) : arg_2 = 0 for arg_3 in arg_1 : arg_2 += arg_0 . _labelToCategoryNumber ( arg_3 ) return arg_2


Question: Fetch the location of the form in the original filename from the input form if it has metadata .

def Func ( arg_0 : arg_1 [ arg_2 , arg_3 ] ) -> Optional [ Tuple [ int , int ] ] : try : arg_4 = arg_0 . meta arg_5 = arg_4 . get ( reader . READER_LINE_KW ) arg_6 = arg_4 . get ( reader . READER_COL_KW ) except AttributeError : return None else : assert isinstance ( arg_5 , int ) and isinstance ( arg_6 , int ) return arg_5 , arg_6


Question: Mark all message instances for a user as read .

def Func ( arg_0 ) : arg_1 = stored_messages_settings . STORAGE_BACKEND arg_2 = arg_1 ( ) arg_2 . inbox_purge ( arg_0 )

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: Consume reader and return Success only on complete consumption .

def Func ( arg_0 : arg_1 [ arg_2 , arg_3 ] , arg_4 : arg_5 [ arg_2 ] ) -> Result [ arg_3 ] : arg_6 = ( arg_0 << eof ) . consume ( arg_4 ) if isinstance ( arg_6 , Continue ) : return Success ( arg_6 . value ) else : arg_7 = set ( ) arg_8 = [ ] for arg_9 in arg_6 . expected : arg_10 = arg_9 ( ) if arg_10 not in arg_7 : arg_7 . add ( arg_10 ) arg_8 . append ( arg_10 ) return Failure ( arg_6 . farthest . expected_error ( ' or ' . join ( arg_8 ) ) )

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


Question: Binarizes the values of x .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = 'upper' ) : arg_4 , arg_5 = arg_1 if arg_2 is None : arg_2 = ( arg_4 + arg_5 ) / 2. arg_0 = arg_0 . copy ( ) if arg_3 == 'lower' : arg_0 [ arg_0 <= arg_2 ] = arg_4 arg_0 [ arg_0 > arg_2 ] = arg_5 elif arg_3 == 'upper' : arg_0 [ arg_0 < arg_2 ] = arg_4 arg_0 [ arg_0 >= arg_2 ] = arg_5 else : raise ValueError ( 'included_in must be "lower" or "upper"' ) return arg_0


Question: Given two templates and their respective versions return True if a new cookiecutter config needs to be obtained from the user

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if arg_0 != arg_2 : return True else : return _cookiecutter_configs_have_changed ( arg_2 , arg_1 , arg_3 )

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Serialize data to an frozen tuple .

def Func ( arg_0 , arg_1 ) : if hasattr ( arg_1 , "__hash__" ) and callable ( arg_1 . __hash__ ) : return arg_1 elif isinstance ( arg_1 , list ) : return tuple ( ( arg_0 . Func ( arg_2 ) for arg_2 in arg_1 ) ) elif isinstance ( arg_1 , dict ) : arg_3 = [ ( key , arg_0 . Func ( value ) ) for key , value in arg_1 . items ( ) ] arg_3 . sort ( ) return tuple ( arg_3 ) else : raise TypeError ( "Unable to freeze {} data type." . format ( type ( arg_1 ) ) )

Temporal distance probability density function.

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


Question: If self is a MUC room join request return the information contained .

def Func ( arg_0 ) : arg_1 = arg_0 . get_muc_child ( ) if not arg_1 : return None if not isinstance ( arg_1 , MucX ) : return None return arg_1

Function to create an overview of the services.
        Will print a list of ports found an the number of times the port was seen.


Question: Put I2C lines into idle state .

def Func ( arg_0 ) : arg_0 . _ft232h . setup_pins ( { 0 : GPIO . OUT , 1 : GPIO . OUT , 2 : GPIO . IN } , { 0 : GPIO . HIGH , 1 : GPIO . HIGH } )

Return True if file matches exclude pattern.


Question: Fetch the hostname using the callable from the config or using socket . getfqdn as a fallback .

def Func ( ) : try : arg_0 = conf . get ( 'core' , 'hostname_callable' ) except AirflowConfigException : arg_0 = None if not arg_0 : return socket . getfqdn ( ) arg_1 , arg_2 = arg_0 . split ( ':' ) arg_3 = importlib . import_module ( arg_1 ) arg_4 = getattr ( arg_3 , arg_2 ) return arg_4 ( )

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


Question: Setup frequency axis

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_3 = arg_0 . header [ b'fch1' ] arg_4 = arg_0 . header [ b'foff' ] arg_5 , arg_6 = 0 , arg_0 . header [ b'nchans' ] if arg_1 : arg_5 = int ( ( arg_1 - arg_3 ) / arg_4 ) if arg_2 : arg_6 = int ( ( arg_2 - arg_3 ) / arg_4 ) arg_7 = np . int ( arg_5 ) arg_8 = np . int ( arg_6 ) if arg_5 < arg_6 : arg_9 = np . arange ( arg_7 , arg_8 ) else : arg_9 = np . arange ( arg_8 , arg_7 ) arg_0 . freqs = arg_4 * arg_9 + arg_3 if arg_8 < arg_7 : arg_8 , arg_7 = arg_7 , arg_8 return arg_5 , arg_6 , arg_7 , arg_8


Question: The base handler for the display_data message .

def Func ( arg_0 , arg_1 ) : arg_0 . log . debug ( "display: %s" , arg_1 . get ( 'content' , '' ) ) if not arg_0 . _hidden and arg_0 . _is_from_this_session ( arg_1 ) : arg_2 = arg_1 [ 'content' ] [ 'source' ] arg_3 = arg_1 [ 'content' ] [ 'data' ] arg_4 = arg_1 [ 'content' ] [ 'metadata' ] if arg_3 . has_key ( 'text/html' ) : arg_5 = arg_3 [ 'text/html' ] arg_0 . _append_html ( arg_5 , True ) elif arg_3 . has_key ( 'text/plain' ) : arg_6 = arg_3 [ 'text/plain' ] arg_0 . _append_plain_text ( arg_6 , True ) arg_0 . _append_plain_text ( u'\n' , True )

Enumerate all possible resonance forms and return them as a list.

        :param mol: The input molecule.
        :type mol: rdkit.Chem.rdchem.Mol
        :return: A list of all possible resonance forms of the molecule.
        :rtype: list of rdkit.Chem.rdchem.Mol


Question: Delete the specified cgroup .

def Func ( arg_0 , arg_1 ) : arg_2 = trees . Tree ( ) . root arg_3 = arg_1 . split ( "/" ) for arg_4 in arg_3 : arg_5 = { x . name : x for x in arg_2 . children } if arg_4 not in arg_5 : arg_0 . log . warning ( "Cgroup does not exist: %s" , arg_1 ) return else : arg_2 = arg_5 [ arg_4 ] arg_6 = arg_2 . parent arg_0 . log . debug ( "Deleting cgroup %s/%s" , arg_6 , arg_2 . name ) arg_6 . delete_cgroup ( arg_2 . name )

Return HgResource object for path.

        See DAVProvider.get_resource_inst()


Question: Build a filter that fails on nodes in the given list .

def Func ( arg_0 : arg_1 [ arg_2 ] ) -> NodePredicate : arg_3 = set ( arg_0 ) def exclusion_filter ( arg_4 : arg_5 , arg_6 : arg_2 ) -> bool : return arg_6 not in arg_3 return exclusion_filter

Creates and connects the underlying text widget.


Question: Asserts that val is equal to one of the given items .

def Func ( arg_0 , * arg_1 ) : if len ( arg_1 ) == 0 : raise ValueError ( 'one or more args must be given' ) else : for arg_2 in arg_1 : if arg_0 . val == arg_2 : return arg_0 arg_0 . _err ( 'Expected <%s> to be in %s, but was not.' % ( arg_0 . val , arg_0 . _fmt_items ( arg_1 ) ) )

Decode the data passed in and potentially flush the decoder.


Question: r Return Heronian mean .

def Func ( arg_0 ) : arg_1 = len ( arg_0 ) arg_2 = 0 for arg_3 in range ( arg_1 ) : for arg_4 in range ( arg_3 , arg_1 ) : if arg_0 [ arg_3 ] == arg_0 [ arg_4 ] : arg_2 += arg_0 [ arg_3 ] else : arg_2 += ( arg_0 [ arg_3 ] * arg_0 [ arg_4 ] ) ** 0.5 return arg_2 * 2 / ( arg_1 * ( arg_1 + 1 ) )

Run the excel_to_html function from the
    command-line.

    Args:
        -p path to file
        -s name of the sheet to convert
        -css classes to apply
        -m attempt to combine merged cells
        -c caption for accessibility
        -su summary for accessibility
        -d details for accessibility

    Example use:

        excel_to_html -p myfile.xlsx -s SheetName -css diablo-python -m true


Question: Adds a link to an existing node .

def Func ( arg_0 , arg_1 , arg_2 = None ) : if isinstance ( arg_1 , str ) : arg_3 = arg_1 if isinstance ( arg_2 , str ) : arg_4 = arg_0 . v_root . f_get ( arg_2 ) else : arg_4 = arg_2 else : arg_4 = arg_1 arg_3 = arg_4 . v_name return arg_0 . _nn_interface . _add_generic ( arg_0 , type_name = LINK , group_type_name = GROUP , args = ( arg_3 , arg_4 ) , kwargs = { } , add_prefix = False )

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: Calculates the cross - entropy for a batch of logits .

def Func ( arg_0 , arg_1 ) : assert arg_1 . ndim == 2 arg_1 = arg_1 - np . max ( arg_1 , axis = 1 , keepdims = True ) arg_2 = np . exp ( arg_1 ) arg_3 = np . sum ( arg_2 , axis = 1 ) arg_4 = np . log ( arg_3 ) - arg_1 [ : , arg_0 ] return arg_4

This method is called before first step of simulation.


Question: Genereates a dictionary representation of the list field . Document should be the document the list_field comes from .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = { "_document" : arg_1 } if isinstance ( arg_2 . field , EmbeddedDocumentField ) : arg_4 . update ( arg_0 . create_document_dictionary ( arg_1 = arg_2 . field . document_type_obj , owner_document = arg_1 ) ) arg_4 . update ( { "_document_field" : arg_2 . field , "_key" : arg_3 , "_field_type" : ListField , "_widget" : get_widget ( arg_2 . field ) , "_value" : getattr ( arg_1 , arg_3 , None ) } ) return arg_4

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


Question: Identify whether the user is requesting unit validation against astropy . units pint or quantities .

def Func ( arg_0 ) : if HAS_ASTROPY : from astropy . units import UnitBase if isinstance ( arg_0 , UnitBase ) : return ASTROPY if HAS_PINT : from pint . unit import UnitsContainer if hasattr ( arg_0 , 'dimensionality' ) and isinstance ( arg_0 . dimensionality , UnitsContainer ) : return PINT if HAS_QUANTITIES : from quantities . unitquantity import IrreducibleUnit from quantities import Quantity if isinstance ( arg_0 , IrreducibleUnit ) or isinstance ( arg_0 , Quantity ) : return QUANTITIES raise TraitError ( "Could not identify unit framework for target unit of type {0}" . format ( type ( arg_0 ) . __name__ ) )

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


Question: Computes the log - normalizer of the distribution .

def Func ( arg_0 ) : arg_1 = tf . compat . dimension_value ( arg_0 . event_shape [ 0 ] ) if arg_1 is None : raise ValueError ( 'vMF _log_normalizer currently only supports ' 'statically known event shape' ) arg_2 = tf . where ( arg_0 . concentration > 0 , arg_0 . concentration , tf . ones_like ( arg_0 . concentration ) ) arg_3 = ( ( arg_1 / 2 - 1 ) * tf . math . log ( arg_2 ) - ( arg_1 / 2 ) * np . log ( 2 * np . pi ) - tf . math . log ( _bessel_ive ( arg_1 / 2 - 1 , arg_2 ) ) - tf . abs ( arg_2 ) ) arg_4 = ( np . log ( 2. ) + ( arg_1 / 2 ) * np . log ( np . pi ) - tf . math . lgamma ( tf . cast ( arg_1 / 2 , arg_0 . dtype ) ) ) return tf . where ( arg_0 . concentration > 0 , - arg_3 , arg_4 * tf . ones_like ( arg_3 ) )

Run complete analysis and return results.


Question: Cancel operations .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] arg_4 = [ ] arg_5 = 256 arg_6 = len ( arg_2 ) for arg_7 in range ( 0 , arg_6 , arg_5 ) : arg_8 , arg_9 = _Func_batch ( arg_0 , arg_1 , arg_2 [ arg_7 : arg_7 + arg_5 ] ) arg_3 . extend ( arg_8 ) arg_4 . extend ( arg_9 ) return arg_3 , arg_4


Question: Constructor for Linux binary analysis .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = '' , arg_7 = False , arg_8 = None , ** arg_9 ) : if arg_8 is None : arg_8 = consts . stdin_size try : return arg_0 ( _make_Func ( arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 , arg_8 ) , ** arg_9 ) except elftools . common . exceptions . ELFError : raise Exception ( f'Invalid binary: {path}' )


Question: Convert binary data to type type .

def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : arg_4 = arg_0 . get_type_size ( arg_2 ) if arg_4 > 0 and len ( arg_1 ) != arg_4 : raise ArgumentError ( "Could not convert type from binary since the data was not the correct size" , required_size = arg_4 , actual_size = len ( arg_1 ) , arg_2 = arg_2 ) arg_5 = arg_0 . get_type ( arg_2 ) if not hasattr ( arg_5 , 'convert_binary' ) : raise ArgumentError ( "Type does not support conversion from binary" , arg_2 = arg_2 ) return arg_5 . convert_binary ( arg_1 , ** arg_3 )

Set a property value or remove a property.

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

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

        This default implementation

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

        Removing a non-existing prop is NOT an error.

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

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


Question: Get the list of network interfaces . Will return all datalinks on SmartOS .

def Func ( ) : with settings ( hide ( 'running' , 'stdout' ) ) : if is_file ( '/usr/sbin/dladm' ) : arg_0 = run ( '/usr/sbin/dladm show-link' ) else : arg_0 = sudo ( '/sbin/ifconfig -s' ) return [ arg_1 . split ( ' ' ) [ 0 ] for arg_1 in arg_0 . splitlines ( ) [ 1 : ] ]


Question: Recursively downloads a folder in a vault to a local directory . Only downloads files not datasets .

def Func ( arg_0 , arg_1 , arg_2 = False , arg_3 = False ) : arg_1 = os . path . normpath ( os . path . expanduser ( arg_1 ) ) if not os . access ( arg_1 , os . W_OK ) : raise Exception ( 'Write access to local path ({}) is required' . format ( arg_1 ) ) arg_4 , arg_5 = solvebio . Object . validate_full_path ( arg_0 ) arg_6 = solvebio . Vault . get_by_full_path ( arg_5 [ 'vault' ] ) print ( 'Downloading all files from {} to {}' . format ( arg_4 , arg_1 ) ) if arg_5 [ 'path' ] == '/' : arg_7 = None else : arg_8 = solvebio . Object . get_by_full_path ( arg_0 , assert_type = 'folder' ) arg_7 = arg_8 . id print ( 'Creating local directory structure at: {}' . format ( arg_1 ) ) if not os . path . exists ( arg_1 ) : if not arg_2 : os . makedirs ( arg_1 ) arg_9 = arg_6 . folders ( arg_7 = arg_7 ) for arg_10 in arg_9 : arg_11 = os . path . normpath ( arg_1 + arg_10 . path ) if not os . path . exists ( arg_11 ) : print ( 'Creating folder: {}' . format ( arg_11 ) ) if not arg_2 : os . makedirs ( arg_11 ) arg_12 = arg_6 . files ( arg_7 = arg_7 ) for arg_10 in arg_12 : arg_11 = os . path . normpath ( arg_1 + arg_10 . path ) if os . path . exists ( arg_11 ) : if arg_3 : print ( 'Deleting local file (force download): {}' . format ( arg_11 ) ) if not arg_2 : os . remove ( arg_11 ) else : print ( 'Skipping file (already exists): {}' . format ( arg_11 ) ) continue print ( 'Downloading file: {}' . format ( arg_11 ) ) if not arg_2 : arg_10 . download ( arg_11 )

Save the state of hooks in the sys module.

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


Question: Iterate over all pages for the given url . Feed in the result of self . _build_path as the url .

def Func ( arg_0 , arg_1 , ** arg_2 ) : if 'fields' in arg_2 : if 'total_items' not in arg_2 [ 'fields' ] . split ( ',' ) : arg_2 [ 'fields' ] += ',total_items' arg_2 . pop ( "offset" , None ) arg_2 . pop ( "count" , None ) arg_3 = arg_0 . _mc_client . _get ( arg_1 = arg_1 , arg_5 = 0 , count = 1000 , ** arg_2 ) arg_4 = arg_3 [ 'total_items' ] if arg_4 > 1000 : for arg_5 in range ( 1 , int ( arg_4 / 1000 ) + 1 ) : arg_3 = merge_results ( arg_3 , arg_0 . _mc_client . _get ( arg_1 = arg_1 , arg_5 = int ( arg_5 * 1000 ) , count = 1000 , ** arg_2 ) ) return arg_3 else : return arg_3

An integer-valued dimension bounded between `min` <= x <= `max`.
        Note that the right endpoint of the interval includes `max`.

        When `warp` is None, the base measure associated with this dimension
        is a categorical distribution with each weight on each of the integers
        in [min, max]. With `warp == 'log'`, the base measure is a uniform
        distribution on the log of the variable, with bounds at `log(min)` and
        `log(max)`. This is appropriate for variables that are "naturally" in
        log-space. Other `warp` functions are not supported (yet), but may be
        at a later time. Please note that this functionality is not supported
        for `hyperopt_tpe`.


Question: returns the list of states obtained by adding the given inputs to the current state one by one .

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] arg_3 = arg_0 for arg_4 in arg_1 : arg_3 = arg_3 . add_input ( arg_4 ) arg_2 . append ( arg_3 ) return arg_2

Call the disambiguation service in order to process a pdf file .

        Args:
            pdf (file): PDF file to be disambiguated.
            language (str): language of text (if known)

        Returns:
            dict, int: API response and API status.


Question: Traverse the bone hierarchy and create physics joints .

def Func ( arg_0 ) : arg_1 = [ 'root' ] while arg_1 : arg_2 = arg_1 . pop ( ) for arg_3 in arg_0 . hierarchy . get ( arg_2 , ( ) ) : arg_1 . append ( arg_3 ) if arg_2 not in arg_0 . bones : continue arg_4 = arg_0 . bones [ arg_2 ] arg_5 = [ b for b in arg_0 . bodies if b . name == arg_2 ] [ 0 ] for arg_3 in arg_0 . hierarchy . get ( arg_2 , ( ) ) : arg_6 = arg_0 . bones [ arg_3 ] arg_7 = [ b for b in arg_0 . bodies if b . name == arg_3 ] [ 0 ] arg_8 = ( '' , 'hinge' , 'universal' , 'ball' ) [ len ( arg_6 . dof ) ] arg_0 . joints . append ( arg_0 . world . join ( arg_8 , arg_5 , arg_7 ) )

Convert a JSON representation into ListValue message.


Question: Return a list of strings formatted as HTML bibliography entries

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_1 . entries : arg_2 . append ( arg_3 [ "content" ] [ 0 ] [ "value" ] ) arg_0 . url_params = None return arg_2

Awake one process waiting to receive data on fd


Question: Start the controller .

def Func ( arg_0 ) : if arg_0 . mode == "manual" : return if arg_0 . ipython_dir != '~/.ipython' : arg_0 . ipython_dir = os . path . abspath ( os . path . expanduser ( arg_0 . ipython_dir ) ) if arg_0 . log : arg_2 = open ( os . path . join ( arg_0 . ipython_dir , "{0}.controller.out" . format ( arg_0 . profile ) ) , 'w' ) arg_3 = open ( os . path . join ( arg_0 . ipython_dir , "{0}.controller.err" . format ( arg_0 . profile ) ) , 'w' ) else : arg_2 = open ( os . devnull , 'w' ) arg_3 = open ( os . devnull , 'w' ) try : arg_4 = [ 'ipcontroller' , '' if arg_0 . ipython_dir == '~/.ipython' else '--ipython-dir={}' . format ( arg_0 . ipython_dir ) , arg_0 . interfaces if arg_0 . interfaces is not None else '--ip=*' , '' if arg_0 . profile == 'default' else '--profile={0}' . format ( arg_0 . profile ) , '--reuse' if arg_0 . reuse else '' , '--location={}' . format ( arg_0 . public_ip ) if arg_0 . public_ip else '' , '--port={}' . format ( arg_0 . port ) if arg_0 . port is not None else '' ] if arg_0 . port_range is not None : arg_4 += [ '--HubFactory.hb={0},{1}' . format ( arg_0 . hb_ping , arg_0 . hb_pong ) , '--HubFactory.control={0},{1}' . format ( arg_0 . control_client , arg_0 . control_engine ) , '--HubFactory.mux={0},{1}' . format ( arg_0 . mux_client , arg_0 . mux_engine ) , '--HubFactory.task={0},{1}' . format ( arg_0 . task_client , arg_0 . task_engine ) ] logger . debug ( "Starting ipcontroller with '{}'" . format ( ' ' . join ( [ str ( arg_5 ) for arg_5 in arg_4 ] ) ) ) arg_0 . proc = subprocess . Popen ( arg_4 , arg_2 = arg_2 , arg_3 = arg_3 , preexec_fn = os . setsid ) except FileNotFoundError : arg_7 = "Could not find ipcontroller. Please make sure that ipyparallel is installed and available in your env" logger . error ( arg_7 ) raise ControllerError ( arg_7 ) except Exception as e : arg_7 = "IPPController failed to Func: {0}" . format ( e ) logger . error ( arg_7 ) raise ControllerError ( arg_7 )

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: Returns the maximum representable value in this data type .

def Func ( arg_0 ) : arg_0 = tf . as_dtype ( arg_0 ) if hasattr ( arg_0 , 'Func' ) : return arg_0 . Func arg_1 = is_floating ( arg_0 ) or is_complex ( arg_0 ) return np . finfo ( arg_0 ) . Func if arg_1 else np . iinfo ( arg_0 ) . Func

Remove all binary files in the adslib directory.


Question: Returns the smallest delimited version of field_key that is an attribute on document .

def Func ( arg_0 , arg_1 ) : arg_2 = True arg_3 = [ ] arg_4 = arg_1 while arg_2 and arg_4 : if hasattr ( arg_0 , arg_4 ) : arg_2 = False else : arg_5 = arg_4 . split ( "_" ) arg_3 . append ( arg_5 . pop ( ) ) arg_4 = u"_" . join ( arg_5 ) arg_3 . reverse ( ) return arg_4 , arg_3

Dumps a database table into a tab-delimited file


Question: Augmenter to alpha - blend two image sources using simplex noise alpha masks .

def Func ( arg_0 = None , arg_1 = None , arg_2 = False , arg_3 = ( 2 , 16 ) , arg_4 = None , arg_5 = ( 1 , 3 ) , arg_6 = "max" , arg_7 = True , arg_8 = None , arg_9 = None , arg_10 = False , arg_11 = None ) : arg_12 = iap . Choice ( [ "nearest" , "linear" , "cubic" ] , p = [ 0.05 , 0.6 , 0.35 ] ) arg_13 = iap . Normal ( 0.0 , 5.0 ) arg_14 = iap . SimplexNoise ( arg_3 = arg_3 , arg_4 = arg_4 if arg_4 is not None else arg_12 ) if arg_5 != 1 : arg_14 = iap . IterativeNoiseAggregator ( arg_14 , arg_5 = arg_5 , arg_6 = arg_6 ) if arg_7 is False or ( ia . is_single_number ( arg_7 ) and arg_7 <= 0.01 ) : arg_14 = iap . Sigmoid . create_for_noise ( arg_14 , threshold = arg_8 if arg_8 is not None else arg_13 , activated = arg_7 ) if arg_9 is None : arg_9 = "Unnamed%s" % ( ia . caller_name ( ) , ) return AlphaElementwise ( factor = arg_14 , arg_0 = arg_0 , arg_1 = arg_1 , arg_2 = arg_2 , arg_9 = arg_9 , arg_10 = arg_10 , arg_11 = arg_11 )

Return whether the input course or program exist.


Question: use previously calculated variation of the rate to estimate the uncertainty in a particular numdate due to rate variation .

def Func ( arg_0 , arg_1 , arg_2 = ( 0.05 , 0.095 ) ) : if hasattr ( arg_1 , "numdate_rate_variation" ) : from scipy . special import erfinv arg_3 = [ np . sqrt ( 2.0 ) * erfinv ( - 1.0 + 2.0 * arg_7 ) if arg_7 * ( 1.0 - arg_7 ) else 0 for arg_7 in arg_2 ] arg_4 , arg_5 , arg_6 = [ arg_7 [ 1 ] for arg_7 in arg_1 . numdate_rate_variation ] return np . array ( [ arg_5 + arg_7 * np . abs ( arg_8 - arg_5 ) for arg_7 , arg_8 in zip ( arg_3 , ( arg_4 , arg_6 ) ) ] ) else : return None


Question: Unlink path but do not complain if file does not exist .

def Func ( arg_0 ) : try : os . unlink ( arg_0 ) except OSError as err : if err . errno != errno . ENOENT : raise

Register a new range type as a PostgreSQL range.

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

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

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

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


Question: reset output buffer re - parse entire source file and return output Since parsing involves a good deal of randomness this is an easy way to get new output without having to reload a grammar file each time .

def Func ( arg_0 ) : arg_0 . reset ( ) arg_0 . parse ( arg_0 . source ) return arg_0 . output ( )

Checks if a bundle exists at the provided path

        :param path: Bundle path
        :return: bool


Question: Return CLEF German stemmer plus stem .

def Func ( arg_0 , arg_1 ) : arg_1 = normalize ( 'NFC' , text_type ( arg_1 . lower ( ) ) ) arg_1 = arg_1 . translate ( arg_0 . _accents ) arg_2 = len ( arg_1 ) - 1 if arg_2 > 4 and arg_1 [ - 3 : ] == 'ern' : arg_1 = arg_1 [ : - 3 ] elif arg_2 > 3 and arg_1 [ - 2 : ] in { 'em' , 'en' , 'er' , 'es' } : arg_1 = arg_1 [ : - 2 ] elif arg_2 > 2 and ( arg_1 [ - 1 ] == 'e' or ( arg_1 [ - 1 ] == 's' and arg_1 [ - 2 ] in arg_0 . _st_ending ) ) : arg_1 = arg_1 [ : - 1 ] arg_2 = len ( arg_1 ) - 1 if arg_2 > 4 and arg_1 [ - 3 : ] == 'est' : arg_1 = arg_1 [ : - 3 ] elif arg_2 > 3 and ( arg_1 [ - 2 : ] in { 'er' , 'en' } or ( arg_1 [ - 2 : ] == 'st' and arg_1 [ - 3 ] in arg_0 . _st_ending ) ) : arg_1 = arg_1 [ : - 2 ] return arg_1

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

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


Question: Adds monitors to the network

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_3 [ 'neurons_e' ] arg_5 = [ ] arg_0 . spike_monitor = SpikeMonitor ( arg_4 ) arg_5 . append ( arg_0 . spike_monitor ) arg_0 . V_monitor = StateMonitor ( arg_4 , 'V' , record = list ( arg_1 . neuron_records ) ) arg_5 . append ( arg_0 . V_monitor ) arg_0 . I_syn_e_monitor = StateMonitor ( arg_4 , 'I_syn_e' , record = list ( arg_1 . neuron_records ) ) arg_5 . append ( arg_0 . I_syn_e_monitor ) arg_0 . I_syn_i_monitor = StateMonitor ( arg_4 , 'I_syn_i' , record = list ( arg_1 . neuron_records ) ) arg_5 . append ( arg_0 . I_syn_i_monitor ) arg_2 . add ( * arg_5 ) arg_3 [ 'monitors' ] = arg_5

Simple and fast implementation of the covariance AR estimate

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

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

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

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

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

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

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

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

    :References: Mathworks