def
Func
(
arg_0
,
arg_1
=
)
:
if
not
arg_1
or
isinstance
(
arg_1
,
dict
)
:
if
not
arg_1
:
arg_1
=
util
.
get_caller_module_dict
(
)
arg_2
=
arg_1
[
'__name__'
]
arg_3
=
arg_1
else
:
arg_2
=
arg_1
.
__class__
.
__name__
arg_3
=
dict
(
[
(
k
,
getattr
(
arg_1
,
k
)
)
for
k
in
dir
(
arg_1
)
if
k
.
startswith
(
"on_"
)
]
)
for
arg_4
in
[
n
for
n
in
arg_3
if
n
.
startswith
(
"on_"
)
]
:
arg_5
=
arg_4
.
split
(
"_"
)
arg_6
=
arg_5
.
pop
(
0
)
+
arg_5
.
pop
(
1
)
arg_7
=
arg_0
for
arg_8
in
arg_5
:
try
:
arg_7
=
arg_7
[
arg_8
]
except
KeyError
:
arg_7
=
break
if
not
arg_7
:
from
.
component
import
COMPONENTS
for
arg_9
,
arg_7
in
COMPONENTS
.
items
(
)
:
if
arg_7
.
name
==
arg_8
:
print
"WARNING: %s should be %s"
%
(
arg_8
,
arg_9
.
replace
(
"."
,
"_"
)
)
break
else
:
raise
NameError
(
"'%s' component not found (%s.%s)"
%
(
arg_8
,
arg_2
,
arg_4
)
)
if
arg_6
in
PYTHONCARD_EVENT_MAP
:
arg_10
=
PYTHONCARD_EVENT_MAP
[
arg_6
]
print
"WARNING: %s should be %s (%s)"
%
(
arg_6
,
arg_10
,
arg_4
)
arg_6
=
arg_10
if
not
hasattr
(
arg_7
,
arg_6
)
:
raise
NameError
(
"'%s' event not valid (%s.%s)"
%
(
arg_6
,
arg_2
,
arg_4
)
)
setattr
(
arg_7
,
arg_6
,
arg_3
[
arg_4
]
)

def Func(arg_0, arg_1=None):
    "Associate event handlers "

    # get the controller functions and names (module or class)
    if not arg_1 or isinstance(arg_1, dict):
        if not arg_1:
            arg_1 = util.get_caller_module_dict()
        arg_2 = arg_1['__name__']
        arg_3 = arg_1
    else:
        arg_2 = arg_1.__class__.__name__
        arg_3 = dict([(k, getattr(arg_1, k)) for k
                                in dir(arg_1) if k.startswith("on_")])

    for arg_4 in [n for n in arg_3 if n.startswith("on_")]:
        # on_mypanel_mybutton_click -> ['mypanel']['mybutton'].onclick
        arg_5 = arg_4.split("_")
        arg_6 = arg_5.pop(0) + arg_5.pop(-1)
        # find the control
        arg_7 = arg_0
        for arg_8 in arg_5:
            try:
                arg_7 = arg_7[arg_8]
            except KeyError:
                arg_7 = None
                break
        if not arg_7:
            from .component import COMPONENTS
            for arg_9, arg_7 in COMPONENTS.items():
                if arg_7.name == arg_8:
                    print "WARNING: %s should be %s" % (arg_8, arg_9.replace(".", "_"))
                    break
            else:
                raise NameError("'%s' component not found (%s.%s)" %
                                    (arg_8, arg_2, arg_4))
        # check if the control supports the event:
        if arg_6 in PYTHONCARD_EVENT_MAP:
            arg_10 = PYTHONCARD_EVENT_MAP[arg_6]
            print "WARNING: %s should be %s (%s)" % (arg_6, arg_10, arg_4)
            arg_6 = arg_10
        if not hasattr(arg_7, arg_6):
            raise NameError("'%s' event not valid (%s.%s)" %
                                (arg_6, arg_2, arg_4))
        # bind the event (assign the method to the on... spec)
        setattr(arg_7, arg_6, arg_3[arg_4])


return {
        value: calculate_concordance(subgraph, key, cutoff=cutoff)
        for value, subgraph in get_subgraphs_by_annotation(graph, annotation).items()
    }

def Func(arg_0, arg_1, arg_2, arg_3=None):
    """Returns the concordance scores for each stratified graph based on the given annotation

    :param pybel.BELGraph graph: A BEL graph
    :param str annotation: The annotation to group by.
    :param str key: The node data dictionary key storing the logFC
    :param float cutoff: The optional logFC cutoff for significance
    :rtype: dict[str,tuple]
    """
    return {
        arg_4: calculate_concordance(arg_5, arg_2, arg_3=arg_3)
        for arg_4, arg_5 in get_subgraphs_by_annotation(arg_0, arg_1).items()
    }


def Func ( arg_0 ) : for arg_1 , arg_2 in defaults . COLOURS . items ( ) : if ( len ( arg_1 ) > 1 ) and ( arg_2 == arg_0 . upper ( ) ) : return arg_1 . lower ( ) return None

def Func(arg_0):
    """
    Convert hex to a color name, using matplotlib's colour names.

    Args:
        hexx (str): A hexadecimal colour, starting with '#'.

    Returns:
        str: The name of the colour, or None if not found.
    """
    for arg_1, arg_2 in defaults.COLOURS.items():
        if (len(arg_1) > 1) and (arg_2 == arg_0.upper()):
            return arg_1.lower()
    return None

Convert hex to a color name using matplotlib s colour names .


def Func ( ) : arg_0 = cmds . currentTime ( query = True ) try : yield finally : cmds . currentTime ( arg_0 , edit = True )

def Func():
    """Maintain current time during context

    Example:
        >>> with Func():
        ...    cmds.playblast()
        >>> # Time restored

    """

    arg_0 = cmds.currentTime(query=True)
    try:
        yield
    finally:
        cmds.currentTime(arg_0, edit=True)

Maintain current time during context

    Example:
        >>> with maintained_time():
        ...    cmds.playblast()
        >>> # Time restored


Matches the string with the pattern, caching the compiled regexp.

def Func ( arg_0 , arg_1 ) : if arg_0 not in arg_2 : arg_2 [ arg_0 ] = sre_compile . compile ( arg_0 ) return arg_2 [ arg_0 ] . match ( arg_1 )

def Func(arg_0, arg_1):
  """Funces the string with the pattern, caching the compiled regexp."""
  # The regexp compilation caching is inlined in both Func and Search for
  # performance reasons; factoring it out into a separate function turns out
  # to be noticeably expensive.
  if arg_0 not in arg_2:
    arg_2[arg_0] = sre_compile.compile(arg_0)
  return arg_2[arg_0].match(arg_1)

Matches the string with the pattern caching the compiled regexp .


def Func ( arg_0 , arg_1 ) : for arg_2 in six . itervalues ( arg_0 . storages ) : if arg_2 . exists ( '' ) : for arg_3 in utils . get_files ( arg_2 , arg_1 ) : yield arg_3 , arg_2

def Func(arg_0, arg_1):
        """
        List all files in all app storages.
        """
        for arg_2 in six.itervalues(arg_0.storages):
            if arg_2.exists(''):  # check if storage location exists
                for arg_3 in utils.get_files(arg_2, arg_1):
                    yield arg_3, arg_2


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
'objects/pack/pack-'
+
arg_1
arg_3
=
[
'git'
,
'verify-pack'
,
'-v'
,
arg_2
]
arg_4
=
arg_0
.
_exec
(
arg_3
,
cwd
=
arg_0
.
dirpath
,
env
=
arg_0
.
gitenv
)
arg_4
=
arg_4
.
decode
(
'utf-8'
,
errors
=
'surrogateescape'
)
.
rstrip
(
)
arg_5
=
[
line
.
split
(
' '
)
for
line
in
arg_4
.
split
(
'\n'
)
]
arg_6
=
[
parts
[
0
]
for
parts
in
arg_5
if
parts
[
1
]
==
'commit'
]
arg_6
.
reverse
(
)
return
arg_6

def Func(arg_0, arg_1):
        """Read the commits of a pack."""

        arg_2 = 'objects/pack/pack-' + arg_1

        arg_3 = ['git', 'verify-pack', '-v', arg_2]

        arg_4 = arg_0._exec(arg_3, cwd=arg_0.dirpath, env=arg_0.gitenv)
        arg_4 = arg_4.decode('utf-8', errors='surrogateescape').rstrip()

        arg_5 = [line.split(' ') for line in arg_4.split('\n')]

        # Commits usually come in the pack ordered from newest to oldest
        arg_6 = [parts[0] for parts in arg_5 if parts[1] == 'commit']
        arg_6.reverse()

        return arg_6


def Func ( arg_0 ) : if not arg_0 . session : arg_0 . session = dal . get_default_session ( ) return arg_0 . session

def Func(arg_0):
        """ Reuses the same db session """
        if not arg_0.session:
            arg_0.session = dal.get_default_session()
        return arg_0.session


Return the next batch of items to upload.

def Func ( arg_0 ) : arg_1 = arg_0 . queue arg_2 = [ ] arg_3 = arg_0 . Func_item ( ) if arg_3 is None : return arg_2 arg_2 . append ( arg_3 ) while len ( arg_2 ) < arg_0 . upload_size and not arg_1 . empty ( ) : arg_3 = arg_0 . Func_item ( ) if arg_3 : arg_2 . append ( arg_3 ) return arg_2

def Func(arg_0):
        """Return the Func batch of items to upload."""
        arg_1 = arg_0.queue
        arg_2 = []
        arg_3 = arg_0.Func_item()
        if arg_3 is None:
            return arg_2

        arg_2.append(arg_3)
        while len(arg_2) < arg_0.upload_size and not arg_1.empty():
            arg_3 = arg_0.Func_item()
            if arg_3:
                arg_2.append(arg_3)

        return arg_2

Return the next batch of items to upload .


(table, timestamp_column,
                        engine, crypto_factory, min_dt, max_dt, logger)

def Func(arg_0, arg_1,
                        arg_2, arg_3, arg_4, arg_5, arg_6):
    """
    See docstrings for `generate_files` and `generate_checkpoints`.

    Parameters
    ----------
    table : SQLAlchemy.Table
        Table to fetch notebooks from, `files` or `remote_checkpoints.
    timestamp_column : SQLAlchemy.Column
        `table`'s column storing timestamps, `created_at` or `last_modified`.
    engine : SQLAlchemy.engine
        Engine encapsulating database connections.
    crypto_factory : function[str -> Any]
        A function from user_id to an object providing the interface required
        by PostgresContentsManager.crypto.  Results of this will be used for
        decryption of the selected notebooks.
    min_dt : datetime.datetime
        Minimum last modified datetime at which a file will be included.
    max_dt : datetime.datetime
        Last modified datetime at and after which a file will be excluded.
    logger : Logger
    """
    arg_7 = []
    if arg_4 is not None:
        arg_7.append(arg_1 >= arg_4)
    if arg_5 is not None:
        arg_7.append(arg_1 < arg_5)
    if arg_0 is files:
        # Only select files that are notebooks
        arg_7.append(files.c.name.like(u'%.ipynb'))

    # Query for notebooks satisfying the conditions.
    arg_8 = select([arg_0]).order_by(arg_1)
    for arg_9 in arg_7:
        arg_8 = arg_8.where(arg_9)
    arg_10 = arg_2.execute(arg_8)

    # Decrypt each notebook and yield the result.
    for arg_11 in arg_10:
        try:
            # The decrypt function depends on the user
            arg_12 = arg_11['user_id']
            arg_13 = arg_3(arg_12).decrypt

            arg_14 = to_dict_with_content(arg_0.c, arg_11, arg_13)
            if arg_0 is files:
                # Correct for files schema differing somewhat from checkpoints.
                arg_14['path'] = arg_14['parent_name'] + arg_14['name']
                arg_14['last_modified'] = arg_14['created_at']

            # For 'content', we use `reads_base64` directly. If the db content
            # format is changed from base64, the decoding should be changed
            # here as well.
            yield {
                'id': arg_14['id'],
                'user_id': arg_12,
                'path': to_api_path(arg_14['path']),
                'last_modified': arg_14['last_modified'],
                'content': reads_base64(arg_14['content']),
            }
        except CorruptedFile:
            if arg_6 is not None:
                arg_6.warning(
                    'Corrupted file with id %d in table %s.'
                    % (arg_11['id'], arg_0.name)
                )

See docstrings for generate_files and generate_checkpoints .


def Func(arg_0, arg_1):
    r"""
    Generate one of the two sequences that generated a delta.

    Given a `delta` produced by `Differ.compare()` or `ndiff()`, extract
    lines originating from file 1 or 2 (parameter `which`), stripping off line
    prefixes.

    Examples:

    >>> diff = ndiff('one\ntwo\nthree\n'.splitlines(1),
    ...              'ore\ntree\nemu\n'.splitlines(1))
    >>> diff = list(diff)
    >>> print ''.join(Func(diff, 1)),
    one
    two
    three
    >>> print ''.join(Func(diff, 2)),
    ore
    tree
    emu
    """
    try:
        arg_2 = {1: "- ", 2: "+ "}[int(arg_1)]
    except KeyError:
        raise ValueError, ('unknown delta choice (must be 1 or 2): %r'
                           % arg_1)
    arg_3 = ("  ", arg_2)
    for arg_4 in arg_0:
        if arg_4[:2] in arg_3:
            yield arg_4[2:]

