(sr, n_fft, n_chroma=12, A440=440.0, ctroct=5.0,
           octwidth=2, norm=2, base_c=True, dtype=np.float32)

return np.ascontiguousarray(wts[:, :int(1 + n_fft/2)], dtype=dtype)

def Func(arg_0, arg_1, arg_2=12, arg_3=440.0, arg_4=5.0,
           arg_5=2, arg_6=2, arg_7=True, arg_8=arg_9.float32):
    """Create a Filterbank matrix to convert STFT to Func

    Parameters
    ----------
    sr        : number > 0 [scalar]
        audio sampling rate

    n_fft     : int > 0 [scalar]
        number of FFT bins

    n_Func  : int > 0 [scalar]
        number of Func bins

    A440      : float > 0 [scalar]
        Reference frequency for A440

    ctroct    : float > 0 [scalar]

    octwidth  : float > 0 or None [scalar]
        `ctroct` and `octwidth` specify a dominance window -
        a Gaussian weighting centered on `ctroct` (in octs, A0 = 27.5Hz)
        and with a gaussian half-width of `octwidth`.
        Set `octwidth` to `None` to use a flat weighting.

    norm : float > 0 or np.inf
        Normalization factor for each filter

    base_c : bool
        If True, the filter bank will start at 'C'.
        If False, the filter bank will start at 'A'.

    dtype : np.dtype
        The data type of the output basis.
        By default, uses 32-bit (single-precision) floating point.

    Returns
    -------
    wts : ndarray [shape=(n_Func, 1 + n_fft / 2)]
        Chroma filter matrix

    See Also
    --------
    util.normalize
    feature.Func_stft

    Notes
    -----
    This function caches at level 10.

    Examples
    --------
    Build a simple Func filter bank

    >>> Funcfb = librosa.filters.Func(22050, 4096)
    array([[  1.689e-05,   3.024e-04, ...,   4.639e-17,   5.327e-17],
           [  1.716e-05,   2.652e-04, ...,   2.674e-25,   3.176e-25],
    ...,
           [  1.578e-05,   3.619e-04, ...,   8.577e-06,   9.205e-06],
           [  1.643e-05,   3.355e-04, ...,   1.474e-10,   1.636e-10]])

    Use quarter-tones instead of semitones

    >>> librosa.filters.Func(22050, 4096, n_Func=24)
    array([[  1.194e-05,   2.138e-04, ...,   6.297e-64,   1.115e-63],
           [  1.206e-05,   2.009e-04, ...,   1.546e-79,   2.929e-79],
    ...,
           [  1.162e-05,   2.372e-04, ...,   6.417e-38,   9.923e-38],
           [  1.180e-05,   2.260e-04, ...,   4.697e-50,   7.772e-50]])

    Equally weight all octaves

    >>> librosa.filters.Func(22050, 4096, octwidth=None)
    array([[  3.036e-01,   2.604e-01, ...,   2.445e-16,   2.809e-16],
           [  3.084e-01,   2.283e-01, ...,   1.409e-24,   1.675e-24],
    ...,
           [  2.836e-01,   3.116e-01, ...,   4.520e-05,   4.854e-05],
           [  2.953e-01,   2.888e-01, ...,   7.768e-10,   8.629e-10]])

    >>> import matplotlib.pyplot as plt
    >>> plt.figure()
    >>> librosa.display.specshow(Funcfb, x_axis='linear')
    >>> plt.ylabel('Chroma filter')
    >>> plt.title('Chroma filter bank')
    >>> plt.colorbar()
    >>> plt.tight_layout()
    """

    arg_11 = arg_9.zeros((arg_2, arg_1))

    # Get the FFT bins, not counting the DC component
    arg_12 = arg_9.linspace(0, arg_0, arg_1, endpoint=False)[1:]

    arg_13 = arg_2 * hz_to_octs(arg_12, arg_3)

    # make up a value for the 0 Hz bin = 1.5 octaves below bin 1
    # (so Func is 50% rotated from bin 1, and bin width is broad)
    arg_13 = arg_9.concatenate(([arg_13[0] - 1.5 * arg_2], arg_13))

    arg_14 = arg_9.concatenate((arg_9.maximum(arg_13[1:] - arg_13[:-1],
                                              1.0), [1]))

    arg_15 = arg_9.subtract.outer(arg_13, arg_9.arange(0, arg_2, arg_8='d')).T

    arg_16 = arg_9.round(float(arg_2) / 2)

    # Project into range -n_Func/2 .. n_Func/2
    # add on fixed offset of 10*n_Func to ensure all values passed to
    # rem are positive
    arg_15 = arg_9.remainder(arg_15 + arg_16 + 10*arg_2, arg_2) - arg_16

    # Gaussian bumps - 2*D to make them narrower
    arg_11 = arg_9.exp(-0.5 * (2*arg_15 / arg_9.tile(arg_14, (arg_2, 1)))**2)

    # normalize each column
    arg_11 = util.normalize(arg_11, arg_6=arg_6, axis=0)

    # Maybe apply scaling for fft bins
    if arg_5 is not None:
        arg_11 *= arg_9.tile(
            arg_9.exp(-0.5 * (((arg_13/arg_2 - arg_4)/arg_5)**2)),
            (arg_2, 1))

    if arg_7:
        arg_11 = arg_9.roll(arg_11, -3, axis=0)

    # remove aliasing columns, copy to ensure row-contiguity
    return arg_9.ascontiguousarray(arg_11[:, :int(1 + arg_1/2)], arg_8=arg_8)

Create a Filterbank matrix to convert STFT to chroma

    Parameters
    ----------
    sr        : number > 0 [scalar]
        audio sampling rate

    n_fft     : int > 0 [scalar]
        number of FFT bins

    n_chroma  : int > 0 [scalar]
        number of chroma bins

    A440      : float > 0 [scalar]
        Reference frequency for A440

    ctroct    : float > 0 [scalar]

    octwidth  : float > 0 or None [scalar]
        `ctroct` and `octwidth` specify a dominance window -
        a Gaussian weighting centered on `ctroct` (in octs, A0 = 27.5Hz)
        and with a gaussian half-width of `octwidth`.
        Set `octwidth` to `None` to use a flat weighting.

    norm : float > 0 or np.inf
        Normalization factor for each filter

    base_c : bool
        If True, the filter bank will start at 'C'.
        If False, the filter bank will start at 'A'.

    dtype : np.dtype
        The data type of the output basis.
        By default, uses 32-bit (single-precision) floating point.

    Returns
    -------
    wts : ndarray [shape=(n_chroma, 1 + n_fft / 2)]
        Chroma filter matrix

    See Also
    --------
    util.normalize
    feature.chroma_stft

    Notes
    -----
    This function caches at level 10.

    Examples
    --------
    Build a simple chroma filter bank

    >>> chromafb = librosa.filters.chroma(22050, 4096)
    array([[  1.689e-05,   3.024e-04, ...,   4.639e-17,   5.327e-17],
           [  1.716e-05,   2.652e-04, ...,   2.674e-25,   3.176e-25],
    ...,
           [  1.578e-05,   3.619e-04, ...,   8.577e-06,   9.205e-06],
           [  1.643e-05,   3.355e-04, ...,   1.474e-10,   1.636e-10]])

    Use quarter-tones instead of semitones

    >>> librosa.filters.chroma(22050, 4096, n_chroma=24)
    array([[  1.194e-05,   2.138e-04, ...,   6.297e-64,   1.115e-63],
           [  1.206e-05,   2.009e-04, ...,   1.546e-79,   2.929e-79],
    ...,
           [  1.162e-05,   2.372e-04, ...,   6.417e-38,   9.923e-38],
           [  1.180e-05,   2.260e-04, ...,   4.697e-50,   7.772e-50]])

    Equally weight all octaves

    >>> librosa.filters.chroma(22050, 4096, octwidth=None)
    array([[  3.036e-01,   2.604e-01, ...,   2.445e-16,   2.809e-16],
           [  3.084e-01,   2.283e-01, ...,   1.409e-24,   1.675e-24],
    ...,
           [  2.836e-01,   3.116e-01, ...,   4.520e-05,   4.854e-05],
           [  2.953e-01,   2.888e-01, ...,   7.768e-10,   8.629e-10]])

    >>> import matplotlib.pyplot as plt
    >>> plt.figure()
    >>> librosa.display.specshow(chromafb, x_axis='linear')
    >>> plt.ylabel('Chroma filter')
    >>> plt.title('Chroma filter bank')
    >>> plt.colorbar()
    >>> plt.tight_layout()


def Func(arg_0, arg_1=None):
    """Return a random float

    :param float a: Either the minimum value (inclusive) if ``b`` is set, or
    the maximum value if ``b`` is not set (non-inclusive, in which case the minimum
    is implicitly 0.0)
    :param float b: The maximum value to generate (non-inclusive)
    :returns: float
    """
    if arg_1 is None:
        arg_2 = arg_0
        arg_3 = 0.0
    else:
        arg_3 = arg_0
        arg_2 = arg_1

    arg_4 = arg_2 - arg_3
    arg_5 = _random()
    arg_5 *= arg_4
    arg_5 += arg_3
    return arg_5


Determines if a virtual machine instance exists.

(name=None, group=None, release=None, except_release=None, verbose=1)

def Func(arg_0=None, arg_1=None, arg_2=None, arg_3=None, arg_4=1):
    """
    Determines if a virtual machine instance Func.
    """
    arg_4 = int(arg_4)
    arg_5 = list_instances(
        arg_0=arg_0,
        arg_1=arg_1,
        arg_2=arg_2,
        arg_3=arg_3,
        arg_4=arg_4,
        show=arg_4)
    arg_6 = bool(arg_5)
    if arg_4:
        print('\ninstance %s exist' % ('DOES' if arg_6 else 'does NOT'))
    #return ret
    return arg_5

Determines if a virtual machine instance exists .


def Func ( arg_0 , arg_1 ) : if arg_1 not in arg_0 . _Func : arg_2 = arg_0 . app . config . get ( 'RECORDS_UI_EXPORT_FORMATS' , { } ) . get ( arg_1 , { } ) arg_0 . _Func [ arg_1 ] = sorted ( [ ( k , v ) for k , v in arg_2 . items ( ) if v ] , key = lambda x : x [ 1 ] [ 'order' ] , ) return arg_0 . _Func [ arg_1 ]

def Func(arg_0, arg_1):
        """List of export formats."""
        if arg_1 not in arg_0._Func:
            arg_2 = arg_0.app.config.get('RECORDS_UI_EXPORT_FORMATS', {}).get(
                arg_1, {})
            arg_0._Func[arg_1] = sorted(
                [(k, v) for k, v in arg_2.items() if v],
                key=lambda x: x[1]['order'],
            )
        return arg_0._Func[arg_1]


async def Func ( arg_0 ) : await arg_0 . _lavalink . ws . send ( op = 'Func' , guildId = arg_0 . guild_id ) arg_0 . current = None

async def Func(arg_0):
        """ Stops the player, if playing. """
        await arg_0._lavalink.ws.send(op='Func', guildId=arg_0.guild_id)
        arg_0.current = None


def Func(arg_0, arg_1, arg_2=False):
    """Authenticate with Google.

    Args:
        refresh_token_cache (RefreshTokenCache): Cache to use so subsequent
            logins may not require credentials.
        credentials_prompt (CredentialsPrompt): Prompt to use if credentials
            are required to log in.
        manual_login (bool): If true, prompt user to log in through a browser
            and enter authorization code manually. Defaults to false.

    Returns:
        dict: Google session cookies.

    Raises:
        GoogleAuthError: If authentication with Google fails.
    """
    with requests.Session() as arg_3:
        arg_3.headers = {'user-agent': USER_AGENT}

        try:
            logger.info('Authenticating with refresh token')
            arg_5 = arg_1.get()
            if arg_5 is None:
                raise GoogleAuthError("Refresh token not found")
            arg_6 = _auth_with_refresh_token(arg_3, arg_5)
        except GoogleAuthError as e:
            logger.info('Failed to authenticate using refresh token: %s', e)
            logger.info('Authenticating with credentials')
            if arg_2:
                arg_7 = (
                    arg_0.Funcorization_code()
                )
            else:
                arg_7 = _Funcorization_code(
                    arg_3, arg_0
                )
            arg_6, arg_5 = _auth_with_code(
                arg_3, arg_7
            )
            arg_1.set(arg_5)

        logger.info('Authentication successful')
        return _get_session_cookies(arg_3, arg_6)


(self, file_path=None, relpath=None,
                                      mimetype=None, time_origin=None,
                                      assoc_with=None)

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = None , arg_4 = None , arg_5 = None ) : for arg_6 in arg_0 . linked_file_descriptors [ : ] : if arg_1 is not None and arg_6 [ 'LINK_URL' ] != arg_1 : continue if arg_2 is not None and arg_6 [ 'RELATIVE_LINK_URL' ] != arg_2 : continue if arg_3 is not None and arg_6 [ 'MIME_TYPE' ] != arg_3 : continue if arg_4 is not None and arg_6 [ 'TIME_ORIGIN' ] != arg_4 : continue if arg_5 is not None and arg_6 [ 'ASSOCIATED_WITH' ] != arg_5 : continue del ( arg_0 . linked_file_descriptors [ arg_0 . linked_file_descriptors . index ( arg_6 ) ] )

