def Func ( arg_0 = 250 , arg_1 = 0.5 , ** arg_2 ) : arg_3 = minimal_random_graph ( arg_0 , ** arg_2 ) for arg_4 in arg_3 . nodes ( ) : arg_5 = ( arg_4 , arg_4 ) if not arg_3 . is_edge ( arg_5 ) : if np . random . uniform ( ) < arg_1 : arg_3 . add_edge ( * arg_5 ) arg_3 = set_types_random ( arg_3 , ** arg_2 ) return arg_3

def Func(arg_0=250, arg_1=0.5, **arg_2):
    """Creates a random graph where the edges have different types.

    This method calls :func:`.minimal_random_graph`, and then adds
    a loop to each vertex with ``prob_loop`` probability. It then
    calls :func:`.set_types_random` on the resulting graph.

    Parameters
    ----------
    num_vertices : int (optional, default: 250)
        The number of vertices in the graph.
    prob_loop : float (optional, default: 0.5)
        The probability that a loop gets added to a vertex.
    **kwargs :
        Any parameters to send to :func:`.minimal_random_graph` or
        :func:`.set_types_random`.

    Returns
    -------
    :class:`.QueueNetworkDiGraph`
        A graph with the position of the vertex set as a property.
        The position property is called ``pos``. Also, the ``edge_type``
        edge property is set for each edge.

    Examples
    --------
    The following generates a directed graph with 50 vertices where half
    the edges are type 1 and 1/4th are type 2 and 1/4th are type 3:

    >>> import queueing_tool as qt
    >>> pTypes = {1: 0.5, 2: 0.25, 3: 0.25}
    >>> g = qt.Func(100, proportions=pTypes, seed=17)
    >>> non_loops = [e for e in g.edges() if e[0] != e[1]]
    >>> p1 = np.sum([g.ep(e, 'edge_type') == 1 for e in non_loops])
    >>> float(p1) / len(non_loops) # doctest: +ELLIPSIS
    0.486...
    >>> p2 = np.sum([g.ep(e, 'edge_type') == 2 for e in non_loops])
    >>> float(p2) / len(non_loops) # doctest: +ELLIPSIS
    0.249...
    >>> p3 = np.sum([g.ep(e, 'edge_type') == 3 for e in non_loops])
    >>> float(p3) / len(non_loops) # doctest: +ELLIPSIS
    0.264...

    To make an undirected graph with 25 vertices where there are 4
    different edge types with random proportions:

    >>> p = np.random.rand(4)
    >>> p = p / sum(p)
    >>> p = {k + 1: p[k] for k in range(4)}
    >>> g = qt.Func(num_vertices=25, is_directed=False, proportions=p)

    Note that none of the edge types in the above example are 0. It is
    recommended use edge type indices starting at 1, since 0 is
    typically used for terminal edges.
    """
    arg_3 = minimal_random_graph(arg_0, **arg_2)
    for arg_4 in arg_3.nodes():
        arg_5 = (arg_4, arg_4)
        if not arg_3.is_edge(arg_5):
            if np.random.uniform() < arg_1:
                arg_3.add_edge(*arg_5)
    arg_3 = set_types_random(arg_3, **arg_2)
    return arg_3

Creates a random graph where the edges have different types.

    This method calls :func:`.minimal_random_graph`, and then adds
    a loop to each vertex with ``prob_loop`` probability. It then
    calls :func:`.set_types_random` on the resulting graph.

    Parameters
    ----------
    num_vertices : int (optional, default: 250)
        The number of vertices in the graph.
    prob_loop : float (optional, default: 0.5)
        The probability that a loop gets added to a vertex.
    **kwargs :
        Any parameters to send to :func:`.minimal_random_graph` or
        :func:`.set_types_random`.

    Returns
    -------
    :class:`.QueueNetworkDiGraph`
        A graph with the position of the vertex set as a property.
        The position property is called ``pos``. Also, the ``edge_type``
        edge property is set for each edge.

    Examples
    --------
    The following generates a directed graph with 50 vertices where half
    the edges are type 1 and 1/4th are type 2 and 1/4th are type 3:

    >>> import queueing_tool as qt
    >>> pTypes = {1: 0.5, 2: 0.25, 3: 0.25}
    >>> g = qt.generate_random_graph(100, proportions=pTypes, seed=17)
    >>> non_loops = [e for e in g.edges() if e[0] != e[1]]
    >>> p1 = np.sum([g.ep(e, 'edge_type') == 1 for e in non_loops])
    >>> float(p1) / len(non_loops) # doctest: +ELLIPSIS
    0.486...
    >>> p2 = np.sum([g.ep(e, 'edge_type') == 2 for e in non_loops])
    >>> float(p2) / len(non_loops) # doctest: +ELLIPSIS
    0.249...
    >>> p3 = np.sum([g.ep(e, 'edge_type') == 3 for e in non_loops])
    >>> float(p3) / len(non_loops) # doctest: +ELLIPSIS
    0.264...

    To make an undirected graph with 25 vertices where there are 4
    different edge types with random proportions:

    >>> p = np.random.rand(4)
    >>> p = p / sum(p)
    >>> p = {k + 1: p[k] for k in range(4)}
    >>> g = qt.generate_random_graph(num_vertices=25, is_directed=False, proportions=p)

    Note that none of the edge types in the above example are 0. It is
    recommended use edge type indices starting at 1, since 0 is
    typically used for terminal edges.

Creates a random graph where the edges have different types .


def Func(arg_0, arg_1):
        """Used to instantiate a regular HTTP request object"""
        arg_2 = httplib2.Http()
        if arg_0 and arg_1:
            arg_2.add_credentials(arg_0, arg_1)
        return arg_2


def Func ( arg_0 : arg_1 . ClassDef ) -> bool : for arg_3 in arg_0 . methods ( ) : if arg_3 . parent . frame ( ) is arg_0 : if arg_3 . is_abstract ( pass_is_abstract = False ) : return True return False

def Func(arg_0: arg_1.ClassDef) -> bool:
    """return true if the given class node should be considered as an abstract
    class
    """
    for arg_3 in arg_0.methods():
        if arg_3.parent.frame() is arg_0:
            if arg_3.is_abstract(pass_is_abstract=False):
                return True
    return False


def Func ( arg_0 , arg_1 : arg_2 . Price ) -> PriceModel : if not arg_1 : return None arg_4 = PriceModel ( ) arg_4 . currency = arg_1 . currency arg_6 = arg_1 . date arg_7 = "%Y-%m-%d" if arg_1 . time : arg_6 += f"T{entity.time}" arg_7 += "T%H:%M:%S" arg_8 = datetime . strptime ( arg_6 , arg_7 ) arg_4 . datum = Datum ( ) arg_4 . datum . from_datetime ( arg_8 ) assert isinstance ( arg_4 . datum , Datum ) arg_4 . symbol = SecuritySymbol ( arg_1 . namespace , arg_1 . symbol ) arg_11 = Decimal ( arg_1 . value ) / Decimal ( arg_1 . denom ) arg_4 . value = Decimal ( arg_11 ) return arg_4

def Func(arg_0, arg_1: arg_2.Price) -> PriceModel:
        """ Map the price entity """
        if not arg_1:
            return None

        arg_4 = PriceModel()
        arg_4.currency = arg_1.currency

        # date/time
        arg_6 = arg_1.date
        arg_7 = "%Y-%m-%d"
        if arg_1.time:
            arg_6 += f"T{entity.time}"
            arg_7 += "T%H:%M:%S"
        arg_8 = datetime.strptime(arg_6, arg_7)
        arg_4.datum = Datum()
        arg_4.datum.from_datetime(arg_8)
        assert isinstance(arg_4.datum, Datum)

        #result.namespace = entity.namespace
        #result.symbol = entity.symbol
        arg_4.symbol = SecuritySymbol(arg_1.namespace, arg_1.symbol)

        # Value
        arg_11 = Decimal(arg_1.value) / Decimal(arg_1.denom)
        arg_4.value = Decimal(arg_11)

        return arg_4


def Func ( arg_0 , arg_1 = - 1 ) : sys . stderr . write ( arg_0 + "\n" ) sys . exit ( arg_1 )

def Func(arg_0, arg_1=-1):
    """Writes msg to stderr and exits with return code"""
    sys.stderr.write(arg_0 + "\n")
    sys.exit(arg_1)


def Func(arg_0, arg_1):
        """Inform the widget about the encoding of the underlying character stream."""
        arg_0._bar_ends = "[]"
        arg_0._bar_symbols = "#"
        if not arg_1: return
        arg_4 = "\u258F\u258E\u258D\u258C\u258B\u258A\u2589\u2588"
        arg_5 = "\u258C\u2588"
        arg_6 = "\u2588"
        if arg_0._file_mode:
            arg_4 = arg_5 = None
        assert len(arg_6) == 1
        for arg_7 in (arg_4, arg_5, arg_6):
            if arg_7 is None: continue
            try:
                arg_7.encode(arg_1)
                arg_0._bar_ends = "||"
                arg_0._bar_symbols = arg_7
                return
            except UnicodeEncodeError:
                pass
            except LookupError:
                print("Warning: unknown encoding %s" % arg_1)

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


def Func ( arg_0 , arg_1 = False , arg_2 = None ) : arg_3 = 'charset' if not arg_1 else 'ownCharset' arg_4 = os . path . dirname ( os . path . abspath ( __file__ ) ) arg_5 = os . path . join ( arg_4 , arg_0 ) arg_6 = readNamelist ( arg_5 , arg_1 , arg_2 ) return arg_6 [ arg_3 ]

def Func(arg_0, arg_1=False, arg_2=None):
  """Returns the set of codepoints contained in a given Namelist file.

  This is a replacement CodepointsInSubset and implements the "#$ include"
  header format.

  Args:
    namFilename: The path to the  Namelist file.
    unique_glyphs: Optional, whether to only include glyphs unique to subset.
  Returns:
    A set containing the glyphs in the subset.
  """
  arg_3 = 'charset' if not arg_1 else 'ownCharset'

  arg_4 = os.path.dirname(os.path.abspath(__file__))
  arg_5 = os.path.join(arg_4, arg_0)
  arg_6 = readNamelist(arg_5, arg_1, arg_2)
  return arg_6[arg_3]

Returns the set of codepoints contained in a given Namelist file .


return _jwt.pack(owner=iss, kid=kid, payload=msreq.to_dict())

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=''):
    """
    A metadata statement signing request with 'signing_keys' signed by one
    of the keys in 'signing_keys'.

    :param keyjar: A KeyJar instance with the private signing key
    :param msreq: Metadata statement signing request. A MetadataStatement
        instance.
    :param iss: Issuer of the signing request also the owner of the signing
        keys.
    :return: Signed JWT where the body is the metadata statement
    """

    try:
        jwks_to_keyjar(arg_1['signing_keys'], arg_2)
    except KeyError:
        arg_5 = arg_0.export_jwks(issuer=arg_2)
        arg_1['signing_keys'] = arg_5

    arg_6 = JWT(arg_0, arg_2=arg_2, arg_3=arg_3)

    return arg_6.pack(owner=arg_2, arg_4=arg_4, payload=arg_1.to_dict())

A metadata statement signing request with signing_keys signed by one of the keys in signing_keys .


(job, outputs, output_stream,
              stderr=sys.stderr, dumps=core.dumps)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = arg_4 . stderr , arg_5 = arg_6 . dumps ) : for arg_7 in arg_1 : try : print >> arg_2 , arg_5 ( arg_7 ) except arg_6 . ParseError , e : print >> arg_3 , e raise

def Func(arg_0, arg_1, arg_2,
              arg_3=arg_4.stderr, arg_5=arg_6.dumps):
    """ Writes a stream of json serialised pyschema Records to a file object

    Can be used as job.writer in luigi.hadoop.JobTask
    """
    for arg_7 in arg_1:
        try:
            print >> arg_2, arg_5(arg_7)
        except arg_6.ParseError, e:
            print >> arg_3, e
            raise


def Func ( arg_0 ) : arg_1 = arg_0 . limits [ 0 ] / arg_0 . factor arg_2 = arg_0 . limits [ 1 ] / arg_0 . factor return arg_1 , arg_2

def Func(arg_0):
        """
        Minimum and Maximum to use for computing breaks
        """
        arg_1 = arg_0.limits[0]/arg_0.factor
        arg_2 = arg_0.limits[1]/arg_0.factor
        return arg_1, arg_2


def Func(arg_0, arg_1):
        """Add a metric to the buffer."""

        arg_0.batch_count += 1

        arg_0.batch_buffer += arg_1

        # NOTE(romcheg): Send metrics if the number of metrics in the buffer
        #                has reached the threshold for sending.
        if arg_0.batch_count >= arg_0.batch_size:
            arg_0._send()


