Question: Yield all the uninstallation paths for dist based on RECORD - without - . pyc

def Func ( arg_0 ) : from pip . utils import FakeFile arg_1 = csv . reader ( FakeFile ( arg_0 . get_metadata_lines ( 'RECORD' ) ) ) for arg_2 in arg_1 : arg_3 = os . path . join ( arg_0 . location , arg_2 [ 0 ] ) yield arg_3 if arg_3 . endswith ( '.py' ) : arg_4 , arg_5 = os . path . split ( arg_3 ) arg_6 = arg_5 [ : - 3 ] arg_3 = os . path . join ( arg_4 , arg_6 + '.pyc' ) yield arg_3


Question: Returns the current token if it is not found in the collection provided . The negative of one_of .

def Func ( arg_0 ) : arg_1 = peek ( ) arg_2 = "Func" + repr ( arg_0 ) try : if ( arg_1 is EndOfFile ) or ( arg_1 in arg_0 ) : fail ( [ arg_2 ] ) except TypeError : if arg_1 != arg_0 : fail ( [ arg_2 ] ) next ( ) return arg_1


Question: Accepts data in zyx . !!!

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 ) : arg_6 = numpy . expand_dims ( arg_6 , axis = 0 ) arg_8 = blosc . pack_array ( arg_6 ) arg_9 = arg_0 . url ( "{}/{}/blosc/{}/{},{}/{},{}/{},{}/0,0/" . format ( arg_1 , arg_2 , arg_7 , arg_3 , arg_3 + arg_6 . shape [ 3 ] , arg_4 , arg_4 + arg_6 . shape [ 2 ] , arg_5 , arg_5 + arg_6 . shape [ 1 ] ) ) arg_10 = arg_0 . remote_utils . post_url ( arg_9 , arg_6 = arg_8 , headers = { 'Content-Type' : 'application/octet-stream' } ) if arg_10 . status_code is not 200 : raise RemoteDataUploadError ( arg_10 . text ) else : return True

Adds a new source to the computation DAG


Question: Check the first message matches the expected handshake .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _unpack_message ( arg_1 ) logger . debug ( arg_2 ) if arg_2 != arg_0 . RTM_HANDSHAKE : raise SlackApiError ( 'Unexpected response: {!r}' . format ( arg_2 ) ) logger . info ( 'Joined real-time messaging.' )


Question: Checks if the input implements the iterator interface . An exception is made for strings which return False unless strok is True

def Func ( arg_0 , arg_1 = False ) : try : iter ( arg_0 ) except Exception : return False else : return arg_1 or not isinstance ( arg_0 , six . string_types )

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


Question: Compute the return of the currency between two dates

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = "MID" ) : if arg_3 not in [ "MID" , "ASK" , "BID" ] : raise ValueError ( "Unknown rate type (%s)- must be 'MID', 'ASK' or 'BID'" % str ( arg_3 ) ) if arg_2 <= arg_1 : raise ValueError ( "End date must be on or after start date" ) arg_4 = arg_0 . generate_dataframe ( arg_1 = arg_1 , arg_2 = arg_2 ) arg_5 = arg_4 . ix [ arg_1 ] [ arg_3 ] arg_6 = arg_4 . ix [ arg_2 ] [ arg_3 ] arg_7 = ( arg_6 / arg_5 ) - 1.0 return arg_7

Create a C compiler.

    :param bool silent: Eat all stdio? Defaults to ``True``.

    All other arguments passed to ``distutils.ccompiler.new_compiler``.


Question: Uploads new version of the blog website

def Func ( arg_0 ) : arg_1 = arg_0 . obj header ( 'Generating HTML...' ) pelican ( arg_1 , '--verbose' , production = True ) header ( 'Removing unnecessary output...' ) arg_2 = [ 'author' , 'category' , 'tag' , 'feeds' , 'tags.html' , 'authors.html' , 'categories.html' , 'archives.html' , ] for arg_3 in arg_2 : remove_path ( os . path . join ( arg_1 [ 'OUTPUT_DIR' ] , arg_3 ) ) if os . environ . get ( 'TRAVIS' ) : header ( 'Setting up Git...' ) run ( 'git config user.name ' + run ( 'git show --format="%cN" -s' , capture = True ) ) run ( 'git config user.email ' + run ( 'git show --format="%cE" -s' , capture = True ) ) arg_4 = os . environ . get ( 'GITHUB_TOKEN' ) arg_5 = os . environ . get ( 'TRAVIS_REPO_SLUG' ) arg_6 = 'https://{}@github.com/{}.git' . format ( arg_4 , arg_5 ) run ( 'git remote set-url origin ' + arg_6 ) header ( 'Rewriting gh-pages branch...' ) run ( 'ghp-import -m "{message}" {dir}' . format ( message = 'Deploying {}' . format ( choose_commit_emoji ( ) ) , dir = arg_1 [ 'OUTPUT_DIR' ] , ) ) header ( 'Pushing to GitHub...' ) run ( 'git push origin gh-pages:gh-pages --force' )

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: r Return a file list in a folder by given a path and regular expression .

def Func ( arg_0 = None , arg_1 = '\.jpg' , arg_2 = True , arg_3 = False ) : if arg_0 is None : arg_0 = os . getcwd ( ) arg_4 = os . listdir ( arg_0 ) arg_5 = [ ] for arg_6 , arg_7 in enumerate ( arg_4 ) : if re . search ( arg_1 , arg_7 ) : arg_5 . append ( arg_7 ) if arg_3 : for arg_8 , arg_7 in enumerate ( arg_5 ) : arg_5 [ arg_8 ] = os . path . join ( arg_0 , arg_7 ) if arg_2 : logging . info ( 'Match file list = %s' % arg_5 ) logging . info ( 'Number of files = %d' % len ( arg_5 ) ) return arg_5

Returns the maximum delay for the InferenceElements in the inference
    dictionary

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


Question: Create a tar file with a given set of files

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : with contextlib . closing ( tarfile . open ( arg_0 , 'w:gz' , dereference = True ) ) as tar : for arg_4 in arg_1 : if os . path . isfile ( arg_4 ) : tar . add ( arg_4 , arcname = os . path . basename ( arg_4 ) ) else : raise Exception ( "%s is not an existing file" % arg_4 ) if os . path . isdir ( arg_2 ) : tar . add ( arg_2 , arcname = get_heron_sandbox_conf_dir ( ) ) else : raise Exception ( "%s is not an existing directory" % arg_2 ) for arg_4 in arg_3 : if os . path . isfile ( arg_4 ) : arg_5 = os . path . join ( get_heron_sandbox_conf_dir ( ) , os . path . basename ( arg_4 ) ) tar . add ( arg_4 , arcname = arg_5 ) else : raise Exception ( "%s is not an existing file" % arg_4 )

Returns true if the host is reachable. In some cases, it may not be reachable a tunnel
    must be used.


Question: Gets data from queue

def Func ( arg_0 ) : arg_1 = arg_0 . queue . get ( block = True ) if hasattr ( arg_0 . queue , 'task_done' ) : arg_0 . queue . task_done ( ) return arg_1


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

def Func ( arg_0 , arg_1 = 0 , arg_2 = None , arg_3 = None , arg_4 = 60 ) : arg_5 . environ [ "COLUMNS" ] = str ( arg_4 ) arg_7 = arg_0 if arg_2 : for arg_8 , arg_9 in arg_2 . items ( ) : arg_7 = arg_7 . replace ( "${" + arg_8 + "}" , arg_9 ) arg_10 = arg_7 . split ( " " ) if ( platform . system ( ) . lower ( ) == "windows" ) and ( arg_10 [ 0 ] . endswith ( ".py" ) ) : arg_10 = [ sys . executable ] + arg_10 arg_11 = subprocess . Popen ( arg_10 , arg_12 = subprocess . PIPE , stderr = subprocess . STDOUT ) arg_12 = arg_11 . communicate ( ) [ 0 ] if sys . hexversion >= 0x03000000 : arg_12 = arg_12 . decode ( "utf-8" ) arg_12 = arg_12 . split ( "\n" ) arg_13 = arg_1 * " " arg_3 ( "\n" , dedent = False ) arg_3 ( "{0}.. code-block:: bash\n" . format ( arg_13 ) , dedent = False ) arg_3 ( "\n" , dedent = False ) arg_3 ( "{0}    $ {1}\n" . format ( arg_13 , arg_0 ) , dedent = False ) for arg_14 in arg_12 : if arg_14 . strip ( ) : arg_3 ( arg_13 + "    " + arg_14 . replace ( "\t" , "    " ) + "\n" , dedent = False ) else : arg_3 ( "\n" , dedent = False ) arg_3 ( "\n" , dedent = False )

Called when there is an error in the websocket


Question: Returns a list of internal Wikipedia links in the markup .

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] arg_3 = re . findall ( arg_0 . re [ "link" ] , arg_1 ) for arg_4 in arg_3 : if arg_4 . find ( "{" ) >= 0 : arg_4 = re . sub ( "\{{1,3}[0-9]{0,2}\|" , "" , arg_4 ) arg_4 = arg_4 . replace ( "{" , "" ) arg_4 = arg_4 . replace ( "}" , "" ) arg_4 = arg_4 . split ( "|" ) arg_4 [ 0 ] = arg_4 [ 0 ] . split ( "#" ) arg_5 = arg_4 [ 0 ] [ 0 ] . strip ( ) if not arg_5 in arg_2 : arg_2 . append ( arg_5 ) arg_2 . sort ( ) return arg_2

Return the number of bytes transmitted in 1 second.


Question: Walk statements and compare if they can be merged into one statement list

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 is None and arg_2 is None : return True elif arg_1 is None or arg_2 is None : return False arg_3 = iter ( arg_1 ) arg_4 = iter ( arg_2 ) arg_5 = _get_stm_with_branches ( arg_3 ) arg_6 = _get_stm_with_branches ( arg_4 ) while arg_5 is not None or arg_6 is not None : if arg_5 is None or arg_6 is None or not arg_5 . _is_mergable ( arg_6 ) : return False arg_5 = _get_stm_with_branches ( arg_3 ) arg_6 = _get_stm_with_branches ( arg_4 ) return True

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


Question: Check if req_to_install should be skipped .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 . check_if_exists ( ) if arg_1 . satisfied_by : arg_3 = 'satisfied (use --upgrade to upgrade)' if arg_0 . upgrade : arg_4 = False if not ( arg_0 . force_reinstall or arg_1 . link ) : try : arg_2 . find_requirement ( arg_1 , arg_0 . upgrade ) except BestVersionAlreadyInstalled : arg_3 = 'up-to-date' arg_4 = True except DistributionNotFound : pass if not arg_4 : if not ( arg_0 . use_user_site and not dist_in_usersite ( arg_1 . satisfied_by ) ) : arg_1 . conflicts_with = arg_1 . satisfied_by arg_1 . satisfied_by = None return arg_3 else : return None

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


Question: Resumes an transfer operation in Google Storage Transfer Service .

def Func ( arg_0 , arg_1 ) : arg_0 . get_conn ( ) . transferOperations ( ) . resume ( name = arg_1 ) . execute ( num_retries = arg_0 . num_retries )

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


Question: Search for managed objects depending on the attributes specified in the request .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None ) : if arg_1 is not None : if not isinstance ( arg_1 , six . integer_types ) : raise TypeError ( "maximum_items must be an integer" ) if arg_2 is not None : if not isinstance ( arg_2 , six . integer_types ) : raise TypeError ( "storage_status_mask must be an integer" ) if arg_3 is not None : if not isinstance ( arg_3 , enums . ObjectGroupMember ) : raise TypeError ( "object_group_member must be a ObjectGroupMember" "enumeration" ) if arg_4 is not None : if not isinstance ( arg_4 , list ) or all ( isinstance ( arg_5 , cobjects . Attribute ) for arg_5 in arg_4 ) is False : raise TypeError ( "attributes must be a list of attributes" ) arg_6 = arg_0 . proxy . Func ( arg_1 , arg_2 , arg_3 , arg_4 ) arg_7 = arg_6 . result_status . value if arg_7 == enums . ResultStatus . SUCCESS : return arg_6 . uuids else : arg_8 = arg_6 . result_reason . value arg_9 = arg_6 . result_message . value raise exceptions . KmipOperationFailure ( arg_7 , arg_8 , arg_9 )


Question: Sends out an e - mail notifying the user about something to do with that invoice .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { "invoice" : arg_1 , } send_Func ( [ arg_1 . user . Func ] , arg_2 , arg_3 = arg_3 )