def Func(arg_0, arg_1=None, arg_2=None,
                                      arg_3=None, arg_4=None,
                                      arg_5=None):
        """Remove all secondary linked files that match all the criteria,
        criterias that are ``None`` are ignored.

        :param str file_path: Path of the file.
        :param str relpath: Relative filepath.
        :param str mimetype: Mimetype of the file.
        :param int time_origin: Time origin.
        :param str ex_from: Extracted from.
        """
        for arg_6 in arg_0.linked_file_descriptors[:]:
            if arg_1 is not None and arg_6['LINK_URL'] != arg_1:
                continue
            if arg_2 is not None and arg_6['RELATIVE_LINK_URL'] != arg_2:
                continue
            if arg_3 is not None and arg_6['MIME_TYPE'] != arg_3:
                continue
            if arg_4 is not None and\
                    arg_6['TIME_ORIGIN'] != arg_4:
                continue
            if arg_5 is not None and\
                    arg_6['ASSOCIATED_WITH'] != arg_5:
                continue
            del(arg_0.linked_file_descriptors[
                arg_0.linked_file_descriptors.index(arg_6)])

Remove all secondary linked files that match all the criteria criterias that are None are ignored .


def Func ( arg_0 ) : for arg_1 in xrange ( 6 ) : arg_2 , arg_3 , arg_4 = GETCONS [ arg_1 ] arg_5 , arg_6 = np . where ( arg_0 == arg_2 ) arg_7 = np . random . choice ( np . array ( [ True , False ] ) , arg_5 . shape [ 0 ] ) for arg_8 in xrange ( arg_5 . shape [ 0 ] ) : if arg_7 [ arg_8 ] : arg_0 [ arg_5 [ arg_8 ] , arg_6 [ arg_8 ] ] = arg_3 else : arg_0 [ arg_5 [ arg_8 ] , arg_6 [ arg_8 ] ] = arg_4 return arg_0

def Func(arg_0):
    """
    Randomly resolve ambiguous bases. This is applied to each boot
    replicate so that over reps the random resolutions don't matter.
    Sites are randomly resolved, so best for unlinked SNPs since
    otherwise linked SNPs are losing their linkage information...
    though it's not like we're using it anyways.
    """

    ## the order of rows in GETCONS
    for arg_1 in xrange(6):
        #np.uint([82, 75, 83, 89, 87, 77]):
        arg_2, arg_3, arg_4 = GETCONS[arg_1]

        ## get true wherever tmpseq is ambig
        arg_5, arg_6 = np.where(arg_0 == arg_2)
        arg_7 = np.random.choice(np.array([True, False]), arg_5.shape[0])

        for arg_8 in xrange(arg_5.shape[0]):
            if arg_7[arg_8]:
                arg_0[arg_5[arg_8], arg_6[arg_8]] = arg_3
            else:
                arg_0[arg_5[arg_8], arg_6[arg_8]] = arg_4
    return arg_0

Randomly resolve ambiguous bases . This is applied to each boot replicate so that over reps the random resolutions don t matter . Sites are randomly resolved so best for unlinked SNPs since otherwise linked SNPs are losing their linkage information ... though it s not like we re using it anyways .


def Func ( arg_0 , arg_1 = False ) : for arg_2 in arg_0 . tree . get_nonterminals ( order = 'postorder' ) : arg_3 = len ( arg_2 . _ii ) if arg_1 : arg_4 = np . zeros ( ( arg_3 , arg_3 ) , dtype = float ) arg_5 = np . zeros ( arg_3 , dtype = float ) arg_6 = 0 for arg_7 in arg_2 : arg_8 = arg_0 . branch_variance ( arg_7 ) arg_9 = len ( arg_7 . _ii ) if arg_7 . is_terminal ( ) : if arg_1 : arg_4 [ arg_6 , arg_6 ] = 1.0 / arg_8 arg_5 [ arg_6 ] = 1.0 / arg_8 else : if arg_1 : arg_4 [ arg_6 : arg_6 + arg_9 , arg_6 : arg_6 + arg_9 ] = arg_7 . cinv - arg_8 * np . outer ( arg_7 . r , arg_7 . r ) / ( 1 + arg_8 * arg_7 . s ) arg_5 [ arg_6 : arg_6 + arg_9 ] = arg_7 . r / ( 1 + arg_8 * arg_7 . s ) arg_6 += arg_9 if arg_1 : arg_2 . cinv = arg_4 arg_2 . r = arg_5 arg_2 . s = arg_2 . r . sum ( )

def Func(arg_0, arg_1=False):
        """
        recursion to calculate inverse covariance matrix

        Parameters
        ----------
        full_matrix : bool, optional
            if True, the entire inverse matrix is calculated. otherwise, only the weighing vector.
        """
        for arg_2 in arg_0.tree.get_nonterminals(order='postorder'):
            arg_3 = len(arg_2._ii)
            if arg_1: arg_4 = np.zeros((arg_3, arg_3), dtype=float)
            arg_5 = np.zeros(arg_3, dtype=float)
            arg_6 = 0
            for arg_7 in arg_2:
                arg_8 = arg_0.branch_variance(arg_7)
                arg_9 = len(arg_7._ii)
                if arg_7.is_terminal():
                    if arg_1:
                        arg_4[arg_6, arg_6] = 1.0/arg_8
                    arg_5[arg_6] = 1.0/arg_8
                else:
                    if arg_1:
                        arg_4[arg_6:arg_6+arg_9, arg_6:arg_6+arg_9] = arg_7.cinv - arg_8*np.outer(arg_7.r,arg_7.r)/(1+arg_8*arg_7.s)
                    arg_5[arg_6:arg_6+arg_9] = arg_7.r/(1+arg_8*arg_7.s)
                arg_6 += arg_9

            if arg_1: arg_2.cinv = arg_4
            arg_2.r = arg_5 #M.sum(axis=1)
            arg_2.s = arg_2.r.sum()


def
Func
(
arg_0
,
arg_1
)
:
if
isack
(
arg_1
)
:
try
:
arg_0
.
event
=
arg_0
.
client
.
handle_ack
(
arg_1
,
arg_0
.
time_sent_request
)
except
AddrFormatError
as
err
:
logger
.
error
(
err
)
raise
arg_0
.
SELECTING
(
)
logger
.
info
(
'DHCPACK of %s from %s'
%
(
arg_0
.
client
.
client_ip
,
arg_0
.
client
.
server_ip
)
)
return
True
return
False

def Func(arg_0, arg_1):
        """Process a received ACK packet.

        Not specifiyed in [:rfc:`7844`].
        Probe the offered IP in [:rfc:`2131#section-2.2.`]::

            the allocating
            server SHOULD probe the reused address before allocating the
            address, e.g., with an ICMP echo request, and the client SHOULD
            probe the newly received address, e.g., with ARP.

            The client SHOULD broadcast an ARP
            reply to announce the client's new IP address and clear any
            outdated ARP cache entries in hosts on the client's subnet.

        It is also not specifiyed in [:rfc:`7844`] nor [:rfc:`2131`] how to
        check that the offered IP is valid.

        .. todo::
           - Check that nor ``dhclient`` nor ``systemd-networkd`` send an ARP.
           - Check how other implementations check that the ACK paremeters
             are valid, ie, if the ACK fields match the fields in the OFFER.
           - Check to which state the client should go back to when the
             offered parameters are not valid.

        """
        if isack(arg_1):
            try:
                arg_0.event = arg_0.client.handle_ack(arg_1,
                                                    arg_0.time_sent_request)
            except AddrFormatError as err:
                logger.error(err)
                # NOTE: see previous TODO, maybe should go back to other state.
                raise arg_0.SELECTING()
            # NOTE: see previous TODO, not checking address with ARP.
            logger.info('DHCPACK of %s from %s' %
                        (arg_0.client.client_ip, arg_0.client.server_ip))
            return True
        return False


return all(i == j for (i, j) in izip(iteritems(self), iteritems(other)))

def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_1 , Mapping ) or len ( arg_0 ) != len ( arg_1 ) : return False return all ( arg_2 == arg_3 for ( arg_2 , arg_3 ) in izip ( iteritems ( arg_0 ) , iteritems ( arg_1 ) ) )

def Func(arg_0, arg_1):
        """Order-sensitive equality check.

        *See also* :ref:`eq-order-insensitive`
        """
        # Same short-circuit as BidictBase.__eq__. Factoring out not worth function call overhead.
        if not isinstance(arg_1, Mapping) or len(arg_0) != len(arg_1):
            return False
        return all(arg_2 == arg_3 for (arg_2, arg_3) in izip(iteritems(arg_0), iteritems(arg_1)))


def Func(arg_0, arg_1, arg_2=1):
        """
        Augment batches from a generator in a way that does not guarantee to preserve order.

        Parameters
        ----------
        batches : generator of imgaug.augmentables.batches.Batch
            The batches to augment, provided as a generator. Each call to the generator should yield exactly one
            batch.

        chunksize : None or int, optional
            Rough indicator of how many tasks should be sent to each worker. Increasing this number can improve
            performance.

        Yields
        ------
        imgaug.augmentables.batches.Batch
            Augmented batch.

        """
        assert ia.is_generator(arg_1), ("Expected to get a generator as 'batches', got type %s. "
                                          + "Call map_batches() if you use lists.") % (type(arg_1),)
        # TODO change this to 'yield from' once switched to 3.3+
        arg_3 = arg_0.pool.imap_unordered(_Pool_starworker, arg_0._handle_batch_ids_gen(arg_1), arg_2=arg_2)
        for arg_4 in arg_3:
            yield arg_4

Augment batches from a generator in a way that does not guarantee to preserve order .


def Func ( arg_0 , arg_1 ) : return Certificate . get_object ( api_token = arg_0 . token , cert_id = arg_1 )

def Func(arg_0, arg_1):
        """
            Returns a Certificate object by its ID.

            Args:
                id (str): Certificate ID
        """
        return Certificate.get_object(api_token=arg_0.token, cert_id=arg_1)

Returns a Certificate object by its ID .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] for arg_4 in arg_1 : try : arg_5 = get_function ( arg_4 ) if getattr ( arg_5 , 'view_decorated' , None ) : arg_5 = arg_5 ( arg_0 . log ) arg_3 . append ( arg_5 ) except Exception , exc : arg_0 . log ( repr ( exc ) ) arg_3 . append ( lambda * args , ** kwargs : None ) arg_6 , arg_7 = zip ( ( key , value ) for ( ( key , doc_id ) , value ) in arg_2 ) arg_8 = [ ] for arg_5 in arg_3 : try : arg_8 . append ( arg_5 ( arg_6 , arg_7 , rereduce = False ) ) except Exception , exc : arg_0 . log ( repr ( exc ) ) arg_8 . append ( None ) return [ True , arg_8 ]

def Func(arg_0, arg_1, arg_2):
        """Reduce several mapped documents by several reduction functions."""
        arg_3 = []
        # This gets a large list of reduction functions, given their names.
        for arg_4 in arg_1:
            try:
                arg_5 = get_function(arg_4)
                if getattr(arg_5, 'view_decorated', None):
                    arg_5 = arg_5(arg_0.log)
                arg_3.append(arg_5)
            except Exception, exc:
                arg_0.log(repr(exc))
                arg_3.append(lambda *args, **kwargs: None)
        # Transform lots of (key, value) pairs into one (keys, values) pair.
        arg_6, arg_7 = zip(
            (key, value) for ((key, doc_id), value) in arg_2)
        # This gets the list of results from the reduction functions.
        arg_8 = []
        for arg_5 in arg_3:
            try:
                arg_8.append(arg_5(arg_6, arg_7, rereduce=False))
            except Exception, exc:
                arg_0.log(repr(exc))
                arg_8.append(None)
        return [True, arg_8]

Reduce several mapped documents by several reduction functions .


def Func(arg_0=arg_1()):
    """Create a loader for a knitting pattern set.

    :param specification: a :class:`specification
      <knittingpattern.ParsingSpecification.ParsingSpecification>`
      for the knitting pattern set, default
      :class:`DefaultSpecification`
    """
    arg_2 = arg_0.new_parser(arg_0)
    arg_3 = arg_0.new_loader(arg_2.knitting_pattern_set)
    return arg_3

Create a loader for a knitting pattern set .


Applies the hue blend mode.

        Hues image img1 with image img2.
        The hue filter replaces the hues of pixels in img1
        with the hues of pixels in img2.
        Returns a composite image with the alpha channel retained.