def Func ( arg_0 , arg_1 = [ 0 ] ) : arg_2 = [ 2.31250 , 2.35270 ] for arg_3 in arg_1 : arg_0 . setsweep ( arg_3 ) for arg_4 in arg_2 : arg_5 = int ( arg_0 . pointsPerSec * arg_4 ) arg_6 = int ( arg_0 . pointsPerSec * ( arg_4 + 0.001 ) ) arg_0 . sweepY [ arg_5 : arg_6 ] = np . nan arg_8 = int ( arg_0 . pointsPerSec * 2.2 ) arg_9 = int ( arg_0 . pointsPerSec * 2.6 ) arg_10 = np . average ( arg_0 . sweepY [ int ( arg_0 . pointsPerSec * 2.0 ) : int ( arg_0 . pointsPerSec * 2.2 ) ] ) arg_11 = lowPassFilter ( arg_0 . sweepY [ arg_8 : arg_9 ] ) - arg_10 arg_12 = arg_0 . sweepX2 [ arg_8 : arg_8 + len ( arg_11 ) ] . flatten ( ) plt . plot ( arg_12 , arg_11 , alpha = .5 , lw = 2 ) return

def Func(arg_0,arg_1=[0]):
    """
    Create a plot of one area of interest of a single sweep.
    """

    arg_2=[2.31250, 2.35270]
    for arg_3 in arg_1:
        arg_0.setsweep(arg_3)
        for arg_4 in arg_2:
            arg_5=int(arg_0.pointsPerSec*arg_4)
            arg_6=int(arg_0.pointsPerSec*(arg_4+0.001)) # 1ms of blanking
            arg_0.sweepY[arg_5:arg_6]=np.nan # blank out the stimulus area
        arg_8=int(arg_0.pointsPerSec*2.2) # time point (sec) to start
        arg_9=int(arg_0.pointsPerSec*2.6) # time point (sec) to end
        arg_10=np.average(arg_0.sweepY[int(arg_0.pointsPerSec*2.0):int(arg_0.pointsPerSec*2.2)])
        arg_11=lowPassFilter(arg_0.sweepY[arg_8:arg_9])-arg_10
        arg_12=arg_0.sweepX2[arg_8:arg_8+len(arg_11)].flatten()
        plt.plot(arg_12,arg_11,alpha=.5,lw=2)
    return

Create a plot of one area of interest of a single sweep .


def Func ( arg_0 , arg_1 ) : arg_2 , arg_3 = institute_and_case ( store , arg_0 , arg_1 ) arg_4 = controllers . case_report_content ( store , arg_2 , arg_3 ) if current_app . config . get ( 'SQLALCHEMY_DATABASE_URI' ) : arg_4 [ 'coverage_report' ] = controllers . coverage_report_contents ( store , arg_2 , arg_3 , request . url_root ) if arg_3 . get ( 'madeline_info' ) is not None : with open ( os . path . join ( cases_bp . static_folder , 'madeline.svg' ) , 'w' ) as temp_madeline : temp_madeline . write ( arg_3 [ 'madeline_info' ] ) arg_5 = render_template ( 'cases/case_report.html' , institute = arg_2 , case = arg_3 , format = 'pdf' , ** arg_4 ) return render_pdf ( HTML ( string = arg_5 ) , download_filename = arg_3 [ 'display_name' ] + '_' + datetime . datetime . now ( ) . strftime ( "%Y-%m-%d" ) + '_scout.pdf' )

def Func(arg_0, arg_1):
    """Download a pdf report for a case"""

    arg_2, arg_3 = institute_and_case(store, arg_0, arg_1)
    arg_4 = controllers.case_report_content(store, arg_2, arg_3)

    # add coverage report on the bottom of this report
    if current_app.config.get('SQLALCHEMY_DATABASE_URI'):
        arg_4['coverage_report'] = controllers.coverage_report_contents(store, arg_2, arg_3, request.url_root)

    # workaround to be able to print the case pedigree to pdf
    if arg_3.get('madeline_info') is not None:
        with open(os.path.join(cases_bp.static_folder, 'madeline.svg'), 'w') as temp_madeline:
            temp_madeline.write(arg_3['madeline_info'])

    arg_5 = render_template('cases/case_report.html', institute=arg_2, case=arg_3, format='pdf', **arg_4)
    return render_pdf(HTML(string=arg_5), download_filename=arg_3['display_name']+'_'+datetime.datetime.now().strftime("%Y-%m-%d")+'_scout.pdf')


(self, targets, wildcard=".", include=None, exclude=None, limit=None, start=1, expand=False,
                       **kwargs)

def Func ( arg_0 , arg_1 , arg_2 = "." , arg_3 = None , arg_4 = None , arg_5 = None , arg_6 = 1 , arg_7 = False , ** arg_8 ) : return 0 , [ ]

def Func(arg_0, arg_1, arg_2=".", arg_3=None, arg_4=None, arg_5=None, arg_6=1, arg_7=False,
                       **arg_8):
        """ Retrieve annotations from the query provider

        :param targets: The CTS URN(s) to query as the target of annotations
        :type targets: [MyCapytain.common.reference.URN], URN or None
        :param wildcard: Wildcard specifier for how to match the URN
        :type wildcard: str
        :param include: URI(s) of Annotation types to include in the results
        :type include: list(str)
        :param exclude: URI(s) of Annotation types to include in the results
        :type exclude: list(str)
        :param limit: The max number of results to return (Default is None for no limit)
        :type limit: int
        :param start: the starting record to return (Default is 1)
        :type start: int
        :param expand: Flag to state whether Annotations are expanded (Default is False)
        :type expand: bool

        :return: Tuple representing the query results. The first element
                 The first element is the number of total Annotations found
                 The second element is the list of Annotations
        :rtype: (int, list(Annotation)

        .. note::

            Wildcard should be one of the following value

            - '.' to match exact,
            - '.%' to match exact plus lower in the hierarchy
            - '%.' to match exact + higher in the hierarchy
            - '-' to match in the range
            - '%.%' to match all

        """
        return 0, []


(data, bmark, samples=2000, progressbar=True)

def Func ( arg_0 , arg_1 , arg_2 = 2000 , arg_3 = True ) : arg_4 = pd . concat ( [ arg_0 , arg_1 ] , axis = 1 ) . dropna ( ) with pm . Model ( ) as model : arg_5 = pm . HalfCauchy ( 'sigma' , beta = 1 ) arg_6 = pm . Exponential ( 'nu_minus_two' , 1. / 10. ) arg_7 = arg_4 . iloc [ : , 1 ] arg_8 = arg_4 . iloc [ : , 0 ] arg_9 = pm . Normal ( 'alpha' , mu = 0 , sd = .1 ) arg_10 = pm . Normal ( 'beta' , mu = 0 , sd = 1 ) arg_11 = arg_9 + arg_10 * arg_7 pm . StudentT ( 'returns' , arg_6 = arg_6 + 2 , mu = arg_11 , sd = arg_5 , observed = arg_8 ) arg_12 = pm . sample ( arg_2 , arg_3 = arg_3 ) return model , arg_12

def Func(arg_0, arg_1, arg_2=2000, arg_3=True):
    """
    Run Bayesian alpha-beta-model with T distributed returns.

    This model estimates intercept (alpha) and slope (beta) of two
    return sets. Usually, these will be algorithm returns and
    benchmark returns (e.g. S&P500). The data is assumed to be T
    distributed and thus is robust to outliers and takes tail events
    into account.  If a pandas.DataFrame is passed as a benchmark, then
    multiple linear regression is used to estimate alpha and beta.

    Parameters
    ----------
    returns : pandas.Series
        Series of simple returns of an algorithm or stock.
    bmark : pandas.DataFrame
        DataFrame of benchmark returns (e.g., S&P500) or risk factors (e.g.,
        Fama-French SMB, HML, and UMD).
        If bmark has more recent returns than returns_train, these dates
        will be treated as missing values and predictions will be
        generated for them taking market correlations into account.
    samples : int (optional)
        Number of posterior samples to draw.

    Returns
    -------
    model : pymc.Model object
        PyMC3 model containing all random variables.
    trace : pymc3.sampling.BaseTrace object
        A PyMC3 trace object that contains samples for each parameter
        of the posterior.
    """

    arg_4 = pd.concat([arg_0, arg_1], axis=1).dropna()

    with pm.Model() as model:
        arg_5 = pm.HalfCauchy(
            'sigma',
            beta=1)
        arg_6 = pm.Exponential('nu_minus_two', 1. / 10.)

        # alpha and beta
        arg_7 = arg_4.iloc[:, 1]
        arg_8 = arg_4.iloc[:, 0]

        arg_9 = pm.Normal('alpha', mu=0, sd=.1)
        arg_10 = pm.Normal('beta', mu=0, sd=1)

        arg_11 = arg_9 + arg_10 * arg_7
        pm.StudentT('returns',
                    arg_6=arg_6 + 2,
                    mu=arg_11,
                    sd=arg_5,
                    observed=arg_8)
        arg_12 = pm.sample(arg_2, arg_3=arg_3)

    return model, arg_12

Run Bayesian alpha - beta - model with T distributed returns .


def Func ( arg_0 , arg_1 = None ) : arg_2 = StackedArray ( arg_0 . _rdd , shape = arg_0 . shape , split = arg_0 . split ) return arg_2 . Func ( arg_1 )

def Func(arg_0, arg_1=None):
        """
        Aggregates records of a distributed array.

        Stacking should improve the performance of vectorized operations,
        but the resulting StackedArray object only exposes a restricted set
        of operations (e.g. map, reduce). The unFunc method can be used
        to restore the full bolt array.

        Parameters
        ----------
        size : int, optional, default=None
            The maximum size for each Func (number of original records),
            will aggregate groups of records per partition up to this size,
            if None will aggregate all records on each partition.

        Returns
        -------
        StackedArray
        """
        arg_2 = StackedArray(arg_0._rdd, shape=arg_0.shape, split=arg_0.split)
        return arg_2.Func(arg_1)

Aggregates records of a distributed array.

        Stacking should improve the performance of vectorized operations,
        but the resulting StackedArray object only exposes a restricted set
        of operations (e.g. map, reduce). The unstack method can be used
        to restore the full bolt array.

        Parameters
        ----------
        size : int, optional, default=None
            The maximum size for each stack (number of original records),
            will aggregate groups of records per partition up to this size,
            if None will aggregate all records on each partition.

        Returns
        -------
        StackedArray

Aggregates records of a distributed array .


(
            self,
            key,
            value,
            execution_date=None)

def Func(
            arg_0,
            arg_1,
            arg_2,
            arg_3=None):
        """
        Make an XCom available for tasks to pull.

        :param key: A key for the XCom
        :type key: str
        :param value: A value for the XCom. The value is pickled and stored
            in the database.
        :type value: any pickleable object
        :param execution_date: if provided, the XCom will not be visible until
            this date. This can be used, for example, to send a message to a
            task on a future date without it being immediately visible.
        :type execution_date: datetime
        """

        if arg_3 and arg_3 < arg_0.execution_date:
            raise ValueError(
                'execution_date can not be in the past (current '
                'execution_date is {}; received {})'.format(
                    arg_0.execution_date, arg_3))

        XCom.set(
            arg_1=arg_1,
            arg_2=arg_2,
            task_id=arg_0.task_id,
            dag_id=arg_0.dag_id,
            arg_3=arg_3 or arg_0.execution_date)

Make an XCom available for tasks to pull .


def Func(arg_0):
        """Sets the main channels for the pipeline

        This method will parse de the :attr:`~Process.processes` attribute
        and perform the following tasks for each process:

            - Sets the input/output channels and main input forks and adds
              them to the process's
              :attr:`flowcraft.process.Process._context`
              attribute (See
              :func:`~NextflowGenerator.set_channels`).
            - Automatically updates the main input channel of the first
              process of each lane so that they fork from the user provide
              parameters (See
              :func:`~NextflowGenerator._update_raw_input`).
            - Check for the presence of secondary channels and adds them to the
              :attr:`~NextflowGenerator.secondary_channels` attribute.

        Notes
        -----
        **On the secondary channel setup**: With this approach, there can only
        be one secondary link start for each type of secondary link. For
        instance, If there are two processes that start a secondary channel
        for the ``SIDE_max_len`` channel, only the last one will be recorded,
        and all receiving processes will get the channel from the latest
        process. Secondary channels can only link if the source process if
        downstream of the sink process in its "forking" path.
        """

        logger.debug("=====================")
        logger.debug("Setting main channels")
        logger.debug("=====================")

        for arg_1, arg_2 in enumerate(arg_0.processes):

            # Set main channels for the process
            logger.debug("[{}] Setting main channels with pid: {}".format(
                arg_2.template, arg_1))
            arg_2.set_channels(pid=arg_1)

            # If there is no parent lane, set the raw input channel from user
            logger.debug("{} {} {}".format(arg_2.parent_lane, arg_2.input_type, arg_2.template))
            if not arg_2.parent_lane and arg_2.input_type:
                arg_0._update_raw_input(arg_2)

            arg_0._update_extra_inputs(arg_2)

            arg_0._update_secondary_channels(arg_2)

            logger.info(colored_print(
                "\tChannels set for {} \u2713".format(arg_2.template)))


