Question: Open an S3 Bucket resource .

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None ) : arg_4 = boto3 . session . Session ( profile_name = arg_3 , arg_1 = arg_1 , arg_2 = arg_2 ) arg_5 = arg_4 . resource ( 's3' ) arg_6 = arg_5 . Bucket ( arg_0 ) return arg_6

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 the input string centered in a marquee .

def Func ( arg_0 = '' , arg_1 = 78 , arg_2 = '*' ) : if not arg_0 : return ( arg_2 * arg_1 ) [ : arg_1 ] arg_3 = ( arg_1 - len ( arg_0 ) - 2 ) // len ( arg_2 ) // 2 if arg_3 < 0 : arg_3 = 0 arg_4 = arg_2 * arg_3 return '%s %s %s' % ( arg_4 , arg_0 , arg_4 )

Asynchronously request a URL and get the encoded text content of the
    body.

    Parameters
    ----------
    url : `str`
        URL to download.
    session : `aiohttp.ClientSession`
        An open aiohttp session.

    Returns
    -------
    content : `str`
        Content downloaded from the URL.


Question: Aggregate the rows of the DataFrame into a single value .

def Func ( arg_0 , arg_1 , arg_2 , * arg_3 ) : if is_callable ( arg_1 ) and not is_none ( arg_2 ) and has_elements ( * arg_3 ) : return arg_0 . __do_Func ( arg_1 , arg_2 , * arg_3 )


Question: Get strings that correspond to some hash .

def Func ( arg_0 , arg_1 ) : return [ arg_3 . decode ( 'utf8' ) for ( arg_2 , arg_3 ) in arg_0 . client . scan_keys ( HASH_KEYWORD_INDEX_TABLE , ( ( arg_1 , ) , ( arg_1 , ) ) ) ]

Download outputs for job.

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

    Examples:

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


Question: Run a sequence of AST nodes . The execution mode depends on the interactivity parameter .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 'last_expr' ) : if not arg_1 : return if arg_3 == 'last_expr' : if isinstance ( arg_1 [ - 1 ] , ast . Expr ) : arg_3 = "last" else : arg_3 = "none" if arg_3 == 'none' : arg_4 , arg_5 = arg_1 , [ ] elif arg_3 == 'last' : arg_4 , arg_5 = arg_1 [ : - 1 ] , arg_1 [ - 1 : ] elif arg_3 == 'all' : arg_4 , arg_5 = [ ] , arg_1 else : raise ValueError ( "Interactivity was %r" % arg_3 ) arg_6 = arg_0 . execution_count try : for arg_7 , arg_8 in enumerate ( arg_4 ) : arg_9 = ast . Module ( [ arg_8 ] ) arg_10 = arg_0 . compile ( arg_9 , arg_2 , "exec" ) if arg_0 . run_code ( arg_10 ) : return True for arg_7 , arg_8 in enumerate ( arg_5 ) : arg_9 = ast . Interactive ( [ arg_8 ] ) arg_10 = arg_0 . compile ( arg_9 , arg_2 , "single" ) if arg_0 . run_code ( arg_10 ) : return True if softspace ( sys . stdout , 0 ) : print except : arg_0 . showtraceback ( ) return False

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


Question: r Return the Jaccard similarity of two strings .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 2 ) : return super ( arg_0 . __class__ , arg_0 ) . Func ( arg_1 , arg_2 , arg_3 , 1 , 1 )

Lists all of the service certificates associated with the specified
        hosted service.

        service_name:
            Name of the hosted service.


Question: Add class options to argparser options .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = hump_to_underscore ( arg_0 . __name__ ) . replace ( '_component' , '' ) arg_5 = arg_2 if arg_2 else 'This tool generate by `cliez` ' 'https://www.github.com/wangwenpei/cliez' arg_6 = arg_1 . add_parser ( arg_4 , help = arg_0 . __doc__ , arg_5 = arg_5 ) arg_6 . description = arg_0 . add_arguments . __doc__ if hasattr ( arg_0 , 'add_slot_args' ) : arg_8 = arg_0 . add_slot_args ( ) or [ ] for arg_9 in arg_8 : arg_6 . add_argument ( * arg_9 [ 0 ] , ** arg_9 [ 1 ] ) arg_6 . description = arg_0 . add_slot_args . __doc__ pass arg_10 = arg_0 . add_arguments ( ) or [ ] for arg_9 in arg_10 : arg_6 . add_argument ( * arg_9 [ 0 ] , ** arg_9 [ 1 ] ) if not arg_0 . exclude_global_option : for arg_9 in arg_3 : arg_6 . add_argument ( * arg_9 [ 0 ] , ** arg_9 [ 1 ] ) return arg_6

Pad dimensions of event tensors for mixture distributions.

  See `Mixture._sample_n` and `MixtureSameFamily._sample_n` for usage examples.

  Args:
    x: event tensor to pad.
    mixture_distribution: Base distribution of the mixture.
    categorical_distribution: `Categorical` distribution that mixes the base
      distribution.
    event_ndims: Integer specifying the number of event dimensions in the event
      tensor.

  Returns:
    A padded version of `x` that can broadcast with `categorical_distribution`.


Question: Get the base directory where IPython itself is installed .

def Func ( ) : arg_0 = os . path . dirname ( IPython . __file__ ) return py3compat . cast_unicode ( arg_0 , fs_encoding )

Try to merge processes as much is possible

    :param processes: list of processes instances


Question: Build transition noise distribution for a ConstrainedSeasonalSSM .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = tf . concat ( [ tf . ones ( [ arg_1 - 1 , 1 ] , dtype = arg_0 . dtype ) , tf . zeros ( [ arg_1 - 1 , arg_1 - 2 ] , dtype = arg_0 . dtype ) ] , axis = - 1 ) arg_4 = ( arg_3 * arg_0 [ ... , tf . newaxis , tf . newaxis ] / arg_1 ) def seasonal_transition_noise ( arg_5 ) : arg_6 = dist_util . pick_scalar_condition ( arg_2 ( arg_5 ) , arg_4 , tf . zeros_like ( arg_4 ) ) return tfd . MultivariateNormalTriL ( loc = tf . zeros ( arg_1 - 1 , dtype = arg_0 . dtype ) , scale_tril = arg_6 ) return seasonal_transition_noise

Resolves VirtualEnvironments in CPENV_HOME


Question: To be subclassed if alternate methods of loading data .

def Func ( arg_0 , arg_1 ) : if arg_1 . startswith ( ( 'http://' , 'https://' ) ) : arg_2 = urlopen ( arg_1 ) . read ( ) else : with open ( arg_1 , 'rb' ) as f : arg_2 = f . read ( ) if arg_1 . endswith ( '.zip' ) : arg_0 . load_lines ( get_lines_from_zip ( arg_2 ) ) else : arg_0 . load_lines ( arg_2 . decode ( 'utf-8' ) . splitlines ( ) )


Question: Convert a docstring to a markdown text .

def Func ( arg_0 , arg_1 , arg_2 = 1 , arg_3 = False , arg_4 = True , arg_5 = 0 ) : arg_6 = doctrim ( arg_0 ) arg_7 = arg_6 . split ( '\n' ) arg_8 = find_sections ( arg_7 ) if arg_8 : arg_9 = min ( n for n , t in arg_8 ) - 1 else : arg_9 = 1 arg_10 = 0 if arg_9 < arg_2 : arg_10 = arg_2 - arg_9 arg_9 = arg_2 arg_8 = [ ( lev + arg_10 , tit ) for lev , tit in arg_8 ] arg_11 = next ( ( i for i , l in enumerate ( arg_7 ) if is_heading ( l ) ) , 0 ) arg_12 = [ make_heading ( arg_9 , arg_1 ) , "" , ] + arg_7 [ : arg_11 ] if arg_4 : arg_12 += make_toc ( arg_8 , arg_5 ) arg_12 += [ '' ] arg_12 += _Func ( arg_7 [ arg_11 : ] , arg_10 ) if arg_3 : return ( arg_12 , arg_8 ) else : return "\n" . join ( arg_12 )

Augment a sample shape to broadcast batch dimensions.

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

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

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

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


Question: Return a list of matched task runs for a given project ID .

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


Question: Return a new LuminosoClient for a subpath of this one .

def Func ( arg_0 , arg_1 ) : if arg_1 . startswith ( '/' ) : arg_2 = arg_0 . root_url + arg_1 else : arg_2 = arg_0 . url + arg_1 return arg_0 . __class__ ( arg_0 . session , arg_2 )

Decorator. Abortable worker. If wrapped task will be cancelled by
    dispatcher, decorator will send ftp codes of successful interrupt.

    ::

        >>> @worker
        ... async def worker(self, connection, rest):
        ...     ...


Question: A proxy for a rule called name which may not be yet defined .

def Func ( arg_0 , arg_1 = None ) : @ llrule ( arg_1 , lambda arg_2 : getattr ( arg_2 , arg_0 ) . expected ( arg_2 ) ) def rule ( arg_2 ) : return getattr ( arg_2 , arg_0 ) ( ) return rule


Question: Takes a list of signals and sets a handler for them

def Func ( arg_0 , arg_1 , arg_2 = arg_3 . SIG_DFL ) : for arg_5 in arg_1 : arg_0 . log . debug ( "Creating handler for signal: {0}" . format ( arg_5 ) ) arg_3 . signal ( arg_5 , arg_2 )

Read a config file and set config values accordingly.

        Returns:
            dict: content of config file.


Question: Dive into nested tree .

def Func ( arg_0 , arg_1 = "" , arg_2 = "" , ** arg_3 ) : arg_4 = { attr : getattr ( arg_0 , attr ) for attr in arg_0 . params if attr not in [ "highlight" ] } if not isinstance ( arg_1 , dict ) : arg_1 = { "msg" : arg_1 , "kwargs" : { } } arg_3 [ "messages" ] = [ * arg_0 . messages , arg_1 ] arg_3 [ "parent_state" ] = arg_0 for arg_5 in [ "solution_context" , "student_context" ] : if arg_5 in arg_3 and not arg_3 [ arg_5 ] : arg_3 . pop ( arg_5 , None ) def update_kwarg ( arg_6 , arg_7 ) : arg_3 [ arg_6 ] = arg_7 ( arg_3 [ arg_6 ] ) def update_context ( arg_6 ) : update_kwarg ( arg_6 , getattr ( arg_0 , arg_6 ) . update_ctx ) if isinstance ( arg_3 . get ( "student_ast" , None ) , list ) : update_kwarg ( "student_ast" , wrap_in_module ) if isinstance ( arg_3 . get ( "solution_ast" , None ) , list ) : update_kwarg ( "solution_ast" , wrap_in_module ) if "student_ast" in arg_3 : arg_3 [ "student_code" ] = arg_0 . student_ast_tokens . get_text ( arg_3 [ "student_ast" ] ) if "solution_ast" in arg_3 : arg_3 [ "solution_code" ] = arg_0 . solution_ast_tokens . get_text ( arg_3 [ "solution_ast" ] ) if "solution_context" in arg_3 : update_context ( "solution_context" ) if "student_context" in arg_3 : update_context ( "student_context" ) if "solution_env" in arg_3 : update_context ( "solution_env" ) if "student_env" in arg_3 : update_context ( "student_env" ) arg_8 = arg_0 . SUBCLASSES [ arg_2 ] if arg_2 else State arg_9 = arg_8 ( ** { ** arg_4 , ** arg_3 } ) return arg_9

Log 'msg % args' at level 'level' once per 'n' times.

    Logs the 1st call, (N+1)st call, (2N+1)st call,  etc.
    Not threadsafe.

    Args:
    level: The level at which to log.
    msg: The message to be logged.
    n: The number of times this should be called before it is logged.
    *args: The args to be substituted into the msg.


Question: Finds the true URL name of a package when the given name isn t quite correct . This is usually used to implement case - insensitivity .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if not arg_1 . url . endswith ( '/' ) : arg_1 . url += '/' arg_4 = arg_0 . _get_page ( arg_1 , arg_3 ) if arg_4 is None : logger . critical ( 'Cannot fetch index base URL %s' , arg_1 ) return arg_5 = normalize_name ( arg_3 . url_name ) for arg_6 in arg_4 . links : arg_7 = posixpath . basename ( arg_6 . path . rstrip ( '/' ) ) if arg_5 == normalize_name ( arg_7 ) : logger . debug ( 'Real name of requirement %s is %s' , arg_2 , arg_7 , ) return arg_7 return None


Question: Given the request and response headers return True if an HTTP Not Modified response could be returned instead .

def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_2 ) -> bool : try : arg_4 = arg_3 [ "if-none-match" ] arg_5 = arg_1 [ "etag" ] if arg_4 == arg_5 : return True except KeyError : pass try : arg_6 = parsedate ( arg_3 [ "if-modified-since" ] ) arg_7 = parsedate ( arg_1 [ "last-modified" ] ) if ( arg_6 is not None and arg_7 is not None and arg_6 >= arg_7 ) : return True except KeyError : pass return False

Take a snapshot of a droplet

    Parameters
    ----------
    name: str
        name for snapshot