def Func(arg_0, arg_1, arg_2):

        """Applies the Func blend mode.

        Hues image img1 with image img2.
        The Func filter replaces the Funcs of pixels in img1
        with the Funcs of pixels in img2.
        Returns a composite image with the alpha channel retained.

        """

        import colorsys

        arg_3 = list(arg_1.getdata())
        arg_4 = list(arg_2.getdata())
        for arg_5 in range(len(arg_3)):

            arg_6, arg_7, arg_8, arg_9 = arg_3[arg_5]
            arg_6 = arg_6 / 255.0
            arg_7 = arg_7 / 255.0
            arg_8 = arg_8 / 255.0

            arg_10, arg_11, arg_12 = colorsys.rgb_to_hsv(arg_6, arg_7, arg_8)

            arg_13, arg_14, arg_15, arg_16 = arg_4[arg_5]
            arg_13 = arg_13 / 255.0
            arg_14 = arg_14 / 255.0
            arg_15 = arg_15 / 255.0
            arg_17, arg_18, arg_19 = colorsys.rgb_to_hsv(arg_13, arg_14, arg_15)

            arg_20, arg_21, arg_22 = colorsys.hsv_to_rgb(arg_17, arg_11, arg_12)

            arg_20 = int(arg_20*255)
            arg_21 = int(arg_21*255)
            arg_22 = int(arg_22*255)
            arg_3[arg_5] = (arg_20, arg_21, arg_22, arg_9)

        arg_23 = Image.new("RGBA", arg_1.size, 255)
        arg_23.putdata(arg_3)
        return arg_23

Applies the hue blend mode . Hues image img1 with image img2 . The hue filter replaces the hues of pixels in img1 with the hues of pixels in img2 . Returns a composite image with the alpha channel retained .


def Func ( arg_0 , arg_1 = False ) : arg_2 = len ( arg_0 ) arg_3 = { arg_4 : { } for arg_4 in range ( arg_2 ) } for arg_4 in range ( arg_2 ) : for arg_5 in range ( arg_2 ) : if arg_0 [ arg_4 , arg_5 ] != 0 : arg_3 [ arg_4 ] [ arg_5 ] = { } if not arg_1 else arg_0 [ arg_4 , arg_5 ] return arg_3

def Func(arg_0, arg_1=False):
    """Takes an adjacency matrix and returns an adjacency list."""
    arg_2 = len(arg_0)
    arg_3 = {arg_4: {} for arg_4 in range(arg_2)}
    for arg_4 in range(arg_2):
        for arg_5 in range(arg_2):
            if arg_0[arg_4, arg_5] != 0:
                arg_3[arg_4][arg_5] = {} if not arg_1 else arg_0[arg_4, arg_5]

    return arg_3

Takes an adjacency matrix and returns an adjacency list .


def Func ( arg_0 , arg_1 , arg_2 , * arg_3 , ** arg_4 ) : if not hasattr ( arg_0 , "actions" ) : arg_0 . actions = { } if arg_1 not in arg_0 . actions : arg_0 . actions [ arg_1 ] = [ ] arg_0 . actions [ arg_1 ] . append ( ( arg_2 , arg_3 , arg_4 ) )

def Func(arg_0,arg_1,arg_2,*arg_3,**arg_4):
        """
        Adds a callback to the specified action.

        All other positional and keyword arguments will be stored and passed to the function upon activation.
        """
        if not hasattr(arg_0,"actions"):
            arg_0.actions = {}
        if arg_1 not in arg_0.actions:
            arg_0.actions[arg_1] = []
        arg_0.actions[arg_1].append((arg_2,arg_3,arg_4))

Adds a callback to the specified action . All other positional and keyword arguments will be stored and passed to the function upon activation .


return Comment.objects.filter(
            Q(content_type=ctype.id, object_pk=self.id) |
            Q(content_type=update_ctype.id, object_pk__in=update_ids)
        )

def Func ( arg_0 ) : arg_1 = ContentType . objects . get ( app_label__exact = "happenings" , model__exact = 'event' ) arg_2 = ContentType . objects . get ( app_label__exact = "happenings" , model__exact = 'update' ) arg_3 = arg_0 . update_set . values_list ( 'id' , flat = True ) return Comment . objects . filter ( Q ( content_type = arg_1 . id , object_pk = arg_0 . id ) | Q ( content_type = arg_2 . id , object_pk__in = arg_3 ) )

def Func(arg_0):
        """
        Returns combined list of event and update comments.
        """
        arg_1 = ContentType.objects.get(app_label__exact="happenings", model__exact='event')
        arg_2 = ContentType.objects.get(app_label__exact="happenings", model__exact='update')
        arg_3 = arg_0.update_set.values_list('id', flat=True)

        return Comment.objects.filter(
            Q(content_type=arg_1.id, object_pk=arg_0.id) |
            Q(content_type=arg_2.id, object_pk__in=arg_3)
        )

Returns combined list of event and update comments .


def
Func
(
arg_0
,
arg_1
)
:
mutex
.
acquire
(
)
try
:
try
:
arg_2
=
serial
.
Serial
(
arg_2
=
arg_0
)
arg_3
=
'11010101 10101010'
arg_4
=
'10101101'
for
arg_5
in
_translateCommands
(
arg_1
)
:
_sendBinaryData
(
arg_2
,
arg_3
+
arg_5
+
arg_4
)
except
serial
.
SerialException
:
print
(
'Unable to open serial port %s'
%
arg_0
)
print
(
''
)
raise
finally
:
mutex
.
release
(
)

def Func(arg_0, arg_1):
    """Send X10 commands using the FireCracker on comPort

    comPort should be the name of a serial port on the host platform. On
    Windows, for example, 'com1'.

    commands should be a string consisting of X10 commands separated by
    commas. For example. 'A1 On, A Dim, A Dim, A Dim, A Lamps Off'. The
    letter is a house code (A-P) and the number is the device number (1-16).
    Possible commands for a house code / device number combination are
    'On' and 'Off'. The commands 'Bright' and 'Dim' should be used with a
    house code alone after sending an On command to a specific device. The
    'All On', 'All Off', 'Lamps On', and 'Lamps Off' commands should also
    be used with a house code alone.

    # Turn on module A1
    >>> Func('com1', 'A1 On')

    # Turn all modules with house code A off
    >>> Func('com1', 'A All Off')

    # Turn all lamp modules with house code B on
    >>> Func('com1', 'B Lamps On')

    # Turn on module A1 and dim it 3 steps, then brighten it 1 step
    >>> Func('com1', 'A1 On, A Dim, A Dim, A Dim, A Bright')
    """
    mutex.acquire()
    try:
        try:
            arg_2 = serial.Serial(arg_2=arg_0)
            arg_3 = '11010101 10101010'
            arg_4 = '10101101'
            for arg_5 in _translateCommands(arg_1):
                _sendBinaryData(arg_2, arg_3 + arg_5 + arg_4)
        except serial.SerialException:
            print('Unable to open serial port %s' % arg_0)
            print('')
            raise
    finally:
        mutex.release()

Send X10 commands using the FireCracker on comPort

    comPort should be the name of a serial port on the host platform. On
    Windows, for example, 'com1'.

    commands should be a string consisting of X10 commands separated by
    commas. For example. 'A1 On, A Dim, A Dim, A Dim, A Lamps Off'. The
    letter is a house code (A-P) and the number is the device number (1-16).
    Possible commands for a house code / device number combination are
    'On' and 'Off'. The commands 'Bright' and 'Dim' should be used with a
    house code alone after sending an On command to a specific device. The
    'All On', 'All Off', 'Lamps On', and 'Lamps Off' commands should also
    be used with a house code alone.

    # Turn on module A1
    >>> sendCommands('com1', 'A1 On')

    # Turn all modules with house code A off
    >>> sendCommands('com1', 'A All Off')

    # Turn all lamp modules with house code B on
    >>> sendCommands('com1', 'B Lamps On')

    # Turn on module A1 and dim it 3 steps, then brighten it 1 step
    >>> sendCommands('com1', 'A1 On, A Dim, A Dim, A Dim, A Bright')


def Func(arg_0, **arg_1):
        """
        Get the Func for a specific movie id.

        Changes are grouped by key, and ordered by date in descending order.
        By default, only the last 24 hours of Func are returned. The
        maximum number of days that can be returned in a single request is 14.
        The language is present on fields that are translatable.

        Args:
            start_date: (optional) Expected format is 'YYYY-MM-DD'.
            end_date: (optional) Expected format is 'YYYY-MM-DD'.

        Returns:
            A dict representation of the JSON returned from the API.
        """
        arg_2 = arg_0._get_id_path('Func')

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

Get the changes for a specific movie id.

        Changes are grouped by key, and ordered by date in descending order.
        By default, only the last 24 hours of changes are returned. The
        maximum number of days that can be returned in a single request is 14.
        The language is present on fields that are translatable.

        Args:
            start_date: (optional) Expected format is 'YYYY-MM-DD'.
            end_date: (optional) Expected format is 'YYYY-MM-DD'.

        Returns:
            A dict representation of the JSON returned from the API.

Get the changes for a specific movie id .


def Func(arg_0, arg_1):
        '''
        Configures this extension with the given app. This registers an
        ``teardown_appcontext`` call, and attaches this ``LDAP3LoginManager``
        to it as ``app.ldap3_login_manager``.

        Args:
            app (flask.Flask): The flask app to initialise with
        '''

        arg_1.ldap3_login_manager = arg_0

        arg_3 = list(arg_0._server_pool)
        for arg_4 in arg_3:
            arg_0._server_pool.remove(arg_4)

        arg_0.init_config(arg_1.config)

        if hasattr(arg_1, 'teardown_appcontext'):
            arg_1.teardown_appcontext(arg_0.teardown)
        else:  # pragma: no cover
            arg_1.teardown_request(arg_0.teardown)

        arg_0.app = arg_1

Configures this extension with the given app . This registers an teardown_appcontext call and attaches this LDAP3LoginManager to it as app . ldap3_login_manager .


return enterprise_customer_uuid, course_run_id, course_key, program_uuid

def Func ( ** arg_0 ) : arg_1 = arg_0 . get ( 'enterprise_uuid' , '' ) arg_2 = arg_0 . get ( 'course_id' , '' ) arg_3 = arg_0 . get ( 'course_key' , '' ) arg_4 = arg_0 . get ( 'program_uuid' , '' ) return arg_1 , arg_2 , arg_3 , arg_4

def Func(**arg_0):
        """
        Get the base variables for any view to route to.

        Currently gets:
        - `enterprise_uuid` - the UUID of the enterprise customer.
        - `course_run_id` - the ID of the course, if applicable.
        - `program_uuid` - the UUID of the program, if applicable.
        """
        arg_1 = arg_0.get('enterprise_uuid', '')
        arg_2 = arg_0.get('course_id', '')
        arg_3 = arg_0.get('course_key', '')
        arg_4 = arg_0.get('program_uuid', '')

        return arg_1, arg_2, arg_3, arg_4

Get the base variables for any view to route to .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_1 . filter ( arg_4 = arg_2 ) . first ( ) if arg_3 : try : arg_4 = getattr ( arg_3 , arg_0 . chained_model_field + "_id" ) arg_5 = { arg_0 . chained_model_field : arg_4 } except AttributeError : try : arg_6 = getattr ( arg_3 , arg_0 . chained_model_field ) . all ( ) . values_list ( 'pk' , flat = True ) arg_5 = { arg_0 . chained_model_field + "__in" : arg_6 } except AttributeError : try : arg_6 = getattr ( arg_3 , arg_0 . chained_model_field + "_set" ) . all ( ) . values_list ( 'pk' , flat = True ) arg_5 = { arg_0 . chained_model_field + "__in" : arg_6 } except AttributeError : arg_5 = { } arg_7 = list ( get_model ( arg_0 . to_app_name , arg_0 . to_model_name ) . objects . filter ( ** arg_5 ) . distinct ( ) ) if arg_0 . sort : sort_results ( arg_7 ) else : arg_7 = [ ] return arg_7

def Func(arg_0, arg_1, arg_2):
        """
        get possible choices for selection
        """
        arg_3 = arg_1.filter(arg_4=arg_2).first()
        if arg_3:
            try:
                arg_4 = getattr(arg_3, arg_0.chained_model_field + "_id")
                arg_5 = {arg_0.chained_model_field: arg_4}
            except AttributeError:
                try:  # maybe m2m?
                    arg_6 = getattr(arg_3, arg_0.chained_model_field).all().values_list('pk', flat=True)
                    arg_5 = {arg_0.chained_model_field + "__in": arg_6}
                except AttributeError:
                    try:  # maybe a set?
                        arg_6 = getattr(arg_3, arg_0.chained_model_field + "_set").all().values_list('pk', flat=True)
                        arg_5 = {arg_0.chained_model_field + "__in": arg_6}
                    except AttributeError:  # give up
                        arg_5 = {}
            arg_7 = list(get_model(arg_0.to_app_name, arg_0.to_model_name).objects.filter(**arg_5).distinct())
            if arg_0.sort:
                sort_results(arg_7)
        else:
            # invalid value for queryset
            arg_7 = []

        return arg_7


def Func ( ) : try : pkg_resources . get_distribution ( 'invenio-access' ) from invenio_access . permissions import DynamicPermission as Permission except pkg_resources . DistributionNotFound : from flask_principal import Permission return Permission ( action_admin_access )

