def Func ( arg_0 ) : arg_1 = arg_0 . L arg_2 = arg_0 . L . shape [ 0 ] arg_3 = { "Lu" : zeros ( ( arg_2 , arg_2 , arg_2 * arg_0 . _L . shape [ 1 ] ) ) } for arg_4 in range ( arg_0 . _L . shape [ 0 ] * arg_0 . _L . shape [ 1 ] ) : arg_5 = arg_4 // arg_0 . _L . shape [ 1 ] arg_6 = arg_4 % arg_0 . _L . shape [ 1 ] arg_3 [ "Lu" ] [ arg_5 , : , arg_4 ] = arg_1 [ : , arg_6 ] arg_3 [ "Lu" ] [ : , arg_5 , arg_4 ] += arg_1 [ : , arg_6 ] return arg_3

def Func(arg_0):
        """
        Derivative of the covariance matrix over the lower triangular, flat part of L.

        It is equal to

            ∂K/∂Lᵢⱼ = ALᵀ + LAᵀ,

        where Aᵢⱼ is an n×m matrix of zeros except at [Aᵢⱼ]ᵢⱼ=1.

        Returns
        -------
        Lu : ndarray
            Derivative of K over the lower-triangular, flat part of L.
        """
        arg_1 = arg_0.L
        arg_2 = arg_0.L.shape[0]
        arg_3 = {"Lu": zeros((arg_2, arg_2, arg_2 * arg_0._L.shape[1]))}
        for arg_4 in range(arg_0._L.shape[0] * arg_0._L.shape[1]):
            arg_5 = arg_4 // arg_0._L.shape[1]
            arg_6 = arg_4 % arg_0._L.shape[1]
            arg_3["Lu"][arg_5, :, arg_4] = arg_1[:, arg_6]
            arg_3["Lu"][:, arg_5, arg_4] += arg_1[:, arg_6]

        return arg_3

Derivative of the covariance matrix over the lower triangular flat part of L .


def
Func
(
arg_0
)
:
def
decorator
(
arg_1
)
:
from
.
stanzapayload
import
arg_4
from
.
stanzapayload
import
STANZA_PAYLOAD_ELEMENTS
if
hasattr
(
arg_1
,
"_pyxmpp_Func"
)
:
arg_1
.
_pyxmpp_Func
.
append
(
arg_0
)
else
:
arg_1
.
_pyxmpp_Func
=
[
arg_0
]
if
arg_0
in
arg_4
:
arg_3
=
logging
.
getLogger
(
'pyxmpp.Func'
)
arg_3
.
warning
(
"Overriding payload class for {0!r}"
.
format
(
arg_0
)
)
arg_4
[
arg_0
]
=
arg_1
STANZA_PAYLOAD_ELEMENTS
[
arg_1
]
.
append
(
arg_0
)
return
arg_1
return
decorator

def Func(arg_0):
    """Class decorator generator for decorationg
    `StanzaPayload` subclasses.

    :Parameters:
        - `element_name`: XML element qname handled by the class
    :Types:
        - `element_name`: `unicode`
    """
    def decorator(arg_1):
        """The Func decorator."""
        # pylint: disable-msg=W0212,W0404
        from .stanzapayload import arg_4
        from .stanzapayload import STANZA_PAYLOAD_ELEMENTS
        if hasattr(arg_1, "_pyxmpp_Func"):
            arg_1._pyxmpp_Func.append(arg_0)
        else:
            arg_1._pyxmpp_Func = [arg_0]
        if arg_0 in arg_4:
            arg_3 = logging.getLogger('pyxmpp.Func')
            arg_3.warning("Overriding payload class for {0!r}".format(
                                                                arg_0))
        arg_4[arg_0] = arg_1
        STANZA_PAYLOAD_ELEMENTS[arg_1].append(arg_0)
        return arg_1
    return decorator

Class decorator generator for decorationg StanzaPayload subclasses .


def Func ( ) : try : with click . open_file ( 'app.json' , 'r' ) as f : arg_0 = f . read ( ) arg_1 = json . loads ( arg_0 ) except IOError : return None arg_2 = arg_1 . get ( 'repository' ) if not arg_2 : return None else : return arg_1 . get ( 'repository' ) + '/tarball/master/'

def Func():
    """Returns the tarball URL inferred from an app.json, if present."""
    try:
        with click.open_file('app.json', 'r') as f:
            arg_0 = f.read()

        arg_1 = json.loads(arg_0)
    except IOError:
        return None

    arg_2 = arg_1.get('repository')

    if not arg_2:
        return None
    else:
        return arg_1.get('repository') + '/tarball/master/'

Returns the tarball URL inferred from an app . json if present .


def Func(arg_0):
        """
        Export as a ``cryptography`` key.

        :rtype: One of ``cryptography``'s `key interfaces`_.

        .. _key interfaces: https://cryptography.io/en/latest/hazmat/\
            primitives/asymmetric/rsa/#key-interfaces

        .. versionadded:: 16.1.0
        """
        arg_1 = _get_backend()
        if arg_0._only_public:
            return arg_1._evp_pkey_to_public_key(arg_0._pkey)
        else:
            return arg_1._evp_pkey_to_private_key(arg_0._pkey)


def
Func
(
arg_0
,
arg_1
=
80
)
:
arg_2
=
[
(
arg_0
.
bitPattern
(
arg_10
.
index
)
,
arg_0
.
mnemonic
(
arg_10
.
index
)
)
for
arg_10
in
arg_0
]
arg_3
,
arg_4
=
map
(
max
,
map
(
map
,
repeat
(
len
)
,
zip
(
*
arg_2
)
)
)
arg_5
=
arg_3
+
arg_4
arg_6
=
81
//
(
arg_5
+
2
)
arg_7
=
(
len
(
arg_2
)
//
arg_6
)
def
justify
(
arg_8
)
:
arg_9
,
arg_10
=
arg_8
return
arg_9
.
rjust
(
arg_3
)
+
':'
+
arg_10
.
ljust
(
arg_4
)
for
arg_11
in
range
(
arg_7
)
:
print
(
' '
.
join
(
map
(
justify
,
arg_2
[
arg_11
:
:
arg_7
]
)
)
.
rstrip
(
)
)

def Func(arg_0, arg_1=80):
        """Show all words of the code in a nice format.
        """
        #make table of all symbols with binary strings
        arg_2 = [
            (arg_0.bitPattern(arg_10.index), arg_0.mnemonic(arg_10.index))
            for arg_10 in arg_0
            ]
        #determine column widths the way Lisp programmers do it
        arg_3, arg_4 = map(max, map(
            map,
            repeat(len),
            zip(*arg_2)
            ))
        arg_5 = arg_3+arg_4
        arg_6 = 81//(arg_5+2)
        arg_7 = -(-len(arg_2)//arg_6)
        def justify(arg_8):
            arg_9,arg_10 = arg_8
            return arg_9.rjust(arg_3)+':'+arg_10.ljust(arg_4)
        for arg_11 in range(arg_7):
            print(' '.join(map(justify, arg_2[arg_11::arg_7])).rstrip())

Show all words of the code in a nice format .


def Func ( arg_0 ) : arg_1 = arg_0 . _get_connection ( ) arg_2 = len ( arg_0 . filters ) arg_3 = len ( arg_0 . notFilters ) if arg_2 + arg_3 == 0 : return arg_1 . scard ( arg_0 . _get_ids_key ( ) ) if arg_3 == 0 : if arg_2 == 1 : ( arg_4 , arg_5 ) = arg_0 . filters [ 0 ] return arg_1 . scard ( arg_0 . _get_key_for_index ( arg_4 , arg_5 ) ) arg_6 = [ arg_0 . _get_key_for_index ( arg_4 , arg_5 ) for arg_4 , arg_5 in arg_0 . filters ] return len ( arg_1 . sinter ( arg_6 ) ) arg_7 = [ arg_0 . _get_key_for_index ( arg_4 , arg_5 ) for arg_4 , arg_5 in arg_0 . notFilters ] if arg_2 == 0 : return len ( arg_1 . sdiff ( arg_0 . _get_ids_key ( ) , * arg_7 ) ) arg_6 = [ arg_0 . _get_key_for_index ( arg_4 , arg_5 ) for arg_4 , arg_5 in arg_0 . filters ] arg_8 = arg_0 . _getTempKey ( ) arg_9 = arg_1 . pipeline ( ) arg_9 . sinterstore ( arg_8 , * arg_6 ) arg_9 . sdiff ( arg_8 , * arg_7 ) arg_9 . delete ( arg_8 ) arg_10 = arg_9 . execute ( ) [ 1 ] return len ( arg_10 )

def Func(arg_0):
		'''
			Func - gets the number of records matching the filter criteria

			Example:
				theCount = Model.objects.filter(field1='value').Func()
		'''
		arg_1 = arg_0._get_connection()

		arg_2 = len(arg_0.filters)
		arg_3 = len(arg_0.notFilters)
		if arg_2 + arg_3 == 0:
			return arg_1.scard(arg_0._get_ids_key())

		if arg_3 == 0:
			if arg_2 == 1:
				(arg_4, arg_5) = arg_0.filters[0]
				return arg_1.scard(arg_0._get_key_for_index(arg_4, arg_5))
			arg_6 = [arg_0._get_key_for_index(arg_4, arg_5) for arg_4, arg_5 in arg_0.filters]

			return len(arg_1.sinter(arg_6))

		arg_7 = [arg_0._get_key_for_index(arg_4, arg_5) for arg_4, arg_5 in arg_0.notFilters]
		if arg_2 == 0:
			return len(arg_1.sdiff(arg_0._get_ids_key(), *arg_7))

		arg_6 = [arg_0._get_key_for_index(arg_4, arg_5) for arg_4, arg_5 in arg_0.filters]

		arg_8 = arg_0._getTempKey()
		arg_9 = arg_1.pipeline()
		arg_9.sinterstore(arg_8, *arg_6)
		arg_9.sdiff(arg_8, *arg_7)
		arg_9.delete(arg_8)
		arg_10 = arg_9.execute()[1] # sdiff

		return len(arg_10)

count - gets the number of records matching the filter criteria

			Example:
				theCount = Model.objects.filter(field1='value').count()


(self, ast_node, walker, rawcheckers, tokencheckers)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : try : arg_5 = utils . tokenize_module ( arg_1 ) except tokenize . TokenError as ex : arg_0 . add_message ( "syntax-error" , line = ex . args [ 1 ] [ 0 ] , args = ex . args [ 0 ] ) return None if not arg_1 . pure_python : arg_0 . add_message ( "raw-checker-failed" , args = arg_1 . name ) else : arg_0 . process_tokens ( arg_5 ) if arg_0 . _ignore_file : return False arg_0 . file_state . collect_block_lines ( arg_0 . msgs_store , arg_1 ) for arg_6 in arg_3 : arg_6 . process_module ( arg_1 ) for arg_6 in arg_4 : arg_6 . process_tokens ( arg_5 ) arg_2 . walk ( arg_1 ) return True

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """Check a module from its astroid representation."""
        try:
            arg_5 = utils.tokenize_module(arg_1)
        except tokenize.TokenError as ex:
            arg_0.add_message("syntax-error", line=ex.args[1][0], args=ex.args[0])
            return None

        if not arg_1.pure_python:
            arg_0.add_message("raw-checker-failed", args=arg_1.name)
        else:
            # assert astroid.file.endswith('.py')
            # invoke ITokenChecker interface on self to fetch module/block
            # level options
            arg_0.process_tokens(arg_5)
            if arg_0._ignore_file:
                return False
            # walk ast to collect line numbers
            arg_0.file_state.collect_block_lines(arg_0.msgs_store, arg_1)
            # run raw and tokens checkers
            for arg_6 in arg_3:
                arg_6.process_module(arg_1)
            for arg_6 in arg_4:
                arg_6.process_tokens(arg_5)
        # generate events to astroid checkers
        arg_2.walk(arg_1)
        return True

Check a module from its astroid representation .


def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_0 . STACK -= len ( arg_1 ) arg_0 . write_bytes ( arg_0 . STACK , arg_1 , arg_2 ) return arg_0 . STACK

def Func(arg_0, arg_1, arg_2=False):
        """
        Write `data` to the stack and decrement the stack pointer accordingly.

        :param str data: Data to write
        :param force: whether to ignore memory permissions
        """
        arg_0.STACK -= len(arg_1)
        arg_0.write_bytes(arg_0.STACK, arg_1, arg_2)
        return arg_0.STACK

Write data to the stack and decrement the stack pointer accordingly .


def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_3 = '%(base_url)s/record/%(catID)s' % { 'base_url' : arg_0 . base_url , 'catID' : arg_1 } arg_4 = arg_0 . gbdx_connection . Func ( arg_3 ) arg_4 . raise_for_status ( ) return arg_4 . json ( )

def Func(arg_0, arg_1, arg_2=False):
        '''Retrieves the strip footprint WKT string given a cat ID.

        Args:
            catID (str): The source catalog ID from the platform catalog.
            includeRelationships (bool): whether to include graph links to related objects.  Default False.

        Returns:
            record (dict): A dict object identical to the json representation of the catalog record
        '''
        arg_3 = '%(base_url)s/record/%(catID)s' % {
            'base_url': arg_0.base_url, 'catID': arg_1
        }
        arg_4 = arg_0.gbdx_connection.Func(arg_3)
        arg_4.raise_for_status()
        return arg_4.json()

Retrieves the strip footprint WKT string given a cat ID .


def Func ( arg_0 ) : if not arg_0 . model : return 'JSON' arg_1 = arg_0 . model . _meta . database if isinstance ( arg_1 , Proxy ) : arg_1 = arg_1 . obj if Json and isinstance ( arg_1 , PostgresqlDatabase ) : return 'JSON' return 'TEXT'

def Func(arg_0):
        """Return database field type."""
        if not arg_0.model:
            return 'JSON'
        arg_1 = arg_0.model._meta.database
        if isinstance(arg_1, Proxy):
            arg_1 = arg_1.obj
        if Json and isinstance(arg_1, PostgresqlDatabase):
            return 'JSON'
        return 'TEXT'


def Func ( arg_0 ) : arg_1 = arg_0 . shape [ 0 ] arg_2 = np . zeros ( arg_1 ) for arg_3 in range ( arg_1 - 1 ) : arg_2 [ arg_3 ] = distance . euclidean ( arg_0 [ arg_3 , : ] , arg_0 [ arg_3 + 1 , : ] ) arg_2 += np . abs ( arg_2 . min ( ) ) arg_2 /= float ( arg_2 . max ( ) ) return arg_2

def Func(arg_0):
    """Computes the novelty curve from the structural features."""
    arg_1 = arg_0.shape[0]
    # nc = np.sum(np.diff(X, axis=0), axis=1) # Difference between SF's

    arg_2 = np.zeros(arg_1)
    for arg_3 in range(arg_1 - 1):
        arg_2[arg_3] = distance.euclidean(arg_0[arg_3, :], arg_0[arg_3 + 1, :])

    # Normalize
    arg_2 += np.abs(arg_2.min())
    arg_2 /= float(arg_2.max())
    return arg_2

Computes the novelty curve from the structural features .


def
Func
(
*
arg_0
,
**
arg_1
)
:
if
not
(
DEBUG
and
arg_0
)
:
return
arg_2
=
arg_1
.
get
(
'parent'
,
)
with
suppress
(
KeyError
)
:
arg_1
.
pop
(
'parent'
)
arg_3
=
arg_1
.
get
(
'back'
,
1
)
with
suppress
(
KeyError
)
:
arg_1
.
pop
(
'back'
)
arg_4
=
inspect
.
currentframe
(
)
while
arg_3
>
0
:
arg_4
=
arg_4
.
f_back
arg_3
-=
1
arg_5
=
os
.
path
.
split
(
arg_4
.
f_code
.
co_filename
)
[
1
]
arg_6
=
arg_4
.
f_lineno
if
arg_2
:
arg_7
=
'{}.{}'
.
format
(
arg_2
.
__class__
.
__name__
,
arg_4
.
f_code
.
co_name
)
else
:
arg_7
=
arg_4
.
f_code
.
co_name
arg_8
=
'{}:{} {}: '
.
format
(
C
(
arg_5
,
'yellow'
)
,
C
(
str
(
arg_6
)
.
ljust
(
4
)
,
'blue'
)
,
C
(
)
.
join
(
C
(
arg_7
,
'magenta'
)
,
'()'
)
.
ljust
(
20
)
)
arg_9
=
list
(
C
(
a
,
'green'
)
.
str
(
)
for
a
in
arg_0
)
arg_9
[
0
]
=
''
.
join
(
(
arg_8
,
arg_9
[
0
]
)
)
print_err
(
*
arg_9
,
**
arg_1
)

def Func(*arg_0, **arg_1):
    """ Print a message only if DEBUG is truthy. """
    if not (DEBUG and arg_0):
        return None

    # Include parent class name when given.
    arg_2 = arg_1.get('parent', None)
    with suppress(KeyError):
        arg_1.pop('parent')

    # Go back more than once when given.
    arg_3 = arg_1.get('back', 1)
    with suppress(KeyError):
        arg_1.pop('back')

    arg_4 = inspect.currentframe()
    # Go back a number of frames (usually 1).
    while arg_3 > 0:
        arg_4 = arg_4.f_back
        arg_3 -= 1
    arg_5 = os.path.split(arg_4.f_code.co_filename)[-1]
    arg_6 = arg_4.f_lineno
    if arg_2:
        arg_7 = '{}.{}'.format(arg_2.__class__.__name__, arg_4.f_code.co_name)
    else:
        arg_7 = arg_4.f_code.co_name

    arg_8 = '{}:{} {}: '.format(
        C(arg_5, 'yellow'),
        C(str(arg_6).ljust(4), 'blue'),
        C().join(C(arg_7, 'magenta'), '()').ljust(20)
    )
    # Patch args to stay compatible with print().
    arg_9 = list(C(a, 'green').str() for a in arg_0)
    arg_9[0] = ''.join((arg_8, arg_9[0]))
    print_err(*arg_9, **arg_1)

Print a message only if DEBUG is truthy .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . endData ( ) arg_0 . handle_data ( arg_1 ) arg_0 . endData ( arg_2 )

def Func(arg_0, arg_1, arg_2):
        """Adds a certain piece of text to the tree as a NavigableString
        subclass."""
        arg_0.endData()
        arg_0.handle_data(arg_1)
        arg_0.endData(arg_2)

Adds a certain piece of text to the tree as a NavigableString subclass .


(loop_num_iter, body_fn, initial_loop_vars,
                   parallel_iterations=10, name=None)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 10 , arg_4 = None ) : with tf . compat . v1 . name_scope ( arg_4 , 'Func' , [ arg_0 , arg_2 ] ) : arg_5 = tf . get_static_value ( arg_0 ) if ( arg_5 is None or tf . executing_eagerly ( ) or control_flow_util . GraphOrParentsInXlaContext ( tf . compat . v1 . get_default_graph ( ) ) ) : arg_0 = tf . cast ( arg_0 , dtype = tf . int32 ) return tf . while_loop ( cond = lambda i , * args : i < arg_0 , body = lambda i , * args : [ i + 1 ] + list ( arg_1 ( * args ) ) , loop_vars = [ np . int32 ( 0 ) ] + arg_2 , arg_3 = arg_3 ) [ 1 : ] arg_6 = arg_2 for arg_7 in range ( arg_5 ) : arg_6 = arg_1 ( * arg_6 ) return arg_6