Question: Get available attritbutes from dataset you ve selected

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

Call the timeout handlers due.

        :Return: (next_event_timeout, sources_handled) tuple.
            next_event_timeout is number of seconds until the next timeout
            event, sources_handled is number of handlers called.


Question: Extract storage name from file path .

def Func ( arg_0 , arg_1 = 'osfstorage' ) : arg_0 = norm_remote_path ( arg_0 ) for arg_2 in KNOWN_PROVIDERS : if arg_0 . startswith ( arg_2 + '/' ) : if six . PY3 : return arg_0 . split ( '/' , maxsplit = 1 ) else : return arg_0 . split ( '/' , 1 ) return ( arg_1 , arg_0 )

Stop streaming samples from device and delete samples buffer


Question: Return pair of bucket without protocol and path

def Func ( arg_0 ) : if arg_0 . startswith ( 's3://' ) : arg_0 = arg_0 [ 5 : ] elif arg_0 . startswith ( 's3n://' ) : arg_0 = arg_0 [ 6 : ] elif arg_0 . startswith ( 's3a://' ) : arg_0 = arg_0 [ 6 : ] else : raise ValueError ( "S3 path should start with s3://, s3n:// or " "s3a:// prefix" ) arg_1 = arg_0 . split ( '/' ) arg_2 = arg_1 [ 0 ] arg_0 = '/' . join ( arg_1 [ 1 : ] ) return arg_2 , normalize_prefix ( arg_0 )

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


Question: Try the library . If it doesnt work use the command line ..

def Func ( arg_0 ) : try : arg_1 = sha256 ( ) arg_2 = open ( arg_0 , 'rb' ) while True : arg_3 = arg_2 . read ( 0x1000000 ) if arg_3 in [ None , "" ] : break arg_1 . update ( arg_3 . encode ( 'utf-8' ) ) arg_2 . close ( ) return arg_1 . hexdigest ( ) except : arg_4 = run ( [ "sha256sum" , "-b" , arg_0 ] ) return arg_4 . split ( " " ) [ 0 ]

Fit structure-based AD. The training model  memorizes the unique set of reaction signature.

        Parameters
        ----------
        X : after read rdf file

        Returns
        -------
        self : object


Question: Find a file by looking through a sequence of paths .

def Func ( arg_0 , arg_1 = None ) : arg_0 = arg_0 . strip ( '"' ) . strip ( "'" ) if os . path . isabs ( arg_0 ) and os . path . isfile ( arg_0 ) : return arg_0 if arg_1 is None : arg_1 = ( "" , ) elif isinstance ( arg_1 , basestring ) : arg_1 = ( arg_1 , ) for arg_2 in arg_1 : if arg_2 == '.' : arg_2 = os . getcwdu ( ) arg_3 = expand_path ( os . path . join ( arg_2 , arg_0 ) ) if os . path . isfile ( arg_3 ) : return os . path . abspath ( arg_3 ) raise IOError ( "File %r does not exist in any of the search paths: %r" % ( arg_0 , arg_1 ) )


Question: Adds the record to the KNN classifier .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _knnclassifier . _knn arg_3 = arg_0 . _knnclassifier . getParameter ( 'categoryRecencyList' ) arg_4 = arg_0 . _labelListToCategoryNumber ( arg_1 . anomalyLabel ) if arg_1 . ROWID in arg_3 : arg_2 . prototypeSetCategory ( arg_1 . ROWID , arg_4 ) return arg_5 = arg_0 . _getStateAnomalyVector ( arg_1 ) arg_6 = arg_1 . ROWID arg_2 . learn ( arg_5 , arg_4 , arg_6 = arg_6 )

Default exchange proposal function, for replica exchange MC.

  With probability `prob_exchange` propose combinations of replica for exchange.
  When exchanging, create combinations of adjacent replicas in
  [Replica Exchange Monte Carlo](
  https://en.wikipedia.org/wiki/Parallel_tempering)

  ```
  exchange_fn = default_exchange_proposed_fn(prob_exchange=0.5)
  exchange_proposed = exchange_fn(num_replica=3)

  exchange_proposed.eval()
  ==> [[0, 1]]  # 1 exchange, 0 <--> 1

  exchange_proposed.eval()
  ==> []  # 0 exchanges
  ```

  Args:
    prob_exchange: Scalar `Tensor` giving probability that any exchanges will
      be generated.

  Returns:
    default_exchange_proposed_fn_: Python callable which take a number of
      replicas (a Python integer), and return combinations of replicas for
      exchange as an [n, 2] integer `Tensor`, `0 <= n <= num_replica // 2`,
      with *unique* values in the set `{0, ..., num_replica}`.


Question: The debugger interface to magic_pdef

def Func ( arg_0 , arg_1 ) : arg_2 = [ ( 'Locals' , arg_0 . curframe . f_locals ) , ( 'Globals' , arg_0 . curframe . f_globals ) ] arg_0 . shell . find_line_magic ( 'pdef' ) ( arg_1 , arg_2 = arg_2 )

Returns a string contains start time and the secondary training job status message.

    :param job_description: Returned response from DescribeTrainingJob call
    :type job_description: dict
    :param prev_description: Previous job description from DescribeTrainingJob call
    :type prev_description: dict

    :return: Job status string to be printed.


Question: Runs cProfile on a package .

def Func ( arg_0 ) : arg_1 = cProfile . Profile ( ) arg_1 . enable ( ) try : runpy . run_path ( arg_0 . _run_object , run_name = '__main__' ) except SystemExit : pass arg_1 . disable ( ) arg_2 = pstats . Stats ( arg_1 ) arg_2 . calc_callees ( ) return { 'objectName' : arg_0 . _object_name , 'callStats' : arg_0 . _transform_stats ( arg_2 ) , 'totalTime' : arg_2 . total_tt , 'primitiveCalls' : arg_2 . prim_calls , 'totalCalls' : arg_2 . total_calls , 'timestamp' : int ( time . time ( ) ) }

A list of row indices to remove. There are two caveats. First, this is
    a potentially slow operation. Second, pattern indices will shift if
    patterns before them are removed.


Question: Retrieve the Supybot archives after the given date

def Func ( arg_0 , arg_1 ) : arg_2 = [ ] arg_3 = arg_0 . __list_supybot_archives ( ) for arg_4 in arg_3 : arg_5 = arg_0 . __parse_date_from_filepath ( arg_4 ) if arg_5 . date ( ) >= arg_1 . date ( ) : arg_2 . append ( ( arg_5 , arg_4 ) ) else : logger . debug ( "Archive %s stored before %s; skipped" , arg_4 , str ( arg_1 ) ) arg_2 . sort ( key = lambda x : x [ 0 ] ) return [ arg_6 [ 1 ] for arg_6 in arg_2 ]

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


Question: Deletes the video

def Func ( arg_0 , arg_1 ) : if not arg_0 . authenticated : raise ApiError ( _ ( "Authentication is required" ) ) arg_2 = arg_0 . fetch_video ( arg_1 ) arg_3 = Api . yt_service . DeleteVideoEntry ( arg_2 ) if not arg_3 : raise OperationError ( _ ( "Cannot be deleted from Youtube" ) ) return True


Question: Computes the 2D - Fourier Magnitude Coefficients .

def Func ( arg_0 ) : arg_1 = scipy . fftpack . fft2 ( arg_0 ) arg_2 = magnitude ( arg_1 ) arg_3 = scipy . fftpack . fftshift ( arg_2 ) . flatten ( ) return arg_3 [ : arg_3 . shape [ 0 ] // 2 + 1 ]

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


Question: Set a hold

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = "nextTransition" ) : arg_5 = { "selection" : { "selectionType" : "thermostats" , "selectionMatch" : arg_0 . thermostats [ arg_1 ] [ 'identifier' ] } , "functions" : [ { "type" : "setHold" , "params" : { "holdType" : arg_4 , "coolHoldTemp" : int ( arg_2 * 10 ) , "heatHoldTemp" : int ( arg_3 * 10 ) } } ] } arg_6 = "set hold temp" return arg_0 . make_request ( arg_5 , arg_6 )

Temporal distance probability density function.

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


Question: This returns a trapezoid transit - shaped function .

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: Initialize a new polyaxonfile specification .

def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = get_project_or_local ( arg_0 ) try : arg_4 = PolyaxonClient ( ) . project . get_project ( arg_2 , arg_3 ) except ( PolyaxonHTTPError , PolyaxonShouldExitError , PolyaxonClientException ) as e : Printer . print_error ( 'Make sure you have a project with this name `{}`' . format ( arg_0 ) ) Printer . print_error ( 'You can a create new project with this command: ' 'polyaxon project create ' '--name={} [--description=...] [--tags=...]' . format ( arg_3 ) ) Printer . print_error ( 'Error message `{}`.' . format ( e ) ) sys . exit ( 1 ) arg_5 = False if ProjectManager . is_Funcialized ( ) : arg_6 = ProjectManager . get_config ( ) click . echo ( 'Warning! This project is already Funcialized with the following project:' ) with clint . textui . indent ( 4 ) : clint . textui . puts ( 'User: {}' . format ( arg_6 . user ) ) clint . textui . puts ( 'Project: {}' . format ( arg_6 . name ) ) if click . confirm ( 'Would you like to override this current config?' , default = False ) : arg_5 = True else : arg_5 = True if arg_5 : ProjectManager . purge ( ) ProjectManager . set_config ( arg_4 , Func = True ) Printer . print_success ( 'Project was Funcialized' ) else : Printer . print_header ( 'Project config was not changed.' ) arg_7 = False if IgnoreManager . is_Funcialized ( ) : click . echo ( 'Warning! Found a .polyaxonignore file.' ) if click . confirm ( 'Would you like to override it?' , default = False ) : arg_7 = True else : arg_7 = True if arg_7 : IgnoreManager . Func_config ( ) Printer . print_success ( 'New .polyaxonignore file was created.' ) else : Printer . print_header ( '.polyaxonignore file was not changed.' ) if arg_1 : create_polyaxonfile ( )


Question: Apply non - linear distortion .

def Func ( arg_0 , arg_1 = 20.0 , arg_2 = 20.0 ) : if not is_number ( arg_1 ) : raise ValueError ( 'db_level must be a number.' ) if not is_number ( arg_2 ) : raise ValueError ( 'colour must be a number.' ) arg_3 = [ 'Func' , '{:f}' . format ( arg_1 ) , '{:f}' . format ( arg_2 ) ] arg_0 . effects . extend ( arg_3 ) arg_0 . effects_log . append ( 'Func' ) return arg_0

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


Question: Return a list of all bluez DBus objects that implement the requested interface name and are under the specified path . The default is to search devices under the root of all bluez objects .

def Func ( arg_0 , arg_1 , arg_2 = '/org/bluez' ) : arg_2 = arg_2 . lower ( ) arg_3 = [ ] for arg_4 , arg_5 in iteritems ( arg_0 . _bluez . GetManagedObjects ( ) ) : if arg_1 in arg_5 . keys ( ) and arg_4 . lower ( ) . startswith ( arg_2 ) : arg_3 . append ( arg_0 . _bus . get_object ( 'org.bluez' , arg_4 ) ) return arg_3

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


Question: get a particular build template by default we return templates that are based on package managers .

def Func ( arg_0 = None , arg_1 = 'apt' ) : arg_2 = get_installdir ( ) if arg_0 is None : arg_0 = "%s/main/templates/build/singularity-builder-%s.sh" % ( arg_2 , arg_1 ) if os . path . exists ( arg_0 ) : bot . debug ( "Found template %s" % arg_0 ) return '' . join ( read_file ( arg_0 ) ) bot . warning ( "Template %s not found." % arg_0 )

If there are edits to the current input buffer, store them.


Question: Merge svg_file2 in svg_file1 in the given positions x_coord y_coord and scale .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = 1 ) : arg_5 = _check_svg_file ( arg_0 ) arg_6 = _check_svg_file ( arg_1 ) arg_7 = arg_6 . getroot ( ) arg_5 . append ( [ arg_7 ] ) arg_7 . moveto ( arg_2 , arg_3 , arg_4 = arg_4 ) return arg_5

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


Question: Get the datetime at a given period .

def Func ( arg_0 , arg_1 ) : if arg_0 . timestep_period_duration == TimePeriod . millisecond : return arg_0 . start_datetime + timedelta ( milliseconds = arg_1 ) elif arg_0 . timestep_period_duration == TimePeriod . second : return arg_0 . start_datetime + timedelta ( seconds = arg_1 ) elif arg_0 . timestep_period_duration == TimePeriod . minute : return arg_0 . start_datetime + timedelta ( minutes = arg_1 ) elif arg_0 . timestep_period_duration == TimePeriod . hour : return arg_0 . start_datetime + timedelta ( hours = arg_1 ) elif arg_0 . timestep_period_duration == TimePeriod . day : return arg_0 . start_datetime + relativedelta ( days = arg_1 ) elif arg_0 . timestep_period_duration == TimePeriod . week : return arg_0 . start_datetime + relativedelta ( days = arg_1 * 7 ) elif arg_0 . timestep_period_duration == TimePeriod . month : return arg_0 . start_datetime + relativedelta ( months = arg_1 ) elif arg_0 . timestep_period_duration == TimePeriod . year : return arg_0 . start_datetime + relativedelta ( years = arg_1 )