def Func():
    """Factory for creating a permission for an admin `deposit-admin-access`.

    If `invenio-access` module is installed, it returns a
    :class:`invenio_access.permissions.DynamicPermission` object.
    Otherwise, it returns a :class:`flask_principal.Permission` object.

    :returns: Permission instance.
    """
    try:
        pkg_resources.get_distribution('invenio-access')
        from invenio_access.permissions import DynamicPermission as Permission
    except pkg_resources.DistributionNotFound:
        from flask_principal import Permission

    return Permission(action_admin_access)

Factory for creating a permission for an admin deposit - admin - access .


_add_id_to_keys - Adds primary key to table
			internal

def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_2 is None : arg_2 = arg_0 . _get_connection ( ) arg_2 . sadd ( arg_0 . _get_ids_key ( ) , arg_1 )

def Func(arg_0, arg_1, arg_2=None):
		'''
			Func - Adds primary key to table
			internal
		'''
		if arg_2 is None:
			arg_2 = arg_0._get_connection()
		arg_2.sadd(arg_0._get_ids_key(), arg_1)


def Func(arg_0, arg_1, arg_2):
        '''
        Returns the Func of the items that match the provided filters.

        For the meaning of what the ``filters`` argument means, see the
        ``.search()`` method docs.
        '''
        arg_3, arg_4, arg_5 = arg_0._prepare(arg_1, arg_2)
        arg_3.zcard(arg_5)
        arg_3.delete(arg_5)
        return arg_3.execute()[-2]

Returns the count of the items that match the provided filters.

        For the meaning of what the ``filters`` argument means, see the
        ``.search()`` method docs.

Returns the count of the items that match the provided filters .


(self, token, item_id, element, value,
                          qualifier=None)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4,
                          arg_5=None):
        """
        Set the metadata associated with an item.

        :param token: A valid token for the user in question.
        :type token: string
        :param item_id: The id of the item for which metadata will be set.
        :type item_id: int | long
        :param element: The metadata element name.
        :type element: string
        :param value: The metadata value for the field.
        :type value: string
        :param qualifier: (optional) The metadata qualifier. Defaults to empty
            string.
        :type qualifier: None | string
        :returns: None.
        :rtype: None
        """
        arg_6 = dict()
        arg_6['token'] = arg_1
        arg_6['itemId'] = arg_2
        arg_6['element'] = arg_3
        arg_6['value'] = arg_4
        if arg_5:
            arg_6['qualifier'] = arg_5
        arg_7 = arg_0.request('midas.item.setmetadata', arg_6)
        return arg_7

Set the metadata associated with an item .


return (s.start is not None and s.stop is not None and s.step is not None and s.start <= s.stop)

def Func ( arg_0 ) : return ( arg_0 . start is not None and arg_0 . stop is not None and arg_0 . step is not None and arg_0 . start <= arg_0 . stop )

def Func(arg_0):
    """Return True if slice ``s`` in "normalized" form."""
    return (arg_0.start is not None and arg_0.stop is not None and arg_0.step is not None and arg_0.start <= arg_0.stop)

Return True if slice s in normalized form .


def Func(arg_0):
    """Formats the file size into a human readable format."""
    for arg_1 in ("bytes", "KB", "MB", "GB", "TB"):
        if arg_0 < 1024.0:
            if arg_1 in ("GB", "TB"):
                return "{0:3.2f} {1}".format(arg_0, arg_1)
            else:
                return "{0:3.1f} {1}".format(arg_0, arg_1)

        arg_0 /= 1024.0

Formats the file size into a human readable format .


def Func(arg_0):
        """Parse a Bugzilla bug activity HTML stream.

        This method extracts the information about activity from the
        given HTML stream. The bug activity is stored into a HTML
        table. Each parsed activity event is returned into a dictionary.

        If the given HTML is invalid, the method will raise a ParseError
        exception.

        :param raw_html: HTML string to parse

        :returns: a generator of parsed activity events

        :raises ParseError: raised when an error occurs parsing
            the given HTML stream
        """
        def is_activity_empty(arg_1):
            arg_2 = "No changes have been made to this (?:bug|issue) yet."
            arg_3 = arg_1.find(text=re.compile(arg_2))
            return arg_3 is not None

        def find_activity_table(arg_1):
            # The first table with 5 columns is the table of activity
            arg_4 = arg_1.find_all('table')

            for arg_5 in arg_4:
                arg_6 = len(arg_5.tr.find_all('th', recursive=False))
                if arg_6 == 5:
                    return arg_5
            raise ParseError(cause="Table of bug activity not found.")

        def remove_tags(arg_1):
            arg_7 = ['a', 'i', 'span']

            for arg_3 in arg_1.find_all(arg_7):
                arg_3.replaceWith(arg_3.text)

        def format_text(arg_1):
            arg_8 = [arg_9.strip(' \n\t') for arg_9 in arg_1.stripped_strings]
            arg_9 = ' '.join(arg_8)
            return arg_9

        # Parsing starts here
        arg_1 = bs4.BeautifulSoup(arg_0, 'html.parser')

        if is_activity_empty(arg_1):
            arg_10 = []
        else:
            arg_11 = find_activity_table(arg_1)
            remove_tags(arg_11)
            arg_10 = arg_11.find_all('td')

        while arg_10:
            # First two fields: 'Who' and 'When'.
            arg_12 = arg_10.pop(0)
            arg_13 = arg_10.pop(0)

            # The attribute 'rowspan' of 'who' field tells how many
            # changes were made on the same date.
            arg_14 = int(arg_12.get('rowspan'))

            # Next fields are split into chunks of three elements:
            # 'What', 'Removed' and 'Added'. These chunks share
            # 'Who' and 'When' values.
            for arg_15 in range(arg_14):
                arg_16 = arg_10.pop(0)
                arg_17 = arg_10.pop(0)
                arg_18 = arg_10.pop(0)
                arg_19 = {'Who': format_text(arg_12),
                         'When': format_text(arg_13),
                         'What': format_text(arg_16),
                         'Removed': format_text(arg_17),
                         'Added': format_text(arg_18)}
                yield arg_19

Parse a Bugzilla bug activity HTML stream .


def Func(arg_0, arg_1):
        """
        Limit to framerate, should be called after
        rendering has completed

        :param start_time: When execution started
        """
        if arg_0._speed:
            arg_2 = time()
            arg_3 = arg_2 - arg_1
            arg_4 = (1.0 / abs(arg_0._speed)) - arg_3
            if arg_4 > 0:
                sleep(arg_4)

Limit to framerate should be called after rendering has completed


return ForceSign(
        other_param=other_param,
        positive=True,
        mode=mode,
        reroll_count_max=reroll_count_max
    )

def Func ( arg_0 , arg_1 = "invert" , arg_2 = 2 ) : return ForceSign ( arg_0 = arg_0 , positive = True , arg_1 = arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1="invert", arg_2=2):
    """
    Converts another parameter's results to positive values.

    Parameters
    ----------
    other_param : imgaug.parameters.StochasticParameter
        Other parameter which's sampled values are to be
        modified.

    mode : {'invert', 'reroll'}, optional
        How to change the signs. Valid values are ``invert`` and ``reroll``.
        ``invert`` means that wrong signs are simply flipped.
        ``reroll`` means that all samples with wrong signs are sampled again,
        optionally many times, until they randomly end up having the correct
        sign.

    reroll_count_max : int, optional
        If `mode` is set to ``reroll``, this determines how often values may
        be rerolled before giving up and simply flipping the sign (as in
        ``mode="invert"``). This shouldn't be set too high, as rerolling is
        expensive.

    Examples
    --------
    >>> param = Func(Normal(0, 1), mode="reroll")

    Generates a normal distribution that has only positive values.

    """
    return ForceSign(
        arg_0=arg_0,
        positive=True,
        arg_1=arg_1,
        arg_2=arg_2
    )

Converts another parameter's results to positive values.

    Parameters
    ----------
    other_param : imgaug.parameters.StochasticParameter
        Other parameter which's sampled values are to be
        modified.

    mode : {'invert', 'reroll'}, optional
        How to change the signs. Valid values are ``invert`` and ``reroll``.
        ``invert`` means that wrong signs are simply flipped.
        ``reroll`` means that all samples with wrong signs are sampled again,
        optionally many times, until they randomly end up having the correct
        sign.

    reroll_count_max : int, optional
        If `mode` is set to ``reroll``, this determines how often values may
        be rerolled before giving up and simply flipping the sign (as in
        ``mode="invert"``). This shouldn't be set too high, as rerolling is
        expensive.

    Examples
    --------
    >>> param = Positive(Normal(0, 1), mode="reroll")

    Generates a normal distribution that has only positive values.

Converts another parameter s results to positive values .


def Func ( ) : return filter ( os . path . exists , map ( os . path . expanduser , config_files ) )

def Func():
    """Return path to any existing user config files
    """
    return filter(os.path.exists,
                  map(os.path.expanduser, config_files))


def Func(arg_0, **arg_1):
        """
        Search for Funcs by name.

        Args:
            query: CGI escpaed string.
            page: (optional) Minimum value of 1. Expected value is an integer.
            language: (optional) ISO 639-1 code.

        Returns:
            A dict respresentation of the JSON returned from the API.
        """
        arg_2 = arg_0._get_path('Func')

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

Search for collections by name.

        Args:
            query: CGI escpaed string.
            page: (optional) Minimum value of 1. Expected value is an integer.
            language: (optional) ISO 639-1 code.

        Returns:
            A dict respresentation of the JSON returned from the API.


(self, i, first_layer, best_layout, best_d,
                                 best_circ, layer_list)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4,
                                 arg_5, arg_6):
        """Update the QASM string for an iteration of swap_mapper.

        i = layer number
        first_layer = True if this is the first layer with multi-qubit gates
        best_layout = layout returned from swap algorithm
        best_d = depth returned from swap algorithm
        best_circ = swap circuit returned from swap algorithm
        layer_list = list of circuit objects for each layer

        Return DAGCircuit object to append to the output DAGCircuit.
        """
        arg_7 = arg_3
        arg_8 = DAGCircuit()
        arg_9 = QuantumRegister(arg_0.coupling_map.size(), 'q')
        arg_8.add_qreg(arg_9)
        # Identity wire-map for composing the circuits
        arg_10 = {(arg_9, arg_11): (arg_9, arg_11) for arg_11 in range(arg_0.coupling_map.size())}

        # If this is the first layer with multi-qubit gates,
        # output all layers up to this point and ignore any
        # swap gates. Set the initial layout.
        if arg_2:
            # Output all layers up to this point
            for arg_11 in range(arg_1 + 1):
                arg_8.compose_back(arg_6[arg_11]["graph"], arg_7)
        # Otherwise, we output the current layer and the associated swap gates.
        else:
            # Output any swaps
            if arg_4 > 0:
                arg_8.compose_back(arg_5, arg_10)

            # Output this layer
            arg_8.compose_back(arg_6[arg_1]["graph"], arg_7)
        return arg_8

Update the QASM string for an iteration of swap_mapper .