r"""
    Generate one of the two sequences that generated a delta.

    Given a `delta` produced by `Differ.compare()` or `ndiff()`, extract
    lines originating from file 1 or 2 (parameter `which`), stripping off line
    prefixes.

    Examples:

    >>> diff = ndiff('one\ntwo\nthree\n'.splitlines(1),
    ...              'ore\ntree\nemu\n'.splitlines(1))
    >>> diff = list(diff)
    >>> print ''.join(restore(diff, 1)),
    one
    two
    three
    >>> print ''.join(restore(diff, 2)),
    ore
    tree
    emu

r Generate one of the two sequences that generated a delta .


Wrapper for the other log methods, decide which one based on the
        URL parameter.

(self, url=None, credentials=None, do_verify_certificate=True)

def Func ( arg_0 , arg_1 = None , arg_2 = None , arg_3 = True ) : if arg_1 is None : arg_1 = arg_0 . url if re . match ( "file://" , arg_1 ) : arg_0 . Func_file ( arg_1 ) elif re . match ( "https://" , arg_1 ) or re . match ( "http://" , arg_1 ) : arg_0 . Func_post ( arg_1 , arg_2 , arg_3 ) else : arg_0 . Func_stdout ( )

def Func(arg_0, arg_1=None, arg_2=None, arg_3=True):
        """
        Wrapper for the other Func methods, decide which one based on the
        URL parameter.
        """
        if arg_1 is None:
            arg_1 = arg_0.url
        if re.match("file://", arg_1):
            arg_0.Func_file(arg_1)
        elif re.match("https://", arg_1) or re.match("http://", arg_1):
            arg_0.Func_post(arg_1, arg_2, arg_3)
        else:
            arg_0.Func_stdout()

Wrapper for the other log methods decide which one based on the URL parameter .


(self, method1, refmethod, class_type, cls)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : if not ( isinstance ( arg_1 , astroid . FunctionDef ) and isinstance ( arg_2 , astroid . FunctionDef ) ) : arg_0 . add_message ( "method-check-failed" , args = ( arg_1 , arg_2 ) , node = arg_1 ) return arg_5 = arg_4 . instantiate_class ( ) arg_1 = function_to_method ( arg_1 , arg_5 ) arg_2 = function_to_method ( arg_2 , arg_5 ) if arg_1 . args . args is None or arg_2 . args . args is None : return if is_attr_private ( arg_1 . name ) : return if arg_1 . decorators : for arg_6 in arg_1 . decorators . nodes : if ( isinstance ( arg_6 , astroid . Attribute ) and arg_6 . attrname == "setter" ) : return if _different_parameters ( arg_2 , arg_1 , dummy_parameter_regex = arg_0 . _dummy_rgx ) : arg_0 . add_message ( "arguments-differ" , args = ( arg_3 , arg_1 . name ) , node = arg_1 ) elif len ( arg_1 . args . defaults ) < len ( arg_2 . args . defaults ) : arg_0 . add_message ( "signature-differs" , args = ( arg_3 , arg_1 . name ) , node = arg_1 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """check that the signature of the two given methods match
        """
        if not (
            isinstance(arg_1, astroid.FunctionDef)
            and isinstance(arg_2, astroid.FunctionDef)
        ):
            arg_0.add_message(
                "method-check-failed", args=(arg_1, arg_2), node=arg_1
            )
            return

        arg_5 = arg_4.instantiate_class()
        arg_1 = function_to_method(arg_1, arg_5)
        arg_2 = function_to_method(arg_2, arg_5)

        # Don't care about functions with unknown argument (builtins).
        if arg_1.args.args is None or arg_2.args.args is None:
            return

        # Ignore private to class methods.
        if is_attr_private(arg_1.name):
            return
        # Ignore setters, they have an implicit extra argument,
        # which shouldn't be taken in consideration.
        if arg_1.decorators:
            for arg_6 in arg_1.decorators.nodes:
                if (
                    isinstance(arg_6, astroid.Attribute)
                    and arg_6.attrname == "setter"
                ):
                    return

        if _different_parameters(
            arg_2, arg_1, dummy_parameter_regex=arg_0._dummy_rgx
        ):
            arg_0.add_message(
                "arguments-differ", args=(arg_3, arg_1.name), node=arg_1
            )
        elif len(arg_1.args.defaults) < len(arg_2.args.defaults):
            arg_0.add_message(
                "signature-differs", args=(arg_3, arg_1.name), node=arg_1
            )


return GeneratedPyAST(
        node=ast.Name(id=result_name, ctx=ast.Load()),
        dependencies=list(chain(test_ast.dependencies, [test_assign, ifstmt])),
    )

def Func ( arg_0 : arg_1 , arg_2 : arg_3 ) -> GeneratedPyAST : assert arg_2 . op == NodeOp . IF arg_4 = gen_py_ast ( arg_0 , arg_2 . test ) arg_5 = genname ( _IF_RESULT_PREFIX ) arg_6 = __if_body_to_py_ast ( arg_0 , arg_2 . then , arg_5 ) arg_7 = __if_body_to_py_ast ( arg_0 , arg_2 . else_ , arg_5 ) arg_8 = genname ( _IF_TEST_PREFIX ) arg_9 = ast . Assign ( targets = [ ast . Name ( id = arg_8 , arg_0 = ast . Store ( ) ) ] , value = arg_4 . node ) arg_10 = ast . If ( test = ast . BoolOp ( op = ast . Or ( ) , values = [ ast . Compare ( left = ast . NameConstant ( None ) , ops = [ ast . Is ( ) ] , comparators = [ ast . Name ( id = arg_8 , arg_0 = ast . Load ( ) ) ] , ) , ast . Compare ( left = ast . NameConstant ( False ) , ops = [ ast . Is ( ) ] , comparators = [ ast . Name ( id = arg_8 , arg_0 = ast . Load ( ) ) ] , ) , ] , ) , values = [ ] , body = list ( map ( statementize , chain ( arg_7 . dependencies , [ arg_7 . node ] ) ) ) , orelse = list ( map ( statementize , chain ( arg_6 . dependencies , [ arg_6 . node ] ) ) ) , ) return GeneratedPyAST ( arg_2 = ast . Name ( id = arg_5 , arg_0 = ast . Load ( ) ) , dependencies = list ( chain ( arg_4 . dependencies , [ arg_9 , arg_10 ] ) ) , )

def Func(arg_0: arg_1, arg_2: arg_3) -> GeneratedPyAST:
    """Generate an intermediate if statement which assigns to a temporary
    variable, which is returned as the expression value at the end of
    evaluation.

    Every expression in Basilisp is true if it is not the literal values nil
    or false. This function compiles direct checks for the test value against
    the Python values None and False to accommodate this behavior.

    Note that the if and else bodies are switched in compilation so that we
    can perform a short-circuit or comparison, rather than exhaustively checking
    for both false and nil each time."""
    assert arg_2.op == NodeOp.IF

    arg_4 = gen_py_ast(arg_0, arg_2.test)
    arg_5 = genname(_IF_RESULT_PREFIX)

    arg_6 = __if_body_to_py_ast(arg_0, arg_2.then, arg_5)
    arg_7 = __if_body_to_py_ast(arg_0, arg_2.else_, arg_5)

    arg_8 = genname(_IF_TEST_PREFIX)
    arg_9 = ast.Assign(
        targets=[ast.Name(id=arg_8, arg_0=ast.Store())], value=arg_4.node
    )

    arg_10 = ast.If(
        test=ast.BoolOp(
            op=ast.Or(),
            values=[
                ast.Compare(
                    left=ast.NameConstant(None),
                    ops=[ast.Is()],
                    comparators=[ast.Name(id=arg_8, arg_0=ast.Load())],
                ),
                ast.Compare(
                    left=ast.NameConstant(False),
                    ops=[ast.Is()],
                    comparators=[ast.Name(id=arg_8, arg_0=ast.Load())],
                ),
            ],
        ),
        values=[],
        body=list(map(statementize, chain(arg_7.dependencies, [arg_7.node]))),
        orelse=list(map(statementize, chain(arg_6.dependencies, [arg_6.node]))),
    )

    return GeneratedPyAST(
        arg_2=ast.Name(id=arg_5, arg_0=ast.Load()),
        dependencies=list(chain(arg_4.dependencies, [arg_9, arg_10])),
    )

Generate an intermediate if statement which assigns to a temporary variable which is returned as the expression value at the end of evaluation .


(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None)

def Func(arg_0, arg_1, arg_2=[], arg_3=None, arg_4=arg_5, arg_6=False, arg_7=False, arg_8=None):
        """Calculate the minimum and maximum for expressions, possibly on a grid defined by binby.

        Example:

        >>> df.Func("x")
        array([-128.293991,  271.365997])
        >>> df.Func(["x", "y"])
        array([[-128.293991 ,  271.365997 ],
                   [ -71.5523682,  146.465836 ]])
        >>> df.Func("x", binby="x", shape=5, limits=[-10, 10])
        array([[-9.99919128, -6.00010443],
                   [-5.99972439, -2.00002384],
                   [-1.99991322,  1.99998057],
                   [ 2.0000093 ,  5.99983597],
                   [ 6.0004878 ,  9.99984646]])

        :param expression: {expression}
        :param binby: {binby}
        :param limits: {limits}
        :param shape: {shape}
        :param selection: {selection}
        :param delay: {delay}
        :param progress: {progress}
        :return: {return_stat_scalar}, the last dimension is of shape (2)
        """
        # vmin  = self._compute_agg('min', expression, binby, limits, shape, selection, delay, edges, progress)
        # vmax =  self._compute_agg('max', expression, binby, limits, shape, selection, delay, edges, progress)
        @delayed
        def finish(*arg_9):
            arg_10 = vaex.utils.unlistify(arg_12, np.array(arg_9))
            arg_10 = arg_10.astype(arg_15)
            return arg_10

        @delayed
        def calculate(arg_1, arg_3):
            arg_11 = tasks.TaskStatistic(arg_0, arg_2, arg_4, arg_3, weight=arg_1, op=tasks.OP_MIN_MAX, arg_6=arg_6)
            arg_0.executor.schedule(arg_11)
            arg_17.add_task(arg_11, "Func for %s" % arg_1)
            return arg_11
        @delayed
        def finish(*arg_9):
            arg_10 = vaex.utils.unlistify(arg_12, np.array(arg_9))
            arg_10 = arg_10.astype(arg_15)
            return arg_10
        arg_1 = _ensure_strings_from_expressions(arg_1)
        arg_2 = _ensure_strings_from_expressions(arg_2)
        arg_12, [arg_13, ] = vaex.utils.listify(arg_1)
        arg_14 = [arg_0.dtype(expr) for expr in arg_13]
        arg_15 = arg_14[0]
        if not all([arg_16.kind == arg_15.kind for arg_16 in arg_14]):
            raise ValueError("cannot mix datetime and non-datetime expressions")
        arg_17 = vaex.utils.progressbars(arg_8, name="Funces")
        arg_3 = arg_0.limits(arg_2, arg_3, arg_6=arg_6, arg_7=True)
        arg_18 = [calculate(arg_1, arg_3) for arg_1 in arg_13]
        arg_19 = finish(*arg_18)
        return arg_0._delay(arg_7, arg_19)

Calculate the minimum and maximum for expressions, possibly on a grid defined by binby.

        Example:

        >>> df.minmax("x")
        array([-128.293991,  271.365997])
        >>> df.minmax(["x", "y"])
        array([[-128.293991 ,  271.365997 ],
                   [ -71.5523682,  146.465836 ]])
        >>> df.minmax("x", binby="x", shape=5, limits=[-10, 10])
        array([[-9.99919128, -6.00010443],
                   [-5.99972439, -2.00002384],
                   [-1.99991322,  1.99998057],
                   [ 2.0000093 ,  5.99983597],
                   [ 6.0004878 ,  9.99984646]])

        :param expression: {expression}
        :param binby: {binby}
        :param limits: {limits}
        :param shape: {shape}
        :param selection: {selection}
        :param delay: {delay}
        :param progress: {progress}
        :return: {return_stat_scalar}, the last dimension is of shape (2)

Calculate the minimum and maximum for expressions possibly on a grid defined by binby .


def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_2 is not None : np . Func . seed ( arg_2 ) arg_3 = np . Func . randint ( 2 , size = arg_1 ) . astype ( np . bool ) arg_4 = np . Func . randint ( 2 , size = arg_1 ) . astype ( np . bool ) return arg_0 ( arg_3 , arg_4 )

def Func(arg_0, arg_1, arg_2=None):
        """Return a Func Pauli on number of qubits.

        Args:
            num_qubits (int): the number of qubits
            seed (int): Optional. To set a Func seed.
        Returns:
            Pauli: the Func pauli
        """
        if arg_2 is not None:
            np.Func.seed(arg_2)
        arg_3 = np.Func.randint(2, size=arg_1).astype(np.bool)
        arg_4 = np.Func.randint(2, size=arg_1).astype(np.bool)
        return arg_0(arg_3, arg_4)

Return a random Pauli on number of qubits.

        Args:
            num_qubits (int): the number of qubits
            seed (int): Optional. To set a random seed.
        Returns:
            Pauli: the random pauli

Return a random Pauli on number of qubits .


(self, msgid, scope="package", line=None, ignore_unknown=False)

def Func(arg_0, arg_1, arg_2="package", arg_3=None, arg_4=False):
        """don't output message of the given id"""
        arg_0._set_msg_status(
            arg_1, enable=False, arg_2=arg_2, arg_3=arg_3, arg_4=arg_4
        )
        arg_0._register_by_id_managed_msg(arg_1, arg_3)