def
Func
(
arg_0
,
arg_1
=
'37'
)
:
try
:
arg_2
=
arg_0
[
'chrom'
]
except
KeyError
:
raise
KeyError
(
"Exons has to have a chromosome"
)
try
:
arg_3
=
int
(
arg_0
[
'start'
]
)
except
KeyError
:
raise
KeyError
(
"Exon has to have a start"
)
except
TypeError
:
raise
TypeError
(
"Exon start has to be integer"
)
try
:
arg_4
=
int
(
arg_0
[
'end'
]
)
except
KeyError
:
raise
KeyError
(
"Exon has to have a end"
)
except
TypeError
:
raise
TypeError
(
"Exon end has to be integer"
)
try
:
arg_5
=
int
(
arg_0
[
'rank'
]
)
except
KeyError
:
raise
KeyError
(
"Exon has to have a rank"
)
except
TypeError
:
raise
TypeError
(
"Exon rank has to be integer"
)
try
:
arg_6
=
arg_0
[
'exon_id'
]
except
KeyError
:
raise
KeyError
(
"Exons has to have a id"
)
try
:
arg_7
=
arg_0
[
'transcript'
]
except
KeyError
:
raise
KeyError
(
"Exons has to have a transcript"
)
try
:
arg_8
=
int
(
arg_0
[
'hgnc_id'
]
)
except
KeyError
:
raise
KeyError
(
"Exons has to have a hgnc_id"
)
except
TypeError
:
raise
TypeError
(
"hgnc_id has to be integer"
)
arg_9
=
Exon
(
arg_6
=
arg_6
,
arg_2
=
arg_2
,
arg_3
=
arg_3
,
arg_4
=
arg_4
,
arg_5
=
arg_5
,
arg_7
=
arg_7
,
arg_8
=
arg_8
,
arg_1
=
arg_1
,
)
return
arg_9

def Func(arg_0, arg_1='37'):
    """Build a Exon object object

        Args:
            exon_info(dict): Exon information

        Returns:
            exon_obj(Exon)

        "exon_id": str, # str(chrom-start-end)
        "chrom": str,
        "start": int,
        "end": int,
        "transcript": str, # ENST ID
        "hgnc_id": int,      # HGNC_id
        "rank": int, # Order of exon in transcript
        "build": str, # Genome build
    """

    try:
        arg_2 = arg_0['chrom']
    except KeyError:
        raise KeyError("Exons has to have a chromosome")

    try:
        arg_3 = int(arg_0['start'])
    except KeyError:
        raise KeyError("Exon has to have a start")
    except TypeError:
        raise TypeError("Exon start has to be integer")

    try:
        arg_4 = int(arg_0['end'])
    except KeyError:
        raise KeyError("Exon has to have a end")
    except TypeError:
        raise TypeError("Exon end has to be integer")

    try:
        arg_5 = int(arg_0['rank'])
    except KeyError:
        raise KeyError("Exon has to have a rank")
    except TypeError:
        raise TypeError("Exon rank has to be integer")

    try:
        arg_6 = arg_0['exon_id']
    except KeyError:
        raise KeyError("Exons has to have a id")

    try:
        arg_7 = arg_0['transcript']
    except KeyError:
        raise KeyError("Exons has to have a transcript")

    try:
        arg_8 = int(arg_0['hgnc_id'])
    except KeyError:
        raise KeyError("Exons has to have a hgnc_id")
    except TypeError:
        raise TypeError("hgnc_id has to be integer")

    arg_9 = Exon(
        arg_6 = arg_6,
        arg_2 = arg_2,
        arg_3 = arg_3,
        arg_4 = arg_4,
        arg_5 = arg_5,
        arg_7 = arg_7,
        arg_8 = arg_8,
        arg_1 = arg_1,
    )

    return arg_9


