def Func(arg_0, arg_1):
    """Diffusion coefficients of the two specified populations.
    """
    arg_2 = arg_0.diffusion_coeff_counts
    if len(arg_2) == 1:
        arg_3 = [arg_6.stop - arg_6.start for arg_6 in arg_1]
        assert arg_2[0][1] >= sum(arg_3)
        arg_2 = [(arg_2[0][0], ps) for ps in arg_3]

    arg_4 = []
    arg_5 = 0  # start index of diffusion-based populations
    for arg_6, (arg_7, arg_8) in zip(arg_1, arg_2):
        arg_4.append(arg_7)
        assert arg_6.start >= arg_5
        assert arg_6.stop <= arg_5 + arg_8
        arg_5 += arg_8
    return arg_4

Diffusion coefficients of the two specified populations .


(x, NFFT=None, detrend=True, sampling=1.,
                   scale_by_freq=True, window='hamming', axis=0)

def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
True
,
arg_3
=
1.
,
arg_4
=
True
,
arg_5
=
'hamming'
,
arg_6
=
0
)
:
arg_0
=
np
.
array
(
arg_0
)
if
arg_0
.
ndim
==
1
:
arg_6
=
0
arg_7
=
arg_0
.
shape
[
0
]
arg_8
=
Window
(
arg_7
,
arg_5
)
arg_8
=
arg_8
.
data
elif
arg_0
.
ndim
==
2
:
logging
.
debug
(
'2D array. each row is a 1D array'
)
[
arg_7
,
arg_9
]
=
arg_0
.
shape
arg_8
=
np
.
array
(
[
Window
(
arg_7
,
arg_5
)
.
data
for
this
in
range
(
arg_9
)
]
)
.
reshape
(
arg_7
,
arg_9
)
if
arg_1
is
:
arg_1
=
len
(
arg_0
)
arg_10
=
np
.
isrealobj
(
arg_0
)
if
arg_2
==
True
:
arg_11
=
np
.
mean
(
arg_0
,
arg_6
=
arg_6
)
else
:
arg_11
=
0
if
arg_10
==
True
:
if
arg_0
.
ndim
==
2
:
arg_12
=
(
abs
(
rfft
(
arg_0
*
arg_8
arg_11
,
arg_1
,
arg_6
=
0
)
)
)
**
2.
/
arg_7
else
:
arg_12
=
(
abs
(
rfft
(
arg_0
*
arg_8
arg_11
,
arg_1
,
arg_6
=
1
)
)
)
**
2.
/
arg_7
else
:
if
arg_0
.
ndim
==
2
:
arg_12
=
(
abs
(
fft
(
arg_0
*
arg_8
arg_11
,
arg_1
,
arg_6
=
0
)
)
)
**
2.
/
arg_7
else
:
arg_12
=
(
abs
(
fft
(
arg_0
*
arg_8
arg_11
,
arg_1
,
arg_6
=
1
)
)
)
**
2.
/
arg_7
if
arg_4
is
True
:
arg_13
=
arg_3
/
float
(
arg_1
)
arg_12
*=
2
*
np
.
pi
/
arg_13
if
arg_0
.
ndim
==
1
:
return
arg_12
.
transpose
(
)
else
:
return
arg_12

def Func(arg_0, arg_1=None, arg_2=True, arg_3=1.,
                   arg_4=True, arg_5='hamming', arg_6=0):
    """Simple periodogram, but matrices accepted.

    :param x: an array or matrix of data samples.
    :param NFFT: length of the data before FFT is computed (zero padding)
    :param bool detrend: detrend the data before co,puteing the FFT
    :param float sampling: sampling frequency of the input :attr:`data`.

    :param scale_by_freq:
    :param str window:

    :return: 2-sided PSD if complex data, 1-sided if real.

    if a matrix is provided (using numpy.matrix), then a periodogram
    is computed for each row. The returned matrix has the same shape as the input
    matrix.

    The mean of the input data is also removed from the data before computing
    the psd.

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

        from pylab import grid, semilogy
        from spectrum import data_cosine, Func
        data = data_cosine(N=1024, A=0.1, sampling=1024, freq=200)
        semilogy(Func(data, detrend=False, sampling=1024), marker='o')
        grid(True)

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

        import numpy
        from spectrum import Func, data_cosine
        from pylab import figure, semilogy, figure ,imshow
        # create N data sets and make the frequency dependent on the time
        N = 100
        m = numpy.concatenate([data_cosine(N=1024, A=0.1, sampling=1024, freq=x)
            for x in range(1, N)]);
        m.resize(N, 1024)
        res = Func(m)
        figure(1)
        semilogy(res)
        figure(2)
        imshow(res.transpose(), aspect='auto')

    .. todo:: a proper spectrogram class/function that takes care of normalisation
    """
    arg_0 = np.array(arg_0)
    # array with 1 dimension case
    if arg_0.ndim == 1:
        arg_6 = 0
        arg_7 = arg_0.shape[0]
        arg_8 = Window(arg_7, arg_5)   #same size as input data
        arg_8 = arg_8.data
    # matrix case
    elif arg_0.ndim == 2:
        logging.debug('2D array. each row is a 1D array')
        [arg_7, arg_9] = arg_0.shape
        arg_8 = np.array([Window(arg_7, arg_5).data for this in range(arg_9)]).reshape(arg_7,arg_9)

    if arg_1 is None:
        arg_1 = len(arg_0)

    arg_10 = np.isrealobj(arg_0)

    if arg_2 == True:
        arg_11 = np.mean(arg_0, arg_6=arg_6)
    else:
        arg_11 = 0

    if arg_10 == True:
        if arg_0.ndim == 2:
            arg_12 =  (abs (rfft (arg_0*arg_8 - arg_11, arg_1, arg_6=0))) ** 2. / arg_7
        else:
            arg_12 =  (abs (rfft (arg_0*arg_8 - arg_11, arg_1, arg_6=-1))) ** 2. / arg_7
    else:
        if arg_0.ndim == 2:
            arg_12 =  (abs (fft (arg_0*arg_8 - arg_11, arg_1, arg_6=0))) ** 2. / arg_7
        else:
            arg_12 =  (abs (fft (arg_0*arg_8 - arg_11, arg_1, arg_6=-1))) ** 2. / arg_7

    if arg_4 is True:
        arg_13 = arg_3 / float(arg_1)
        arg_12*= 2 * np.pi / arg_13

    if arg_0.ndim == 1:
        return arg_12.transpose()
    else:
        return arg_12

Simple periodogram, but matrices accepted.

    :param x: an array or matrix of data samples.
    :param NFFT: length of the data before FFT is computed (zero padding)
    :param bool detrend: detrend the data before co,puteing the FFT
    :param float sampling: sampling frequency of the input :attr:`data`.

    :param scale_by_freq:
    :param str window:

    :return: 2-sided PSD if complex data, 1-sided if real.

    if a matrix is provided (using numpy.matrix), then a periodogram
    is computed for each row. The returned matrix has the same shape as the input
    matrix.

    The mean of the input data is also removed from the data before computing
    the psd.

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

        from pylab import grid, semilogy
        from spectrum import data_cosine, speriodogram
        data = data_cosine(N=1024, A=0.1, sampling=1024, freq=200)
        semilogy(speriodogram(data, detrend=False, sampling=1024), marker='o')
        grid(True)

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

        import numpy
        from spectrum import speriodogram, data_cosine
        from pylab import figure, semilogy, figure ,imshow
        # create N data sets and make the frequency dependent on the time
        N = 100
        m = numpy.concatenate([data_cosine(N=1024, A=0.1, sampling=1024, freq=x)
            for x in range(1, N)]);
        m.resize(N, 1024)
        res = speriodogram(m)
        figure(1)
        semilogy(res)
        figure(2)
        imshow(res.transpose(), aspect='auto')

    .. todo:: a proper spectrogram class/function that takes care of normalisation

Simple periodogram but matrices accepted .


return {
        'slider_items': qs,
    }

def Func ( arg_0 ) : arg_1 = arg_0 . get ( 'request' ) arg_2 = SliderItem . objects . published ( arg_1 ) . order_by ( 'position' ) return { 'slider_items' : arg_2 , }

def Func(arg_0):
    """
    Renders the hero slider.

    """
    arg_1 = arg_0.get('request')
    arg_2 = SliderItem.objects.published(arg_1).order_by('position')
    return {
        'slider_items': arg_2,
    }


def
Func
(
)
:
if
arg_1
.
env_name
is
not
:
return
arg_1
.
env_name
in
(
'GAE_PRODUCTION'
,
'GAE_LOCAL'
)
try
:
import
google
.
appengine
except
ImportError
:
pass
else
:
arg_0
=
os
.
environ
.
get
(
_SERVER_SOFTWARE
,
''
)
if
arg_0
.
startswith
(
'Google App Engine/'
)
:
arg_1
.
env_name
=
'GAE_PRODUCTION'
return
True
elif
arg_0
.
startswith
(
'Development/'
)
:
arg_1
.
env_name
=
'GAE_LOCAL'
return
True
return
False

def Func():
    """Detects if the code is running in the App Engine environment.

    Returns:
        True if running in the GAE environment, False otherwise.
    """
    if arg_1.env_name is not None:
        return arg_1.env_name in ('GAE_PRODUCTION', 'GAE_LOCAL')

    try:
        import google.appengine  # noqa: unused import
    except ImportError:
        pass
    else:
        arg_0 = os.environ.get(_SERVER_SOFTWARE, '')
        if arg_0.startswith('Google App Engine/'):
            arg_1.env_name = 'GAE_PRODUCTION'
            return True
        elif arg_0.startswith('Development/'):
            arg_1.env_name = 'GAE_LOCAL'
            return True

    return False

Detects if the code is running in the App Engine environment .


def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_1 , str ) : return False ( arg_2 , arg_3 ) = os . path . splitext ( arg_1 ) if arg_3 not in arg_0 . extensions : return False else : return True

def Func(arg_0, arg_1):
        """
        Returns a boolean indicating whether the filename has an
        appropriate extension for this class.
        """
        if not isinstance(arg_1, str):
            return False
        (arg_2, arg_3) = os.path.splitext(arg_1)
        if arg_3 not in arg_0.extensions:
            return False
        else:
            return True

Returns a boolean indicating whether the filename has an appropriate extension for this class .


def Func(arg_0, arg_1):
    """Do basic validation of the uri, return the path and filename."""
    arg_2, arg_3 = os.path.split(arg_0)

    # dsub could support character ranges ([0-9]) with some more work, but for
    # now we assume that basic asterisk wildcards are sufficient. Reject any URI
    # that includes square brackets or question marks, since we know that
    # if they actually worked, it would be accidental.
    if '[' in arg_0 or ']' in arg_0:
      raise ValueError(
          'Square bracket (character ranges) are not supported: %s' % arg_0)
    if '?' in arg_0:
      raise ValueError('Question mark wildcards are not supported: %s' % arg_0)

    # Only support file URIs and *filename* wildcards
    # Wildcards at the directory level or "**" syntax would require better
    # support from the Pipelines API *or* doing expansion here and
    # (potentially) producing a series of FileParams, instead of one.
    if '*' in arg_2:
      raise ValueError(
          'Path wildcard (*) are only supported for files: %s' % arg_0)
    if '**' in arg_3:
      raise ValueError('Recursive wildcards ("**") not supported: %s' % arg_0)
    if arg_3 in ('..', '.'):
      raise ValueError('Path characters ".." and "." not supported '
                       'for file names: %s' % arg_0)

    # Do not allow non-recursive IO to reference directories.
    if not arg_1 and not arg_3:
      raise ValueError('Input or output values that are not recursive must '
                       'reference a filename or wildcard: %s' % arg_0)

Do basic validation of the uri return the path and filename .


def
Func
(
arg_0
)
:
try
:
return
{
str
:
parse_str
,
bool
:
parse_bool
,
int
:
parse_int
,
tuple
:
parse_tuple
,
list
:
parse_list
,
set
:
parse_set
,
}
[
arg_0
]
except
KeyError
:
raise
NotImplementedError
(
"Unsupported setting type: %r"
,
arg_0
)

def Func(arg_0):
    """
    Return appropriate parser for given type.

    :param typ: Type to get parser for.
    :return function: Parser
    """
    try:
        return {
            str: parse_str,
            bool: parse_bool,
            int: parse_int,
            tuple: parse_tuple,
            list: parse_list,
            set: parse_set,
        }[arg_0]
    except KeyError:
        raise NotImplementedError("Unsupported setting type: %r", arg_0)

Return appropriate parser for given type .


return QuerysetReport(
        "Invoices",
        ["id", "recipient", "value", "get_status_display"],
        invoices,
        headings=["id", "Recipient", "Value", "Status"],
        link_view=views.invoice,
    )