def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Stores several items from an iterable

        Iterables are supposed to be of a format like `[(msg, item, args, kwarg),...]`
        If `args` and `kwargs` are not part of a tuple, they are taken from the
        current `args` and `kwargs` provided to this function.

        """
        for arg_4 in arg_1:
            arg_5 = arg_4[0]
            arg_6 = arg_4[1]
            if len(arg_4) > 2:
                arg_2 = arg_4[2]
            if len(arg_4) > 3:
                arg_3 = arg_4[3]
            if len(arg_4) > 4:
                raise RuntimeError('You shall not pass!')

            arg_0.store(arg_5, arg_6, *arg_2, **arg_3)


(
        times,
        mags=None,
        errs=None,
        paramdists={
            'period':sps.uniform(loc=0.45,scale=0.35),
            'fourierorder':[8,11],
            'amplitude':sps.uniform(loc=0.4,scale=0.5),
            'phioffset':np.pi,
        },
        magsarefluxes=False
)

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = { 'period' : arg_4 . uniform ( arg_6 = 0.45 , arg_7 = 0.35 ) , 'fourierorder' : [ 8 , 11 ] , 'amplitude' : arg_4 . uniform ( arg_6 = 0.4 , arg_7 = 0.5 ) , 'phioffset' : arg_8 . pi , } , arg_10 = False ) : arg_11 = generate_sinusoidal_lightcurve ( arg_0 , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_10 = arg_10 ) arg_11 [ 'vartype' ] = 'RRab' return arg_11

def Func(
        arg_0,
        arg_1=None,
        arg_2=None,
        arg_3={
            'period':arg_4.uniform(arg_6=0.45,arg_7=0.35),
            'fourierorder':[8,11],
            'amplitude':arg_4.uniform(arg_6=0.4,arg_7=0.5),
            'phioffset':arg_8.pi,
        },
        arg_10=False
):
    '''This generates fake RRab light curves.

    Parameters
    ----------

    times : np.array
        This is an array of time values that will be used as the time base.

    mags,errs : np.array
        These arrays will have the model added to them. If either is
        None, `np.full_like(times, 0.0)` will used as a substitute and the model
        light curve will be centered around 0.0.

    paramdists : dict
        This is a dict containing parameter distributions to use for the
        model params, containing the following keys ::

            {'period', 'fourierorder', 'amplitude'}

        The values of these keys should all be 'frozen' scipy.stats distribution
        objects, e.g.:

        https://docs.scipy.org/doc/scipy/reference/stats.html#continuous-distributions
        The variability epoch will be automatically chosen from a uniform
        distribution between `times.min()` and `times.max()`.

        The `amplitude` will be flipped automatically as appropriate if
        `magsarefluxes=True`.

    magsarefluxes : bool
        If the generated time series is meant to be a flux time-series, set this
        to True to get the correct sign of variability amplitude.

    Returns
    -------

    dict
        A dict of the form below is returned::

            {'vartype': 'RRab',
             'params': {'period': generated value of period,
                        'epoch': generated value of epoch,
                        'amplitude': generated value of amplitude,
                        'fourierorder': generated value of fourier order,
                        'fourieramps': generated values of fourier amplitudes,
                        'fourierphases': generated values of fourier phases},
             'times': the model times,
             'mags': the model mags,
             'errs': the model errs,
             'varperiod': the generated period of variability == 'period'
             'varamplitude': the generated amplitude of
                             variability == 'amplitude'}

    '''

    arg_11 = generate_sinusoidal_lightcurve(arg_0,
                                               arg_1=arg_1,
                                               arg_2=arg_2,
                                               arg_3=arg_3,
                                               arg_10=arg_10)
    arg_11['vartype'] = 'RRab'
    return arg_11


def Func(arg_0, arg_1, arg_2, arg_3):
    """List experiment Func for this project.

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

    Examples:

    Get all Func:

    \b
    ```bash
    $ polyaxon project Func
    ```

    Get all Func with with status {created or running}, and
    creation date between 2018-01-01 and 2018-01-02,
    and search algorithm not in {grid or random search}

    \b
    ```bash
    $ polyaxon project Func \
      -q "status:created|running, started_at:2018-01-01..2018-01-02, search_algorithm:~grid|random"
    ```

    Get all Func sorted by update date

    \b
    ```bash
    $ polyaxon project Func -s "-updated_at"
    ```
    """
    arg_4, arg_5 = get_project_or_local(arg_0.obj.get('project'))

    arg_3 = arg_3 or 1
    try:
        arg_6 = PolyaxonClient().project.list_experiment_Func(username=arg_4,
                                                                   arg_5=arg_5,
                                                                   arg_1=arg_1,
                                                                   arg_2=arg_2,
                                                                   arg_3=arg_3)
    except (PolyaxonHTTPError, PolyaxonShouldExitError, PolyaxonClientException) as e:
        Printer.print_error(
            'Could not get experiment Func for project `{}`.'.format(arg_5))
        Printer.print_error('Error message `{}`.'.format(e))
        sys.exit(1)

    arg_7 = get_meta_response(arg_6)
    if arg_7:
        Printer.print_header('Experiment Func for project `{}/{}`.'.format(arg_4, arg_5))
        Printer.print_header('Navigation:')
        dict_tabulate(arg_7)
    else:
        Printer.print_header('No experiment Func found for project `{}/{}`.'.format(
            arg_4, arg_5))

    arg_8 = [Printer.add_status_color(o.to_light_dict(humanize_values=True))
               for o in arg_6['results']]
    arg_8 = list_dicts_to_tabulate(arg_8)
    if arg_8:
        Printer.print_header("Experiment Func:")
        arg_8.pop('project', None)
        arg_8.pop('user', None)
        dict_tabulate(arg_8, is_list_dict=True)

List experiment groups for this project.

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

    Examples:

    Get all groups:

    \b
    ```bash
    $ polyaxon project groups
    ```

    Get all groups with with status {created or running}, and
    creation date between 2018-01-01 and 2018-01-02,
    and search algorithm not in {grid or random search}

    \b
    ```bash
    $ polyaxon project groups \
      -q "status:created|running, started_at:2018-01-01..2018-01-02, search_algorithm:~grid|random"
    ```

    Get all groups sorted by update date

    \b
    ```bash
    $ polyaxon project groups -s "-updated_at"
    ```

List experiment groups for this project .


def
Func
(
)
:
global
arg_7
arg_0
,
arg_1
=
request
.
form
[
'hostname'
]
,
request
.
form
[
'port'
]
arg_2
=
_app_name_from_forwarding_info
(
arg_0
,
arg_1
)
arg_3
=
get_dusty_containers
(
[
arg_2
]
,
include_exited
=
True
)
if
not
arg_3
:
raise
ValueError
(
'No container exists for app {}'
.
format
(
arg_2
)
)
arg_4
=
arg_3
[
0
]
arg_5
=
uuid1
(
)
arg_6
=
Consumer
(
arg_4
[
'Id'
]
,
datetime
.
utcnow
(
)
)
arg_7
[
arg_8
(
arg_5
)
]
=
arg_6
arg_9
=
jsonify
(
{
'app_name'
:
arg_2
,
'consumer_id'
:
arg_5
}
)
arg_9
.
headers
[
'Access-Control-Allow-Origin'
]
=
'*'
arg_9
.
headers
[
'Access-Control-Allow-Methods'
]
=
'GET, POST'
return
arg_9

def Func():
    """Given a hostname and port attempting to be accessed,
    return a unique consumer ID for accessing logs from
    the referenced container."""
    global arg_7
    arg_0, arg_1 = request.form['hostname'], request.form['port']

    arg_2 = _app_name_from_forwarding_info(arg_0, arg_1)
    arg_3 = get_dusty_containers([arg_2], include_exited=True)
    if not arg_3:
        raise ValueError('No container exists for app {}'.format(arg_2))
    arg_4 = arg_3[0]

    arg_5 = uuid1()
    arg_6 = Consumer(arg_4['Id'], datetime.utcnow())
    arg_7[arg_8(arg_5)] = arg_6

    arg_9 = jsonify({'app_name': arg_2, 'consumer_id': arg_5})
    arg_9.headers['Access-Control-Allow-Origin'] = '*'
    arg_9.headers['Access-Control-Allow-Methods'] = 'GET, POST'
    return arg_9

Given a hostname and port attempting to be accessed return a unique consumer ID for accessing logs from the referenced container .


def Func(arg_0):

        """ Returns the darkest swatch.

        Knowing the contract between a light and a dark swatch
        can help us decide how to display readable typography.

        """

        arg_1, arg_2 = (1.0, 1.0, 1.0), 3.0
        for arg_3,arg_4,arg_5 in arg_0:
            if arg_3+arg_4+arg_5 < arg_2:
                arg_1, arg_2 = (arg_3,arg_4,arg_5), arg_3+arg_4+arg_5

        return arg_1

Returns the darkest swatch . Knowing the contract between a light and a dark swatch can help us decide how to display readable typography .


def Func(arg_0):
        """Returns the length of the parameter range.

        Raises TypeError if the parameter has no range.

        Does not need to be implemented if the parameter supports
        ``__len__`` appropriately.

        """
        if not arg_0.f_has_range():
            raise TypeError('Not applicable, parameter does not have a range')
        elif hasattr(arg_0, '__len__'):
            return len(arg_0)
        else:
            raise NotImplementedError("Should have implemented this.")

Returns the length of the parameter range .


Initializes the connection attribute with the path to the user home folder's Music folder, and creates it if it doesn't exist.

def Func ( arg_0 ) : if arg_0 . music_folder is None : arg_1 = os . path . join ( os . path . expanduser ( '~' ) , 'Music' ) if not os . path . exists ( arg_1 ) : os . makedirs ( arg_1 ) arg_0 . music_folder = arg_1

def Func(arg_0):
        """Initializes the Funcion attribute with the path to the user home folder's Music folder, and creates it if it doesn't exist."""

        if arg_0.music_folder is None:
            arg_1 = os.path.join(os.path.expanduser('~'), 'Music')
            if not os.path.exists(arg_1):
                os.makedirs(arg_1)
            arg_0.music_folder = arg_1

Initializes the connection attribute with the path to the user home folder s Music folder and creates it if it doesn t exist .


(
    client, input_filename, language, name, account=None, progress=False
)

return create_project_with_docs(
        client, docs, language, name, account, progress=progress
    )

def Func(
    arg_0, arg_1, arg_2, arg_3, arg_4=None, arg_5=False
):
    """
    Given a LuminosoClient pointing to the root of the API, and a filename to
    read JSON lines from, create a project from the documents in that file.
    """
    arg_6 = iterate_json_lines(arg_1)
    return create_project_with_docs(
        arg_0, arg_6, arg_2, arg_3, arg_4, arg_5=arg_5
    )

Given a LuminosoClient pointing to the root of the API and a filename to read JSON lines from create a project from the documents in that file .


def Func(arg_0):
        """Stop streaming samples from device and delete samples buffer"""
        if not arg_0.device.is_streaming:
            return

        arg_0.device.Func_stream()
        arg_0._writer.close()

        arg_0._bins = None
        arg_0._repeats = None
        arg_0._base_buffer_size = None
        arg_0._max_buffer_size = None
        arg_0._buffer_repeats = None
        arg_0._buffer = None
        arg_0._tune_delay = None
        arg_0._reset_stream = None
        arg_0._psd = None
        arg_0._writer = None


return nx.relabel_nodes(nx.DiGraph(results),
                                {idx: i for idx, i in enumerate(data.columns)})

def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : arg_0 . arguments [ '{CITEST}' ] = arg_0 . dir_CI_test [ arg_0 . CI_test ] arg_0 . arguments [ '{METHOD_INDEP}' ] = arg_0 . dir_method_indep [ arg_0 . method_indep ] arg_0 . arguments [ '{DIRECTED}' ] = 'TRUE' arg_0 . arguments [ '{ALPHA}' ] = str ( arg_0 . alpha ) arg_0 . arguments [ '{NJOBS}' ] = str ( arg_0 . nb_jobs ) arg_0 . arguments [ '{VERBOSE}' ] = str ( arg_0 . verbose ) . upper ( ) arg_5 = DataFrame ( nx . adj_matrix ( arg_2 , weight = None ) . todense ( ) ) arg_6 = DataFrame ( 1 - arg_5 . values ) arg_7 = arg_0 . _run_pc ( arg_1 , fixedEdges = arg_5 , fixedGaps = arg_6 , verbose = arg_0 . verbose ) return nx . relabel_nodes ( nx . DiGraph ( arg_7 ) , { arg_8 : arg_9 for arg_8 , arg_9 in enumerate ( arg_1 . columns ) } )

def Func(arg_0, arg_1, arg_2, **arg_3):
        """Run PC on an undirected graph.

        Args:
            data (pandas.DataFrame): DataFrame containing the data
            graph (networkx.Graph): Skeleton of the graph to orient

        Returns:
            networkx.DiGraph: Solution given by PC on the given skeleton.
        """
        # Building setup w/ arguments.
        arg_0.arguments['{CITEST}'] = arg_0.dir_CI_test[arg_0.CI_test]
        arg_0.arguments['{METHOD_INDEP}'] = arg_0.dir_method_indep[arg_0.method_indep]
        arg_0.arguments['{DIRECTED}'] = 'TRUE'
        arg_0.arguments['{ALPHA}'] = str(arg_0.alpha)
        arg_0.arguments['{NJOBS}'] = str(arg_0.nb_jobs)
        arg_0.arguments['{VERBOSE}'] = str(arg_0.verbose).upper()

        arg_5 = DataFrame(nx.adj_matrix(arg_2, weight=None).todense())
        arg_6 = DataFrame(1 - arg_5.values)

        arg_7 = arg_0._run_pc(arg_1, fixedEdges=arg_5, fixedGaps=arg_6, verbose=arg_0.verbose)

        return nx.relabel_nodes(nx.DiGraph(arg_7),
                                {arg_8: arg_9 for arg_8, arg_9 in enumerate(arg_1.columns)})


def
Func
(
arg_0
)
:
global
arg_2
global
arg_3
global
arg_4
arg_1
=
arg_0
.
strip
(
'/'
)
.
split
(
'/'
)
if
len
(
arg_1
)
<
6
:
print
"Illegal URL resource address.\n"
sys
.
exit
(
1
)
arg_2
[
"1.jobName"
]
=
arg_1
[
6
]
arg_3
=
arg_1
[
2
]
arg_4
=
arg_1
[
4
]

def Func(arg_0):
    """
    From user input, grab the jenkins job name and saved it in g_failed_test_info_dict.
    In addition, it will grab the jenkins url and the view name into g_jenkins_url, and
    g_view_name.

    Parameters
    ----------
    url_string :  str
        contains information on the jenkins job whose console output we are interested in.

    :return: none
    """
    global arg_2
    global arg_3
    global arg_4

    arg_1 = arg_0.strip('/').split('/')

    if len(arg_1) < 6:
        print "Illegal URL resource address.\n"
        sys.exit(1)

    arg_2["1.jobName"] = arg_1[6]

    arg_3 = arg_1[2]
    arg_4 = arg_1[4]

From user input grab the jenkins job name and saved it in g_failed_test_info_dict . In addition it will grab the jenkins url and the view name into g_jenkins_url and g_view_name .


(prompt='List input - enter each item on a seperate line\n' + \
        'Enter EOF on a blank line to end ' + \
        '(ctrl-D in *nix, ctrl-Z in windows)',
        maxitems=None, maxlength=None)

def Func(arg_0='List input - enter each item on a seperate line\n' + \
        'Enter EOF on a blank line to end ' + \
        '(ctrl-D in *nix, ctrl-Z in windows)',
        arg_1=None, arg_2=None):
    """Get a list of strings as input"""

    arg_3 = []
    print(arg_0)
    arg_4 = 1

    try:

        while True:

            if arg_1:

                if arg_4 > arg_1:
                    break
                else:
                    if arg_2:
                        arg_3.append(string_input('')[:arg_2])
                    else:
                        arg_3.append(string_input(''))
                    arg_4 += 1

            else:
                if arg_2:
                    arg_3.append(string_input('')[:arg_2])
                else:
                    arg_3.append(string_input(''))

    except EOFError:
        pass
    finally:
        return arg_3


def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_1 = arg_0 . compile_sympy_accesses ( ) arg_2 = defaultdict ( list ) for arg_3 , arg_4 in arg_1 . items ( ) : for arg_5 in range ( 1 , len ( arg_4 ) ) : arg_2 [ arg_3 ] . append ( ( arg_4 [ arg_5 - 1 ] - arg_4 [ arg_5 ] ) . simplify ( ) ) return arg_2

def Func(arg_0, arg_1=None):
        """
        Return load and store distances between accesses.

        :param sympy_accesses: optionally restrict accesses, default from compile_sympy_accesses()

        e.g. if accesses are to [+N, +1, -1, -N], relative distances are [N-1, 2, N-1]

        returned is a dict of list of sympy expressions, for each variable
        """
        if arg_1 is None:
            arg_1 = arg_0.compile_sympy_accesses()

        arg_2 = defaultdict(list)
        for arg_3, arg_4 in arg_1.items():
            for arg_5 in range(1, len(arg_4)):
                arg_2[arg_3].append((arg_4[arg_5-1]-arg_4[arg_5]).simplify())

        return arg_2

Return load and store distances between accesses .


def Func ( arg_0 , arg_1 , arg_2 = True ) : for arg_3 in arg_1 : if subprocess . call ( arg_3 , arg_2 = arg_2 ) == 1 : sys . exit ( 1 )

def Func(arg_0, arg_1, arg_2=True):
        """Run multiple commmands in a row, exiting if one fails."""
        for arg_3 in arg_1:
            if subprocess.call(arg_3, arg_2=arg_2) == 1:
                sys.exit(1)

Run multiple commmands in a row exiting if one fails .


def Func(arg_0):
        """Read the last conversion result when in continuous conversion mode.
        Will return a signed integer value.
        """
        # Retrieve the conversion register value, convert to a signed int, and
        # return it.
        arg_1 = arg_0._device.readList(ADS1x15_POINTER_CONVERSION, 2)
        return arg_0._conversion_value(arg_1[1], arg_1[0])

Read the last conversion result when in continuous conversion mode . Will return a signed integer value .


def Func ( arg_0 ) : if len ( arg_0 . _Func ) == 0 : for arg_1 in arg_0 . _data : if isinstance ( arg_0 . _data [ arg_1 ] , filetree ) : arg_0 . _Func . extend ( arg_0 . _data [ arg_1 ] . Func ( ) ) else : arg_0 . _Func . append ( arg_0 . _data [ arg_1 ] ) return arg_0 . _Func

def Func(arg_0):
        """
        Return list of files in filetree.
        """
        if len(arg_0._Func) == 0:
            for arg_1 in arg_0._data:
                if isinstance(arg_0._data[arg_1], filetree):
                    arg_0._Func.extend(arg_0._data[arg_1].Func())
                else:
                    arg_0._Func.append(arg_0._data[arg_1])
        return arg_0._Func


return sid[len(prefix):] if sid.startswith(prefix) else sid

def Func ( arg_0 , arg_1 ) : return arg_0 [ len ( arg_1 ) : ] if arg_0 . startswith ( arg_1 ) else arg_0

def Func(arg_0, arg_1):
    """Clips a prefix from the beginning of a string if it exists."""
    return arg_0[len(arg_1):] if arg_0.startswith(arg_1) else arg_0

Clips a prefix from the beginning of a string if it exists .


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_1 : arg_0 . index_document ( open ( arg_2 ) . read ( ) , arg_2 )

def Func(arg_0, arg_1):
        "Index a whole collection of files."
        for arg_2 in arg_1:
            arg_0.index_document(open(arg_2).read(), arg_2)


def Func ( arg_0 , arg_1 : arg_2 , arg_3 = None ) : return arg_0 . _user_data . get ( arg_1 , arg_3 )

def Func(arg_0, arg_1: arg_2, arg_3=None):
        """ Retrieves the related value from the stored user data. """
        return arg_0._user_data.get(arg_1, arg_3)

Retrieves the related value from the stored user data .


(po_files, languages, msgid, msgstrs, metadata, comment)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : arg_6 = re . compile ( r'^[\s]+' ) arg_7 = re . compile ( r'[\s]+$' ) for arg_8 , arg_9 in enumerate ( arg_1 ) : arg_10 = ast . literal_eval ( arg_4 ) arg_11 = polib . POEntry ( ** arg_10 ) arg_11 . tcomment = arg_5 arg_11 . msgid = arg_2 if arg_3 [ arg_8 ] : arg_13 = arg_6 . search ( arg_2 ) arg_14 = arg_7 . search ( arg_2 ) arg_11 . msgstr = str ( arg_13 . group ( ) if arg_13 else '' ) + unicode ( arg_3 [ arg_8 ] . strip ( ) ) + str ( arg_14 . group ( ) if arg_14 else '' ) else : arg_11 . msgstr = '' arg_0 [ arg_9 ] . append ( arg_11 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5):
    """
    Write msgstr for every language with all needed metadata and comment.
    Metadata are parser from string into dict, so read them only from gdocs.
    """
    arg_6 = re.compile(r'^[\s]+')
    arg_7 = re.compile(r'[\s]+$')
    for arg_8, arg_9 in enumerate(arg_1):
        arg_10 = ast.literal_eval(arg_4)
        arg_11 = polib.POEntry(**arg_10)
        arg_11.tcomment = arg_5
        arg_11.msgid = arg_2
        if arg_3[arg_8]:
            arg_13 = arg_6.search(arg_2)
            arg_14 = arg_7.search(arg_2)
            arg_11.msgstr = str(arg_13.group() if arg_13 else '') + \
                unicode(arg_3[arg_8].strip()) + \
                str(arg_14.group() if arg_14 else '')
        else:
            arg_11.msgstr = ''
        arg_0[arg_9].append(arg_11)

Write msgstr for every language with all needed metadata and comment . Metadata are parser from string into dict so read them only from gdocs .


(db, user_id, api_path, query_fields, decrypt_func)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = arg_0 . execute ( _select_file ( arg_1 , arg_2 , arg_3 , limit = 1 ) , ) . first ( ) if arg_5 is None : raise NoSuchFile ( arg_2 ) if files . c . content in arg_3 : return to_dict_with_content ( arg_3 , arg_5 , arg_4 ) else : return to_dict_no_content ( arg_3 , arg_5 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """
    Get file data for the given user_id, path, and query_fields.  The
    query_fields parameter specifies which database fields should be
    included in the returned file data.
    """
    arg_5 = arg_0.execute(
        _select_file(arg_1, arg_2, arg_3, limit=1),
    ).first()

    if arg_5 is None:
        raise NoSuchFile(arg_2)

    if files.c.content in arg_3:
        return to_dict_with_content(arg_3, arg_5, arg_4)
    else:
        return to_dict_no_content(arg_3, arg_5)

Get file data for the given user_id path and query_fields . The query_fields parameter specifies which database fields should be included in the returned file data .


def Func ( arg_0 ) : if os . path . isdir ( arg_0 . workdir ) == False : os . mkdir ( arg_0 . workdir )

def Func(arg_0):
    """
    Checks if required directories exist and creates them if needed.
    """
    if os.path.isdir(arg_0.workdir) == False: os.mkdir(arg_0.workdir)

Checks if required directories exist and creates them if needed .


def
Func
(
arg_0
)
:
if
arg_0
==
:
arg_0
=
wx
.
NewId
(
)
logger
.
debug
(
'Generated new ID %s.'
,
arg_0
)
else
:
logger
.
debug
(
'Using provided id %s.'
,
arg_0
)
return
arg_0

def Func(arg_0):
 """Get a new id if the provided one is None."""
 if arg_0 == None:
  arg_0 = wx.NewId()
  logger.debug('Generated new ID %s.', arg_0)
 else:
  logger.debug('Using provided id %s.', arg_0)
 return arg_0

Get a new id if the provided one is None .


(self, num_words, max_cardinality, optimize_card=False, **kwargs)

return H2OFrame._expr(expr=ExprNode("isax", self, num_words, max_cardinality, optimize_card))

def Func(arg_0, arg_1, arg_2, arg_3=False, **arg_4):
        """
        Compute the iSAX index for DataFrame which is assumed to be numeric time series data.

        References:

            - http://www.cs.ucr.edu/~eamonn/SAX.pdf
            - http://www.cs.ucr.edu/~eamonn/iSAX_2.0.pdf

        :param int num_words: Number of iSAX words for the timeseries, i.e. granularity along the time series
        :param int max_cardinality: Maximum cardinality of the iSAX word. Each word can have less than the max
        :param bool optimized_card: An optimization flag that will find the max cardinality regardless of what is
            passed in for ``max_cardinality``.

        :returns: An H2OFrame with the name of time series, string representation of iSAX word, followed by
            binary representation.
        """
        if arg_1 <= 0: raise H2OValueError("num_words must be greater than 0")
        if arg_2 <= 0: raise H2OValueError("max_cardinality must be greater than 0")
        return H2OFrame._expr(expr=ExprNode("Func", arg_0, arg_1, arg_2, arg_3))

Compute the iSAX index for DataFrame which is assumed to be numeric time series data .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
assert
(
len
(
arg_0
)
==
len
(
arg_1
)
)
arg_3
=
list
(
map
(
_get_name
,
arg_0
)
)
assert
'content'
in
arg_3
,
"Missing content field."
arg_4
=
dict
(
zip
(
arg_3
,
arg_1
)
)
arg_4
[
'content'
]
=
arg_2
(
arg_4
[
'content'
]
)
return
arg_4

def Func(arg_0, arg_1, arg_2):
    """
    Convert a SQLAlchemy row that contains a 'content' field to a dict.

    ``decrypt_func`` will be applied to the ``content`` field of the row.

    If row is None, return None.

    Raises AssertionError if there is no field named 'content' in ``fields``.
    """
    assert(len(arg_0) == len(arg_1))

    arg_3 = list(map(_get_name, arg_0))
    assert 'content' in arg_3, "Missing content field."

    arg_4 = dict(zip(arg_3, arg_1))
    arg_4['content'] = arg_2(arg_4['content'])
    return arg_4

Convert a SQLAlchemy row that contains a content field to a dict .


def
Func
(
arg_0
,
arg_1
)
:
if
os
.
path
.
splitext
(
arg_1
)
[
1
]
.
lower
(
)
in
[
'.jpg'
,
'.png'
]
:
arg_2
=
''
%
(
arg_1
,
arg_1
)
if
"_tif_"
in
arg_1
:
arg_2
=
arg_2
.
replace
(
'<img '
,
'<img class="datapic micrograph"'
)
if
"_plot_"
in
arg_1
:
arg_2
=
arg_2
.
replace
(
'<img '
,
'<img class="datapic intrinsic" '
)
if
"_experiment_"
in
arg_1
:
arg_2
=
arg_2
.
replace
(
'<img '
,
'<img class="datapic experiment" '
)
elif
os
.
path
.
splitext
(
arg_1
)
[
1
]
.
lower
(
)
in
[
'.html'
,
'.htm'
]
:
arg_2
=
'LINK: %s'
%
arg_1
else
:
arg_2
=
'
Not sure how to show: [%s]
'
%
arg_1
return
arg_2

def Func(arg_0,arg_1):
        """return appropriate HTML determined by file extension."""
        if os.path.splitext(arg_1)[1].lower() in ['.jpg','.png']:
            arg_2=''%(arg_1,arg_1)
            if "_tif_" in arg_1:
                arg_2=arg_2.replace('<img ','<img class="datapic micrograph"')
            if "_plot_" in arg_1:
                arg_2=arg_2.replace('<img ','<img class="datapic intrinsic" ')
            if "_experiment_" in arg_1:
                arg_2=arg_2.replace('<img ','<img class="datapic experiment" ')
        elif os.path.splitext(arg_1)[1].lower() in ['.html','.htm']:
            arg_2='LINK: %s'%arg_1
        else:
            arg_2='
Not sure how to show: [%s]
'%arg_1
        return arg_2

return appropriate HTML determined by file extension .


def Func(arg_0, arg_1):
        """Launches GBDX batch workflow.

        Args:
            batch_workflow (dict): Dictionary specifying batch workflow tasks.

        Returns:
            Batch Workflow id (str).
        """

        # hit workflow api
        arg_2 = '%(base_url)s/batch_workflows' % {
            'base_url': arg_0.base_url
        }
        try:
            arg_3 = arg_0.gbdx_connection.post(arg_2, json=arg_1)
            arg_4 = arg_3.json()['batch_workflow_id']
            return arg_4
        except TypeError as e:
            arg_0.logger.debug('Batch Workflow not launched, reason: {0}'.format(e))


def Func ( arg_0 , * arg_1 , ** arg_2 ) : for arg_3 in arg_0 . _Func ( * arg_1 , ** arg_2 ) : yield did ( arg_3 [ '_id' ] ) , arg_0 . fc_from_dict ( arg_3 [ '_source' ] [ 'fc' ] )

def Func(arg_0, *arg_1, **arg_2):
        '''Scan for FCs in the given id ranges.

        :param key_ranges:
          ``key_ranges`` should be a list of pairs of ranges. The first
          value is the lower bound id and the second value is the
          upper bound id. Use ``()`` in either position to leave it
          unbounded. If no ``key_ranges`` are given, then all FCs in
          the store are returned.
        :param [str] feature_names:
          A list of feature names to retrieve. When ``None``, all
          features are retrieved. Wildcards are allowed.
        :rtype: Iterable of ``(content_id, FC)``
        '''
        for arg_3 in arg_0._Func(*arg_1, **arg_2):
            yield did(arg_3['_id']), arg_0.fc_from_dict(arg_3['_source']['fc'])


def Func ( arg_0 , arg_1 ) : arg_0 . PC = Operators . ITEBV ( arg_0 . address_bit_size , arg_0 . CF == False , arg_1 . read ( ) , arg_0 . PC )

def Func(arg_0, arg_1):
        """
        Jumps short if not below.

        :param cpu: current CPU.
        :param target: destination operand.
        """
        arg_0.PC = Operators.ITEBV(arg_0.address_bit_size, arg_0.CF == False, arg_1.read(), arg_0.PC)


(self, container, headers=None, query=None, cdn=False,
                      body=None)

return self.request(
            'PUT', path, body or '', headers, query=query, cdn=cdn)

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=False,
                      arg_5=None):
        """
        PUTs the container and returns the results. This is usually
        done to create new containers and can also be used to set
        X-Container-Meta-xxx headers. Note that if the container
        already exists, any existing X-Container-Meta-xxx headers will
        remain untouched. To remove an X-Container-Meta-xxx header,
        send the header with an empty string as its value.

        :param container: The name of the container.
        :param headers: Additional headers to send with the request.
        :param query: Set to a dict of query values to send on the
            query string of the request.
        :param cdn: If set True, the CDN management interface will be
            used.
        :param body: Some container PUT requests, like the
            extract-archive bulk upload request, take a body.
        :returns: A tuple of (status, reason, headers, contents).

            :status: is an int for the HTTP status code.
            :reason: is the str for the HTTP status (ex: "Ok").
            :headers: is a dict with all lowercase keys of the HTTP
                headers; if a header has multiple values, it will be a
                list.
            :contents: is the str for the HTTP body.
        """
        arg_6 = arg_0._container_path(arg_1)
        return arg_0.request(
            'PUT', arg_6, arg_5 or '', arg_2, arg_3=arg_3, arg_4=arg_4)

PUTs the container and returns the results . This is usually done to create new containers and can also be used to set X - Container - Meta - xxx headers . Note that if the container already exists any existing X - Container - Meta - xxx headers will remain untouched . To remove an X - Container - Meta - xxx header send the header with an empty string as its value .


return self.fetch_json(
            uri_path=self.base_uri,
            query_params=query_params or {}
        )

def Func ( arg_0 , arg_1 = None ) : return arg_0 . fetch_json ( uri_path = arg_0 . base_uri , arg_1 = arg_1 or { } )

def Func(arg_0, arg_1=None):
        '''
        Get Information for a member. Returns a dictionary of values.

        Returns:
            dict
        '''
        return arg_0.fetch_json(
            uri_path=arg_0.base_uri,
            arg_1=arg_1 or {}
        )

Get Information for a member . Returns a dictionary of values .


def Func ( arg_0 ) : if arg_0 . _metrics or arg_0 . _control or arg_0 . _plugins : arg_1 = arg_0 . _relays [ 'result' ] [ 'relays' ] for arg_2 in arg_1 : if arg_0 . _metrics : del arg_1 [ arg_2 ] [ 'metrics' ] if arg_0 . _control : del arg_1 [ arg_2 ] [ 'control' ] if arg_0 . _plugins : if 'plugins' in arg_1 [ arg_2 ] : del arg_1 [ arg_2 ] [ 'plugins' ]

def Func(arg_0):
        """
        Apply the criteria to filter out on the output required
        """
        if arg_0._metrics or arg_0._control or arg_0._plugins:
            arg_1 = arg_0._relays['result']['relays']
            for arg_2 in arg_1:
                if arg_0._metrics:
                    del arg_1[arg_2]['metrics']
                if arg_0._control:
                    del arg_1[arg_2]['control']
                if arg_0._plugins:
                    if 'plugins' in arg_1[arg_2]:
                        del arg_1[arg_2]['plugins']


def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = { } for arg_4 , arg_5 in arg_2 . items ( ) : arg_3 [ arg_0 . _underscore_to_camelcase ( arg_4 ) ] = arg_5 arg_7 = { "properties" : arg_3 } arg_8 = arg_0 . _perform_request ( url = '/um/users/%s' % arg_1 , method = 'PUT' , arg_7 = json . dumps ( arg_7 ) ) return arg_8

def Func(arg_0, arg_1, **arg_2):
        """
        Updates a user.

        :param      user_id: The unique ID of the user.
        :type       user_id: ``str``

        """
        arg_3 = {}

        for arg_4, arg_5 in arg_2.items():
            arg_3[arg_0._underscore_to_camelcase(arg_4)] = arg_5

        arg_7 = {
            "properties": arg_3
        }

        arg_8 = arg_0._perform_request(
            url='/um/users/%s' % arg_1,
            method='PUT',
            arg_7=json.dumps(arg_7))

        return arg_8


def Func(arg_0, arg_1):
        """Will parse git log messages in the 'short' format"""
        arg_2 = r"commit ([0-9a-f]+)\nAuthor: (.*?)\n\n(.*?)(?:\n\n|$)"
        arg_3 = re.findall(arg_2, arg_1, re.DOTALL)

        arg_4 = []
        for arg_5, arg_6, arg_7 in arg_3:
            arg_4.append((
                arg_5[:10],
                re.sub(r"\s*<.*?>", "", arg_6), # Remove email address if present
                arg_7.strip()
            ))
        return arg_4

Will parse git log messages in the short format


(ctx, product, git_ref, dirname, aws_id, aws_secret, ci_env,
           on_travis_push, on_travis_pr, on_travis_api, on_travis_cron,
           skip_upload)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6,
           arg_7, arg_8, arg_9, arg_10,
           arg_11):
    """Upload a new site build to LSST the Docs.
    """
    arg_12 = logging.getLogger(__name__)

    if arg_11:
        click.echo('Skipping ltd Func.')
        sys.exit(0)

    arg_12.debug('CI environment: %s', arg_6)
    arg_12.debug('Travis events settings. '
                 'On Push: %r, PR: %r, API: %r, Cron: %r',
                 arg_7, arg_8, arg_9, arg_10)

    # Abort Func on Travis CI under certain events
    if arg_6 == 'travis' and \
            _should_skip_travis_event(
                arg_7, arg_8, arg_9, arg_10):
        sys.exit(0)

    # Authenticate to LTD Keeper host
    ensure_login(arg_0)

    # Detect git refs
    arg_13 = _get_git_refs(arg_6, arg_2)

    arg_14 = register_build(
        arg_0.obj['keeper_hostname'],
        arg_0.obj['token'],
        arg_1,
        arg_13
    )
    arg_12.debug('Created build resource %r', arg_14)

    # Do the Func.
    # This cache_control is appropriate for builds since they're immutable.
    # The LTD Keeper server changes the cache settings when copying the build
    # over to be a mutable edition.
    Func_dir(
        arg_14['bucket_name'],
        arg_14['bucket_root_dir'],
        arg_3,
        aws_access_key_id=arg_4,
        aws_secret_access_key=arg_5,
        surrogate_key=arg_14['surrogate_key'],
        cache_control='max-age=31536000',
        surrogate_control=None,
        Func_dir_redirect_objects=True)
    arg_12.debug('Upload complete for %r', arg_14['self_url'])

    # Confirm Func
    confirm_build(
        arg_14['self_url'],
        arg_0.obj['token']
    )
    arg_12.debug('Build %r complete', arg_14['self_url'])

Upload a new site build to LSST the Docs .


_add_id_to_index - Adds an id to an index
			internal

(self, indexedField, pk, val, conn=None)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None):
		'''
			Func - Adds an id to an index
			internal
		'''
		if arg_4 is None:
			arg_4 = arg_0._get_connection()
		arg_4.sadd(arg_0._get_key_for_index(arg_1, arg_3), arg_2)


def Func ( arg_0 , arg_1 ) : arg_2 = yield from arg_0 . handle_get ( arg_1 ) if arg_2 is None : return None return int ( arg_2 . value . u8 . text ) or None

def Func(arg_0, arg_1):
        """Helper method for fetching a integer value."""
        arg_2 = yield from arg_0.handle_get(arg_1)
        if arg_2 is None:
            return None

        return int(arg_2.value.u8.text) or None

Helper method for fetching a integer value .


(self, morfs=None, show_missing=True, ignore_errors=None,
                file=None,                          # pylint: disable=W0622
                omit=None, include=None
                )

def Func(arg_0, arg_1=None, arg_2=True, arg_3=None,
                arg_4=None,                          # pylint: disable=W0622
                arg_5=None, arg_6=None
                ):
        """Write a summary Func to `file`.

        Each module in `morfs` is listed, with counts of statements, executed
        statements, missing statements, and a list of lines missed.

        `include` is a list of filename patterns.  Modules whose filenames
        match those patterns will be included in the Func. Modules matching
        `omit` will not be included in the Func.

        Returns a float, the total percentage covered.

        """
        arg_0._harvest_data()
        arg_0.config.from_args(
            arg_3=arg_3, arg_5=arg_5, arg_6=arg_6,
            arg_2=arg_2,
            )
        arg_7 = SummaryReporter(arg_0, arg_0.config)
        return arg_7.Func(arg_1, outfile=arg_4)

Write a summary report to `file`.

        Each module in `morfs` is listed, with counts of statements, executed
        statements, missing statements, and a list of lines missed.

        `include` is a list of filename patterns.  Modules whose filenames
        match those patterns will be included in the report. Modules matching
        `omit` will not be included in the report.

        Returns a float, the total percentage covered.


(caffe_def_path, caffemodel_path, inputs, output_file_path, output_node_names, graph_name='Graph',
                    use_padding_same=False)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5='Graph',
                    arg_6=False):
    """Save a small version of the graph based on a Caffe model, the input tensors and the output node names."""
    with caffe_to_tensorflow_session(arg_0, arg_1, arg_2, arg_5=arg_5,
                                     arg_6=arg_6) as sess:
        tf_freeze.Func(sess, arg_3, arg_4)

Save a small version of the graph based on a Caffe model the input tensors and the output node names .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
.
split_contents
(
)
arg_3
=
False
if
len
(
arg_2
)
>=
2
:
arg_3
=
'{{'
in
arg_2
[
1
]
if
arg_3
:
arg_4
=
arg_5
=
[
]
for
arg_6
in
arg_2
:
if
arg_4
is
True
:
arg_4
=
arg_6
continue
if
arg_6
==
'fallback'
:
arg_4
=
True
else
:
arg_5
.
append
(
arg_6
)
if
arg_4
:
arg_4
=
arg_0
.
compile_filter
(
construct_relative_path_
(
arg_0
,
arg_4
)
)
arg_1
.
contents
=
' '
.
join
(
arg_5
)
arg_1
.
contents
=
arg_1
.
contents
.
replace
(
'Func'
,
'include'
)
arg_8
=
do_include
(
arg_0
,
arg_1
)
if
arg_3
:
arg_8
=
DynamicIncludeNode
(
arg_8
.
template
,
extra_context
=
arg_8
.
extra_context
,
isolated_context
=
arg_8
.
isolated_context
,
arg_4
=
arg_4
or
,
)
return
arg_8

def Func(arg_0, arg_1):
    """Similar to built-in ``include`` template tag, but allowing
    template variables to be used in template name and a fallback template,
    thus making the tag more dynamic.

    .. warning:: Requires Django 1.8+

    Example:

        {% load etc_misc %}
        {% Func "sub_{{ postfix_var }}.html" fallback "default.html" %}

    """
    arg_2 = arg_1.split_contents()

    arg_3 = False

    # We fallback to built-in `include` if a template name contains no variables.
    if len(arg_2) >= 2:
        arg_3 = '{{' in arg_2[1]

        if arg_3:
            arg_4 = None
            arg_5 = []

            for arg_6 in arg_2:

                if arg_4 is True:
                    # This bit is a `fallback` argument.
                    arg_4 = arg_6
                    continue

                if arg_6 == 'fallback':
                    arg_4 = True

                else:
                    arg_5.append(arg_6)

            if arg_4:
                arg_4 = arg_0.compile_filter(construct_relative_path_(arg_0, arg_4))

            arg_1.contents = ' '.join(arg_5)

    arg_1.contents = arg_1.contents.replace('Func', 'include')
    arg_8 = do_include(arg_0, arg_1)

    if arg_3:
        # swap simple include with dynamic
        arg_8 = DynamicIncludeNode(
            arg_8.template,
            extra_context=arg_8.extra_context,
            isolated_context=arg_8.isolated_context,
            arg_4=arg_4 or None,
        )

    return arg_8

Similar to built-in ``include`` template tag, but allowing
    template variables to be used in template name and a fallback template,
    thus making the tag more dynamic.

    .. warning:: Requires Django 1.8+

    Example:

        {% load etc_misc %}
        {% include_ "sub_{{ postfix_var }}.html" fallback "default.html" %}

Similar to built - in include template tag but allowing template variables to be used in template name and a fallback template thus making the tag more dynamic .


def Func ( arg_0 ) : def prepare_refs ( arg_1 ) : return [ arg_2 . hash . encode ( 'utf-8' ) for arg_2 in arg_1 if not arg_2 . refname . endswith ( '^{}' ) ] def determine_wants ( arg_1 ) : arg_3 = prepare_refs ( arg_0 . _discover_refs ( remote = True ) ) arg_4 = prepare_refs ( arg_0 . _discover_refs ( ) ) arg_5 = [ arg_2 for arg_2 in arg_3 if arg_2 not in arg_4 ] return arg_5 arg_6 , arg_7 = dulwich . client . get_transport_and_path ( arg_0 . uri ) arg_8 = dulwich . repo . Repo ( arg_0 . dirpath ) arg_9 = io . BytesIO ( ) arg_4 = arg_0 . _discover_refs ( ) arg_10 = _GraphWalker ( arg_4 ) arg_11 = arg_6 . fetch_pack ( arg_7 , determine_wants , arg_10 , arg_9 . write ) arg_1 = [ GitRef ( ref_hash . decode ( 'utf-8' ) , ref_name . decode ( 'utf-8' ) ) for ref_name , ref_hash in arg_11 . refs . items ( ) ] if len ( arg_9 . getvalue ( ) ) > 0 : arg_9 . seek ( 0 ) arg_12 = arg_8 . object_store . add_thin_pack ( arg_9 . read , None ) arg_13 = arg_12 . name ( ) . decode ( 'utf-8' ) else : arg_13 = None return ( arg_13 , arg_1 )

def Func(arg_0):
        """Fetch changes and store them in a pack."""

        def prepare_refs(arg_1):
            return [arg_2.hash.encode('utf-8') for arg_2 in arg_1
                    if not arg_2.refname.endswith('^{}')]

        def determine_wants(arg_1):
            arg_3 = prepare_refs(arg_0._discover_refs(remote=True))
            arg_4 = prepare_refs(arg_0._discover_refs())
            arg_5 = [arg_2 for arg_2 in arg_3 if arg_2 not in arg_4]
            return arg_5

        arg_6, arg_7 = dulwich.client.get_transport_and_path(arg_0.uri)
        arg_8 = dulwich.repo.Repo(arg_0.dirpath)
        arg_9 = io.BytesIO()

        arg_4 = arg_0._discover_refs()
        arg_10 = _GraphWalker(arg_4)

        arg_11 = arg_6.fetch_pack(arg_7,
                                   determine_wants,
                                   arg_10,
                                   arg_9.write)
        arg_1 = [GitRef(ref_hash.decode('utf-8'), ref_name.decode('utf-8'))
                for ref_name, ref_hash in arg_11.refs.items()]

        if len(arg_9.getvalue()) > 0:
            arg_9.seek(0)
            arg_12 = arg_8.object_store.add_thin_pack(arg_9.read, None)
            arg_13 = arg_12.name().decode('utf-8')
        else:
            arg_13 = None

        return (arg_13, arg_1)

Fetch changes and store them in a pack .


return sorted(result, key=operator.itemgetter(1), reverse=True)

def
Func
(
arg_0
)
:
arg_1
=
[
]
arg_2
=
re
.
compile
(
r'<(?P<type>\w+) \'(?P<name>\S+)\'>'
)
for
arg_3
,
arg_4
in
arg_0
.
items
(
)
:
if
arg_4
!=
0
:
arg_5
=
re
.
findall
(
arg_2
,
repr
(
arg_3
)
)
if
arg_5
:
arg_3
,
arg_6
=
arg_5
[
0
]
arg_1
.
append
(
(
"%s %s"
%
(
arg_3
,
arg_6
)
,
arg_4
)
)
return
sorted
(
arg_1
,
key
=
operator
.
itemgetter
(
1
)
,
reverse
=
True
)

def Func(arg_0):
    """Formats object count."""
    arg_1 = []
    arg_2 = re.compile(r'<(?P<type>\w+) \'(?P<name>\S+)\'>')
    for arg_3, arg_4 in arg_0.items():
        if arg_4 != 0:
            arg_5 = re.findall(arg_2, repr(arg_3))
            if arg_5:
                arg_3, arg_6 = arg_5[0]
                arg_1.append(("%s %s" % (arg_3, arg_6), arg_4))
    return sorted(arg_1, key=operator.itemgetter(1), reverse=True)


def Func ( arg_0 ) : if not arg_0 . is_running ( ) : arg_1 = arg_0 . _platform_impl . _process_name raise NoSuchProcess ( arg_0 . pid , arg_1 ) if os . name == 'posix' : arg_0 . send_signal ( signal . SIGKILL ) else : arg_0 . _platform_impl . Func_process ( )

def Func(arg_0):
        """Kill the current process."""
        # safety measure in case the current process has been Funced in
        # meantime and the kernel reused its PID
        if not arg_0.is_running():
            arg_1 = arg_0._platform_impl._process_name
            raise NoSuchProcess(arg_0.pid, arg_1)
        if os.name == 'posix':
            arg_0.send_signal(signal.SIGKILL)
        else:
            arg_0._platform_impl.Func_process()


def Func ( arg_0 ) : if not hasattr ( arg_0 , '_imgmin' ) : Func = _np . min ( arg_0 . images [ 0 ] ) for arg_2 in arg_0 . images : arg_3 = _np . min ( arg_2 ) if arg_3 > Func : Func = arg_3 arg_0 . _imgmin = Func return _np . min ( arg_0 . image )

def Func(arg_0):
        """
        Lowest value of input image.
        """
        if not hasattr(arg_0, '_imgmin'):
            Func = _np.min(arg_0.images[0])
            for arg_2 in arg_0.images:
                arg_3 = _np.min(arg_2)
                if arg_3 > Func:
                    Func = arg_3

            arg_0._imgmin = Func
        return _np.min(arg_0.image)


def
Func
(
arg_0
,
arg_1
:
arg_2
[
arg_3
]
=
)
:
if
arg_0
.
_dfk
is
not
:
raise
RuntimeError
(
'Config has already been Funced'
)
if
arg_1
is
:
arg_0
.
_dfk
=
DataFlowKernel
(
arg_3
(
)
)
else
:
arg_0
.
_dfk
=
DataFlowKernel
(
arg_1
)
return
arg_0
.
_dfk

def Func(arg_0, arg_1: arg_2[arg_3] = None):
        """Load a DataFlowKernel.

        Args:
            - config (Config) : Configuration to Func. This config will be passed to a
              new DataFlowKernel instantiation which will be set as the active DataFlowKernel.
        Returns:
            - DataFlowKernel : The Funced DataFlowKernel object.
        """
        if arg_0._dfk is not None:
            raise RuntimeError('Config has already been Funced')

        if arg_1 is None:
            arg_0._dfk = DataFlowKernel(arg_3())
        else:
            arg_0._dfk = DataFlowKernel(arg_1)

        return arg_0._dfk

Load a DataFlowKernel.

        Args:
            - config (Config) : Configuration to load. This config will be passed to a
              new DataFlowKernel instantiation which will be set as the active DataFlowKernel.
        Returns:
            - DataFlowKernel : The loaded DataFlowKernel object.


def Func ( arg_0 : arg_1 , arg_2 : arg_3 = False ) -> arg_1 : arg_4 = [ ] for arg_5 in arg_0 : arg_4 . append ( _MUNGE_REPLACEMENTS . get ( arg_5 , arg_5 ) ) arg_6 = "" . join ( arg_4 ) if keyword . iskeyword ( arg_6 ) : return f"{new_s}_" if not arg_2 and arg_6 in builtins . __dict__ : return f"{new_s}_" return arg_6

def Func(arg_0: arg_1, arg_2: arg_3 = False) -> arg_1:
    """Replace characters which are not valid in Python symbols
    with valid replacement strings."""
    arg_4 = []
    for arg_5 in arg_0:
        arg_4.append(_MUNGE_REPLACEMENTS.get(arg_5, arg_5))

    arg_6 = "".join(arg_4)

    if keyword.iskeyword(arg_6):
        return f"{new_s}_"

    if not arg_2 and arg_6 in builtins.__dict__:
        return f"{new_s}_"

    return arg_6

Replace characters which are not valid in Python symbols with valid replacement strings .


def Func(arg_0, arg_1, arg_2=1):
        """
        Append multiple H2OFrames to this frame, column-wise or row-wise.

        :param List[H2OFrame] frames: list of frames that should be appended to the current frame.
        :param int axis: if 1 then append column-wise (default), if 0 then append row-wise.

        :returns: an H2OFrame of the combined datasets.
        """
        if len(arg_1) == 0:
            raise ValueError("Input list of frames is empty! Nothing to Func.")

        if arg_2 == 1:
            arg_3 = arg_0.cbind(arg_1)
        else:
            arg_3 = arg_0.rbind(arg_1)
        return arg_3

Append multiple H2OFrames to this frame column - wise or row - wise .


def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_1 >= len ( arg_0 ) : return arg_2 else : return arg_0 [ arg_1 ]

def Func(arg_0, arg_1, arg_2=None):
    """return list item number, or default if don't exist"""
    if arg_1 >= len(arg_0):
        return arg_2
    else :
        return arg_0[arg_1]