Convert any non-DAVError exception to HTTP_INTERNAL_ERROR.


Question: Given a MetadataStatement instance create a signed JWT .

def Func ( arg_0 , arg_1 , arg_2 = '' , arg_3 = '' , arg_4 = 0 , arg_5 = '' ) : return arg_0 . self_signer . sign ( arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 )

Open the editor at the given filename, linenumber, column and
    show an error message. This is used for correcting syntax errors.
    The current implementation only has special support for the VIM editor,
    and falls back on the 'editor' hook if VIM is not used.

    Call ip.set_hook('fix_error_editor',youfunc) to use your own function,


Question: Retrieve single byte from word

def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 = Operators . ITEBV ( 256 , arg_1 < 32 , ( 31 - arg_1 ) * 8 , 256 ) return Operators . ZEXTEND ( Operators . EXTRACT ( arg_2 , arg_1 , 8 ) , 256 )

Plot the temporal distance cumulative density function.

        Returns
        -------
        fig: matplotlib.Figure


Question: User function to get the correct client .

def Func ( arg_0 , arg_1 = 'client' , ** arg_2 ) : arg_3 = choose_client ( arg_0 ) arg_4 = get_user_agent ( ** arg_2 ) if arg_3 : if arg_3 [ 'client_type' ] == 'cloud' : arg_5 = get_gcp_client ( mod_name = arg_3 [ 'module_name' ] , pkg_name = arg_2 . get ( 'pkg_name' , 'google.cloud' ) , key_file = arg_2 . get ( 'key_file' , None ) , project = arg_2 [ 'project' ] , arg_4 = arg_4 ) else : arg_5 = get_google_client ( mod_name = arg_3 [ 'module_name' ] , key_file = arg_2 . get ( 'key_file' , None ) , arg_4 = arg_4 , api_version = arg_2 . get ( 'api_version' , 'v1' ) ) else : try : arg_5 = get_google_client ( mod_name = arg_0 , key_file = arg_2 . get ( 'key_file' , None ) , arg_4 = arg_4 , api_version = arg_2 . get ( 'api_version' , 'v1' ) ) except Exception as e : raise e return arg_3 , arg_5

Discard deposit changes.

        #. The signal :data:`invenio_records.signals.before_record_update` is
            sent before the edit execution.

        #. It restores the last published version.

        #. The following meta information are saved inside the deposit:

        .. code-block:: python

            deposit['$schema'] = deposit_schema_from_record_schema

        #. The signal :data:`invenio_records.signals.after_record_update` is
            sent after the edit execution.

        #. The deposit index is updated.

        Status required: ``'draft'``.

        :param pid: Force a pid object. (Default: ``None``)
        :returns: A new Deposit object.


Question: Retrieve items from query

def Func ( arg_0 , arg_1 ) : assert isinstance ( arg_1 , dict ) , "expected cursor type 'dict'" arg_2 = arg_0 . get_query ( ) assert isinstance ( arg_2 , peewee . Query ) arg_2 return arg_2 . get ( ** arg_1 )


Question: Submit a GitHub GraphQL query from a file .

def Func ( arg_0 , arg_1 , arg_2 = { } , arg_3 = 0 , ** arg_4 ) : arg_5 = arg_0 . _readGQL ( arg_1 , verbose = ( arg_3 >= 0 ) ) return arg_0 . queryGitHub ( arg_5 , arg_2 = arg_2 , arg_3 = arg_3 , ** arg_4 )

Remove all binary files in the adslib directory.


Question: Takes a subscription sequence id and removes the subscription from the client optionally after receiving more than max_msgs .

def Func ( arg_0 , arg_1 , arg_2 = 0 ) : if arg_0 . is_closed : raise ErrConnectionClosed if arg_0 . is_draining : raise ErrConnectionDraining arg_0 . _remove_sub ( arg_1 , arg_2 ) if not arg_0 . is_reconnecting : yield from arg_0 . auto_Func ( arg_1 , arg_2 )

Writes `self.cfg` to `self.config_file`.


Question: Summarizes policy states for the resources under the management group .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = False , ** arg_5 ) : arg_6 = None if arg_2 is not None : arg_6 = arg_2 . top arg_7 = None if arg_2 is not None : arg_7 = arg_2 . from_property arg_8 = None if arg_2 is not None : arg_8 = arg_2 . to arg_9 = None if arg_2 is not None : arg_9 = arg_2 . filter arg_10 = arg_0 . Func . metadata [ 'url' ] arg_11 = { 'policyStatesSummaryResource' : arg_0 . _serialize . url ( "self.policy_states_summary_resource" , arg_0 . policy_states_summary_resource , 'str' ) , 'managementGroupsNamespace' : arg_0 . _serialize . url ( "self.management_groups_namespace" , arg_0 . management_groups_namespace , 'str' ) , 'managementGroupName' : arg_0 . _serialize . url ( "management_group_name" , arg_1 , 'str' ) } arg_10 = arg_0 . _client . format_url ( arg_10 , ** arg_11 ) arg_12 = { } arg_12 [ 'api-version' ] = arg_0 . _serialize . query ( "self.api_version" , arg_0 . api_version , 'str' ) if arg_6 is not None : arg_12 [ '$top' ] = arg_0 . _serialize . query ( "top" , arg_6 , 'int' , minimum = 0 ) if arg_7 is not None : arg_12 [ '$from' ] = arg_0 . _serialize . query ( "from_parameter" , arg_7 , 'iso-8601' ) if arg_8 is not None : arg_12 [ '$to' ] = arg_0 . _serialize . query ( "to" , arg_8 , 'iso-8601' ) if arg_9 is not None : arg_12 [ '$filter' ] = arg_0 . _serialize . query ( "filter" , arg_9 , 'str' ) arg_13 = { } arg_13 [ 'Accept' ] = 'application/json' if arg_0 . config . generate_client_request_id : arg_13 [ 'x-ms-client-request-id' ] = str ( uuid . uuid1 ( ) ) if arg_3 : arg_13 . update ( arg_3 ) if arg_0 . config . accept_language is not None : arg_13 [ 'accept-language' ] = arg_0 . _serialize . header ( "self.config.accept_language" , arg_0 . config . accept_language , 'str' ) arg_14 = arg_0 . _client . post ( arg_10 , arg_12 , arg_13 ) arg_15 = arg_0 . _client . send ( arg_14 , stream = False , ** arg_5 ) if arg_15 . status_code not in [ 200 ] : raise models . QueryFailureException ( arg_0 . _deserialize , arg_15 ) arg_16 = None if arg_15 . status_code == 200 : arg_16 = arg_0 . _deserialize ( 'SummarizeResults' , arg_15 ) if arg_4 : arg_17 = ClientRawResponse ( arg_16 , arg_15 ) return arg_17 return arg_16

Return True if we should retry, False otherwise.


Question: Make phylip and nexus formats . This is hackish since I m recycling the code whole - hog from pyrad V3 . Probably could be good to go back through and clean up the conversion code some time .

def Func ( arg_0 , arg_1 ) : arg_2 = max ( [ len ( i ) for i in arg_0 . samples . keys ( ) ] ) arg_3 = [ i . name for i in arg_1 ] arg_4 = Funcphy ( arg_0 , arg_1 , arg_2 ) Funcnex ( arg_0 , arg_3 , arg_2 , arg_4 )

Waits until TransferFuture is done and returns the result

        If the TransferFuture succeeded, it will return the result. If the
        TransferFuture failed, it will raise the exception associated to the
        failure.


Question: Recognizes and claims Strelka VCFs form the set of all input VCFs .

def Func ( arg_0 , arg_1 ) : ( arg_2 , arg_3 ) = arg_0 . _find_strelka_files ( arg_1 ) arg_4 = arg_0 . _split_prefix_by_patient ( arg_2 ) arg_0 . _validate_vcf_readers ( arg_4 ) arg_5 = arg_0 . _create_vcf_readers ( arg_2 ) return ( arg_3 , arg_5 )

The factory method to create WebDriverResult from JSON Object.

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


Question: get a collection if it exists otherwise return None .

def Func ( arg_0 , arg_1 ) : from sregistry . database . models import Collection return Collection . query . filter ( Collection . name == arg_1 ) . first ( )

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

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


Question: Converts in_file to out_file guessing datatype in the absence of in_fmt and out_fmt .

def Func ( arg_0 , arg_1 , arg_2 = "" , arg_3 = "" ) : arg_0 = os . path . expanduser ( arg_0 ) arg_1 = os . path . expanduser ( arg_1 ) if not os . path . exists ( arg_0 ) : raise IOError ( "Input file {0} does not exist, stopping..." . format ( arg_0 ) ) arg_2 = arg_2 . lower ( ) or _guess_format_from_extension ( arg_0 . split ( '.' ) [ - 1 ] . lower ( ) ) arg_3 = arg_3 . lower ( ) or _guess_format_from_extension ( arg_1 . split ( '.' ) [ - 1 ] . lower ( ) ) if not arg_2 or not arg_3 : raise ValueError ( "Cannot determine conversion formats." ) return False if arg_2 is arg_3 : shutil . copyfileobj ( arg_0 , arg_1 ) return arg_1 if arg_2 == 'hdf5' : from . import hdf5 arg_4 = hdf5 . load ( arg_0 ) elif arg_2 == 'tiff' : from . import tiff arg_4 = tiff . load ( arg_0 ) elif arg_2 == 'png' : from . import png arg_4 = png . load ( arg_0 ) else : return _fail_pair_conversion ( arg_2 , arg_3 ) if arg_3 == 'hdf5' : from . import hdf5 return hdf5 . save ( arg_1 , arg_4 ) elif arg_3 == 'tiff' : from . import tiff return tiff . save ( arg_1 , arg_4 ) elif arg_3 == 'png' : from . import png return png . export_png ( arg_1 , arg_4 ) else : return _fail_pair_conversion ( arg_2 , arg_3 ) return _fail_pair_conversion ( arg_2 , arg_3 )

Updates a value of a given key and apply reduction


Question: Like assert_all_finite but only for ndarray .

def Func ( arg_0 ) : arg_0 = np . asanyarray ( arg_0 ) if ( arg_0 . dtype . char in np . typecodes [ 'AllFloat' ] and not np . isfinite ( arg_0 . sum ( ) ) and not np . isfinite ( arg_0 ) . all ( ) ) : raise ValueError ( "Input contains NaN, infinity" " or a value too large for %r." % arg_0 . dtype )

Update the profile picture for the current user.

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


Question: Build a record - view event .

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , ** arg_4 ) : arg_0 . update ( dict ( timestamp = datetime . datetime . utcnow ( ) . isoformat ( ) , record_id = str ( arg_3 . id ) , pid_type = arg_2 . pid_type , pid_value = str ( arg_2 . pid_value ) , referrer = request . referrer , ** get_user ( ) ) ) return arg_0


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

def Func ( arg_0 ) : Func = np . divide ( arg_0 . image , arg_0 . noise_map ) Func [ Func < 0 ] = 0 return Func


Question: Get the current position in the music in seconds

def Func ( arg_0 ) -> float : if arg_0 . paused : return arg_0 . pause_time return mixer . music . get_pos ( ) / 1000.0

Restricts a function in n-dimensions to a given direction.

  Suppose f: R^n -> R. Then given a point x0 and a vector p0 in R^n, the
  restriction of the function along that direction is defined by:

  ```None
  g(t) = f(x0 + t * p0)
  ```

  This function performs this restriction on the given function. In addition, it
  also computes the gradient of the restricted function along the restriction
  direction. This is equivalent to computing `dg/dt` in the definition above.

  Args:
    value_and_gradients_function: Callable accepting a single real `Tensor`
      argument of shape `[..., n]` and returning a tuple of a real `Tensor` of
      shape `[...]` and a real `Tensor` of shape `[..., n]`. The multivariate
      function whose restriction is to be computed. The output values of the
      callable are the function value and the gradients at the input argument.
    position: `Tensor` of real dtype and shape consumable by
      `value_and_gradients_function`. Corresponds to `x0` in the definition
      above.
    direction: `Tensor` of the same dtype and shape as `position`. The direction
      along which to restrict the function. Note that the direction need not
      be a unit vector.

  Returns:
    restricted_value_and_gradients_func: A callable accepting a tensor of shape
      broadcastable to `[...]` and same dtype as `position` and returning a
      namedtuple of `Tensors`. The input tensor is the parameter along the
      direction labelled `t` above. The return value contains fields:
        x: A real `Tensor` of shape `[...]`. The input value `t` where the line
          function was evaluated, after any necessary broadcasting.
        f: A real `Tensor` of shape `[...]` containing the value of the
          function at the point `position + t * direction`.
        df: A real `Tensor` of shape `[...]` containing the derivative at
          `position + t * direction`.
        full_gradient: A real `Tensor` of shape `[..., n]`, the full gradient
          of the original `value_and_gradients_function`.