def Func ( arg_0 , arg_1 ) : Func = commerce . Invoice . objects . all ( ) . order_by ( "status" , "id" ) return QuerysetReport ( "Invoices" , [ "id" , "recipient" , "value" , "get_status_display" ] , Func , headings = [ "id" , "Recipient" , "Value" , "Status" ] , link_view = views . invoice , )

def Func(arg_0, arg_1):
    ''' Shows all of the invoices in the system. '''

    Func = commerce.Invoice.objects.all().order_by("status", "id")

    return QuerysetReport(
        "Invoices",
        ["id", "recipient", "value", "get_status_display"],
        Func,
        headings=["id", "Recipient", "Value", "Status"],
        link_view=views.invoice,
    )

Shows all of the invoices in the system .


async def Func ( arg_0 ) : while True : arg_1 = await arg_0 . _queue . get ( ) assert asyncio . iscoroutine ( arg_1 ) await arg_1

async def Func(arg_0):
        """Consume coroutines from the queue by executing them."""
        while True:
            arg_1 = await arg_0._queue.get()
            assert asyncio.iscoroutine(arg_1)
            await arg_1

Consume coroutines from the queue by executing them .


def Func ( arg_0 ) : arg_1 = arg_2 . value gui . alert ( arg_1 , "Message" ) log ( arg_1 ) arg_2 . value = "" arg_2 . set_focus ( )

def Func(arg_0):
    "Process an outgoing communication"
    # get the text written by the user (input textbox control)
    arg_1 = arg_2.value
    # Func the message (replace with socket/queue/etc.)
    gui.alert(arg_1, "Message")
    # record the message (update the UI)
    log(arg_1)
    arg_2.value = ""
    arg_2.set_focus()


return np.allclose(mat, mat.T, rtol=rtol, atol=atol)

def Func ( arg_0 , arg_1 = arg_2 , arg_3 = arg_4 ) : if arg_3 is None : arg_3 = arg_4 if arg_1 is None : arg_1 = arg_2 arg_5 = np . array ( arg_0 ) if arg_5 . ndim != 2 : return False return np . allclose ( arg_5 , arg_5 . T , arg_1 = arg_1 , arg_3 = arg_3 )

def Func(arg_0, arg_1=arg_2, arg_3=arg_4):
    """Test if an array is a symmetrix matrix"""
    if arg_3 is None:
        arg_3 = arg_4
    if arg_1 is None:
        arg_1 = arg_2
    arg_5 = np.array(arg_0)
    if arg_5.ndim != 2:
        return False
    return np.allclose(arg_5, arg_5.T, arg_1=arg_1, arg_3=arg_3)


def Func(arg_0, arg_1, arg_2: arg_3):
    """Generate a summary Func."""
    from tabulate import tabulate
    arg_4 = ['', 'Name', 'Description', 'Terms', 'Relations']
    arg_5 = []

    for arg_6, (arg_7, arg_8, arg_9) in enumerate(_iterate_managers(arg_0, arg_1), start=1):
        try:
            if not arg_9.is_populated():
                continue
        except AttributeError:
            click.secho(f'{name} does not implement is_populated', fg='red')
            continue

        arg_10, arg_11 = None, None
        if isinstance(arg_9, BELNamespaceManagerMixin):
            arg_10 = arg_9._count_model(arg_9.namespace_model)

        if isinstance(arg_9, BELManagerMixin):
            try:
                arg_11 = arg_9.count_relations()
            except TypeError as e:
                arg_11 = str(e)

        arg_5.append((arg_6, arg_8, arg_9.__doc__.split('\n')[0].strip().strip('.'), arg_10, arg_11))

    print(tabulate(
        arg_5,
        headers=arg_4,
        # tablefmt="fancy_grid",
    ))


(self, hash_key, start=0, extra_attrs=None)

def Func(arg_0, arg_1, arg_2=0, arg_3=None):
        '''
        Hook point for overriding how the CouterPool fetches a DynamoDB item
        for a given counter.
        '''
        arg_4 = arg_0.get_table()

        try:
            arg_5 = arg_4.Func(arg_1=arg_1)
        except DynamoDBKeyNotFoundError:
            arg_5 = None

        if arg_5 is None:
            arg_5 = arg_0.create_item(
                arg_1=arg_1,
                arg_2=arg_2,
                arg_3=arg_3,
            )

        return arg_5

Hook point for overriding how the CouterPool fetches a DynamoDB item for a given counter .


return self.Guard(self.write_queue, self.arys, lambda: read_idx)

def Func ( arg_0 ) : arg_1 = arg_0 . __get_idx ( ) if arg_1 is QueueClosed : return QueueClosed return arg_0 . Guard ( arg_0 . write_queue , arg_0 . arys , lambda : arg_1 )

def Func(arg_0):
        """
        Allows direct access to the buffer element.
        Blocks until there is data that can be read.

        :return: A guard object that returns the buffer element.
        """

        arg_1 = arg_0.__get_idx()

        if arg_1 is QueueClosed:
            return QueueClosed

        # Once the guard is released, read_idx will be placed into write_queue.
        return arg_0.Guard(arg_0.write_queue, arg_0.arys, lambda: arg_1)

Allows direct access to the buffer element . Blocks until there is data that can be read .


def Func ( arg_0 , ** arg_1 ) : arg_2 = { 'model' : arg_0 . _model , 'filters' : arg_0 . _filters , 'order_by' : arg_0 . _order_by , 'limit' : arg_0 . _limit , 'select' : arg_0 . _select , } arg_2 . update ( ** arg_1 ) return Query ( ** arg_2 )

def Func(arg_0, **arg_1):
        '''
        Copy the Query object, optionally replacing the filters, order_by, or
        limit information on the copy. This is mostly an internal detail that
        you can ignore.
        '''
        arg_2 = {
            'model': arg_0._model,
            'filters': arg_0._filters,
            'order_by': arg_0._order_by,
            'limit': arg_0._limit,
            'select': arg_0._select,
        }
        arg_2.update(**arg_1)
        return Query(**arg_2)

Copy the Query object optionally replacing the filters order_by or limit information on the copy . This is mostly an internal detail that you can ignore .


(
    source, dest, name, index_page, enable_js, online_redirect_url
)

return DocSet(path=dest, docs=docs, plist=plist_path, db_conn=db_conn)

def Func(
    arg_0, arg_1, arg_2, arg_3, arg_4, arg_5
):
    """
    Create boilerplate files & directories and copy vanilla docs inside.

    Return a tuple of path to resources and connection to sqlite db.
    """
    arg_6 = os.path.join(arg_1, "Contents", "Resources")
    arg_7 = os.path.join(arg_6, "Documents")
    os.makedirs(arg_6)

    arg_8 = sqlite3.connect(os.path.join(arg_6, "docSet.dsidx"))
    arg_8.row_factory = sqlite3.Row
    arg_8.execute(
        "CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, "
        "type TEXT, path TEXT)"
    )
    arg_8.commit()

    arg_10 = os.path.join(arg_1, "Contents", "Info.plist")
    arg_11 = {
        "CFBundleIdentifier": arg_2,
        "CFBundleName": arg_2,
        "DocSetPlatformFamily": arg_2.lower(),
        "DashDocSetFamily": "python",
        "isDashDocset": True,
        "isJavaScriptEnabled": arg_4,
    }
    if arg_3 is not None:
        arg_11["dashIndexFilePath"] = arg_3
    if arg_5 is not None:
        arg_11["DashDocSetFallbackURL"] = arg_5

    write_plist(arg_11, arg_10)

    shutil.copytree(arg_0, arg_7)

    return DocSet(path=arg_1, arg_7=arg_7, plist=arg_10, arg_8=arg_8)

Create boilerplate files & directories and copy vanilla docs inside .


def Func(arg_0):
    """This will download a segment of pi from super-computing.org
    if the file is not already present.
    """
    import os, urllib
    arg_1="ftp://pi.super-computing.org/.2/pi200m/"
    if os.path.exists(arg_0):
        # we already have it
        return
    else:
        # download it
        urllib.urlretrieve(arg_1+arg_0,arg_0)

This will download a segment of pi from super - computing . org if the file is not already present .


def Func(arg_0, arg_1, arg_2):
    """Validate a configuration key according to `section.item`."""
    if not arg_2:
        return arg_2

    try:
        arg_3, arg_4 = arg_2.split(".", 1)
    except ValueError:
        raise click.BadArgumentUsage("Given key does not contain a section name.")
    else:
        return arg_3, arg_4

Validate a configuration key according to section . item .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_5
.
symbol_file
.
data
if
arg_2
.
filename
==
''
:
flash
(
'No selected file'
,
'warning'
)
return
redirect
(
request
.
referrer
)
try
:
arg_3
=
io
.
StringIO
(
arg_2
.
stream
.
read
(
)
.
decode
(
'utf-8'
)
,
newline
=
)
except
UnicodeDecodeError
as
error
:
flash
(
"Only text files are supported!"
,
'warning'
)
return
redirect
(
request
.
referrer
)
arg_4
=
request
.
args
.
get
(
'category'
)
if
(
arg_4
==
'sv'
)
:
arg_5
=
SvFiltersForm
(
request
.
args
)
else
:
arg_5
=
FiltersForm
(
request
.
args
)
arg_6
=
set
(
arg_5
.
hgnc_symbols
.
data
)
arg_7
=
controllers
.
Func
(
store
,
arg_0
,
arg_1
,
arg_3
)
arg_6
.
update
(
arg_7
)
arg_5
.
hgnc_symbols
.
data
=
','
.
join
(
arg_6
)
arg_5
.
gene_panels
.
data
=
''
if
(
arg_4
==
'sv'
)
:
return
redirect
(
url_for
(
'.sv_variants'
,
arg_0
=
arg_0
,
arg_1
=
arg_1
,
**
arg_5
.
data
)
,
code
=
307
)
else
:
return
redirect
(
url_for
(
'.variants'
,
arg_0
=
arg_0
,
arg_1
=
arg_1
,
**
arg_5
.
data
)
,
code
=
307
)

def Func(arg_0, arg_1):
    """Parse gene panel file and fill in HGNC symbols for filter."""
    arg_2 = arg_5.symbol_file.data

    if arg_2.filename == '':
        flash('No selected file', 'warning')
        return redirect(request.referrer)

    try:
        arg_3 = io.StringIO(arg_2.stream.read().decode('utf-8'), newline=None)
    except UnicodeDecodeError as error:
        flash("Only text files are supported!", 'warning')
        return redirect(request.referrer)

    arg_4 = request.args.get('category')

    if(arg_4 == 'sv'):
        arg_5 = SvFiltersForm(request.args)
    else:
        arg_5 = FiltersForm(request.args)

    arg_6 = set(arg_5.hgnc_symbols.data)
    arg_7 = controllers.Func(store, arg_0, arg_1, arg_3)
    arg_6.update(arg_7)
    arg_5.hgnc_symbols.data = ','.join(arg_6)
    # reset gene panels
    arg_5.gene_panels.data = ''
    # HTTP redirect code 307 asks that the browser preserves the method of request (POST).
    if(arg_4 == 'sv'):
        return redirect(url_for('.sv_variants', arg_0=arg_0, arg_1=arg_1,
                            **arg_5.data), code=307)
    else:
        return redirect(url_for('.variants', arg_0=arg_0, arg_1=arg_1,
                            **arg_5.data), code=307)

Parse gene panel file and fill in HGNC symbols for filter .


return token, expiry, msgsHost, endpoint

def Func(arg_0, arg_1):
        """
        Request a new registration token using a current Skype token.

        Args:
            skypeToken (str): existing Skype token

        Returns:
            (str, datetime.datetime, str, SkypeEndpoint) tuple: registration token, associated expiry if known,
                                                                resulting endpoint hostname, endpoint if provided

        Raises:
            .SkypeAuthException: if the login request is rejected
            .SkypeApiException: if the login form can't be processed
        """
        arg_2 = arg_13 = arg_11 = None
        arg_3 = SkypeConnection.API_MSGSHOST
        while not arg_2:
            arg_4 = int(time.time())
            arg_5 = arg_0.getMac256Hash(str(arg_4))
            arg_6 = {"LockAndKey": "appId=msmsgs@msnmsgr.com; time={0}; lockAndKeyResponse={1}".format(arg_4, arg_5),
                       "Authentication": "skypetoken=" + arg_1, "BehaviorOverride": "redirectAs404"}
            arg_7 = arg_0.conn("POST", "{0}/users/ME/endpoints".format(arg_3), codes=(200, 201, 404),
                                     arg_6=arg_6, json={"endpointFeatures": "Agent"})
            arg_8 = arg_7.headers.get("Set-RegistrationToken")
            arg_9 = arg_7.headers.get("Location")
            if arg_9:
                arg_10 = re.search(r"(https://[^/]+/v1)/users/ME/endpoints(/(%7B[a-z0-9\-]+%7D))?", arg_9).groups()
                if arg_10[2]:
                    arg_11 = SkypeEndpoint(arg_0.conn, arg_10[2].replace("%7B", "{").replace("%7D", "}"))
                if not arg_10[0] == arg_3:
                    # Skype is requiring the use of a different hostname.
                    arg_3 = arg_9.rsplit("/", 4 if arg_10[2] else 3)[0]
                    # Don't accept the token if present, we need to re-register first.
                    continue
            if arg_8:
                arg_2 = re.search(r"(registrationToken=[a-z0-9\+/=]+)", arg_8, re.I).group(1)
                arg_12 = re.search(r"expires=(\d+)", arg_8).group(1)
                arg_13 = datetime.fromtimestamp(int(arg_12))
                arg_14 = re.search(r"endpointId=({[a-z0-9\-]+})", arg_8)
                if arg_14:
                    arg_11 = SkypeEndpoint(arg_0.conn, arg_14.group(1))
            if not arg_11 and arg_7.status_code == 200 and arg_7.json():
                # Use the most recent endpoint listed in the JSON response.
                arg_11 = SkypeEndpoint(arg_0.conn, arg_7.json()[0]["id"])
        return arg_2, arg_13, arg_3, arg_11