def Func(arg_0, arg_1, arg_2,
                   arg_3=10, arg_4=None):
  """Construct a for loop, preferring a python loop if `n` is staticaly known.

  Given `loop_num_iter` and `body_fn`, return an op corresponding to executing
  `body_fn` `loop_num_iter` times, feeding previous outputs of `body_fn` into
  the next iteration.

  If `loop_num_iter` is statically known, the op is constructed via python for
  loop, and otherwise a `tf.while_loop` is used.

  Args:
    loop_num_iter: `Integer` `Tensor` representing the number of loop
      iterations.
    body_fn: Callable to be executed `loop_num_iter` times.
    initial_loop_vars: Listlike object of `Tensors` to be passed in to
      `body_fn`'s first execution.
    parallel_iterations: The number of iterations allowed to run in parallel.
      It must be a positive integer. See `tf.while_loop` for more details.
      Default value: `10`.
    name: Python `str` name prefixed to Ops created by this function.
      Default value: `None` (i.e., "Func").
  Returns:
    result: `Tensor` representing applying `body_fn` iteratively `n` times.
  """
  with tf.compat.v1.name_scope(arg_4, 'Func',
                               [arg_0, arg_2]):
    arg_5 = tf.get_static_value(arg_0)
    if (arg_5 is None or tf.executing_eagerly() or
        control_flow_util.GraphOrParentsInXlaContext(
            tf.compat.v1.get_default_graph())):
      # Cast to int32 to run the comparison against i in host memory,
      # where while/LoopCond needs it.
      arg_0 = tf.cast(arg_0, dtype=tf.int32)
      return tf.while_loop(
          cond=lambda i, *args: i < arg_0,
          body=lambda i, *args: [i + 1] + list(arg_1(*args)),
          loop_vars=[np.int32(0)] + arg_2,
          arg_3=arg_3
      )[1:]
    arg_6 = arg_2
    for arg_7 in range(arg_5):
      arg_6 = arg_1(*arg_6)
    return arg_6

Construct a for loop, preferring a python loop if `n` is staticaly known.

  Given `loop_num_iter` and `body_fn`, return an op corresponding to executing
  `body_fn` `loop_num_iter` times, feeding previous outputs of `body_fn` into
  the next iteration.

  If `loop_num_iter` is statically known, the op is constructed via python for
  loop, and otherwise a `tf.while_loop` is used.

  Args:
    loop_num_iter: `Integer` `Tensor` representing the number of loop
      iterations.
    body_fn: Callable to be executed `loop_num_iter` times.
    initial_loop_vars: Listlike object of `Tensors` to be passed in to
      `body_fn`'s first execution.
    parallel_iterations: The number of iterations allowed to run in parallel.
      It must be a positive integer. See `tf.while_loop` for more details.
      Default value: `10`.
    name: Python `str` name prefixed to Ops created by this function.
      Default value: `None` (i.e., "smart_for_loop").
  Returns:
    result: `Tensor` representing applying `body_fn` iteratively `n` times.

Construct a for loop preferring a python loop if n is staticaly known .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
[
arg_0
]
if
type
(
arg_0
)
!=
list
else
arg_0
arg_3
=
for
arg_0
in
arg_2
:
try
:
arg_3
=
template
.
loader
.
get_template
(
arg_0
)
break
except
template
.
TemplateDoesNotExist
:
pass
if
not
arg_3
:
raise
Exception
(
'Template does not exist: '
+
arg_2
[
1
]
)
return
arg_3
.
render
(
template
.
Context
(
arg_1
)
)

def Func(arg_0, arg_1):
    '''
    A shortcut function to render a partial template with context and return
    the output.
    '''

    arg_2 = [arg_0] if type(arg_0) != list else arg_0
    arg_3 = None

    for arg_0 in arg_2:
        try:
            arg_3 = template.loader.get_template(arg_0)
            break
        except template.TemplateDoesNotExist:
            pass

    if not arg_3:
        raise Exception('Template does not exist: ' + arg_2[-1])

    return arg_3.render(template.Context(arg_1))

A shortcut function to render a partial template with context and return the output .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . name if arg_0 . module_names : arg_2 = "%s.%s" % ( arg_1 . root ( ) . name , arg_2 ) return arg_2

def Func(arg_0, arg_1):
        """get title for objects"""
        arg_2 = arg_1.name
        if arg_0.module_names:
            arg_2 = "%s.%s" % (arg_1.root().name, arg_2)
        return arg_2


def Func ( arg_0 , arg_1 ) : check_type ( arg_1 , dict , may_be_none = False ) arg_0 . _req_session . headers . update ( arg_1 )

def Func(arg_0, arg_1):
        """Update the HTTP headers used for requests in this session.

        Note: Updates provided by the dictionary passed as the `headers`
        parameter to this method are merged into the session headers by adding
        new key-value pairs and/or updating the values of existing keys. The
        session headers are not replaced by the provided dictionary.

        Args:
             headers(dict): Updates to the current session headers.

        """
        check_type(arg_1, dict, may_be_none=False)
        arg_0._req_session.headers.update(arg_1)

Update the HTTP headers used for requests in this session .


(self, zone, resource_id, project_id=None)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None ) : arg_4 = arg_0 . get_conn ( ) . instanceGroupManagers ( ) . get ( project = arg_3 , arg_1 = arg_1 , instanceGroupManager = arg_2 ) . execute ( num_retries = arg_0 . num_retries ) return arg_4

def Func(arg_0, arg_1, arg_2, arg_3=None):
        """
        Retrieves Instance Group Manager by project_id, zone and resource_id.
        Must be called with keyword arguments rather than positional.

        :param zone: Google Cloud Platform zone where the Instance Group Manager exists
        :type zone: str
        :param resource_id: Name of the Instance Group Manager
        :type resource_id: str
        :param project_id: Optional, Google Cloud Platform project ID where the
            Compute Engine Instance exists. If set to None or missing,
            the default project_id from the GCP connection is used.
        :type project_id: str
        :return: Instance group manager representation as object according to
            https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers
        :rtype: dict
        """
        arg_4 = arg_0.get_conn().instanceGroupManagers().get(
            project=arg_3,
            arg_1=arg_1,
            instanceGroupManager=arg_2
        ).execute(num_retries=arg_0.num_retries)
        return arg_4

Retrieves Instance Group Manager by project_id zone and resource_id . Must be called with keyword arguments rather than positional .


def Func ( arg_0 ) : for arg_1 in arg_0 : arg_2 = arg_1 . offsets [ OffsetType . CHARS ] yield arg_2 . first , arg_2 . first + arg_2 . length

def Func(arg_0):
    '''Convert character ``Offset``s to character ranges.'''
    for arg_1 in arg_0:
        arg_2 = arg_1.offsets[OffsetType.CHARS]
        yield arg_2.first, arg_2.first + arg_2.length