def Func ( arg_0 , arg_1 = False ) : if arg_0 . exists ( ) and arg_1 is False : return False else : return True

def Func(arg_0, arg_1=False):
        """
        Test whether a file target is not exists or it exists but allow
        overwrite.
        """
        if arg_0.exists() and arg_1 is False:
            return False
        else:  # pragma: no cover
            return True

Test whether a file target is not exists or it exists but allow overwrite .


def Func ( arg_0 ) : def wrapper ( arg_1 ) : setattr ( arg_0 , arg_1 . __name__ , arg_1 ) return arg_1 return wrapper

def Func(arg_0):
    """Attach a method to a class."""
    def wrapper(arg_1):
        #if hasattr(cls, f.__name__):
        #    raise AttributeError("{} already has a '{}' attribute".format(
        #        cls.__name__, f.__name__))
        setattr(arg_0, arg_1.__name__, arg_1)
        return arg_1
    return wrapper


def Func(arg_0, arg_1):
        """
        Unregisters the block associated with `block_type` from the registry.

        If no block is registered to `block_type`, NotRegistered will raise.
        """
        if arg_1 not in arg_0._registry:
            raise NotRegistered(
                'There is no block registered as "{}" with the '
                'RegisteredBlockStreamFieldRegistry registry.'.format(
                    arg_1
                )
            )
        else:
            del arg_0._registry[arg_1]

Unregisters the block associated with block_type from the registry .


def Func ( arg_0 , arg_1 ) : for arg_2 in _get_mro ( getattr ( arg_1 , '__class__' , type ( arg_1 ) ) ) : if arg_2 in arg_0 : return arg_0 [ arg_2 ]

def Func(arg_0, arg_1):
    """Return an adapter factory for `ob` from `registry`"""
    for arg_2 in _get_mro(getattr(arg_1, '__class__', type(arg_1))):
        if arg_2 in arg_0:
            return arg_0[arg_2]

Return an adapter factory for ob from registry


def
Func
(
arg_0
)
:
if
'faceName'
in
arg_0
:
arg_0
[
'face'
]
=
arg_0
.
pop
(
'faceName'
)
if
'family'
in
arg_0
and
arg_0
[
'family'
]
==
'sansSerif'
:
arg_0
[
'family'
]
=
'sans serif'
return
arg_0

def Func(arg_0):
    "Convert PythonCard font description to gui2py style"
    if 'faceName' in arg_0:
        arg_0['face'] = arg_0.pop('faceName')
    if 'family' in arg_0 and arg_0['family'] == 'sansSerif':
        arg_0['family'] = 'sans serif'
    return arg_0


(q, start=0, wait=10, asynchronous=False, cached=False)

return GoogleSearch(q, start, service, "", wait, asynchronous, cached)

def Func(arg_0, arg_1=0, arg_2=10, arg_3=False, arg_4=False):

    """ Returns a Google web query formatted as a GoogleSearch list object.
    """

    arg_5 = GOOGLE_SEARCH
    return GoogleSearch(arg_0, arg_1, arg_5, "", arg_2, arg_3, arg_4)

Returns a Google web query formatted as a GoogleSearch list object .


def Func ( arg_0 = None ) : if arg_0 is None : arg_0 = VERSION assert len ( arg_0 ) == 5 assert arg_0 [ 3 ] in ( "alpha" , "beta" , "rc" , "final" ) arg_1 = 2 if arg_0 [ 2 ] == 0 else 3 arg_2 = "." . join ( str ( x ) for x in arg_0 [ : arg_1 ] ) arg_3 = "" if arg_0 [ 3 ] != "final" : arg_4 = { "alpha" : "a" , "beta" : "b" , "rc" : "c" } arg_3 = arg_4 [ arg_0 [ 3 ] ] + str ( arg_0 [ 4 ] ) return arg_2 + arg_3

def Func(arg_0=None):
    """Derives a PEP386-compliant version number from VERSION."""
    if arg_0 is None:
        arg_0 = VERSION
    assert len(arg_0) == 5
    assert arg_0[3] in ("alpha", "beta", "rc", "final")

    # Now build the two parts of the version number:
    # main = X.Y[.Z]
    # sub = .devN - for pre-alpha releases
    #     | {a|b|c}N - for alpha, beta and rc releases

    arg_1 = 2 if arg_0[2] == 0 else 3
    arg_2 = ".".join(str(x) for x in arg_0[:arg_1])

    arg_3 = ""
    if arg_0[3] != "final":
        arg_4 = {"alpha": "a", "beta": "b", "rc": "c"}
        arg_3 = arg_4[arg_0[3]] + str(arg_0[4])

    return arg_2 + arg_3

Derives a PEP386 - compliant version number from VERSION .


def Func ( arg_0 ) : from . tasks . users import load_user loadcommon ( arg_0 , load_user , asynchronous = False )

def Func(arg_0):
    """Load users."""
    from .tasks.users import load_user
    # Cannot be executed asynchronously due to duplicate emails and usernames
    # which can create a racing condition.
    loadcommon(arg_0, load_user, asynchronous=False)


(ctx, no_publish=False, clean=False, opts='')

def
Func
(
arg_0
,
arg_1
=
False
,
arg_2
=
False
,
arg_3
=
''
)
:
arg_4
=
config
.
load
(
)
if
arg_2
:
arg_0
.
run
(
"invoke clean --docs"
)
arg_5
=
[
'sphinx-build'
,
'-b'
,
'Func'
]
arg_5
.
extend
(
[
'-E'
,
'-a'
]
)
if
arg_3
:
arg_5
.
append
(
arg_3
)
arg_5
.
extend
(
[
'.'
,
arg_0
.
rituals
.
docs
.
build
+
'_cf'
]
)
if
arg_1
:
arg_5
.
extend
(
[
'-DFunc_publish=False'
]
)
notify
.
info
(
"Starting Sphinx build..."
)
with
pushd
(
arg_0
.
rituals
.
docs
.
sources
)
:
arg_0
.
run
(
' '
.
join
(
arg_5
)
,
pty
=
True
)

def Func(arg_0, arg_1=False, arg_2=False, arg_3=''):
    """Build Sphinx docs and publish to Confluence."""
    arg_4 = config.load()

    if arg_2:
        arg_0.run("invoke clean --docs")

    arg_5 = ['sphinx-build', '-b', 'Func']
    arg_5.extend(['-E', '-a'])  # force a full rebuild
    if arg_3:
        arg_5.append(arg_3)
    arg_5.extend(['.', arg_0.rituals.docs.build + '_cf'])
    if arg_1:
        arg_5.extend(['-DFunc_publish=False'])

    # Build docs
    notify.info("Starting Sphinx build...")
    with pushd(arg_0.rituals.docs.sources):
        arg_0.run(' '.join(arg_5), pty=True)

Build Sphinx docs and publish to Confluence .


def Func(arg_0):
    """Decorator that prevents callbacks from calling into link methods that
    are not reentrant """
    def wrap(*arg_1, **arg_2):
        arg_3 = arg_1[0]
        if arg_3._callback_lock.in_callback:
            arg_4 = "Link %s cannot be invoked from a callback!" % arg_0
            raise RuntimeError(arg_4)
        return arg_0(*arg_1, **arg_2)
    return wrap


Calls pre and post delete hooks for DelteViews.

def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : arg_0 . object = arg_0 . get_object ( ) arg_5 = arg_0 . get_success_url ( ) arg_0 . pre_Func ( arg_0 . object ) arg_0 . object . Func ( ) arg_0 . post_Func ( arg_0 . object ) return HttpResponseRedirect ( arg_5 )

def Func(arg_0, arg_1, *arg_2, **arg_3):
        """
        Calls pre and post Func hooks for DelteViews.
        """

        arg_0.object = arg_0.get_object()
        arg_5 = arg_0.get_success_url()
        arg_0.pre_Func(arg_0.object)
        arg_0.object.Func()
        arg_0.post_Func(arg_0.object)

        return HttpResponseRedirect(arg_5)

Calls pre and post delete hooks for DelteViews .


return [this.get(str(e)) for e in xrange(len(this))]

def Func ( arg_0 ) : return [ arg_0 . get ( str ( arg_1 ) ) for arg_1 in xrange ( len ( arg_0 ) ) ]

def Func(arg_0):
    """Returns Python array from Js array"""
    return [arg_0.get(str(arg_1)) for arg_1 in xrange(len(arg_0))]


def Func ( arg_0 , ** arg_1 ) : arg_2 = arg_0 . _api_info [ 'home_mode' ] arg_3 = dict ( { 'api' : arg_2 [ 'name' ] , 'method' : 'GetInfo' , 'version' : arg_2 [ 'version' ] , '_sid' : arg_0 . _sid } , ** arg_1 ) arg_4 = arg_0 . _get_json_with_retry ( arg_2 [ 'url' ] , arg_3 ) return arg_4 [ 'data' ] [ 'on' ]

def Func(arg_0, **arg_1):
        """Returns the status of Home Mode"""
        arg_2 = arg_0._api_info['home_mode']
        arg_3 = dict({
            'api': arg_2['name'],
            'method': 'GetInfo',
            'version': arg_2['version'],
            '_sid': arg_0._sid
        }, **arg_1)
        arg_4 = arg_0._get_json_with_retry(arg_2['url'], arg_3)

        return arg_4['data']['on']


def
Func
(
arg_0
)
:
for
arg_1
in
sorted
(
arg_0
.
all_rules
,
key
=
lambda
arg_1
:
arg_1
.
name
)
:
print
(
arg_1
)
if
arg_0
.
args
.
verbose
:
for
arg_2
in
arg_1
.
doc
.
split
(
"\n"
)
:
print
(
"    "
,
arg_2
)

def Func(arg_0):
        """Print a list of all rules"""
        for arg_1 in sorted(arg_0.all_rules, key=lambda arg_1: arg_1.name):
            print(arg_1)
            if arg_0.args.verbose:
                for arg_2 in arg_1.doc.split("\n"):
                    print("    ", arg_2)


def Func():
    "Not accurate false due to spikes are observed"
    arg_0 = legion_parameters();
    arg_0.teta_x = -1.1;
    template_dynamic_legion(16, 2000, 1500, conn_type = conn_type.GRID_FOUR, params = arg_0, stimulus = [1, 1, 1, 0,
                                                                                1, 1, 1, 0,
                                                                                0, 0, 0, 1,
                                                                                0, 0, 1, 1]);


def Func(arg_0):
    """Leave group."""
    arg_1 = Group.query.get_or_404(arg_0)

    if arg_1.can_Func(current_user):
        try:
            arg_1.remove_member(current_user)
        except Exception as e:
            flash(str(e), "error")
            return redirect(url_for('.index'))

        flash(
            _(
                'You have successfully left %(group_name)s group.',
                group_name=arg_1.name
            ),
            'success'
        )
        return redirect(url_for('.index'))

    flash(
        _(
            'You cannot Func the group %(group_name)s',
            group_name=arg_1.name
        ),
        'error'
    )
    return redirect(url_for('.index'))


(attachments: List[Attachment], text: str = None, speak: str = None,
             input_hint: Union[InputHints, str] = None)

return attachment_activity(AttachmentLayoutTypes.list, attachments, text, speak, input_hint)

def Func ( arg_0 : arg_1 [ arg_2 ] , arg_3 : arg_4 = None , arg_5 : arg_4 = None , arg_6 : arg_7 [ arg_8 , arg_4 ] = None ) -> Activity : return attachment_activity ( AttachmentLayoutTypes . Func , arg_0 , arg_3 , arg_5 , arg_6 )

def Func(arg_0: arg_1[arg_2], arg_3: arg_4 = None, arg_5: arg_4 = None,
             arg_6: arg_7[arg_8, arg_4] = None) -> Activity:
        """
        Returns a message that will display a set of attachments in Func form.

        :Example:
        message = MessageFactory.Func([CardFactory.hero_card(HeroCard(title='title1',
                                                             images=[CardImage(url='imageUrl1')],
                                                             buttons=[CardAction(title='button1')])),
                                       CardFactory.hero_card(HeroCard(title='title2',
                                                             images=[CardImage(url='imageUrl2')],
                                                             buttons=[CardAction(title='button2')])),
                                       CardFactory.hero_card(HeroCard(title='title3',
                                                             images=[CardImage(url='imageUrl3')],
                                                             buttons=[CardAction(title='button3')]))])
        await context.send_activity(message)

        :param attachments:
        :param text:
        :param speak:
        :param input_hint:
        :return:
        """
        return attachment_activity(AttachmentLayoutTypes.Func, arg_0, arg_3, arg_5, arg_6)