Multinomial coefficient.

  Given `n` and `counts`, where `counts` has last dimension `k`, we compute
  the multinomial coefficient as:

  ```n! / sum_i n_i!```

  where `i` runs over all `k` classes.

  Args:
    n: Floating-point `Tensor` broadcastable with `counts`. This represents `n`
      outcomes.
    counts: Floating-point `Tensor` broadcastable with `n`. This represents
      counts in `k` classes, where `k` is the last dimension of the tensor.
    name: A name for this operation (optional).

  Returns:
    `Tensor` representing the multinomial coefficient between `n` and `counts`.


Question: Removes the node and all descendents without looping back past the root . Note this does not remove the associated data objects .

def Func ( arg_0 ) : arg_1 = arg_0 . descendents_root ( ) try : arg_1 . remove ( arg_0 . graph . root ) except ValueError : pass arg_2 = [ n . data for n in arg_1 ] arg_2 . append ( arg_0 . data ) for arg_3 in arg_1 : arg_3 . delete ( ) for arg_4 in arg_0 . parents . all ( ) : arg_4 . children . remove ( arg_0 ) arg_0 . delete ( ) return arg_2

Use YAML from a file or stdin to populate the readme.

    To stream content from stdin use "-", e.g.

    echo "desc: my data" | dtool readme write <DS_URI> -


Question: Retrieve a scaling IP .

def Func ( arg_0 , arg_1 , arg_2 = None ) : LOG . info ( 'Func %s for tenant %s' % ( arg_1 , arg_0 . tenant_id ) ) arg_3 = { 'address_type' : ip_types . SCALING , '_deallocated' : False } arg_4 = db_api . floating_ip_find ( arg_0 , arg_1 = arg_1 , scope = db_api . ONE , ** arg_3 ) if not arg_4 : raise q_exc . ScalingIpNotFound ( arg_1 = arg_1 ) return v . _make_scaling_ip_dict ( arg_4 )

A factory method which can be overridden in subclasses to create
        specialized LogRecords.


Question: Set x y and z labels according to one of conventions .

def Func ( arg_0 , arg_1 ) : arg_2 = "$\\left.|%s\\right\\rangle$" if arg_1 == "original" : arg_0 . xlabel = [ '$x$' , '' ] arg_0 . ylabel = [ '$y$' , '' ] arg_0 . zlabel = [ '$\\left|0\\right>$' , '$\\left|1\\right>$' ] elif arg_1 == "xyz" : arg_0 . xlabel = [ '$x$' , '' ] arg_0 . ylabel = [ '$y$' , '' ] arg_0 . zlabel = [ '$z$' , '' ] elif arg_1 == "sx sy sz" : arg_0 . xlabel = [ '$s_x$' , '' ] arg_0 . ylabel = [ '$s_y$' , '' ] arg_0 . zlabel = [ '$s_z$' , '' ] elif arg_1 == "01" : arg_0 . xlabel = [ '' , '' ] arg_0 . ylabel = [ '' , '' ] arg_0 . zlabel = [ '$\\left|0\\right>$' , '$\\left|1\\right>$' ] elif arg_1 == "polarization jones" : arg_0 . xlabel = [ arg_2 % "\\nearrow\\hspace{-1.46}\\swarrow" , arg_2 % "\\nwarrow\\hspace{-1.46}\\searrow" ] arg_0 . ylabel = [ arg_2 % "\\circlearrowleft" , arg_2 % "\\circlearrowright" ] arg_0 . zlabel = [ arg_2 % "\\leftrightarrow" , arg_2 % "\\updownarrow" ] elif arg_1 == "polarization jones letters" : arg_0 . xlabel = [ arg_2 % "D" , arg_2 % "A" ] arg_0 . ylabel = [ arg_2 % "L" , arg_2 % "R" ] arg_0 . zlabel = [ arg_2 % "H" , arg_2 % "V" ] elif arg_1 == "polarization stokes" : arg_0 . ylabel = [ "$\\nearrow\\hspace{-1.46}\\swarrow$" , "$\\nwarrow\\hspace{-1.46}\\searrow$" ] arg_0 . zlabel = [ "$\\circlearrowleft$" , "$\\circlearrowright$" ] arg_0 . xlabel = [ "$\\leftrightarrow$" , "$\\updownarrow$" ] else : raise Exception ( "No such convention." )


Question: Downloads the sprites data and returns the saved filepath .

def Func ( ) : arg_0 = os . path . join ( FLAGS . data_dir , DATA_SPRITES_DIR ) if not tf . io . gfile . exists ( arg_0 ) : if not tf . io . gfile . exists ( FLAGS . data_dir ) : tf . io . gfile . makedirs ( FLAGS . data_dir ) arg_1 = "{}.zip" . format ( arg_0 ) urllib . request . urlretrieve ( DATA_SPRITES_URL , arg_1 ) with zipfile . ZipFile ( arg_1 , "r" ) as zip_file : zip_file . extractall ( FLAGS . data_dir ) tf . io . gfile . remove ( arg_1 ) return arg_0

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: Restricts a function in n - dimensions to a given direction .

def Func ( arg_0 , arg_1 , arg_2 ) : def _restricted_func ( arg_3 ) : arg_3 = _broadcast ( arg_3 , arg_1 ) arg_4 = arg_1 + tf . expand_dims ( arg_3 , axis = - 1 ) * arg_2 arg_5 , arg_6 = arg_0 ( arg_4 ) return ValueAndGradient ( x = arg_3 , f = arg_5 , df = tf . reduce_sum ( input_tensor = arg_6 * arg_2 , axis = - 1 ) , full_gradient = arg_6 ) return _restricted_func

Initialize configuration.

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


Question: Output results in CSV format

def Func ( arg_0 , arg_1 ) : arg_2 = json . loads ( arg_1 ) print ( "{0},{1},{2},{3},{4}" . format ( 'timestamp' , 'metric' , 'aggregate' , 'source' , 'value' ) ) arg_3 = arg_0 . _metric_name for arg_4 in arg_2 [ 'result' ] [ 'aggregates' ] [ 'key' ] : arg_5 = arg_0 . _format_timestamp ( arg_4 [ 0 ] [ 0 ] ) for arg_6 in arg_4 [ 1 ] : print ( '{0},"{1}","{2}","{3}",{4}' . format ( arg_5 , arg_3 , arg_0 . aggregate , arg_6 [ 0 ] , arg_6 [ 1 ] ) )

Prepare received data for representation.

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

        Returns:
            dict: processed data to show.


Question: Fix bad Unicode special dashes in string .

def Func ( arg_0 ) : arg_0 = arg_0 . replace ( u'\u05BE' , '-' ) arg_0 = arg_0 . replace ( u'\u1806' , '-' ) arg_0 = arg_0 . replace ( u'\u2E3A' , '-' ) arg_0 = arg_0 . replace ( u'\u2E3B' , '-' ) arg_0 = unidecode ( arg_0 ) return re . sub ( r'--+' , '-' , arg_0 )

Create a traceback for an Octave evaluation error.


Question: Decode a SUBSCRIBE control packet .

def Func ( arg_0 , arg_1 ) : arg_0 . encoded = arg_1 arg_3 = 1 while arg_1 [ arg_3 ] & 0x80 : arg_3 += 1 arg_4 = arg_1 [ arg_3 + 1 : ] arg_0 . msgId = Func16Int ( arg_4 [ 0 : 2 ] ) arg_0 . topics = [ ] arg_4 = arg_4 [ 2 : ] while len ( arg_4 ) : arg_7 , arg_4 = FuncString ( arg_4 ) arg_8 = int ( arg_4 [ 0 ] ) & 0x03 arg_0 . topics . append ( ( arg_7 , arg_8 ) ) arg_4 = arg_4 [ 1 : ]

Write the index.html file for this report.


Question: Creates an RTMP ingest point which mandates that streams pushed into the EMS have a target stream name which matches one Ingest Point privateStreamName .

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


Question: Handle exceptions from the asyncio loop .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . _coroutine_queue . put ( arg_0 . _client . disconnect ( ) ) arg_3 = Exception ( arg_2 . get ( 'message' ) ) arg_0 . _exception = arg_2 . get ( 'exception' , arg_3 )

Add a new store to your MailChimp account.

        Error checking on the currency code verifies that it is in the correct
        three-letter, all-caps format as specified by ISO 4217 but does not
        check that it is a valid code as the list of valid codes changes over
        time.

        :param data: The request body parameters
        :type data: :py:class:`dict`
        data = {
            "id": string*,
            "list_id": string*,
            "name": string*,
            "currency_code": string*
        }


Question: Determine the mass flow rates of elements in the stream .

def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_1 = arg_0 . material . elements arg_2 = numpy . zeros ( len ( arg_1 ) ) for arg_3 in arg_0 . material . compounds : arg_2 += arg_0 . get_compound_mfr ( arg_3 ) * stoich . element_mass_fractions ( arg_3 , arg_1 ) return arg_2

Callback from a parent future to update the AppFuture.

        Used internally by AppFuture, and should not be called by code using AppFuture.

        Args:
            - executor_fu (Future): Future returned by the executor along with callback.
              This may not be the current parent future, as the parent future may have
              already been updated to point to a retrying execution, and in that case,
              this is logged.

              In the case that a new parent has been attached, we must immediately discard
              this result no matter what it contains (although it might be interesting
              to log if it was successful...)

        Returns:
            - None

        Updates the super() with the result() or exception()


Question: setup the style menu for an editor tab

def Func ( arg_0 , arg_1 ) : arg_2 = QtWidgets . QMenu ( 'Styles' , arg_0 . menuEdit ) arg_3 = QtWidgets . QActionGroup ( arg_0 ) arg_0 . styles_group = arg_3 arg_5 = arg_1 . syntax_highlighter . color_scheme . name arg_3 . triggered . connect ( arg_0 . on_style_changed ) for arg_6 in sorted ( PYGMENTS_STYLES ) : arg_7 = QtWidgets . QAction ( arg_2 ) arg_7 . setText ( arg_6 ) arg_7 . setCheckable ( True ) if arg_6 == arg_5 : arg_7 . setChecked ( True ) arg_3 . addAction ( arg_7 ) arg_2 . addAction ( arg_7 ) arg_0 . menuEdit . addMenu ( arg_2 )

Get a texture by its label

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

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


Question: Returns True if given node can be reached over traversable edges . To enforce edge direction use a node == edge . node1 traversable .

def Func ( arg_0 , arg_1 , arg_2 = lambda arg_1 , arg_3 : True ) : if isinstance ( arg_1 , str ) : arg_1 = arg_0 . graph [ arg_1 ] for arg_4 in arg_0 . graph . nodes : arg_4 . _visited = False return proximity . depth_first_search ( arg_0 , visit = lambda arg_4 : arg_1 == arg_4 , arg_2 = arg_2 )

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: Check if the postponed evaluation of annotations is enabled

def Func ( arg_0 : arg_1 . node_classes . NodeNG ) -> bool : arg_4 = "annotations" arg_5 = arg_0 . root ( ) arg_6 = arg_5 . locals . get ( arg_4 ) return ( arg_6 and isinstance ( arg_6 [ 0 ] , arg_1 . ImportFrom ) and arg_6 [ 0 ] . modname == "__future__" )

Transport the file from the local filesystem to the remote Globus endpoint.

        This function returns a DataFuture.

        Args:
            - self
            - file (File) - file to stage out
            - executor (str) - Which executor the file is going to be staged out from.
                                If the executor argument is not specified for a file
                                with the 'globus' scheme, the file will be staged in to
                                the first executor with the "globus" key in a config.


Question: Check whether there is a GCS object whose name starts with the prefix .

def Func ( arg_0 , arg_1 = None ) : arg_2 = _get_storage_service ( arg_1 ) arg_3 , arg_4 = arg_0 [ len ( 'gs://' ) : ] . split ( '/' , 1 ) arg_5 = arg_2 . objects ( ) . list ( bucket = arg_3 , arg_4 = arg_4 , maxResults = 1 ) arg_6 = arg_5 . execute ( ) return arg_6 . get ( 'items' , None )

Removes a NIC from the load balancer.

        :param      datacenter_id: The unique ID of the data center.
        :type       datacenter_id: ``str``

        :param      loadbalancer_id: The unique ID of the load balancer.
        :type       loadbalancer_id: ``str``

        :param      nic_id: The unique ID of the NIC.
        :type       nic_id: ``str``


Question: Can be overridden by a subclass to hook into the matching of the request .

def Func ( arg_0 ) : try : arg_1 , arg_0 . request . view_args = arg_0 . url_adapter . match ( return_rule = True ) arg_0 . request . url_rule = arg_1 except HTTPException as e : arg_0 . request . routing_exception = e

Unmarks the remote server as currently being deployed to.


Question: Pokes for a mail attachment on the mail server .

def Func ( arg_0 , arg_1 ) : arg_0 . log . info ( 'Poking for %s' , arg_0 . attachment_name ) with ImapHook ( imap_conn_id = arg_0 . conn_id ) as imap_hook : return imap_hook . has_mail_attachment ( name = arg_0 . attachment_name , mail_folder = arg_0 . mail_folder , check_regex = arg_0 . check_regex )