Request a new registration token using a current Skype token .


def Func(arg_0):
    """
    Main program.  Take user input, parse it and call other functions to execute the commands
    and extract run summary and store run result in json file

    @return: none
    """
    global g_test_root_dir
    global g_temp_filename

    if len(arg_0) < 2:
        print("invoke this script as python extractGLRMRuntimeJavaLog.py javatextlog.\n")
        sys.exit(1)
    else:   # we may be in business
        arg_1 = arg_0[1]         # filename while java log is stored

        print("your java text is {0}".format(arg_1))
        extractRunInto(arg_1)

Main program . Take user input parse it and call other functions to execute the commands and extract run summary and store run result in json file


def Func(arg_0, arg_1):
        """Create a definition for the instruction.

        :return: the id of a symbol in the defs for the specified
          :paramref:`instruction`
        :rtype: str

        If no symbol yet exists in the defs for the :paramref:`instruction` a
        symbol is created and saved using :meth:`_make_symbol`.
        """
        arg_2 = arg_1.type
        arg_3 = arg_1.color
        arg_4 = \
            arg_0._instruction_to_svg.instruction_to_svg_dict
        arg_5 = "{}:{}".format(arg_2, arg_3)
        arg_6 = arg_5 + ":defs"
        if arg_5 not in arg_0._instruction_type_color_to_symbol:
            arg_7 = arg_4(arg_1)
            arg_0._compute_scale(arg_5, arg_7)
            arg_8 = arg_0._make_definition(arg_7, arg_5)
            arg_0._instruction_type_color_to_symbol[arg_6] = \
                arg_8[DEFINITION_HOLDER].pop("defs", {})
            arg_0._instruction_type_color_to_symbol[arg_5] = arg_8
        return arg_5

Create a definition for the instruction .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 . files . unmapped_reads = os . path . join ( arg_0 . dirs . edits , "{}-refmap_derep.fastq" . format ( arg_1 . name ) ) arg_1 . files . mapped_reads = os . path . join ( arg_0 . dirs . refmapping , "{}-mapped-sorted.bam" . format ( arg_1 . name ) )

def Func(arg_0, arg_1, arg_2):
    """ create some file handles for refmapping """
    ## make some persistent file handles for the refmap reads files
    arg_1.files.unmapped_reads = os.path.join(arg_0.dirs.edits,
                                  "{}-refmap_derep.fastq".format(arg_1.name))
    arg_1.files.mapped_reads = os.path.join(arg_0.dirs.refmapping,
                                  "{}-mapped-sorted.bam".format(arg_1.name))


def Func ( arg_0 = None , ** arg_1 ) : if isinstance ( arg_0 , str ) : arg_0 = _split_colors ( arg_0 ) else : arg_0 = to_triplets ( arg_0 or ( ) ) arg_0 = ( color ( c ) for c in arg_0 or ( ) ) return palette . Palette ( arg_0 , ** arg_1 )

def Func(arg_0=None, **arg_1):
    """Return a Palette but don't take into account Pallete Names."""
    if isinstance(arg_0, str):
        arg_0 = _split_colors(arg_0)
    else:
        arg_0 = to_triplets(arg_0 or ())

    arg_0 = (color(c) for c in arg_0 or ())
    return palette.Palette(arg_0, **arg_1)

Return a Palette but don t take into account Pallete Names .


def Func(arg_0):
    """Gets the HTML for the given URL using a GET request.

    :url: the absolute URL of the desired page.
    :returns: a string of HTML.
    """
    global arg_3
    with throttle_process_lock:
        with throttle_thread_lock:
            # sleep until THROTTLE_DELAY secs have passed since last request
            arg_1 = THROTTLE_DELAY - (time.time() - arg_3.value)
            if arg_1 > 0:
                time.sleep(arg_1)

            # make request
            arg_2 = requests.get(arg_0)

            # update last request time for throttling
            arg_3.value = time.time()

    # raise ValueError on 4xx status code, get rid of comments, and return
    if 400 <= arg_2.status_code < 500:
        raise ValueError(
            'Status Code {} received fetching URL "{}"'
            .format(arg_2.status_code, arg_0)
        )
    arg_5 = arg_2.text
    arg_5 = arg_5.replace('<!--', '').replace('-->', '')

    return arg_5

Gets the HTML for the given URL using a GET request .


return defaultdict(
            lambda: self.app.config['DEPOSIT_DEFAULT_SCHEMAFORM'], _schemaforms
        )

def Func ( arg_0 ) : arg_1 = { k : v [ 'schemaform' ] for k , v in arg_0 . app . config [ 'DEPOSIT_RECORDS_UI_ENDPOINTS' ] . items ( ) if 'schemaform' in v } return defaultdict ( lambda : arg_0 . app . config [ 'DEPOSIT_DEFAULT_SCHEMAFORM' ] , arg_1 )

def Func(arg_0):
        """Load deposit schema forms."""
        arg_1 = {
            k: v['schemaform']
            for k, v in arg_0.app.config['DEPOSIT_RECORDS_UI_ENDPOINTS'].items()
            if 'schemaform' in v
        }
        return defaultdict(
            lambda: arg_0.app.config['DEPOSIT_DEFAULT_SCHEMAFORM'], arg_1
        )


def Func(arg_0, arg_1):
        """Fetch Func `Func_id`."""
        arg_2 = arg_0.guid(arg_1)
        arg_3 = arg_0._build_url(arg_2, arg_1)
        if arg_2 in Project._types:
            return Project(arg_0._json(arg_0._get(arg_3), 200), arg_0.session)
        raise OSFException('{} is unrecognized type {}. Clone supports Funcs and registrations'.format(arg_1, arg_2))


def Func ( arg_0 ) : arg_0 . _path = os . path . join ( os . environ [ 'NTA_DYNAMIC_CONF_DIR' ] , arg_0 . customFileName )

def Func(arg_0):
    """ Sets the path of the custom configuration file
    """
    arg_0._path = os.path.join(os.environ['NTA_DYNAMIC_CONF_DIR'],
                             arg_0.customFileName)


def Func(arg_0, arg_1):
        """
        Set the serial number of the certificate.

        :param serial: The new serial number.
        :type serial: :py:class:`int`

        :return: :py:data`None`
        """
        if not isinstance(arg_1, _integer_types):
            raise TypeError("serial must be an integer")

        arg_2 = hex(arg_1)[2:]
        if not isinstance(arg_2, bytes):
            arg_2 = arg_2.encode('ascii')

        arg_3 = _ffi.new("BIGNUM**")

        # BN_hex2bn stores the result in &bignum.  Unless it doesn't feel like
        # it.  If bignum is still NULL after this call, then the return value
        # is actually the result.  I hope.  -exarkun
        arg_4 = _lib.BN_hex2bn(arg_3, arg_2)

        if arg_3[0] == _ffi.NULL:
            arg_5 = _lib.ASN1_INTEGER_set(
                _lib.X509_get_serialNumber(arg_0._x509), arg_4)
            if arg_5:
                # TODO Not tested
                _raise_current_error()
        else:
            arg_6 = _lib.BN_to_ASN1_INTEGER(arg_3[0], _ffi.NULL)
            _lib.BN_free(arg_3[0])
            if arg_6 == _ffi.NULL:
                # TODO Not tested
                _raise_current_error()
            arg_6 = _ffi.gc(arg_6, _lib.ASN1_INTEGER_free)
            arg_5 = _lib.X509_set_serialNumber(arg_0._x509, arg_6)
            _openssl_assert(arg_5 == 1)

Set the serial number of the certificate .


def Func ( arg_0 , arg_1 ) : if DONT_COLORIZE : return arg_0 else : return "{}{}{}" . format ( COLORS [ arg_1 ] , arg_0 , COLORS [ "endc" ] )

def Func(arg_0, arg_1):
    """Given a string add necessary codes to format the string."""
    if DONT_COLORIZE:
        return arg_0
    else:
        return "{}{}{}".format(COLORS[arg_1], arg_0, COLORS["endc"])

Given a string add necessary codes to format the string .


def Func(arg_0, arg_1):
        """
        Encode given input.
        """
        if not arg_0.encoding_network:
            arg_0.encoding_network = NeuralNetwork(arg_0.input_dim, arg_0.input_tensor)
            arg_0.encoding_network.input_variables = arg_0.input_variables
            for arg_4 in arg_0.encoding_layes:
                arg_0.encoding_network.stack_layer(arg_4, no_setup=True)
        return arg_0.encoding_network.compute(*arg_1)


def Func(arg_0, arg_1):
    """Concatenate two string columns on a row-by-row basis.

    :param expression other: The expression of the other column to be concatenated.
    :returns: an expression containing the concatenated columns.

    Example:

    >>> import vaex
    >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.']
    >>> df = vaex.from_arrays(text=text)
    >>> df
      #  text
      0  Something
      1  very pretty
      2  is coming
      3  our
      4  way.

    >>> df.text.str.cat(df.text)
    Expression = Func(text, text)
    Length: 5 dtype: str (expression)
    ---------------------------------
    0      SomethingSomething
    1  very prettyvery pretty
    2      is comingis coming
    3                  ourour
    4                way.way.
    """
    arg_2 = _to_string_sequence(arg_0)
    arg_3 = _to_string_sequence(arg_1)
    arg_4 = arg_2.concat(arg_3)
    return column.ColumnStringArrow.from_string_sequence(arg_4)

Concatenate two string columns on a row-by-row basis.

    :param expression other: The expression of the other column to be concatenated.
    :returns: an expression containing the concatenated columns.

    Example:

    >>> import vaex
    >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.']
    >>> df = vaex.from_arrays(text=text)
    >>> df
      #  text
      0  Something
      1  very pretty
      2  is coming
      3  our
      4  way.

    >>> df.text.str.cat(df.text)
    Expression = str_cat(text, text)
    Length: 5 dtype: str (expression)
    ---------------------------------
    0      SomethingSomething
    1  very prettyvery pretty
    2      is comingis coming
    3                  ourour
    4                way.way.

Concatenate two string columns on a row - by - row basis .


def Func():
    """Deploy new blog to current directory"""
    logger.info(Func.__doc__)
    # `rsync -aqu path/to/res/* .`
    call(
        'rsync -aqu ' + join(dirname(__file__), 'res', '*') + ' .',
        shell=True)
    logger.success('Done')
    logger.info('Please edit config.toml to meet your needs')