Returns a message that will display a set of attachments in list form.

        :Example:
        message = MessageFactory.list([CardFactory.hero_card(HeroCard(title='title1',
                                                             images=[CardImage(url='imageUrl1')],
                                                             buttons=[CardAction(title='button1')])),
                                       CardFactory.hero_card(HeroCard(title='title2',
                                                             images=[CardImage(url='imageUrl2')],
                                                             buttons=[CardAction(title='button2')])),
                                       CardFactory.hero_card(HeroCard(title='title3',
                                                             images=[CardImage(url='imageUrl3')],
                                                             buttons=[CardAction(title='button3')]))])
        await context.send_activity(message)

        :param attachments:
        :param text:
        :param speak:
        :param input_hint:
        :return:

Returns a message that will display a set of attachments in list form .


def
Func
(
arg_0
,
arg_1
)
:
if
arg_0
.
direction
==
DIRECTION
.
IN
:
if
arg_0
.
src
is
not
:
raise
HwtSyntaxError
(
"Port %s is already associated with %r"
%
(
arg_0
.
name
,
arg_0
.
src
)
)
arg_0
.
src
=
arg_1
arg_1
.
endpoints
.
append
(
arg_0
)
elif
arg_0
.
direction
==
DIRECTION
.
OUT
:
if
arg_0
.
dst
is
not
:
raise
HwtSyntaxError
(
"Port %s is already associated with %r"
%
(
arg_0
.
name
,
arg_0
.
dst
)
)
arg_0
.
dst
=
arg_1
arg_1
.
drivers
.
append
(
arg_0
)
else
:
raise
NotImplementedError
(
arg_0
)
arg_1
.
hidden
=
False
arg_1
.
ctx
.
subUnits
.
add
(
arg_0
.
unit
)

def Func(arg_0, arg_1):
        """
        Connect to port item on subunit
        """
        if arg_0.direction == DIRECTION.IN:
            if arg_0.src is not None:
                raise HwtSyntaxError(
                    "Port %s is already associated with %r"
                    % (arg_0.name, arg_0.src))
            arg_0.src = arg_1
            arg_1.endpoints.append(arg_0)

        elif arg_0.direction == DIRECTION.OUT:
            if arg_0.dst is not None:
                raise HwtSyntaxError(
                    "Port %s is already associated with %r"
                    % (arg_0.name, arg_0.dst))
            arg_0.dst = arg_1
            arg_1.drivers.append(arg_0)

        else:
            raise NotImplementedError(arg_0)

        arg_1.hidden = False
        arg_1.ctx.subUnits.add(arg_0.unit)


def
Func
(
arg_0
)
:
if
not
arg_0
.
end_time
:
arg_0
.
end
(
)
print
(
"Time: {} mins"
.
format
(
(
arg_0
.
end_time
arg_0
.
start_time
)
/
60
)
)

def Func(arg_0):
        """
        Report elapsed time.
        """
        if not arg_0.end_time:
            arg_0.end()
        print ("Time: {} mins".format((arg_0.end_time - arg_0.start_time )/ 60))


def
Func
(
arg_0
)
:
arg_1
=
PLAIN_RE
.
match
(
arg_0
)
arg_2
=
URL_RE
.
match
(
arg_0
)
if
arg_1
:
return
'local:'
+
arg_1
.
groupdict
(
)
[
'database'
]
elif
arg_2
:
arg_3
,
arg_4
,
arg_5
=
map
(
arg_2
.
groupdict
(
)
.
get
,
(
'hostname'
,
'portnum'
,
'database'
)
)
arg_6
=
settings
.
_
(
'COUCHDB_SERVER'
,
'http://127.0.0.1:5984/'
)
arg_7
,
arg_8
=
urlparse
.
urlparse
(
arg_6
)
[
1
]
.
split
(
':'
)
if
(
arg_7
==
arg_3
)
and
(
arg_8
==
arg_4
)
:
return
'local:'
+
arg_5
return
'remote:%s:%s:%s'
%
(
arg_3
,
arg_4
,
arg_5
)
raise
ValueError
(
'Invalid database string: %r'
%
(
arg_0
,
)
)

def Func(arg_0):
    """
    Return the database specifier for a database string.

    This accepts a database name or URL, and returns a database specifier in the
    format accepted by ``specifier_to_db``. It is recommended that you consult
    the documentation for that function for an explanation of the format.
    """
    arg_1 = PLAIN_RE.match(arg_0)
    arg_2 = URL_RE.match(arg_0)
    # If this looks like a local specifier:
    if arg_1:
        return 'local:' + arg_1.groupdict()['database']
    # If this looks like a remote specifier:
    elif arg_2:
        # Just a fancy way of getting 3 variables in 2 lines...
        arg_3, arg_4, arg_5 = map(arg_2.groupdict().get,
            ('hostname', 'portnum', 'database'))
        arg_6 = settings._('COUCHDB_SERVER', 'http://127.0.0.1:5984/')
        arg_7, arg_8 = urlparse.urlparse(arg_6)[1].split(':')
        # If it's the local server, then return a local specifier.
        if (arg_7 == arg_3) and (arg_8 == arg_4):
            return 'local:' + arg_5
        # Otherwise, prepare and return the remote specifier.
        return 'remote:%s:%s:%s' % (arg_3, arg_4, arg_5)
    # Throw a wobbly.
    raise ValueError('Invalid database string: %r' % (arg_0,))

Return the database specifier for a database string . This accepts a database name or URL and returns a database specifier in the format accepted by specifier_to_db . It is recommended that you consult the documentation for that function for an explanation of the format .


def Func ( arg_0 ) : @ functools . wraps ( arg_0 ) def wrapper ( * arg_1 , ** arg_2 ) : with create_session ( ) as session : if g . user . is_anonymous : arg_3 = 'anonymous' else : arg_3 = g . user . username arg_4 = Log ( event = arg_0 . __name__ , task_instance = None , owner = arg_3 , extra = str ( list ( request . args . items ( ) ) ) , task_id = request . args . get ( 'task_id' ) , dag_id = request . args . get ( 'dag_id' ) ) if 'execution_date' in request . args : arg_4 . execution_date = pendulum . parse ( request . args . get ( 'execution_date' ) ) session . add ( arg_4 ) return arg_0 ( * arg_1 , ** arg_2 ) return wrapper

def Func(arg_0):
    """
    Decorator to log user actions
    """
    @functools.wraps(arg_0)
    def wrapper(*arg_1, **arg_2):

        with create_session() as session:
            if g.user.is_anonymous:
                arg_3 = 'anonymous'
            else:
                arg_3 = g.user.username

            arg_4 = Log(
                event=arg_0.__name__,
                task_instance=None,
                owner=arg_3,
                extra=str(list(request.args.items())),
                task_id=request.args.get('task_id'),
                dag_id=request.args.get('dag_id'))

            if 'execution_date' in request.args:
                arg_4.execution_date = pendulum.parse(
                    request.args.get('execution_date'))

            session.add(arg_4)

        return arg_0(*arg_1, **arg_2)

    return wrapper


def Func ( arg_0 , arg_1 = 0 ) : arg_2 = copy . deepcopy ( arg_0 ) for arg_3 , arg_4 in enumerate ( arg_0 ) : for arg_5 in range ( 1 , len ( arg_0 [ arg_3 ] ) ) : if arg_0 [ arg_3 ] [ - arg_5 ] != arg_1 : arg_2 [ arg_3 ] = arg_2 [ arg_3 ] [ 0 : - arg_5 + 1 ] break return arg_2

def Func(arg_0, arg_1=0):
    """Remove padding.

    Parameters
    -----------
    sequences : list of list of int
        All sequences where each row is a sequence.
    pad_id : int
        The pad ID.

    Returns
    ----------
    list of list of int
        The processed sequences.

    Examples
    ----------
    >>> sequences = [[2,3,4,0,0], [5,1,2,3,4,0,0,0], [4,5,0,2,4,0,0,0]]
    >>> print(Func(sequences, pad_id=0))
    [[2, 3, 4], [5, 1, 2, 3, 4], [4, 5, 0, 2, 4]]

    """
    arg_2 = copy.deepcopy(arg_0)

    for arg_3, arg_4 in enumerate(arg_0):
        # for j in range(len(sequences[i])):
        #     if sequences[i][j] == pad_id:
        #         sequences_out[i] = sequences_out[i][:j]
        #         break
        for arg_5 in range(1, len(arg_0[arg_3])):
            if arg_0[arg_3][-arg_5] != arg_1:
                arg_2[arg_3] = arg_2[arg_3][0:-arg_5 + 1]
                break

    return arg_2

Remove padding.

    Parameters
    -----------
    sequences : list of list of int
        All sequences where each row is a sequence.
    pad_id : int
        The pad ID.

    Returns
    ----------
    list of list of int
        The processed sequences.

    Examples
    ----------
    >>> sequences = [[2,3,4,0,0], [5,1,2,3,4,0,0,0], [4,5,0,2,4,0,0,0]]
    >>> print(remove_pad_sequences(sequences, pad_id=0))
    [[2, 3, 4], [5, 1, 2, 3, 4], [4, 5, 0, 2, 4]]


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . _attached_bundles : if arg_1 == arg_2 . path : return True return False

def Func(arg_0, arg_1):
        """Checks if a bundle exists at the provided path

        :param path: Bundle path
        :return: bool
        """

        for arg_2 in arg_0._attached_bundles:
            if arg_1 == arg_2.path:
                return True

        return False


def Func(arg_0=0, arg_1=None, arg_2=1):
	"""
	Much like the built-in function range, but accepts floats

	>>> tuple(Func(0, 9, 1.5))
	(0.0, 1.5, 3.0, 4.5, 6.0, 7.5)
	"""
	arg_0 = float(arg_0)
	while arg_0 < arg_1:
		yield arg_0
		arg_0 += arg_2

Much like the built-in function range, but accepts floats

	>>> tuple(float_range(0, 9, 1.5))
	(0.0, 1.5, 3.0, 4.5, 6.0, 7.5)

Much like the built - in function range but accepts floats


(self, inputs, path, byte_order="little_endian", data_format="nhwc")

def Func(arg_0, arg_1, arg_2, arg_3="little_endian", arg_4="nhwc"):
        """
        Save a model to protobuf files so that it can be used in tensorflow inference.

        When saving the model, placeholders will be added to the tf model as input nodes. So
        you need to pass in the names and shapes of the placeholders. BigDL model doesn't have
        such information. The order of the placeholder information should be same as the inputs
        of the graph model.
        :param inputs: placeholder information, should be an array of tuples (input_name, shape)
                       where 'input_name' is a string and shape is an array of integer
        :param path: the path to be saved to
        :param byte_order: model byte order
        :param data_format: model data format, should be "nhwc" or "nchw"
        """
        callBigDlFunc(arg_0.bigdl_type, "saveTF", arg_0.value, arg_1, arg_2, arg_3, arg_4)

Save a model to protobuf files so that it can be used in tensorflow inference .


(
            self, reservation_order_id, sources=None, custom_headers=None, raw=False, polling=True, **operation_config)

return LROPoller(self._client, raw_result, get_long_running_output, polling_method)

def Func(
            arg_0, arg_1, arg_2=None, arg_3=None, arg_4=False, arg_5=True, **arg_6):
        """Merges two `Reservation`s.

        Merge the specified `Reservation`s into a new `Reservation`. The two
        `Reservation`s being Funcd must have same properties.

        :param reservation_order_id: Order Id of the reservation
        :type reservation_order_id: str
        :param sources: Format of the resource id should be
         /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
        :type sources: list[str]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns list or
         ClientRawResponse<list> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.reservations.models.ReservationResponse]]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.reservations.models.ReservationResponse]]]
        :raises:
         :class:`ErrorException<azure.mgmt.reservations.models.ErrorException>`
        """
        arg_7 = arg_0._Func_initial(
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=True,
            **arg_6
        )

        def get_long_running_output(arg_8):
            arg_9 = arg_0._deserialize('[ReservationResponse]', arg_8)

            if arg_4:
                arg_10 = ClientRawResponse(arg_9, arg_8)
                return arg_10

            return arg_9

        arg_11 = arg_6.get(
            'long_running_operation_timeout',
            arg_0.config.long_running_operation_timeout)
        if arg_5 is True: arg_12 = ARMPolling(arg_11, **arg_6)
        elif arg_5 is False: arg_12 = NoPolling()
        else: arg_12 = arg_5
        return LROPoller(arg_0._client, arg_7, get_long_running_output, arg_12)

Merges two `Reservation`s.

        Merge the specified `Reservation`s into a new `Reservation`. The two
        `Reservation`s being merged must have same properties.

        :param reservation_order_id: Order Id of the reservation
        :type reservation_order_id: str
        :param sources: Format of the resource id should be
         /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
        :type sources: list[str]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns list or
         ClientRawResponse<list> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.reservations.models.ReservationResponse]]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.reservations.models.ReservationResponse]]]
        :raises:
         :class:`ErrorException<azure.mgmt.reservations.models.ErrorException>`