Convert character Offset s to character ranges .


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

def Func(arg_0, arg_1=''):
    """
    Returns absolute paths of folders that match the regex within folder_path and
    all its children folders.

    Note: The regex matching is done using the match function
    of the re module.

    Parameters
    ----------
    folder_path: string

    regex: string

    Returns
    -------
    A list of strings.
    """
    arg_2 = []
    for arg_3, arg_4, arg_5 in os.walk(arg_0):
        arg_2.extend([op.join(arg_3, arg_6) for arg_6 in arg_4
                        if re.match(arg_1, arg_6)])

    return arg_2

Returns absolute paths of folders that match the regex within folder_path and all its children folders .


def Func(arg_0, arg_1):
        """
        Add extensions to the certificate signing request.

        :param extensions: The X.509 extensions to add.
        :type extensions: iterable of :py:class:`X509Extension`
        :return: ``None``
        """
        arg_2 = _lib.sk_X509_EXTENSION_new_null()
        _openssl_assert(arg_2 != _ffi.NULL)

        arg_2 = _ffi.gc(arg_2, _lib.sk_X509_EXTENSION_free)

        for arg_3 in arg_1:
            if not isinstance(arg_3, X509Extension):
                raise ValueError("One of the elements is not an X509Extension")

            # TODO push can fail (here and elsewhere)
            _lib.sk_X509_EXTENSION_push(arg_2, arg_3._extension)

        arg_4 = _lib.X509_REQ_Func(arg_0._req, arg_2)
        _openssl_assert(arg_4 == 1)

Add extensions to the certificate signing request .


(segmentation_mask, onset_fronts, offset_fronts, onset_front_id, offset_front_id_most_overlap)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """
    Returns an updated segmentation mask such that the input `segmentation_mask` has been updated by segmenting between
    `onset_front_id` and `offset_front_id`, as found in `onset_fronts` and `offset_fronts`, respectively.

    This function also returns the onset_fronts and offset_fronts matrices, updated so that any fronts that are of
    less than 3 channels wide are removed.

    This function also returns a boolean value indicating whether the onset channel went to completion.

    Specifically, segments by doing the following:

    - Going across frequencies in the onset_front,
    - add the segment mask ID (the onset front ID) to all samples between the onset_front and the offset_front,
      if the offset_front is in that frequency.

    Possible scenarios:

    Fronts line up completely:

    ::

        |   |       S S S
        |   |  =>   S S S
        |   |       S S S
        |   |       S S S

    Onset front starts before offset front:

    ::

        |           |
        |   |       S S S
        |   |  =>   S S S
        |   |       S S S

    Onset front ends after offset front:

    ::

        |   |       S S S
        |   |  =>   S S S
        |   |       S S S
        |           |

    Onset front starts before and ends after offset front:

    ::

        |           |
        |   |  =>   S S S
        |   |       S S S
        |           |

    The above three options in reverse:

    ::

            |       |S S|           |
        |S S|       |S S|       |S S|
        |S S|       |S S|       |S S|
        |S S|           |           |

    There is one last scenario:

    ::

        |   |
        \   /
         \ /
         / \
        |   |

    Where the offset and onset fronts cross one another. If this happens, we simply
    reverse the indices and accept:

    ::

        |sss|
        \sss/
         \s/
         /s\
        |sss|

    The other option would be to destroy the offset front from the crossover point on, and
    then search for a new offset front for the rest of the onset front.
    """
    # Get the portions of the onset and offset fronts that overlap and are consecutive
    arg_5, arg_6 = _get_consecutive_and_overlapping_fronts(arg_1, arg_2, arg_3, arg_4)
    arg_7 = _get_front_idxs_from_id(arg_1, arg_3)
    arg_8 = _get_front_idxs_from_id(arg_2, arg_4)
    arg_9 = "Onset front {} and offset front {} result in consecutive overlapping portions of (on) {} and (off) {}, one of which is empty".format(
        arg_7, arg_8, arg_5, arg_6
    )
    assert arg_5, arg_9
    assert arg_6, arg_9
    arg_7 = arg_5
    arg_8 = arg_6

    # Figure out which frequencies will go in the segment
    arg_10, arg_11 = arg_7[0]
    arg_12, arg_13 = arg_7[-1]
    arg_14, arg_15 = arg_8[0]
    arg_16, arg_17 = arg_8[-1]
    arg_18 = max(arg_10, arg_14)
    arg_19 = min(arg_12, arg_16)

    # Update all the masks with the segment
    for arg_20, arg_21 in enumerate(arg_0[arg_18:arg_19 + 1, :], start=arg_18):
        assert arg_20 >= arg_18, "Frequency index is {}, but we should have started at {}".format(arg_20, arg_18)
        assert (arg_20 - arg_18) < len(arg_7), "Frequency index {} minus starting frequency {} is too large for nfrequencies {} in onset front {}".format(
            arg_20, arg_18, len(arg_7), arg_7
        )
        assert (arg_20 - arg_18) < len(arg_8), "Frequency index {} minus starting frequency {} is too large for nfrequencies {} in offset front {}".format(
            arg_20, arg_18, len(arg_8), arg_8
        )
        arg_22, arg_23 = arg_7[arg_20 - arg_18]
        arg_22, arg_24 = arg_8[arg_20 - arg_18]
        if arg_23 > arg_24:
            arg_24, arg_23 = arg_23, arg_24
        assert arg_24 >= arg_23
        arg_0[arg_20, arg_23:arg_24 + 1] = arg_3
        arg_1[arg_20, (arg_23 + 1):(arg_24 + 1)] = 0
        arg_2[arg_20, (arg_23 + 1):(arg_24 + 1)] = 0
    arg_25 = (arg_20 - arg_18) + 1

    # Update the other masks to delete fronts that have been used
    arg_26 = np.arange(arg_18, arg_19 + 1, 1, dtype=np.int64)
    arg_27 = np.array([s for arg_22, s in arg_7])
    arg_28 = arg_27[:arg_25]
    arg_29 = np.array([s for arg_22, s in arg_8])
    arg_30 = arg_29[:arg_25]

    ## Remove the offset front from where we started to where we ended
    arg_2[arg_26[:arg_25], arg_30] = 0

    ## Remove the onset front from where we started to where we ended
    arg_1[arg_26[:arg_25], arg_28] = 0

    # Determine if we matched the entire onset front by checking if there is any more of this onset front in onset_fronts
    arg_31 = arg_3 not in np.unique(arg_1)

    return arg_31

Returns an updated segmentation mask such that the input segmentation_mask has been updated by segmenting between onset_front_id and offset_front_id as found in onset_fronts and offset_fronts respectively .


def Func ( arg_0 ) : arg_1 = arg_0 . get_data ( "volumes/%s/snapshots/" % arg_0 . id ) arg_2 = list ( ) for arg_3 in arg_1 [ u'snapshots' ] : arg_4 = Snapshot ( ** arg_3 ) arg_4 . token = arg_0 . token arg_2 . append ( arg_4 ) return arg_2

def Func(arg_0):
        """
        Retrieve the list of snapshots that have been created from a volume.

        Args:
        """
        arg_1 = arg_0.get_data("volumes/%s/snapshots/" % arg_0.id)
        arg_2 = list()
        for arg_3 in arg_1[u'snapshots']:
            arg_4 = Snapshot(**arg_3)
            arg_4.token = arg_0.token
            arg_2.append(arg_4)

        return arg_2

Retrieve the list of snapshots that have been created from a volume .


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
_get_config
(
'Env'
)
if
arg_1
is
not
:
if
not
isinstance
(
arg_1
,
list
)
:
arg_1
=
[
arg_1
]
arg_2
=
[
]
for
arg_3
in
arg_1
:
arg_3
=
re
.
findall
(
"(?P<var_name>.+?)=(?P<var_value>.+)"
,
arg_3
)
arg_3
=
[
'export %s="%s"'
%
(
x
[
0
]
,
x
[
1
]
)
for
x
in
arg_3
]
arg_2
=
arg_2
+
arg_3
arg_1
=
"\n"
.
join
(
arg_2
)
bot
.
verbose3
(
"Found Docker container environment!"
)
return
arg_1

def Func(arg_0):
    '''extract the environment from the manifest, or return None.
       Used by functions env_extract_image, and env_extract_tar
    '''
    arg_1 = arg_0._get_config('Env')
    if arg_1 is not None:
        if not isinstance(arg_1, list):
            arg_1 = [arg_1]

        arg_2 = []
        for arg_3 in arg_1:
            arg_3 = re.findall("(?P<var_name>.+?)=(?P<var_value>.+)", arg_3)
            arg_3 = ['export %s="%s"' % (x[0], x[1]) for x in arg_3]
            arg_2 = arg_2 + arg_3

        arg_1 = "\n".join(arg_2)
        bot.verbose3("Found Docker container environment!")
    return arg_1

extract the environment from the manifest or return None . Used by functions env_extract_image and env_extract_tar


def
Func
(
arg_0
)
:
arg_1
=
{
}
try
:
for
arg_2
,
arg_3
in
six
.
iteritems
(
arg_0
)
:
if
not
isinstance
(
arg_2
,
six
.
binary_type
)
:
arg_2
=
str
(
arg_2
)
if
not
isinstance
(
arg_3
,
six
.
binary_type
)
:
arg_3
=
str
(
arg_3
)
arg_1
[
arg_4
.
_to_bytes
(
arg_2
)
]
=
arg_4
.
_to_bytes
(
arg_3
)
except
UnicodeEncodeError
:
from
oauth2client
.
client
import
NonAsciiHeaderError
raise
NonAsciiHeaderError
(
arg_2
,
': '
,
arg_3
)
return
arg_1

def Func(arg_0):
    """Forces header keys and values to be strings, i.e not unicode.

    The httplib module just concats the header keys and values in a way that
    may make the message header a unicode string, which, if it then tries to
    contatenate to a binary request body may result in a unicode decode error.

    Args:
        headers: dict, A dictionary of headers.

    Returns:
        The same dictionary but with all the keys converted to strings.
    """
    arg_1 = {}
    try:
        for arg_2, arg_3 in six.iteritems(arg_0):
            if not isinstance(arg_2, six.binary_type):
                arg_2 = str(arg_2)
            if not isinstance(arg_3, six.binary_type):
                arg_3 = str(arg_3)
            arg_1[arg_4._to_bytes(arg_2)] = arg_4._to_bytes(arg_3)
    except UnicodeEncodeError:
        from oauth2client.client import NonAsciiHeaderError
        raise NonAsciiHeaderError(arg_2, ': ', arg_3)
    return arg_1

Forces header keys and values to be strings i . e not unicode .


def Func ( ) : arg_0 = [ ] for arg_1 in os . listdir ( COMMAND_MODULE_PATH ) : if os . path . isfile ( os . path . join ( COMMAND_MODULE_PATH , arg_1 ) ) and arg_1 . endswith ( COMMAND_MODULE_SUFFIX ) : arg_0 . append ( arg_1 [ : - len ( COMMAND_MODULE_SUFFIX ) ] ) return arg_0

def Func():
    """
    Returns a list of command names supported
    """
    arg_0 = []
    for arg_1 in os.listdir(COMMAND_MODULE_PATH):
        if os.path.isfile(os.path.join(COMMAND_MODULE_PATH, arg_1)) and arg_1.endswith(COMMAND_MODULE_SUFFIX):
            arg_0.append(arg_1[:-len(COMMAND_MODULE_SUFFIX)])
    return arg_0


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . get ( 'key' , '' ) if arg_1 [ 'content_type' ] == 'program' : arg_2 = arg_1 . get ( 'uuid' , '' ) return arg_2

def Func(arg_0, arg_1):
        """
        Return the id for the given content_metadata_item, `uuid` for programs or `key` for other content
        """
        arg_2 = arg_1.get('key', '')
        if arg_1['content_type'] == 'program':
            arg_2 = arg_1.get('uuid', '')
        return arg_2

Return the id for the given content_metadata_item uuid for programs or key for other content


def Func ( arg_0 ) : if arg_0 . fetcher is not None : arg_0 . shutdown_network ( ) arg_0 . finalizer . atexit = False

def Func(arg_0):
        ''' Close the network connection and perform any other required cleanup

            Note:
                Auto Funcd when using goose as a context manager or when garbage collected '''
        if arg_0.fetcher is not None:
            arg_0.shutdown_network()
        arg_0.finalizer.atexit = False

Close the network connection and perform any other required cleanup

            Note:
                Auto closed when using goose as a context manager or when garbage collected


(self, start_time, end_time, strict=False)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = False ) : arg_4 = AnnotationArray ( ) for arg_5 in arg_0 : arg_4 . append ( arg_5 . Func ( arg_1 , arg_2 , arg_3 = arg_3 ) ) return arg_4