return list item number or default if don t exist


def Func(arg_0):
        '''
        For each node of the tree, check whether there is a sequence available
        in the alignment and assign this sequence as a character array
        '''
        arg_1= 0
        if arg_0.is_vcf:
            # if alignment is specified as difference from ref
            arg_2 = arg_0.aln
        else:
            # if full alignment is specified
            arg_2 = {k.name: seq2array(k.seq, fill_overhangs=arg_0.fill_overhangs,
                                                   ambiguous_character=arg_0.gtr.ambiguous)
                                for k in arg_0.aln} #

        # loop over leaves and assign multiplicities of leaves (e.g. number of identical reads)
        for arg_3 in arg_0.tree.get_terminals():
            if arg_3.name in arg_0.seq_multiplicity:
                arg_3.count = arg_0.seq_multiplicity[arg_3.name]
            else:
                arg_3.count = 1.0

        # loop over tree, and assign sequences
        for arg_3 in arg_0.tree.find_clades():
            if arg_3.name in arg_2:
                arg_3.sequence= arg_2[arg_3.name]
            elif arg_3.is_terminal():
                arg_0.logger("***WARNING: TreeAnc.Func: NO SEQUENCE FOR LEAF: %s" % arg_3.name, 0, warn=True)
                arg_1 += 1
                arg_3.sequence = seq2array(arg_0.gtr.ambiguous*arg_0.seq_len, fill_overhangs=arg_0.fill_overhangs,
                                                 ambiguous_character=arg_0.gtr.ambiguous)
                if arg_1 > arg_0.tree.count_terminals()/3:
                    arg_0.logger("ERROR: At least 30\\% terminal nodes cannot be assigned with a sequence!\n", 0, warn=True)
                    arg_0.logger("Are you sure the alignment belongs to the tree?", 2, warn=True)
                    break
            else: # could not assign sequence for internal node - is OK
                pass

        if arg_1:
            arg_0.logger("***WARNING: TreeAnc: %d nodes don't have a matching sequence in the alignment."
                        " POSSIBLE ERROR."%arg_1, 0, warn=True)

        # extend profile to contain additional unknown characters
        arg_0.extend_profile()
        return arg_0.make_reduced_alignment()

For each node of the tree check whether there is a sequence available in the alignment and assign this sequence as a character array