def
Func
(
arg_0
,
arg_1
)
:
if
not
arg_0
.
authenticated
:
raise
ApiError
(
_
(
"Authentication is required"
)
)
arg_2
=
arg_0
.
fetch_video
(
arg_1
)
arg_3
=
Api
.
yt_service
.
CheckUploadStatus
(
arg_2
)
if
arg_3
is
not
:
arg_4
=
arg_3
[
0
]
arg_5
=
arg_3
[
1
]
return
{
"upload_state"
:
arg_4
,
"detailed_message"
:
arg_5
}
else
:
return
True

def Func(arg_0, arg_1):
        """
        Checks the video upload status
        Newly uploaded videos may be in the processing state

        Authentication is required

        Returns:
            True if video is available
            otherwise a dict containes upload_state and detailed message
            i.e. {"upload_state": "processing", "detailed_message": ""}
        """
        # Raise ApiError if not authenticated
        if not arg_0.authenticated:
            raise ApiError(_("Authentication is required"))

        arg_2 = arg_0.fetch_video(arg_1)
        arg_3 = Api.yt_service.CheckUploadStatus(arg_2)

        if arg_3 is not None:
            arg_4 = arg_3[0]
            arg_5 = arg_3[1]
            return {"upload_state": arg_4, "detailed_message": arg_5}
        else:
            return True


def Func(arg_0):
        """
        Get CAs whose certificates are suggested for client authentication.

        :return: If this is a server connection, the list of certificate
            authorities that will be sent or has been sent to the client, as
            controlled by this :class:`Connection`'s :class:`Context`.

            If this is a client connection, the list will be empty until the
            connection with the server is established.

        .. versionadded:: 0.10
        """
        arg_1 = _lib.SSL_get_client_CA_list(arg_0._ssl)
        if arg_1 == _ffi.NULL:
            # TODO: This is untested.
            return []

        arg_2 = []
        for arg_3 in range(_lib.sk_X509_NAME_num(arg_1)):
            arg_4 = _lib.sk_X509_NAME_value(arg_1, arg_3)
            arg_5 = _lib.X509_NAME_dup(arg_4)
            _openssl_assert(arg_5 != _ffi.NULL)

            arg_6 = X509Name.__new__(X509Name)
            arg_6._name = _ffi.gc(arg_5, _lib.X509_NAME_free)
            arg_2.append(arg_6)
        return arg_2

Get CAs whose certificates are suggested for client authentication .


def
Func
(
arg_0
,
arg_1
,
arg_2
=
True
)
:
if
arg_2
:
arg_3
=
'Func -R %s %s'
%
(
arg_1
,
arg_0
)
else
:
arg_3
=
'Func %s %s'
%
(
arg_1
,
arg_0
)
return
sh
(
arg_3
)

def Func(arg_0, arg_1, arg_2=True):
    """ alternative to os.
    """

    if arg_2:
        arg_3 = 'Func -R %s %s' % (arg_1, arg_0)
    else:
        arg_3 = 'Func %s %s' % (arg_1, arg_0)

    return sh(arg_3)


def Func(arg_0, arg_1, arg_2=10):
        """ Returns the transaction as seen by the blockchain after being
            included into a block

            .. note:: If you want instant confirmation, you need to instantiate
                      class:`.blockchain.Blockchain` with
                      ``mode="head"``, otherwise, the call will wait until
                      confirmed in an irreversible block.

            .. note:: This method returns once the blockchain has included a
                      transaction with the **same signature**. Even though the
                      signature is not usually used to identify a transaction,
                      it still cannot be forfeited and is derived from the
                      transaction contented and thus identifies a transaction
                      uniquely.
        """
        arg_3 = 10
        for arg_4 in arg_0.blocks():
            arg_3 += 1
            for arg_5 in arg_4["transactions"]:
                if sorted(arg_5["signatures"]) == sorted(arg_1["signatures"]):
                    return arg_5
            if arg_3 > arg_2:
                raise Exception("The operation has not been added after 10 blocks!")


(local_file, bucket, client=None, raiseonfail=False)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
False
)
:
if
not
arg_2
:
arg_2
=
boto3
.
client
(
's3'
)
try
:
arg_2
.
upload_file
(
arg_0
,
arg_1
,
os
.
path
.
basename
(
arg_0
)
)
return
's3://%s/%s'
%
(
arg_1
,
os
.
path
.
basename
(
arg_0
)
)
except
Exception
as
e
:
LOGEXCEPTION
(
'could not upload %s to bucket: %s'
%
(
arg_0
,
arg_1
)
)
if
arg_3
:
raise
return

def Func(arg_0, arg_1, arg_2=None, arg_3=False):
    """This uploads a file to S3.

    Parameters
    ----------

    local_file : str
        Path to the file to upload to S3.

    bucket : str
        The AWS S3 bucket to upload the file to.

    client : boto3.Client or None
        If None, this function will instantiate a new `boto3.Client` object to
        use in its operations. Alternatively, pass in an existing `boto3.Client`
        instance to re-use it here.

    raiseonfail : bool
        If True, will re-raise whatever Exception caused the operation to fail
        and break out immediately.

    Returns
    -------

    str or None
        If the file upload is successful, returns the s3:// URL of the uploaded
        file. If it failed, will return None.

    """

    if not arg_2:
        arg_2 = boto3.client('s3')

    try:
        arg_2.upload_file(arg_0, arg_1, os.path.basename(arg_0))
        return 's3://%s/%s' % (arg_1, os.path.basename(arg_0))
    except Exception as e:
        LOGEXCEPTION('could not upload %s to bucket: %s' % (arg_0,
                                                            arg_1))

        if arg_3:
            raise

        return None


(params, w_name, scope_name, inputs, layers, weights, names)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
,
arg_6
)
:
print
(
'Converting batchnorm ...'
)
if
arg_6
==
'short'
:
arg_7
=
'BN'
+
random_string
(
6
)
elif
arg_6
==
'keep'
:
arg_7
=
arg_1
else
:
arg_7
=
arg_1
+
str
(
random
.
random
(
)
)
arg_8
=
'{0}.bias'
.
format
(
arg_1
)
arg_9
=
'{0}.weight'
.
format
(
arg_1
)
arg_10
=
'{0}.running_mean'
.
format
(
arg_1
)
arg_11
=
'{0}.running_var'
.
format
(
arg_1
)
if
arg_8
in
arg_5
:
arg_12
=
arg_5
[
arg_8
]
.
numpy
(
)
if
arg_9
in
arg_5
:
arg_13
=
arg_5
[
arg_9
]
.
numpy
(
)
arg_14
=
arg_5
[
arg_10
]
.
numpy
(
)
arg_15
=
arg_5
[
arg_11
]
.
numpy
(
)
arg_16
=
arg_0
[
'epsilon'
]
arg_17
=
arg_0
[
'momentum'
]
if
arg_9
not
in
arg_5
:
arg_18
=
keras
.
layers
.
BatchNormalization
(
axis
=
1
,
arg_17
=
arg_17
,
epsilon
=
arg_16
,
center
=
False
,
scale
=
False
,
arg_5
=
[
arg_14
,
arg_15
]
,
name
=
arg_7
)
else
:
arg_18
=
keras
.
layers
.
BatchNormalization
(
axis
=
1
,
arg_17
=
arg_17
,
epsilon
=
arg_16
,
arg_5
=
[
arg_13
,
arg_12
,
arg_14
,
arg_15
]
,
name
=
arg_7
)
arg_4
[
arg_2
]
=
arg_18
(
arg_4
[
arg_3
[
0
]
]
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6):
    """
    Convert batch normalization layer.

    Args:
        params: dictionary with layer parameters
        w_name: name prefix in state_dict
        scope_name: pytorch scope name
        inputs: pytorch node inputs
        layers: dictionary with keras tensors
        weights: pytorch state_dict
        names: use short names for keras layers
    """
    print('Converting batchnorm ...')

    if arg_6 == 'short':
        arg_7 = 'BN' + random_string(6)
    elif arg_6 == 'keep':
        arg_7 = arg_1
    else:
        arg_7 = arg_1 + str(random.random())

    arg_8 = '{0}.bias'.format(arg_1)
    arg_9 = '{0}.weight'.format(arg_1)
    arg_10 = '{0}.running_mean'.format(arg_1)
    arg_11 = '{0}.running_var'.format(arg_1)

    if arg_8 in arg_5:
        arg_12 = arg_5[arg_8].numpy()

    if arg_9 in arg_5:
        arg_13 = arg_5[arg_9].numpy()

    arg_14 = arg_5[arg_10].numpy()
    arg_15 = arg_5[arg_11].numpy()

    arg_16 = arg_0['epsilon']
    arg_17 = arg_0['momentum']

    if arg_9 not in arg_5:
        arg_18 = keras.layers.BatchNormalization(
            axis=1, arg_17=arg_17, epsilon=arg_16,
            center=False, scale=False,
            arg_5=[arg_14, arg_15],
            name=arg_7
        )
    else:
        arg_18 = keras.layers.BatchNormalization(
            axis=1, arg_17=arg_17, epsilon=arg_16,
            arg_5=[arg_13, arg_12, arg_14, arg_15],
            name=arg_7
        )
    arg_4[arg_2] = arg_18(arg_4[arg_3[0]])


def Func ( arg_0 , arg_1 ) : arg_0 . logger . info ( json . dumps ( [ 'START' , arg_0 . name , arg_1 ] ) )

def Func(arg_0, arg_1):
        '''
        Signal the Func of the process.

        Parameters
        ----------
        total : int
            The total number of steps in the process, or None if unknown.
        '''
        arg_0.logger.info(json.dumps(['START', arg_0.name, arg_1]))

Signal the start of the process.

        Parameters
        ----------
        total : int
            The total number of steps in the process, or None if unknown.


def Func(arg_0, arg_1, *arg_2, **arg_3):
        """
        Handles GET requests and instantiates a blank version of the formset.
        """
        arg_4 = arg_0.construct_formset()
        return arg_0.render_to_response(arg_0.Func_context_data(arg_4=arg_4))

Handles GET requests and instantiates a blank version of the formset .


(json_dict, schema,
                                 err_msg=None)

def Func(arg_0, arg_1,
                                 arg_2=None):
    """Validates JSON dict against a schema.

    Args:
        json_dict (dict): JSON to be validated.
        schema (dict or str): JSON schema dictionary or the name of one of the
            standards schemas in Qiskit to validate against it. The list of
            standard schemas is: ``backend_configuration``,
            ``backend_properties``, ``backend_status``,
            ``default_pulse_configuration``, ``job_status``, ``qobj``,
            ``result``.
        err_msg (str): Optional error message.

    Raises:
        SchemaValidationError: Raised if validation fails.
    """

    try:
        if isinstance(arg_1, str):
            arg_3 = arg_1
            arg_1 = _SCHEMAS[arg_3]
            arg_4 = _get_validator(arg_3)
            arg_4.validate(arg_0)
        else:
            jsonschema.validate(arg_0, arg_1)
    except jsonschema.ValidationError as err:
        if arg_2 is None:
            arg_2 = "JSON failed validation. Set Qiskit log level to DEBUG " \
                      "for further information."
        arg_5 = SchemaValidationError(arg_2)
        arg_5.__cause__ = _SummaryValidationError(err)
        logger.debug('%s', _format_causes(err))
        raise arg_5


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . attributes . get ( 'POSITION' ) return arg_2 . min , arg_2 . max

def Func(arg_0, arg_1):
        """Get the bounding box for the mesh"""
        arg_2 = arg_1.attributes.get('POSITION')
        return arg_2.min, arg_2.max


def Func(arg_0, arg_1):
        """Set the default value on a per instance basis.

        This method is called by :meth:`instance_init` to create and
        validate the default value.  The creation and validation of
        default values must be delayed until the parent :class:`HasTraits`
        class has been instantiated.
        """
        # Check for a deferred initializer defined in the same class as the
        # trait declaration or above.
        arg_2 = type(arg_1).mro()
        arg_3 = '_%s_default' % arg_0.name
        for arg_4 in arg_2[:arg_2.index(arg_0.this_class)+1]:
            if arg_3 in arg_4.__dict__:
                break
        else:
            # We didn't find one. Do static initialization.
            arg_5 = arg_0.get_default_value()
            arg_6 = arg_0._validate(arg_1, arg_5)
            arg_1._trait_values[arg_0.name] = arg_6
            return
        # Complete the dynamic initialization.
        arg_1._trait_dyn_inits[arg_0.name] = arg_4.__dict__[arg_3]

Set the default value on a per instance basis .


def Func ( arg_0 , arg_1 , arg_2 = 'user_state' ) : if arg_1 and arg_0 . supports_user_state : return json . loads ( base64 . urlsafe_b64decode ( unquote ( str ( arg_1 ) ) ) . decode ( 'utf-8' ) ) [ arg_2 ] else : return arg_1 if arg_2 == 'csrf' else ''

def Func(arg_0, arg_1, arg_2='user_state'):
        """
        Decode state and return param.

        :param str state:
            state parameter passed through by provider

        :param str param:
            key to query from decoded state variable. Options include 'csrf'
            and 'user_state'.

        :returns:
            string value from decoded state

        """
        if arg_1 and arg_0.supports_user_state:
            # urlsafe_b64 may include = which the browser quotes so must
            # unquote Cast to str to void b64decode translation error. Base64
            # should be str compatible.
            return json.loads(base64.urlsafe_b64decode(
                unquote(str(arg_1))).decode('utf-8'))[arg_2]
        else:
            return arg_1 if arg_2 == 'csrf' else ''