Question: Do some serious mangling to the current python environment ... This is necessary to activate an environment via python .

def Func ( arg_0 ) : arg_1 = set ( arg_4 . path ) site . addsitedir ( arg_0 . site_path ) site . addsitedir ( arg_0 . bin_path ) arg_2 = set ( arg_4 . path ) - arg_1 for arg_3 in arg_2 : arg_4 . path . remove ( arg_3 ) arg_4 . path . insert ( 1 , arg_3 ) if not hasattr ( arg_4 , 'real_prefix' ) : arg_4 . real_prefix = arg_4 . prefix arg_4 . prefix = arg_0 . path

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


Question: Accept either strings or Gods as inputs .

def Func ( arg_0 , arg_1 , arg_2 ) : if type ( arg_1 ) == str : arg_0 . reproduce_asexually ( arg_1 , arg_2 ) else : arg_0 . reproduce_sexually ( arg_1 , arg_2 )


Question: Retrieve bulk devices It accepts accepts a list of parameters In case of failure it throws Exception

def Func ( arg_0 , arg_1 = None ) : arg_2 = arg_0 . _apiClient . get ( arg_0 . _url , arg_1 ) if arg_2 . status_code == 200 : return arg_2 . json ( ) else : raise Exception ( "HTTP %s %s" % ( arg_2 . status_code , arg_2 . text ) )

Handle extracted license.
        Return the license node.


Question: Retrieve the related object from an existing instance in the DB .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . columns : arg_3 = arg_1 . filter_by ( ** { prop . key : arg_2 . get ( prop . key ) for prop in arg_0 . related_keys } ) . one ( ) else : arg_3 = arg_1 . get ( [ arg_2 . get ( prop . key ) for prop in arg_0 . related_keys ] ) if arg_3 is None : raise NoResultFound return arg_3