def Func(arg_0, arg_1, arg_2, arg_3=False):
        '''
        Slice every annotation contained in the annotation array using
        `Annotation.Func`
        and return as a new AnnotationArray

        See `Annotation.Func` for details about slicing. This function does
        not modify the annotations in the original annotation array.

        Parameters
        ----------
        start_time : float
            The desired start time for slicing in seconds.
        end_time
            The desired end time for slicing in seconds. Must be greater than
            ``start_time``.
        strict : bool
            When ``False`` (default) observations that lie at the boundaries of
            the slicing range (see `Annotation.Func` for details) will have
            their time and/or duration adjusted such that only the part of the
            observation that lies within the trim range is kept. When ``True``
            such observations are discarded and not included in the Funcd
            annotation.

        Returns
        -------
        Funcd_array : AnnotationArray
            An annotation array where every annotation has been Funcd.
        '''
        arg_4 = AnnotationArray()
        for arg_5 in arg_0:
            arg_4.append(arg_5.Func(arg_1, arg_2, arg_3=arg_3))

        return arg_4

Slice every annotation contained in the annotation array using
        `Annotation.slice`
        and return as a new AnnotationArray

        See `Annotation.slice` for details about slicing. This function does
        not modify the annotations in the original annotation array.

        Parameters
        ----------
        start_time : float
            The desired start time for slicing in seconds.
        end_time
            The desired end time for slicing in seconds. Must be greater than
            ``start_time``.
        strict : bool
            When ``False`` (default) observations that lie at the boundaries of
            the slicing range (see `Annotation.slice` for details) will have
            their time and/or duration adjusted such that only the part of the
            observation that lies within the trim range is kept. When ``True``
            such observations are discarded and not included in the sliced
            annotation.

        Returns
        -------
        sliced_array : AnnotationArray
            An annotation array where every annotation has been sliced.

Slice every annotation contained in the annotation array using Annotation . slice and return as a new AnnotationArray


def Func ( arg_0 ) : arg_1 = c_void_p ( ) _WinHttpRequest . _StatusText ( arg_0 , byref ( arg_1 ) ) arg_1 = ctypes . cast ( arg_1 , c_wchar_p ) Func = arg_1 . value _SysFreeString ( arg_1 ) return Func

def Func(arg_0):
        ''' Gets status text of response. '''

        arg_1 = c_void_p()
        _WinHttpRequest._StatusText(arg_0, byref(arg_1))
        arg_1 = ctypes.cast(arg_1, c_wchar_p)
        Func = arg_1.value
        _SysFreeString(arg_1)
        return Func


def
Func
(
arg_0
)
:
try
:
arg_1
,
arg_2
,
arg_3
=
arg_0
.
split
(
"-"
)
except
ValueError
:
try
:
arg_1
,
arg_2
,
arg_3
=
arg_0
.
split
(
" "
)
except
ValueError
:
return
arg_0
try
:
arg_4
=
datetime
(
int
(
arg_1
)
,
int
(
arg_2
)
,
int
(
arg_3
)
)
except
TypeError
:
return
arg_0
return
arg_4
.
strftime
(
"%d %b %Y"
)

def Func(arg_0):
    """Convert a date-value to the ISO date standard for humans."""
    try:
        arg_1, arg_2, arg_3 = arg_0.split("-")
    except ValueError:
        # Not separated by "-". Space?
        try:
            arg_1, arg_2, arg_3 = arg_0.split(" ")
        except ValueError:
            # What gives? OK, lets just return as is
            return arg_0

    try:
        arg_4 = datetime(int(arg_1), int(arg_2), int(arg_3))
    except TypeError:
        return arg_0
    return arg_4.strftime("%d %b %Y")

Convert a date - value to the ISO date standard for humans .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
DB
.
type
(
arg_1
)
.
decode
(
)
if
arg_2
==
'set'
:
arg_3
=
DB
.
smembers
(
arg_1
)
elif
arg_2
==
'string'
:
arg_3
=
DB
.
get
(
arg_1
)
else
:
arg_3
=
'Unsupported type {}'
.
format
(
arg_2
)
print
(
'type:'
,
magenta
(
arg_2
)
)
print
(
'value:'
,
white
(
arg_3
)
)

def Func(arg_0, arg_1):
        """Print raw content of a DB key.
        DBKEY g|u09tyzfe"""
        arg_2 = DB.type(arg_1).decode()
        if arg_2 == 'set':
            arg_3 = DB.smembers(arg_1)
        elif arg_2 == 'string':
            arg_3 = DB.get(arg_1)
        else:
            arg_3 = 'Unsupported type {}'.format(arg_2)
        print('type:', magenta(arg_2))
        print('value:', white(arg_3))

Print raw content of a DB key . DBKEY g|u09tyzfe


def Func ( arg_0 , arg_1 ) : arg_1 . endlexpos = arg_1 . lexpos + len ( arg_1 . value ) return arg_1

def Func(arg_0, arg_1):
        r"\+"
        arg_1.endlexpos = arg_1.lexpos + len(arg_1.value)
        return arg_1


def Func ( arg_0 ) : from melody . inputs import create_input arg_1 = create_input ( arg_0 , template_name = "input.mdp" ) arg_2 = True arg_3 = None if arg_2 : arg_3 = { "rate" : { "value" : 35 , "units" : "ns/day" } , } return arg_2 , arg_3

def Func(arg_0):
    '''Set the gromacs input data using the supplied input options, run
    gromacs and extract and return the required outputs.'''

    from melody.inputs import create_input
    arg_1 = create_input(arg_0, template_name="input.mdp")

    # save the input file in the appropriate place and Func gromacs using
    # longbow ...

    # determine if the run was successful
    arg_2 = True

    arg_3 = None
    if arg_2:
        # extract the required outputs
        arg_3 = {"rate": {"value": 35, "units": "ns/day"}, }

    return arg_2, arg_3

Set the gromacs input data using the supplied input options run gromacs and extract and return the required outputs .


(self, query, change, scope_unit, scope_count)

return self._api_post(
            url=query_url.format(account_id=self.account_id),
            data=json.dumps(query_data, sort_keys=True)
        )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """
        Create the scheduled query
        """
        arg_5 = {
            'scheduled_query': {
                'name': 'ForAnomalyReport',
                'query': arg_1,
                'threshold_type': '%',
                'threshold_value': arg_2,
                'time_period': arg_3.title(),
                'time_value': arg_4,
            }
        }

        arg_6 = 'https://logentries.com/rest/{account_id}/api/scheduled_queries'

        return arg_0._api_post(
            url=arg_6.format(account_id=arg_0.account_id),
            data=json.dumps(arg_5, sort_keys=True)
        )


def Func ( arg_0 , arg_1 ) : assert arg_1 is not None arg_0 . test ( ) for arg_2 in arg_0 . locks : arg_3 = arg_1 . workflow . _get_mutex ( arg_2 ) if not arg_3 . testandset ( ) : return for arg_4 in arg_0 . pre_assign : arg_4 . assign ( arg_1 , arg_1 ) arg_0 . Func_before_hook ( arg_1 ) arg_0 . reached_event . emit ( arg_1 . workflow , arg_1 ) arg_0 . Func_hook ( arg_1 ) if arg_0 . ready_event . emit ( arg_1 . workflow , arg_1 ) : for arg_4 in arg_0 . post_assign : arg_4 . assign ( arg_1 , arg_1 ) for arg_2 in arg_0 . locks : arg_3 = arg_1 . workflow . _get_mutex ( arg_2 ) arg_3 . unlock ( ) arg_0 . finished_event . emit ( arg_1 . workflow , arg_1 )

def Func(arg_0, arg_1):
        """
        Return True on success, False otherwise.

        :type  my_task: Task
        :param my_task: The associated task in the task tree.
        """
        assert arg_1 is not None
        arg_0.test()

        # Acquire locks, if any.
        for arg_2 in arg_0.locks:
            arg_3 = arg_1.workflow._get_mutex(arg_2)
            if not arg_3.testandset():
                return

        # Assign variables, if so requested.
        for arg_4 in arg_0.pre_assign:
            arg_4.assign(arg_1, arg_1)

        # Run task-specific code.
        arg_0.Func_before_hook(arg_1)
        arg_0.reached_event.emit(arg_1.workflow, arg_1)
        arg_0.Func_hook(arg_1)

        # Run user code, if any.
        if arg_0.ready_event.emit(arg_1.workflow, arg_1):
            # Assign variables, if so requested.
            for arg_4 in arg_0.post_assign:
                arg_4.assign(arg_1, arg_1)

        # Release locks, if any.
        for arg_2 in arg_0.locks:
            arg_3 = arg_1.workflow._get_mutex(arg_2)
            arg_3.unlock()

        arg_0.finished_event.emit(arg_1.workflow, arg_1)

Return True on success False otherwise .


return [name for _, name, is_pkg in pkgutil.iter_modules([command_dir])
            if not is_pkg and not name.startswith('_')]

def Func ( arg_0 : arg_1 ) -> List [ arg_1 ] : if not arg_0 : return [ ] return [ arg_3 for arg_2 , arg_3 , arg_4 in pkgutil . iter_modules ( [ arg_0 ] ) if not arg_4 and not arg_3 . startswith ( '_' ) ]

def Func(arg_0: arg_1) -> List[arg_1]:
    """
    Get all command names in the a folder

    :return: List of commands names
    """
    if not arg_0:
        return []

    return [arg_3 for arg_2, arg_3, arg_4 in pkgutil.iter_modules([arg_0])
            if not arg_4 and not arg_3.startswith('_')]


def Func ( arg_0 , arg_1 ) : arg_2 = None arg_3 = [ ] for arg_2 , arg_4 in enumerate ( arg_1 ) : arg_5 = arg_0 . _get_group_signature_error ( arg_4 , SUPPORTED_SPONGE ) if arg_5 : arg_3 . append ( arg_5 ) break if arg_3 and LEGACY_SPONGE : for arg_4 in arg_1 : if arg_0 . _get_group_signature_error ( arg_4 , LEGACY_SPONGE ) : break else : return [ ] arg_3 . extend ( filter ( None , ( arg_0 . _get_group_signature_error ( arg_4 , SUPPORTED_SPONGE ) for arg_4 in arg_1 [ arg_2 + 1 : ] ) ) ) return arg_3

def Func(arg_0, arg_1):
        # type: (List[List[Transaction]]) -> List[Text]
        """
        Validates the signature fragments in the bundle.

        :return:
            List of error messages.
            If empty, signature fragments are valid.
        """
        # Start with the currently-supported hash algo.
        arg_2 = None
        arg_3 = []
        for arg_2, arg_4 in enumerate(arg_1):
            arg_5 = arg_0._get_group_signature_error(arg_4, SUPPORTED_SPONGE)
            if arg_5:
                arg_3.append(arg_5)

                # Pause and retry with the legacy algo.
                break

        # If validation failed, then go back and try with the legacy
        # algo (only applies if we are currently transitioning to a new
        # algo).
        if arg_3 and LEGACY_SPONGE:
            for arg_4 in arg_1:
                # noinspection PyTypeChecker
                if arg_0._get_group_signature_error(arg_4, LEGACY_SPONGE):
                    # Legacy algo doesn't work, either; no point in
                    # continuing.
                    break
            else:
                # If we get here, then we were able to validate the
                # signature fragments successfully using the legacy
                # algorithm.
                return []

        # If we get here, then validation also failed when using the
        # legacy algorithm.

        # At this point, we know that the bundle is invalid, but we will
        # continue validating with the supported algorithm anyway, so
        # that we can return an error message for every invalid input.
        arg_3.extend(filter(None, (
            arg_0._get_group_signature_error(arg_4, SUPPORTED_SPONGE)
            for arg_4 in arg_1[arg_2 + 1:]
        )))

        return arg_3

Validates the signature fragments in the bundle .


return pixelization_util.voronoi_neighbors_from_pixels_and_ridge_points(pixels=pixels,
                                                                                ridge_points=np.asarray(ridge_points))

def Func(arg_0, arg_1, arg_2):
        """Compute the neighbors of every Voronoi pixel as an ndarray of the pixel index's each pixel shares a \
        vertex with.

        The ridge points of the Voronoi grid are used to derive this.

        Parameters
        ----------
        ridge_points : scipy.spatial.Voronoi.ridge_points
            Each Voronoi-ridge (two indexes representing a pixel mapping_matrix).
        """
        return pixelization_util.voronoi_neighbors_from_pixels_and_ridge_points(arg_1=arg_1,
                                                                                arg_2=np.asarray(arg_2))

Compute the neighbors of every Voronoi pixel as an ndarray of the pixel index s each pixel shares a \ vertex with .


def
Func
(
arg_0
,
arg_1
)
:
if
arg_1
in
range
(
1
,
10
)
:
arg_2
=
arg_1
1
else
:
raise
IllegalInput
(
"Invalid Value for ATR %s"
%
(
hex
(
arg_1
)
)
)
if
arg_2
>
1
:
arg_0
.
curr_script
=
arg_2
arg_0
.
delta
=
arg_2
*
DELTA
return

def Func(arg_0, arg_1):
        """
        set the value of delta to reflect the current codepage

        """

        if arg_1 in range(1, 10):
            arg_2 = arg_1 - 1
        else:
            raise IllegalInput("Invalid Value for ATR %s" % (hex(arg_1)))

        if arg_2 > -1: # n = -1 is the default script ..
            arg_0.curr_script = arg_2
            arg_0.delta = arg_2 * DELTA

        return


return BusinessDate.from_ymd(self.year, month_int, min(l, self.day))