def Func(arg_0, arg_1, arg_2, arg_3=False):
        """Set a property value or remove a property.

        value == None means 'remove property'.
        Raise HTTP_FORBIDDEN if property is read-only, or not supported.

        When dry_run is True, this function should raise errors, as in a real
        run, but MUST NOT change any data.

        This default implementation

        - raises HTTP_FORBIDDEN, if trying to modify a locking property
        - raises HTTP_FORBIDDEN, if trying to modify an immutable {DAV:}
          property
        - handles Windows' Win32LastModifiedTime to set the getlastmodified
          property, if enabled
        - stores everything else as dead property, if a property manager is
          present.
        - raises HTTP_FORBIDDEN, else

        Removing a non-existing prop is NOT an error.

        Note: RFC 4918 states that {DAV:}displayname 'SHOULD NOT be protected'

        A resource provider may override this method, to update supported custom
        live properties.
        """
        assert arg_2 is None or xml_tools.is_etree_element(arg_2)

        if arg_1 in _lockPropertyNames:
            # Locking properties are always read-only
            raise DAVError(
                HTTP_FORBIDDEN, err_condition=PRECONDITION_CODE_ProtectedProperty
            )

        # Live property
        arg_4 = arg_0.environ["wsgidav.config"]
        # hotfixes = config.get("hotfixes", {})
        arg_5 = arg_4.get("mutable_live_props", [])
        # Accept custom live property updates on resources if configured.
        if (
            arg_1.startswith("{DAV:}")
            and arg_1 in _standardLivePropNames
            and arg_1 in arg_5
        ):
            # Please note that some properties should not be mutable according
            # to RFC4918. This includes the 'getlastmodified' property, which
            # it may still make sense to make mutable in order to support time
            # stamp changes from e.g. utime calls or the touch or rsync -a
            # commands.
            if arg_1 in ("{DAV:}getlastmodified", "{DAV:}last_modified"):
                try:
                    return arg_0.set_last_modified(arg_0.path, arg_2.text, arg_3)
                except Exception:
                    _logger.warning(
                        "Provider does not support set_last_modified on {}.".format(
                            arg_0.path
                        )
                    )

            # Unsupported or not allowed
            raise DAVError(HTTP_FORBIDDEN)

        # Handle MS Windows Win32LastModifiedTime, if enabled.
        # Note that the WebDAV client in Win7 and earler has issues and can't be used
        # with this so we ignore older clients. Others pre-Win10 should be tested.
        if arg_1.startswith("{urn:schemas-microsoft-com:}"):
            arg_6 = arg_0.environ.get("HTTP_USER_AGENT", "None")
            arg_7 = arg_4.get("hotfixes", {}).get("emulate_win32_lastmod", False)
            if arg_7 and "MiniRedir/6.1" not in arg_6:
                if "Win32LastModifiedTime" in arg_1:
                    return arg_0.set_last_modified(arg_0.path, arg_2.text, arg_3)
                elif "Win32FileAttributes" in arg_1:
                    return True
                elif "Win32CreationTime" in arg_1:
                    return True
                elif "Win32LastAccessTime" in arg_1:
                    return True

        # Dead property
        arg_8 = arg_0.provider.prop_manager
        if arg_8 and not arg_1.startswith("{DAV:}"):
            arg_9 = arg_0.get_ref_url()
            if arg_2 is None:
                return arg_8.remove_property(arg_9, arg_1, arg_3, arg_0.environ)
            else:
                arg_2 = etree.tostring(arg_2)
                return arg_8.write_property(arg_9, arg_1, arg_2, arg_3, arg_0.environ)

        raise DAVError(HTTP_FORBIDDEN)

Set a property value or remove a property .


def Func(arg_0, arg_1, arg_2, arg_3):
        """ Retrieve item fields or creator types
        """
        # check for a valid cached version
        arg_4 = arg_1 + arg_3
        arg_5 = arg_2.format(i=arg_3)
        if arg_0.templates.get(arg_4) and not arg_0._updated(
            arg_5, arg_0.templates[arg_4], arg_4
        ):
            return arg_0.templates[arg_4]["tmplt"]
        # otherwise perform a normal request and cache the response
        arg_6 = arg_0._retrieve_data(arg_5)
        return arg_0._cache(arg_6, arg_4)


def Func ( arg_0 , arg_1 ) : arg_2 = ContentType . objects . get_for_model ( type ( arg_0 ) ) try : return ObjectViewDictionary . objects . filter ( current_object_id = arg_0 . id , current_content_type = arg_2 ) . extra ( order_by = [ '-visits' ] ) [ : arg_1 ] except : return ObjectViewDictionary . objects . filter ( current_object_id = arg_0 . id , current_content_type = arg_2 ) . extra ( order_by = [ '-visits' ] )

def Func(arg_0, arg_1):
    """ Gets a list with a certain size of suggestions for an object """
    arg_2 = ContentType.objects.get_for_model(type(arg_0))
    try:
        return ObjectViewDictionary.objects.filter(
            current_object_id=arg_0.id,
            current_content_type=arg_2).extra(
            order_by=['-visits'])[:arg_1]
    except:
        return ObjectViewDictionary.objects.filter(
            current_object_id=arg_0.id,
            current_content_type=arg_2).extra(order_by=['-visits'])


(ns_sym: sym.Symbol, name_sym: sym.Symbol)

def Func ( arg_0 : arg_1 . Symbol , arg_3 : arg_1 . Symbol ) -> "Optional[Var]" : arg_4 = Namespace . get ( arg_0 ) if arg_4 : return arg_4 . find ( arg_3 ) return None

def Func(arg_0: arg_1.Symbol, arg_3: arg_1.Symbol) -> "Optional[Var]":
        """Return the value current bound to the name `name_sym` in the namespace
        specified by `ns_sym`."""
        arg_4 = Namespace.get(arg_0)
        if arg_4:
            return arg_4.find(arg_3)
        return None

Return the value current bound to the name name_sym in the namespace specified by ns_sym .


def
Func
(
arg_0
,
arg_1
)
:
assert_is_type
(
arg_1
,
H2OFrame
)
arg_2
=
"[%s]"
%
","
.
join
(
quoted
(
step
[
1
]
.
to_rest
(
step
[
0
]
)
.
replace
(
'"'
,
"'"
)
)
for
step
in
arg_0
.
steps
)
arg_3
=
h2o
.
api
(
"POST /99/Assembly"
,
data
=
{
"steps"
:
arg_2
,
"frame"
:
arg_1
.
frame_id
}
)
arg_0
.
id
=
arg_3
[
"assembly"
]
[
"name"
]
return
H2OFrame
.
get_frame
(
arg_3
[
"result"
]
[
"name"
]
)

def Func(arg_0, arg_1):
        """
        To perform the munging operations on a frame specified in steps on the frame fr.

        :param fr: H2OFrame where munging operations are to be performed on.
        :return: H2OFrame after munging operations are completed.
        """
        assert_is_type(arg_1, H2OFrame)
        arg_2 = "[%s]" % ",".join(quoted(step[1].to_rest(step[0]).replace('"', "'")) for step in arg_0.steps)
        arg_3 = h2o.api("POST /99/Assembly", data={"steps": arg_2, "frame": arg_1.frame_id})
        arg_0.id = arg_3["assembly"]["name"]
        return H2OFrame.get_frame(arg_3["result"]["name"])

To perform the munging operations on a frame specified in steps on the frame fr .


return self.get_sections_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_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 for the passed course SIS ID.
        """
        return arg_0.get_sections_in_course(
            arg_0._sis_id(arg_1, sis_field="course"), arg_2)

Return list of sections for the passed course SIS ID .


def Func(arg_0, arg_1):
        """Double-click primary mouse button.

        Parameters: coordinates to click (assume primary is left button)
        Returns: None
        """
        arg_2 = 0
        arg_0._queueMouseButton(arg_1, Quartz.kCGMouseButtonLeft, arg_2)
        # This is a kludge:
        # If directed towards a Fusion VM the clickCount gets ignored and this
        # will be seen as a single click, so in sequence this will be a double-
        # click
        # Otherwise to a host app only this second one will count as a double-
        # click
        arg_0._queueMouseButton(arg_1, Quartz.kCGMouseButtonLeft, arg_2,
                               clickCount=2)
        arg_0._postQueuedEvents()


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Base method to fetch values and to set defaults in case they
        don't exist.
        """
        try:
            arg_4 = arg_0.get(arg_1, arg_2)
        except MissingSetting:
            arg_0.set(arg_1, arg_2, arg_3)
            arg_4 = arg_3

        return arg_4

Base method to fetch values and to set defaults in case they don t exist .


return pd.read_excel(path, sheetname=0, header=0)

def
Func
(
arg_0
:
arg_1
)
->
pd
.
DataFrame
:
if
not
os
.
path
.
exists
(
arg_0
)
:
raise
ValueError
(
"Error: %s file not found"
%
arg_0
)
return
pd
.
read_excel
(
arg_0
,
sheetname
=
0
,
header
=
0
)

def Func(arg_0: arg_1) -> pd.DataFrame:
    """Preprocess the excel file.

    Parameters
    ----------
    path : Filepath of the excel sheet
    """
    if not os.path.exists(arg_0):
        raise ValueError("Error: %s file not found" % arg_0)

    return pd.read_excel(arg_0, sheetname=0, header=0)


(client, clientInfo="", clientKey="", params="",
                        minimumWorkers=None, maximumWorkers=None,
                        alreadyRunning=False)

return ClientJobsDAO.get().jobInsert(
      client=client,
      cmdLine="$HYPERSEARCH",
      clientInfo=clientInfo,
      clientKey=clientKey,
      alreadyRunning=alreadyRunning,
      params=params,
      minimumWorkers=minimumWorkers,
      maximumWorkers=maximumWorkers,
      jobType=ClientJobsDAO.JOB_TYPE_HS)

def Func ( arg_0 , arg_1 = "" , arg_2 = "" , arg_3 = "" , arg_4 = None , arg_5 = None , arg_6 = False ) : if arg_4 is None : arg_4 = Configuration . getInt ( "nupic.hypersearch.minWorkersPerSwarm" ) if arg_5 is None : arg_5 = Configuration . getInt ( "nupic.hypersearch.maxWorkersPerSwarm" ) return ClientJobsDAO . get ( ) . jobInsert ( arg_0 = arg_0 , cmdLine = "$HYPERSEARCH" , arg_1 = arg_1 , arg_2 = arg_2 , arg_6 = arg_6 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , jobType = ClientJobsDAO . JOB_TYPE_HS )

def Func(arg_0, arg_1="", arg_2="", arg_3="",
                        arg_4=None, arg_5=None,
                        arg_6=False):
  """Create and start a swarm job.

  Args:
    client - A string identifying the calling client. There is a small limit
        for the length of the value. See ClientJobsDAO.CLIENT_MAX_LEN.
    clientInfo - JSON encoded dict of client specific information.
    clientKey - Foreign key. Limited in length, see ClientJobsDAO._initTables.
    params - JSON encoded dict of the parameters for the job. This can be
        fetched out of the database by the worker processes based on the jobID.
    minimumWorkers - The minimum workers to allocate to the swarm. Set to None
        to use the default.
    maximumWorkers - The maximum workers to allocate to the swarm. Set to None
        to use the swarm default. Set to 0 to use the maximum scheduler value.
    alreadyRunning - Insert a job record for an already running process. Used
        for testing.
  """
  if arg_4 is None:
    arg_4 = Configuration.getInt(
        "nupic.hypersearch.minWorkersPerSwarm")
  if arg_5 is None:
    arg_5 = Configuration.getInt(
        "nupic.hypersearch.maxWorkersPerSwarm")

  return ClientJobsDAO.get().jobInsert(
      arg_0=arg_0,
      cmdLine="$HYPERSEARCH",
      arg_1=arg_1,
      arg_2=arg_2,
      arg_6=arg_6,
      arg_3=arg_3,
      arg_4=arg_4,
      arg_5=arg_5,
      jobType=ClientJobsDAO.JOB_TYPE_HS)


def Func(arg_0, arg_1):
        """
        Func for a non empty directory

        :return: Bool depending on the search criteria
        """
        arg_2 = arg_0.hook(arg_0.hdfs_conn_id).get_conn()
        arg_3 = [f for f in arg_2.ls([arg_0.filepath], include_toplevel=True)]
        arg_3 = arg_0.filter_for_ignored_ext(arg_3, arg_0.ignored_ext,
                                             arg_0.ignore_copying)
        arg_3 = arg_0.filter_for_filesize(arg_3, arg_0.file_size)
        if arg_0.be_empty:
            arg_0.log.info('Poking for filepath %s to a empty directory', arg_0.filepath)
            return len(arg_3) == 1 and arg_3[0]['path'] == arg_0.filepath
        else:
            arg_0.log.info('Poking for filepath %s to a non empty directory', arg_0.filepath)
            arg_3.pop(0)
            return bool(arg_3) and arg_3[0]['file_type'] == 'f'

poke for a non empty directory

        :return: Bool depending on the search criteria