Question: Special handling if record is a CMS NOTE .

def Func ( arg_0 ) : arg_1 = record_get_field_values ( arg_0 . record , '690' , filter_subfield_code = "a" , filter_subfield_value = 'INTNOTE' ) if arg_1 : arg_2 = record_get_field_values ( arg_0 . record , tag = '088' , filter_subfield_code = "a" ) for arg_3 in arg_2 : if 'CMS' in arg_3 : arg_4 = ( 'http://weblib.cern.ch/abstract?CERN-CMS' + arg_3 . split ( 'CMS' , 1 ) [ - 1 ] ) record_add_field ( arg_0 . record , tag = '856' , ind1 = '4' , subfields = [ ( 'u' , arg_4 ) ] )


Question: Rescale numeric vector to have specified minimum midpoint and maximum .

def Func ( arg_0 , arg_1 = ( 0 , 1 ) , arg_2 = None , arg_3 = 0 ) : arg_4 = True try : len ( arg_0 ) except TypeError : arg_4 = False arg_0 = [ arg_0 ] if not hasattr ( arg_0 , 'dtype' ) : arg_0 = np . asarray ( arg_0 ) if arg_2 is None : arg_2 = np . array ( [ np . min ( arg_0 ) , np . max ( arg_0 ) ] ) else : arg_2 = np . asarray ( arg_2 ) if ( zero_range ( arg_2 ) or zero_range ( arg_1 ) ) : arg_5 = np . repeat ( np . mean ( arg_1 ) , len ( arg_0 ) ) else : arg_6 = 2 * np . max ( np . abs ( arg_2 - arg_3 ) ) arg_5 = ( arg_0 - arg_3 ) / arg_6 * np . diff ( arg_1 ) + np . mean ( arg_1 ) if not arg_4 : arg_5 = arg_5 [ 0 ] return arg_5

Remove all binary files in the adslib directory.


Question: Write data to blimpy file .

def Func ( arg_0 , arg_1 ) : print ( "[Filterbank] Warning: Non-standard function to write in filterbank (.fil) format. Please use Waterfall." ) arg_2 = int ( arg_0 . header [ b'nbits' ] / 8 ) with open ( arg_1 , "wb" ) as fileh : fileh . write ( generate_sigproc_header ( arg_0 ) ) arg_3 = arg_0 . data if arg_2 == 4 : np . float32 ( arg_3 . ravel ( ) ) . tofile ( fileh ) elif arg_2 == 2 : np . int16 ( arg_3 . ravel ( ) ) . tofile ( fileh ) elif arg_2 == 1 : np . int8 ( arg_3 . ravel ( ) ) . tofile ( fileh )


Question: Returns a set of all ABUNDANCE nodes that have an causal out - degree of 0 .

def Func ( arg_0 : arg_1 , arg_2 ) -> Set [ BaseEntity ] : return { arg_3 for arg_3 in arg_0 if arg_3 . function == arg_2 and is_causal_sink ( arg_0 , arg_3 ) }

Return file-like object for 'member'.

           'member' may be a filename or a RarInfo object.


Question: Remove the given notification template .

def Func ( arg_0 , arg_1 = None , arg_2 = False , ** arg_3 ) : arg_0 . _separate ( arg_3 ) return super ( Resource , arg_0 ) . Func ( arg_1 = arg_1 , arg_2 = arg_2 , ** arg_3 )

Sleep for the time specified in the exception. If not specified, wait
        for 60 seconds.


Question: Add the currently tested element into the database .

def Func ( arg_0 ) : if arg_0 . _authorization ( ) : if arg_0 . epoch < int ( arg_2 . time ( ) ) : arg_1 = "past" else : arg_1 = "future" if arg_0 . is_in_database ( ) : if ( str ( arg_0 . epoch ) != arg_2 . INTERN [ "whois_db" ] [ arg_2 . INTERN [ "file_to_test" ] ] [ arg_2 . INTERN [ "to_test" ] ] [ "epoch" ] ) : arg_2 . INTERN [ "whois_db" ] [ arg_2 . INTERN [ "file_to_test" ] ] [ arg_2 . INTERN [ "to_test" ] ] . update ( { "epoch" : str ( arg_0 . epoch ) , "state" : arg_1 , "expiration_date" : arg_0 . expiration_date , } ) elif arg_0 . is_time_older ( ) : if ( arg_2 . INTERN [ "whois_db" ] [ arg_2 . INTERN [ "file_to_test" ] ] [ arg_2 . INTERN [ "to_test" ] ] [ "state" ] != "past" ) : arg_2 . INTERN [ "whois_db" ] [ arg_2 . INTERN [ "file_to_test" ] ] [ arg_2 . INTERN [ "to_test" ] ] . update ( { "state" : "past" } ) elif ( arg_2 . INTERN [ "whois_db" ] [ arg_2 . INTERN [ "file_to_test" ] ] [ arg_2 . INTERN [ "to_test" ] ] [ "state" ] != "future" ) : arg_2 . INTERN [ "whois_db" ] [ arg_2 . INTERN [ "file_to_test" ] ] [ arg_2 . INTERN [ "to_test" ] ] . update ( { "state" : "future" } ) else : if ( not arg_2 . INTERN [ "file_to_test" ] in arg_2 . INTERN [ "whois_db" ] ) : arg_2 . INTERN [ "whois_db" ] [ arg_2 . INTERN [ "file_to_test" ] ] = { } arg_2 . INTERN [ "whois_db" ] [ arg_2 . INTERN [ "file_to_test" ] ] . update ( { arg_2 . INTERN [ "to_test" ] : { "epoch" : str ( arg_0 . epoch ) , "state" : arg_1 , "expiration_date" : arg_0 . expiration_date , } } ) arg_0 . _backup ( )

Downloads a MP4 or WebM file that is associated with the video at the URL passed.

        :param str url: URL of the video to be downloaded
        :return str: Filename of the file in local storage


Question: Set the node of the item .

def Func ( arg_0 , arg_1 ) : if arg_1 is None : if arg_0 . xmlnode . hasProp ( "node" ) : arg_0 . xmlnode . unsetProp ( "node" ) return arg_1 = unicode ( arg_1 ) arg_0 . xmlnode . setProp ( "node" , arg_1 . encode ( "utf-8" ) )

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: Build a file model from database record .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = to_api_path ( arg_1 [ 'parent_name' ] + arg_1 [ 'name' ] ) arg_5 = base_model ( arg_4 ) arg_5 [ 'type' ] = 'file' arg_5 [ 'last_modified' ] = arg_5 [ 'created' ] = arg_1 [ 'created_at' ] if arg_2 : arg_6 = arg_1 [ 'content' ] arg_5 [ 'content' ] , arg_5 [ 'format' ] , arg_5 [ 'mimetype' ] = from_b64 ( arg_4 , arg_6 , arg_3 , ) return arg_5

Whether a connection can be established between those two meshes.


Question: Yield the inverse items of the provided object .

def Func ( arg_0 ) : arg_1 = getattr ( arg_0 , '__Func__' , None ) if callable ( arg_1 ) : return arg_1 ( ) return ( ( arg_3 , arg_2 ) for ( arg_2 , arg_3 ) in _iteritems_mapping_or_iterable ( arg_0 ) )

This is a parallel worker for running period-recovery.

    Parameters
    ----------

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

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

    Returns
    -------

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


Question: Creates the Nginx configuration for the project

def Func ( arg_0 ) : arg_1 = '# nginx config for {0}\n' . format ( arg_0 . _project_name ) if not arg_0 . _shared_hosting : if arg_0 . _user : arg_1 += 'user {0};\n' . format ( arg_0 . _user ) arg_1 += 'worker_processes 1;\nerror_log {0}-errors.log;\n\pid {1}_    nginx.pid;\n\n' . format ( os . path . join ( arg_0 . _log_dir , arg_0 . _project_name ) , os . path . join ( arg_0 . _var_dir , arg_0 . _project_name ) ) arg_1 += 'events {\n\tworker_connections 32;\n}\n\n' arg_1 += 'http {\n' if arg_0 . _include_mimetypes : arg_1 += '\tinclude mime.types;\n' arg_1 += '\tdefault_type application/octet-stream;\n' arg_1 += '\tclient_max_body_size 1G;\n' arg_1 += '\tproxy_max_temp_file_size 0;\n' arg_1 += '\tproxy_buffering off;\n' arg_1 += '\taccess_log {0}-access.log;\n' . format ( os . path . join ( arg_0 . _log_dir , arg_0 . _project_name ) ) arg_1 += '\tsendfile on;\n' arg_1 += '\tkeepalive_timeout 65;\n' arg_1 += '\tserver {\n' arg_1 += '\t\tlisten 0.0.0.0:{0};\n' . format ( arg_0 . _port ) if arg_0 . _server_name : arg_1 += '\t\tserver_name {0};\n' . format ( arg_0 . _server_name ) arg_1 += '\t\tlocation / {\n' arg_1 += '\t\t\tuwsgi_pass unix:///{0}.sock;\n' . format ( os . path . join ( arg_0 . _var_dir , arg_0 . _project_name ) ) arg_1 += '\t\t\tinclude uwsgi_params;\n' arg_1 += '\t\t}\n\n' arg_1 += '\t\terror_page 500 502 503 504 /50x.html;\n' arg_1 += '\t\tlocation = /50x.html {\n' arg_1 += '\t\t\troot html;\n' arg_1 += '\t\t}\n' arg_1 += '\t}\n' if not arg_0 . _shared_hosting : arg_1 += '}\n' arg_2 = open ( arg_0 . _nginx_config , 'w' ) arg_2 . write ( arg_1 ) arg_2 . close ( )

Return an existing or new ConversationWidget.


Question: Returns next element from chain .

def Func ( arg_0 ) : while True : try : return Func ( arg_0 . _current ) except StopIteration : try : arg_0 . _current = iter ( arg_0 . _chain . popleft ( ) ) except IndexError : raise StopIteration ( 'Reached end of iterator chain' )

Primitive string formatter.

        The only directives understood are the following:
          ============   ==========================
          Directive      meaning
          ============   ==========================
          %d             day as integer
          %H             hour  [00-23]
          %h             hours including days
          %M             minute as integer [00-59]
          %S             second as integer [00-59]
          ============   ==========================


Question: Validate subscription policy value .

def Func ( arg_0 , arg_1 ) : return arg_1 in [ arg_0 . OPEN , arg_0 . APPROVAL , arg_0 . CLOSED ]

this factory also requires the editor token


Question: Process the notebook and create all the pictures and files

def Func ( arg_0 , arg_1 = True ) : arg_2 = arg_0 . infile arg_3 = arg_0 . outfile arg_4 = os . path . dirname ( arg_2 ) + os . path . sep arg_5 = os . path . dirname ( arg_3 ) + os . path . sep create_dirs ( os . path . join ( arg_5 , 'images' ) ) arg_6 = nbconvert . preprocessors . ExecutePreprocessor ( timeout = 300 ) arg_7 = nbconvert . preprocessors . ClearOutputPreprocessor ( timeout = 300 ) arg_0 . nb = arg_8 = nbformat . read ( arg_2 , nbformat . current_nbformat ) if arg_1 : for arg_9 , arg_10 in enumerate ( arg_8 . cells ) : if arg_10 [ 'cell_type' ] == 'code' : arg_10 = arg_10 . copy ( ) break arg_10 = arg_10 . copy ( ) arg_10 . source = """import logginglogging.captureWarnings(True)logging.getLogger('py.warnings').setLevel(logging.ERROR)""" arg_8 . cells . insert ( arg_9 , arg_10 ) if arg_0 . preprocess : arg_12 = dt . datetime . now ( ) logger . info ( 'Processing %s' , arg_0 . infile ) try : arg_6 . preprocess ( arg_8 , { 'metadata' : { 'path' : arg_4 } } ) except nbconvert . preprocessors . execute . CellExecutionError : logger . critical ( 'Error while processing %s!' , arg_0 . infile , exc_info = True ) else : logger . info ( 'Done. Seconds needed: %i' , ( dt . datetime . now ( ) - arg_12 ) . seconds ) if arg_1 : arg_8 . cells . pop ( arg_9 ) arg_0 . py_file = arg_0 . get_out_file ( 'py' ) if arg_0 . remove_tags : arg_14 = nbconvert . preprocessors . TagRemovePreprocessor ( timeout = 300 ) for arg_15 , arg_16 in arg_0 . tag_options . items ( ) : setattr ( arg_14 , arg_15 , set ( arg_16 ) ) arg_17 = deepcopy ( arg_8 ) arg_14 . preprocess ( arg_17 , { 'metadata' : { 'path' : arg_4 } } ) else : arg_17 = arg_8 arg_0 . create_rst ( arg_17 , arg_4 , arg_5 ) if arg_0 . clear : arg_7 . preprocess ( arg_8 , { 'metadata' : { 'path' : arg_4 } } ) nbformat . write ( arg_8 , arg_3 ) arg_0 . create_py ( arg_8 )