def Func(arg_0, arg_1):
        """
        addition of a number of months

        :param BusinessDate d:
        :param int month_int:
        :return bankdate:
        """

        arg_1 += arg_0.month
        while arg_1 > 12:
            arg_0 = BusinessDate.add_years(arg_0, 1)
            arg_1 -= 12
        while arg_1 < 1:
            arg_0 = BusinessDate.add_years(arg_0, -1)
            arg_1 += 12
        arg_2 = monthrange(arg_0.year, arg_1)[1]
        return BusinessDate.from_ymd(arg_0.year, arg_1, min(arg_2, arg_0.day))


def Func(arg_0, arg_1, arg_2=None):
    """Open a subprocess and stream its output without hard-blocking.

    :param cmd: the command to execute within the subprocess
    :type cmd: str

    :param callback: function that intakes the subprocess' stdout line by line.
        It is called for each line received from the subprocess' stdout stream.
    :type callback: Callable[[Context], bool]

    :param timeout: the timeout time of the subprocess
    :type timeout: float

    :raises TimeoutError: if the subprocess' execution time exceeds
        the timeout time

    :return: the return code of the executed subprocess
    :rtype: int
    """
    if os.name == 'nt':  # pragma: no cover
        arg_3 = subprocess.Popen(
            shlex.split(arg_0),
            arg_4=subprocess.PIPE,
            stderr=subprocess.PIPE
        )
        arg_4 = arg_3.stdout
    else:
        arg_5, arg_6 = os.openpty()
        arg_3 = subprocess.Popen(
            shlex.split(arg_0, posix=True),
            arg_4=arg_6,
            stderr=arg_6
        )
        arg_4 = os.fdopen(arg_5)
        os.close(arg_6)

    def kill(arg_7):
        """Kill the specified process on Timer completion"""
        try:
            arg_7.kill()
        except OSError:
            pass

    # python 2-3 agnostic process timer
    arg_8 = Timer(arg_2, kill, [arg_3])
    arg_8.setDaemon(True)
    arg_8.start()

    while arg_3.returncode is None:
        try:
            if os.name == 'nt':  # pragma: no cover
                arg_9 = arg_4.readline()
                # windows gives readline() raw stdout as a b''
                # need to decode it
                arg_9 = arg_9.decode("utf-8")
                if arg_9:  # ignore empty strings and None
                    arg_1(arg_9.rstrip())
            else:
                while True:
                    arg_9 = arg_4.readline()
                    if not arg_9:
                        break
                    arg_1(arg_9.rstrip())
        except (IOError, OSError):
            # This seems to happen on some platforms, including TravisCI.
            # It seems like it's ok to just let this pass here, you just
            # won't get as nice feedback.
            pass
        if not arg_8.is_alive():
            raise TimeoutError("subprocess running command '{}' timed out after {} seconds".format(arg_0, arg_2))
        arg_3.poll()

    # we have returned from the subprocess cancel the timer if it is running
    arg_8.cancel()

    return arg_3.returncode

Open a subprocess and stream its output without hard - blocking .


def Func ( arg_0 ) : arg_0 . bmp = arg_0 . obj . snapshot ( ) arg_0 . Raise ( ) arg_0 . Show ( ) arg_0 . Refresh ( )

def Func(arg_0):
        "Capture the new control superficial image after an update"
        arg_0.bmp = arg_0.obj.snapshot()
        # change z-order to overlap controls (windows) and show the image:
        arg_0.Raise()
        arg_0.Show()
        arg_0.Refresh()


def Func(arg_0):
    """
    Get Identity Provider with given id.

    Return:
        Instance of ProviderConfig or None.
    """
    try:
        from third_party_auth.provider import arg_1   # pylint: disable=redefined-outer-name
    except ImportError as exception:
        LOGGER.warning("Could not import Registry from third_party_auth.provider")
        LOGGER.warning(exception)
        arg_1 = None  # pylint: disable=redefined-outer-name

    try:
        return arg_1 and arg_1.get(arg_0)
    except ValueError:
        return None


def Func ( arg_0 ) : for arg_1 , arg_2 in arg_0 . strategy . iteritems ( ) : if arg_1 == CONF . QUARK . public_net_id : return arg_1 return None

def Func(arg_0):
        """Returns the public net id"""
        for arg_1, arg_2 in arg_0.strategy.iteritems():
            if arg_1 == CONF.QUARK.public_net_id:
                return arg_1
        return None


(self, packageName, filterByDevice=False, sort=2,
                nb_results=None, offset=None)

def Func ( arg_0 , arg_1 , arg_2 = False , arg_3 = 2 , arg_4 = None , arg_5 = None ) : arg_6 = REVIEWS_URL + "?doc={}&sort={}" . format ( requests . utils . quote ( arg_1 ) , arg_3 ) if arg_4 is not None : arg_6 += "&n={}" . format ( arg_4 ) if arg_5 is not None : arg_6 += "&o={}" . format ( arg_5 ) if arg_2 : arg_6 += "&dfil=1" arg_7 = arg_0 . executeRequestApi2 ( arg_6 ) arg_8 = [ ] for arg_9 in arg_7 . payload . reviewResponse . getResponse . review : arg_8 . append ( utils . parseProtobufObj ( arg_9 ) ) return arg_8

def Func(arg_0, arg_1, arg_2=False, arg_3=2,
                arg_4=None, arg_5=None):
        """Browse Func for an application

        Args:
            packageName (str): app unique ID.
            filterByDevice (bool): filter results for current device
            sort (int): sorting criteria (values are unknown)
            nb_results (int): max number of Func to return
            offset (int): return Func starting from an offset value

        Returns:
            dict object containing all the protobuf data returned from
            the api
        """
        # TODO: select the number of Func to return
        arg_6 = REVIEWS_URL + "?doc={}&sort={}".format(requests.utils.quote(arg_1), arg_3)
        if arg_4 is not None:
            arg_6 += "&n={}".format(arg_4)
        if arg_5 is not None:
            arg_6 += "&o={}".format(arg_5)
        if arg_2:
            arg_6 += "&dfil=1"
        arg_7 = arg_0.executeRequestApi2(arg_6)
        arg_8 = []
        for arg_9 in arg_7.payload.reviewResponse.getResponse.review:
            arg_8.append(utils.parseProtobufObj(arg_9))
        return arg_8

Browse reviews for an application

        Args:
            packageName (str): app unique ID.
            filterByDevice (bool): filter results for current device
            sort (int): sorting criteria (values are unknown)
            nb_results (int): max number of reviews to return
            offset (int): return reviews starting from an offset value

        Returns:
            dict object containing all the protobuf data returned from
            the api


Returns mesh quality and geometric stats.

return pd.concat([cv , angles[["stats"]], edges[["stats"]] ],
                     axis = 1).sort_index(axis = 1)

def Func ( arg_0 ) : arg_1 = arg_0 . centroids_and_volumes ( ) arg_2 = arg_0 . angles ( ) arg_3 = arg_0 . edges ( ) return pd . concat ( [ arg_1 , arg_2 [ [ "Func" ] ] , arg_3 [ [ "Func" ] ] ] , axis = 1 ) . sort_index ( axis = 1 )

def Func(arg_0):
    """
    Returns mesh quality and geometric Func.
    """
    arg_1 = arg_0.centroids_and_volumes()
    arg_2  = arg_0.angles()
    arg_3 = arg_0.edges()
    return pd.concat([arg_1 , arg_2[["Func"]], arg_3[["Func"]] ],
                     axis = 1).sort_index(axis = 1)

Returns mesh quality and geometric stats .


def Func(arg_0, *arg_1):
        """Update home info."""
        arg_2 = asyncio.get_event_loop()
        arg_3 = arg_2.create_task(arg_0.update_info())
        arg_2.run_until_complete(arg_3)


def Func(arg_0, arg_1, arg_2):
        """Distributes system messages to the appropriate handler.

        System messages include everything that arrives as a dict,
        or a list containing a heartbeat.

        :param data:
        :param ts:
        :return:
        """
        arg_0.log.debug("Func(): Received a system message: %s", arg_1)
        # Unpack the data
        arg_3 = arg_1.pop('event')
        if arg_3 == 'pong':
            arg_0.log.debug("Func(): Distributing %s to _pong_handler..",
                      arg_1)
            arg_0._pong_handler()
        elif arg_3 == 'info':
            arg_0.log.debug("Func(): Distributing %s to _info_handler..",
                      arg_1)
            arg_0._info_handler(arg_1)
        elif arg_3 == 'error':
            arg_0.log.debug("Func(): Distributing %s to _error_handler..",
                      arg_1)
            arg_0._error_handler(arg_1)
        elif arg_3 in ('subscribed', 'unsubscribed', 'conf', 'auth', 'unauth'):
            arg_0.log.debug("Func(): Distributing %s to "
                           "_response_handler..", arg_1)
            arg_0._response_handler(arg_3, arg_1, arg_2)
        else:
            arg_0.log.error("Unhandled event: %s, data: %s", arg_3, arg_1)

Distributes system messages to the appropriate handler .


def Func(arg_0):
    """Given the name of an app or library, returns all repos that are guaranteed
    to live in the same container"""
    arg_1 = get_expanded_libs_specs()
    arg_2 = arg_1.get_app_or_lib(arg_0)
    return Func_from_spec(arg_2)

Given the name of an app or library returns all repos that are guaranteed to live in the same container


def Func(arg_0, arg_1=0.1):
        """Return a float representing the current process CPU
        utilization as a percentage.

        When interval is > 0.0 compares process times to system CPU
        times elapsed before and after the interval (blocking).

        When interval is 0.0 or None compares process times to system CPU
        times elapsed since last call, returning immediately.
        In this case is recommended for accuracy that this function be
        called with at least 0.1 seconds between calls.
        """
        arg_2 = arg_1 is not None and arg_1 > 0.0
        if arg_2:
            arg_3 = sum(cpu_times())
            arg_4 = arg_0._platform_impl.get_cpu_times()
            time.sleep(arg_1)
            arg_5 = sum(cpu_times())
            arg_6 = arg_0._platform_impl.get_cpu_times()
        else:
            arg_3 = arg_0._last_sys_cpu_times
            arg_4 = arg_0._last_proc_cpu_times
            arg_5 = sum(cpu_times())
            arg_6 = arg_0._platform_impl.get_cpu_times()
            if arg_3 is None or arg_4 is None:
                arg_0._last_sys_cpu_times = arg_5
                arg_0._last_proc_cpu_times = arg_6
                return 0.0

        arg_9 = (arg_6.user - arg_4.user) + (arg_6.system - arg_4.system)
        arg_10 = arg_5 - arg_3
        # reset values for next call in case of interval == None
        arg_0._last_sys_cpu_times = arg_5
        arg_0._last_proc_cpu_times = arg_6

        try:
            # the utilization split between all CPUs
            arg_11 = (arg_9 / arg_10) * 100
        except ZeroDivisionError:
            # interval was too low
            return 0.0
        # the utilization of a single CPU
        arg_12 = arg_11 * NUM_CPUS
        # on posix a percentage > 100 is legitimate
        # http://stackoverflow.com/questions/1032357/comprehending-top-cpu-usage
        # on windows we use this ugly hack to avoid troubles with float
        # precision issues
        if os.name != 'posix':
            if arg_12 > 100.0:
                return 100.0
        return round(arg_12, 1)

Return a float representing the current process CPU utilization as a percentage .


def Func ( arg_0 , arg_1 ) : assert ( arg_0 . _inputDimensions . size == 2 ) arg_2 = arg_0 . _connectedSynapses [ arg_1 ] ( arg_3 , arg_4 ) = arg_2 . reshape ( arg_0 . _inputDimensions ) . nonzero ( ) if arg_3 . size == 0 and arg_4 . size == 0 : return 0 arg_5 = arg_3 . max ( ) - arg_3 . min ( ) + 1 arg_6 = arg_4 . max ( ) - arg_4 . min ( ) + 1 return numpy . average ( [ arg_5 , arg_6 ] )

def Func(arg_0, arg_1):
    """
    The range of connectedSynapses per column, averaged for each dimension.
    This value is used to calculate the inhibition radius. This variation of
    the  function only supports a 2 dimensional column topology.

    Parameters:
    ----------------------------
    :param columnIndex:   The index identifying a column in the permanence,
                          potential and connectivity matrices
    """
    assert(arg_0._inputDimensions.size == 2)
    arg_2 = arg_0._connectedSynapses[arg_1]
    (arg_3, arg_4) = arg_2.reshape(arg_0._inputDimensions).nonzero()
    if  arg_3.size == 0 and arg_4.size == 0:
      return 0
    arg_5 = arg_3.max() - arg_3.min() + 1
    arg_6 = arg_4.max() - arg_4.min() + 1
    return numpy.average([arg_5, arg_6])

The range of connectedSynapses per column averaged for each dimension . This value is used to calculate the inhibition radius . This variation of the function only supports a 2 dimensional column topology .


def Func(arg_0, arg_1):
        """Asserts that the val is not identical to other, via 'is' compare."""
        if arg_0.val is arg_1:
            arg_0._err('Expected <%s> to be not identical to <%s>, but was.' % (arg_0.val, arg_1))
        return arg_0