Check Name Availability for global uniqueness.

        :param location: The location in which uniqueness will be verified.
        :type location: str
        :param name: Resource Name To Verify
        :type name: str
        :param type: Fully qualified resource type which includes provider
         namespace
        :type type: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: CheckNameAvailabilityResponse or ClientRawResponse if
         raw=true
        :rtype: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityResponse
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<azure.mgmt.mixedreality.models.ErrorResponseException>`


Question: Render the num th row of each column in columns .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : arg_4 = '|' arg_5 = [ ] for arg_6 , arg_7 in enumerate ( arg_1 ) : try : arg_8 = arg_7 [ arg_0 ] arg_9 = ' ' * ( arg_2 [ arg_6 ] - len ( arg_8 ) ) if arg_3 is not None and arg_3 [ arg_6 ] is not None : arg_8 = arg_3 [ arg_6 ] ( arg_8 ) arg_5 . append ( ' %s%s ' % ( arg_8 , arg_9 ) ) except IndexError : arg_5 . append ( ' ' * ( arg_2 [ arg_6 ] + 2 ) ) return '|%s|' % '|' . join ( arg_5 )

Adds a topology in the local cache, and sets a watch
    on any changes on the topology.


Question: Add observations from row - major storage .

def Func ( arg_0 , arg_1 ) : for arg_2 in arg_1 : if isinstance ( arg_2 , Observation ) : arg_0 . append ( ** arg_2 . _asdict ( ) ) else : arg_0 . append ( ** arg_2 )


Question: Mark the other side of the stream authenticated as peer

def Func ( arg_0 , arg_1 , arg_2 = False ) : with arg_0 . lock : arg_0 . peer_authenticated = True arg_0 . peer = arg_1 if arg_2 : arg_0 . _restart_stream ( ) arg_0 . event ( AuthenticatedEvent ( arg_0 . peer ) )

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: Return nodes from rhs which have ancestors in lhs .

def Func ( arg_0 , arg_1 , arg_2 ) : def _search ( arg_3 ) : if arg_3 in arg_1 : return True if not arg_3 . parent : return False return _search ( arg_3 . parent ) return [ arg_3 for arg_3 in arg_2 if _search ( arg_3 ) ]


Question: Returns names of features . If features is None returns all features . Otherwise assumes the user is trying to find the order of the features .

def Func ( arg_0 , arg_1 = None ) : if arg_1 : return arg_0 . feature_table . get_ordered_names ( arg_1 ) else : return arg_0 . feature_table . feature_names


Question: take a function that taks an iterable as the first argument . return a wrapper that will break an iterable into chunks using chunkiter and run each chunk in function yielding the value of each function call as an iterator .

def Func ( arg_0 ) : @ functools . wraps ( arg_0 ) def wrapper ( arg_1 , arg_2 , * arg_3 , ** arg_4 ) : for arg_5 in chunkiter ( arg_1 , arg_2 ) : yield arg_0 ( arg_5 , * arg_3 , ** arg_4 ) return wrapper

Propagate "clk" clock and reset "rst" signal to all subcomponents


Question: Convert heatmaps to segmentation map .

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : if arg_1 is None : return SegmentationMapOnImage ( arg_0 . arr_0to1 , shape = arg_0 . shape ) else : ia . do_assert ( arg_2 is not None ) ia . do_assert ( min ( arg_1 ) >= 0 ) ia . do_assert ( max ( arg_1 ) < arg_2 ) ia . do_assert ( len ( arg_1 ) == arg_0 . arr_0to1 . shape [ 2 ] ) arg_3 = arg_0 . arr_0to1 arg_4 = np . zeros ( ( arg_3 . shape [ 0 ] , arg_3 . shape [ 1 ] , arg_2 ) , dtype = np . float32 ) for arg_5 , arg_6 in enumerate ( arg_1 ) : arg_4 [ : , : , arg_6 ] = arg_3 [ : , : , arg_5 ] return SegmentationMapOnImage ( arg_4 , shape = arg_0 . shape )

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: Modify the keys in adict to the ones in translations . Be careful this will modify your input dictionary . The keys not present in translations will be left intact .

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

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

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

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

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

    :rtype: float

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

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

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

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

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

    .. [[[end]]]


Question: Send a leave request for the room .

def Func ( arg_0 ) : if arg_0 . joined : arg_1 = MucPresence ( to_jid = arg_0 . room_jid , stanza_type = "unavailable" ) arg_0 . manager . stream . send ( arg_1 )

Returns the maximum delay for the InferenceElements in the inference
    dictionary

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


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

def Func ( arg_0 ) : arg_0 . secrets = read_client_secrets ( ) if arg_0 . secrets is not None : if "registry" in arg_0 . secrets : if "base" in arg_0 . secrets [ 'registry' ] : arg_0 . base = arg_0 . secrets [ 'registry' ] [ 'base' ] arg_0 . _update_base ( )

Say the workers to finish their jobs and quit.


Question: Validate the given litezip as struct . Returns a list of validation messages .

def Func ( arg_0 ) : arg_1 = [ ] def _fmt_err ( arg_2 ) : return ( Path ( arg_2 . filename ) , "{}:{} -- {}: {}" . format ( * ( arg_2 [ 1 : ] ) ) ) arg_3 = { } for arg_4 in arg_0 : if not is_valid_identifier ( arg_4 . id ) : arg_5 = ( arg_4 . file . parent , "{} is not a valid identifier" . format ( arg_4 . id ) , ) logger . info ( "{}: {}" . format ( * arg_5 ) ) arg_1 . append ( arg_5 ) arg_3 . setdefault ( type ( arg_4 ) , [ ] ) . append ( arg_4 ) for arg_6 in arg_3 : arg_7 = list ( [ _fmt_err ( arg_2 ) for arg_2 in validate_content ( * arg_3 [ arg_6 ] ) ] ) for arg_5 in arg_7 : logger . info ( "{}: {}" . format ( * arg_5 ) ) arg_1 . extend ( arg_7 ) return arg_1


Question: Indicate that value is a geo region

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 'km' ) : return GeoValue ( arg_0 , arg_1 , arg_2 , arg_3 )


Question: Get the release number of the distribution .

def Func ( ) : with settings ( hide ( 'running' , 'stdout' ) ) : arg_0 = ( run ( 'uname -s' ) or '' ) . strip ( ) . lower ( ) if arg_0 == LINUX : return run ( 'lsb_release -r --short' ) elif arg_0 == SUNOS : return run ( 'uname -v' )

Get course enrollments for all the learners of given enterprise customer.

        Arguments:
            enterprise_customer (EnterpriseCustomer): Include Course enrollments for learners
                of this enterprise customer.
            days (int): Include course enrollment of this number of days.

        Returns:
            (list): A list of CourseEnrollment objects.


Question: Add a new note for a specific subscriber .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_2 = check_subscriber_hash ( arg_2 ) arg_0 . list_id = arg_1 arg_0 . subscriber_hash = arg_2 if 'note' not in arg_3 : raise KeyError ( 'The list member note must have a note' ) arg_4 = arg_0 . _mc_client . _post ( url = arg_0 . _build_path ( arg_1 , 'members' , arg_2 , 'notes' ) , arg_3 = arg_3 ) if arg_4 is not None : arg_0 . note_id = arg_4 [ 'id' ] else : arg_0 . note_id = None return arg_4

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


Question: Set the current mask by taking the conjunction of all specified layers .

def Func ( arg_0 , arg_1 = None , arg_2 = 'vector' , arg_3 = True ) : if arg_3 : arg_2 = 'vector' if arg_1 is None : arg_1 = arg_0 . layers . keys ( ) elif not isinstance ( arg_1 , list ) : arg_1 = [ arg_1 ] arg_1 = map ( lambda x : x if isinstance ( x , string_types ) else arg_0 . stack [ x ] , arg_1 ) arg_1 = [ arg_0 . layers [ l ] for l in arg_1 if l in arg_0 . layers ] arg_1 . append ( arg_0 . full ) arg_1 = np . vstack ( arg_1 ) . T . astype ( bool ) arg_4 = arg_1 . all ( axis = 1 ) arg_4 = arg_0 . get_image ( arg_4 , arg_2 ) return arg_4 [ arg_0 . global_mask ] if arg_3 else arg_4

Script to find the header size of a filterbank file


Question: Render the toolbar for the given config .

def Func ( arg_0 , arg_1 ) : arg_2 = getattr ( quill_app , arg_1 ) arg_3 = template . loader . get_template ( arg_2 [ 'toolbar_template' ] ) return arg_3 . render ( arg_0 )

Generate RENEWING time.

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

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


Question: Convert segmentation map to heatmaps object .

def Func ( arg_0 , arg_1 = False , arg_2 = False ) : from imgaug . augmentables . heatmaps import HeatmapsOnImage if not arg_1 : return HeatmapsOnImage . from_0to1 ( arg_0 . arr , arg_0 . shape , min_value = 0.0 , max_value = 1.0 ) else : arg_3 = np . sum ( arg_0 . arr , axis = ( 0 , 1 ) ) > 0 + 1e-4 if np . sum ( arg_3 ) == 0 : if arg_2 : arg_3 [ 0 ] = True else : return None , [ ] arg_4 = np . arange ( arg_0 . arr . shape [ 2 ] ) [ arg_3 ] arg_5 = arg_0 . arr [ ... , arg_4 ] return HeatmapsOnImage ( arg_5 , arg_0 . shape , min_value = 0.0 , max_value = 1.0 ) , arg_4

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


Question: Search for a ellipsoid name located in this module .

def Func ( arg_0 , arg_1 , arg_2 = False ) : if not arg_2 : arg_0 = arg_0 . lower ( ) . replace ( " " , "_" ) for arg_3 , arg_4 in globals ( ) . items ( ) : if arg_3 . startswith ( "_" ) or arg_3 == 'Ellipsoid' : continue try : if hasattr ( arg_4 . name , arg_1 ) : arg_3 = getattr ( arg_4 . name , arg_1 ) if not arg_2 : arg_3 = arg_3 . lower ( ) . replace ( " " , "_" ) if arg_0 == arg_3 : return arg_4 except : pass else : return None

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


Question: Return the shape for bipartite matrix

def Func ( arg_0 ) : return ( arg_0 . _input_dim , arg_0 . _output_dim , arg_0 . _input_dim , arg_0 . _output_dim )

Show Program Landing page for the Enterprise's Program.

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

        Unauthenticated learners will be redirected to enterprise-linked SSO.

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


Question: Visualize the dataframe .

def Func ( arg_0 , arg_1 = None , arg_2 = '' , arg_3 = ( 5 , 5 ) , arg_4 = 'RdBu_r' , arg_5 = True , arg_6 = True , arg_7 = None , ** arg_8 ) : arg_0 = zscore ( arg_0 , axis = arg_1 ) arg_0 = arg_0 . iloc [ : : - 1 ] arg_9 , arg_10 = arg_0 . shape arg_11 = np . arange ( 0 , arg_10 , 1 ) + .5 arg_12 = np . arange ( 0 , arg_9 , 1 ) + .5 if hasattr ( sys , 'ps1' ) and ( arg_7 is None ) : arg_13 = plt . figure ( arg_3 = arg_3 ) else : arg_13 = Figure ( arg_3 = arg_3 ) arg_14 = FigureCanvas ( arg_13 ) arg_15 = arg_13 . add_subplot ( 111 ) arg_16 = np . percentile ( arg_0 . min ( ) , 2 ) arg_17 = np . percentile ( arg_0 . max ( ) , 98 ) arg_18 = arg_15 . pcolormesh ( arg_0 . values , arg_4 = arg_4 , arg_16 = arg_16 , arg_17 = arg_17 ) arg_15 . set_ylim ( [ 0 , len ( arg_0 ) ] ) arg_15 . set ( arg_11 = arg_11 , arg_12 = arg_12 ) arg_15 . set_xticklabels ( arg_0 . columns . values if arg_5 else '' , fontsize = 14 , rotation = 90 ) arg_15 . set_yticklabels ( arg_0 . index . values if arg_6 else '' , fontsize = 14 ) arg_15 . set_title ( "%s\nHeatmap of the Analyzed Geneset" % arg_2 , fontsize = 20 ) arg_15 . tick_params ( axis = 'both' , which = 'both' , bottom = False , top = False , right = False , left = False ) arg_19 = colorbar ( arg_18 ) arg_19 . ax . tick_params ( axis = 'both' , which = 'both' , bottom = False , top = False , right = False , left = False ) for arg_20 in [ "top" , "right" , "left" , "bottom" ] : arg_15 . spines [ arg_20 ] . set_visible ( False ) arg_19 . ax . spines [ arg_20 ] . set_visible ( False ) if arg_7 is not None : arg_13 . savefig ( arg_7 , bbox_inches = 'tight' , dpi = 300 ) return


Question: A dask relay function to fill chroms for all samples

def Func ( arg_0 , arg_1 ) : arg_2 = [ os . path . join ( arg_0 . dirs . across , s . name + ".tmp.h5" ) for s in arg_1 ] arg_3 = [ h5py . File ( i ) for i in arg_2 ] arg_4 = [ i [ '/ichrom' ] for i in arg_3 ] arg_5 = [ da . from_array ( dset , chunks = ( 10000 , 3 ) ) for dset in arg_4 ] arg_6 = da . stack ( arg_5 , axis = 2 ) arg_7 = da . max ( arg_6 , axis = 2 ) [ : , 0 ] arg_8 = da . max ( arg_6 , axis = 2 ) [ : , 2 ] arg_9 = arg_6 == 0 arg_6 [ arg_9 ] = 9223372036854775807 arg_10 = da . min ( arg_6 , axis = 2 ) [ : , 1 ] arg_11 = da . stack ( [ arg_7 , arg_10 , arg_8 ] , axis = 1 ) arg_11 . to_hdf5 ( arg_0 . clust_database , "/chroms" ) arg_12 = [ i . close ( ) for i in arg_3 ]

Attempts to find the Teradata install directory with the defaults
    for a given platform.  Should always return `None` when the defaults
    are not present and the TERADATA_HOME environment variable wasn't
    explicitly set to the correct install location.


Question: Adds inputs to a given protobuf Bolt message

def Func ( arg_0 , arg_1 ) : if arg_0 . inputs is None : return arg_2 = arg_0 . _sanitize_inputs ( ) for arg_3 , arg_4 in arg_2 . items ( ) : arg_5 = arg_1 . inputs . add ( ) arg_5 . stream . CopyFrom ( arg_0 . _get_stream_id ( arg_3 . component_id , arg_3 . stream_id ) ) if isinstance ( arg_4 , Grouping . FIELDS ) : arg_5 . gtype = arg_4 . gtype arg_5 . grouping_fields . CopyFrom ( arg_0 . _get_stream_schema ( arg_4 . fields ) ) elif isinstance ( arg_4 , Grouping . CUSTOM ) : arg_5 . gtype = arg_4 . gtype arg_5 . custom_grouping_object = arg_4 . python_serialized arg_5 . type = topology_pb2 . CustomGroupingObjectType . Value ( "PYTHON_OBJECT" ) else : arg_5 . gtype = arg_4

Block until the simulation is done or timeout seconds exceeded.

        If the simulation stops before timeout, siminfo is returned.


Question: Replace munged string components with their original representation .

def Func ( arg_0 : arg_1 ) -> arg_1 : def Func_replacer ( arg_2 : arg_3 ) -> arg_1 : arg_4 = arg_2 . group ( 0 ) arg_5 = _DEMUNGE_REPLACEMENTS . get ( arg_4 , None ) if arg_5 : return arg_5 return arg_4 return re . sub ( _DEMUNGE_PATTERN , Func_replacer , arg_0 ) . replace ( "_" , "-" )

Checks whetner the trace and log files are available


Question: Helper to infer batch_shape and event_shape .

def Func ( arg_0 , arg_1 ) : with tf . name_scope ( "Func" ) : arg_2 = arg_0 . shape [ : - 2 ] arg_3 = tf . shape ( input = arg_0 ) [ : - 2 ] arg_4 = None arg_5 = None def _set_event_shape ( arg_6 , arg_7 ) : if arg_4 is None : return arg_6 , arg_7 return ( tf . broadcast_static_shape ( arg_4 , arg_6 ) , tf . broadcast_dynamic_shape ( arg_5 , arg_7 ) ) for arg_8 in arg_1 : if arg_8 . shift is not None : arg_2 = tf . broadcast_static_shape ( arg_2 , arg_8 . shift . shape [ : - 1 ] ) arg_3 = tf . broadcast_dynamic_shape ( arg_3 , tf . shape ( input = arg_8 . shift ) [ : - 1 ] ) arg_4 , arg_5 = _set_event_shape ( arg_8 . shift . shape [ - 1 : ] , tf . shape ( input = arg_8 . shift ) [ - 1 : ] ) if arg_8 . scale is not None : arg_2 = tf . broadcast_static_shape ( arg_2 , arg_8 . scale . batch_shape ) arg_3 = tf . broadcast_dynamic_shape ( arg_3 , arg_8 . scale . batch_shape_tensor ( ) ) arg_4 , arg_5 = _set_event_shape ( tf . TensorShape ( [ arg_8 . scale . range_dimension ] ) , arg_8 . scale . range_dimension_tensor ( ) [ tf . newaxis ] ) return arg_2 , arg_3 , arg_4 , arg_5

Return HgResource object for path.

        See DAVProvider.get_resource_inst()


Question: Stops a batch request from running . Since only one batch request is run at a time this can be used to cancel a long running request . The results of any completed operations will not be available after this call .

def Func ( arg_0 , arg_1 ) : arg_0 . batch_id = arg_1 arg_0 . operation_status = None return arg_0 . _mc_client . _Func ( url = arg_0 . _build_path ( arg_1 ) )

Subscribe to the passed pair's ticker channel.

        :param pair: str, Symbol pair to request data for
        :param kwargs:
        :return:


Question: Parse multiple definitions and yield them .

def Func ( arg_0 , arg_1 , arg_2 = False ) : while arg_0 . current is not None : arg_0 . log . debug ( "parsing definition list, current token is %r (%s)" , arg_0 . current . kind , arg_0 . current . value , ) arg_0 . log . debug ( "got_newline: %s" , arg_0 . stream . got_logical_newline ) if arg_2 and arg_0 . current . value == "__all__" : arg_0 . parse_all ( ) elif ( arg_0 . current . kind == tk . OP and arg_0 . current . value == "@" and arg_0 . stream . got_logical_newline ) : arg_0 . consume ( tk . OP ) arg_0 . parse_decorators ( ) elif arg_0 . current . value in [ "def" , "class" ] : yield arg_0 . parse_definition ( arg_1 . _nest ( arg_0 . current . value ) ) elif arg_0 . current . kind == tk . INDENT : arg_0 . consume ( tk . INDENT ) for arg_3 in arg_0 . Func ( arg_1 ) : yield arg_3 elif arg_0 . current . kind == tk . DEDENT : arg_0 . consume ( tk . DEDENT ) return elif arg_0 . current . value == "from" : arg_0 . parse_from_import_statement ( ) else : arg_0 . stream . move ( )

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: Recursively generate of all the subclasses of class cls .

def Func ( arg_0 ) : for arg_1 in arg_0 . __subclasses__ ( ) : yield arg_1 for arg_2 in Func ( arg_1 ) : yield arg_2

Handle marking messages as read and keeping client active.


Question: Change the ADS state and the machine - state of the ADS - server .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : arg_6 = _adsDLL . AdsSyncWriteControlReqEx arg_7 = ctypes . pointer ( arg_1 . amsAddrStruct ( ) ) arg_8 = ctypes . c_ulong ( arg_2 ) arg_9 = ctypes . c_ulong ( arg_3 ) if arg_5 == PLCTYPE_STRING : arg_4 = ctypes . c_char_p ( arg_4 . encode ( "utf-8" ) ) arg_10 = arg_4 arg_11 = len ( arg_10 . value ) + 1 else : arg_4 = arg_5 ( arg_4 ) arg_10 = ctypes . pointer ( arg_4 ) arg_11 = ctypes . sizeof ( arg_4 ) arg_12 = arg_6 ( arg_0 , arg_7 , arg_8 , arg_9 , arg_11 , arg_10 , ) if arg_12 : raise ADSError ( arg_12 )


Question: Converts multiple input images into a single image showing them in a grid .

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_3 = len ( arg_0 ) do_assert ( arg_3 > 0 ) if is_np_array ( arg_0 ) : do_assert ( arg_0 . ndim == 4 ) else : do_assert ( is_iterable ( arg_0 ) and is_np_array ( arg_0 [ 0 ] ) and arg_0 [ 0 ] . ndim == 3 ) arg_4 = [ arg_17 . dtype . name for arg_17 in arg_0 ] arg_5 = len ( set ( arg_4 ) ) do_assert ( arg_5 == 1 , ( "All images provided to Func() must have the same dtype, " + "found %d dtypes (%s)" ) % ( arg_5 , ", " . join ( arg_4 ) ) ) arg_6 = max ( [ arg_17 . shape [ 0 ] for arg_17 in arg_0 ] ) arg_7 = max ( [ arg_17 . shape [ 1 ] for arg_17 in arg_0 ] ) arg_8 = set ( [ arg_17 . shape [ 2 ] for arg_17 in arg_0 ] ) do_assert ( len ( arg_8 ) == 1 , "All images are expected to have the same number of channels, " + "but got channel set %s with length %d instead." % ( str ( arg_8 ) , len ( arg_8 ) ) ) arg_9 = list ( arg_8 ) [ 0 ] if arg_1 is None and arg_2 is None : arg_1 = arg_2 = int ( math . ceil ( math . sqrt ( arg_3 ) ) ) elif arg_1 is not None : arg_2 = int ( math . ceil ( arg_3 / arg_1 ) ) elif arg_2 is not None : arg_1 = int ( math . ceil ( arg_3 / arg_2 ) ) do_assert ( arg_1 * arg_2 >= arg_3 ) arg_10 = arg_7 * arg_2 arg_11 = arg_6 * arg_1 arg_12 = arg_0 . dtype if is_np_array ( arg_0 ) else arg_0 [ 0 ] . dtype arg_13 = np . zeros ( ( arg_11 , arg_10 , arg_9 ) , dtype = arg_12 ) arg_14 = 0 for arg_15 in sm . xrange ( arg_1 ) : for arg_16 in sm . xrange ( arg_2 ) : if arg_14 < arg_3 : arg_17 = arg_0 [ arg_14 ] arg_18 = arg_6 * arg_15 arg_19 = arg_18 + arg_17 . shape [ 0 ] arg_20 = arg_7 * arg_16 arg_21 = arg_20 + arg_17 . shape [ 1 ] arg_13 [ arg_18 : arg_19 , arg_20 : arg_21 , : ] = arg_17 arg_14 += 1 return arg_13

Stop the timer

        Returns:
            The time the timer was stopped


Question: Performs recombination by binary crossover for the current population .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = [ tf . cast ( tf . size ( input = x ) , dtype = tf . float64 ) for x in arg_0 ] arg_6 = distributions . SeedStream ( arg_4 , salt = 'binary_crossover' ) arg_7 = distributions . Categorical ( arg_5 ) . sample ( [ arg_1 , 1 ] , arg_4 = arg_6 ( ) ) arg_8 = [ ] for arg_9 , arg_10 in enumerate ( arg_0 ) : arg_11 = tf . reshape ( arg_10 , [ arg_1 , - 1 ] ) arg_12 = tf . reshape ( arg_2 [ arg_9 ] , [ arg_1 , - 1 ] ) arg_13 = tf . size ( input = arg_10 ) // arg_1 arg_14 = tf . one_hot ( tf . random . uniform ( [ arg_1 ] , minval = 0 , maxval = arg_13 , dtype = tf . int32 , arg_4 = arg_6 ( ) ) , arg_13 , on_value = True , off_value = False , dtype = tf . bool ) arg_15 = tf . math . equal ( arg_7 , arg_9 ) arg_14 &= arg_15 arg_16 = tf . random . uniform ( [ arg_1 , arg_13 ] , dtype = arg_3 . dtype . base_dtype , arg_4 = arg_6 ( ) ) < arg_3 arg_16 |= arg_14 arg_17 = tf . where ( arg_16 , x = arg_12 , y = arg_11 ) arg_18 = tf . reshape ( arg_17 , tf . shape ( input = arg_10 ) ) arg_8 . append ( arg_18 ) return arg_8

Get a texture by its label

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

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


Question: This function removes any unnecessary bundles apps libs and services that aren t needed by the activated_bundles . It also expands inside specs . apps . depends . libs all libs that are needed indirectly by each app

def Func ( arg_0 ) : _filter_active ( constants . CONFIG_BUNDLES_KEY , arg_0 ) _filter_active ( 'apps' , arg_0 ) _expand_libs_in_apps ( arg_0 ) _filter_active ( 'libs' , arg_0 ) _filter_active ( 'services' , arg_0 ) _add_active_assets ( arg_0 )

Return the most recent timestamp in the operation.


Question: Add a markdown cell to the notebook

def Func ( arg_0 , arg_1 ) : arg_2 = { "cell_type" : "markdown" , "metadata" : { } , "source" : [ rst2md ( arg_1 ) ] } arg_0 . work_notebook [ "cells" ] . append ( arg_2 )

Return the appropriate URL prefix to prepend to requests,
        based on the host provided in settings.


Question: Execute then_branch when training .

def Func ( arg_0 , arg_1 , arg_2 ) : return ifelse ( arg_0 . _training_flag , arg_1 , arg_2 , name = "Func" )

Decode the data passed in and potentially flush the decoder.


Question: Combine the cleaner and tokenizer .

def Func ( arg_0 , arg_1 : arg_2 [ arg_3 ] ) -> arg_2 [ arg_2 [ arg_3 ] ] : Func = process_text_constructor ( cleaner = arg_0 . cleaner , tokenizer = arg_0 . tokenizer , append_indicators = arg_0 . append_indicators , start_tok = arg_0 . start_tok , end_tok = arg_0 . end_tok ) return Func ( arg_1 )


Question: Checks whether the dependents of this task instance have all succeeded . This is meant to be used by wait_for_downstream .

def Func ( arg_0 , arg_1 = None ) : arg_2 = arg_0 . task if not arg_2 . downstream_task_ids : return True arg_3 = arg_1 . query ( func . count ( TaskInstance . task_id ) ) . filter ( TaskInstance . dag_id == arg_0 . dag_id , TaskInstance . task_id . in_ ( arg_2 . downstream_task_ids ) , TaskInstance . execution_date == arg_0 . execution_date , TaskInstance . state == State . SUCCESS , ) arg_4 = arg_3 [ 0 ] [ 0 ] return arg_4 == len ( arg_2 . downstream_task_ids )

Wrapper around json.loads.

    Wraps errors in custom exception with a snippet of the data in the message.


Question: step eventloop just once

def Func ( arg_0 ) : if arg_0 . control_stream : arg_0 . control_stream . flush ( ) for arg_1 in arg_0 . shell_streams : arg_1 . flush ( zmq . POLLIN , 1 ) arg_1 . flush ( zmq . POLLOUT )

Get base-64 encoded data as a string for the given image. Fallback to return
    fallback_image_file if cannot get the image data or img is None.
    @param {Image} img - The PIL Image to get src data for
    @param {String} fallback_image_file - The filename of the image file,
        to be used when image data capture fails
    @return {String} The base-64 encoded image data string, or path to the file
        itself if not supported.


Question: Look through the jobs table and get the list of running jobs whose cancel field is true .

def Func ( arg_0 , ) : with ConnectionFactory . get ( ) as conn : arg_1 = 'SELECT job_id ' 'FROM %s ' 'WHERE (status<>%%s AND cancel is TRUE)' % ( arg_0 . jobsTableName , ) conn . cursor . execute ( arg_1 , [ arg_0 . STATUS_COMPLETED ] ) arg_2 = conn . cursor . fetchall ( ) return tuple ( arg_3 [ 0 ] for arg_3 in arg_2 )

AWS doesn't quite have Swagger 2.0 validation right and will fail
        on some refs. So, we need to convert to deref before
        upload.


Question: Stores a all explored parameter names for internal recall

def Func ( arg_0 , arg_1 ) : arg_2 = len ( arg_1 . _explored_parameters ) if arg_2 > 0 : if hasattr ( arg_0 . _overview_group , 'explorations' ) : arg_3 = arg_0 . _overview_group . _f_get_child ( 'explorations' ) if len ( arg_3 ) != arg_2 : arg_0 . _hdf5file . remove_node ( where = arg_0 . _overview_group , name = 'explorations' ) if not hasattr ( arg_0 . _overview_group , 'explorations' ) : arg_4 = list ( arg_1 . _explored_parameters . keys ( ) ) if arg_4 : arg_5 = arg_0 . _all_get_table_col ( 'explorations' , arg_4 , 'overview.explorations' ) else : arg_5 = pt . StringCol ( 1 ) arg_6 = { 'explorations' : arg_5 } arg_3 = arg_0 . _hdf5file . create_table ( where = arg_0 . _overview_group , name = 'explorations' , arg_6 = arg_6 ) arg_7 = [ ( x . encode ( 'utf-8' ) , ) for x in arg_4 ] if arg_7 : arg_3 . append ( arg_7 ) arg_3 . flush ( )

Given a KeyboardModifiers flags object, return whether the Control
        key is down.

        Parameters:
        -----------
        include_command : bool, optional (default True)
            Whether to treat the Command key as a (mutually exclusive) synonym
            for Control when in Mac OS.


Question: Upsert the technote resource into the projectmeta MongoDB collection .

async def Func ( arg_0 , arg_1 ) : arg_2 = { 'data' : arg_1 } arg_3 = { 'data.reportNumber' : arg_1 [ 'reportNumber' ] } await arg_0 . update ( arg_3 , arg_2 , upsert = True , multi = False )

Handle the 'channel readable' state. E.g. read from a socket.


Question: Elementwise adds list members replacing non - finite results with alt_value .

def Func ( arg_0 , arg_1 = - arg_2 . inf , arg_4 = None ) : with tf . compat . v1 . name_scope ( arg_4 , 'Func' , [ arg_0 , arg_1 ] ) : if not is_list_like ( arg_0 ) : raise TypeError ( 'Expected list input.' ) if not arg_0 : raise ValueError ( 'Input should not be empty.' ) arg_5 = arg_0 [ 0 ] . shape arg_0 = tf . stack ( arg_0 , axis = - 1 ) arg_0 = tf . reduce_sum ( input_tensor = arg_0 , axis = - 1 ) arg_1 = arg_2 . array ( arg_1 , arg_0 . dtype . as_numpy_dtype ) arg_6 = tf . fill ( tf . shape ( input = arg_0 ) , value = arg_1 ) arg_0 = tf . where ( tf . math . is_finite ( arg_0 ) , arg_0 , arg_6 ) arg_0 . set_shape ( arg_0 . shape . merge_with ( arg_5 ) ) return arg_0


Question: Define an alias but don t raise on an AliasError .

def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_0 . define_alias ( arg_1 , arg_2 ) except AliasError , e : error ( "Invalid alias: %s" % e )

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


Question: Connect this task spec to the indicated child .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_0 . connect ( arg_1 ) arg_5 = SequenceFlow ( arg_2 , arg_3 , arg_4 , arg_1 ) arg_0 . outgoing_sequence_flows [ arg_1 . name ] = arg_5 arg_0 . outgoing_sequence_flows_by_id [ arg_2 ] = arg_5

True if the credential is expired or invalid.

        If the token_expiry isn't set, we assume the token doesn't expire.


Question: Convert among IP address notations .

def Func ( arg_0 , arg_1 = arg_2 , arg_3 = arg_4 , arg_5 = True ) : return _Func ( arg_0 , arg_1 , arg_3 , _check = arg_5 , _isnm = False )

Extracts the category from a GitHub item.

        This backend generates two types of item which are
        'issue' and 'pull_request'.


Question: Convert data to web output .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _prepare_array_for_png ( arg_1 ) arg_1 = ma . masked_where ( arg_2 == arg_0 . nodata , arg_2 ) return memory_file ( arg_1 , arg_0 . profile ( ) ) , 'image/png'

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: Calculate the probability of observing a node pair at a distance t

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = False , arg_5 = True ) : if arg_3 < 0 : arg_6 = - ttconf . BIG_NUMBER else : arg_7 = arg_0 . expQt ( arg_3 ) if len ( arg_7 . shape ) == 3 : arg_8 = np . einsum ( 'ai,ija,aj->a' , arg_1 [ 1 ] , arg_7 , arg_1 [ 0 ] ) else : arg_8 = np . einsum ( 'ai,ij,aj->a' , arg_1 [ 1 ] , arg_7 , arg_1 [ 0 ] ) if arg_5 and ( arg_0 . gap_index is not None ) : arg_9 = ( 1 - arg_1 [ 0 ] [ : , arg_0 . gap_index ] ) * ( 1 - arg_1 [ 1 ] [ : , arg_0 . gap_index ] ) arg_6 = np . sum ( arg_2 * np . log ( arg_8 ) * arg_9 ) else : arg_6 = np . sum ( arg_2 * np . log ( arg_8 ) ) return arg_6 if arg_4 else np . exp ( arg_6 )

Find executables in a path.

    Searches executables in a directory excluding some know commands
    unusable with GromacsWrapper.

    :param path: dirname to search for
    :return: list of executables


Question: move cursor down

def Func ( arg_0 ) : arg_1 , arg_2 = arg_0 . _index arg_0 . _select_index ( arg_1 + 1 , arg_2 )


Question: This function deal with the neutron notification .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 [ 'event_type' ] arg_3 = neutron_customer_process . get ( arg_2 ) if arg_3 is not None : arg_3 ( arg_0 , arg_1 ) else : arg_4 = False arg_5 = None for arg_6 in neutron_customer_process_wildcard . keys ( ) : if arg_6 . match ( arg_2 ) : arg_5 = neutron_customer_process_wildcard . get ( arg_6 ) arg_4 = True break if arg_4 : arg_5 ( arg_0 , arg_1 ) else : default_process ( arg_0 , arg_1 ) arg_1 . ack ( )

Total time since the timer is started.

        Returns (float): Time in seconds.


Question: Register supported hosts

def Func ( ) : pyblish . api . Func ( "mayabatch" ) pyblish . api . Func ( "mayapy" ) pyblish . api . Func ( "maya" )

Remove max=null parameter from URL.

    Patch for Webex Teams Defect: 'next' URL returned in the Link headers of
    the responses contain an errant 'max=null' parameter, which  causes the
    next request (to this URL) to fail if the URL is requested as-is.

    This patch parses the next_url to remove the max=null parameter.

    Args:
        next_url(basestring): The 'next' URL to be parsed and cleaned.

    Returns:
        basestring: The clean URL to be used for the 'next' request.

    Raises:
        AssertionError: If the parameter types are incorrect.
        ValueError: If 'next_url' does not contain a valid API endpoint URL
            (scheme, netloc and path).


Question: Generate for loop for static items

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = "" ) : arg_1 = list ( arg_1 ) arg_4 = len ( arg_1 ) if arg_4 == 0 : return [ ] elif arg_4 == 1 : return arg_2 ( arg_1 [ 0 ] , 0 ) else : arg_5 = arg_0 . _reg ( arg_3 + "for_index" , Bits ( log2ceil ( arg_4 + 1 ) , signed = False ) , defVal = 0 ) arg_6 = arg_0 . _sig ( arg_3 + "for_ack" ) arg_7 = [ ] for arg_8 , ( arg_9 , arg_10 ) in [ ( arg_8 , arg_2 ( item , arg_8 ) ) for arg_8 , item in enumerate ( arg_1 ) ] : arg_7 . append ( arg_9 + [ ( arg_6 ( arg_10 ) ) , ] ) If ( arg_6 , If ( arg_5 . _eq ( arg_4 - 1 ) , arg_5 ( 0 ) ) . Else ( arg_5 ( arg_5 + 1 ) ) ) return Switch ( arg_5 ) . addCases ( enumerate ( arg_7 ) ) . Default ( arg_2 ( arg_1 [ 0 ] , 0 ) [ 0 ] , arg_6 ( True ) )

Get the reason of this revocation.

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

        .. seealso::

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


Question: Set the colorpalette which should be used

def Func ( arg_0 , Func ) : if isinstance ( Func , str ) : Func = colors . parse_colors ( Func ) arg_0 . _colorpalette = colors . sanitize_color_palette ( Func )

This function will create the VM directory where a repo will be mounted, if it
    doesn't exist.  If wait_for_server is set, it will wait up to 10 seconds for
    the nfs server to start, by retrying mounts that fail with 'Connection Refused'.

    If wait_for_server is not set, it will attempt to run the mount command once


Question: Converts between 3 - letter and 1 - letter amino acid codes .

def Func ( arg_0 ) : if len ( arg_0 ) == 1 : return amino_acid_codes [ arg_0 . upper ( ) ] elif len ( arg_0 ) == 3 : return inverse_aa_codes [ arg_0 . upper ( ) ] else : raise ValueError ( "Can only convert 1-letter or 3-letter amino acid codes, " "not %r" % arg_0 )


Question: Write a notebook to a string in a given format in the current nbformat version .

def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_1 = unicode ( arg_1 ) if arg_1 == u'json' or arg_1 == u'ipynb' : return Func_json ( arg_0 , ** arg_2 ) elif arg_1 == u'py' : return Func_py ( arg_0 , ** arg_2 ) else : raise NBFormatError ( 'Unsupported format: %s' % arg_1 )

Helper function to get offset argument.
    Raises exception if argument is missing.
    Returns the offset argument.


Question: Print human readable summary of current AWS state to log and to console .

def Func ( arg_0 ) : arg_0 . get_instance_state ( ) arg_1 = "EC2 Summary:\n\tVPC IDs: {}\n\tSubnet IDs: \{}\n\tSecurity Group ID: {}\n\tRunning Instance IDs: {}\n" . format ( arg_0 . vpc_id , arg_0 . sn_ids , arg_0 . sg_id , arg_0 . instances ) arg_1 += "\tInstance States:\n\t\t" arg_0 . get_instance_state ( ) for arg_2 in arg_0 . instance_states . keys ( ) : arg_1 += "Instance ID: {}  State: {}\n\t\t" . format ( arg_2 , arg_0 . instance_states [ arg_2 ] ) arg_1 += "\n" logger . info ( arg_1 ) return arg_1

Convenience function to efficiently construct a MultivariateNormalDiag.


Question: Datasets must be of form project . dataset or dataset

def Func ( arg_0 ) : return re . match ( r'^' + RE_PROJECT + r'\.' + RE_DS_TABLE + r'$|^' + RE_DS_TABLE + r'$' , arg_0 , )

Remove procid from waitlists and reestablish it in the running list


Question: Invoke the mandatory build_sdist hook .

def Func ( arg_0 , arg_1 ) : arg_2 = _build_backend ( ) try : return arg_2 . Func ( arg_0 , arg_1 ) except getattr ( arg_2 , 'UnsupportedOperation' , _DummyException ) : raise GotUnsupportedOperation ( traceback . format_exc ( ) )

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


Question: Run a frame command . This routine is a little complex because we allow a number parameter variations .

def Func ( arg_0 , arg_1 ) : if len ( arg_1 ) == 1 : arg_2 = '0' elif len ( arg_1 ) == 2 : arg_3 = arg_1 [ 1 ] arg_4 , arg_5 = arg_0 . get_from_thread_name_or_id ( arg_3 , False ) if arg_4 is None : arg_2 = arg_3 else : arg_2 = '0' arg_0 . find_and_set_debugged_frame ( arg_4 , arg_5 ) pass elif len ( arg_1 ) == 3 : arg_3 = arg_1 [ 1 ] arg_2 = arg_1 [ 2 ] arg_4 , arg_5 = arg_0 . get_from_thread_name_or_id ( arg_3 ) if arg_4 is None : return arg_0 . find_and_set_debugged_frame ( arg_4 , arg_5 ) pass arg_0 . one_arg_Func ( arg_2 ) return False

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


Question: if the value is in the list move it to the front and return it .

def Func ( arg_0 , arg_1 = 'other' ) : arg_0 = list ( arg_0 ) if arg_1 in arg_0 : arg_0 . remove ( arg_1 ) arg_0 . insert ( 0 , arg_1 ) return arg_0

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: Process a LaTeX snippet of content for better transformation with pandoc .

def Func ( arg_0 , arg_1 ) : arg_2 = CitationLinker ( arg_0 . bib_db ) arg_1 = arg_2 ( arg_1 ) return arg_1


Question: Python 2 uses a deprecated method signature and doesn t provide the forward compatibility . Add it .

def Func ( ) : if six . PY3 : return arg_0 . HTTPMessage . get_content_type = arg_0 . HTTPMessage . gettype arg_0 . HTTPMessage . get_param = arg_0 . HTTPMessage . getparam


Question: Convert tanh layer .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 ) : print ( 'Converting tanh ...' ) if arg_6 == 'short' : arg_7 = 'TANH' + random_string ( 4 ) elif arg_6 == 'keep' : arg_7 = arg_1 else : arg_7 = arg_1 + str ( random . random ( ) ) arg_8 = keras . layers . Activation ( 'tanh' , name = arg_7 ) arg_4 [ arg_2 ] = arg_8 ( arg_4 [ arg_3 [ 0 ] ] )

Override of clean method to perform additional validation


Question: Copy all files from all storages of a project .

def Func ( arg_0 ) : arg_1 = _setup_osf ( arg_0 ) arg_2 = arg_1 . project ( arg_0 . project ) arg_3 = arg_0 . project if arg_0 . output is not None : arg_3 = arg_0 . output with tqdm ( unit = 'files' ) as pbar : for arg_4 in arg_2 . storages : arg_5 = os . path . join ( arg_3 , arg_4 . name ) for arg_6 in arg_4 . files : arg_7 = arg_6 . path if arg_7 . startswith ( '/' ) : arg_7 = arg_7 [ 1 : ] arg_7 = os . path . join ( arg_5 , arg_7 ) if os . path . exists ( arg_7 ) and arg_0 . update : if checksum ( arg_7 ) == arg_6 . hashes . get ( 'md5' ) : continue arg_8 , arg_9 = os . path . split ( arg_7 ) makedirs ( arg_8 , exist_ok = True ) with open ( arg_7 , "wb" ) as f : arg_6 . write_to ( f ) pbar . update ( )

Given a dictionary mapping unique keys to amino acid sequences,
        run MHC binding predictions on all candidate epitopes extracted from
        sequences and return a EpitopeCollection.

        Parameters
        ----------
        fasta_dictionary : dict or string
            Mapping of protein identifiers to protein amino acid sequences.
            If string then converted to dictionary.


Question: Yield all . pyx and . pxd files in the given root .

def Func ( arg_0 ) : for arg_1 , arg_2 , arg_3 in os . walk ( arg_0 ) : for arg_4 in arg_3 : if arg_4 . startswith ( '.' ) : continue if os . path . splitext ( arg_4 ) [ 1 ] not in ( '.pyx' , '.pxd' ) : continue yield os . path . join ( arg_1 , arg_4 )

Check the first message matches the expected handshake.

        Note:
          The handshake is provided as :py:attr:`RTM_HANDSHAKE`.

        Arguments:
          msg (:py:class:`aiohttp.Message`): The message to validate.

        Raises:
          :py:class:`SlackApiError`: If the data doesn't match the
            expected handshake.


Question: Return all available input formats .

def Func ( ) : arg_0 = [ ] for arg_1 in pkg_resources . iter_entry_points ( DRIVERS_ENTRY_POINT ) : logger . debug ( "driver found: %s" , arg_1 ) arg_2 = arg_1 . load ( ) if hasattr ( arg_2 , "METADATA" ) and ( arg_2 . METADATA [ "mode" ] in [ "r" , "rw" ] ) : arg_0 . append ( arg_2 . METADATA [ "driver_name" ] ) return arg_0

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: Receive messages that have previously been deferred .

async def Func ( arg_0 , arg_1 , arg_2 = arg_3 . PeekLock ) : if not arg_1 : raise ValueError ( "At least one sequence number must be specified." ) await arg_0 . _can_run ( ) try : arg_5 = arg_2 . value . value except AttributeError : arg_5 = int ( arg_2 ) arg_6 = { 'sequence-numbers' : types . AMQPArray ( [ types . AMQPLong ( s ) for s in arg_1 ] ) , 'receiver-settle-mode' : types . AMQPuInt ( arg_5 ) , 'session-id' : arg_0 . session_id } arg_7 = functools . partial ( mgmt_handlers . deferred_message_op , arg_2 = arg_5 , message_type = DeferredMessage ) arg_8 = await arg_0 . _mgmt_request_response ( REQUEST_RESPONSE_RECEIVE_BY_SEQUENCE_NUMBER , arg_6 , arg_7 ) for arg_9 in arg_8 : arg_9 . _receiver = arg_0 return arg_8

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: This dark magic is used to make yaml . safe_load encode all strings as utf - 8 where otherwise python unicode strings would be returned for non - ascii chars

def Func ( ) : def utf_encoding_string_constructor ( arg_0 , arg_1 ) : return arg_0 . construct_scalar ( arg_1 ) . encode ( 'utf-8' ) yaml . SafeLoader . add_constructor ( u'tag:yaml.org,2002:str' , utf_encoding_string_constructor )

Parse the result element of the observation type


Question: This function populates the internal tableOfContents list with the contents of the zip file TOC . If the server does not support ranged requests this will raise and exception . It will also throw an exception if the TOC cannot be found .

def Func ( arg_0 ) : arg_0 . directory_size = arg_0 . getDirectorySize ( ) if arg_0 . directory_size > 65536 : arg_0 . directory_size += 2 arg_0 . requestContentDirectory ( ) arg_2 = unpack ( "i" , arg_0 . raw_bytes [ arg_0 . directory_end + 16 : arg_0 . directory_end + 20 ] ) [ 0 ] arg_0 . raw_bytes = arg_0 . raw_bytes arg_4 = arg_2 - arg_0 . start arg_5 = 0 arg_6 = 0 arg_7 = [ ] try : while True : arg_8 = unpack ( "H" , arg_0 . raw_bytes [ arg_4 + 28 : arg_4 + 28 + 2 ] ) [ 0 ] arg_9 = unpack ( "H" , arg_0 . raw_bytes [ arg_4 + 30 : arg_4 + 30 + 2 ] ) [ 0 ] arg_10 = unpack ( "H" , arg_0 . raw_bytes [ arg_4 + 32 : arg_4 + 32 + 2 ] ) [ 0 ] arg_11 = arg_0 . raw_bytes [ arg_4 + 46 : arg_4 + 46 + arg_8 ] arg_5 = unpack ( "I" , arg_0 . raw_bytes [ arg_4 + 42 : arg_4 + 42 + 4 ] ) [ 0 ] arg_6 = unpack ( "I" , arg_0 . raw_bytes [ arg_4 + 20 : arg_4 + 20 + 4 ] ) [ 0 ] arg_12 = unpack ( "I" , arg_0 . raw_bytes [ arg_4 + 24 : arg_4 + 24 + 4 ] ) [ 0 ] arg_13 = { 'filename' : arg_11 , 'compressedsize' : arg_6 , 'uncompressedsize' : arg_12 , 'filestart' : arg_5 } arg_7 . append ( arg_13 ) arg_4 = arg_4 + 46 + arg_8 + arg_9 + arg_10 except : pass arg_0 . tableOfContents = arg_7 return arg_7

Checks if a bundle exists at the provided path

        :param path: Bundle path
        :return: bool


Question: creates an encrypted archive of the dropbox outside of the drop directory .

def Func ( arg_0 ) : arg_0 . status = u'270 creating final encrypted backup of cleansed attachments' return arg_0 . _create_encrypted_zip ( source = 'clean' , fs_target_dir = arg_0 . container . fs_archive_cleansed )


Question: Get the remainder elements . These elements will not be read in the direct queue access cyclic = False mode .

def Func ( arg_0 , arg_1 , arg_2 ) : return arg_0 . __get_batch ( arg_1 , length = arg_2 , last = True )

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: Returns value in a format parseable by parse_value or None .

def Func ( arg_0 ) : arg_1 = repr ( arg_0 ) try : if parse_value ( arg_1 ) == arg_0 : return arg_1 except SyntaxError : pass return None

Initialize bluez DBus communication.  Must be called before any other
        calls are made!


Question: Compute DIGEST - MD5 response value .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : logger . debug ( "Func{0!r}" . format ( ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) ) ) if arg_4 : arg_6 = b":" . join ( ( arg_0 , arg_1 , arg_2 , arg_4 ) ) else : arg_6 = b":" . join ( ( arg_0 , arg_1 , arg_2 ) ) arg_7 = b"AUTHENTICATE:" + arg_5 return b2a_hex ( _kd_value ( b2a_hex ( _h_value ( arg_6 ) ) , b":" . join ( ( arg_1 , arg_3 , arg_2 , b"auth" , b2a_hex ( _h_value ( arg_7 ) ) ) ) ) )

Called when there is an error in the websocket


Question: Create virtual environment .

def Func ( arg_0 , arg_1 , arg_2 = False , arg_3 = False , arg_4 = False ) : arg_5 = None arg_6 = True arg_7 = hasattr ( sys , 'real_prefix' ) or os . environ . get ( 'VIRTUAL_ENV' ) arg_8 = os . path . isdir ( arg_0 ) if not arg_4 : print_message ( '== Step 1. Create virtual environment ==' ) if ( arg_2 or ( not arg_7 and not arg_8 ) ) or ( arg_3 and not arg_8 ) : arg_5 = ( 'virtualenv' , ) + arg_1 + ( arg_0 , ) if not arg_5 and not arg_4 : if arg_7 : arg_9 = 'Working inside of virtual environment, done...' else : arg_9 = 'Virtual environment {0!r} already created, done...' print_message ( arg_9 . format ( arg_0 ) ) if arg_5 : with disable_error_handler ( ) : arg_6 = not run_cmd ( arg_5 , echo = not arg_4 ) if not arg_4 : print_message ( ) return arg_6


Question: Find the last occurance of the file in finders

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = None for arg_4 in arg_2 : arg_5 = arg_4 . find ( arg_1 ) if arg_5 : arg_3 = arg_5 return arg_3

Calculate a t-test score for the difference between two samples.

    Args:
        sample1: one sample.
        sample2: the other sample.

    Returns:
        The t-test score, as a float.


Question: Deletes an existing collection in the CosmosDB database .

def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_1 is None : raise AirflowBadRequest ( "Collection name cannot be None." ) arg_0 . get_conn ( ) . DeleteContainer ( get_collection_link ( arg_0 . __get_database_name ( arg_2 ) , arg_1 ) )

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: Get object properties .

def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_3 = arg_0 . _get_object_map ( arg_1 , arg_2 , wait_for_object = False ) except atomac . _a11y . ErrorInvalidUIElement : arg_0 . _windows = { } arg_3 = arg_0 . _get_object_map ( arg_1 , arg_2 , wait_for_object = False ) arg_5 = [ ] if arg_3 : for arg_6 in arg_3 . keys ( ) : if not arg_3 [ arg_6 ] or arg_6 == "obj" : continue arg_5 . append ( arg_6 ) return arg_5


Question: Perform a raw query on the task record database .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_2 [ 'content' ] arg_4 = arg_3 . get ( 'query' , { } ) arg_5 = arg_3 . get ( 'keys' , None ) arg_6 = [ ] arg_7 = list ( ) try : arg_8 = arg_0 . db . find_records ( arg_4 , arg_5 ) except Exception as e : arg_3 = error . wrap_exception ( ) else : if arg_5 is not None : arg_9 = [ ] if 'buffers' in arg_5 else None arg_10 = [ ] if 'result_buffers' in arg_5 else None else : arg_9 = None arg_10 = None for arg_11 in arg_8 : arg_12 = arg_11 . pop ( 'buffers' , arg_7 ) or arg_7 if arg_9 is not None : arg_9 . append ( len ( arg_12 ) ) arg_6 . extend ( arg_12 ) arg_13 = arg_11 . pop ( 'result_buffers' , arg_7 ) or arg_7 if arg_10 is not None : arg_10 . append ( len ( arg_13 ) ) arg_6 . extend ( arg_13 ) arg_3 = dict ( status = 'ok' , arg_8 = arg_8 , arg_9 = arg_9 , arg_10 = arg_10 ) arg_0 . session . send ( arg_0 . query , "db_reply" , arg_3 = arg_3 , parent = arg_2 , ident = arg_1 , arg_6 = arg_6 )


Question: Get the size of this type for converting a hex string to the type . Return 0 if the size is not known .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_type ( arg_1 ) if hasattr ( arg_2 , 'size' ) : return arg_2 . size ( ) return 0

Returns a list of two actions per gcs bucket to mount.


Question: Update the profile picture for the current user .

def Func ( arg_0 , arg_1 ) : arg_0 . conn ( "PUT" , "{0}/users/{1}/profile/avatar" . format ( SkypeConnection . API_USER , arg_0 . userId ) , auth = SkypeConnection . Auth . SkypeToken , data = arg_1 . read ( ) )

Generate RENEWING time.

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

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


Question: Get the current index of the key or the subtree . This is needed for later creating long polling requests

def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_1 = arg_1 . lstrip ( '/' ) arg_3 = '{}/{}' . format ( arg_0 . endpoint , arg_1 ) arg_4 = { } if arg_2 : arg_4 [ 'recurse' ] = '' arg_5 = requests . get ( arg_3 , arg_4 = arg_4 ) return arg_5 . headers [ 'X-Consul-Index' ]

Generates a rsync of all deployable code.


Question: Remove duplicate source and destination accesses

def Func ( arg_0 ) : arg_0 . destinations = { var_name : set ( acs ) for var_name , acs in arg_0 . destinations . items ( ) } arg_0 . sources = { var_name : set ( acs ) for var_name , acs in arg_0 . sources . items ( ) }

Run an iteration of this anomaly classifier


Question: Serialize this object as dictionary usable for conversion to JSON .

def Func ( arg_0 ) : return { 'type' : 'event' , 'id' : arg_0 . uid , 'attributes' : { 'start' : arg_0 . start , 'end' : arg_0 . end , 'uid' : arg_0 . uid , 'title' : arg_0 . title , 'data' : arg_0 . get_data ( ) , 'status' : Status . str ( arg_0 . status ) } }

Return the maximum file descriptor value.


Question: Sets a mask img to this . So every operation to self this mask will be taken into account .

def Func ( arg_0 , arg_1 ) : arg_2 = load_mask ( arg_1 , allow_empty = True ) check_img_compatibility ( arg_0 . img , arg_2 , only_check_3d = True ) arg_0 . mask = arg_2

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


Question: get the number of quartets as n - choose - k . This is used in equal splits to decide whether a split should be exhaustively sampled or randomly sampled . Edges near tips can be exhaustive while highly nested edges probably have too many quartets

def Func ( arg_0 , arg_1 ) : return int ( reduce ( MUL , ( Fraction ( arg_0 - arg_2 , arg_2 + 1 ) for arg_2 in range ( arg_1 ) ) , 1 ) )

notify all listeners about aggregate data and stats


Question: Returns a dictionary with the format identifier as the key . The values are are fully rendered templates with the given context .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = { } for arg_5 in arg_1 : if arg_5 . endswith ( ".txt" ) : arg_3 . autoescape = False arg_4 [ arg_5 ] = render_to_string ( ( "notification/%s/%s" % ( arg_2 , arg_5 ) , "notification/%s" % arg_5 ) , context_instance = arg_3 ) return arg_4

Return a list of not null values from the `col_name` column of `df`.


Question: Remove all the item from the list and unset the related data

def Func ( arg_0 ) : arg_0 . _py_data_map . clear ( ) arg_0 . _wx_data_map . clear ( ) wx . ListCtrl . Func ( arg_0 )

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


Question: Adds a widget to this container . Note that trying to add the Container to itself will be ignored .

def Func ( arg_0 , arg_1 ) : if arg_0 is arg_1 : return arg_0 . widgets [ arg_1 . name ] = arg_1

Set a decrypted value by key in a giraffez configuration file.

        :param str key: The key used to lookup the encrypted value
        :param value: Value to set at the given key, can be any value that is
            YAML serializeable.


Question: Performs an SCP command where the remote_path is the target and the local_path is the source .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = [ ] for arg_5 in arg_0 : arg_6 = arg_5 . hostname or arg_5 . public_ip arg_7 = _build_scp_command ( arg_6 , arg_3 . username , arg_3 . identity_file , is_get = False , arg_2 = arg_2 , arg_1 = arg_1 ) print ( 'Command:' , arg_7 ) arg_4 . append ( { 'command' : arg_7 , 'description' : arg_5 . display ( ) } ) stream_commands ( arg_4 ) print ( green ( 'Finished copying' ) )

Prepare received data for representation.

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

        Returns:
            dict: processed data to show.


Question: Conduct a diff - 1 transform on a numeric frame column .

def Func ( arg_0 ) : if arg_0 . ncols > 1 : raise H2OValueError ( "Only single-column frames supported" ) if arg_0 . types [ arg_0 . columns [ 0 ] ] not in { "real" , "int" , "bool" } : raise H2OValueError ( "Numeric column expected" ) arg_1 = H2OFrame . _expr ( expr = ExprNode ( "Func" , arg_0 ) , cache = arg_0 . _ex . _cache ) return arg_1

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: Create a team .

def Func ( arg_0 , arg_1 , ** arg_2 ) : check_type ( arg_1 , basestring , may_be_none = False ) arg_3 = dict_from_items_with_values ( arg_2 , arg_1 = arg_1 , ) arg_4 = arg_0 . _session . post ( API_ENDPOINT , json = arg_3 ) return arg_0 . _object_factory ( OBJECT_TYPE , arg_4 )

Add a device notification.

    :param int port: local AMS port as returned by adsPortOpenEx()
    :param pyads.structs.AmsAddr adr: local or remote AmsAddr
    :param string data_name: PLC storage address
    :param pyads.structs.NotificationAttrib pNoteAttrib: notification attributes
    :param callback: Callback function to handle notification
    :param user_handle: User Handle
    :rtype: (int, int)
    :returns: notification handle, user handle


Question: Return True if the last exception was thrown by a Descriptor instance .

def Func ( ) : arg_0 = sys . exc_info ( ) [ 2 ] arg_1 = arg_0 . tb_frame . f_locals if "self" in arg_1 : if not isinstance ( arg_1 [ "self" ] , Descriptor ) : return False return True return False

Determine the mass fraction of an element in a chemical compound.

    :param compound: Formula of the chemical compound, 'FeCr2O4'.
    :param element: Element, e.g. 'Cr'.

    :returns: Element mass fraction.


Question: Takes list of decoy and target scores and creates error statistics for target values

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = "smoother" , arg_6 = 3 , arg_7 = False , arg_8 = False , arg_9 = True , arg_10 = True , arg_11 = "probit" , arg_12 = 1.5 , arg_13 = arg_14 . power ( 10.0 , - 8 ) ) : arg_0 = to_one_dim_array ( arg_0 ) arg_0 = arg_14 . sort ( arg_0 [ ~ arg_14 . isnan ( arg_0 ) ] ) arg_1 = to_one_dim_array ( arg_1 ) arg_1 = arg_14 . sort ( arg_1 [ ~ arg_14 . isnan ( arg_1 ) ] ) if arg_2 : arg_16 = pnorm ( arg_0 , arg_1 ) else : arg_16 = pemp ( arg_0 , arg_1 ) arg_17 = pi0est ( arg_16 , arg_4 , arg_5 , arg_6 , arg_7 ) arg_18 = qvalue ( arg_16 , arg_17 [ 'pi0' ] , arg_3 ) arg_19 = stat_metrics ( arg_16 , arg_17 [ 'pi0' ] , arg_3 ) arg_20 = pd . DataFrame ( { 'cutoff' : arg_0 , 'pvalue' : arg_16 , 'qvalue' : arg_18 , 'svalue' : arg_19 [ 'svalue' ] , 'tp' : arg_19 [ 'tp' ] , 'fp' : arg_19 [ 'fp' ] , 'tn' : arg_19 [ 'tn' ] , 'fn' : arg_19 [ 'fn' ] , 'fpr' : arg_19 [ 'fpr' ] , 'fdr' : arg_19 [ 'fdr' ] , 'fnr' : arg_19 [ 'fnr' ] } ) if arg_8 : arg_20 [ 'pep' ] = lfdr ( arg_16 , arg_17 [ 'pi0' ] , arg_9 , arg_10 , arg_11 , arg_12 , arg_13 ) return arg_20 , arg_17

List all notebooks in the notebook dir.

        This returns a list of dicts of the form::

            dict(notebook_id=notebook,name=name)


Question: parse and import the script and then run the script s main function

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . parser arg_3 , arg_4 = arg_2 . parse_callback_args ( arg_1 ) arg_5 = arg_4 . pop ( "main_callback" ) if arg_2 . has_injected_quiet ( ) : arg_6 = arg_4 . pop ( "quiet_inject" , "" ) logging . inject_quiet ( arg_6 ) try : arg_7 = arg_5 ( * arg_3 , ** arg_4 ) arg_7 = int ( arg_7 ) if arg_7 else 0 except ArgError as e : echo . err ( "{}: error: {}" , arg_2 . prog , str ( e ) ) arg_7 = 2 return arg_7


Question: Export all keys to a file

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_1 = _get_stash ( arg_3 , arg_1 , arg_2 ) try : click . echo ( 'Exporting stash to {0}...' . format ( arg_0 ) ) arg_1 . export ( arg_0 = arg_0 ) click . echo ( 'Export complete!' ) except GhostError as ex : sys . exit ( ex )

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: Compose link to 1000G page for detailed information .

def Func ( arg_0 , arg_1 = None ) : arg_2 = arg_0 . get ( 'dbsnp_id' ) arg_1 = arg_1 or 37 if not arg_2 : return None if arg_1 == 37 : arg_3 = ( "http://grch37.ensembl.org/Homo_sapiens/Variation/Explore" "?v={};vdb=variation" ) else : arg_3 = ( "http://www.ensembl.org/Homo_sapiens/Variation/Explore" "?v={};vdb=variation" ) return arg_3 . format ( arg_2 )

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


Question: Merges config on top of template .

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = arg_0 . copy ( ) for arg_4 , arg_5 in arg_1 . items ( ) : if isinstance ( arg_5 , dict ) : arg_6 = arg_3 . get ( arg_4 , OrderedDict ( ) ) arg_3 [ arg_4 ] = Func ( arg_6 , arg_5 ) elif isinstance ( arg_5 , list ) and isinstance ( arg_3 . get ( arg_4 ) , list ) : arg_3 [ arg_4 ] = merge_list ( arg_3 [ arg_4 ] , arg_5 , arg_2 ) else : arg_3 [ arg_4 ] = arg_5 return arg_3


Question: Vectorize an image and mask out all invalid voxels .

def Func ( arg_0 , arg_1 , arg_2 = True , arg_3 = None , arg_4 = False ) : arg_0 . set_Func ( arg_3 ) arg_1 = arg_0 . get_image ( arg_1 , output = 'vector' ) if arg_4 : arg_5 = arg_1 [ arg_0 . global_Func ] arg_5 [ ~ arg_0 . get_Func ( arg_4 = True ) ] = 0 else : arg_5 = arg_1 [ arg_0 . current_Func ] if arg_2 : arg_5 = np . nan_to_num ( arg_5 ) return arg_5

Returns the maximum delay for the InferenceElements in the inference
    dictionary

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


Question: Create a record object using the LXML parser .

def Func ( arg_0 , arg_1 = arg_2 , arg_3 = arg_4 , arg_5 = arg_6 ) : arg_7 = etree . XMLParser ( dtd_validation = arg_3 , recover = ( arg_1 <= 3 ) ) if arg_3 : arg_0 = '<?xml version="1.0" encoding="UTF-8"?>\n' '<collection>\n%s\n</collection>' % ( arg_0 , ) try : arg_8 = etree . parse ( StringIO ( arg_0 ) , arg_7 ) except Exception as e : raise InvenioBibRecordParserError ( str ( e ) ) arg_9 = { } arg_10 = 0 arg_11 = arg_8 . iter ( arg_13 = '{*}controlfield' ) for arg_12 in arg_11 : arg_13 = arg_12 . attrib . get ( 'tag' , '!' ) . encode ( "UTF-8" ) arg_14 = ' ' arg_15 = ' ' arg_16 = arg_12 . text if arg_16 is None : arg_16 = '' else : arg_16 = arg_16 . encode ( "UTF-8" ) arg_17 = [ ] if arg_16 or arg_5 : arg_10 += 1 arg_9 . setdefault ( arg_13 , [ ] ) . append ( ( arg_17 , arg_14 , arg_15 , arg_16 , arg_10 ) ) arg_18 = arg_8 . iter ( arg_13 = '{*}datafield' ) for arg_19 in arg_18 : arg_13 = arg_19 . attrib . get ( 'tag' , '!' ) . encode ( "UTF-8" ) arg_14 = arg_19 . attrib . get ( 'ind1' , '!' ) . encode ( "UTF-8" ) arg_15 = arg_19 . attrib . get ( 'ind2' , '!' ) . encode ( "UTF-8" ) if arg_14 in ( '' , '_' ) : arg_14 = ' ' if arg_15 in ( '' , '_' ) : arg_15 = ' ' arg_17 = [ ] arg_20 = arg_19 . iter ( arg_13 = '{*}subfield' ) for arg_21 in arg_20 : arg_22 = arg_21 . attrib . get ( 'code' , '!' ) . encode ( "UTF-8" ) arg_16 = arg_21 . text if arg_16 is None : arg_16 = '' else : arg_16 = arg_16 . encode ( "UTF-8" ) if arg_16 or arg_5 : arg_17 . append ( ( arg_22 , arg_16 ) ) if arg_17 or arg_5 : arg_16 = '' arg_10 += 1 arg_9 . setdefault ( arg_13 , [ ] ) . append ( ( arg_17 , arg_14 , arg_15 , arg_16 , arg_10 ) ) return arg_9

Adjust contrast of an Image.

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

    Returns:
        PIL Image: Contrast adjusted image.


Question: Convert a python dict to a dict containing valid environment variable values .

def Func ( arg_0 , arg_1 = arg_2 . pathsep ) : arg_3 = { } for arg_4 , arg_5 in arg_0 . iteritems ( ) : if isinstance ( arg_5 , list ) : arg_3 [ arg_4 ] = arg_1 . join ( arg_5 ) elif isinstance ( arg_5 , string_types ) : arg_3 [ arg_4 ] = arg_5 else : raise TypeError ( '{} not a valid env var type' . format ( type ( arg_5 ) ) ) return arg_3

Transforms X according to the linear transformation corresponding to
        flipping the input eigenvalues.

        Parameters
        ----------
        X : array, shape [n_test, n]
            The test similarities to training points.

        Returns
        -------
        Xt : array, shape [n_test, n]
            The transformed test similarites to training points.


Question: Reads out a row and returns a dictionary containing the row content .

def Func ( arg_0 , arg_1 ) : arg_2 = { } for arg_3 in arg_0 : arg_2 [ arg_3 ] = arg_1 [ arg_3 ] return arg_2

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


Question: Loops according to ECX counter .

def Func ( arg_0 , arg_1 ) : arg_2 = { 16 : 'CX' , 32 : 'ECX' , 64 : 'RCX' } [ arg_0 . address_bit_size ] arg_3 = arg_0 . write_register ( arg_2 , arg_0 . read_register ( arg_2 ) - 1 ) arg_0 . PC = Operators . ITEBV ( arg_0 . address_bit_size , arg_3 == 0 , ( arg_0 . PC + arg_1 . read ( ) ) & ( ( 1 << arg_1 . size ) - 1 ) , arg_0 . PC + arg_0 . instruction . size )

Installs the mod-security Apache module.

        https://www.modsecurity.org


Question: Returns whether the bundle is valid .

def Func ( arg_0 ) : if not arg_0 . _errors : try : arg_0 . _errors . append ( next ( arg_0 . _validator ) ) except StopIteration : pass return not arg_0 . _errors

Retrieve the list of courses contained within this catalog.

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


Question: Run the migrate command to create the database schema

def Func ( arg_0 ) : with chdir ( arg_0 . project_directory ) : arg_1 = deepcopy ( dict ( os . environ ) ) arg_1 [ arg_2 ( 'DJANGO_SETTINGS_MODULE' ) ] = arg_2 ( '{0}.settings' . format ( arg_0 . project_name ) ) arg_1 [ arg_2 ( 'PYTHONPATH' ) ] = arg_2 ( os . pathsep . join ( map ( shlex_quote , sys . path ) ) ) arg_3 = [ ] arg_3 . append ( [ sys . executable , '-W' , 'ignore' , 'manage.py' , 'migrate' ] , ) if arg_0 . verbose : sys . stdout . write ( 'Database setup commands: {0}\n' . format ( ', ' . join ( [ ' ' . join ( arg_4 ) for arg_4 in arg_3 ] ) ) ) for arg_5 in arg_3 : try : arg_6 = subprocess . check_output ( arg_5 , arg_1 = arg_1 , stderr = subprocess . STDOUT ) sys . stdout . write ( arg_6 . decode ( 'utf-8' ) ) except subprocess . CalledProcessError as e : if arg_0 . verbose : sys . stdout . write ( e . output . decode ( 'utf-8' ) ) raise if not arg_0 . no_user : sys . stdout . write ( 'Creating admin user\n' ) if arg_0 . noinput : create_user ( arg_0 ) else : subprocess . check_call ( ' ' . join ( [ sys . executable , '-W' , 'ignore' , 'manage.py' , 'createsuperuser' ] ) , shell = True , stderr = subprocess . STDOUT )

Gets the fuel prices for a specific fuel station.


Question: Triggers expired timers

def Func ( arg_0 ) : arg_1 = time . time ( ) while len ( arg_0 . timer_tasks ) > 0 and ( arg_0 . timer_tasks [ 0 ] [ 0 ] - arg_1 <= 0 ) : arg_2 = heappop ( arg_0 . timer_tasks ) [ 1 ] arg_2 ( )

Return HgResource object for path.

        See DAVProvider.get_resource_inst()


Question: Remove key name from bucket set .

def Func ( arg_0 , * arg_1 , ** arg_2 ) : mimicdb . backend . srem ( tpl . bucket % arg_0 . name , arg_1 [ 0 ] ) mimicdb . backend . delete ( tpl . key % ( arg_0 . name , arg_1 [ 0 ] ) ) return super ( Bucket , arg_0 ) . Func ( * arg_1 , ** arg_2 )

This is a parallel worker for running period-recovery.

    Parameters
    ----------

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

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

    Returns
    -------

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


Question: Adds a cancel button to let the user cancel whatever choice they were given . This widget can be triggered by setting the label label_cancel to a string . This widget will be positioned slightly below the main label and to the right of the confirm button .

def Func ( arg_0 , arg_1 ) : arg_0 . wbtn_cancel = button . Button ( "btn_cancel" , arg_0 , arg_0 . window , arg_0 . peng , pos = lambda sw , sh , bw , bh : ( sw / 2 + 4 , sh / 2 - bh / 2 - bh * 2 ) , arg_3 = [ 0 , 0 ] , label = arg_1 , borderstyle = arg_0 . borderstyle ) arg_0 . wbtn_cancel . size = lambda sw , sh : ( arg_0 . wbtn_cancel . _label . font_size * 8 , arg_0 . wbtn_cancel . _label . font_size * 2 ) arg_0 . addWidget ( arg_0 . wbtn_cancel ) def f ( ) : arg_0 . doAction ( "cancel" ) arg_0 . exitDialog ( ) arg_0 . wbtn_cancel . addAction ( "click" , f )

notify all listeners about aggregate data and stats


Question: Adds submission_objects to clinvar collection and update the coresponding submission object with their id

def Func ( arg_0 , arg_1 , arg_2 ) : LOG . info ( "Adding new variants and case data to clinvar submission '%s'" , arg_1 ) for arg_3 in arg_2 [ 0 ] : try : arg_4 = arg_0 . clinvar_collection . insert_one ( arg_3 ) arg_0 . clinvar_submission_collection . update_one ( { '_id' : arg_1 } , { '$push' : { 'variant_data' : str ( arg_4 . inserted_id ) } } , upsert = True ) except pymongo . errors . DuplicateKeyError : LOG . error ( "Attepted to insert a clinvar variant which is already in DB!" ) if arg_2 [ 1 ] : for arg_5 in arg_2 [ 1 ] : try : arg_4 = arg_0 . clinvar_collection . insert_one ( arg_5 ) arg_0 . clinvar_submission_collection . update_one ( { '_id' : arg_1 } , { '$push' : { 'case_data' : str ( arg_4 . inserted_id ) } } , upsert = True ) except pymongo . errors . DuplicateKeyError : LOG . error ( "One or more casedata object is already present in clinvar collection!" ) arg_6 = arg_0 . clinvar_submission_collection . find_one_and_update ( { '_id' : arg_1 } , { '$set' : { 'updated_at' : datetime . now ( ) } } , return_document = pymongo . ReturnDocument . AFTER ) return arg_6

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

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


Question: Get a default connection string .

def Func ( arg_0 , arg_1 : arg_2 [ arg_3 ] = None ) -> arg_3 : return get_connection ( arg_0 . module_name , arg_1 = arg_1 )

Perform delta step by writing stacked values to signals


Question: Return a response with a list of jsonapi data objects

def Func ( arg_0 , arg_1 = 200 ) : arg_2 = { 'data' : ensurelist ( arg_0 ) } return make_response ( jsonify ( arg_2 ) , arg_1 )

Compares and exchanges.

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

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

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

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