(cls, enterprise_customer, program_details, users)

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Notify learners about a program in which they've been enrolled.

        Args:
            enterprise_customer: The EnterpriseCustomer being linked to
            program_details: Details about the specific program the learners were enrolled in
            users: An iterable of the users or pending users who were enrolled
        """
        arg_4 = arg_2.get('title')
        arg_5 = arg_2.get('type')
        arg_6 = arg_2.get('uuid')

        arg_7 = get_configuration_value_for_site(
            arg_1.site,
            'LMS_ROOT_URL',
            settings.LMS_ROOT_URL
        )
        arg_8 = urlquote(
            '/dashboard/programs/{program_uuid}/?tpa_hint={tpa_hint}'.format(
                arg_6=arg_6,
                tpa_hint=arg_1.identity_provider,
            )
        )
        arg_9 = '{site}/{login_or_register}?next={program_path}'.format(
            site=arg_7,
            arg_13='{login_or_register}',
            arg_8=arg_8
        )
        arg_10 = 'program'
        arg_11 = get_earliest_start_date_from_program(arg_2)

        with mail.get_connection() as email_conn:
            for arg_12 in arg_3:
                arg_13 = 'register' if isinstance(arg_12, PendingEnterpriseCustomerUser) else 'login'
                arg_9 = arg_9.format(arg_13=arg_13)
                send_email_notification_message(
                    arg_12=arg_12,
                    enrolled_in={
                        'name': arg_4,
                        'url': arg_9,
                        'type': arg_10,
                        'start': arg_11,
                        'branding': arg_5,
                    },
                    arg_1=arg_1,
                    email_connection=email_conn
                )

Notify learners about a program in which they ve been enrolled .


(
        egg_info, search_name, link,
        _egg_info_re=re.compile(r'([a-z0-9_.]+)-([a-z0-9_.!+-]+)', re.I))

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
arg_4
.
compile
(
r'([a-z0-9_.]+)-([a-z0-9_.!+-]+)'
,
arg_4
.
I
)
)
:
arg_7
=
arg_3
.
search
(
arg_0
)
if
not
arg_7
:
logger
.
debug
(
'Could not parse version from link: %s'
,
arg_2
)
return
if
arg_1
is
:
arg_8
=
arg_7
.
group
(
0
)
return
arg_8
[
arg_8
.
index
(
'-'
)
:
]
arg_9
=
arg_7
.
group
(
0
)
.
lower
(
)
arg_9
=
arg_9
.
replace
(
'_'
,
'-'
)
arg_10
=
arg_1
.
lower
(
)
+
"-"
if
arg_9
.
startswith
(
arg_10
)
:
return
arg_7
.
group
(
0
)
[
len
(
arg_10
)
:
]
else
:
return

def Func(
        arg_0, arg_1, arg_2,
        arg_3=arg_4.compile(r'([a-z0-9_.]+)-([a-z0-9_.!+-]+)', arg_4.I)):
    """Pull the version part out of a string.

    :param egg_info: The string to parse. E.g. foo-2.1
    :param search_name: The name of the package this belongs to. None to
        infer the name. Note that this cannot unambiguously parse strings
        like foo-2-2 which might be foo, 2-2 or foo-2, 2.
    :param link: The link the string came from, for logging on failure.
    """
    arg_7 = arg_3.search(arg_0)
    if not arg_7:
        logger.debug('Could not parse version from link: %s', arg_2)
        return None
    if arg_1 is None:
        arg_8 = arg_7.group(0)
        return arg_8[arg_8.index('-'):]
    arg_9 = arg_7.group(0).lower()
    # To match the "safe" name that pkg_resources creates:
    arg_9 = arg_9.replace('_', '-')
    # project name and version must be separated by a dash
    arg_10 = arg_1.lower() + "-"
    if arg_9.startswith(arg_10):
        return arg_7.group(0)[len(arg_10):]
    else:
        return None


return [self._jobs.jobDemandNamedTuple._make(r) for r in rows]

def Func ( arg_0 , ) : arg_1 = arg_0 . _getMatchingRowsWithRetries ( arg_0 . _jobs , dict ( status = arg_0 . STATUS_RUNNING ) , [ arg_0 . _jobs . pubToDBNameDict [ f ] for f in arg_0 . _jobs . jobDemandNamedTuple . _fields ] ) return [ arg_0 . _jobs . jobDemandNamedTuple . _make ( arg_2 ) for arg_2 in arg_1 ]

def Func(arg_0,):
    """ Look through the jobs table and get the demand - minimum and maximum
    number of workers requested, if new workers are to be allocated, if there
    are any untended dead workers, for all running jobs.

    Parameters:
    ----------------------------------------------------------------
    retval:      list of ClientJobsDAO._jobs.jobDemandNamedTuple nametuples
                  containing the demand - min and max workers,
                  allocate_new_workers, untended_dead_workers, num_failed_workers
                  for each running (STATUS_RUNNING) job. Empty list when there
                  isn't any demand.

    """
    arg_1 = arg_0._getMatchingRowsWithRetries(
      arg_0._jobs, dict(status=arg_0.STATUS_RUNNING),
      [arg_0._jobs.pubToDBNameDict[f]
       for f in arg_0._jobs.jobDemandNamedTuple._fields])

    return [arg_0._jobs.jobDemandNamedTuple._make(arg_2) for arg_2 in arg_1]

Look through the jobs table and get the demand - minimum and maximum number of workers requested if new workers are to be allocated if there are any untended dead workers for all running jobs .


def Func ( arg_0 : arg_1 ) -> ReaderForm : arg_2 = arg_0 . reader . advance ( ) assert arg_2 == "`" with arg_0 . syntax_quoted ( ) : return _process_syntax_quoted_form ( arg_0 , _read_next_consuming_comment ( arg_0 ) )

def Func(arg_0: arg_1) -> ReaderForm:
    """Read a syntax-quote and set the syntax-quoting state in the reader."""
    arg_2 = arg_0.reader.advance()
    assert arg_2 == "`"

    with arg_0.syntax_quoted():
        return _process_syntax_quoted_form(arg_0, _read_next_consuming_comment(arg_0))

Read a syntax - quote and set the syntax - quoting state in the reader .


def Func(arg_0, arg_1=None, arg_2=None):
        """Creates a File Copy on Uploadcare or Custom Storage.

        File.Func method is deprecated and will be removed in 4.0.0.
        Please use `create_local_Func` and `create_remote_Func` instead.

        Args:
            - effects:
                Adds CDN image effects. If ``self.default_effects`` property
                is set effects will be combined with default effects.
            - target:
                Name of a custom storage connected to your project.
                Uploadcare storage is used if target is absent.

        """
        arg_3 = """File.Func method is deprecated and will be
            removed in 4.0.0.
            Please use `create_local_Func`
            and `create_remote_Func` instead.
        """
        logger.warn('API Warning: {0}'.format(arg_3))

        if arg_2 is not None:
            return arg_0.create_remote_Func(arg_2, arg_1)
        else:
            return arg_0.create_local_Func(arg_1)

Creates a File Copy on Uploadcare or Custom Storage.

        File.copy method is deprecated and will be removed in 4.0.0.
        Please use `create_local_copy` and `create_remote_copy` instead.

        Args:
            - effects:
                Adds CDN image effects. If ``self.default_effects`` property
                is set effects will be combined with default effects.
            - target:
                Name of a custom storage connected to your project.
                Uploadcare storage is used if target is absent.

Creates a File Copy on Uploadcare or Custom Storage . File . copy method is deprecated and will be removed in 4 . 0 . 0 . Please use create_local_copy and create_remote_copy instead .


def Func ( arg_0 , arg_1 ) : if arg_1 > arg_0 . size [ 1 ] : raise ImageSizeError ( arg_0 . size [ 1 ] , arg_1 )

def Func(arg_0, arg_1):
    """Check that the image height is superior to `height`"""
    if arg_1 > arg_0.size[1]:
        raise ImageSizeError(arg_0.size[1], arg_1)

Check that the image height is superior to height


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
os
.
environ
.
get
(
arg_1
)
if
not
arg_2
:
raise
ValueError
(
'Missing environment variable:%s'
%
arg_1
)
return
arg_2

def Func(arg_0, arg_1):
        """Helper to read an environment variable
        """
        arg_2 = os.environ.get(arg_1)
        if not arg_2:
            raise ValueError('Missing environment variable:%s' % arg_1)
        return arg_2


return np.floor((samples - offset) // hop_length).astype(int)

def Func ( arg_0 , arg_1 = 512 , arg_2 = None ) : arg_3 = 0 if arg_2 is not None : arg_3 = int ( arg_2 // 2 ) arg_0 = np . asanyarray ( arg_0 ) return np . floor ( ( arg_0 - arg_3 ) // arg_1 ) . astype ( int )

def Func(arg_0, arg_1=512, arg_2=None):
    """Converts sample indices into STFT frames.

    Examples
    --------
    >>> # Get the frame numbers for every 256 samples
    >>> librosa.Func(np.arange(0, 22050, 256))
    array([ 0,  0,  1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6,
            7,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 13, 13,
           14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20,
           21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
           28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34,
           35, 35, 36, 36, 37, 37, 38, 38, 39, 39, 40, 40, 41, 41,
           42, 42, 43])

    Parameters
    ----------
    samples : int or np.ndarray [shape=(n,)]
        sample index or vector of sample indices

    hop_length : int > 0 [scalar]
        number of samples between successive frames

    n_fft : None or int > 0 [scalar]
        Optional: length of the FFT window.
        If given, time conversion will include an offset of `- n_fft / 2`
        to counteract windowing effects in STFT.

        .. note:: This may result in negative frame indices.

    Returns
    -------
    frames : int or np.ndarray [shape=(n,), dtype=int]
        Frame numbers corresponding to the given times:
        `frames[i] = floor( samples[i] / hop_length )`

    See Also
    --------
    samples_to_time : convert sample indices to time values
    frames_to_samples : convert frame indices to sample indices
    """

    arg_3 = 0
    if arg_2 is not None:
        arg_3 = int(arg_2 // 2)

    arg_0 = np.asanyarray(arg_0)
    return np.floor((arg_0 - arg_3) // arg_1).astype(int)

Converts sample indices into STFT frames.

    Examples
    --------
    >>> # Get the frame numbers for every 256 samples
    >>> librosa.samples_to_frames(np.arange(0, 22050, 256))
    array([ 0,  0,  1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6,
            7,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 13, 13,
           14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20,
           21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
           28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34,
           35, 35, 36, 36, 37, 37, 38, 38, 39, 39, 40, 40, 41, 41,
           42, 42, 43])

    Parameters
    ----------
    samples : int or np.ndarray [shape=(n,)]
        sample index or vector of sample indices

    hop_length : int > 0 [scalar]
        number of samples between successive frames

    n_fft : None or int > 0 [scalar]
        Optional: length of the FFT window.
        If given, time conversion will include an offset of `- n_fft / 2`
        to counteract windowing effects in STFT.

        .. note:: This may result in negative frame indices.

    Returns
    -------
    frames : int or np.ndarray [shape=(n,), dtype=int]
        Frame numbers corresponding to the given times:
        `frames[i] = floor( samples[i] / hop_length )`

    See Also
    --------
    samples_to_time : convert sample indices to time values
    frames_to_samples : convert frame indices to sample indices

Converts sample indices into STFT frames .


def Func ( arg_0 , arg_1 ) : arg_2 = dtoolcore . ProtoDataSet . from_uri ( uri = arg_0 ) _validate_and_put_readme ( arg_2 , arg_1 . read ( ) )

def Func(arg_0, arg_1):
    """Use YAML from a file or stdin to populate the readme.

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

    echo "desc: my data" | dtool readme Func <DS_URI> -
    """
    arg_2 = dtoolcore.ProtoDataSet.from_uri(
        uri=arg_0
    )
    _validate_and_put_readme(arg_2, arg_1.read())

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

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

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

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


def Func(arg_0, arg_1, arg_2):
        """ Execute 'source'. If 'hidden', do not show any output.

        See parent class :meth:`execute` docstring for full details.
        """
        arg_3 = arg_0.kernel_manager.shell_channel.execute(arg_1, arg_2)
        arg_0._request_info['execute'][arg_3] = arg_0._ExecutionRequest(arg_3, 'user')
        arg_0._hidden = arg_2
        if not arg_2:
            arg_0.executing.emit(arg_1)

Execute source . If hidden do not show any output .


def Func ( arg_0 ) : if arg_0 . children . count ( ) == 0 : return True arg_1 = set ( arg_0 . ancestors_root ( ) ) arg_2 = set ( arg_0 . children . all ( ) ) return arg_2 . issubset ( arg_1 )

def Func(arg_0):
        """Returns True if it is legal to remove this node and still leave the
        graph as a single connected entity, not splitting it into a forest.
        Only nodes with no children or those who cause a cycle can be deleted.
        """
        if arg_0.children.count() == 0:
            return True

        arg_1 = set(arg_0.ancestors_root())
        arg_2 = set(arg_0.children.all())
        return arg_2.issubset(arg_1)

Returns True if it is legal to remove this node and still leave the graph as a single connected entity not splitting it into a forest . Only nodes with no children or those who cause a cycle can be deleted .


def Func(arg_0):
        """
        Kill all child processes on exit since we don't want to leave
        them as orphaned.
        """
        arg_1 = arg_0.get_all_pids()
        if len(arg_1) > 0:
            # First try SIGTERM
            arg_2 = psutil.Process(os.getpid())
            # Only check child processes to ensure that we don't have a case
            # where we kill the wrong process because a child process died
            # but the PID got reused.
            arg_3 = [x for x in arg_2.children(recursive=True)
                               if x.is_running() and x.pid in arg_1]
            for arg_4 in arg_3:
                arg_0.log.info("Terminating child PID: %s", arg_4.pid)
                arg_4.terminate()
            # TODO: Remove magic number
            arg_5 = 5
            arg_0.log.info("Waiting up to %s seconds for processes to exit...", arg_5)
            try:
                psutil.wait_procs(
                    arg_3, arg_5=arg_5,
                    callback=lambda x: arg_0.log.info('Terminated PID %s', x.pid))
            except psutil.TimeoutExpired:
                arg_0.log.debug("Ran out of time while waiting for processes to exit")

            # Then SIGKILL
            arg_3 = [x for x in arg_2.children(recursive=True)
                               if x.is_running() and x.pid in arg_1]
            if len(arg_3) > 0:
                arg_0.log.info("SIGKILL processes that did not terminate gracefully")
                for arg_4 in arg_3:
                    arg_0.log.info("Killing child PID: %s", arg_4.pid)
                    arg_4.kill()
                    arg_4.wait()

Kill all child processes on exit since we don t want to leave them as orphaned .


def
Func
(
arg_0
)
:
arg_0
.
add_argument
(
'--verbose'
,
metavar
=
'(a boolean; default: "false")'
,
type
=
bool
,
default
=
False
)
return
arg_0

def Func(arg_0):
  """ add optional verbose argument"""
  arg_0.add_argument(
      '--verbose',
      metavar='(a boolean; default: "false")',
      type=bool,
      default=False)
  return arg_0


(self, pid, record, key, version_id, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , ** arg_5 ) : try : arg_6 = arg_2 . files [ str ( arg_3 ) ] . Func_version ( arg_4 = arg_4 ) return arg_0 . make_response ( arg_6 = arg_6 or abort ( 404 ) , arg_1 = arg_1 , arg_2 = arg_2 ) except KeyError : abort ( 404 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, **arg_5):
        """Get file.

        Permission required: `read_permission_factory`.

        :param pid: Pid object (from url).
        :param record: Record object resolved from the pid.
        :param key: Unique identifier for the file in the deposit.
        :param version_id: File version. Optional. If no version is provided,
            the last version is retrieved.
        :returns: the file content.
        """
        try:
            arg_6 = arg_2.files[str(arg_3)].Func_version(arg_4=arg_4)
            return arg_0.make_response(
                arg_6=arg_6 or abort(404), arg_1=arg_1, arg_2=arg_2)
        except KeyError:
            abort(404)


def Func ( arg_0 , arg_1 ) : arg_1 [ 'sampleCount' ] += sum ( arg_0 . Func ( arg_2 ) for arg_2 in arg_1 [ 'children' ] ) return arg_1 [ 'sampleCount' ]

def Func(arg_0, arg_1):
        """Counts and fills sample counts inside call tree."""
        arg_1['sampleCount'] += sum(
            arg_0.Func(arg_2) for arg_2 in arg_1['children'])
        return arg_1['sampleCount']

Counts and fills sample counts inside call tree .


def Func ( arg_0 , arg_1 , arg_2 = True ) : if len ( arg_0 . analytes ) == 1 : arg_3 = nominal_values ( arg_1 [ arg_0 . analytes [ 0 ] ] ) arg_4 = np . array ( list ( zip ( arg_3 , np . zeros ( len ( arg_3 ) ) ) ) ) else : arg_3 = [ nominal_values ( arg_1 [ a ] ) for a in arg_0 . analytes ] arg_4 = np . vstack ( arg_3 ) . T arg_5 = np . isfinite ( arg_4 ) . sum ( 1 ) == arg_4 . shape [ 1 ] arg_6 = np . arange ( arg_1 [ arg_0 . analytes [ 0 ] ] . size ) [ arg_5 ] arg_4 = arg_4 [ arg_5 ] if arg_2 : arg_4 = arg_0 . scaler . transform ( arg_4 ) return arg_4 , arg_6

def Func(arg_0, arg_1, arg_2=True):
        """
        Function for converting a dict to an array suitable for sklearn.

        Parameters
        ----------
        data : dict
            A dict of data, containing all elements of
            `analytes` as items.
        scale : bool
            Whether or not to scale the data. Should always be
            `True`, unless used by `classifier.fitting_data`
            where a scaler hasn't been created yet.

        Returns
        -------
        A data array suitable for use with `sklearn.cluster`.
        """
        if len(arg_0.analytes) == 1:
            # if single analyte
            arg_3 = nominal_values(arg_1[arg_0.analytes[0]])
            arg_4 = np.array(list(zip(arg_3, np.zeros(len(arg_3)))))
        else:
            # package multiple analytes
            arg_3 = [nominal_values(arg_1[a]) for a in arg_0.analytes]
            arg_4 = np.vstack(arg_3).T

        # identify all nan values
        arg_5 = np.isfinite(arg_4).sum(1) == arg_4.shape[1]
        # remember which values are sampled
        arg_6 = np.arange(arg_1[arg_0.analytes[0]].size)[arg_5]
        # remove all nan values
        arg_4 = arg_4[arg_5]

        if arg_2:
            arg_4 = arg_0.scaler.transform(arg_4)

        return arg_4, arg_6

Function for converting a dict to an array suitable for sklearn .


def Func ( arg_0 , arg_1 = True ) : if arg_0 is None : arg_2 = b'NONE' arg_3 = b'NULL' elif isinstance ( arg_0 , six . binary_type ) : arg_2 = arg_0 arg_3 = b'TXT' elif isinstance ( arg_0 , six . text_type ) : arg_2 = arg_0 . encode ( 'utf-8' ) arg_3 = b'TXT' elif isinstance ( arg_0 , _intlike ) : arg_2 = _int_to_bytes ( arg_0 ) arg_3 = b'INT' elif isinstance ( arg_0 , float ) : arg_4 , arg_5 = float ( arg_0 ) . as_integer_ratio ( ) arg_2 = _int_to_bytes ( arg_4 ) + b'/' + _int_to_bytes ( arg_5 ) arg_3 = b'FLT' else : arg_6 = _HASHABLE_EXTENSIONS . lookup ( arg_0 ) arg_3 , arg_2 = arg_6 ( arg_0 ) if arg_1 : return arg_3 , arg_2 else : return b'' , arg_2

def Func(arg_0, arg_1=True):
    r"""
    Converts `data` into a hashable byte representation if an appropriate
    hashing function is known.

    Args:
        data (object): ordered data with structure
        types (bool): include type prefixes in the hash

    Returns:
        tuple(bytes, bytes): prefix, hashable:
            a prefix hinting the original data type and the byte representation
            of `data`.

    Raises:
        TypeError : if data has no registered hash methods

    Example:
        >>> assert Func(None) == (b'NULL', b'NONE')
        >>> assert Func('string') == (b'TXT', b'string')
        >>> assert Func(1) == (b'INT', b'\x01')
        >>> assert Func(1.0) == (b'FLT', b'\x01/\x01')
        >>> assert Func(_intlike[-1](1)) == (b'INT', b'\x01')
    """
    # HANDLE MOST COMMON TYPES FIRST
    if arg_0 is None:
        arg_2 = b'NONE'
        arg_3 = b'NULL'
    elif isinstance(arg_0, six.binary_type):
        arg_2 = arg_0
        arg_3 = b'TXT'
    elif isinstance(arg_0, six.text_type):
        # convert unicode into bytes
        arg_2 = arg_0.encode('utf-8')
        arg_3 = b'TXT'
    elif isinstance(arg_0, _intlike):
        # warnings.warn('Hashing ints is slow, numpy is prefered')
        arg_2 = _int_to_bytes(arg_0)
        # hashable = data.to_bytes(8, byteorder='big')
        arg_3 = b'INT'
    elif isinstance(arg_0, float):
        arg_4, arg_5 = float(arg_0).as_integer_ratio()
        arg_2 = _int_to_bytes(arg_4) + b'/' +  _int_to_bytes(arg_5)
        arg_3 = b'FLT'
    else:
        # Then dynamically look up any other type
        arg_6 = _HASHABLE_EXTENSIONS.lookup(arg_0)
        arg_3, arg_2 = arg_6(arg_0)
    if arg_1:
        return arg_3, arg_2
    else:
        return b'', arg_2

r"""
    Converts `data` into a hashable byte representation if an appropriate
    hashing function is known.

    Args:
        data (object): ordered data with structure
        types (bool): include type prefixes in the hash

    Returns:
        tuple(bytes, bytes): prefix, hashable:
            a prefix hinting the original data type and the byte representation
            of `data`.

    Raises:
        TypeError : if data has no registered hash methods

    Example:
        >>> assert _convert_to_hashable(None) == (b'NULL', b'NONE')
        >>> assert _convert_to_hashable('string') == (b'TXT', b'string')
        >>> assert _convert_to_hashable(1) == (b'INT', b'\x01')
        >>> assert _convert_to_hashable(1.0) == (b'FLT', b'\x01/\x01')
        >>> assert _convert_to_hashable(_intlike[-1](1)) == (b'INT', b'\x01')

r Converts data into a hashable byte representation if an appropriate hashing function is known .


def Func ( arg_0 ) : arg_1 = dict ( action = 'db-stats' ) arg_2 = arg_0 . _api_request ( params = arg_1 ) arg_3 = DBStats ( total_clicks = int ( arg_2 [ 'db-stats' ] [ 'total_clicks' ] ) , total_links = int ( arg_2 [ 'db-stats' ] [ 'total_links' ] ) ) return arg_3