Asserts that the val is not identical to other via is compare .


def Func(arg_0):
        """
        Creates the full project

        """
        # Func virtualenv
        arg_0.Func_virtualenv()
        # Func project
        arg_0.Func_project()
        # generate uwsgi script
        arg_0.Func_uwsgi_script()
        # generate nginx config
        arg_0.Func_nginx_config()
        # generate management scripts
        arg_0.Func_manage_scripts()
        logging.info('** Make sure to set proper permissions for the webserver user account on the var and log directories in the project root')


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_1
:
arg_3
=
arg_1
[
0
]
arg_4
=
arg_3
.
name
if
arg_3
.
state
:
arg_5
=
arg_3
.
options
(
arg_0
.
state
)
else
:
arg_5
=
arg_3
.
options
for
arg_6
in
arg_5
:
arg_7
=
list
(
arg_2
)
arg_7
.
append
(
{
arg_4
:
arg_6
}
)
arg_0
.
Func
(
arg_1
[
1
:
]
,
arg_7
)
else
:
try
:
arg_8
,
arg_9
=
arg_0
.
_function
(
arg_2
)
except
ValueError
:
raise
RuntimeError
(
"function must return 2 values"
)
print
arg_2
,
arg_8
,
arg_9

def Func(arg_0, arg_1, arg_2):
        '''internal recursion routine called by the run method that generates
        all input combinations'''
        if arg_1:
            arg_3 = arg_1[0]
            arg_4 = arg_3.name
            if arg_3.state:
                arg_5 = arg_3.options(arg_0.state)
            else:
                arg_5 = arg_3.options
            for arg_6 in arg_5:
                arg_7 = list(arg_2)
                arg_7.append({arg_4: arg_6})
                arg_0.Func(arg_1[1:], arg_7)
        else:
            try:
                arg_8, arg_9 = arg_0._function(arg_2)
            except ValueError:
                raise RuntimeError("function must return 2 values")
            print arg_2, arg_8, arg_9


def Func ( arg_0 ) : arg_1 = os . path . expanduser ( '~/.gitconfig' ) if os . path . exists ( arg_1 ) : arg_2 = Parser ( ) arg_2 . read ( arg_1 ) arg_2 . sections ( ) return arg_2 pass

def Func(arg_0):
        """
        try use gitconfig info.
        author,email etc.
        """
        arg_1 = os.path.expanduser('~/.gitconfig')

        if os.path.exists(arg_1):
            arg_2 = Parser()
            arg_2.read(arg_1)
            arg_2.sections()
            return arg_2

        pass

try use gitconfig info . author email etc .


def Func ( arg_0 , arg_1 , arg_2 = 1 ) : arg_3 = arg_0 . shape [ 0 ] - int ( np . ceil ( arg_1 ) ) arg_4 = np . zeros ( ( arg_3 , int ( np . ceil ( arg_0 . shape [ 1 ] * arg_1 ) ) ) ) for arg_5 in range ( arg_3 ) : arg_6 = int ( ( arg_1 % 1 ) * arg_0 . shape [ 1 ] ) arg_4 [ arg_5 , : ] = np . concatenate ( ( arg_0 [ arg_5 : arg_5 + int ( arg_1 ) , : ] . flatten ( ) , arg_0 [ arg_5 + int ( arg_1 ) , : arg_6 ] ) ) return arg_4

def Func(arg_0, arg_1, arg_2=1):
    """Time-delay embedding with m dimensions and tau delays."""
    arg_3 = arg_0.shape[0] - int(np.ceil(arg_1))
    arg_4 = np.zeros((arg_3, int(np.ceil(arg_0.shape[1] * arg_1))))
    for arg_5 in range(arg_3):
        # print X[i:i+m,:].flatten().shape, w, X.shape
        # print Y[i,:].shape
        arg_6 = int((arg_1 % 1) * arg_0.shape[1])  # Reminder for float m
        arg_4[arg_5, :] = np.concatenate((arg_0[arg_5:arg_5 + int(arg_1), :].flatten(),
                                 arg_0[arg_5 + int(arg_1), :arg_6]))
    return arg_4

Time - delay embedding with m dimensions and tau delays .


def Func(arg_0):
    """
    Decorator to cache the result of functions that take a ``user`` and a
    ``size`` value.
    """
    def cache_set(arg_1, arg_2):
        cache.set(arg_1, arg_2, AVATAR_CACHE_TIMEOUT)
        return arg_2

    def cached_func(arg_3, arg_4):
        arg_5 = arg_0.__name__
        cached_funcs.add(arg_5)
        arg_1 = get_cache_key(arg_3, arg_4, arg_5=arg_5)
        return cache.get(arg_1) or cache_set(arg_1, arg_0(arg_3, arg_4))
    return cached_func

Decorator to cache the result of functions that take a user and a size value .


def Func ( ) : try : arg_0 = open ( '/dev/time' , 'r' ) arg_1 , arg_2 , arg_3 , arg_4 = arg_0 . read ( ) . split ( ) arg_0 . close ( ) return float ( arg_3 ) / float ( arg_4 ) except ( IOError , ValueError ) : return None

def Func():
    """Returns uptime in seconds or None, on Plan 9."""
    # Apparently Plan 9 only has Python 2.2, which I'm not prepared to
    # support. Maybe some Linuxes implement /dev/time, though, someone was
    # talking about it somewhere.
    try:
        # The time file holds one 32-bit number representing the sec-
        # onds since start of epoch and three 64-bit numbers, repre-
        # senting nanoseconds since start of epoch, clock ticks, and
        # clock frequency.
        #  -- cons(3)
        arg_0 = open('/dev/time', 'r')
        arg_1, arg_2, arg_3, arg_4 = arg_0.read().split()
        arg_0.close()
        return float(arg_3) / float(arg_4)
    except (IOError, ValueError):
        return None

Returns uptime in seconds or None on Plan 9 .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 ( ) zope . sqlalchemy . register ( arg_2 , arg_1 = arg_1 ) return arg_2

def Func(arg_0, arg_1):
    """
    Get a ``sqlalchemy.orm.Session`` instance backed by a transaction.

    This function will hook the session to the transaction manager which
    will take care of committing any changes.

    - When using pyramid_tm it will automatically be committed or aborted
      depending on whether an exception is raised.

    - When using scripts you should wrap the session in a manager yourself.
      For example::

          import transaction

          engine = get_engine(settings)
          session_factory = get_session_factory(engine)
          with transaction.manager:
              dbsession = Func(session_factory, transaction.manager)

    """
    arg_2 = arg_0()
    zope.sqlalchemy.register(
        arg_2, arg_1=arg_1)
    return arg_2

Get a ``sqlalchemy.orm.Session`` instance backed by a transaction.

    This function will hook the session to the transaction manager which
    will take care of committing any changes.

    - When using pyramid_tm it will automatically be committed or aborted
      depending on whether an exception is raised.

    - When using scripts you should wrap the session in a manager yourself.
      For example::

          import transaction

          engine = get_engine(settings)
          session_factory = get_session_factory(engine)
          with transaction.manager:
              dbsession = get_tm_session(session_factory, transaction.manager)

Get a sqlalchemy . orm . Session instance backed by a transaction .


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = decodeOSC ( arg_1 ) arg_0 . dispatch ( arg_3 , arg_2 )

def Func(arg_0, arg_1, arg_2 = None):
        """Given OSC data, tries to call the callback with the
        right address."""
        arg_3 = decodeOSC(arg_1)
        arg_0.dispatch(arg_3, arg_2)

Given OSC data tries to call the callback with the right address .


def Func(arg_0, arg_1):
        """
        Switch to the given frame.

        If you use this method you are responsible for making sure you switch back to the parent
        frame when done in the frame changed to. :meth:`frame` is preferred over this method and
        should be used when possible. May not be supported by all drivers.

        Args:
            frame (Element | str): The iframe/frame element to switch to.
        """

        if isinstance(arg_1, Element):
            arg_0.driver.Func(arg_1)
            arg_0._scopes.append("frame")
        elif arg_1 == "parent":
            if arg_0._scopes[-1] != "frame":
                raise ScopeError("`Func(\"parent\")` cannot be called "
                                 "from inside a descendant frame's `scope` context.")
            arg_0._scopes.pop()
            arg_0.driver.Func("parent")
        elif arg_1 == "top":
            if "frame" in arg_0._scopes:
                arg_2 = arg_0._scopes.index("frame")
                if any([arg_3 not in ["frame", None] for arg_3 in arg_0._scopes[arg_2:]]):
                    raise ScopeError("`Func(\"top\")` cannot be called "
                                     "from inside a descendant frame's `scope` context.")
                arg_0._scopes = arg_0._scopes[:arg_2]
                arg_0.driver.Func("top")
        else:
            raise ValueError(
                "You must provide a frame element, \"parent\", or \"top\" "
                "when calling Func")


return ((3 - self.slope) / (1 + self.axis_ratio)) * self.einstein_radius ** (self.slope - 1)

def Func ( arg_0 ) : return ( ( 3 - arg_0 . slope ) / ( 1 + arg_0 . axis_ratio ) ) * arg_0 . einstein_radius ** ( arg_0 . slope - 1 )

def Func(arg_0):
        """Rescale the einstein radius by slope and axis_ratio, to reduce its degeneracy with other mass-profiles
        parameters"""
        return ((3 - arg_0.slope) / (1 + arg_0.axis_ratio)) * arg_0.einstein_radius ** (arg_0.slope - 1)

Rescale the einstein radius by slope and axis_ratio to reduce its degeneracy with other mass - profiles parameters


return _MinidomXmlToObject.convert_response_to_feeds(
            response,
            partial(
                _ServiceBusManagementXmlSerializer.xml_to_metrics,
                object_type=MetricRollups
            )
        )

def Func(arg_0, arg_1, arg_2, arg_3):
        '''
        This operation gets rollup data for Service Bus metrics relay.
        Rollup data includes the time granularity for the telemetry aggregation as well as
        the retention settings for each time granularity.

        name:
            Name of the service bus namespace.
        relay_name:
            Name of the service bus relay in this namespace.
        metric:
            name of a supported metric
        '''
        arg_4 = arg_0._perform_get(
            arg_0._get_get_metrics_rollup_relay_path(arg_1, arg_2, arg_3),
            None)

        return _MinidomXmlToObject.convert_response_to_feeds(
            arg_4,
            partial(
                _ServiceBusManagementXmlSerializer.xml_to_metrics,
                object_type=MetricRollups
            )
        )

This operation gets rollup data for Service Bus metrics relay . Rollup data includes the time granularity for the telemetry aggregation as well as the retention settings for each time granularity .


def Func ( arg_0 , * arg_1 ) : arg_2 = 0 if len ( arg_1 ) > 0 : arg_2 = arg_1 [ 0 ] . read ( ) arg_0 . PC = arg_0 . pop ( arg_0 . address_bit_size ) arg_0 . STACK += arg_2

def Func(arg_0, *arg_1):
        """
        Returns from procedure.

        Transfers program control to a return address located on the top of
        the stack. The address is usually placed on the stack by a CALL instruction,
        and the return is made to the instruction that follows the CALL instruction.
        The optional source operand specifies the number of stack bytes to be
        released after the return address is popped; the default is none.

        :param cpu: current CPU.
        :param operands: variable operands list.
        """
        # TODO FIX 64Bit FIX segment
        arg_2 = 0
        if len(arg_1) > 0:
            arg_2 = arg_1[0].read()
        arg_0.PC = arg_0.pop(arg_0.address_bit_size)
        arg_0.STACK += arg_2


def Func(arg_0, arg_1):
        '''
        Transform a list of bag features into its projection series
        representation.

        Parameters
        ----------
        X : :class:`skl_groups.features.Features` or list of bag feature arrays
            New data to Func. The data should all lie in [0, 1];
            use :class:`skl_groups.preprocessing.BagMinMaxScaler` if not.

        Returns
        -------
        X_new : integer array, shape ``[len(X), dim_]``
            X Funced into the new space.
        '''
        arg_0._check_fitted()
        arg_2 = arg_0.smoothness
        arg_3 = arg_0.dim_
        arg_4 = arg_0.inds_
        arg_5 = arg_0.do_bounds_check

        arg_1 = as_features(arg_1)
        if arg_1.dim != arg_3:
            arg_6 = "model fit for dimension {} but got dim {}"
            raise ValueError(arg_6.format(arg_3, arg_1.dim))

        arg_7 = np.empty((len(arg_1), arg_0.inds_.shape[0]))
        arg_7.fill(np.nan)

        if arg_0.basis == 'cosine':  # TODO: put this in a C extension?
            arg_8 = (np.pi * np.arange(arg_2 + 1))[..., :]
            for arg_9, arg_10 in enumerate(arg_1):
                if arg_5:
                    if np.min(arg_10) < 0 or np.max(arg_10) > 1:
                        raise ValueError("Bag {} not in [0, 1]".format(arg_9))

                # apply each phi func to each dataset point: n x dim x M
                arg_11 = arg_8 * arg_10[..., np.newaxis]
                np.cos(arg_11, out=arg_11)
                arg_11[:, :, 1:] *= np.sqrt(2)

                # B is the evaluation of each tensor-prodded basis func
                # at each point: n x inds.shape[0]
                arg_12 = reduce(op.mul, (arg_11[:, arg_9, arg_4[:, arg_9]] for arg_9 in xrange(arg_3)))

                arg_7[arg_9, :] = np.mean(arg_12, axis=0)
        else:
            raise ValueError("unknown basis '{}'".format(arg_0.basis))

        return arg_7