def Func(arg_0, arg_1: arg_2, arg_3: arg_2):
        """Count of complete words between two addresses
        """
        assert arg_3 >= arg_1, (arg_1, arg_3)
        arg_4 = max(0, (arg_3 - arg_1) - (arg_1 % arg_0.wordWidth))
        return arg_4 // arg_0.wordWidth


return [element for elements in iterables for element in elements
            if not included(element)]

def Func ( arg_0 ) : arg_1 = set ( ) def included ( arg_2 ) : arg_3 = arg_2 in arg_1 arg_1 . add ( arg_2 ) return arg_3 return [ arg_2 for arg_4 in arg_0 for arg_2 in arg_4 if not included ( arg_2 ) ]

def Func(arg_0):
    """Create an iterable from the iterables that contains each element once.

    :return: an iterable over the iterables. Each element of the result
      appeared only once in the result. They are ordered by the first
      occurrence in the iterables.
    """
    arg_1 = set()

    def included(arg_2):
        arg_3 = arg_2 in arg_1
        arg_1.add(arg_2)
        return arg_3
    return [arg_2 for arg_4 in arg_0 for arg_2 in arg_4
            if not included(arg_2)]

Create an iterable from the iterables that contains each element once .


def Func(arg_0, arg_1, arg_2, arg_3):
    """generate a dependencies graph and add some information about it in the
    report's section
    """
    _dependencies_graph(arg_0, arg_1)
    arg_2.append(Paragraph("%simports graph has been written to %s" % (arg_3, arg_0)))

generate a dependencies graph and add some information about it in the report s section


(CASRN, T=None, AvailableMethods=False, Method=None,
                     full_info=True)

def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
False
,
arg_3
=
,
arg_4
=
True
)
:
def
list_methods
(
)
:
arg_5
=
[
]
if
arg_0
in
CRC_RI_organic
.
index
:
arg_5
.
append
(
CRC
)
arg_5
.
append
(
)
return
arg_5
if
arg_2
:
return
list_methods
(
)
if
not
arg_3
:
arg_3
=
list_methods
(
)
[
0
]
if
arg_3
==
CRC
:
arg_6
=
float
(
CRC_RI_organic
.
at
[
arg_0
,
'RI'
]
)
if
arg_4
:
arg_7
=
float
(
CRC_RI_organic
.
at
[
arg_0
,
'RIT'
]
)
elif
arg_3
==
:
arg_6
,
arg_7
=
,
else
:
raise
Exception
(
'Failure in in function'
)
if
arg_4
:
return
arg_6
,
arg_7
else
:
return
arg_6

def Func(arg_0, arg_1=None, arg_2=False, arg_3=None,
                     arg_4=True):
    r'''This function handles the retrieval of a chemical's refractive
    index. Lookup is based on CASRNs. Will automatically select a data source
    to use if no Method is provided; returns None if the data is not available.

    Function has data for approximately 4500 chemicals.

    Parameters
    ----------
    CASRN : string
        CASRN [-]

    Returns
    -------
    RI : float
        Refractive Index on the Na D line, [-]
    T : float, only returned if full_info == True
        Temperature at which refractive index reading was made
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain RI with the given inputs

    Other Parameters
    ----------------
    Method : string, optional
        A string for the method name to use, as defined by constants in
        RI_methods
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        RI for the desired chemical, and will return methods instead of RI
    full_info : bool, optional
        If True, function will return the temperature at which the refractive
        index reading was made

    Notes
    -----
    Only one source is available in this function. It is:

        * 'CRC', a compillation of Organic RI data in [1]_.

    Examples
    --------
    >>> Func(CASRN='64-17-5')
    (1.3611, 293.15)

    References
    ----------
    .. [1] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of
       Chemistry and Physics, 95E. Boca Raton, FL: CRC press, 2014.
    '''
    def list_methods():
        arg_5 = []
        if arg_0 in CRC_RI_organic.index:
            arg_5.append(CRC)
        arg_5.append(NONE)
        return arg_5
    if arg_2:
        return list_methods()
    if not arg_3:
        arg_3 = list_methods()[0]

    if arg_3 == CRC:
        arg_6 = float(CRC_RI_organic.at[arg_0, 'RI'])
        if arg_4:
            arg_7 = float(CRC_RI_organic.at[arg_0, 'RIT'])
    elif arg_3 == NONE:
        arg_6, arg_7 = None, None
    else:
        raise Exception('Failure in in function')
    if arg_4:
        return arg_6, arg_7
    else:
        return arg_6