def Func(arg_0):
        """Get database statistics.

        Returns:
            DBStats: Total clicks and links statistics.

        Raises:
            requests.exceptions.HTTPError: Generic HTTP Error
        """
        arg_1 = dict(action='db-stats')
        arg_2 = arg_0._api_request(params=arg_1)

        arg_3 = DBStats(total_clicks=int(arg_2['db-stats']['total_clicks']),
                        total_links=int(arg_2['db-stats']['total_links']))

        return arg_3


def Func ( arg_0 , ** arg_1 ) : for arg_2 in arg_1 . keys ( ) : try : arg_3 = getattr ( arg_0 , arg_2 ) except _a11y . Error : return False if sys . version_info [ : 2 ] <= ( 2 , 6 ) : if isinstance ( arg_3 , basestring ) : if not fnmatch . fnmatch ( unicode ( arg_3 ) , arg_1 [ arg_2 ] ) : return False else : if arg_3 != arg_1 [ arg_2 ] : return False elif sys . version_info [ 0 ] == 3 : if isinstance ( arg_3 , str ) : if not fnmatch . fnmatch ( arg_3 , str ( arg_1 [ arg_2 ] ) ) : return False else : if arg_3 != arg_1 [ arg_2 ] : return False else : if isinstance ( arg_3 , str ) or isinstance ( arg_3 , unicode ) : if not fnmatch . fnmatch ( arg_3 , arg_1 [ arg_2 ] ) : return False else : if arg_3 != arg_1 [ arg_2 ] : return False return True

def Func(arg_0, **arg_1):
        """Method which indicates if the object matches specified criteria.

        Match accepts criteria as kwargs and looks them up on attributes.
        Actual matching is performed with fnmatch, so shell-like wildcards
        work within match strings. Examples:

        obj.Func(AXTitle='Terminal*')
        obj.Func(AXRole='TextField', AXRoleDescription='search text field')
        """
        for arg_2 in arg_1.keys():
            try:
                arg_3 = getattr(arg_0, arg_2)
            except _a11y.Error:
                return False
            # Not all values may be strings (e.g. size, position)
            if sys.version_info[:2] <= (2, 6):
                if isinstance(arg_3, basestring):
                    if not fnmatch.fnmatch(unicode(arg_3), arg_1[arg_2]):
                        return False
                else:
                    if arg_3 != arg_1[arg_2]:
                        return False
            elif sys.version_info[0] == 3:
                if isinstance(arg_3, str):
                    if not fnmatch.fnmatch(arg_3, str(arg_1[arg_2])):
                        return False
                else:
                    if arg_3 != arg_1[arg_2]:
                        return False
            else:
                if isinstance(arg_3, str) or isinstance(arg_3, unicode):
                    if not fnmatch.fnmatch(arg_3, arg_1[arg_2]):
                        return False
                else:
                    if arg_3 != arg_1[arg_2]:
                        return False
        return True

Method which indicates if the object matches specified criteria.

        Match accepts criteria as kwargs and looks them up on attributes.
        Actual matching is performed with fnmatch, so shell-like wildcards
        work within match strings. Examples:

        obj._match(AXTitle='Terminal*')
        obj._match(AXRole='TextField', AXRoleDescription='search text field')

Method which indicates if the object matches specified criteria .


def Func ( arg_0 ) : for arg_1 , arg_2 in enumerate ( arg_0 . g . edges ( ) ) : arg_0 . g . set_ep ( arg_2 , 'edge_color' , arg_0 . edge2queue [ arg_1 ] . colors [ 'edge_color' ] ) for arg_3 in arg_0 . g . nodes ( ) : arg_0 . g . set_vp ( arg_3 , 'vertex_fill_color' , arg_0 . colors [ 'vertex_fill_color' ] )

def Func(arg_0):
        """Resets all edge and vertex colors to their default values."""
        for arg_1, arg_2 in enumerate(arg_0.g.edges()):
            arg_0.g.set_ep(arg_2, 'edge_color', arg_0.edge2queue[arg_1].colors['edge_color'])
        for arg_3 in arg_0.g.nodes():
            arg_0.g.set_vp(arg_3, 'vertex_fill_color', arg_0.colors['vertex_fill_color'])

Resets all edge and vertex colors to their default values .


def Func(arg_0, arg_1):
    """Remove user from a group."""
    arg_2 = Group.query.get_or_404(arg_0)
    arg_3 = User.query.get_or_404(arg_1)

    if arg_2.can_edit(current_user):
        try:
            arg_2.Func_member(arg_3)
        except Exception as e:
            flash(str(e), "error")
            return redirect(urlparse(request.referrer).path)

        flash(_('User %(user_email)s was Funcd from %(group_name)s group.',
                user_email=arg_3.email, group_name=arg_2.name), 'success')
        return redirect(urlparse(request.referrer).path)

    flash(
        _(
            'You cannot delete users of the group %(group_name)s',
            group_name=arg_2.name
        ),
        'error'
    )
    return redirect(url_for('.index'))


def Func ( arg_0 , Func ) : arg_0 . _H = Func arg_0 . _T = arg_0 . _calculate_T ( Func )

def Func(arg_0, Func):
        """
        Set the enthalpy of the package to the specified value, and
        recalculate it's temperature.

        :param H: The new enthalpy value. [kWh]
        """

        arg_0._H = Func
        arg_0._T = arg_0._calculate_T(Func)

Set the enthalpy of the package to the specified value and recalculate it s temperature .


def Func(arg_0, arg_1, arg_2=None):
    """Run a python file as if it were the main program on the command line.

    `filename` is the path to the file to execute, it need not be a .py file.
    `args` is the argument array to present as sys.argv, including the first
    element naming the file being executed.  `package` is the name of the
    enclosing package, if any.

    """
    # Create a module to serve as __main__
    arg_3 = arg_5.modules['__main__']
    arg_4 = imp.new_module('__main__')
    arg_5.modules['__main__'] = arg_4
    arg_4.__file__ = arg_0
    if arg_2:
        arg_4.__package__ = arg_2
    arg_4.__builtins__ = BUILTINS

    # Set sys.argv properly.
    arg_10 = arg_5.argv
    arg_5.argv = arg_1

    try:
        # Make a code object somehow.
        if arg_0.endswith(".pyc") or arg_0.endswith(".pyo"):
            arg_12 = make_code_from_pyc(arg_0)
        else:
            arg_12 = make_code_from_py(arg_0)

        # Execute the code object.
        try:
            exec_code_object(arg_12, arg_4.__dict__)
        except SystemExit:
            # The user called sys.exit().  Just pass it along to the upper
            # layers, where it will be handled.
            raise
        except:
            # Something went wrong while executing the user code.
            # Get the exc_info, and pack them into an exception that we can
            # throw up to the outer loop.  We peel two layers off the traceback
            # so that the coverage.py code doesn't appear in the final printed
            # traceback.
            arg_13, arg_14, arg_15 = arg_5.exc_info()
            raise ExceptionDuringRun(arg_13, arg_14, arg_15.tb_next.tb_next)
    finally:
        # Restore the old __main__
        arg_5.modules['__main__'] = arg_3

        # Restore the old argv and path
        arg_5.argv = arg_10

Run a python file as if it were the main program on the command line .


(
            self,
            station: int
    )

return [Price.deserialize(data) for data in data['prices']]

def Func ( arg_0 , arg_1 : arg_2 ) -> List [ Price ] : arg_3 = requests . get ( '{}/prices/station/{}' . format ( API_URL_BASE , arg_1 ) , headers = arg_0 . _get_headers ( ) , timeout = arg_0 . _timeout , ) if not arg_3 . ok : raise FuelCheckError . create ( arg_3 ) arg_4 = arg_3 . json ( ) return [ Price . deserialize ( arg_4 ) for arg_4 in arg_4 [ 'prices' ] ]

def Func(
            arg_0,
            arg_1: arg_2
    ) -> List[Price]:
        """Gets the fuel prices for a specific fuel station."""
        arg_3 = requests.get(
            '{}/prices/station/{}'.format(API_URL_BASE, arg_1),
            headers=arg_0._get_headers(),
            timeout=arg_0._timeout,
        )

        if not arg_3.ok:
            raise FuelCheckError.create(arg_3)

        arg_4 = arg_3.json()
        return [Price.deserialize(arg_4) for arg_4 in arg_4['prices']]

Gets the fuel prices for a specific fuel station .


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

def Func(arg_0):
    """Extracts the day from a datetime sample.

    :returns: an expression containing the day extracted from a datetime column.

    Example:

    >>> import vaex
    >>> import numpy as np
    >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64)
    >>> df = vaex.from_arrays(date=date)
    >>> df
      #  date
      0  2009-10-12 03:31:00
      1  2016-02-11 10:17:34
      2  2015-11-12 11:34:22

    >>> df.date.dt.day
    Expression = Func(date)
    Length: 3 dtype: int64 (expression)
    -----------------------------------
    0  12
    1  11
    2  12
    """
    import pandas as pd
    return pd.Series(arg_0).dt.day.values

Extracts the day from a datetime sample.

    :returns: an expression containing the day extracted from a datetime column.

    Example:

    >>> import vaex
    >>> import numpy as np
    >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64)
    >>> df = vaex.from_arrays(date=date)
    >>> df
      #  date
      0  2009-10-12 03:31:00
      1  2016-02-11 10:17:34
      2  2015-11-12 11:34:22

    >>> df.date.dt.day
    Expression = dt_day(date)
    Length: 3 dtype: int64 (expression)
    -----------------------------------
    0  12
    1  11
    2  12

Extracts the day from a datetime sample .


def Func(arg_0, arg_1, arg_2):
        """AsyncIO coroutine Func to launch socket listening.

        :Example:

        ::

            @asyncio.coroutine
            def start(request):
                print('Receive a FastAGI request')
                print(['AGI variables:', request.headers])

            fa_app = Application()
            fa_app.add_route('calls/start', start)
            coro = asyncio.start_server(fa_app.Func, '0.0.0.0', 4574)
            server = loop.run_until_complete(coro)

        See https://docs.python.org/3/library/asyncio-stream.html
        """
        arg_3 = b''
        while b'\n\n' not in arg_3:
            arg_3 += yield from arg_1.read(arg_0.buf_size)
        arg_4 = arg_3[:-2].decode(arg_0.default_encoding).split('\n')
        arg_5 = OrderedDict([
            line.split(': ', 1) for line in arg_4 if ': ' in line
        ])

        arg_6 = arg_5.get('agi_network_script')
        log.info('Received FastAGI request from %r for "%s" route',
                 arg_2.get_extra_info('peername'), arg_6)
        log.debug("Asterisk Headers: %r", arg_5)

        if arg_6 is not None:
            arg_7 = arg_0._route.get(arg_6)
            if arg_7 is not None:
                arg_8 = Request(app=arg_0,
                                  arg_5=arg_5,
                                  arg_1=arg_1, arg_2=arg_2,
                                  encoding=arg_0.default_encoding)
                try:
                    yield from arg_7(arg_8)
                except BaseException:
                    log.exception(
                        'An exception has been raised for the request "%s"',
                        arg_6
                    )
            else:
                log.error('No route for the request "%s"', arg_6)
        else:
            log.error('No agi_network_script header for the request')
        log.debug("Closing client socket")
        arg_2.close()

AsyncIO coroutine handler to launch socket listening.

        :Example:

        ::

            @asyncio.coroutine
            def start(request):
                print('Receive a FastAGI request')
                print(['AGI variables:', request.headers])

            fa_app = Application()
            fa_app.add_route('calls/start', start)
            coro = asyncio.start_server(fa_app.handler, '0.0.0.0', 4574)
            server = loop.run_until_complete(coro)

        See https://docs.python.org/3/library/asyncio-stream.html

AsyncIO coroutine handler to launch socket listening .


(s, region_size=40, max_iter=2, damping=1.0,
        decrease_damp_factor=10., run_length=4, collect_stats=False, **kwargs)

def Func(arg_0, arg_1=40, arg_2=2, arg_3=1.0,
        arg_4=10., arg_5=4, arg_6=False, **arg_7):
    """
    Levenberg-Marquardt optimization for every particle in the state.

    Convenience wrapper for LMParticleGroupCollection. Same keyword args,
    but I've set the defaults to what I've found to be useful values for
    optimizing particles. See LMParticleGroupCollection for documentation.

    See Also
    --------
        do_levmarq_particles : Levenberg-Marquardt optimization of a
            specified set of particles.

        do_levmarq : Levenberg-Marquardt optimization of the entire state;
            useful for optimizing global parameters.

        LMParticleGroupCollection : The workhorse of do_levmarq.

        LMEngine : Engine superclass for all the optimizers.
    """
    arg_8 = LMParticleGroupCollection(arg_0, arg_1=arg_1, arg_3=arg_3,
            arg_5=arg_5, arg_4=arg_4,
            get_cos=arg_6, arg_2=arg_2, **arg_7)
    arg_8.do_run_2()
    if arg_6:
        return arg_8.stats

Levenberg - Marquardt optimization for every particle in the state .


return text[start_position:position - 1]