Transform a list of bag features into its projection series
        representation.

        Parameters
        ----------
        X : :class:`skl_groups.features.Features` or list of bag feature arrays
            New data to transform. The data should all lie in [0, 1];
            use :class:`skl_groups.preprocessing.BagMinMaxScaler` if not.

        Returns
        -------
        X_new : integer array, shape ``[len(X), dim_]``
            X transformed into the new space.

Transform a list of bag features into its projection series representation .


(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 reduce_sum ...'
)
arg_7
=
arg_0
[
'keepdims'
]
>
0
arg_8
=
arg_0
[
'axes'
]
def
target_layer
(
arg_9
,
arg_7
=
arg_7
,
arg_8
=
arg_8
)
:
import
keras
.
backend
as
K
return
K
.
sum
(
arg_9
,
arg_7
=
arg_7
,
arg_8
=
arg_8
)
arg_10
=
keras
.
layers
.
Lambda
(
target_layer
)
arg_4
[
arg_2
]
=
arg_10
(
arg_4
[
arg_3
[
0
]
]
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6):
    """
    Convert reduce_sum 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 reduce_sum ...')

    arg_7 = arg_0['keepdims'] > 0
    arg_8 = arg_0['axes']

    def target_layer(arg_9, arg_7=arg_7, arg_8=arg_8):
        import keras.backend as K
        return K.sum(arg_9, arg_7=arg_7, arg_8=arg_8)

    arg_10 = keras.layers.Lambda(target_layer)
    arg_4[arg_2] = arg_10(arg_4[arg_3[0]])


def Func ( arg_0 , arg_1 , arg_2 = None ) : if isinstance ( arg_1 , RequirementsManager ) : arg_1 = list ( arg_1 ) elif not isinstance ( arg_1 , list ) : arg_1 = [ arg_1 ] for arg_3 in arg_1 : arg_4 = arg_3 . project_name if not isinstance ( arg_3 , BumpRequirement ) : arg_3 = BumpRequirement ( arg_3 , arg_2 = arg_2 ) elif arg_2 is not None : arg_3 . required = arg_2 Func = True if arg_4 in arg_0 . requirements : for arg_6 in arg_0 . requirements [ arg_4 ] : if arg_3 == arg_6 : Func = False break arg_7 = False if ( arg_3 . specs and arg_3 . specs [ 0 ] [ 0 ] == '==' and arg_6 . specs and arg_6 . specs [ 0 ] [ 0 ] == '==' ) : if pkg_resources . parse_version ( arg_3 . specs [ 0 ] [ 1 ] ) < pkg_resources . parse_version ( arg_6 . specs [ 0 ] [ 1 ] ) : arg_3 . requirement = arg_6 . requirement arg_7 = True if not ( arg_3 . specs and arg_6 . specs ) : if arg_6 . specs : arg_3 . requirement = arg_6 . requirement arg_7 = True if arg_7 : arg_3 . required |= arg_6 . required if arg_6 . required_by and not arg_3 . required_by : arg_3 . required_by = arg_6 . required_by arg_0 . requirements [ arg_4 ] . remove ( arg_6 ) break if Func : arg_0 . requirements [ arg_4 ] . append ( arg_3 )

def Func(arg_0, arg_1, arg_2=None):
        """
        Add requirements to be managed

        :param list/Requirement requirements: List of :class:`BumpRequirement` or :class:`pkg_resources.Requirement`
        :param bool required: Set required flag for each requirement if provided.
        """
        if isinstance(arg_1, RequirementsManager):
            arg_1 = list(arg_1)
        elif not isinstance(arg_1, list):
            arg_1 = [arg_1]

        for arg_3 in arg_1:
            arg_4 = arg_3.project_name

            if not isinstance(arg_3, BumpRequirement):
                arg_3 = BumpRequirement(arg_3, arg_2=arg_2)
            elif arg_2 is not None:
                arg_3.required = arg_2

            Func = True

            if arg_4 in arg_0.requirements:
                for arg_6 in arg_0.requirements[arg_4]:
                    if arg_3 == arg_6:
                        Func = False
                        break

                    # Need to replace existing as the new req will be used to bump next, and req.required could be
                    # updated.
                    arg_7 = False

                    # Two pins: Use highest pinned version
                    if (arg_3.specs and arg_3.specs[0][0] == '==' and arg_6.specs and
                            arg_6.specs[0][0] == '=='):
                        if pkg_resources.parse_version(arg_3.specs[0][1]) < pkg_resources.parse_version(
                                arg_6.specs[0][1]):
                            arg_3.requirement = arg_6.requirement
                        arg_7 = True

                    # Replace Any
                    if not (arg_3.specs and arg_6.specs):
                        if arg_6.specs:
                            arg_3.requirement = arg_6.requirement
                        arg_7 = True

                    if arg_7:
                        arg_3.required |= arg_6.required
                        if arg_6.required_by and not arg_3.required_by:
                            arg_3.required_by = arg_6.required_by
                        arg_0.requirements[arg_4].remove(arg_6)
                        break

            if Func:
                arg_0.requirements[arg_4].append(arg_3)


return self.make_response(
            obj=record.files[key].obj, pid=pid, record=record, status=201)

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = request . files [ 'file' ] arg_4 = secure_filename ( request . form . get ( 'name' ) or arg_3 . filename ) if arg_4 in arg_2 . files : raise FileAlreadyExists ( ) arg_2 . files [ arg_4 ] = arg_3 . stream arg_2 . commit ( ) db . session . commit ( ) return arg_0 . make_response ( obj = arg_2 . files [ arg_4 ] . obj , arg_1 = arg_1 , arg_2 = arg_2 , status = 201 )

def Func(arg_0, arg_1, arg_2):
        """Handle POST deposit files.

        Permission required: `update_permission_factory`.

        :param pid: Pid object (from url).
        :param record: Record object resolved from the pid.
        """
        # load the file
        arg_3 = request.files['file']
        # file name
        arg_4 = secure_filename(
            request.form.get('name') or arg_3.filename
        )
        # check if already exists a file with this name
        if arg_4 in arg_2.files:
            raise FileAlreadyExists()
        # add it to the deposit
        arg_2.files[arg_4] = arg_3.stream
        arg_2.commit()
        db.session.commit()
        return arg_0.make_response(
            obj=arg_2.files[arg_4].obj, arg_1=arg_1, arg_2=arg_2, status=201)


def Func(arg_0):
    """
    Parses an APRS packet and returns a dict with decoded data

    - All attributes are in metric units
    """

    if not isinstance(arg_0, string_type_Func):
        raise TypeError("Expected packet to be str/unicode/bytes, got %s", type(arg_0))

    if len(arg_0) == 0:
        raise ParseError("packet is empty", arg_0)

    # attempt to detect encoding
    if isinstance(arg_0, bytes):
        arg_0 = _unicode_packet(arg_0)

    arg_0 = arg_0.rstrip("\r\n")
    logger.debug("Parsing: %s", arg_0)

    # split into head and body
    try:
        (arg_1, arg_2) = arg_0.split(':', 1)
    except:
        raise ParseError("packet has no body", arg_0)

    if len(arg_2) == 0:
        raise ParseError("packet body is empty", arg_0)

    arg_3 = {
        'raw': arg_0,
        }

    # Func head
    try:
        arg_3.update(Func_header(arg_1))
    except ParseError as msg:
        raise ParseError(str(msg), arg_0)

    # Func body
    arg_4 = arg_2[0]
    arg_2 = arg_2[1:]

    if len(arg_2) == 0 and arg_4 != '>':
        raise ParseError("packet body is empty after packet type character", arg_0)

    # attempt to Func the body
    try:
        _try_toFunc_body(arg_4, arg_2, arg_3)

    # capture ParseErrors and attach the packet
    except (UnknownFormat, ParseError) as arg_5:
        arg_5.packet = arg_0
        raise

    # if we fail all attempts to Func, try beacon packet
    if 'format' not in arg_3:
        if not re.match(r"^(AIR.*|ALL.*|AP.*|BEACON|CQ.*|GPS.*|DF.*|DGPS.*|"
                        "DRILL.*|DX.*|ID.*|JAVA.*|MAIL.*|MICE.*|QST.*|QTH.*|"
                        "RTCM.*|SKY.*|SPACE.*|SPC.*|SYM.*|TEL.*|TEST.*|TLM.*|"
                        "WX.*|ZIP.*|UIDIGI)$", arg_3['to']):
            raise UnknownFormat("format is not supported", arg_0)

        arg_3.update({
            'format': 'beacon',
            'text': arg_4 + arg_2,
            })

    logger.debug("Parsed ok.")
    return arg_3


def Func(arg_0, arg_1, arg_2, arg_3):
    """
    RNA quantification via Kallisto

    :param JobFunctionWrappingJob job: passed automatically by Toil
    :param str r1_id: FileStoreID of fastq (pair 1)
    :param str r2_id: FileStoreID of fastq (pair 2 if applicable, otherwise pass None for single-end)
    :param str kallisto_index_url: FileStoreID for Kallisto index file
    :return: FileStoreID from Kallisto output
    :rtype: str
    """
    arg_4 = arg_0.fileStore.getLocalTempDir()
    download_url(arg_0, url=arg_3, name='kallisto_hg38.idx', arg_4=arg_4)
    # Retrieve files
    arg_5 = ['quant',
                  '-i', '/data/kallisto_hg38.idx',
                  '-t', str(arg_0.cores),
                  '-o', '/data/',
                  '-b', '100',
                  '--fusion']
    if arg_1 and arg_2:
        arg_0.fileStore.readGlobalFile(arg_1, os.path.join(arg_4, 'R1.fastq'))
        arg_0.fileStore.readGlobalFile(arg_2, os.path.join(arg_4, 'R2.fastq'))
        arg_5.extend(['/data/R1.fastq', '/data/R2.fastq'])
    else:
        arg_0.fileStore.readGlobalFile(arg_1, os.path.join(arg_4, 'R1.fastq'))
        arg_5.extend(['--single', '-l', '200', '-s', '15', '/data/R1.fastq'])

    # Call: Kallisto
    dockerCall(arg_0=arg_0, tool='quay.io/ucsc_cgl/kallisto:0.42.4--35ac87df5b21a8e8e8d159f26864ac1e1db8cf86',
               workDir=arg_4, arg_5=arg_5)

    # Tar output files together and store in fileStore
    arg_6 = [os.path.join(arg_4, x) for x in ['run_info.json', 'abundance.tsv', 'abundance.h5', 'fusion.txt']]
    tarball_files(tar_name='kallisto.tar.gz', file_paths=arg_6, output_dir=arg_4)
    return arg_0.fileStore.writeGlobalFile(os.path.join(arg_4, 'kallisto.tar.gz'))


def Func ( arg_0 ) : arg_1 = copy . copy ( arg_0 . default_headers or { } ) arg_1 . update ( arg_0 . data . get ( 'headers' ) or { } ) return arg_1

def Func(arg_0):
        """Get HTTP Headers to send. By default default_headers

        :return: HTTP Headers
        :rtype: dict
        """
        arg_1 = copy.copy(arg_0.default_headers or {})
        arg_1.update(arg_0.data.get('headers') or {})
        return arg_1

Get HTTP Headers to send . By default default_headers


def
Func
(
arg_0
,
arg_1
)
:
if
arg_1
not
in
arg_0
.
_Func_cache
:
arg_2
=
subprocess
.
Popen
(
"Func-deps.js {}"
.
format
(
arg_1
)
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
env
=
arg_0
.
env
,
universal_newlines
=
True
,
cwd
=
arg_0
.
_package_json_dir
)
arg_3
,
arg_4
=
arg_2
.
communicate
(
)
if
arg_4
:
raise
TraceError
(
arg_4
)
arg_0
.
_Func_cache
[
arg_1
]
=
json
.
loads
(
arg_3
)
return
arg_0
.
_Func_cache
[
arg_1
]

def Func(arg_0, arg_1):
        """
        Trace the dependencies for app.

        A Funcr-instance is shortlived, and re-tracing the same app should
        yield the same results. Since tracing is an expensive process, cache
        the result on the Funcr instance.
        """
        if arg_1 not in arg_0._Func_cache:
            arg_2 = subprocess.Popen(
                "Func-deps.js {}".format(arg_1), shell=True,
                stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                env=arg_0.env, universal_newlines=True, cwd=arg_0._package_json_dir
            )
            arg_3, arg_4 = arg_2.communicate()
            if arg_4:
                raise TraceError(arg_4)
            arg_0._Func_cache[arg_1] = json.loads(arg_3)
        return arg_0._Func_cache[arg_1]

Trace the dependencies for app.

        A tracer-instance is shortlived, and re-tracing the same app should
        yield the same results. Since tracing is an expensive process, cache
        the result on the tracer instance.


return Cells(space=space, name=name, formula=self.formula)

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : return Cells ( arg_1 = arg_1 , arg_2 = arg_2 , formula = arg_0 . formula )

def Func(arg_0, arg_1=None, arg_2=None):
        """Make a Func of itself and return it."""
        return Cells(arg_1=arg_1, arg_2=arg_2, formula=arg_0.formula)


def Func ( arg_0 ) : arg_1 = super ( EnterpriseCustomerAdminForm , arg_0 ) . Func ( ) if 'catalog' in arg_1 and not arg_1 [ 'catalog' ] : arg_1 [ 'catalog' ] = None return arg_1

def Func(arg_0):
        """
        Clean form fields prior to database entry.

        In this case, the major Funcing operation is substituting a None value for a blank
        value in the Catalog field.
        """
        arg_1 = super(EnterpriseCustomerAdminForm, arg_0).Func()
        if 'catalog' in arg_1 and not arg_1['catalog']:
            arg_1['catalog'] = None
        return arg_1

Clean form fields prior to database entry.

        In this case, the major cleaning operation is substituting a None value for a blank
        value in the Catalog field.

Clean form fields prior to database entry .


def
Func
(
)
:
arg_0
=
sys
.
version_info
arg_1
=
{
"cells"
:
[
]
,
"metadata"
:
{
"kernelspec"
:
{
"display_name"
:
"Python "
+
str
(
arg_0
[
0
]
)
,
"language"
:
"python"
,
"name"
:
"python"
+
str
(
arg_0
[
0
]
)
}
,
"language_info"
:
{
"codemirror_mode"
:
{
"name"
:
"ipython"
,
"version"
:
arg_0
[
0
]
}
,
"file_extension"
:
".py"
,
"mimetype"
:
"text/x-python"
,
"name"
:
"python"
,
"nbconvert_exporter"
:
"python"
,
"pygments_lexer"
:
"ipython"
+
str
(
arg_0
[
0
]
)
,
"version"
:
'{0}.{1}.{2}'
.
format
(
*
sys
.
version_info
[
:
3
]
)
}
}
,
"nbformat"
:
4
,
"nbformat_minor"
:
0
}
return
arg_1

def Func():
    """Returns a dictionary with the elements of a Jupyter notebook"""
    arg_0 = sys.version_info
    arg_1 = {
        "cells": [],
        "metadata": {
            "kernelspec": {
                "display_name": "Python " + str(arg_0[0]),
                "language": "python",
                "name": "python" + str(arg_0[0])
            },
            "language_info": {
                "codemirror_mode": {
                    "name": "ipython",
                    "version": arg_0[0]
                },
                "file_extension": ".py",
                "mimetype": "text/x-python",
                "name": "python",
                "nbconvert_exporter": "python",
                "pygments_lexer": "ipython" + str(arg_0[0]),
                "version": '{0}.{1}.{2}'.format(*sys.version_info[:3])
            }
        },
        "nbformat": 4,
        "nbformat_minor": 0
    }
    return arg_1


def Func ( arg_0 , arg_1 ) : arg_2 = '' if arg_0 . state == State . RUNNING and arg_0 . sprocess and arg_0 . sprocess . proc : arg_0 . state = State . PAUSED arg_0 . sprocess . set_exit_callback ( arg_0 . proc_exit_cb_state_set ) arg_0 . sprocess . proc . kill ( ) arg_2 = 'killed' return arg_2

def Func(arg_0, arg_1):
        """\
        stops the running child process - if its running
        it will re-spawn in any single-beat node after sometime

        :param msg:
        :return:
        """
        arg_2 = ''
        if arg_0.state == State.RUNNING and arg_0.sprocess and arg_0.sprocess.proc:
            arg_0.state = State.PAUSED
            arg_0.sprocess.set_exit_callback(arg_0.proc_exit_cb_state_set)
            arg_0.sprocess.proc.kill()
            arg_2 = 'killed'
            # TODO: check if process is really dead etc.
        return arg_2

\ stops the running child process - if its running it will re - spawn in any single - beat node after sometime


def Func ( arg_0 ) : arg_1 = max ( len ( arg_2 ) for arg_2 in arg_0 ) for arg_2 in arg_0 : while len ( arg_2 ) < arg_1 : arg_2 . append ( '' ) for arg_3 in range ( arg_1 ) : arg_2 [ arg_3 ] = str ( arg_2 [ arg_3 ] ) if arg_2 [ arg_3 ] is not None else '' return arg_0

def Func(arg_0):
    """
    Prepare the rows so they're all strings, and all the same length.

    :param table: A 2D grid of anything.
    :type table: [[``object``]]

    :return: A table of strings, where every row is the same length.
    :rtype: [[``str``]]
    """
    arg_1 = max(len(arg_2) for arg_2 in arg_0)
    for arg_2 in arg_0:
        while len(arg_2) < arg_1:
            arg_2.append('')
        for arg_3 in range(arg_1):
            arg_2[arg_3] = str(arg_2[arg_3]) if arg_2[arg_3] is not None else ''
    return arg_0

Prepare the rows so they re all strings and all the same length .


def Func(arg_0, arg_1):
        """
        Add the CA certificate to the list of preferred signers for this
        context.

        The list of certificate authorities will be sent to the client when the
        server requests a client certificate.

        :param certificate_authority: certificate authority's X509 certificate.
        :return: None

        .. versionadded:: 0.10
        """
        if not isinstance(arg_1, X509):
            raise TypeError("certificate_authority must be an X509 instance")

        arg_2 = _lib.SSL_CTX_add_client_CA(
            arg_0._context, arg_1._x509)
        _openssl_assert(arg_2 == 1)

Add the CA certificate to the list of preferred signers for this context .


def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_0 : if isinstance ( arg_3 , Attrib ) or isinstance ( arg_3 , PathAttrib ) : arg_2 . append ( valueof ( arg_1 , arg_3 ) ) else : arg_2 . append ( arg_3 ) return arg_2

def Func(arg_0, arg_1):
    """Parses args and evaluates any Attrib entries"""
    arg_2 = []
    for arg_3 in arg_0:
        if isinstance(arg_3, Attrib) or isinstance(arg_3, PathAttrib):
            arg_2.append(valueof(arg_1, arg_3))
        else:
            arg_2.append(arg_3)
    return arg_2


def Func ( arg_0 , arg_1 ) : with arg_0 . engine . begin ( ) as db : return list_remote_checkpoints ( db , arg_0 . user_id , arg_1 )

def Func(arg_0, arg_1):
        """Return a list of checkpoints for a given file"""
        with arg_0.engine.begin() as db:
            return list_remote_checkpoints(db, arg_0.user_id, arg_1)


def Func ( arg_0 ) : if arg_0 . lines != [ ] : arg_1 = SourceBlock ( arg_0 , arg_0 . filename , arg_0 . lineno , arg_0 . lines ) arg_0 . blocks . append ( arg_1 ) arg_0 . format = None arg_0 . lines = [ ]

def  Func( arg_0 ):
        """add the current accumulated lines and create a new block"""
        if arg_0.lines != []:
            arg_1 = SourceBlock( arg_0, arg_0.filename, arg_0.lineno, arg_0.lines )

            arg_0.blocks.append( arg_1 )
            arg_0.format = None
            arg_0.lines  = []


def Func ( arg_0 , arg_1 = None ) : arg_2 = binascii . b2a_base64 ( arg_0 ) [ : - 1 ] if arg_1 is not None : return arg_2 . translate ( string . maketrans ( b'+/' , arg_1 [ : 2 ] ) ) return arg_2

def Func(arg_0, arg_1=None):
    """Encode a string using Base64.

    s is the string to encode.  Optional altchars must be a string of at least
    length 2 (additional characters are ignored) which specifies an
    alternative alphabet for the '+' and '/' characters.  This allows an
    application to e.g. generate url or filesystem safe Base64 strings.

    The encoded string is returned.
    """
    # Strip off the trailing newline
    arg_2 = binascii.b2a_base64(arg_0)[:-1]
    if arg_1 is not None:
        return arg_2.translate(string.maketrans(b'+/', arg_1[:2]))
    return arg_2


(self, dataset_name, imagesize, voxelres, offset=None,
                    timerange=None, scalinglevels=None, scaling=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
=
,
arg_5
=
,
arg_6
=
,
arg_7
=
)
:
arg_0
.
dataset
=
(
arg_1
.
strip
(
)
.
replace
(
" "
,
""
)
,
arg_2
,
arg_3
,
arg_4
,
arg_5
,
arg_6
,
arg_7
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None,
                    arg_5=None, arg_6=None, arg_7=None):
        """
        Add a new dataset to the ingest.

        Arguments:
            dataset_name (str): Dataset Name is the overarching name of the
                research effort. Standard naming convention is to do
                LabNamePublicationYear or LeadResearcherCurrentYear.
            imagesize (int, int, int): Image size is the pixel count
                dimensions of the data. For example is the data is stored
                as a series of 100 slices each 2100x2000 pixel TIFF images,
                the X,Y,Z dimensions are (2100, 2000, 100).
            voxelres (float, float, float): Voxel Resolution is the number
                of voxels per unit pixel. We store X,Y,Z voxel resolution
                separately.
            offset (int, int, int): If your data is not well aligned and
                there is "excess" image data you do not wish to examine, but
                are present in your images, offset is how you specify where
                your actual image starts. Offset is provided a pixel
                coordinate offset from origin which specifies the "actual"
                origin of the image. The offset is for X,Y,Z dimensions.
            timerange (int, int): Time Range is a parameter to support
                storage of Time Series data, so the value of the tuple is a
                0 to X range of how many images over time were taken. It
                takes 2 inputs timeStepStart and timeStepStop.
            scalinglevels (int): Scaling levels is the number of levels the
                data is scalable to (how many zoom levels are present in the
                data). The highest resolution of the data is at scaling level
                0, and for each level up the data is down sampled by 2x2
                (per slice). To learn more about the sampling service used,
                visit the the propagation service page.
            scaling (int): Scaling is the scaling method of the data being
                stored. 0 corresponds to a Z-slice orientation (as in a
                collection of tiff images in which each tiff is a slice on
                the z plane) where data will be scaled only on the xy plane,
                not the z plane. 1 corresponds to an isotropic orientation
                (in which each tiff is a slice on the y plane) where data
                is scaled along all axis.

        Returns:
            None
        """
        arg_0.dataset = (arg_1.strip().replace(" ", ""), arg_2,
                        arg_3, arg_4, arg_5, arg_6, arg_7)


(
            self,
            params=None,
            json=None,
            http_method="POST",
            trace=False)

def Func(
            arg_0,
            arg_1=None,
            arg_2=None,
            arg_3="POST",
            arg_4=False):
        '''
        Send request to writer service.
        '''
        arg_5 = requests.Request(
            arg_3,
            arg_0.writer_url,
            arg_1=arg_1,
            arg_2=arg_2,
            headers={
                'User-Agent': arg_0.user_agent})
        arg_6 = id_gen(str(uuid.uuid4()))
        arg_7 = arg_0.network_timeouts()
        arg_8 = arg_0.maintenance_timeouts()
        while True:
            try:
                arg_9 = arg_0.__send_single_request(arg_5, arg_6.next(), arg_4=arg_4)
                return arg_9
            except (Timeout, ConnectionError, ProtocolError):
                logger.warn(traceback.format_exc())
                try:
                    arg_10 = next(arg_7)
                    logger.warn(
                        "Network error, will retry in %ss..." %
                        arg_10)
                    time.sleep(arg_10)
                    continue
                except StopIteration:
                    raise arg_0.NetworkError()
            except arg_0.UnderMaintenance as e:
                try:
                    arg_10 = next(arg_8)
                    logger.warn(
                        "Writer is under maintenance, will retry in %ss..." %
                        arg_10)
                    time.sleep(arg_10)
                    continue
                except StopIteration:
                    raise e


def Func ( arg_0 , arg_1 = False ) : arg_0 . success = arg_1 Func = [ ] arg_3 = Task . NOT_FINISHED_MASK for arg_4 in Task . Iterator ( arg_0 . task_tree , arg_3 ) : Func . append ( arg_4 ) for arg_4 in Func : arg_4 . cancel ( )

def Func(arg_0, arg_1=False):
        """
        Cancels all open tasks in the workflow.

        :type  success: bool
        :param success: Whether the Workflow should be marked as successfully
                        completed.
        """
        arg_0.success = arg_1
        Func = []
        arg_3 = Task.NOT_FINISHED_MASK
        for arg_4 in Task.Iterator(arg_0.task_tree, arg_3):
            Func.append(arg_4)
        for arg_4 in Func:
            arg_4.cancel()

Cancels all open tasks in the workflow .


return workdays.networkdays(from_date, to_date, holidays)

def Func ( arg_0 , arg_1 , arg_2 = 'en-US' ) : arg_3 = locales [ arg_2 ] return workdays . Func ( arg_0 , arg_1 , arg_3 )

def Func(arg_0, arg_1, arg_2='en-US'):
    """ Return the net work days according to RH's calendar. """
    arg_3 = locales[arg_2]
    return workdays.Func(arg_0, arg_1, arg_3)

Return the net work days according to RH s calendar .