Gets predictions for a given utterance, in the form of intents and
        entities. The current maximum query size is 500 characters.

        :param app_id: The LUIS application ID (Guid).
        :type app_id: str
        :param query: The utterance to predict.
        :type query: str
        :param timezone_offset: The timezone offset for the location of the
         request.
        :type timezone_offset: float
        :param verbose: If true, return all intents instead of just the top
         scoring intent.
        :type verbose: bool
        :param staging: Use the staging endpoint slot.
        :type staging: bool
        :param spell_check: Enable spell checking.
        :type spell_check: bool
        :param bing_spell_check_subscription_key: The subscription key to use
         when enabling Bing spell check
        :type bing_spell_check_subscription_key: str
        :param log: Log query (default is true)
        :type log: bool
        :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: LuisResult or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.language.luis.runtime.models.LuisResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.language.luis.runtime.models.APIErrorException>`


Question: Return double precision mdrun or fall back to single precision .

def Func ( ) : try : gromacs . mdrun_d ( h = True , stdout = False , stderr = False ) logger . debug ( "using double precision gromacs.mdrun_d" ) return gromacs . mdrun_d except ( AttributeError , GromacsError , OSError ) : arg_0 = "No 'mdrun_d' binary found so trying 'mdrun' instead.\n" "(Note that energy minimization runs better with mdrun_d.)" logger . warn ( arg_0 ) warnings . warn ( arg_0 , category = AutoCorrectionWarning ) return gromacs . mdrun

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


Question: Decorator function which can be used to make Python multi functions .

def Func ( arg_0 : arg_1 , arg_2 = None ) -> MultiFunction [ T ] : arg_3 = sym . symbol ( arg_0 . __qualname__ , ns = arg_0 . __module__ ) return MultiFunction ( arg_3 , arg_0 , arg_2 )

Sets the review comment. Raises CardinalityError if
        already set. OrderError if no reviewer defined before.


Question: Count how many folders in this directory . Including folder in sub folder .

def Func ( arg_0 ) : arg_0 . assert_is_dir_and_exists ( ) arg_1 = 0 for arg_2 in arg_0 . select_dir ( recursive = True ) : arg_1 += 1 return arg_1

Sleep for the time specified in the exception. If not specified, wait
        for 60 seconds.


Question: Cancel a Regular or Plain - Text Campaign after you send before all of your recipients receive it . This feature is included with MailChimp Pro .

def Func ( arg_0 , arg_1 ) : arg_0 . campaign_id = arg_1 return arg_0 . _mc_client . _post ( url = arg_0 . _build_path ( arg_1 , 'actions/Func-send' ) )

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


Question: Set the autoindent flag checking for readline support .

def Func ( arg_0 , arg_1 = None ) : if arg_1 != 0 and not arg_0 . has_readline : if os . name == 'posix' : warn ( "The auto-indent feature requires the readline library" ) arg_0 . autoindent = 0 return if arg_1 is None : arg_0 . autoindent = not arg_0 . autoindent else : arg_0 . autoindent = arg_1


Question: Create Elasticsearch indexes

def Func ( arg_0 , arg_1 = None ) : for arg_2 in arg_0 : arg_3 = Index ( arg_2 ) try : if not arg_3 . exists ( ) : logger . debug ( "Creating Elasticsearch index: {0}" . format ( arg_2 ) ) if arg_1 is None : arg_3 . settings ( number_of_shards = 1 , number_of_replicas = 1 ) else : arg_3 . settings ( ** arg_1 ) arg_3 . create ( ) except Exception as e : raise ElasticsearchError ( "Elasticsearch error: {0}" . format ( e . __str__ ( ) ) )


Question: Lists all available versions of a model . Blocks until finished .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] arg_4 = 'projects/{}/models/{}' . format ( arg_1 , arg_2 ) arg_5 = arg_0 . _mlengine . projects ( ) . models ( ) . versions ( ) . list ( parent = arg_4 , pageSize = 100 ) arg_6 = arg_5 . execute ( ) arg_7 = arg_6 . get ( 'nextPageToken' , None ) arg_3 . extend ( arg_6 . get ( 'versions' , [ ] ) ) while arg_7 is not None : arg_8 = arg_0 . _mlengine . projects ( ) . models ( ) . versions ( ) . list ( parent = arg_4 , pageToken = arg_7 , pageSize = 100 ) arg_6 = arg_8 . execute ( ) arg_7 = arg_6 . get ( 'nextPageToken' , None ) arg_3 . extend ( arg_6 . get ( 'versions' , [ ] ) ) time . sleep ( 5 ) return arg_3

Set the rotation of this body using a rotation matrix.

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


Question: Returns the dictionary of CORS specific app configurations .

def Func ( arg_0 = None ) : arg_1 = ( arg_0 or current_app ) arg_2 = getattr ( arg_1 , 'config' , { } ) return { arg_3 . lower ( ) . replace ( 'cors_' , '' ) : arg_2 . get ( arg_3 ) for arg_3 in CONFIG_OPTIONS if arg_2 . get ( arg_3 ) is not None }

Regenerates the primary or secondary access key for the specified
        storage account.

        service_name:
            Name of the storage service account.
        key_type:
            Specifies which key to regenerate. Valid values are:
            Primary, Secondary


Question: Join prefixes & suffixes in cases of alternate phonetic values .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . find ( '(' ) if arg_2 == - 1 : return ' ' + arg_0 . _phonetic_number ( arg_1 ) arg_3 = arg_1 [ : arg_2 ] arg_2 += 1 arg_4 = arg_1 . find ( ')' , arg_2 ) arg_5 = arg_1 [ arg_2 : arg_4 ] arg_4 += 1 arg_6 = arg_1 [ arg_4 : ] arg_7 = arg_5 . split ( '|' ) arg_8 = '' for arg_9 in arg_7 : arg_8 += arg_0 . Func ( arg_3 + arg_9 + arg_6 ) return arg_8

activates error messages, useful during development


Question: Actual closing code both from manual close and errors .

def Func ( arg_0 , arg_1 = None ) : arg_0 . _closing = True arg_0 . pause_reading ( ) arg_0 . _loop . call_soon ( arg_0 . _call_connection_lost , arg_1 )

Checks to see if Spark worker and HDFS datanode are still running.


Question: Retrieves the instance name associated with the current host string .

def Func ( ) : if env . vm_type == EC2 : for arg_0 in get_all_running_ec2_instances ( ) : if env . host_string == arg_0 . public_dns_name : arg_1 = arg_0 . tags . get ( env . vm_name_tag ) return arg_1 else : raise NotImplementedError

Decode the data passed in and potentially flush the decoder.


Question: Sends the DELETE request to the Route53 endpoint .

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = requests . delete ( arg_0 . endpoint + arg_1 , arg_2 = arg_2 ) return arg_3 . text

Handle marking messages as read and keeping client active.


Question: dump command dumps things

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = parse_env_config ( arg_1 , arg_2 . environment ) arg_4 = arg_3 . get ( 'option_settings' , { } ) arg_5 = parse_option_settings ( arg_4 ) for arg_6 in arg_5 : out ( str ( arg_6 ) )

Call the segmenter in order to split text in sentences.

        Args:
            text (str): Text to be segmented.

        Returns:
            dict, int: A dict containing a list of dicts with the offsets of
                each sentence; an integer representing the response code.


Question: Creates a LinearOperator representing a lower triangular matrix .

def Func ( arg_0 = None , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = False , arg_6 = False , arg_7 = None ) : def _maybe_attach_assertion ( arg_8 ) : if not arg_5 : return arg_8 if arg_6 : return with_dependencies ( [ assert_util . assert_positive ( tf . linalg . diag_part ( arg_8 ) , message = "diagonal part must be positive" ) , ] , arg_8 ) return with_dependencies ( [ assert_util . assert_none_equal ( tf . linalg . diag_part ( arg_8 ) , tf . zeros ( [ ] , arg_8 . dtype ) , message = "diagonal part must be non-zero" ) , ] , arg_8 ) with tf . name_scope ( arg_7 or "Func" ) : arg_9 = dtype_util . common_dtype ( [ arg_0 , arg_1 , arg_2 , arg_3 ] , preferred_dtype = tf . float32 ) arg_0 = _convert_to_tensor ( arg_0 , arg_7 = "loc" , arg_9 = arg_9 ) arg_1 = _convert_to_tensor ( arg_1 , arg_7 = "scale_tril" , arg_9 = arg_9 ) arg_2 = _convert_to_tensor ( arg_2 , arg_7 = "scale_diag" , arg_9 = arg_9 ) arg_3 = _convert_to_tensor ( arg_3 , arg_7 = "scale_identity_multiplier" , arg_9 = arg_9 ) if arg_1 is not None : arg_1 = tf . linalg . band_part ( arg_1 , - 1 , 0 ) arg_10 = tf . linalg . diag_part ( arg_1 ) if arg_2 is not None : arg_10 += arg_2 if arg_3 is not None : arg_10 += arg_3 [ ... , tf . newaxis ] arg_1 = tf . linalg . set_diag ( arg_1 , arg_10 ) return tf . linalg . LinearOperatorLowerTriangular ( tril = _maybe_attach_assertion ( arg_1 ) , is_non_singular = True , is_self_adjoint = False , is_positive_definite = arg_6 ) return make_diag_scale ( arg_0 = arg_0 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_6 = arg_6 , arg_7 = arg_7 )

Process data to produce velocity and dropout information.


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

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

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


Question: Delete group .

def Func ( arg_0 ) : arg_1 = Group . query . get_or_404 ( arg_0 ) if arg_1 . can_edit ( current_user ) : try : arg_1 . Func ( ) except Exception as e : flash ( str ( e ) , "error" ) return redirect ( url_for ( ".index" ) ) flash ( _ ( 'Successfully removed group "%(group_name)s"' , group_name = arg_1 . name ) , 'success' ) return redirect ( url_for ( ".index" ) ) flash ( _ ( 'You cannot Func the group %(group_name)s' , group_name = arg_1 . name ) , 'error' ) return redirect ( url_for ( ".index" ) )


Question: Send discover .

def Func ( arg_0 ) : assert arg_0 . client assert arg_0 . current_state == STATE_INIT or arg_0 . current_state == STATE_SELECTING arg_1 = arg_0 . client . gen_discover ( ) sendp ( arg_1 ) if arg_0 . discover_attempts < MAX_ATTEMPTS_DISCOVER : arg_0 . discover_attempts += 1 arg_2 = gen_timeout_resend ( arg_0 . discover_attempts ) arg_0 . set_timeout ( arg_0 . current_state , arg_0 . timeout_selecting , arg_2 )


Question: Function to create variadic operator function

def Func ( arg_0 ) : def op ( * arg_1 , arg_2 = None ) -> RtlSignalBase : assert arg_1 , arg_1 arg_3 = None if arg_2 is not None : arg_1 = map ( arg_2 , arg_1 ) for arg_4 in arg_1 : if arg_3 is None : arg_3 = arg_4 else : arg_3 = arg_0 ( arg_3 , arg_4 ) return arg_3 return op

Returns opened file object for writing dialog logs.

        Returns:
            log_file: opened Python file object.


Question: Returns a single message activity containing an attachment .

def Func ( Func : arg_1 , arg_2 : arg_3 = None , arg_4 : arg_3 = None , arg_5 : arg_6 [ arg_7 , arg_3 ] = None ) : return attachment_activity ( AttachmentLayoutTypes . list , [ Func ] , arg_2 , arg_4 , arg_5 )

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: Handle typing updates .

def Func ( arg_0 , arg_1 ) : arg_0 . _typing_statuses [ arg_1 . user_id ] = arg_1 . status arg_0 . _update ( )

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


Question: Removes the file with the virtual column etc it does not change the current virtual columns etc .

def Func ( arg_0 ) : arg_1 = arg_0 . get_private_dir ( create = True ) arg_2 = os . path . join ( arg_1 , "virtual_meta.yaml" ) try : if os . path . exists ( arg_2 ) : os . remove ( arg_2 ) if not os . listdir ( arg_1 ) : os . rmdir ( arg_1 ) except : logger . exception ( "error while trying to remove %s or %s" , arg_2 , arg_1 )

Gets the fuel prices for a specific fuel station.


Question: Pre - process an STR variant entry for detail page .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 , arg_5 = institute_and_case ( arg_0 , arg_1 , arg_2 ) arg_6 = arg_0 . variant ( arg_3 ) variant_case ( arg_0 , arg_5 , arg_6 ) arg_6 [ 'callers' ] = callers ( arg_6 , category = 'str' ) arg_6 [ 'comments' ] = arg_0 . events ( arg_4 , case = arg_5 , arg_3 = arg_6 [ 'variant_id' ] , comments = True ) return { 'institute' : arg_4 , 'case' : arg_5 , 'variant' : arg_6 , 'overlapping_snvs' : overlapping_snvs , 'manual_rank_options' : MANUAL_RANK_OPTIONS , 'dismiss_variant_options' : DISMISS_VARIANT_OPTIONS }

Checks if a Pong message was received.

        :return:


Question: Box volume in m^3 .

def Func ( arg_0 ) : return ( arg_0 . x2 - arg_0 . x1 ) * ( arg_0 . y2 - arg_0 . y1 ) * ( arg_0 . z2 - arg_0 . z1 )

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: Runs either SNP or INDEL variant quality score recalibration using GATK VariantRecalibrator . Because the VQSR method models SNPs and INDELs differently VQSR must be run separately for these variant types .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 , arg_6 , arg_7 = None , arg_8 = None , arg_9 = None , arg_10 = None , arg_11 = None , arg_12 = 4 , arg_13 = False ) : arg_1 = arg_1 . upper ( ) arg_14 = { 'genome.fa' : arg_3 , 'genome.fa.fai' : arg_4 , 'genome.dict' : arg_5 , 'input.vcf' : arg_2 } arg_15 = [ '-T' , 'VariantRecalibrator' , '-R' , 'genome.fa' , '-input' , 'input.vcf' , '-tranche' , '100.0' , '-tranche' , '99.9' , '-tranche' , '99.0' , '-tranche' , '90.0' , '--maxGaussians' , str ( arg_12 ) , '-recalFile' , 'output.recal' , '-tranchesFile' , 'output.tranches' , '-rscriptFile' , 'output.plots.R' ] if arg_1 == 'SNP' : arg_15 . extend ( [ '-resource:hapmap,known=false,training=true,truth=true,prior=15.0' , 'hapmap.vcf' , '-resource:omni,known=false,training=true,truth=true,prior=12.0' , 'omni.vcf' , '-resource:dbsnp,known=true,training=false,truth=false,prior=2.0' , 'dbsnp.vcf' , '-resource:1000G,known=false,training=true,truth=false,prior=10.0' , '1000G.vcf' , '-mode' , 'SNP' ] ) arg_14 [ 'hapmap.vcf' ] = arg_7 arg_14 [ 'omni.vcf' ] = arg_8 arg_14 [ 'dbsnp.vcf' ] = arg_10 arg_14 [ '1000G.vcf' ] = arg_9 elif arg_1 == 'INDEL' : arg_15 . extend ( [ '-resource:mills,known=false,training=true,truth=true,prior=12.0' , 'mills.vcf' , '-resource:dbsnp,known=true,training=false,truth=false,prior=2.0' , 'dbsnp.vcf' , '-mode' , 'INDEL' ] ) arg_14 [ 'mills.vcf' ] = arg_11 arg_14 [ 'dbsnp.vcf' ] = arg_10 else : raise ValueError ( 'Variant filter modes can be SNP or INDEL, got %s' % arg_1 ) for arg_16 in arg_6 : arg_15 . extend ( [ '-an' , arg_16 ] ) if arg_13 : arg_15 . extend ( [ '-U' , 'ALLOW_SEQ_DICT_INCOMPATIBILITY' ] ) arg_17 = arg_0 . fileStore . getLocalTempDir ( ) for arg_18 , arg_19 in arg_14 . iteritems ( ) : arg_0 . fileStore . readGlobalFile ( arg_19 , os . path . join ( arg_17 , arg_18 ) ) arg_0 . fileStore . logToMaster ( 'Running GATK VariantRecalibrator on {mode}s using the following annotations:\n' '{annotations}' . format ( arg_1 = arg_1 , arg_6 = '\n' . join ( arg_6 ) ) ) arg_20 = [ '--rm' , 'log-driver' , 'none' , '-e' , 'JAVA_OPTS=-Djava.io.tmpdir=/data/ -Xmx{}' . format ( arg_0 . memory ) ] dockerCall ( arg_0 = arg_0 , workDir = arg_17 , parameters = arg_15 , tool = 'quay.io/ucsc_cgl/gatk:3.5--dba6dae49156168a909c43330350c6161dc7ecc2' , dockerParameters = arg_20 ) arg_21 = arg_0 . fileStore . writeGlobalFile ( os . path . join ( arg_17 , 'output.recal' ) ) arg_22 = arg_0 . fileStore . writeGlobalFile ( os . path . join ( arg_17 , 'output.tranches' ) ) arg_23 = arg_0 . fileStore . writeGlobalFile ( os . path . join ( arg_17 , 'output.plots.R' ) ) return arg_21 , arg_22 , arg_23

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


Question: Converts a unit - length quaternion to a sequence of ZYZ Euler angles .


Question: Call API .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = None , arg_7 = None , ) : arg_1 = arg_1 . upper ( ) arg_3 = deepcopy ( arg_3 ) or { } arg_3 [ 'Accept' ] = arg_0 . accept_type arg_4 = deepcopy ( arg_4 ) or { } arg_5 = arg_5 or { } arg_6 = arg_6 or { } if arg_0 . username and arg_0 . api_key : arg_4 . update ( arg_0 . get_credentials ( ) ) arg_2 = urljoin ( arg_0 . base_url , arg_2 ) arg_8 = requests . request ( arg_1 , arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_6 = arg_6 , arg_5 = arg_5 , arg_7 = arg_7 , ) return arg_8 , arg_8 . status_code


Question: Load marker data from a C3D file .

def Func ( arg_0 , arg_1 , arg_2 = 0 , arg_3 = arg_4 ( 1e300 ) ) : import c3d with open ( arg_1 , 'rb' ) as handle : arg_5 = c3d . Reader ( handle ) logging . info ( 'world frame rate %s, marker frame rate %s' , 1 / arg_0 . world . dt , arg_5 . point_rate ) arg_0 . channels = arg_0 . _map_labels_to_channels ( [ s . strip ( ) for s in arg_5 . point_labels ] ) arg_7 = [ ] for arg_8 , ( arg_9 , arg_10 , arg_9 ) in enumerate ( arg_5 . read_frames ( ) ) : if arg_8 >= arg_2 : arg_7 . append ( arg_10 [ : , [ 0 , 1 , 2 , 4 ] ] ) if len ( arg_7 ) > arg_3 : break arg_0 . data = np . array ( arg_7 ) if arg_5 . get ( 'POINT:UNITS' ) . string_value . strip ( ) . lower ( ) == 'mm' : logging . info ( 'scaling point data from mm to m' ) arg_0 . data [ : , : , : 3 ] /= 1000. logging . info ( '%s: loaded marker data %s' , arg_1 , arg_0 . data . shape ) arg_0 . process_data ( ) arg_0 . create_bodies ( )


Question: Verifies the given signature matches the expected signature

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : return constant_time_compare ( arg_3 , arg_0 . get_signature ( arg_1 , arg_2 ) )

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


Question: It will download file specified by url using wget utility of linux

def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . split ( '/' ) [ - 1 ] print 'Downloading file %s ' % arg_2 arg_3 = 'wget -c --read-timeout=50 --tries=3 -q --show-progress --no-check-certificate ' arg_1 = '"' + arg_1 + '"' arg_3 = arg_3 + arg_1 os . system ( arg_3 )


Question: Construct an LsstLatexDoc instance by reading and parsing the LaTeX source .

def Func ( arg_0 , arg_1 ) : arg_2 = os . path . dirname ( arg_1 ) arg_3 = Func_tex_file ( arg_1 ) arg_4 = get_macros ( arg_3 ) arg_3 = replace_macros ( arg_3 , arg_4 ) return arg_0 ( arg_3 , arg_2 = arg_2 )

Retrieves the issues in the collection grouped into buckets according
        to the key generated by the keyfunc.

        :param keyfunc:
            a function that will be used to generate the key that identifies
            the group that an issue will be assigned to. This function receives
            a single tidypy.Issue argument and must return a string. If not
            specified, the filename of the issue will be used.
        :type keyfunc: func
        :param sortby: the properties to sort the issues by
        :type sortby: list(str)
        :rtype: OrderedDict


Question: The multiplication counter part of tf . nn . bias_add .

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 == 'NHWC' : return arg_0 * arg_1 elif arg_2 == 'NCHW' : return arg_0 * _to_channel_first_bias ( arg_1 ) else : raise ValueError ( 'invalid data_format: %s' % arg_2 )

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

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

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


Question: Get the context to render this widget with .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if arg_0 . has_template_widget_rendering : arg_4 = super ( ClearableFileInputWithImagePreview , arg_0 ) . Func ( arg_1 , arg_2 , arg_3 ) else : arg_4 = { } arg_4 [ 'widget' ] = { 'name' : arg_1 , 'is_hidden' : arg_0 . is_hidden , 'required' : arg_0 . is_required , 'value' : arg_0 . _format_value ( arg_2 ) , 'attrs' : arg_0 . build_attrs ( arg_0 . attrs , arg_3 ) , 'template_name' : arg_0 . template_name , 'type' : arg_0 . input_type , } arg_5 = arg_0 . clear_checkbox_name ( arg_1 ) arg_6 = arg_0 . clear_checkbox_id ( arg_5 ) arg_4 [ 'widget' ] . update ( { 'checkbox_name' : arg_5 , 'checkbox_id' : arg_6 , 'is_initial' : arg_0 . is_initial ( arg_2 ) , 'input_text' : arg_0 . input_text , 'initial_text' : arg_0 . initial_text , 'clear_checkbox_label' : arg_0 . clear_checkbox_label , } ) if arg_2 and hasattr ( arg_2 , "url" ) : arg_4 [ 'widget' ] . update ( { 'hidden_field_id' : arg_0 . get_hidden_field_id ( arg_1 ) , 'point_stage_id' : arg_0 . get_point_stage_id ( arg_1 ) , 'ppoi_id' : arg_0 . get_ppoi_id ( arg_1 ) , 'sized_url' : arg_0 . get_sized_url ( arg_2 ) , 'image_preview_id' : arg_0 . image_preview_id ( arg_1 ) , } ) return arg_4

Removes the specfied course from the specified organization


Question: Run the spatial pooler with the input vector

def Func ( arg_0 ) : print "-" * 80 + "Computing the SDR" + "-" * 80 arg_0 . sp . compute ( arg_0 . inputArray , True , arg_0 . activeArray ) print arg_0 . activeArray . nonzero ( )

Add one or more files or URLs to the manifest.
        If files contains a glob, it is expanded.

        All files are uploaded to SolveBio. The Upload
        object is used to fill the manifest.


Question: Finds runs containing parameterized gates and splits them into sequential runs excluding the parameterized gates .

def Func ( arg_0 ) : def _is_dagnode_parameterized ( arg_1 ) : return any ( isinstance ( arg_2 , Parameter ) for arg_2 in arg_1 . op . params ) arg_3 = [ ] for arg_4 in arg_0 : arg_5 = groupby ( arg_4 , _is_dagnode_parameterized ) for arg_6 , arg_7 in arg_5 : if not arg_6 : arg_3 . append ( list ( arg_7 ) ) return arg_3


Question: r Generate the mexican hat wavelet

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 <= 0 : raise ValueError ( "n must be strictly positive" ) arg_3 = numpy . linspace ( arg_0 , arg_1 , arg_2 ) arg_4 = ( 1. - arg_3 ** 2. ) * ( 2. / ( numpy . sqrt ( 3. ) * pi ** 0.25 ) ) * numpy . exp ( - arg_3 ** 2 / 2. ) return arg_4

Return median.

    With numbers sorted by value, the median is the middle value (if there is
    an odd number of values) or the arithmetic mean of the two middle values
    (if there is an even number of values).

    Cf. https://en.wikipedia.org/wiki/Median

    Parameters
    ----------
    nums : list
        A series of numbers

    Returns
    -------
    int or float
        The median of nums

    Examples
    --------
    >>> median([1, 2, 3])
    2
    >>> median([1, 2, 3, 4])
    2.5
    >>> median([1, 2, 2, 4])
    2


Question: BIP0038 non - ec - multiply encryption . Returns BIP0038 encrypted privkey .

def Func ( arg_0 , arg_1 ) : if isinstance ( arg_0 , str ) : arg_0 = PrivateKey ( arg_0 ) else : arg_0 = PrivateKey ( repr ( arg_0 ) ) arg_2 = repr ( arg_0 ) arg_3 = format ( arg_0 . bitcoin . address , "BTC" ) arg_4 = _bytes ( arg_3 ) arg_5 = hashlib . sha256 ( hashlib . sha256 ( arg_4 ) . digest ( ) ) . digest ( ) [ 0 : 4 ] if SCRYPT_MODULE == "scrypt" : arg_6 = scrypt . hash ( arg_1 , arg_5 , 16384 , 8 , 8 ) elif SCRYPT_MODULE == "pylibscrypt" : arg_6 = scrypt . scrypt ( bytes ( arg_1 , "utf-8" ) , arg_5 , 16384 , 8 , 8 ) else : raise ValueError ( "No scrypt module loaded" ) ( arg_7 , arg_8 ) = ( arg_6 [ : 32 ] , arg_6 [ 32 : ] ) arg_9 = AES . new ( arg_8 , AES . MODE_ECB ) arg_10 = _Func_xor ( arg_2 [ : 32 ] , arg_7 [ : 16 ] , arg_9 ) arg_11 = _Func_xor ( arg_2 [ 32 : ] , arg_7 [ 16 : ] , arg_9 ) arg_12 = b"\x01" + b"\x42" + b"\xc0" + arg_5 + arg_10 + arg_11 arg_13 = hashlib . sha256 ( hashlib . sha256 ( arg_12 ) . digest ( ) ) . digest ( ) [ : 4 ] arg_14 = hexlify ( arg_12 + arg_13 ) . decode ( "ascii" ) return Base58 ( arg_14 )


Question: Attempts to decipher encoded messages from the transactions in the bundle .

def Func ( arg_0 , arg_1 = 'drop' ) : arg_2 = 'strict' if arg_1 == 'drop' else arg_1 arg_3 = [ ] for arg_4 in arg_0 . group_transactions ( ) : if arg_4 [ 0 ] . value < 0 : continue arg_5 = TryteString ( b'' ) for arg_6 in arg_4 : arg_5 += arg_6 . signature_message_fragment if arg_5 : try : arg_3 . append ( arg_5 . decode ( arg_2 ) ) except ( TrytesDecodeError , UnicodeDecodeError ) : if arg_1 != 'drop' : raise return arg_3

Checks on whether the task instance is in the right state and timeframe
        to be retried.


Question: generate rate steady

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_1 [ 'filename' ] + '_steady.png' plt . figure ( figsize = ( 4 * arg_2 , 2.5 * arg_2 ) ) for arg_5 in arg_0 . keys ( ) : if len ( arg_0 [ arg_5 ] ) < arg_3 : arg_3 = len ( arg_0 [ arg_5 ] ) plt . scatter ( arg_0 [ arg_5 ] [ - 1 * arg_3 : , 0 ] , arg_0 [ arg_5 ] [ - 1 * arg_3 : , 1 ] , label = str ( arg_5 ) , s = 10 ) arg_6 = np . mean ( arg_0 [ arg_5 ] [ - 1 * arg_3 : , 1 ] ) arg_7 = arg_6 * ( 1 + 0.05 ) arg_8 = arg_6 * ( 1 + 0.1 ) arg_9 = arg_6 * ( 1 - 0.05 ) arg_10 = arg_6 * ( 1 - 0.1 ) plt . plot ( arg_0 [ arg_5 ] [ - 1 * arg_3 : , 0 ] , [ arg_6 ] * arg_3 , 'b' ) plt . plot ( arg_0 [ arg_5 ] [ - 1 * arg_3 : , 0 ] , [ arg_7 ] * arg_3 , 'g' ) plt . plot ( arg_0 [ arg_5 ] [ - 1 * arg_3 : , 0 ] , [ arg_9 ] * arg_3 , 'g' ) plt . plot ( arg_0 [ arg_5 ] [ - 1 * arg_3 : , 0 ] , [ arg_8 ] * arg_3 , 'r' ) plt . plot ( arg_0 [ arg_5 ] [ - 1 * arg_3 : , 0 ] , [ arg_10 ] * arg_3 , 'r' ) plt . title ( arg_1 [ 'title' ] + '(steady)' ) plt . xlabel ( arg_1 [ 'x_axis_name' ] + '(steady)' ) plt . ylabel ( arg_1 [ 'y_axis_name' ] + '(steady)' ) plt . legend ( loc = 'upper left' ) plt . savefig ( arg_4 ) return arg_4

Read the data encoding the CapabilityInformation structure and decode
        it into its constituent parts.

        Args:
            input_buffer (stream): A data stream containing encoded object
                data, supporting a read method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be decoded. Optional,
                defaults to KMIP 2.0.

        Raises:
            VersionNotSupported: Raised when a KMIP version is provided that
                does not support the CapabilityInformation structure.


Question: Parse HTTP_IF header into a dictionary and lists and cache the result .

def Func ( arg_0 ) : if "wsgidav.conditions.if" in arg_0 : return if "HTTP_IF" not in arg_0 : arg_0 [ "wsgidav.conditions.if" ] = None arg_0 [ "wsgidav.ifLockTokenList" ] = [ ] return arg_1 = arg_0 [ "HTTP_IF" ] . strip ( ) if not arg_1 . startswith ( "<" ) : arg_1 = "<*>" + arg_1 arg_2 = dict ( [ ] ) arg_3 = [ ] arg_4 = "*" for ( arg_5 , arg_6 , arg_7 , arg_8 ) in reIfSeparator . findall ( arg_1 ) : if arg_5 != "" : arg_4 = arg_6 else : arg_9 = [ ] arg_10 = True for arg_11 in reIfTagListContents . findall ( arg_8 ) : if arg_11 . upper ( ) != "NOT" : if arg_11 . startswith ( "[" ) : arg_9 . append ( ( arg_10 , "entity" , arg_11 . strip ( '"[]' ) ) ) else : arg_9 . append ( ( arg_10 , "locktoken" , arg_11 . strip ( "<>" ) ) ) arg_3 . append ( arg_11 . strip ( "<>" ) ) arg_10 = arg_11 . upper ( ) != "NOT" if arg_4 in arg_2 : arg_12 = arg_2 [ arg_4 ] else : arg_12 = [ ] arg_2 [ arg_4 ] = arg_12 arg_12 . append ( arg_9 ) arg_0 [ "wsgidav.conditions.if" ] = arg_2 arg_0 [ "wsgidav.ifLockTokenList" ] = arg_3 _logger . debug ( "Func\n{}" . format ( pformat ( arg_2 ) ) ) return

If n2 is a perfect square, return its square root, else raise error.


Question: Enables GPIO interrupts .

def Func ( arg_0 ) : try : bring_gpio_interrupt_into_userspace ( ) set_gpio_interrupt_edge ( ) except Timeout as e : raise InterruptEnableException ( "There was an error bringing gpio%d into userspace. %s" % ( GPIO_INTERRUPT_PIN , e . message ) )


Question: Update internal counters

def Func ( arg_0 ) : arg_0 . _ntypes = arg_0 . count_types ( ) arg_0 . _nvars = arg_0 . count_vars ( ) arg_0 . _nfuns = arg_0 . count_funs ( )

Default exchange proposal function, for replica exchange MC.

  With probability `prob_exchange` propose combinations of replica for exchange.
  When exchanging, create combinations of adjacent replicas in
  [Replica Exchange Monte Carlo](
  https://en.wikipedia.org/wiki/Parallel_tempering)

  ```
  exchange_fn = default_exchange_proposed_fn(prob_exchange=0.5)
  exchange_proposed = exchange_fn(num_replica=3)

  exchange_proposed.eval()
  ==> [[0, 1]]  # 1 exchange, 0 <--> 1

  exchange_proposed.eval()
  ==> []  # 0 exchanges
  ```

  Args:
    prob_exchange: Scalar `Tensor` giving probability that any exchanges will
      be generated.

  Returns:
    default_exchange_proposed_fn_: Python callable which take a number of
      replicas (a Python integer), and return combinations of replicas for
      exchange as an [n, 2] integer `Tensor`, `0 <= n <= num_replica // 2`,
      with *unique* values in the set `{0, ..., num_replica}`.