def Func(arg_0) -> Union[Iterable, Callable]:
    """Decorator implementing Iterator interface with nicer manner.

    Example
    -------

    @Func('my_attr'):
    class DecoratedClass:
        ...

    Warning:
    ========

    When using PyCharm or MYPY you'll probably see issues with decorated class not being recognized as Iterator.
    That's an issue which I could not overcome yet, it's probably due to the fact that interpretation of object
    is being done statically rather than dynamically. MYPY checks for definition of methods in class code which
    changes at runtime. Since __iter__ and __next__ are added dynamically MYPY cannot find those
    defined in objects before object of a class is created. Possible workarounds for this issue are:

        1. Define ``dummy`` __iter__ class like:

            @Func('attr')
            class Test:
                def __init__(self) -> None:
                    self.attr = [1, 2, 3]

                def __iter__(self):
                    pass

        2. After creating object use cast or assert function denoting that particular instance inherits
            from collections.Iterator:

            assert isinstance(my_object, collections.Iterator)

    :param iterable_name: string representing attribute name which has to be iterated
    :return: DecoratedClass with implemented '__iter__' and '__next__' methods.
    """

    def create_new_class(arg_1) -> Union[Iterable, Callable]:
        """Class extender implementing __next__ and __iter__ methods.

        :param decorated_class: class to be extended with iterator interface
        :return: new class
        """
        assert inspect.isclass(arg_1), 'You can only decorate class objects!'
        assert isinstance(arg_0, str), 'Please provide attribute name string'

        arg_1.iterator_attr_index = 0

        def __iter__(arg_3) -> Iterable:
            """Implement __iter__ method

            :param instance: __iter__ uses instance of class which is being extended
            :return: instance of decorated_class
            """
            return arg_3

        def __next__(arg_3) -> Any:
            """Implement __next__ method

            :param instance: __next__ uses instance of class which is being extended
            :return: instance of decorated_class
            """
            assert hasattr(arg_3, arg_0), \
                'Decorated object does not have attribute named {}'.format(arg_0)
            assert isinstance(getattr(arg_3, arg_0), collections.Iterable), \
                '{} of object {} is not iterable'.format(arg_0, arg_3.__class__.__name__)
            arg_4 = arg_3.iterator_attr_index
            while arg_4 < len(getattr(arg_3, arg_0)):
                arg_5 = getattr(arg_3, arg_0)[arg_4]
                arg_3.iterator_attr_index += 1
                return arg_5
            arg_3.iterator_attr_index = 0
            raise StopIteration

        arg_6 = dict(arg_1.__dict__)
        arg_6['__iter__'] = __iter__
        arg_6['__next__'] = __next__
        arg_6['iterator_attr_index'] = arg_1.iterator_attr_index
        return type(arg_1.__name__, (collections.Iterable,), arg_6)

    return create_new_class

Decorator implementing Iterator interface with nicer manner.

    Example
    -------

    @iter_attribute('my_attr'):
    class DecoratedClass:
        ...

    Warning:
    ========

    When using PyCharm or MYPY you'll probably see issues with decorated class not being recognized as Iterator.
    That's an issue which I could not overcome yet, it's probably due to the fact that interpretation of object
    is being done statically rather than dynamically. MYPY checks for definition of methods in class code which
    changes at runtime. Since __iter__ and __next__ are added dynamically MYPY cannot find those
    defined in objects before object of a class is created. Possible workarounds for this issue are:

        1. Define ``dummy`` __iter__ class like:

            @iter_attribute('attr')
            class Test:
                def __init__(self) -> None:
                    self.attr = [1, 2, 3]

                def __iter__(self):
                    pass

        2. After creating object use cast or assert function denoting that particular instance inherits
            from collections.Iterator:

            assert isinstance(my_object, collections.Iterator)

    :param iterable_name: string representing attribute name which has to be iterated
    :return: DecoratedClass with implemented '__iter__' and '__next__' methods.

Decorator implementing Iterator interface with nicer manner .


Returns true iff this interval intersects the interval i

return self.start <= i.end and i.start <= self.end

def Func ( arg_0 , arg_1 ) : return arg_0 . start <= arg_1 . end and arg_1 . start <= arg_0 . end

def Func(arg_0, arg_1):
        '''Returns true iff this interval Func the interval i'''
        return arg_0.start <= arg_1.end and arg_1.start <= arg_0.end


def Func(arg_0):
        """
        construct datetime.date instance represented calendar date of BusinessDate instance

        :return datetime.date:
        """
        arg_1, arg_2, arg_3 = arg_0.to_ymd()
        return date(arg_1, arg_2, arg_3)

construct datetime . date instance represented calendar date of BusinessDate instance


def Func(arg_0, arg_1):
        """
        Hook to Func this service with a specific DataManager.

        Will recursively Func sub-services.
        """
        arg_0._data_manager = arg_1
        if arg_0._data_manager:
            arg_0._dal = arg_0._data_manager.get_dal()
        else:
            arg_0._dal = None

        for arg_4, arg_5 in arg_0._services.items():
            arg_5.Func(arg_0._data_manager)

Hook to setup this service with a specific DataManager.

        Will recursively setup sub-services.

Hook to setup this service with a specific DataManager .


def Func(arg_0, arg_1):
        """Authenticate using credentials supplied in params."""
        # never allow insecure login
        arg_0.check_secure()

        arg_2 = arg_0.get_username(arg_1['user'])
        arg_3 = arg_0.get_password(arg_1['password'])

        arg_4 = auth.authenticate(arg_2=arg_2, arg_3=arg_3)
        if arg_4 is not None:
            # the password verified for the user
            if arg_4.is_active:
                arg_0.do_login(arg_4)
                return get_user_token(
                    arg_4=arg_4, purpose=HashPurpose.RESUME_LOGIN,
                    minutes_valid=HASH_MINUTES_VALID[HashPurpose.RESUME_LOGIN],
                )

        # Call to `authenticate` couldn't verify the username and password.
        # It will have sent the `user_login_failed` signal, no need to pass the
        # `username` argument to auth_failed().
        arg_0.auth_failed()

Authenticate using credentials supplied in params .