def Func(arg_0, arg_1):
  r"""Retrieves all the text between matching open and close parentheses.

  Given a string of lines and a regular expression string, retrieve all the text
  following the expression and between opening punctuation symbols like
  (, [, or {, and the matching close-punctuation symbol. This properly nested
  occurrences of the punctuations, so for the text like
    printf(a(), b(c()));
  a call to Func(text, r'printf\(') will return 'a(), b(c())'.
  start_pattern must match string having an open punctuation symbol at the end.

  Args:
    text: The lines to extract text. Its comments and strings must be elided.
           It can be single line and can span multiple lines.
    start_pattern: The regexp string indicating where to start extracting
                   the text.
  Returns:
    The extracted text.
    None if either the opening string or ending punctuation could not be found.
  """
  # TODO(unknown): Audit cpplint.py to see what places could be profitably
  # rewritten to use Func (and use inferior regexp matching today).

  # Give opening punctuations to get the matching close-punctuations.
  arg_2 = {'(': ')', '{': '}', '[': ']'}
  arg_3 = set(itervalues(arg_2))

  # Find the position to start extracting text.
  arg_4 = re.search(arg_1, arg_0, re.M)
  if not arg_4:  # start_pattern not found in text.
    return None
  arg_5 = arg_4.end(0)

  assert arg_5 > 0, (
      'start_pattern must ends with an opening punctuation.')
  assert arg_0[arg_5 - 1] in arg_2, (
      'start_pattern must ends with an opening punctuation.')
  # Stack of closing punctuations we expect to have in text after position.
  arg_6 = [arg_2[arg_0[arg_5 - 1]]]
  arg_7 = arg_5
  while arg_6 and arg_7 < len(arg_0):
    if arg_0[arg_7] == arg_6[-1]:
      arg_6.pop()
    elif arg_0[arg_7] in arg_3:
      # A closing punctuation without matching opening punctuations.
      return None
    elif arg_0[arg_7] in arg_2:
      arg_6.append(arg_2[arg_0[arg_7]])
    arg_7 += 1
  if arg_6:
    # Opening punctuations left without matching close-punctuations.
    return None
  # punctuations match.
  return arg_0[arg_5:arg_7 - 1]