r'''This function handles the retrieval of a chemical's refractive
    index. Lookup is based on CASRNs. Will automatically select a data source
    to use if no Method is provided; returns None if the data is not available.

    Function has data for approximately 4500 chemicals.

    Parameters
    ----------
    CASRN : string
        CASRN [-]

    Returns
    -------
    RI : float
        Refractive Index on the Na D line, [-]
    T : float, only returned if full_info == True
        Temperature at which refractive index reading was made
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain RI with the given inputs

    Other Parameters
    ----------------
    Method : string, optional
        A string for the method name to use, as defined by constants in
        RI_methods
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        RI for the desired chemical, and will return methods instead of RI
    full_info : bool, optional
        If True, function will return the temperature at which the refractive
        index reading was made

    Notes
    -----
    Only one source is available in this function. It is:

        * 'CRC', a compillation of Organic RI data in [1]_.

    Examples
    --------
    >>> refractive_index(CASRN='64-17-5')
    (1.3611, 293.15)

    References
    ----------
    .. [1] Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of
       Chemistry and Physics, 95E. Boca Raton, FL: CRC press, 2014.

r This function handles the retrieval of a chemical s refractive index . Lookup is based on CASRNs . Will automatically select a data source to use if no Method is provided ; returns None if the data is not available .


def
Func
(
arg_0
,
arg_1
)
:
for
arg_2
,
arg_3
,
arg_4
in
pkgutil
.
iter_modules
(
[
arg_1
]
)
:
arg_5
,
arg_6
,
arg_7
=
imp
.
find_module
(
arg_3
,
[
arg_1
]
)
arg_8
=
"streamlink.plugin.{0}"
.
format
(
arg_3
)
try
:
arg_0
.
load_plugin
(
arg_8
,
arg_5
,
arg_6
,
arg_7
)
except
Exception
:
sys
.
stderr
.
write
(
"Failed to load plugin {0}:\n"
.
format
(
arg_3
)
)
print_small_exception
(
"load_plugin"
)
continue

def Func(arg_0, arg_1):
        """Attempt to load plugins from the path specified.

        :param path: full path to a directory where to look for plugins

        """
        for arg_2, arg_3, arg_4 in pkgutil.iter_modules([arg_1]):
            arg_5, arg_6, arg_7 = imp.find_module(arg_3, [arg_1])
            # set the full plugin module name
            arg_8 = "streamlink.plugin.{0}".format(arg_3)

            try:
                arg_0.load_plugin(arg_8, arg_5, arg_6, arg_7)
            except Exception:
                sys.stderr.write("Failed to load plugin {0}:\n".format(arg_3))
                print_small_exception("load_plugin")

                continue

Attempt to load plugins from the path specified .


def Func ( arg_0 , arg_1 = '' ) : arg_2 = glob ( op . join ( arg_0 , arg_1 ) ) for arg_3 , arg_4 , arg_5 in os . walk ( arg_0 ) : for arg_6 in arg_4 : arg_2 . extend ( glob ( op . join ( arg_3 , arg_6 , arg_1 ) ) ) return arg_2

def Func(arg_0, arg_1=''):
    """
    Uses glob to find all files or folders that match the regex
    starting from the base_directory.

    Parameters
    ----------
    base_directory: str

    regex: str

    Returns
    -------
    files: list

    """
    arg_2 = glob(op.join(arg_0, arg_1))
    for arg_3, arg_4, arg_5 in os.walk(arg_0):
        for arg_6 in arg_4:
            arg_2.extend(glob(op.join(arg_3, arg_6, arg_1)))

    return arg_2

Uses glob to find all files or folders that match the regex starting from the base_directory .


async def Func(arg_0):
        """Renew the message lock.

        This will maintain the lock on the message to ensure
        it is not returned to the queue to be reprocessed. In order to complete (or otherwise settle)
        the message, the lock must be maintained. Messages received via ReceiveAndDelete mode are not
        locked, and therefore cannot be renewed. This operation can also be performed as an asynchronous
        background task by registering the message with an `azure.servicebus.aio.AutoLockRenew` instance.
        This operation is only available for non-sessionful messages.

        :raises: TypeError if the message is sessionful.
        :raises: ~azure.servicebus.common.errors.MessageLockExpired is message lock has already expired.
        :raises: ~azure.servicebus.common.errors.SessionLockExpired if session lock has already expired.
        :raises: ~azure.servicebus.common.errors.MessageAlreadySettled is message has already been settled.
        """
        if hasattr(arg_0._receiver, 'locked_until'):
            raise TypeError("Session messages cannot be renewed. Please renew the Session lock instead.")
        arg_0._is_live('renew')
        arg_1 = await arg_0._receiver._Funcs(arg_0.lock_token)  # pylint: disable=protected-access
        arg_0._expiry = datetime.datetime.fromtimestamp(arg_1[b'expirations'][0]/1000.0)


def
Func
(
arg_0
,
arg_1
)
:
logger
.
debug
(
"Setting secondary inputs: {}"
.
format
(
arg_1
)
)
arg_2
=
"\n"
.
join
(
list
(
arg_1
.
values
(
)
)
)
arg_0
.
_context
=
{
**
arg_0
.
_context
,
**
{
"secondary_inputs"
:
arg_2
}
}

def Func(arg_0, arg_1):
        """ Adds secondary inputs to the start of the pipeline.

        This channels are inserted into the pipeline file as they are
        provided in the values of the argument.

        Parameters
        ----------
        channel_dict : dict
            Each entry should be <parameter>: <channel string>.
        """

        logger.debug("Setting secondary inputs: {}".format(arg_1))

        arg_2 = "\n".join(list(arg_1.values()))
        arg_0._context = {**arg_0._context,
                         **{"secondary_inputs": arg_2}}

Adds secondary inputs to the start of the pipeline .


return ''.join(map('{:02x} '.format,
            self.stream.data[firstAddress:lastAddress]))

def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
+
7
>>
3
arg_3
=
arg_0
.
stream
.
pos
+
7
>>
3
return
''
.
join
(
map
(
'{:02x} '
.
format
,
arg_0
.
stream
.
data
[
arg_2
:
arg_3
]
)
)

def Func(arg_0, arg_1):
        """Produce hex dump of all data containing the bits
        from pos to stream.pos
        """
        arg_2 = arg_1+7>>3
        arg_3 = arg_0.stream.pos+7>>3
        return ''.join(map('{:02x} '.format,
            arg_0.stream.data[arg_2:arg_3]))

Produce hex dump of all data containing the bits from pos to stream . pos


def Func ( arg_0 : arg_1 , arg_2 : arg_3 = 1 ) : for arg_4 in arg_0 : if isinstance ( arg_4 , indentable ) : arg_4 . set_indent ( arg_2 ) if isinstance ( arg_4 , arg_1 ) : Func ( arg_4 , arg_2 )

def Func(arg_0: arg_1, arg_2: arg_3=1):
    """recurs into list for indentation"""
    for arg_4 in arg_0:
        if isinstance(arg_4, indentable):
            arg_4.set_indent(arg_2)
        if isinstance(arg_4, arg_1):
            Func(arg_4, arg_2)


def Func(arg_0):
    """
    Extracts the X.509 certificates from the server handshake bytes for use
    when debugging

    :param server_handshake_bytes:
        A byte string of the handshake data received from the server

    :return:
        A list of asn1crypto.x509.Certificate objects
    """

    arg_1 = []

    arg_2 = None

    for arg_3, arg_4, arg_5 in parse_tls_records(arg_0):
        if arg_3 != b'\x16':
            continue
        for arg_6, arg_7 in parse_handshake_messages(arg_5):
            if arg_6 == b'\x0b':
                arg_2 = arg_7
                break
        if arg_2:
            break

    if arg_2:
        # The first 3 bytes are the cert chain length
        arg_8 = 3
        while arg_8 < len(arg_2):
            arg_9 = int_from_bytes(arg_2[arg_8:arg_8 + 3])
            arg_10 = arg_8 + 3
            arg_11 = arg_10 + arg_9
            arg_8 = arg_11
            arg_12 = arg_2[arg_10:arg_11]
            arg_1.append(Certificate.load(arg_12))

    return arg_1

Extracts the X . 509 certificates from the server handshake bytes for use when debugging


def Func(arg_0, arg_1, arg_2, arg_3):
    '''
    This returns the residual between the model mags and the actual mags.

    Parameters
    ----------

    fourierparams : list
        This MUST be a list of the following form like so::

            [period,
             epoch,
             [amplitude_1, amplitude_2, amplitude_3, ..., amplitude_X],
             [phase_1, phase_2, phase_3, ..., phase_X]]

        where X is the Fourier order.

    times,mags,errs : np.array
        The input time-series of measurements and associated errors for which
        the model will be generated. The times will be used to generate model
        mags, and the input `times`, `mags`, and `errs` will be resorted by
        model phase and returned.

    Returns
    -------

    np.array
        The residuals between the input `mags` and generated `modelmags`,
        weighted by the measurement errors in `errs`.

    '''
    arg_4, arg_5, arg_6, arg_7, arg_8 = (
        fourier_sinusoidal_func(arg_0, arg_1, arg_2, arg_3)
    )

    # this is now a weighted residual taking into account the measurement err
    return (arg_7 - arg_4)/arg_8

This returns the residual between the model mags and the actual mags .


def
Func
(
arg_0
,
arg_1
=
arg_2
.
stdin
)
:
for
arg_4
in
arg_1
:
while
len
(
arg_4
)
>
600
:
arg_5
,
arg_6
,
arg_4
=
arg_4
.
partition
(
' '
)
assert
len
(
arg_5
)
<=
600
arg_0
.
send
(
''
.
join
(
[
arg_5
,
arg_6
]
)
)
arg_0
.
send
(
arg_4
)
arg_1
.
close
(
)
return
arg_0
.
close
(
)

def Func(arg_0, arg_1=arg_2.stdin):
    """
    Coroutine starting point. Produces text stream and forwards to consumers

    :param target: Target coroutine consumer
    :type target: Coroutine

    :param inputstream: Input Source
    :type inputstream: BufferedTextIO Object
    """
    for arg_4 in arg_1:

        while len(arg_4) > 600:
            arg_5, arg_6, arg_4 = arg_4.partition(' ')
            assert len(arg_5) <= 600
            arg_0.send(''.join([arg_5, arg_6]))

        arg_0.send(arg_4)

    arg_1.close()

    return arg_0.close()

Coroutine starting point . Produces text stream and forwards to consumers


def Func ( arg_0 , arg_1 ) : if inspect . isclass ( arg_0 ) : arg_2 = _find_class_construction_fn ( arg_0 ) else : arg_2 = arg_0 while hasattr ( arg_2 , '__wrapped__' ) : arg_2 = arg_2 . __wrapped__ arg_3 = _get_cached_arg_spec ( arg_2 ) if six . PY3 : if arg_3 . varkw : return True return arg_1 in arg_3 . args or arg_1 in arg_3 . kwonlyargs else : if arg_3 . keywords : return True return arg_1 in arg_3 . args

def Func(arg_0, arg_1):
  """Returns True if `arg_name` might be a valid parameter for `fn_or_cls`.

  Specifically, this means that `fn_or_cls` either has a parameter named
  `arg_name`, or has a `**kwargs` parameter.

  Args:
    fn_or_cls: The function or class to check.
    arg_name: The name fo the parameter.

  Returns:
    Whether `arg_name` might be a valid argument of `fn`.
  """
  if inspect.isclass(arg_0):
    arg_2 = _find_class_construction_fn(arg_0)
  else:
    arg_2 = arg_0

  while hasattr(arg_2, '__wrapped__'):
    arg_2 = arg_2.__wrapped__
  arg_3 = _get_cached_arg_spec(arg_2)
  if six.PY3:
    if arg_3.varkw:
      return True
    return arg_1 in arg_3.args or arg_1 in arg_3.kwonlyargs
  else:
    if arg_3.keywords:
      return True
    return arg_1 in arg_3.args

Returns True if arg_name might be a valid parameter for fn_or_cls .


(certificate_or_public_key, signature, data, hash_algorithm, rsa_pss_padding=False)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
=
False
)
:
if
arg_3
==
'raw'
:
arg_5
=
arg_2
else
:
arg_6
=
{
'md5'
:
BcryptConst
.
BCRYPT_MD5_ALGORITHM
,
'sha1'
:
BcryptConst
.
BCRYPT_SHA1_ALGORITHM
,
'sha256'
:
BcryptConst
.
BCRYPT_SHA256_ALGORITHM
,
'sha384'
:
BcryptConst
.
BCRYPT_SHA384_ALGORITHM
,
'sha512'
:
BcryptConst
.
BCRYPT_SHA512_ALGORITHM
}
[
arg_3
]
arg_5
=
getattr
(
hashlib
,
arg_3
)
(
arg_2
)
.
digest
(
)
arg_7
=
(
)
arg_8
=
0
if
arg_0
.
algorithm
==
'rsa'
:
if
arg_4
:
arg_8
=
BcryptConst
.
BCRYPT_PAD_PSS
arg_9
=
struct
(
bcrypt
,
'BCRYPT_PSS_PADDING_INFO'
)
arg_10
=
unwrap
(
arg_9
)
arg_11
=
buffer_from_unicode
(
arg_6
)
arg_10
.
pszAlgId
=
cast
(
bcrypt
,
'wchar_t *'
,
arg_11
)
arg_10
.
cbSalt
=
len
(
arg_5
)
else
:
arg_8
=
BcryptConst
.
BCRYPT_PAD_PKCS1
arg_9
=
struct
(
bcrypt
,
'BCRYPT_PKCS1_PADDING_INFO'
)
arg_10
=
unwrap
(
arg_9
)
if
arg_3
==
'raw'
:
arg_10
.
pszAlgId
=
(
)
else
:
arg_11
=
buffer_from_unicode
(
arg_6
)
arg_10
.
pszAlgId
=
cast
(
bcrypt
,
'wchar_t *'
,
arg_11
)
arg_7
=
cast
(
bcrypt
,
'void *'
,
arg_9
)
else
:
try
:
arg_1
=
algos
.
DSASignature
.
load
(
arg_1
)
.
to_p1363
(
)
except
(
ValueError
,
OverflowError
,
TypeError
)
:
raise
SignatureError
(
'Signature is invalid'
)
arg_14
=
bcrypt
.
BCryptVerifySignature
(
arg_0
.
key_handle
,
arg_7
,
arg_5
,
len
(
arg_5
)
,
arg_1
,
len
(
arg_1
)
,
arg_8
)
arg_15
=
arg_14
==
BcryptConst
.
STATUS_INVALID_SIGNATURE
arg_15
=
arg_15
or
arg_14
==
BcryptConst
.
STATUS_INVALID_PARAMETER
if
arg_15
:
raise
SignatureError
(
'Signature is invalid'
)
handle_error
(
arg_14
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=False):
    """
    Verifies an RSA, DSA or ECDSA signature via CNG

    :param certificate_or_public_key:
        A Certificate or PublicKey instance to verify the signature with

    :param signature:
        A byte string of the signature to verify

    :param data:
        A byte string of the data the signature is for

    :param hash_algorithm:
        A unicode string of "md5", "sha1", "sha256", "sha384", "sha512" or "raw"

    :param rsa_pss_padding:
        If PSS padding should be used for RSA keys

    :raises:
        oscrypto.errors.SignatureError - when the signature is determined to be invalid
        ValueError - when any of the parameters contain an invalid value
        TypeError - when any of the parameters are of the wrong type
        OSError - when an error is returned by the OS crypto library
    """

    if arg_3 == 'raw':
        arg_5 = arg_2
    else:
        arg_6 = {
            'md5': BcryptConst.BCRYPT_MD5_ALGORITHM,
            'sha1': BcryptConst.BCRYPT_SHA1_ALGORITHM,
            'sha256': BcryptConst.BCRYPT_SHA256_ALGORITHM,
            'sha384': BcryptConst.BCRYPT_SHA384_ALGORITHM,
            'sha512': BcryptConst.BCRYPT_SHA512_ALGORITHM
        }[arg_3]
        arg_5 = getattr(hashlib, arg_3)(arg_2).digest()

    arg_7 = null()
    arg_8 = 0

    if arg_0.algorithm == 'rsa':
        if arg_4:
            arg_8 = BcryptConst.BCRYPT_PAD_PSS
            arg_9 = struct(bcrypt, 'BCRYPT_PSS_PADDING_INFO')
            arg_10 = unwrap(arg_9)
            # This has to be assigned to a variable to prevent cffi from gc'ing it
            arg_11 = buffer_from_unicode(arg_6)
            arg_10.pszAlgId = cast(bcrypt, 'wchar_t *', arg_11)
            arg_10.cbSalt = len(arg_5)
        else:
            arg_8 = BcryptConst.BCRYPT_PAD_PKCS1
            arg_9 = struct(bcrypt, 'BCRYPT_PKCS1_PADDING_INFO')
            arg_10 = unwrap(arg_9)
            # This has to be assigned to a variable to prevent cffi from gc'ing it
            if arg_3 == 'raw':
                arg_10.pszAlgId = null()
            else:
                arg_11 = buffer_from_unicode(arg_6)
                arg_10.pszAlgId = cast(bcrypt, 'wchar_t *', arg_11)
        arg_7 = cast(bcrypt, 'void *', arg_9)
    else:
        # Windows doesn't use the ASN.1 Sequence for DSA/ECDSA signatures,
        # so we have to convert it here for the verification to work
        try:
            arg_1 = algos.DSASignature.load(arg_1).to_p1363()
        except (ValueError, OverflowError, TypeError):
            raise SignatureError('Signature is invalid')

    arg_14 = bcrypt.BCryptVerifySignature(
        arg_0.key_handle,
        arg_7,
        arg_5,
        len(arg_5),
        arg_1,
        len(arg_1),
        arg_8
    )
    arg_15 = arg_14 == BcryptConst.STATUS_INVALID_SIGNATURE
    arg_15 = arg_15 or arg_14 == BcryptConst.STATUS_INVALID_PARAMETER
    if arg_15:
        raise SignatureError('Signature is invalid')

    handle_error(arg_14)

Verifies an RSA DSA or ECDSA signature via CNG


def Func(arg_0, arg_1, arg_2):
    """Push latent means and covariances forward through the observation model.

    Args:
      latent_means: float `Tensor` of shape `[..., num_timesteps, latent_size]`
      latent_covs: float `Tensor` of shape
        `[..., num_timesteps, latent_size, latent_size]`.

    Returns:
      observation_means: float `Tensor` of shape
        `[..., num_timesteps, observation_size]`
      observation_covs: float `Tensor` of shape
        `[..., num_timesteps, observation_size, observation_size]`
    """

    with tf.name_scope("Func"):

      arg_3 = build_pushforward_latents_step(
          arg_0.get_observation_matrix_for_timestep,
          arg_0.get_observation_noise_for_timestep)

      arg_1 = distribution_util.move_dimension(
          arg_1, source_idx=-2, dest_idx=0)
      arg_1 = arg_1[..., tf.newaxis]  # Make matmul happy.
      arg_2 = distribution_util.move_dimension(
          arg_2, source_idx=-3, dest_idx=0)

      (arg_4,
       arg_5) = arg_3(
           _=None,  # Loop body ignores previous observations.
           latent_t_mean_cov=(arg_0.initial_step,
                              arg_1[arg_0.initial_step],
                              arg_2[arg_0.initial_step]))

      # TODO(davmre) this loop is embarassingly parallel; replace with `pfor`.
      arg_6 = tf.range(arg_0.initial_step,
                           arg_0.initial_step + arg_0.num_timesteps)
      arg_7, arg_8 = tf.scan(
          arg_3,
          elems=(arg_6, arg_1, arg_2),
          initializer=(arg_4, arg_5),
          parallel_iterations=10000)

      arg_7 = distribution_util.move_dimension(
          arg_7[..., 0], source_idx=0, dest_idx=-2)
      arg_8 = distribution_util.move_dimension(
          arg_8, source_idx=0, dest_idx=-3)

      return arg_7, arg_8

Push latent means and covariances forward through the observation model .


def Func(arg_0, arg_1, arg_2):
    """Collect all verified variants in a list on institutes and save them to file

    Args:
        store(adapter.MongoAdapter)
        institute_list(list): a list of institute ids
        temp_excel_dir(os.Path): folder where the temp excel files are written to

    Returns:
        written_files(int): the number of files written to temp_excel_dir
    """
    arg_3 = []
    arg_4 = 0
    arg_5 = datetime.datetime.now().strftime('%Y-%m-%d')
    LOG.info('Creating verified variant document..')

    for arg_6 in arg_1:
        arg_7 = arg_0.verified(institute_id=arg_6)
        LOG.info('Found {} verified variants for customer {}'.format(len(arg_7), arg_6))

        if not arg_7:
            continue
        arg_8 = set()
        for arg_9, arg_10 in CALLERS.items():
            for arg_11 in arg_10:
                arg_8.add(arg_11.get('id'))
        arg_12 = export_verified_variants(arg_7, arg_8)

        arg_13 = '.'.join([arg_6, '_verified_variants', arg_5]) + '.xlsx'
        arg_14 = Workbook(os.path.join(arg_2,arg_13))
        arg_15 = arg_14.add_worksheet()

        # Write the column header
        arg_16 = 0
        for arg_17,arg_18 in enumerate(VERIFIED_VARIANTS_HEADER + list(arg_8)):
            arg_15.write(arg_16,arg_17,arg_18)

        # Write variant lines, after header (start at line 1)
        for arg_16, arg_19 in enumerate(arg_12,1): # each line becomes a row in the document
            for arg_17, arg_18 in enumerate(arg_19): # each field in line becomes a cell
                arg_15.write(arg_16,arg_17,arg_18)
        arg_14.close()

        if os.path.exists(os.path.join(arg_2,arg_13)):
            arg_4 += 1

    return arg_4