Question: Set the index buffer for this VAO

def Func ( arg_0 , arg_1 , arg_2 = 4 ) : if not type ( arg_1 ) in [ moderngl . Buffer , numpy . ndarray , bytes ] : raise VAOError ( "buffer parameter must be a moderngl.Buffer, numpy.ndarray or bytes instance" ) if isinstance ( arg_1 , numpy . ndarray ) : arg_1 = arg_0 . ctx . buffer ( arg_1 . tobytes ( ) ) if isinstance ( arg_1 , bytes ) : arg_1 = arg_0 . ctx . buffer ( data = arg_1 ) arg_0 . _Func = arg_1 arg_0 . _index_element_size = arg_2

Receive updates to the packing plan from the statemgrs and update processes as needed.


Question: Reshape just the values of a BoltArraySpark returning a new BoltArraySpark .

def Func ( arg_0 , * arg_1 ) : arg_2 = argpack ( arg_1 ) arg_3 = arg_0 . shape isFuncable ( arg_2 , arg_3 ) if arg_2 == arg_3 : return arg_0 . _barray def f ( arg_4 ) : return arg_4 . Func ( arg_2 ) arg_5 = arg_0 . _barray . _rdd . mapValues ( f ) arg_6 = arg_0 . _barray . keys . shape + arg_2 return BoltArraySpark ( arg_5 , arg_1 = arg_6 ) . __finalize__ ( arg_0 . _barray )