r"""Retrieves all the text between matching open and close parentheses.

  Given a string of lines and a regular expression string, retrieve all the text
  following the expression and between opening punctuation symbols like
  (, [, or {, and the matching close-punctuation symbol. This properly nested
  occurrences of the punctuations, so for the text like
    printf(a(), b(c()));
  a call to _GetTextInside(text, r'printf\(') will return 'a(), b(c())'.
  start_pattern must match string having an open punctuation symbol at the end.

  Args:
    text: The lines to extract text. Its comments and strings must be elided.
           It can be single line and can span multiple lines.
    start_pattern: The regexp string indicating where to start extracting
                   the text.
  Returns:
    The extracted text.
    None if either the opening string or ending punctuation could not be found.

r Retrieves all the text between matching open and close parentheses .


(self, price=0, address=None, caller=None, balance=0, init=None, gas=None)

def Func(arg_0, arg_1=0, arg_2=None, arg_3=None, arg_4=0, arg_5=None, arg_6=None):
        """
        Create a contract account. Sends a transaction to initialize the contract

        :param address: the address of the new account, if known. If omitted, a new address will be generated as closely to the Yellow Paper as possible.
        :param balance: the initial balance of the account in Wei
        :param init: the initialization code of the contract

        The way that the Solidity compiler expects the constructor arguments to
        be passed is by appending the arguments to the byte code produced by the
        Solidity compiler. The arguments are formatted as defined in the Ethereum
        ABI2. The arguments are then copied from the init byte array to the EVM
        memory through the CODECOPY opcode with appropriate values on the stack.
        This is done when the byte code in the init byte array is actually run
        on the network.
        """
        arg_7 = arg_0.create_account(arg_0.new_address(sender=arg_3))
        if arg_2 is None:
            arg_2 = arg_7
        elif arg_3 is not None and arg_2 != arg_7:
            raise EthereumError(f"Error: contract created from address {hex(caller)} with nonce {self.get_nonce(caller)} was expected to be at address {hex(expected_address)}, but Func was called with address={hex(address)}")
        arg_0.start_transaction('CREATE', arg_2, arg_1, arg_5, arg_3, arg_4, arg_6=arg_6)
        arg_0._process_pending_transaction()
        return arg_2

Create a contract account . Sends a transaction to initialize the contract


def Func ( arg_0 , arg_1 = arg_2 , arg_3 = arg_4 ) : if arg_3 is None : arg_3 = arg_4 if arg_1 is None : arg_1 = arg_2 if not is_hermitian_matrix ( arg_0 , arg_1 = arg_1 , arg_3 = arg_3 ) : return False arg_5 = np . linalg . eigvalsh ( arg_0 ) for arg_6 in arg_5 : if arg_6 < - arg_3 : return False return True

def Func(arg_0, arg_1=arg_2, arg_3=arg_4):
    """Test if a matrix is positive semidefinite"""
    if arg_3 is None:
        arg_3 = arg_4
    if arg_1 is None:
        arg_1 = arg_2
    if not is_hermitian_matrix(arg_0, arg_1=arg_1, arg_3=arg_3):
        return False
    # Check eigenvalues are all positive
    arg_5 = np.linalg.eigvalsh(arg_0)
    for arg_6 in arg_5:
        if arg_6 < -arg_3:
            return False
    return True


def Func(arg_0):
        """
        Determine the amount flow rates of all the compounds.

        :returns: List of amount flow rates. [kmol/h]
        """

        arg_1 = arg_0._compound_mfrs * 1.0
        for arg_2 in arg_0.material.compounds:
            arg_3 = arg_0.material.get_compound_index(arg_2)
            arg_1[arg_3] = stoich.amount(arg_2, arg_1[arg_3])
        return arg_1

Determine the amount flow rates of all the compounds .


return self._disassoc('children', parent_id, group_id)

def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : arg_4 = arg_0 . lookup_with_inventory ( arg_2 , arg_3 . get ( 'inventory' , None ) ) [ 'id' ] arg_5 = arg_0 . lookup_with_inventory ( arg_1 , arg_3 . get ( 'inventory' , None ) ) [ 'id' ] return arg_0 . _disassoc ( 'children' , arg_4 , arg_5 )

def Func(arg_0, arg_1, arg_2, **arg_3):
        """Disassociate this group from the specified group.

        =====API DOCS=====
        Disassociate this group with the specified group.

        :param group: Primary key or name of the child group to Func.
        :type group: str
        :param parent: Primary key or name of the parent group to Func from.
        :type parent: str
        :param inventory: Primary key or name of the inventory the disassociation should happen in.
        :type inventory: str
        :returns: Dictionary of only one key "changed", which indicates whether the disassociation succeeded.
        :rtype: dict

        =====API DOCS=====
        """
        arg_4 = arg_0.lookup_with_inventory(arg_2, arg_3.get('inventory', None))['id']
        arg_5 = arg_0.lookup_with_inventory(arg_1, arg_3.get('inventory', None))['id']
        return arg_0._disassoc('children', arg_4, arg_5)

Disassociate this group from the specified group.

        =====API DOCS=====
        Disassociate this group with the specified group.

        :param group: Primary key or name of the child group to disassociate.
        :type group: str
        :param parent: Primary key or name of the parent group to disassociate from.
        :type parent: str
        :param inventory: Primary key or name of the inventory the disassociation should happen in.
        :type inventory: str
        :returns: Dictionary of only one key "changed", which indicates whether the disassociation succeeded.
        :rtype: dict

        =====API DOCS=====

Disassociate this group from the specified group .


def Func ( arg_0 ) : arg_1 = dict ( ) for arg_2 , arg_3 in zip ( arg_0 . zs , arg_0 . atomss ) : for arg_4 , arg_5 in arg_3 . iteritems ( ) : if arg_4 in arg_1 : arg_1 [ arg_4 ] += arg_2 * arg_5 else : arg_1 [ arg_4 ] = arg_2 * arg_5 return Func ( arg_1 )

def Func(arg_0):
        r'''Dictionary of mass fractions for each atom in the mixture.

        Examples
        --------
        >>> Mixture(['CO2', 'O2'], zs=[0.5, 0.5]).Func
        {'C': 0.15801826905745822, 'O': 0.8419817309425419}
        '''
        arg_1 = dict()
        for arg_2, arg_3 in zip(arg_0.zs, arg_0.atomss):
            for arg_4, arg_5 in arg_3.iteritems():
                if arg_4 in arg_1:
                    arg_1[arg_4] += arg_2*arg_5
                else:
                    arg_1[arg_4] = arg_2*arg_5
        return Func(arg_1)

r Dictionary of mass fractions for each atom in the mixture .


def
Func
(
arg_0
)
:
arg_1
=
object
(
)
def
_by_class
(
*
arg_2
,
**
arg_3
)
:
arg_4
=
arg_2
[
0
]
.
__class__
for
arg_5
in
type
(
arg_4
.
__name__
,
(
arg_4
,
object
)
,
{
}
)
.
__mro__
:
arg_10
=
arg_8
(
arg_5
,
arg_1
)
if
arg_10
is
not
arg_1
:
return
arg_10
(
*
arg_2
,
**
arg_3
)
else
:
return
arg_0
(
*
arg_2
,
**
arg_3
)
arg_6
=
{
object
:
arg_0
}
try
:
arg_6
[
arg_7
]
=
_by_class
except
NameError
:
pass
arg_8
=
arg_6
.
get
def
arg_20
(
*
arg_9
)
:
for
arg_5
in
arg_9
:
if
not
isinstance
(
arg_5
,
classtypes
)
:
raise
TypeError
(
"%r is not a type or class"
%
(
arg_5
,
)
)
def
decorate
(
arg_10
)
:
for
arg_5
in
arg_9
:
if
arg_6
.
setdefault
(
arg_5
,
arg_10
)
is
not
arg_10
:
raise
TypeError
(
"%r already has method for type %r"
%
(
arg_0
,
arg_5
)
)
return
arg_10
return
decorate
arg_11
=
{
}
arg_12
=
arg_11
.
get
def
arg_21
(
*
arg_13
)
:
def
decorate
(
arg_10
)
:
for
arg_14
in
arg_13
:
if
arg_11
.
setdefault
(
id
(
arg_14
)
,
(
arg_14
,
arg_10
)
)
[
1
]
is
not
arg_10
:
raise
TypeError
(
"%r already has method for object %r"
%
(
arg_0
,
arg_14
)
)
return
arg_10
return
decorate
def
arg_15
(
*
arg_2
,
**
arg_3
)
:
arg_10
=
arg_12
(
id
(
arg_2
[
0
]
)
,
arg_1
)
if
arg_10
is
arg_1
:
for
arg_5
in
type
(
arg_2
[
0
]
)
.
__mro__
:
arg_10
=
arg_8
(
arg_5
,
arg_1
)
if
arg_10
is
not
arg_1
:
return
arg_10
(
*
arg_2
,
**
arg_3
)
else
:
return
arg_0
(
*
arg_2
,
**
arg_3
)
else
:
return
arg_10
[
1
]
(
*
arg_2
,
**
arg_3
)
arg_15
.
__name__
=
arg_0
.
__name__
arg_15
.
__dict__
=
arg_0
.
__dict__
.
copy
(
)
arg_15
.
__doc__
=
arg_0
.
__doc__
arg_15
.
__module__
=
arg_0
.
__module__
arg_15
.
when_type
=
arg_20
arg_15
.
when_object
=
arg_21
arg_15
.
default
=
arg_0
arg_15
.
has_object
=
lambda
arg_14
:
id
(
arg_14
)
in
arg_11
arg_15
.
has_type
=
lambda
arg_5
:
arg_5
in
arg_6
return
arg_15

def Func(arg_0):
    """Create a simple Func function"""

    arg_1 = object()

    def _by_class(*arg_2, **arg_3):
        arg_4 = arg_2[0].__class__
        for arg_5 in type(arg_4.__name__, (arg_4,object), {}).__mro__:
            arg_10 = arg_8(arg_5, arg_1)
            if arg_10 is not arg_1:
                return arg_10(*arg_2, **arg_3)
        else:
            return arg_0(*arg_2, **arg_3)

    arg_6 = {object: arg_0}
    try:
        arg_6[arg_7] = _by_class
    except NameError:   # Python 3
        pass

    arg_8 = arg_6.get

    def arg_20(*arg_9):
        """Decorator to add a method that will be called for the given types"""
        for arg_5 in arg_9:
            if not isinstance(arg_5, classtypes):
                raise TypeError(
                    "%r is not a type or class" % (arg_5,)
                )
        def decorate(arg_10):
            for arg_5 in arg_9:
                if arg_6.setdefault(arg_5,arg_10) is not arg_10:
                    raise TypeError(
                        "%r already has method for type %r" % (arg_0, arg_5)
                    )
            return arg_10
        return decorate

    arg_11 = {}
    arg_12 = arg_11.get

    def arg_21(*arg_13):
        """Decorator to add a method to be called for the given object(s)"""
        def decorate(arg_10):
            for arg_14 in arg_13:
                if arg_11.setdefault(id(arg_14), (arg_14,arg_10))[1] is not arg_10:
                    raise TypeError(
                        "%r already has method for object %r" % (arg_0, arg_14)
                    )
            return arg_10
        return decorate

    def arg_15(*arg_2, **arg_3):
        arg_10 = arg_12(id(arg_2[0]), arg_1)
        if arg_10 is arg_1:
            for arg_5 in type(arg_2[0]).__mro__:
                arg_10 = arg_8(arg_5, arg_1)
                if arg_10 is not arg_1:
                    return arg_10(*arg_2, **arg_3)
            else:
                return arg_0(*arg_2, **arg_3)
        else:
            return arg_10[1](*arg_2, **arg_3)

    arg_15.__name__       = arg_0.__name__
    arg_15.__dict__       = arg_0.__dict__.copy()
    arg_15.__doc__        = arg_0.__doc__
    arg_15.__module__     = arg_0.__module__

    arg_15.when_type = arg_20
    arg_15.when_object = arg_21
    arg_15.default = arg_0
    arg_15.has_object = lambda arg_14: id(arg_14) in arg_11
    arg_15.has_type   = lambda arg_5: arg_5 in arg_6
    return arg_15


def Func ( arg_0 ) : if not arg_0 : return { } arg_1 = { } for arg_2 in arg_0 . split ( ',' ) : arg_3 , arg_4 = arg_2 . split ( '=' ) arg_1 [ arg_3 . strip ( ) ] = arg_4 . strip ( ) return arg_1

def Func(arg_0):
    """Convert string with SoapySDR device settings to dict"""
    if not arg_0:
        return {}

    arg_1 = {}
    for arg_2 in arg_0.split(','):
        arg_3, arg_4 = arg_2.split('=')
        arg_1[arg_3.strip()] = arg_4.strip()
    return arg_1


def
Func
(
arg_0
,
arg_1
,
arg_2
)
->
str
:
arg_3
=
list
(
arg_1
.
QueryContainers
(
arg_0
.
__database_link
,
{
"query"
:
"SELECT * FROM r WHERE r.id=@id"
,
"parameters"
:
[
{
"name"
:
"@id"
,
"value"
:
arg_2
}
]
}
)
)
if
len
(
arg_3
)
>
0
:
return
arg_3
[
0
]
[
'id'
]
else
:
arg_4
=
arg_1
.
CreateContainer
(
arg_0
.
__database_link
,
{
'id'
:
arg_2
}
)
return
arg_4
[
'id'
]

def Func(arg_0, arg_1, arg_2) -> str:
        """Return the container link.

        Check if the container exists or create the container.

        :param doc_client:
        :param container:
        :return str:
        """
        # query CosmosDB for a container in the database with that name
        arg_3 = list(arg_1.QueryContainers(
            arg_0.__database_link,
            {
                "query": "SELECT * FROM r WHERE r.id=@id",
                "parameters": [
                    {"name": "@id", "value": arg_2}
                ]
            }
        ))
        # if there are results, return the first (container names are unique)
        if len(arg_3) > 0:
            return arg_3[0]['id']
        else:
            # Create a container if it didn't exist
            arg_4 = arg_1.CreateContainer(
                arg_0.__database_link, {'id': arg_2})
            return arg_4['id']


def Func(arg_0, **arg_1):
        """
        Get the list of movies on an account watchlist.

        Args:
            page: (optional) Minimum 1, maximum 1000.
            sort_by: (optional) 'created_at.asc' | 'created_at.desc'
            language: (optional) ISO 639-1 code.

        Returns:
            A dict respresentation of the JSON returned from the API.
        """
        arg_2 = arg_0._get_id_path('Func')
        arg_1.update({'session_id': arg_0.session_id})

        arg_3 = arg_0._GET(arg_2, arg_1)
        arg_0._set_attrs_to_values(arg_3)
        return arg_3

Get the list of movies on an account watchlist .


def
Func
(
arg_0
,
arg_1
,
*
arg_2
,
**
arg_3
)
:
if
arg_0
.
is_Funced
(
arg_1
)
:
raise
AttributeError
(
'callback is already Funced'
)
if
arg_0
.
hard_subscribers
is
:
arg_0
.
hard_subscribers
=
[
]
arg_0
.
hard_subscribers
.
append
(
(
arg_1
,
arg_2
,
arg_3
)
)

def Func(arg_0, arg_1, *arg_2, **arg_3):
        """
        Connects the event with the given callback.
        When the signal is emitted, the callback is invoked.

        .. note::

            The signal handler is stored with a hard reference, so you
            need to make sure to call :class:`disFunc()` if you want the
            handler
            to be garbage collected.

        :type  callback: object
        :param callback: The callback function.
        :type  args: tuple
        :param args: Optional arguments passed to the callback.
        :type  kwargs: dict
        :param kwargs: Optional keyword arguments passed to the callback.
        """
        if arg_0.is_Funced(arg_1):
            raise AttributeError('callback is already Funced')
        if arg_0.hard_subscribers is None:
            arg_0.hard_subscribers = []
        arg_0.hard_subscribers.append((arg_1, arg_2, arg_3))

Connects the event with the given callback.
        When the signal is emitted, the callback is invoked.

        .. note::

            The signal handler is stored with a hard reference, so you
            need to make sure to call :class:`disconnect()` if you want the
            handler
            to be garbage collected.

        :type  callback: object
        :param callback: The callback function.
        :type  args: tuple
        :param args: Optional arguments passed to the callback.
        :type  kwargs: dict
        :param kwargs: Optional keyword arguments passed to the callback.

Connects the event with the given callback . When the signal is emitted the callback is invoked .


def Func ( arg_0 ) : if isinstance ( arg_0 , io . IOBase ) and sys . version_info >= ( 3 , 5 ) : return arg_0 . writable ( ) try : arg_0 . write ( b'' ) except ( io . UnsupportedOperation , IOError ) : return False else : return True

def Func(arg_0):
    """Test whether a stream can be written to.
    """
    if isinstance(arg_0, io.IOBase) and sys.version_info >= (3, 5):
        return arg_0.writable()
    try:
        arg_0.write(b'')
    except (io.UnsupportedOperation, IOError):
        return False
    else:
        return True

Test whether a stream can be written to .


def Func(arg_0, arg_1=arg_2.torus_knot('t'), arg_4=0.001):
    """ Deform a mesh along a parametric curve function

    Provide a parametric curve function with z as the parameter. This will
    deform the xy cross section of the mesh along the curve as z increases.

    Source: http://blackpawn.com/texts/pqtorus/

    Methodology:
    T  = P' - P
    N1 = P' + P
    B  = T x N1
    N  = B x T

    newPoint = point.x*N + point.y*B

    """
    arg_5 = []
    for arg_6, arg_7 in enumerate(arg_1):
        arg_1[arg_6] = arg_7.replace('t', 'z')
        arg_5.append(arg_7.replace('t', 'z+{}'.format(arg_4)))

    arg_8 = arg_2.v_subtract(arg_5, arg_1)
    arg_9 = arg_2.v_add(arg_5, arg_1)
    arg_10 = arg_2.v_cross(arg_8, arg_9)
    arg_11 = arg_2.v_cross(arg_10, arg_8)
    arg_10 = arg_2.v_normalize(arg_10)
    arg_11 = arg_2.v_normalize(arg_11)

    arg_12 = arg_2.v_add(arg_2.v_multiply('x', arg_11), arg_2.v_multiply('y', arg_10))
    arg_13 = arg_2.v_add(arg_1, arg_12)

    vert_function(arg_0, x_func=arg_13[0], y_func=arg_13[1], z_func=arg_13[2])
    return arg_13


def Func(arg_0, arg_1=False):
        """
        Returns a list with the smallest distance between two neighboring colors.
        The algorithm has a factorial complexity so it may run slow.
        """
        if len(arg_0) == 0: return ColorList()

        # Find the darkest color in the list.
        arg_2 = arg_0[0]
        for arg_3 in arg_0[1:]:
            if arg_3.brightness < arg_2.brightness:
                arg_2 = arg_3

        # Remove the darkest color from the stack,
        # put it in the sorted list as starting element.
        arg_4 = [arg_3 for arg_3 in arg_0]
        arg_4.remove(arg_2)
        arg_5 = [arg_2]

        # Now find the color in the stack closest to that color.
        # Take this color from the stack and add it to the sorted list.
        # Now find the color closest to that color, etc.
        while len(arg_4) > 1:
            arg_6, arg_7 = arg_4[0], arg_4[0].distance(arg_5[-1])
            for arg_3 in arg_4[1:]:
                arg_8 = arg_3.distance(arg_5[-1])
                if arg_8 < arg_7:
                    arg_6, arg_7 = arg_3, arg_8
            arg_4.remove(arg_6)
            arg_5.append(arg_6)
        arg_5.append(arg_4[0])

        if arg_1: _list.reverse(arg_5)
        return ColorList(arg_5)

Returns a list with the smallest distance between two neighboring colors . The algorithm has a factorial complexity so it may run slow .


def Func(arg_0):
        ''' Generate test data if necessary '''

        def publish_info(arg_1):
            arg_2.status.publish('loadscheme', arg_1.loadscheme)
            arg_2.status.publish('loop_count', arg_1.loop_count)
            arg_2.status.publish('steps', arg_1.steps)
            arg_2.status.publish('duration', arg_1.duration)
            arg_2.status.ammo_count = arg_1.ammo_count
            arg_2.status.publish('instances', arg_1.instances)
            arg_0.core.publish('stepper', 'loadscheme', arg_1.loadscheme)
            arg_0.core.publish('stepper', 'loop_count', arg_1.loop_count)
            arg_0.core.publish('stepper', 'steps', arg_1.steps)
            arg_0.core.publish('stepper', 'duration', arg_1.duration)
            arg_0.core.publish('stepper', 'ammo_count', arg_1.ammo_count)
            arg_0.core.publish('stepper', 'instances', arg_1.instances)
            return arg_1

        if not arg_0.stpd:
            arg_0.stpd = arg_0.__get_stpd_filename()
            if arg_0.use_caching and not arg_0.force_stepping and os.path.exists(
                    arg_0.stpd) and os.path.exists(arg_0.__si_filename()):
                arg_0.log.info("Using cached stpd-file: %s", arg_0.stpd)
                arg_1 = arg_0.__read_cached_options()
                if arg_0.instances and arg_0.load_profile.is_rps():
                    arg_0.log.info(
                        "rps_schedule is set. Overriding cached instances param from config: %s",
                        arg_0.instances)
                    arg_1 = arg_1._replace(
                        arg_10=arg_0.instances)
                publish_info(arg_1)
            else:
                if (
                        arg_0.force_stepping and os.path.exists(arg_0.__si_filename())):
                    os.remove(arg_0.__si_filename())
                arg_0.__make_stpd_file()
                arg_1 = arg_2.status.get_info()
                arg_0.__write_cached_options(arg_1)
        else:
            arg_0.log.info("Using specified stpd-file: %s", arg_0.stpd)
            arg_1 = publish_info(arg_0.__read_cached_options())
        arg_0.ammo_count = arg_1.ammo_count
        arg_0.duration = arg_1.duration
        arg_0.loop_count = arg_1.loop_count
        arg_0.loadscheme = arg_1.loadscheme
        arg_0.steps = arg_1.steps
        if arg_1.instances:
            arg_0.instances = arg_1.instances


return (dpll(clauses, symbols, extend(model, P, True)) or
            dpll(clauses, symbols, extend(model, P, False)))

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] for arg_4 in arg_0 : arg_5 = pl_true ( arg_4 , arg_2 ) if arg_5 == False : return False if arg_5 != True : arg_3 . append ( arg_4 ) if not arg_3 : return arg_2 arg_6 , arg_7 = find_pure_symbol ( arg_1 , arg_3 ) if arg_6 : return Func ( arg_0 , removeall ( arg_6 , arg_1 ) , extend ( arg_2 , arg_6 , arg_7 ) ) arg_6 , arg_7 = find_unit_clause ( arg_0 , arg_2 ) if arg_6 : return Func ( arg_0 , removeall ( arg_6 , arg_1 ) , extend ( arg_2 , arg_6 , arg_7 ) ) arg_6 , arg_1 = arg_1 [ 0 ] , arg_1 [ 1 : ] return ( Func ( arg_0 , arg_1 , extend ( arg_2 , arg_6 , True ) ) or Func ( arg_0 , arg_1 , extend ( arg_2 , arg_6 , False ) ) )

def Func(arg_0, arg_1, arg_2):
    "See if the clauses are true in a partial model."
    arg_3 = [] ## clauses with an unknown truth value
    for arg_4 in arg_0:
        arg_5 =  pl_true(arg_4, arg_2)
        if arg_5 == False:
            return False
        if arg_5 != True:
            arg_3.append(arg_4)
    if not arg_3:
        return arg_2
    arg_6, arg_7 = find_pure_symbol(arg_1, arg_3)
    if arg_6:
        return Func(arg_0, removeall(arg_6, arg_1), extend(arg_2, arg_6, arg_7))
    arg_6, arg_7 = find_unit_clause(arg_0, arg_2)
    if arg_6:
        return Func(arg_0, removeall(arg_6, arg_1), extend(arg_2, arg_6, arg_7))
    arg_6, arg_1 = arg_1[0], arg_1[1:]
    return (Func(arg_0, arg_1, extend(arg_2, arg_6, True)) or
            Func(arg_0, arg_1, extend(arg_2, arg_6, False)))

See if the clauses are true in a partial model .


def Func(arg_0, arg_1):
    """Converts a string to Duration.

    Args:
      value: A string to be converted. The string must end with 's'. Any
          fractional digits (or none) are accepted as long as they fit into
          precision. For example: "1s", "1.01s", "1.0000001s", "-3.100s

    Raises:
      ParseError: On parsing problems.
    """
    if len(arg_1) < 1 or arg_1[-1] != 's':
      raise ParseError(
          'Duration must end with letter "s": {0}.'.format(arg_1))
    try:
      arg_2 = arg_1.find('.')
      if arg_2 == -1:
        arg_0.seconds = int(arg_1[:-1])
        arg_0.nanos = 0
      else:
        arg_0.seconds = int(arg_1[:arg_2])
        if arg_1[0] == '-':
          arg_0.nanos = int(round(float('-0{0}'.format(arg_1[arg_2: -1])) *1e9))
        else:
          arg_0.nanos = int(round(float('0{0}'.format(arg_1[arg_2: -1])) *1e9))
    except ValueError:
      raise ParseError(
          'Couldn\'t parse duration: {0}.'.format(arg_1))


(self, window_name, object_name, iterations)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
if
not
arg_0
.
verifyscrollbarhorizontal
(
arg_1
,
arg_2
)
:
raise
LdtpServerException
(
'Object not horizontal scrollbar'
)
arg_4
=
arg_0
.
_get_object_handle
(
arg_1
,
arg_2
)
arg_5
=
0
arg_6
=
1.0
/
8
arg_7
=
False
while
arg_5
<
arg_3
:
if
arg_4
.
AXValue
>=
1
:
raise
LdtpServerException
(
'Maximum limit reached'
)
arg_4
.
AXValue
+=
arg_6
time
.
sleep
(
1.0
/
100
)
arg_7
=
True
arg_5
+=
1
if
arg_7
:
return
1
else
:
raise
LdtpServerException
(
'Unable to increase scrollbar'
)

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Press scrollbar right with number of iterations

        @param window_name: Window name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to type in, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string
        @param interations: iterations to perform on slider increase
        @type iterations: integer

        @return: 1 on success.
        @rtype: integer
        """
        if not arg_0.verifyscrollbarhorizontal(arg_1, arg_2):
            raise LdtpServerException('Object not horizontal scrollbar')
        arg_4 = arg_0._get_object_handle(arg_1, arg_2)
        arg_5 = 0
        arg_6 = 1.0 / 8
        arg_7 = False
        while arg_5 < arg_3:
            if arg_4.AXValue >= 1:
                raise LdtpServerException('Maximum limit reached')
            arg_4.AXValue += arg_6
            time.sleep(1.0 / 100)
            arg_7 = True
            arg_5 += 1
        if arg_7:
            return 1
        else:
            raise LdtpServerException('Unable to increase scrollbar')