(components, request, segments, partialMatching)

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Match a request path against our path components.

    The path components are always matched relative to their parent is in the
    resource hierarchy, in other words it is only possible to match URIs nested
    more deeply than the parent resource.

    :type  components: ``iterable`` of `bytes` or `callable`
    :param components: Iterable of path components, to match against the
        request, either static strings or dynamic parameters. As a convenience,
        a single `bytes` component containing ``/`` may be given instead of
        manually separating the components. If no components are given the null
        route is matched, this is the case where ``segments`` is empty.

    :type  segments: ``sequence`` of `bytes`
    :param segments: Sequence of path segments, from the request, to match
        against.

    :type  partialMatching: `bool`
    :param partialMatching: Allow partial matching against the request path?

    :rtype: 2-`tuple` of `dict` keyed on `bytes` and `list` of `bytes`
    :return: Pair of parameter results, mapping parameter names to processed
        values, and a list of the remaining request path segments. If there is
        no route match the result will be ``None`` and the original request path
        segments.
    """
    if len(arg_0) == 1 and isinstance(arg_0[0], bytes):
        arg_0 = arg_0[0]
        if arg_0[:1] == '/':
            arg_0 = arg_0[1:]
        arg_0 = arg_0.split('/')

    arg_4 = OrderedDict()
    arg_5 = None, arg_2
    arg_6 = list(arg_2)

    # Handle the null route.
    if len(arg_2) == len(arg_0) == 0:
        return arg_4, arg_6

    for arg_7, arg_8 in izip_longest(arg_0, arg_2):
        if arg_7 is None:
            if arg_3:
                # We've matched all of our components, there might be more
                # segments for something else to process.
                break
            else:
                return arg_5
        elif arg_8 is None:
            # We've run out of path segments to match, so this route can't be
            # the matching one.
            return arg_5

        if callable(arg_7):
            arg_9, arg_10 = arg_7(arg_1, arg_8)
            if arg_10 is None:
                return arg_5
            arg_4[arg_9] = arg_10
        elif arg_7 != arg_8:
            return arg_5
        arg_6.pop(0)

    return arg_4, arg_6

Match a request path against our path components .


Computes the correlation between a and b, says the Pearson's correlation
    coefficient R

return (diff1 * diff2).mean() / (np.sqrt(np.square(diff1).mean() * np.square(diff2).mean()))

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 - arg_0 . mean ( ) arg_3 = arg_1 - arg_1 . mean ( ) return ( arg_2 * arg_3 ) . mean ( ) / ( np . sqrt ( np . square ( arg_2 ) . mean ( ) * np . square ( arg_3 ) . mean ( ) ) )

def Func(arg_0, arg_1):
    """Computes the Func between a and b, says the Pearson's Func
    coefficient R
    """
    arg_2 = arg_0 - arg_0.mean()
    arg_3 = arg_1 - arg_1.mean()
    return (arg_2 * arg_3).mean() / (np.sqrt(np.square(arg_2).mean() * np.square(arg_3).mean()))

Computes the correlation between a and b says the Pearson s correlation coefficient R


def Func(arg_0, arg_1, arg_2=False, arg_3="\n"):
        """Helper function to print connection status messages when in verbose mode."""
        if arg_0._verbose:
            print2(arg_1, arg_3=arg_3, arg_2=arg_2)

Helper function to print connection status messages when in verbose mode .


return 'arn:{0}:iam::{1}:role/{2}'.format(prefix, account_id, role)

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = ARN_PREFIXES . get ( arg_0 , 'aws' ) return 'arn:{0}:iam::{1}:role/{2}' . format ( arg_3 , arg_1 , arg_2 )

def Func(arg_0, arg_1, arg_2):
    """Shortcut to insert the `account_id` and `role` into the iam string."""
    arg_3 = ARN_PREFIXES.get(arg_0, 'aws')
    return 'arn:{0}:iam::{1}:role/{2}'.format(arg_3, arg_1, arg_2)

Shortcut to insert the account_id and role into the iam string .


(
        self, zoom=None, tile=None, multi=cpu_count(), max_chunksize=1
    )

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = arg_4 ( ) , arg_5 = 1 ) : list ( arg_0 . Funcor ( arg_1 , arg_2 , arg_3 , arg_5 ) )

def Func(
        arg_0, arg_1=None, arg_2=None, arg_3=arg_4(), arg_5=1
    ):
        """
        Process a large batch of tiles.

        Parameters
        ----------
        process : MapcheteProcess
            process to be run
        zoom : list or int
            either single zoom level or list of minimum and maximum zoom level;
            None processes all (default: None)
        tile : tuple
            zoom, row and column of tile to be processed (cannot be used with
            zoom)
        multi : int
            number of workers (default: number of CPU cores)
        max_chunksize : int
            maximum number of process tiles to be queued for each worker;
            (default: 1)
        """
        list(arg_0.Funcor(arg_1, arg_2, arg_3, arg_5))


def Func ( arg_0 ) : from parsl . dataflow . dflow import DataFlowKernelLoader arg_1 = DataFlowKernelLoader . dfk ( ) return arg_1 . executors [ 'data_manager' ]

def Func(arg_0):
        """Return the DataManager of the currently loaded DataFlowKernel.
        """
        from parsl.dataflow.dflow import DataFlowKernelLoader
        arg_1 = DataFlowKernelLoader.dfk()

        return arg_1.executors['data_manager']

Return the DataManager of the currently loaded DataFlowKernel .


def Func(arg_0):
    """
    write FILENAME
        Write a local copy of FILENAME using FILENAME_tweaks for local tweaks.
    """
    if len(arg_0) != 1:
        print("Please provide the name of a file to write.")
        return 1

    arg_1 = arg_0[0]
    arg_2 = "files/" + arg_1
    arg_3 = amend_filename(arg_1, "_tweaks")

    if not pkg_resources.resource_exists("edx_lint", arg_2):
        print(u"Don't have file %r to write." % arg_1)
        return 2

    if os.path.exists(arg_1):
        print(u"Checking existing copy of %s" % arg_1)
        arg_4 = TamperEvidentFile(arg_1)
        if not arg_4.validate():
            arg_5 = amend_filename(arg_1, "_backup")
            print(u"Your copy of %s seems to have been edited, renaming it to %s" % (arg_1, arg_5))
            if os.path.exists(arg_5):
                print(u"A previous %s exists, deleting it" % arg_5)
                os.remove(arg_5)
            os.rename(arg_1, arg_5)

    print(u"Reading edx_lint/files/%s" % arg_1)
    arg_6 = configparser.RawConfigParser()
    arg_7 = pkg_resources.resource_string("edx_lint", arg_2).decode("utf8")

    # pkg_resources always reads binary data (in both python2 and python3).
    # ConfigParser.read_string only exists in python3, so we have to wrap the string
    # from pkg_resources in a cStringIO so that we can pass it into ConfigParser.readfp.
    if six.PY2:
        arg_6.readfp(cStringIO(arg_7), arg_2)
    else:
        arg_6.read_string(arg_7, arg_2)     # pylint: disable=no-member

    if os.path.exists(arg_3):
        print(u"Applying local tweaks from %s" % arg_3)
        arg_8 = configparser.RawConfigParser()
        arg_8.read([arg_3])

        merge_configs(arg_6, arg_8)

    print(u"Writing %s" % arg_1)
    arg_9 = cStringIO()
    arg_9.write(WARNING_HEADER.format(arg_1=arg_1, arg_3=arg_3))
    arg_6.write(arg_9)

    arg_10 = TamperEvidentFile(arg_1)
    if six.PY2:
        arg_11 = arg_9.getvalue()
    else:
        arg_11 = arg_9.getvalue().encode("utf8")
    arg_10.write(arg_11)

    return 0

write FILENAME Write a local copy of FILENAME using FILENAME_tweaks for local tweaks .


def
Func
(
)
:
if
'CPENV_ACTIVE'
not
in
os
.
environ
or
'CPENV_CLEAN_ENV'
not
in
os
.
environ
:
raise
EnvironmentError
(
'Can not Func environment...'
)
utils
.
restore_env_from_file
(
os
.
environ
[
'CPENV_CLEAN_ENV'
]
)

def Func():
    '''Deactivates an environment by restoring all env vars to a clean state
    stored prior to activating environments
    '''

    if 'CPENV_ACTIVE' not in os.environ or 'CPENV_CLEAN_ENV' not in os.environ:
        raise EnvironmentError('Can not Func environment...')

    utils.restore_env_from_file(os.environ['CPENV_CLEAN_ENV'])


return type(
        origin.__name__,
        (ReusableGenerator, ),
        dict([
            ('__doc__',       origin.__doc__),
            ('__module__',    origin.__module__),
            ('__signature__', sig),
            ('__wrapped__',   staticmethod(func)),
        ] + [
            (name, property(compose(itemgetter(name),
                                    attrgetter('_bound_args.arguments'))))
            for name in sig.parameters
        ] + ([
            ('__qualname__',  origin.__qualname__),
        ] if sys.version_info > (3, ) else [])))

def Func ( arg_0 ) : arg_1 = signature ( arg_0 ) arg_2 = arg_0 while hasattr ( arg_2 , '__wrapped__' ) : arg_2 = arg_2 . __wrapped__ return type ( arg_2 . __name__ , ( ReusableGenerator , ) , dict ( [ ( '__doc__' , arg_2 . __doc__ ) , ( '__module__' , arg_2 . __module__ ) , ( '__signature__' , arg_1 ) , ( '__wrapped__' , staticmethod ( arg_0 ) ) , ] + [ ( arg_3 , property ( compose ( itemgetter ( arg_3 ) , attrgetter ( '_bound_args.arguments' ) ) ) ) for arg_3 in arg_1 . parameters ] + ( [ ( '__qualname__' , arg_2 . __qualname__ ) , ] if sys . version_info > ( 3 , ) else [ ] ) ) )

def Func(arg_0):
    """Create a Func class from a generator function

    Parameters
    ----------
    func: GeneratorCallable[T_yield, T_send, T_return]
        the function to wrap

    Note
    ----
    * the callable must have an inspectable signature
    * If bound to a class, the new Func generator is callable as a method.
      To opt out of this, add a :func:`staticmethod` decorator above
      this decorator.

    """
    arg_1 = signature(arg_0)
    arg_2 = arg_0
    while hasattr(arg_2, '__wrapped__'):
        arg_2 = arg_2.__wrapped__
    return type(
        arg_2.__name__,
        (ReusableGenerator, ),
        dict([
            ('__doc__',       arg_2.__doc__),
            ('__module__',    arg_2.__module__),
            ('__signature__', arg_1),
            ('__wrapped__',   staticmethod(arg_0)),
        ] + [
            (arg_3, property(compose(itemgetter(arg_3),
                                    attrgetter('_bound_args.arguments'))))
            for arg_3 in arg_1.parameters
        ] + ([
            ('__qualname__',  arg_2.__qualname__),
        ] if sys.version_info > (3, ) else [])))

Create a reusable class from a generator function

    Parameters
    ----------
    func: GeneratorCallable[T_yield, T_send, T_return]
        the function to wrap

    Note
    ----
    * the callable must have an inspectable signature
    * If bound to a class, the new reusable generator is callable as a method.
      To opt out of this, add a :func:`staticmethod` decorator above
      this decorator.


def Func(arg_0, arg_1):
        """private helper method"""
        if arg_0._addr != arg_1:
            ioctl(arg_0._fd, SMBUS.I2C_SLAVE, arg_1)
            arg_0._addr = arg_1


return [
            label
            for label
            in labels
            if name == label.get('name')
        ]

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . list ( ) return [ arg_3 for arg_3 in arg_2 if arg_1 == arg_3 . Func ( 'name' ) ]

def Func(arg_0, arg_1):
        """
        Get labels by name

        :param name: The label name, it must be an exact match.
        :type name: str

        :return: A list of matching labels. An empty list is returned if there are
            not any matches
        :rtype: list of dict

        :raises: This will raise a
            :class:`ServerException<logentries_api.exceptions.ServerException>`
            if there is an error from Logentries
        """
        arg_2 = arg_0.list()
        return [
            arg_3
            for arg_3
            in arg_2
            if arg_1 == arg_3.Func('name')
        ]


(string, encoding='utf-8', strings_only=False, errors='strict')

return force_unicode(string, encoding, strings_only, errors)

def Func(arg_0, arg_1='utf-8', arg_2=False, arg_3='strict'):
    """
    Returns a unicode object representing 's'. Treats bytestrings using the
    'encoding' codec.

    If strings_only is True, don't convert (some) non-string-like objects.
    """
    # if isinstance(s, Promise):
    #     # The input is the result of a gettext_lazy() call.
    #     return s
    return force_unicode(arg_0, arg_1, arg_2, arg_3)

Returns a unicode object representing s . Treats bytestrings using the encoding codec .


def Func ( arg_0 ) : if arg_0 . queue : arg_1 , arg_2 = arg_0 . queue . popleft ( ) arg_1 ( arg_2 ) else : arg_0 . locked = False

def Func(arg_0):
        """Unlock a mutex.  If the queue is not empty, call the next
        function with its argument."""
        if arg_0.queue:
            arg_1, arg_2 = arg_0.queue.popleft()
            arg_1(arg_2)
        else:
            arg_0.locked = False

Unlock a mutex . If the queue is not empty call the next function with its argument .


def Func ( arg_0 ) : for arg_1 in list ( env . keys ( ) ) : if arg_1 . startswith ( arg_0 . env_prefix ) : del env [ arg_1 ] try : del all_satchels [ arg_0 . name . upper ( ) ] except KeyError : pass try : del manifest_recorder [ arg_0 . name ] except KeyError : pass try : del manifest_deployers [ arg_0 . name . upper ( ) ] except KeyError : pass try : del manifest_deployers_befores [ arg_0 . name . upper ( ) ] except KeyError : pass try : del required_system_packages [ arg_0 . name . upper ( ) ] except KeyError : pass

def Func(arg_0):
        """
        Removes this satchel from global registeries.
        """

        for arg_1 in list(env.keys()):
            if arg_1.startswith(arg_0.env_prefix):
                del env[arg_1]

        try:
            del all_satchels[arg_0.name.upper()]
        except KeyError:
            pass

        try:
            del manifest_recorder[arg_0.name]
        except KeyError:
            pass

        try:
            del manifest_deployers[arg_0.name.upper()]
        except KeyError:
            pass

        try:
            del manifest_deployers_befores[arg_0.name.upper()]
        except KeyError:
            pass

        try:
            del required_system_packages[arg_0.name.upper()]
        except KeyError:
            pass

Removes this satchel from global registeries .


def Func ( arg_0 , arg_1 = None , arg_2 = None ) : with arg_0 . driver . dismiss_modal ( "confirm" , arg_1 = arg_1 , arg_2 = arg_2 ) : yield

def Func(arg_0, arg_1=None, arg_2=None):
        """
        Execute the wrapped code, dismissing a confirm.

        Args:
            text (str | RegexObject, optional): Text to match against the text in the modal.
            wait (int | float, optional): Maximum time to wait for the modal to appear after
                executing the wrapped code.

        Raises:
            ModalNotFound: If a modal dialog hasn't been found.
        """

        with arg_0.driver.dismiss_modal("confirm", arg_1=arg_1, arg_2=arg_2):
            yield

Execute the wrapped code dismissing a confirm .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
*
' '
print
(
arg_2
,
'qreg'
)
arg_0
.
children
[
0
]
.
Func
(
arg_1
+
3
)

def Func(arg_0, arg_1):
        """Print the node data, with indent."""
        arg_2 = arg_1 * ' '
        print(arg_2, 'qreg')
        arg_0.children[0].Func(arg_1 + 3)


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
logger
.
debug
(
'peripheral_didReadRSSI_error called'
)
if
arg_3
is
not
:
return
arg_4
=
device_list
(
)
.
get
(
arg_1
)
if
arg_4
is
not
:
arg_4
.
_rssi_changed
(
arg_2
)

def Func(arg_0, arg_1, arg_2, arg_3):
        """Called when a new RSSI value for the peripheral is available."""
        logger.debug('peripheral_didReadRSSI_error called')
        # Note this appears to be completely undocumented at the time of this
        # writing.  Can see more details at:
        #  http://stackoverflow.com/questions/25952218/ios-8-corebluetooth-deprecated-rssi-methods
        # Stop if there was some kind of error.
        if arg_3 is not None:
            return
        # Notify the device about the updated RSSI value.
        arg_4 = device_list().get(arg_1)
        if arg_4 is not None:
            arg_4._rssi_changed(arg_2)

Called when a new RSSI value for the peripheral is available .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_conn ( ) arg_3 = ( arg_2 . projects ( ) . operations ( ) . delete ( arg_1 = arg_1 ) . execute ( num_retries = arg_0 . num_retries ) ) return arg_3

def Func(arg_0, arg_1):
        """
        Deletes the long-running operation.

        .. seealso::
            https://cloud.google.com/datastore/docs/reference/data/rest/v1/projects.operations/delete

        :param name: the name of the operation resource.
        :type name: str
        :return: none if successful.
        :rtype: dict
        """
        arg_2 = arg_0.get_conn()

        arg_3 = (arg_2
                .projects()
                .operations()
                .delete(arg_1=arg_1)
                .execute(num_retries=arg_0.num_retries))

        return arg_3


(self, normalized=True, reversed=True, rating={},
                               start=None, iterations=100, tolerance=0.0001)

def Func(arg_0, arg_1=True, arg_2=True, arg_3={},
                               arg_4=None, arg_5=100, arg_6=0.0001):
        """ Calculates eigenvector centrality and returns an node id -> weight dictionary.
        Node eigenvalue weights are updated in the process.
        """
        arg_7 = proximity.Func(
            arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6
        )
        for arg_8, arg_9 in arg_7.iteritems(): arg_0[arg_8]._eigenvalue = arg_9
        return arg_7

Calculates eigenvector centrality and returns an node id - > weight dictionary . Node eigenvalue weights are updated in the process .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = os . path . getsize ( arg_1 ) arg_4 = os . path . join ( arg_0 . paramsdict [ "project_dir" ] , "tmp-step1-count.fq" ) if arg_1 . endswith ( ".gz" ) : arg_5 = gzip . open ( arg_1 ) arg_6 = gzip . open ( arg_4 , 'wb' , compresslevel = 5 ) else : arg_5 = open ( arg_1 ) arg_6 = open ( arg_4 , 'w' ) arg_6 . write ( "" . join ( itertools . islice ( arg_5 , 40000 ) ) ) arg_6 . close ( ) arg_5 . close ( ) arg_7 = os . path . getsize ( arg_4 ) arg_8 = int ( arg_3 / arg_7 ) * 10000 os . remove ( arg_4 ) return arg_8

def Func(arg_0, arg_1, arg_2):
    """
    Estimate a reasonable optim value by grabbing a chunk of sequences,
    decompressing and counting them, to estimate the full file size.
    """
    ## count the len of one file and assume all others are similar len
    arg_3 = os.path.getsize(arg_1)
    arg_4 = os.path.join(arg_0.paramsdict["project_dir"], "tmp-step1-count.fq")
    if arg_1.endswith(".gz"):
        arg_5 = gzip.open(arg_1)
        arg_6 = gzip.open(arg_4, 'wb', compresslevel=5)
    else:
        arg_5 = open(arg_1)
        arg_6 = open(arg_4, 'w')

    ## We'll take the average of the size of a file based on the
    ## first 10000 reads to approximate number of reads in the main file
    arg_6.write("".join(itertools.islice(arg_5, 40000)))
    arg_6.close()
    arg_5.close()

    ## Get the size of the tmp file
    arg_7 = os.path.getsize(arg_4)

    ## divide by the tmp file size and multiply by 10000 to approximate
    ## the size of the input .fq files
    arg_8 = int(arg_3 / arg_7) * 10000
    os.remove(arg_4)

    return arg_8

Estimate a reasonable optim value by grabbing a chunk of sequences decompressing and counting them to estimate the full file size .


return [
            GithubComponentVersion(
                '', b[0], b[1], self.name, cache_key=None
            ) for b in _getBranchHeads(self.repo).items()
        ]

def Func ( arg_0 ) : return [ GithubComponentVersion ( '' , arg_1 [ 0 ] , arg_1 [ 1 ] , arg_0 . name , cache_key = None ) for arg_1 in _getBranchHeads ( arg_0 . repo ) . items ( ) ]

def Func(arg_0):
        ''' return a list of GithubComponentVersion objects for the tip of each branch
        '''
        return [
            GithubComponentVersion(
                '', arg_1[0], arg_1[1], arg_0.name, cache_key=None
            ) for arg_1 in _getBranchHeads(arg_0.repo).items()
        ]


(self, dataobj, xfield, yfield, time_unit=None,
                  chart_type="line", width=800,
                  height=300, color=None, size=None,
                  scale=Scale(zero=False), shape=None, options={})

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None,
                  arg_5="line", arg_6=800,
                  arg_7=300, arg_8=None, arg_9=None,
                  arg_10=arg_11(arg_12=False), arg_13=None, arg_14={}):
        """
        Serialize to an Altair chart object from either a pandas dataframe, a dictionnary,
        a list or an Altair Data object
        """
        arg_15 = arg_1
        if arg_0._is_dict(arg_1) is True:
            arg_15 = arg_0._dict_to_df(arg_1, arg_2, arg_3)
        elif isinstance(arg_1, list):
            arg_15 = Data(values=arg_1)
        arg_16, arg_17 = arg_0._encode_fields(
            arg_2, arg_3, arg_4)
        arg_18 = dict(x=arg_16, y=arg_17)
        if arg_8 is not None:
            arg_18["color"] = arg_8
        if arg_9 is not None:
            arg_18["size"] = arg_9
        if arg_13 is not None:
            arg_18["shape"] = arg_13
        arg_19 = arg_0._chart_class(arg_15, arg_5, **arg_14).encode(
            **arg_18
        ).configure_cell(
            arg_6=arg_6,
            arg_7=arg_7,
        )
        return arg_19

Serialize to an Altair chart object from either a pandas dataframe a dictionnary a list or an Altair Data object


def Func(arg_0):
        """ Yield CPU.
            This will choose another process from the RUNNNIG list and change
            current running process. May give the same cpu if only one running
            process.
        """
        if len(arg_0.procs) > 1:
            logger.info("SCHED:")
            logger.info("\tProcess: %r", arg_0.procs)
            logger.info("\tRunning: %r", arg_0.running)
            logger.info("\tRWait: %r", arg_0.rwait)
            logger.info("\tTWait: %r", arg_0.twait)
            logger.info("\tTimers: %r", arg_0.timers)
            logger.info("\tCurrent clock: %d", arg_0.clocks)
            logger.info("\tCurrent cpu: %d", arg_0._current)

        if len(arg_0.running) == 0:
            logger.info("None running checking if there is some process waiting for a timeout")
            if all([arg_1 is None for arg_1 in arg_0.timers]):
                raise Deadlock()
            arg_0.clocks = min([arg_1 for arg_1 in arg_0.timers if arg_1 is not None]) + 1
            arg_0.check_timers()
            assert len(arg_0.running) != 0, "DEADLOCK!"
            arg_0._current = arg_0.running[0]
            return
        arg_4 = (arg_0.running.index(arg_0._current) + 1) % len(arg_0.running)
        arg_5 = arg_0.running[arg_4]
        if len(arg_0.procs) > 1:
            logger.info("\tTransfer control from process %d to %d", arg_0._current, arg_5)
        arg_0._current = arg_5

Yield CPU . This will choose another process from the RUNNNIG list and change current running process . May give the same cpu if only one running process .


(self, sis_course_id,
                                                       params={})

return self.get_sections_with_students_in_course(
            self._sis_id(sis_course_id, sis_field="course"), params)

def Func ( arg_0 , arg_1 , arg_2 = { } ) : return arg_0 . get_sections_with_students_in_course ( arg_0 . _sis_id ( arg_1 , sis_field = "course" ) , arg_2 )

def Func(arg_0, arg_1,
                                                       arg_2={}):
        """
        Return list of sections including students for the passed sis ID.
        """
        return arg_0.get_sections_with_students_in_course(
            arg_0._sis_id(arg_1, sis_field="course"), arg_2)

Return list of sections including students for the passed sis ID .


def Func ( arg_0 , arg_1 , arg_2 ) : try : pkg_resources . EntryPoint . parse_map ( arg_2 ) except ValueError , e : raise DistutilsSetupError ( e )

def Func(arg_0, arg_1, arg_2):
    """Verify that entry_points map is parseable"""
    try:
        pkg_resources.EntryPoint.parse_map(arg_2)
    except ValueError, e:
        raise DistutilsSetupError(e)


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
not
arg_1
.
relative
:
return
arg_3
=
arg_1
.
filename
arg_4
=
arg_1
.
source_file
(
)
if
arg_0
.
directory
:
arg_5
=
os
.
path
.
join
(
arg_0
.
directory
,
arg_1
.
flat_rootname
(
)
)
arg_5
+=
".py,cover"
else
:
arg_5
=
arg_3
+
",cover"
arg_6
=
open
(
arg_5
,
'w'
)
arg_7
=
sorted
(
arg_2
.
statements
)
arg_8
=
sorted
(
arg_2
.
missing
)
arg_9
=
sorted
(
arg_2
.
excluded
)
arg_10
=
0
arg_11
=
0
arg_12
=
0
arg_13
=
True
while
True
:
arg_14
=
arg_4
.
readline
(
)
if
arg_14
==
''
:
break
arg_10
+=
1
while
arg_11
<
len
(
arg_7
)
and
arg_7
[
arg_11
]
<
arg_10
:
arg_11
+=
1
while
arg_12
<
len
(
arg_8
)
and
arg_8
[
arg_12
]
<
arg_10
:
arg_12
+=
1
if
arg_11
<
len
(
arg_7
)
and
arg_7
[
arg_11
]
==
arg_10
:
arg_13
=
arg_12
>=
len
(
arg_8
)
or
arg_8
[
arg_12
]
>
arg_10
if
arg_0
.
blank_re
.
match
(
arg_14
)
:
arg_6
.
write
(
'  '
)
elif
arg_0
.
else_re
.
match
(
arg_14
)
:
if
arg_11
>=
len
(
arg_7
)
and
arg_12
>=
len
(
arg_8
)
:
arg_6
.
write
(
'! '
)
elif
arg_11
>=
len
(
arg_7
)
or
arg_12
>=
len
(
arg_8
)
:
arg_6
.
write
(
'> '
)
elif
arg_7
[
arg_11
]
==
arg_8
[
arg_12
]
:
arg_6
.
write
(
'! '
)
else
:
arg_6
.
write
(
'> '
)
elif
arg_10
in
arg_9
:
arg_6
.
write
(
'- '
)
elif
arg_13
:
arg_6
.
write
(
'> '
)
else
:
arg_6
.
write
(
'! '
)
arg_6
.
write
(
arg_14
)
arg_4
.
close
(
)
arg_6
.
close
(
)

def Func(arg_0, arg_1, arg_2):
        """Annotate a single file.

        `cu` is the CodeUnit for the file to annotate.

        """
        if not arg_1.relative:
            return

        arg_3 = arg_1.filename
        arg_4 = arg_1.source_file()
        if arg_0.directory:
            arg_5 = os.path.join(arg_0.directory, arg_1.flat_rootname())
            arg_5 += ".py,cover"
        else:
            arg_5 = arg_3 + ",cover"
        arg_6 = open(arg_5, 'w')

        arg_7 = sorted(arg_2.statements)
        arg_8 = sorted(arg_2.missing)
        arg_9 = sorted(arg_2.excluded)

        arg_10 = 0
        arg_11 = 0
        arg_12 = 0
        arg_13 = True
        while True:
            arg_14 = arg_4.readline()
            if arg_14 == '':
                break
            arg_10 += 1
            while arg_11 < len(arg_7) and arg_7[arg_11] < arg_10:
                arg_11 += 1
            while arg_12 < len(arg_8) and arg_8[arg_12] < arg_10:
                arg_12 += 1
            if arg_11 < len(arg_7) and arg_7[arg_11] == arg_10:
                arg_13 = arg_12 >= len(arg_8) or arg_8[arg_12] > arg_10
            if arg_0.blank_re.match(arg_14):
                arg_6.write('  ')
            elif arg_0.else_re.match(arg_14):
                # Special logic for lines containing only 'else:'.
                if arg_11 >= len(arg_7) and arg_12 >= len(arg_8):
                    arg_6.write('! ')
                elif arg_11 >= len(arg_7) or arg_12 >= len(arg_8):
                    arg_6.write('> ')
                elif arg_7[arg_11] == arg_8[arg_12]:
                    arg_6.write('! ')
                else:
                    arg_6.write('> ')
            elif arg_10 in arg_9:
                arg_6.write('- ')
            elif arg_13:
                arg_6.write('> ')
            else:
                arg_6.write('! ')
            arg_6.write(arg_14)
        arg_4.close()
        arg_6.close()


def Func ( arg_0 ) : arg_1 = len ( arg_0 ) arg_2 = np . concatenate ( ( cshift ( arg_0 [ arg_1 // 2 : ] , 1 ) , arg_0 [ 0 : arg_1 // 2 ] ) ) arg_2 [ 0 ] = arg_0 [ - 1 ] return arg_2

def Func(arg_0):
    """Convert a two-sided PSD to a center-dc PSD"""
    arg_1 = len(arg_0)
    # could us int() or // in python 3
    arg_2 = np.concatenate((cshift(arg_0[arg_1//2:], 1), arg_0[0:arg_1//2]))
    arg_2[0] = arg_0[-1]
    return arg_2

Convert a two - sided PSD to a center - dc PSD


def Func(arg_0, arg_1):
        """
        Append data to this frame column-wise.

        :param H2OFrame data: append columns of frame ``data`` to the current frame. You can also Func a number,
            in which case it will get converted into a constant column.

        :returns: new H2OFrame with all frames in ``data`` appended column-wise.
        """
        assert_is_type(arg_1, H2OFrame, numeric, [H2OFrame, numeric])
        arg_2 = [arg_1] if not isinstance(arg_1, list) else arg_1
        arg_3 = list(arg_0.columns)
        arg_4 = dict(arg_0.types)
        for arg_5 in arg_2:
            if isinstance(arg_5, H2OFrame):
                if arg_5.nrow != arg_0.nrow:
                    raise H2OValueError("Cannot bind a dataframe with %d rows to a data frame with %d rows: "
                                        "the number of rows should match" % (arg_5.nrow, arg_0.nrow))
                arg_3 += arg_5.columns
                arg_4.update(arg_5.types)
            else:
                arg_3 += [None]
        arg_6 = set(arg_3)
        arg_7 = H2OFrame._expr(expr=ExprNode("Func", arg_0, *arg_2), cache=arg_0._ex._cache)
        arg_7._ex._cache.ncols = len(arg_3)
        if len(arg_3) == len(arg_6) and None not in arg_6:
            arg_7._ex._cache.names = arg_3
            arg_7._ex._cache.types = arg_4
        else:
            # Invalidate names and types since they contain duplicate / unknown names, and the server will choose those.
            arg_7._ex._cache.names = None
            arg_7._ex._cache.types = None
        return arg_7

Append data to this frame column-wise.

        :param H2OFrame data: append columns of frame ``data`` to the current frame. You can also cbind a number,
            in which case it will get converted into a constant column.

        :returns: new H2OFrame with all frames in ``data`` appended column-wise.

Append data to this frame column - wise .


def Func(arg_0):
        """ Method to call to get a serializable object for json.dump or jsonify based on the target

        :return: dict
        """
        if arg_0.subreference is not None:
            return {
                "source": arg_0.objectId,
                "selector": {
                    "type": "FragmentSelector",
                    "conformsTo": "http://ontology-dts.org/terms/subreference",
                    "value": arg_0.subreference
                }
            }
        else:
            return {"source": arg_0.objectId}

Method to call to get a serializable object for json . dump or jsonify based on the target


def Func(arg_0, arg_1):
        """
        Return the projected time when progress level `x_target` will be reached.

        Since the underlying progress model is nonlinear, we need to do use Newton method to find a numerical solution
        to the equation x(t) = x_target.
        """
        arg_2, arg_3, arg_4 = arg_0._t0, arg_0._x0, arg_0._v0
        # The convergence should be achieved in just few iterations, however in unlikely situation that it doesn't
        # we don't want to loop forever...
        for arg_5 in range(20):
            if arg_4 == 0: return 1e20
            # make time prediction assuming the progress will continue at a linear speed ``v``
            arg_2 += (arg_1 - arg_3) / arg_4
            # calculate the actual progress at that time
            arg_3, arg_4 = arg_0._compute_progress_at_time(arg_2)
            # iterate until convergence
            if abs(arg_3 - arg_1) < 1e-3: return arg_2
        return time.time() + 100

Return the projected time when progress level x_target will be reached .


return str_to_callable(s) or env_hosts_retriever

def Func ( arg_0 = None ) : arg_0 = arg_0 or env . hosts_retriever if not arg_0 : return env_hosts_retriever return str_to_callable ( arg_0 ) or env_hosts_retriever

def Func(arg_0=None):
    """
    Given the function name, looks up the method for dynamically retrieving host data.
    """
    arg_0 = arg_0 or env.hosts_retriever
#     #assert s, 'No hosts retriever specified.'
    if not arg_0:
        return env_hosts_retriever
#     module_name = '.'.join(s.split('.')[:-1])
#     func_name = s.split('.')[-1]
#     retriever = getattr(importlib.import_module(module_name), func_name)
#     return retriever
    return str_to_callable(arg_0) or env_hosts_retriever

Given the function name looks up the method for dynamically retrieving host data .


def Func ( ) : load ( ) arg_0 = crontab . CronTab ( user = True ) for arg_1 in registry : arg_0 . new ( arg_1 . command , KRONOS_BREADCRUMB ) . setall ( arg_1 . schedule ) arg_0 . write ( ) return len ( registry )

def Func():
    """
    Register tasks with cron.
    """
    load()
    arg_0 = crontab.CronTab(user=True)
    for arg_1 in registry:
        arg_0.new(arg_1.command, KRONOS_BREADCRUMB).setall(arg_1.schedule)
    arg_0.write()
    return len(registry)


def Func(arg_0, arg_1=None):
        """
        Returns true if the given host exists on the network.
        Returns false otherwise.
        """
        arg_2 = arg_0.local_renderer
        arg_2.env.host = arg_1 or arg_0.genv.host_string
        arg_4 = arg_2._local("getent hosts {host} | awk '{{ print $1 }}'", capture=True) or ''
        if arg_0.verbose:
            print('ret:', arg_4)
        arg_4 = arg_4.strip()
        if arg_0.verbose:
            print('Host %s %s present.' % (arg_2.env.host, 'IS' if bool(arg_4) else 'IS NOT'))
        arg_5 = arg_4
        arg_4 = bool(arg_4)
        if not arg_4:
            return False

        arg_2.env.ip = arg_5
        with settings(warn_only=True):
            arg_4 = arg_2._local('ping -c 1 {ip}', capture=True) or ''
        arg_6 = re.findall(r'([0-9]+)% packet loss', arg_4)
#         print('packet_loss:',packet_loss)
        arg_7 = arg_6 and int(arg_6[0]) < 100
        if arg_0.verbose:
            print('IP %s accessible: %s' % (arg_5, arg_7))
        return bool(arg_7)

Returns true if the given host exists on the network . Returns false otherwise .


(func: Callable,
                   data: List[Any],
                   cpu_cores: int = None)

def Func ( arg_0 : arg_1 , arg_2 : arg_3 [ arg_4 ] , arg_5 : arg_6 = None ) -> arg_3 [ arg_4 ] : if not arg_5 : arg_5 = cpu_count ( ) try : arg_7 = ceil ( len ( arg_2 ) / arg_5 ) arg_8 = Pool ( arg_5 ) arg_9 = arg_8 . map ( arg_0 , chunked ( arg_2 , arg_7 ) , chunksize = 1 ) finally : arg_8 . close ( ) arg_8 . join ( ) return arg_9

def Func(arg_0: arg_1,
                   arg_2: arg_3[arg_4],
                   arg_5: arg_6 = None) -> arg_3[arg_4]:
    """
    Apply function to list of elements.

    Automatically determines the chunk size.
    """
    if not arg_5:
        arg_5 = cpu_count()

    try:
        arg_7 = ceil(len(arg_2) / arg_5)
        arg_8 = Pool(arg_5)
        arg_9 = arg_8.map(arg_0, chunked(arg_2, arg_7), chunksize=1)
    finally:
        arg_8.close()
        arg_8.join()
        return arg_9


def Func(arg_0):
    """Convert some HTML tags to latex equivalents."""
    arg_0 = re.sub("(.*?)", r"$_{\1}$", arg_0)
    arg_0 = re.sub("(.*?)", r"$^{\1}$", arg_0)
    return arg_0

Convert some HTML tags to latex equivalents .


def
Func
(
arg_0
)
:
if
arg_0
.
result
is
not
:
arg_1
=
testXMLAttribute
(
arg_0
.
result
,
"uom"
)
arg_2
=
testXMLValue
(
arg_0
.
result
)
try
:
arg_3
=
float
(
arg_2
)
except
:
raise
ValueError
(
"Error parsing measurement value"
)
arg_0
.
result
=
Measurement
(
arg_3
,
arg_1
)

def Func(arg_0):
        ''' Parse the result property, extracting the value
        and unit of measure '''
        if arg_0.result is not None:
            arg_1 = testXMLAttribute(arg_0.result, "uom")
            arg_2 = testXMLValue(arg_0.result)
            try:
                arg_3 = float(arg_2)
            except:
                raise ValueError("Error parsing measurement value")
            arg_0.result = Measurement(arg_3, arg_1)

Parse the result property extracting the value and unit of measure


def
Func
(
)
:
print
(
'Compounds currently loaded:'
)
for
arg_0
in
sorted
(
compounds
.
keys
(
)
)
:
arg_1
=
compounds
[
arg_0
]
.
get_phase_list
(
)
print
(
'%s: %s'
%
(
arg_0
,
', '
.
join
(
arg_1
)
)
)

def Func():
    """
    List all compounds that are currently loaded in the thermo module, and
    their phases.
    """

    print('Compounds currently loaded:')
    for arg_0 in sorted(compounds.keys()):
        arg_1 = compounds[arg_0].get_phase_list()
        print('%s: %s' % (arg_0, ', '.join(arg_1)))

List all compounds that are currently loaded in the thermo module and their phases .


def Func(arg_0, arg_1):
        """
        Program graph has virtual qubits as nodes.
        Two nodes have an edge if the corresponding virtual qubits
        participate in a 2-qubit gate. The edge is weighted by the
        number of CNOTs between the pair.
        """
        arg_2 = 0
        for arg_3 in arg_1.qubits():
            arg_0.qarg_to_id[arg_3[0].name + arg_6(arg_3[1])] = arg_2
            arg_2 += 1
        for arg_7 in arg_1.twoQ_gates():
            arg_8 = arg_0._qarg_to_id(arg_7.qargs[0])
            arg_9 = arg_0._qarg_to_id(arg_7.qargs[1])
            arg_10 = min(arg_8, arg_9)
            arg_11 = max(arg_8, arg_9)
            arg_12 = 1
            if arg_0.prog_graph.has_edge(arg_10, arg_11):
                arg_12 = arg_0.prog_graph[arg_10][arg_11]['weight'] + 1
            arg_0.prog_graph.add_edge(arg_10, arg_11, weight=arg_12)
        return arg_2

Program graph has virtual qubits as nodes . Two nodes have an edge if the corresponding virtual qubits participate in a 2 - qubit gate . The edge is weighted by the number of CNOTs between the pair .


def Func ( arg_0 ) : for arg_1 in range ( arg_0 . sweeps ) : arg_0 . setsweep ( arg_1 ) yield arg_0 . sweep

def Func(arg_0):
        """iterate over every sweep"""
        for arg_1 in range(arg_0.sweeps):
            arg_0.setsweep(arg_1)
            yield arg_0.sweep


def Func(arg_0, arg_1, **arg_2):
        """Fetch the Dockher Hub items

        :param category: the category of items to fetch
        :param kwargs: backend arguments

        :returns: a generator of items
        """
        logger.info("Fetching data from '%s' repository of '%s' owner",
                    arg_0.repository, arg_0.owner)

        arg_3 = arg_0.client.repository(arg_0.owner, arg_0.repository)
        arg_4 = datetime_utcnow().timestamp()

        arg_5 = arg_0.parse_json(arg_3)
        arg_5['fetched_on'] = arg_4
        yield arg_5

        logger.info("Fetch process completed")


def Func ( arg_0 , arg_1 = True , arg_2 = False ) : arg_3 = [ bb for bb in arg_0 . bounding_boxes if not bb . is_out_of_image ( arg_0 . shape , arg_1 = arg_1 , arg_2 = arg_2 ) ] return BoundingBoxesOnImage ( arg_3 , shape = arg_0 . shape )

def Func(arg_0, arg_1=True, arg_2=False):
        """
        Remove all bounding boxes that are fully or partially outside of the image.

        Parameters
        ----------
        fully : bool, optional
            Whether to remove bounding boxes that are fully outside of the image.

        partly : bool, optional
            Whether to remove bounding boxes that are partially outside of the image.

        Returns
        -------
        imgaug.BoundingBoxesOnImage
            Reduced set of bounding boxes, with those that were fully/partially outside of
            the image removed.

        """
        arg_3 = [bb for bb in arg_0.bounding_boxes
                     if not bb.is_out_of_image(arg_0.shape, arg_1=arg_1, arg_2=arg_2)]
        return BoundingBoxesOnImage(arg_3, shape=arg_0.shape)

Remove all bounding boxes that are fully or partially outside of the image .


def Func ( arg_0 , arg_1 ) : if arg_1 . from_stop_I != arg_0 . stop_I : return False if not arg_0 . has_been_visited ( ) : return False else : arg_2 = arg_1 . dep_time_ut - arg_0 . get_min_visit_time ( ) if ( arg_2 >= arg_0 . min_transfer_time ) or ( arg_1 . trip_I == - 1 and arg_2 >= 0 ) : return True else : for arg_3 in arg_0 . visit_events : if ( arg_1 . trip_I == arg_3 . trip_I ) and ( arg_2 >= 0 ) : return True return False

def Func(arg_0, arg_1):
        """
        Whether the spreading stop can infect using this event.
        """
        if arg_1.from_stop_I != arg_0.stop_I:
            return False

        if not arg_0.has_been_visited():
            return False
        else:
            arg_2 = arg_1.dep_time_ut-arg_0.get_min_visit_time()
            # if the gap between the earliest visit_time and current time is
            # smaller than the min. transfer time, the stop can pass the spreading
            # forward
            if (arg_2 >= arg_0.min_transfer_time) or (arg_1.trip_I == -1 and arg_2 >= 0):
                return True
            else:
                for arg_3 in arg_0.visit_events:
                    # if no transfer, please hop-on
                    if (arg_1.trip_I == arg_3.trip_I) and (arg_2 >= 0):
                        return True
            return False

Whether the spreading stop can infect using this event .


def Func(arg_0, arg_1, arg_2):
        """
            Class method that will return a Action object by ID.
        """
        arg_3 = arg_0(token=arg_1, id=arg_2)
        arg_3.load_directly()
        return arg_3

Class method that will return a Action object by ID .


def Func ( arg_0 , arg_1 , arg_2 = 1 ) : arg_3 = arg_0 . _perform_request ( '/um/users/%s?depth=%s' % ( arg_1 , str ( arg_2 ) ) ) return arg_3

def Func(arg_0, arg_1, arg_2=1):
        """
        Retrieves a single user by ID.

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

        :param      depth: The depth of the response data.
        :type       depth: ``int``

        """
        arg_3 = arg_0._perform_request(
            '/um/users/%s?depth=%s' % (arg_1, str(arg_2)))

        return arg_3


def Func(arg_0, arg_1, arg_2=None):
  """Generate a dataset of aggregated values

  Parameters:
  ----------------------------------------------------------------------------
  aggregationInfo: a dictionary that contains the following entries
    - fields: a list of pairs. Each pair is a field name and an
      aggregation function (e.g. sum). The function will be used to aggregate
      multiple values during the aggregation period.

  aggregation period: 0 or more of unit=value fields; allowed units are:
        [years months] |
        [weeks days hours minutes seconds milliseconds microseconds]
        NOTE: years and months are mutually-exclusive with the other units.
              See getEndTime() and _aggregate() for more details.
        Example1: years=1, months=6,
        Example2: hours=1, minutes=30,
        If none of the period fields are specified or if all that are specified
        have values of 0, then aggregation will be suppressed, and the given
        inputFile parameter value will be returned.

  inputFilename: filename of the input dataset within examples/prediction/data

  outputFilename: name for the output file. If not given, a name will be
        generated based on the input filename and the aggregation params

  retval: Name of the generated output file. This will be the same as the input
      file name if no aggregation needed to be performed

  If the input file contained a time field, sequence id field or reset field
  that were not specified in aggregationInfo fields, those fields will be
  added automatically with the following rules:

  1. The order will be R, S, T, rest of the fields
  2. The aggregation function for all will be to pick the first: lambda x: x[0]

    Returns: the path of the aggregated data file if aggregation was performed
      (in the same directory as the given input file); if aggregation did not
      need to be performed, then the given inputFile argument value is returned.
  """

  # Create the input stream
  arg_3 = resource_filename("nupic.datafiles", arg_1)
  arg_4 = FileRecordStream(arg_3)

  # Instantiate the aggregator
  arg_5 = Aggregator(arg_0=arg_0,
                          inputFields=arg_4.getFields())

  # Is it a null aggregation? If so, just return the input file unmodified
  if arg_5.isNullAggregation():
    return arg_3

  # ------------------------------------------------------------------------
  # If we were not given an output filename, create one based on the
  #  aggregation settings
  if arg_2 is None:
    arg_2 = 'agg_%s' % \
                        os.path.splitext(os.path.basename(arg_3))[0]
    arg_6 = 'years months weeks days '\
                  'hours minutes seconds milliseconds microseconds'
    for arg_7 in arg_6.split():
      if arg_0.get(arg_7, 0) > 0:
        arg_2 += '_%s_%d' % (arg_7, arg_0[arg_7])

    arg_2 += '.csv'
    arg_2 = os.path.join(os.path.dirname(arg_3), arg_2)

  # ------------------------------------------------------------------------
  # If some other process already started creating this file, simply
  #   wait for it to finish and return without doing anything
  arg_8 = arg_2 + '.please_wait'
  if os.path.isfile(arg_2) or \
     os.path.isfile(arg_8):
    while os.path.isfile(arg_8):
      print 'Waiting for %s to be fully written by another process' % \
            arg_8
      time.sleep(1)
    return arg_2

  # Create the lock file
  arg_9 = open(arg_8, 'w')

  # -------------------------------------------------------------------------
  # Create the output stream
  arg_10 = FileRecordStream(streamID=arg_2, write=True,
                               fields=arg_4.getFields())

  # -------------------------------------------------------------------------
  # Write all aggregated records to the output
  while True:
    arg_11 = arg_4.getNextRecord()

    (arg_12, arg_13) = arg_5.next(arg_11, None)

    if arg_12 is None and arg_11 is None:
      break

    if arg_12 is not None:
      arg_10.appendRecord(arg_12)

  return arg_2


def Func ( ) : if 'CUDA_VISIBLE_DEVICES' not in arg_3 . environ : if sys . platform == 'darwin' : arg_0 = [ ] else : arg_1 , arg_2 = get_local_rank_size ( MPI . COMM_WORLD ) arg_0 = [ arg_1 ] arg_3 . environ [ "CUDA_VISIBLE_DEVICES" ] = "," . join ( map ( str , arg_0 ) )

def Func():
    """
    Set CUDA_VISIBLE_DEVICES to MPI rank if not already set
    """
    if 'CUDA_VISIBLE_DEVICES' not in arg_3.environ:
        if sys.platform == 'darwin': # This Assumes if you're on OSX you're just
            arg_0 = []                 # doing a smoke test and don't want GPUs
        else:
            arg_1, arg_2 = get_local_rank_size(MPI.COMM_WORLD)
            arg_0 = [arg_1]
        arg_3.environ["CUDA_VISIBLE_DEVICES"] = ",".join(map(str, arg_0))


(self, bucket, key, fileobj, extra_args=None,
                 subscribers=None)

return self._submit_transfer(
            call_args, DownloadSubmissionTask, extra_main_kwargs)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None,
                 arg_5=None):
        """Downloads a file from S3

        :type bucket: str
        :param bucket: The name of the bucket to Func from

        :type key: str
        :param key: The name of the key to Func from

        :type fileobj: str or seekable file-like object
        :param fileobj: The name of a file to Func or a seekable file-like
            object to Func. It is recommended to use a filename because
            file-like objects may result in higher memory usage.

        :type extra_args: dict
        :param extra_args: Extra arguments that may be passed to the
            client operation

        :type subscribers: list(s3transfer.subscribers.BaseSubscriber)
        :param subscribers: The list of subscribers to be invoked in the
            order provided based on the event emit during the process of
            the transfer request.

        :rtype: s3transfer.futures.TransferFuture
        :returns: Transfer future representing the Func
        """
        if arg_4 is None:
            arg_4 = {}
        if arg_5 is None:
            arg_5 = []
        arg_0._validate_all_known_args(arg_4, arg_0.ALLOWED_DOWNLOAD_ARGS)
        arg_6 = CallArgs(
            arg_1=arg_1, arg_2=arg_2, arg_3=arg_3, arg_4=arg_4,
            arg_5=arg_5
        )
        arg_7 = {'io_executor': arg_0._io_executor}
        if arg_0._bandwidth_limiter:
            arg_7['bandwidth_limiter'] = arg_0._bandwidth_limiter
        return arg_0._submit_transfer(
            arg_6, DownloadSubmissionTask, arg_7)

Downloads a file from S3

        :type bucket: str
        :param bucket: The name of the bucket to download from

        :type key: str
        :param key: The name of the key to download from

        :type fileobj: str or seekable file-like object
        :param fileobj: The name of a file to download or a seekable file-like
            object to download. It is recommended to use a filename because
            file-like objects may result in higher memory usage.

        :type extra_args: dict
        :param extra_args: Extra arguments that may be passed to the
            client operation

        :type subscribers: list(s3transfer.subscribers.BaseSubscriber)
        :param subscribers: The list of subscribers to be invoked in the
            order provided based on the event emit during the process of
            the transfer request.

        :rtype: s3transfer.futures.TransferFuture
        :returns: Transfer future representing the download


(command, parser, cl_args, unknown_args)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
,
arg_5
,
arg_6
=
arg_2
[
'cluster'
]
,
arg_2
[
'role'
]
,
arg_2
[
'environ'
]
arg_7
=
arg_2
[
'topology-name'
]
try
:
arg_8
=
tracker_access
.
get_topology_info
(
arg_4
,
arg_6
,
arg_7
,
arg_5
)
arg_9
=
arg_8
[
'physical_plan'
]
[
'spouts'
]
.
keys
(
)
arg_10
=
arg_8
[
'physical_plan'
]
[
'bolts'
]
.
keys
(
)
arg_11
=
arg_9
+
arg_10
arg_12
=
arg_2
[
'component'
]
if
arg_12
:
if
arg_12
in
arg_11
:
arg_11
=
[
arg_12
]
else
:
Log
.
error
(
'Unknown component: \'%s\''
%
arg_12
)
raise
except
Exception
:
Log
.
error
(
"Fail to connect to tracker: \'%s\'"
,
arg_2
[
"tracker_url"
]
)
return
False
arg_13
=
[
]
for
arg_14
in
arg_11
:
try
:
arg_15
=
tracker_access
.
get_component_metrics
(
arg_14
,
arg_4
,
arg_6
,
arg_7
,
arg_5
)
except
:
Log
.
error
(
"Fail to connect to tracker: \'%s\'"
,
arg_2
[
"tracker_url"
]
)
return
False
arg_16
,
arg_17
=
to_table
(
arg_15
)
arg_13
.
append
(
(
arg_14
,
arg_16
,
arg_17
)
)
for
arg_18
,
(
arg_14
,
arg_16
,
arg_17
)
in
enumerate
(
arg_13
)
:
if
arg_18
!=
0
:
print
(
''
)
print
(
'\'%s\' metrics:'
%
arg_14
)
print
(
tabulate
(
arg_16
,
headers
=
arg_17
)
)
return
True

def Func(arg_0, arg_1, arg_2, arg_3):
  """ run metrics subcommand """
  arg_4, arg_5, arg_6 = arg_2['cluster'], arg_2['role'], arg_2['environ']
  arg_7 = arg_2['topology-name']
  try:
    arg_8 = tracker_access.get_topology_info(arg_4, arg_6, arg_7, arg_5)
    arg_9 = arg_8['physical_plan']['spouts'].keys()
    arg_10 = arg_8['physical_plan']['bolts'].keys()
    arg_11 = arg_9 + arg_10
    arg_12 = arg_2['component']
    if arg_12:
      if arg_12 in arg_11:
        arg_11 = [arg_12]
      else:
        Log.error('Unknown component: \'%s\'' % arg_12)
        raise
  except Exception:
    Log.error("Fail to connect to tracker: \'%s\'", arg_2["tracker_url"])
    return False
  arg_13 = []
  for arg_14 in arg_11:
    try:
      arg_15 = tracker_access.get_component_metrics(arg_14, arg_4, arg_6, arg_7, arg_5)
    except:
      Log.error("Fail to connect to tracker: \'%s\'", arg_2["tracker_url"])
      return False
    arg_16, arg_17 = to_table(arg_15)
    arg_13.append((arg_14, arg_16, arg_17))
  for arg_18, (arg_14, arg_16, arg_17) in enumerate(arg_13):
    if arg_18 != 0:
      print('')
    print('\'%s\' metrics:' % arg_14)
    print(tabulate(arg_16, headers=arg_17))
  return True


def Func(arg_0, arg_1, arg_2):
        """Create the message to turn light or switch off."""
        arg_3 = "!%sF0|Turn Off|%s" % (arg_1, arg_2)
        arg_0._send_message(arg_3)

Create the message to turn light or switch off .


def Func ( arg_0 , arg_1 , arg_2 ) : if not arg_0 . current_app_is_admin ( ) : arg_1 = arg_0 . resolve_tree_i18n_alias ( arg_1 ) return arg_0 . cache . get_entry ( 'parents' , arg_1 ) [ arg_2 ]

def Func(arg_0, arg_1, arg_2):
        """Returns item's children.

        :param str|unicode tree_alias:
        :param TreeItemBase|None item:
        :rtype: list
        """
        if not arg_0.current_app_is_admin():
            # We do not need i18n for a tree rendered in Admin dropdown.
            arg_1 = arg_0.resolve_tree_i18n_alias(arg_1)

        return arg_0.cache.get_entry('parents', arg_1)[arg_2]


def Func ( arg_0 ) : arg_0 . kvl . clear_table ( arg_0 . TABLE ) arg_0 . kvl . clear_table ( arg_0 . INDEX_TABLE )

def Func(arg_0):
        '''Deletes all storage.

        This includes every content object and all index data.
        '''
        arg_0.kvl.clear_table(arg_0.TABLE)
        arg_0.kvl.clear_table(arg_0.INDEX_TABLE)


return self.waitFor(timeout, 'AXFocusedWindowChanged',
                            AXTitle=nextWinName)

def Func ( arg_0 , arg_1 , arg_2 = 10 ) : arg_3 = AXCallbacks . returnElemCallback arg_4 = None return arg_0 . waitFor ( arg_2 , 'AXFocusedWindowChanged' , AXTitle = arg_1 )

def Func(arg_0, arg_1, arg_2=10):
        """Convenience method to wait for focused window to change

        Returns: Boolean
        """
        arg_3 = AXCallbacks.returnElemCallback
        arg_4 = None
        return arg_0.waitFor(arg_2, 'AXFocusedWindowChanged',
                            AXTitle=arg_1)


def
Func
(
arg_0
)
:
pexdoc
.
exh
.
addex
(
TypeError
,
"Cannot convert complex to float"
,
arg_0
.
_dep_vector
.
dtype
.
name
.
startswith
(
"complex"
)
,
)
arg_1
=
copy
.
copy
(
arg_0
)
arg_1
.
_dep_vector
=
arg_1
.
_dep_vector
.
astype
(
np
.
float
)
return
arg_1

def Func(arg_0):
    r"""
    Convert a waveform's dependent variable vector to float.

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

    :rtype: :py:class:`peng.eng.Waveform`

    .. [[[cog cog.out(exobj_eng.get_sphinx_autodoc()) ]]]
    .. Auto-generated exceptions documentation for
    .. peng.wave_functions.Func

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

     * TypeError (Cannot convert complex to float)

    .. [[[end]]]
    """
    pexdoc.exh.addex(
        TypeError,
        "Cannot convert complex to float",
        arg_0._dep_vector.dtype.name.startswith("complex"),
    )
    arg_1 = copy.copy(arg_0)
    arg_1._dep_vector = arg_1._dep_vector.astype(np.float)
    return arg_1

r"""
    Convert a waveform's dependent variable vector to float.

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

    :rtype: :py:class:`peng.eng.Waveform`

    .. [[[cog cog.out(exobj_eng.get_sphinx_autodoc()) ]]]
    .. Auto-generated exceptions documentation for
    .. peng.wave_functions.wfloat

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

     * TypeError (Cannot convert complex to float)

    .. [[[end]]]

r Convert a waveform s dependent variable vector to float .


def Func ( arg_0 ) : arg_1 = arg_0 . xpath_ctxt . xpathEval ( "d:feature" ) arg_2 = [ ] for arg_3 in arg_1 : if arg_3 . hasProp ( "var" ) : arg_2 . append ( arg_3 . prop ( "var" ) . decode ( "utf-8" ) ) return arg_2

def Func(arg_0):
        """Get the features contained in `self`.

        :return: the list of features.
        :returntype: `list` of `unicode`"""
        arg_1 = arg_0.xpath_ctxt.xpathEval("d:feature")
        arg_2 = []
        for arg_3 in arg_1:
            if arg_3.hasProp("var"):
                arg_2.append( arg_3.prop("var").decode("utf-8") )
        return arg_2