Register a file reader for use in parse_config_file.

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

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

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

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

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


Question: Returns a DataFrame of total box score statistics by season .

def Func ( arg_0 , arg_1 = 'R' , arg_2 = False ) : return arg_0 . _get_stats_table ( 'totals' , arg_1 = arg_1 , arg_2 = arg_2 )

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


Question: Calculates average Fano Factor of a network .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : if len ( arg_4 ) == 0 : arg_6 = arg_1 . results . monitors . spikes_e arg_7 = arg_1 . parameters . analysis . statistics . time_window arg_8 = arg_1 . parameters . simulation . durations . initial_run arg_9 = arg_8 + arg_1 . parameters . simulation . durations . measurement_run arg_10 = arg_1 . parameters . analysis . statistics . neuron_ids arg_11 = arg_0 . _compute_mean_fano_factor ( arg_10 , arg_6 , arg_7 , arg_8 , arg_9 ) arg_1 . f_add_result ( 'statistics.mean_fano_factor' , arg_11 , comment = 'Average Fano ' 'Factor over all ' 'exc neurons' ) print ( 'R_ee: %f, Mean FF: %f' % ( arg_1 . R_ee , arg_11 ) )

receives a UUID via the request and returns either a fresh or an existing dropbox
    for it


Question: Returns whether the given node matches all filters .

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . visible if arg_0 . options [ "text" ] : if isregex ( arg_0 . options [ "text" ] ) : arg_3 = arg_0 . options [ "text" ] elif arg_0 . exact_text is True : arg_3 = re . compile ( r"\A{}\Z" . format ( re . escape ( arg_0 . options [ "text" ] ) ) ) else : arg_3 = toregex ( arg_0 . options [ "text" ] ) arg_4 = normalize_text ( arg_1 . all_text if arg_2 == "all" else arg_1 . visible_text ) if not arg_3 . search ( arg_4 ) : return False if isinstance ( arg_0 . exact_text , ( bytes_ , str_ ) ) : arg_3 = re . compile ( r"\A{}\Z" . format ( re . escape ( arg_0 . exact_text ) ) ) arg_4 = normalize_text ( arg_1 . all_text if arg_2 == "all" else arg_1 . visible_text ) if not arg_3 . search ( arg_4 ) : return False if arg_2 == "visible" : if not arg_1 . visible : return False elif arg_2 == "hidden" : if arg_1 . visible : return False for arg_5 , arg_6 in iter ( arg_0 . _node_filters . items ( ) ) : if arg_5 in arg_0 . filter_options : if not arg_6 . matches ( arg_1 , arg_0 . filter_options [ arg_5 ] ) : return False elif arg_6 . has_default : if not arg_6 . matches ( arg_1 , arg_6 . default ) : return False if arg_0 . options [ "filter" ] and not arg_0 . options [ "filter" ] ( arg_1 ) : return False return True

Call the segmenter in order to split text in sentences.

        Args:
            text (str): Text to be segmented.

        Returns:
            dict, int: A dict containing a list of dicts with the offsets of
                each sentence; an integer representing the response code.


Question: Parse numeric fields .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_0 . get_value ( arg_1 , arg_3 ) try : return int ( arg_4 ) except : return 0

Save the model in the given directory.

    :param saveModelDir: (string)
         Absolute directory path for saving the model. This directory should
         only be used to store a saved model. If the directory does not exist,
         it will be created automatically and populated with model data. A
         pre-existing directory will only be accepted if it contains previously
         saved model data. If such a directory is given, the full contents of
         the directory will be deleted and replaced with current model data.


Question: Send data synchronous to an ADS - device .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : arg_6 = _adsDLL . AdsSyncWriteReqEx 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_10 = ctypes . c_char_p ( arg_4 . encode ( "utf-8" ) ) arg_11 = arg_10 arg_12 = len ( arg_11 . value ) + 1 else : if type ( arg_5 ) . __name__ == "PyCArrayType" : arg_10 = arg_5 ( * arg_4 ) else : arg_10 = arg_5 ( arg_4 ) arg_11 = ctypes . pointer ( arg_10 ) arg_12 = ctypes . sizeof ( arg_10 ) arg_13 = arg_6 ( arg_0 , arg_7 , arg_8 , arg_9 , arg_12 , arg_11 , ) if arg_13 : raise ADSError ( arg_13 )

Download and extract the tarball, and download each individual photo.


Question: Remove the method defined for this key and return it .

def Func ( arg_0 , arg_1 : arg_2 ) -> Optional [ Method ] : arg_3 = arg_0 . methods . entry ( arg_1 , None ) if arg_3 : arg_0 . _methods . swap ( MultiFunction . __Func , arg_1 ) return arg_3

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


Question: Return a row - sparse matrix approximating the input x .