def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 = arg_1 . ravel ( ) arg_2 = arg_2 . ravel ( ) arg_3 = np . ones ( arg_1 . shape ) arg_4 = np . cos ( np . dot ( arg_0 . W2 , np . vstack ( ( arg_1 , arg_3 ) ) ) ) . mean ( 1 ) arg_5 = np . cos ( np . dot ( arg_0 . W2 , np . vstack ( ( arg_2 , arg_3 ) ) ) ) . mean ( 1 ) if ( sum ( arg_4 ) > sum ( arg_5 ) ) : return np . hstack ( ( arg_4 , arg_5 , np . cos ( np . dot ( arg_0 . W , np . vstack ( ( arg_1 , arg_2 , arg_3 ) ) ) ) . mean ( 1 ) ) ) else : return np . hstack ( ( arg_4 , arg_5 , np . cos ( np . dot ( arg_0 . W , np . vstack ( ( arg_2 , arg_1 , arg_3 ) ) ) ) . mean ( 1 ) ) )

def Func(arg_0, arg_1, arg_2):
        """ Projects the causal pair to the RKHS using the sampled kernel approximation.

        Args:
            x (np.ndarray): Variable 1
            y (np.ndarray): Variable 2

        Returns:
            np.ndarray: projected empirical distributions into a single fixed-size vector.
        """
        arg_1 = arg_1.ravel()
        arg_2 = arg_2.ravel()
        arg_3 = np.ones(arg_1.shape)
        arg_4 = np.cos(np.dot(arg_0.W2, np.vstack((arg_1, arg_3)))).mean(1)
        arg_5 = np.cos(np.dot(arg_0.W2, np.vstack((arg_2, arg_3)))).mean(1)
        if(sum(arg_4) > sum(arg_5)):
            return np.hstack((arg_4, arg_5,
                              np.cos(np.dot(arg_0.W, np.vstack((arg_1, arg_2, arg_3)))).mean(1)))
        else:
            return np.hstack((arg_4, arg_5,
                              np.cos(np.dot(arg_0.W, np.vstack((arg_2, arg_1, arg_3)))).mean(1)))

Projects the causal pair to the RKHS using the sampled kernel approximation .


def Func ( arg_0 ) : arg_1 = [ ] arg_2 = { } arg_0 . cnxn . xfer ( [ 0x33 ] ) sleep ( 10e-3 ) for arg_3 in range ( 8 ) : arg_4 = arg_0 . cnxn . xfer ( [ 0x00 ] ) [ 0 ] arg_1 . append ( arg_4 ) arg_2 [ "GSC" ] = arg_0 . _calculate_float ( arg_1 [ 0 : 4 ] ) arg_2 [ "SFR" ] = arg_0 . _calculate_float ( arg_1 [ 4 : ] ) return arg_2

def Func(arg_0):
        """Read the gain-scaling-coefficient and sample flow rate.

        :returns: dictionary containing GSC and SFR
        """
        arg_1  = []
        arg_2    = {}

        # Send the command byte and sleep for 10 ms
        arg_0.cnxn.xfer([0x33])
        sleep(10e-3)

        # Read the config variables by sending 256 empty bytes
        for arg_3 in range(8):
            arg_4 = arg_0.cnxn.xfer([0x00])[0]
            arg_1.append(arg_4)

        arg_2["GSC"] = arg_0._calculate_float(arg_1[0:4])
        arg_2["SFR"] = arg_0._calculate_float(arg_1[4:])

        return arg_2

Read the gain - scaling - coefficient and sample flow rate .


def Func ( arg_0 ) : arg_1 , arg_2 = arg_0 . _Func ( ) if len ( arg_2 ) == 0 : return { "name" : arg_1 } else : return { "name" : arg_1 , "args" : arg_2 }

def Func(arg_0):
        """Convert to json serializable dictionary.

        Returns:
            dict: dictionary of descriptor

        """
        arg_1, arg_2 = arg_0._Func()
        if len(arg_2) == 0:
            return {"name": arg_1}
        else:
            return {"name": arg_1, "args": arg_2}

Convert to json serializable dictionary .


def
Func
(
arg_0
,
arg_1
)
:
try
:
arg_2
=
tornado
.
httpclient
.
AsyncHTTPClient
(
)
arg_3
=
utils
.
make_shell_endpoint
(
arg_0
,
arg_1
)
arg_4
=
"%s/pid/%s"
%
(
arg_3
,
arg_1
)
Log
.
debug
(
"HTTP call for url: %s"
,
arg_4
)
arg_5
=
yield
arg_2
.
fetch
(
arg_4
)
raise
tornado
.
gen
.
Return
(
arg_5
.
body
)
except
tornado
.
httpclient
.
HTTPError
as
e
:
raise
Exception
(
str
(
e
)
)

def Func(arg_0, arg_1):
  """
  This method is used by other modules, and so it
  is not a part of the class.
  Fetches Instance pid from heron-shell.
  """
  try:
    arg_2 = tornado.httpclient.AsyncHTTPClient()
    arg_3 = utils.make_shell_endpoint(arg_0, arg_1)
    arg_4 = "%s/pid/%s" % (arg_3, arg_1)
    Log.debug("HTTP call for url: %s", arg_4)
    arg_5 = yield arg_2.fetch(arg_4)
    raise tornado.gen.Return(arg_5.body)
  except tornado.httpclient.HTTPError as e:
    raise Exception(str(e))

This method is used by other modules and so it is not a part of the class . Fetches Instance pid from heron - shell .


def Func ( arg_0 ) : from . polys import Polygon return Polygon ( arg_0 . coords , label = arg_0 . label )

def Func(arg_0):
        """
        Generate a polygon from the line string points.

        Returns
        -------
        imgaug.augmentables.polys.Polygon
            Polygon with the same corner points as the line string.
            Note that the polygon might be invalid, e.g. contain less than 3
            points or have self-intersections.

        """
        from .polys import Polygon
        return Polygon(arg_0.coords, label=arg_0.label)

Generate a polygon from the line string points .


def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : arg_4 = partial ( arg_1 , * arg_2 , ** arg_3 ) arg_0 . append ( arg_4 )

def Func(arg_0, arg_1, *arg_2, **arg_3):
        '''
        append func with given arguments and keywords.
        '''
        arg_4 = partial(arg_1, *arg_2, **arg_3)
        arg_0.append(arg_4)

append func with given arguments and keywords .


(context, institute_id, user_name, user_mail, admin)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
)
:
arg_5
=
arg_0
.
obj
[
'adapter'
]
arg_6
=
[
]
for
arg_7
in
arg_1
:
arg_8
=
arg_5
.
institute
(
arg_1
=
arg_7
)
if
not
arg_8
:
LOG
.
warning
(
"Institute % does not exist"
,
arg_7
)
arg_0
.
abort
(
)
arg_6
.
append
(
arg_7
)
arg_9
=
[
]
if
arg_4
:
LOG
.
info
(
"User is admin"
)
arg_9
.
append
(
'admin'
)
arg_10
=
dict
(
email
=
arg_3
.
lower
(
)
,
name
=
arg_2
,
arg_9
=
arg_9
,
arg_6
=
arg_6
)
arg_11
=
build_Func
(
arg_10
)
try
:
arg_5
.
add_Func
(
arg_11
)
except
Exception
as
err
:
LOG
.
warning
(
err
)
arg_0
.
abort
(
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """Add a Func to the database."""
    arg_5 = arg_0.obj['adapter']

    arg_6 = []
    for arg_7 in arg_1:
        arg_8 = arg_5.institute(arg_1=arg_7)

        if not arg_8:
            LOG.warning("Institute % does not exist", arg_7)
            arg_0.abort()

        arg_6.append(arg_7)

    arg_9 = []
    if arg_4:
        LOG.info("User is admin")
        arg_9.append('admin')

    arg_10 = dict(email=arg_3.lower(), name=arg_2, arg_9=arg_9, arg_6=arg_6)

    arg_11 = build_Func(arg_10)

    try:
        arg_5.add_Func(arg_11)
    except Exception as err:
        LOG.warning(err)
        arg_0.abort()


def Func(arg_0, arg_1):
        '''Find all columns that this selection depends on for df ds'''
        arg_2 = set()
        for arg_3 in arg_0.expressions:
            arg_3 = arg_1._expr(arg_3)  # make sure it is an expression
            arg_2 |= arg_3.variables()
        if arg_0.previous_selection:
            arg_2 |= arg_0.previous_selection.Func(arg_1)
        return arg_2


(
    loc, scale, quadrature_size,
    validate_args=False, name=None)

def Func(
    arg_0, arg_1, arg_2,
    arg_3=False, arg_4=None):  # pylint: disable=unused-argument
  """Use Gauss-Hermite quadrature to form quadrature on positive-reals.

  Note: for a given `quadrature_size`, this method is generally less accurate
  than `quadrature_scheme_lognormal_quantiles`.

  Args:
    loc: `float`-like (batch of) scalar `Tensor`; the location parameter of
      the LogNormal prior.
    scale: `float`-like (batch of) scalar `Tensor`; the scale parameter of
      the LogNormal prior.
    quadrature_size: Python `int` scalar representing the number of quadrature
      points.
    validate_args: Python `bool`, default `False`. When `True` distribution
      parameters are checked for validity despite possibly degrading runtime
      performance. When `False` invalid inputs may silently render incorrect
      outputs.
    name: Python `str` name prefixed to Ops created by this class.

  Returns:
    grid: (Batch of) length-`quadrature_size` vectors representing the
      `log_rate` parameters of a `Poisson`.
    probs: (Batch of) length-`quadrature_size` vectors representing the
      weight associate with each `grid` value.
  """
  with tf.name_scope(
      arg_4 or "vector_diffeomixture_quadrature_gauss_hermite"):
    arg_5, arg_6 = np.polynomial.hermite.hermgauss(deg=arg_2)
    arg_7 = dtype_util.as_numpy_dtype(arg_0.dtype)
    arg_5 = arg_5.astype(arg_7)
    arg_6 = arg_6.astype(arg_7)
    arg_6 /= np.linalg.norm(arg_6, ord=1, keepdims=True)
    arg_6 = tf.convert_to_tensor(value=arg_6, arg_4="probs", dtype=arg_0.dtype)
    # The following maps the broadcast of `loc` and `scale` to each grid
    # point, i.e., we are creating several log-rates that correspond to the
    # different Gauss-Hermite quadrature points and (possible) batches of
    # `loc` and `scale`.
    arg_5 = (arg_0[..., tf.newaxis] + np.sqrt(2.) * arg_1[..., tf.newaxis] * arg_5)
    return arg_5, arg_6

Use Gauss - Hermite quadrature to form quadrature on positive - reals .