def Func ( arg_0 , arg_1 = 0.01 ) : if arg_0 . ndim == 1 : arg_0 = arg_0 . reshape ( ( 1 , - 1 ) ) elif arg_0 . ndim > 2 : raise ParameterError ( 'Input must have 2 or fewer dimensions. ' 'Provided x.shape={}.' . format ( arg_0 . shape ) ) if not 0.0 <= arg_1 < 1 : raise ParameterError ( 'Invalid quantile {:.2f}' . format ( arg_1 ) ) arg_2 = scipy . sparse . lil_matrix ( arg_0 . shape , dtype = arg_0 . dtype ) arg_3 = np . abs ( arg_0 ) arg_4 = np . sum ( arg_3 , axis = 1 , keepdims = True ) arg_5 = np . sort ( arg_3 , axis = 1 ) arg_6 = np . cumsum ( arg_5 / arg_4 , axis = 1 ) arg_7 = np . argmin ( arg_6 < arg_1 , axis = 1 ) for arg_8 , arg_9 in enumerate ( arg_7 ) : arg_10 = np . where ( arg_3 [ arg_8 ] >= arg_5 [ arg_8 , arg_9 ] ) arg_2 [ arg_8 , arg_10 ] = arg_0 [ arg_8 , arg_10 ] return arg_2 . tocsr ( )

Downloads a MP4 or WebM file that is associated with the video at the URL passed.

        :param str url: URL of the video to be downloaded
        :return str: Filename of the file in local storage


Question: Parse a datetime to a datetime object .

def Func ( arg_0 , arg_1 = None ) : if arg_1 : return _Func_formats . get ( arg_1 , lambda v : Func_fmt ( v , arg_1 ) ) ( arg_0 ) arg_2 = len ( arg_0 ) if 19 <= arg_2 <= 24 and arg_0 [ 3 ] == " " : try : return Func_d_b_Y_H_M_S ( arg_0 ) except ( KeyError , ValueError ) : pass if 30 <= arg_2 <= 31 : try : return Func_a__d_b_Y_H_M_S_z ( arg_0 ) except ( KeyError , ValueError ) : pass if arg_2 == 14 : try : return Func_YmdHMS ( arg_0 ) except ValueError : pass try : return Func_epoch ( arg_0 ) except ValueError : pass return Func_any ( arg_0 )

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.


Question: Creates a sample dict of tag - value dicts for a single variant record .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = OrderedDict ( ) arg_5 = VcfRecord . _format_list ( arg_2 ) for arg_6 , arg_7 in enumerate ( arg_3 ) : arg_8 = arg_7 . split ( ":" ) if arg_7 else "." arg_4 [ arg_1 [ arg_6 ] ] = OrderedDict ( zip ( arg_5 , arg_8 ) ) return arg_4


Question: Returns the filename which is effectively used by the application . If overridden by an environment variable it will return that filename .

def Func ( arg_0 ) : arg_1 = '' if arg_0 . filename : arg_1 = arg_0 . filename arg_2 = getenv ( arg_0 . env_filename_name ) if arg_2 : arg_0 . _log . info ( 'Configuration filename was overridden with %r ' 'by the environment variable %s.' , arg_2 , arg_0 . env_filename_name ) arg_1 = arg_2 return arg_1

Called when there is an error in the websocket


Question: Remove a file from the project s storage .

def Func ( arg_0 ) : arg_1 = _setup_osf ( arg_0 ) if arg_1 . username is None or arg_1 . password is None : sys . exit ( 'To Func a file you need to provide a username and' ' password.' ) arg_2 = arg_1 . project ( arg_0 . project ) arg_3 , arg_4 = split_storage ( arg_0 . target ) arg_5 = arg_2 . storage ( arg_3 ) for arg_6 in arg_5 . files : if norm_remote_path ( arg_6 . path ) == arg_4 : arg_6 . Func ( )

Extracts the update time from a ReMo item.

        The timestamp is extracted from 'end' field.
        This date is converted to a perceval format using a float value.

        :param item: item generated by the backend

        :returns: a UNIX timestamp


Question: Call the SparkSqlHook to run the provided sql query

def Func ( arg_0 , arg_1 ) : arg_0 . _hook = SparkSqlHook ( sql = arg_0 . _sql , conf = arg_0 . _conf , conn_id = arg_0 . _conn_id , total_executor_cores = arg_0 . _total_executor_cores , executor_cores = arg_0 . _executor_cores , executor_memory = arg_0 . _executor_memory , keytab = arg_0 . _keytab , principal = arg_0 . _principal , name = arg_0 . _name , num_executors = arg_0 . _num_executors , master = arg_0 . _master , yarn_queue = arg_0 . _yarn_queue ) arg_0 . _hook . run_query ( )

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: Give a database cursor and model check the subjects against the subject vocabulary .

def Func ( arg_0 , arg_1 ) : arg_2 = [ term [ 0 ] for term in acquire_subject_vocabulary ( arg_0 ) ] arg_3 = arg_1 . metadata . get ( 'subjects' , [ ] ) arg_4 = [ s for s in arg_3 if s not in arg_2 ] if arg_4 : raise exceptions . InvalidMetadata ( 'subjects' , arg_4 )

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: Find an installed distribution that satisfies or conflicts with this requirement and set self . satisfied_by or self . conflicts_with appropriately .

def Func ( arg_0 ) : if arg_0 . req is None : return False try : arg_0 . satisfied_by = pkg_resources . get_distribution ( arg_0 . req ) except pkg_resources . DistributionNotFound : return False except pkg_resources . VersionConflict : arg_2 = pkg_resources . get_distribution ( arg_0 . req . project_name ) if arg_0 . use_user_site : if dist_in_usersite ( arg_2 ) : arg_0 . conflicts_with = arg_2 elif running_under_virtualenv ( ) and dist_in_site_packages ( arg_2 ) : raise InstallationError ( "Will not install to the user site because it will lack sys.path precedence to %s in %s" % ( arg_2 . project_name , arg_2 . location ) ) else : arg_0 . conflicts_with = arg_2 return True

Return the kvectors associated with this tile, given the standard form
        of -0.5 to 0.5. `norm` and `form` arguments arethe same as that passed to
        `Tile.coords`.

        Parameters
        -----------
        real : boolean
            whether to return kvectors associated with the real fft instead


Question: Open a volumetric file using the tools following the file extension .

def Func ( arg_0 ) : if not op . exists ( arg_0 ) : raise IOError ( 'Could not find file {}.' . format ( arg_0 ) ) def open_nifti_file ( arg_0 ) : return NiftiImage ( arg_0 ) def open_mhd_file ( arg_0 ) : return MedicalImage ( arg_0 ) arg_1 , arg_2 = load_raw_data_with_mhd ( arg_0 ) return arg_1 , arg_2 def open_mha_file ( arg_0 ) : raise NotImplementedError ( 'This function has not been implemented yet.' ) def _load_file ( arg_0 , arg_3 ) : return arg_3 ( arg_0 ) arg_4 = { 'nii' : open_nifti_file , 'mhd' : open_mhd_file , 'mha' : open_mha_file , } arg_5 = get_extension ( arg_0 ) arg_3 = None for arg_6 in arg_4 : if arg_5 in arg_6 : arg_3 = arg_4 [ arg_6 ] if arg_3 is None : raise ValueError ( 'Could not find a loader for file {}.' . format ( arg_0 ) ) return _load_file ( arg_0 , arg_3 )

Creates the Nginx configuration for the project


Question: Generate a header for a tag section with specific parameters .

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : arg_6 = "" arg_7 = arg_3 . strftime ( arg_0 . options . date_format ) if arg_0 . options . release_url : arg_8 = arg_0 . options . release_url . format ( arg_2 ) else : arg_8 = u"{project_url}/tree/{newer_tag_link}" . format ( arg_5 = arg_5 , arg_2 = arg_2 ) if not arg_0 . options . unreleased_with_date and arg_1 == arg_0 . options . unreleased_label : arg_6 += u"## [{newer_tag_name}]({release_url})\n\n" . format ( arg_1 = arg_1 , arg_8 = arg_8 ) else : arg_6 += u"## [{newer_tag_name}]({release_url}) " u"({time_string})\n" . format ( arg_1 = arg_1 , arg_8 = arg_8 , arg_7 = arg_7 ) if arg_0 . options . compare_link and arg_4 != REPO_CREATED_TAG_NAME : arg_6 += u"[Full Changelog]" arg_6 += u"({project_url}/compare/{older_tag_link}" . format ( arg_5 = arg_5 , arg_4 = arg_4 , ) arg_6 += u"...{newer_tag_link})\n\n" . format ( arg_2 = arg_2 ) return arg_6


Question: Return slug of a project that given bet is associated with or None if bet is not associated with any project .

def Func ( arg_0 , arg_1 ) : if arg_1 . get ( 'form_params' ) : arg_2 = json . loads ( arg_1 [ 'form_params' ] ) return arg_2 . get ( 'project' ) return None

Returns ON-OFF for all Stokes parameters given a cross_pols noise diode measurement


Question: Copy file from src path to dst path . If dst already exists will add + characters to the end of the basename without extension .

def Func ( arg_0 , arg_1 ) : arg_2 = get_extension ( arg_1 ) arg_3 = remove_ext ( arg_1 ) while op . exists ( arg_3 + arg_2 ) : arg_3 += '+' shutil . copy ( arg_0 , arg_3 + arg_2 ) return arg_3 + arg_2

Configure session for particular device

        Returns:
            tensorflow.Session


Question: Return the serialized course key given either a course run ID or course key .

def Func ( arg_0 ) : try : arg_1 = CourseKey . from_string ( arg_0 ) except InvalidKeyError : return arg_0 return quote_plus ( ' ' . join ( [ arg_1 . org , arg_1 . course ] ) )

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

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


Question: Called when a response to a job RPC has been received . Decodes the response and finalizes the result then reports the result to the job manager .

def Func ( arg_0 , arg_1 ) : if arg_0 . _closed : return assert arg_0 . _job is not None logger . debug ( "worker {} got response" . format ( id ( arg_0 ) ) ) arg_2 = arg_0 . _job . get_result ( arg_1 ) arg_0 . _manager . add_result ( arg_0 . _job , arg_2 ) arg_0 . _load_job ( )

Store the given text contents so that they are later retrievable by
        the given key.


Question: Converts collection of BindingPrediction objects to DataFrame

def Func ( arg_0 , arg_1 = arg_2 . fields + ( "length" , ) ) : return pd . DataFrame . from_records ( [ tuple ( [ getattr ( arg_5 , arg_4 ) for arg_4 in arg_1 ] ) for arg_5 in arg_0 ] , arg_1 = arg_1 )


Question: Naive neighborhoods algo .

def Func ( arg_0 , arg_1 = 1 ) : arg_2 = [ ] for arg_3 in range ( 0 , len ( arg_0 ) - 1 ) : arg_4 = list ( arg_0 ) arg_4 [ arg_3 ] , arg_4 [ arg_3 + 1 ] = arg_4 [ arg_3 + 1 ] , arg_4 [ arg_3 ] arg_2 . append ( '' . join ( arg_4 ) ) for arg_5 in string . ascii_lowercase : for arg_3 in range ( 0 , len ( arg_0 ) ) : arg_4 = list ( arg_0 ) if arg_5 != arg_4 [ arg_3 ] : arg_4 [ arg_3 ] = arg_5 arg_2 . append ( '' . join ( arg_4 ) ) for arg_5 in string . ascii_lowercase : for arg_3 in range ( 0 , len ( arg_0 ) + 1 ) : arg_4 = list ( arg_0 ) arg_4 . insert ( arg_3 , arg_5 ) arg_2 . append ( '' . join ( arg_4 ) ) if len ( arg_0 ) > 3 : for arg_3 in range ( 0 , len ( arg_0 ) ) : arg_4 = list ( arg_0 ) del arg_4 [ arg_3 ] arg_2 . append ( '' . join ( arg_4 ) ) return arg_2

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

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

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


Question: r Simple function calculates a property based on weighted averages of properties . Weights could be mole fractions volume fractions mass fractions or anything else .

def Func ( arg_0 , arg_1 ) : if not none_and_length_check ( [ arg_0 , arg_1 ] ) : return None arg_2 = sum ( frac * prop for frac , prop in zip ( arg_0 , arg_1 ) ) return arg_2

Run thread to listen for jobs and reschedule successful ones.


Question: true if builtins and not show_builtins

def Func ( arg_0 , arg_1 ) : if arg_0 . config . show_builtin : return True return arg_1 . root ( ) . name != BUILTINS_NAME

Configure the Outstation's database of input point definitions.

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


Question: Compute an array of acoustic frequencies tuned to the mel scale .

def Func ( arg_0 = 128 , arg_1 = 0.0 , arg_2 = 11025.0 , arg_3 = False ) : arg_4 = hz_to_mel ( arg_1 , arg_3 = arg_3 ) arg_5 = hz_to_mel ( arg_2 , arg_3 = arg_3 ) arg_6 = np . linspace ( arg_4 , arg_5 , arg_0 ) return mel_to_hz ( arg_6 , arg_3 = arg_3 )

Close and upload local log file to remote storage Wasb.