def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = arg_0 . _api_info [ 'camera_event' ] arg_4 = dict ( { '_sid' : arg_0 . _sid , 'api' : arg_3 [ 'name' ] , 'method' : 'MotionEnum' , 'version' : arg_3 [ 'version' ] , 'camId' : arg_1 , } , ** arg_2 ) arg_5 = arg_0 . _get_json_with_retry ( arg_3 [ 'url' ] , arg_4 ) return MotionSetting ( arg_1 , arg_5 [ 'data' ] [ 'MDParam' ] )

def Func(arg_0, arg_1, **arg_2):
        """Return motion settings matching camera_id."""
        arg_3 = arg_0._api_info['camera_event']
        arg_4 = dict({
            '_sid': arg_0._sid,
            'api': arg_3['name'],
            'method': 'MotionEnum',
            'version': arg_3['version'],
            'camId': arg_1,
        }, **arg_2)
        arg_5 = arg_0._get_json_with_retry(arg_3['url'], arg_4)

        return MotionSetting(arg_1, arg_5['data']['MDParam'])

Return motion settings matching camera_id .


return sum(joint_distribution_lib.maybe_check_wont_broadcast(
        (d().entropy() for d in self._dist_fn_wrapped),
        self.validate_args))

def Func(arg_0):
    """Shannon entropy in nats."""
    if any(arg_0._dist_fn_args):
      raise ValueError(
          'Can only compute entropy when all distributions are independent.')
    return sum(joint_distribution_lib.maybe_check_wont_broadcast(
        (arg_1().entropy() for arg_1 in arg_0._dist_fn_wrapped),
        arg_0.validate_args))


def Func ( arg_0 , Func ) : arg_2 = furl ( arg_0 . _request . rawurl ) arg_2 = arg_2 . add ( Func ) arg_0 . _request . url = arg_2 . url arg_0 . add_matcher ( matcher ( 'QueryMatcher' , Func ) )

def Func(arg_0, Func):
        """
        Defines a set of URL query params to match.

        Arguments:
            params (dict): set of params to match.

        Returns:
            self: current Mock instance.
        """
        arg_2 = furl(arg_0._request.rawurl)
        arg_2 = arg_2.add(Func)
        arg_0._request.url = arg_2.url
        arg_0.add_matcher(matcher('QueryMatcher', Func))

Defines a set of URL query params to match .


(parent: ScheduleComponent, child: ScheduleComponent,
           name: str = None)

return insert(parent, insertion_time, child, name=name)

def Func ( arg_0 : arg_1 , arg_2 : arg_1 , arg_3 : arg_4 = None ) -> Schedule : arg_5 = set ( arg_0 . channels ) & set ( arg_2 . channels ) arg_6 = arg_0 . ch_stop_time ( * arg_5 ) return insert ( arg_0 , arg_6 , arg_2 , arg_3 = arg_3 )

def Func(arg_0: arg_1, arg_2: arg_1,
           arg_3: arg_4 = None) -> Schedule:
    r"""Return a new schedule with by Funcing `child` to `parent` at
       the last time of the `parent` schedule's channels
       over the intersection of the parent and child schedule's channels.

       $t = \textrm{max}({x.stop\_time |x \in parent.channels \cap child.channels})$

    Args:
        parent: The schedule to be inserted into
        child: The schedule to insert
        name: Name of the new schedule. Defaults to name of parent
    """
    arg_5 = set(arg_0.channels) & set(arg_2.channels)
    arg_6 = arg_0.ch_stop_time(*arg_5)
    return insert(arg_0, arg_6, arg_2, arg_3=arg_3)

r"""Return a new schedule with by appending `child` to `parent` at
       the last time of the `parent` schedule's channels
       over the intersection of the parent and child schedule's channels.

       $t = \textrm{max}({x.stop\_time |x \in parent.channels \cap child.channels})$

    Args:
        parent: The schedule to be inserted into
        child: The schedule to insert
        name: Name of the new schedule. Defaults to name of parent

r Return a new schedule with by appending child to parent at the last time of the parent schedule s channels over the intersection of the parent and child schedule s channels .


(length, rank=None, method='Hilbert-Schmidt', seed=None)

def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
'Hilbert-Schmidt'
,
arg_3
=
)
:
if
arg_2
==
'Hilbert-Schmidt'
:
return
__random_density_hs
(
arg_0
,
arg_1
,
arg_3
)
elif
arg_2
==
'Bures'
:
return
__random_density_bures
(
arg_0
,
arg_1
,
arg_3
)
else
:
raise
QiskitError
(
'Error: unrecognized method {}'
.
format
(
arg_2
)
)

def Func(arg_0, arg_1=None, arg_2='Hilbert-Schmidt', arg_3=None):
    """
    Generate a random density matrix rho.

    Args:
        length (int): the length of the density matrix.
        rank (int or None): the rank of the density matrix. The default
            value is full-rank.
        method (string): the method to use.
            'Hilbert-Schmidt': sample rho from the Hilbert-Schmidt metric.
            'Bures': sample rho from the Bures metric.
        seed (int): Optional. To set a random seed.
    Returns:
        ndarray: rho (length, length) a density matrix.
    Raises:
        QiskitError: if the method is not valid.
    """
    if arg_2 == 'Hilbert-Schmidt':
        return __random_density_hs(arg_0, arg_1, arg_3)
    elif arg_2 == 'Bures':
        return __random_density_bures(arg_0, arg_1, arg_3)
    else:
        raise QiskitError('Error: unrecognized method {}'.format(arg_2))


return [nt_partition(*x) for x in rawlist]

def Func(arg_0):
    """Return disk partitions."""
    arg_1 = _psutil_mswindows.get_Func(arg_0)
    return [nt_partition(*arg_2) for arg_2 in arg_1]


def
Func
(
arg_0
)
:
arg_1
=
id
(
arg_0
)
if
arg_1
in
recursion_breaker
.
processed
:
return
u'<recursion>'
recursion_breaker
.
processed
.
add
(
arg_1
)
try
:
if
isinstance
(
arg_0
,
six
.
binary_type
)
:
return
u"'{0}'"
.
format
(
arg_0
.
decode
(
'utf-8'
)
)
elif
isinstance
(
arg_0
,
six
.
text_type
)
:
return
u"u'{0}'"
.
format
(
arg_0
)
elif
isinstance
(
arg_0
,
(
list
,
tuple
)
)
:
arg_2
=
list
(
map
(
Func
,
arg_0
)
)
arg_3
=
serialize_list
(
u'['
,
arg_2
,
delimiter
=
u','
)
+
u']'
return
force_unicode
(
arg_3
)
elif
isinstance
(
arg_0
,
dict
)
:
arg_4
=
six
.
iteritems
(
arg_0
)
arg_4
=
(
tuple
(
map
(
Func
,
item
)
)
for
item
in
arg_4
)
arg_4
=
list
(
arg_4
)
arg_4
.
sort
(
)
arg_4
=
[
serialize_text
(
u'{0}: '
.
format
(
key
)
,
item_value
)
for
key
,
item_value
in
arg_4
]
arg_3
=
serialize_list
(
u'{'
,
arg_4
,
delimiter
=
u','
)
+
u'}'
return
force_unicode
(
arg_3
)
return
force_unicode
(
repr
(
arg_0
)
)
finally
:
recursion_breaker
.
processed
.
remove
(
arg_1
)

def Func(arg_0):
    """This function should return unicode representation of the value
    """
    arg_1 = id(arg_0)

    if arg_1 in recursion_breaker.processed:
        return u'<recursion>'

    recursion_breaker.processed.add(arg_1)

    try:
        if isinstance(arg_0, six.binary_type):
            # suppose, all byte strings are in unicode
            # don't know if everybody in the world uses anything else?
            return u"'{0}'".format(arg_0.decode('utf-8'))

        elif isinstance(arg_0, six.text_type):
            return u"u'{0}'".format(arg_0)

        elif isinstance(arg_0, (list, tuple)):
            # long lists or lists with multiline items
            # will be shown vertically
            arg_2 = list(map(Func, arg_0))
            arg_3 = serialize_list(u'[', arg_2, delimiter=u',') + u']'
            return force_unicode(arg_3)

        elif isinstance(arg_0, dict):
            arg_4 = six.iteritems(arg_0)

            # format each key/value pair as a text,
            # calling Func recursively
            arg_4 = (tuple(map(Func, item))
                     for item in arg_4)

            arg_4 = list(arg_4)
            # sort by keys for readability
            arg_4.sort()

            # for each item value
            arg_4 = [
                serialize_text(
                    u'{0}: '.format(key),
                    item_value)
                for key, item_value in arg_4]

            # and serialize these pieces as a list, enclosing
            # them into a curve brackets
            arg_3 = serialize_list(u'{', arg_4, delimiter=u',') + u'}'
            return force_unicode(arg_3)
        return force_unicode(repr(arg_0))

    finally:
        recursion_breaker.processed.remove(arg_1)


(self, pojo_name="", path="", get_jar=True)

def
Func
(
arg_0
,
arg_1
=
""
,
arg_2
=
""
,
arg_3
=
True
)
:
assert_is_type
(
arg_1
,
str
)
assert_is_type
(
arg_2
,
str
)
assert_is_type
(
arg_3
,
bool
)
if
arg_1
==
""
:
arg_1
=
"AssemblyPOJO_"
+
str
(
uuid
.
uuid4
(
)
)
arg_4
=
h2o
.
api
(
"GET /99/Assembly.java/%s/%s"
%
(
arg_0
.
id
,
arg_1
)
)
arg_5
=
arg_2
+
"/"
+
arg_1
+
".java"
if
arg_2
==
""
:
print
(
arg_4
)
else
:
with
open
(
arg_5
,
'w'
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
arg_4
)
if
arg_3
and
arg_2
!=
""
:
h2o
.
api
(
"GET /3/h2o-genmodel.jar"
,
save_to
=
os
.
path
.
join
(
arg_2
,
"h2o-genmodel.jar"
)
)

def Func(arg_0, arg_1="", arg_2="", arg_3=True):
        """
        Convert the munging operations performed on H2OFrame into a POJO.

        :param pojo_name:  (str) Name of POJO
        :param path:  (str) path of POJO.
        :param get_jar: (bool) Whether to also download the h2o-genmodel.jar file needed to compile the POJO
        :return: None
        """
        assert_is_type(arg_1, str)
        assert_is_type(arg_2, str)
        assert_is_type(arg_3, bool)
        if arg_1 == "":
            arg_1 = "AssemblyPOJO_" + str(uuid.uuid4())
        arg_4 = h2o.api("GET /99/Assembly.java/%s/%s" % (arg_0.id, arg_1))
        arg_5 = arg_2 + "/" + arg_1 + ".java"
        if arg_2 == "":
            print(arg_4)
        else:
            with open(arg_5, 'w', encoding="utf-8") as f:
                f.write(arg_4)  # this had better be utf-8 ?
        if arg_3 and arg_2 != "":
            h2o.api("GET /3/h2o-genmodel.jar", save_to=os.path.join(arg_2, "h2o-genmodel.jar"))

Convert the munging operations performed on H2OFrame into a POJO .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_2
is
not
and
arg_2
[
0
]
.
name
not
in
arg_0
.
cregs
:
raise
DAGCircuitError
(
"invalid creg in condition for %s"
%
arg_1
)

def Func(arg_0, arg_1, arg_2):
        """Verify that the condition is valid.

        Args:
            name (string): used for error reporting
            condition (tuple or None): a condition tuple (ClassicalRegister,int)

        Raises:
            DAGCircuitError: if conditioning on an invalid register
        """
        # Verify creg exists
        if arg_2 is not None and arg_2[0].name not in arg_0.cregs:
            raise DAGCircuitError("invalid creg in condition for %s" % arg_1)


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . modname arg_3 = arg_1 . root ( ) . file if arg_3 is not None : arg_4 = modutils . is_relative ( arg_2 , arg_3 ) else : arg_4 = False for arg_5 in arg_1 . names : if arg_5 [ 0 ] == "*" : continue arg_6 = "%s.%s" % ( arg_2 , arg_5 [ 0 ] ) if arg_6 . find ( "." ) > - 1 : try : arg_6 = modutils . get_module_part ( arg_6 , arg_3 ) except ImportError : continue if arg_6 != arg_2 : arg_0 . _imported_module ( arg_1 , arg_6 , arg_4 )

def Func(arg_0, arg_1):
        """visit an astroid.ImportFrom node

        resolve module dependencies
        """
        arg_2 = arg_1.modname
        arg_3 = arg_1.root().file
        if arg_3 is not None:
            arg_4 = modutils.is_relative(arg_2, arg_3)
        else:
            arg_4 = False
        for arg_5 in arg_1.names:
            if arg_5[0] == "*":
                continue
            # analyze dependencies
            arg_6 = "%s.%s" % (arg_2, arg_5[0])
            if arg_6.find(".") > -1:
                try:
                    # TODO: don't use get_module_part,
                    # missing package precedence
                    arg_6 = modutils.get_module_part(arg_6, arg_3)
                except ImportError:
                    continue
            if arg_6 != arg_2:
                arg_0._imported_module(arg_1, arg_6, arg_4)


def Func(arg_0, arg_1=None, arg_2=False):
        """
        Returns a stdin-suitable file-like object based on the
        optional os_path and optionally skipping any configured
        sub-command.
        """
        arg_3 = None if arg_2 else arg_0.stdin_sub_command
        arg_4, arg_5 = arg_0._get_in_and_path(
            arg_0.stdin, arg_0.stdin_root, arg_3, arg_1)
        if hasattr(arg_4, 'stdout'):
            return arg_4.stdout
        return arg_4

Returns a stdin - suitable file - like object based on the optional os_path and optionally skipping any configured sub - command .


def Func ( arg_0 ) : try : if "current_test_data" in arg_3 . INTERN : if not Check ( ) . is_ip_valid ( ) : arg_1 = arg_3 . socket . getaddrinfo ( arg_3 . INTERN [ "to_test" ] , 80 , 0 , 0 , arg_3 . socket . IPPROTO_TCP , ) for arg_2 in arg_1 : arg_3 . INTERN [ "current_test_data" ] [ "Func" ] . append ( arg_2 [ - 1 ] [ 0 ] ) else : arg_1 = arg_3 . socket . gethostbyaddr ( arg_3 . INTERN [ "to_test" ] ) arg_3 . INTERN [ "current_test_data" ] [ "Func" ] [ "hostname" ] = arg_1 [ 0 ] arg_3 . INTERN [ "current_test_data" ] [ "Func" ] [ "aliases" ] = arg_1 [ 1 ] arg_3 . INTERN [ "current_test_data" ] [ "Func" ] [ "ips" ] = arg_1 [ 2 ] else : if not Check ( ) . is_ip_valid ( ) : arg_3 . socket . getaddrinfo ( arg_3 . INTERN [ "to_test" ] , 80 , 0 , 0 , arg_3 . socket . IPPROTO_TCP , ) else : arg_3 . socket . gethostbyaddr ( arg_3 . INTERN [ "to_test" ] ) return True except ( OSError , arg_3 . socket . herror , arg_3 . socket . gaierror ) : return False

def Func(arg_0):
        """
        Implementation of UNIX Func.
        """

        try:
            # We try to get the addresse information of the given domain or IP.

            if "current_test_data" in arg_3.INTERN:  # pragma: no cover
                # The end-user want more information whith his test.

                if not Check().is_ip_valid():
                    # The element we are testing is not an IP.

                    # We request the address informations.
                    arg_1 = arg_3.socket.getaddrinfo(
                        arg_3.INTERN["to_test"],
                        80,
                        0,
                        0,
                        arg_3.socket.IPPROTO_TCP,
                    )

                    for arg_2 in arg_1:
                        # We loop through the sequence returned by the request.

                        # We append the NS informations into the Func index.
                        arg_3.INTERN["current_test_data"]["Func"].append(
                            arg_2[-1][0]
                        )
                else:
                    # The element we are testing is an IP.
                    arg_1 = arg_3.socket.gethostbyaddr(
                        arg_3.INTERN["to_test"]
                    )

                    # We append the NS informations into the Func index.
                    arg_3.INTERN["current_test_data"]["Func"][
                        "hostname"
                    ] = arg_1[0]
                    arg_3.INTERN["current_test_data"]["Func"][
                        "aliases"
                    ] = arg_1[1]
                    arg_3.INTERN["current_test_data"]["Func"]["ips"] = arg_1[
                        2
                    ]
            else:

                if not Check().is_ip_valid():
                    # The element we are testing is not an IP.
                    arg_3.socket.getaddrinfo(
                        arg_3.INTERN["to_test"],
                        80,
                        0,
                        0,
                        arg_3.socket.IPPROTO_TCP,
                    )
                else:
                    # The element we are testing is an IP.
                    arg_3.socket.gethostbyaddr(arg_3.INTERN["to_test"])

            # It was done successfuly, we return True.
            # Note: we don't need to read the addresses so we consider as successful
            # as long as there is no error.
            return True

        except (OSError, arg_3.socket.herror, arg_3.socket.gaierror):
            # One of the listed exception is matched.

            # It was done unsuccesfuly, we return False.
            return False


(self, handler, name=None, remove=False)

def Func(arg_0, arg_1, arg_2=None, arg_3=False):
        """Setup a handler to be called when a trait changes.

        This is used to setup dynamic notifications of trait changes.

        Static handlers can be created by creating methods on a HasTraits
        subclass with the naming convention '_[traitname]_changed'.  Thus,
        to create static handler for the trait 'a', create the method
        _a_changed(self, name, old, new) (fewer arguments can be used, see
        below).

        Parameters
        ----------
        handler : callable
            A callable that is called when a trait changes.  Its
            signature can be handler(), handler(name), handler(name, new)
            or handler(name, old, new).
        name : list, str, None
            If None, the handler will apply to all traits.  If a list
            of str, handler will apply to all names in the list.  If a
            str, the handler will apply just to that name.
        remove : bool
            If False (the default), then install the handler.  If True
            then unintall it.
        """
        if arg_3:
            arg_4 = parse_notifier_name(arg_2)
            for arg_5 in arg_4:
                arg_0._remove_notifiers(arg_1, arg_5)
        else:
            arg_4 = parse_notifier_name(arg_2)
            for arg_5 in arg_4:
                arg_0._add_notifiers(arg_1, arg_5)

Setup a handler to be called when a trait changes .


def Func(arg_0, arg_1, arg_2, arg_3=10000):
        """Returns the min and max possible values for x within given constraints"""
        if issymbolic(arg_2):
            arg_4 = arg_0.min(arg_1, arg_2, arg_3)
            arg_5 = arg_0.max(arg_1, arg_2, arg_3)
            return arg_4, arg_5
        else:
            return arg_2, arg_2


return [os.path.join(path, o) for o in os.listdir(path) if os.path.isdir(os.path.join(path, o))]

def Func ( arg_0 = "" ) : return [ os . path . join ( arg_0 , arg_1 ) for arg_1 in os . listdir ( arg_0 ) if os . path . isdir ( os . path . join ( arg_0 , arg_1 ) ) ]

def Func(arg_0=""):
    """Return a folder list in a folder by given a folder path.

    Parameters
    ----------
    path : str
        A folder path.

    """
    return [os.path.join(arg_0, arg_1) for arg_1 in os.listdir(arg_0) if os.path.isdir(os.path.join(arg_0, arg_1))]

Return a folder list in a folder by given a folder path .


def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_2 ) -> arg_2 : arg_4 = arg_1 . lower ( ) . encode ( "latin-1" ) arg_5 = arg_3 . encode ( "latin-1" ) for arg_6 , ( arg_7 , arg_8 ) in enumerate ( arg_0 . _list ) : if arg_7 == arg_4 : return arg_8 . decode ( "latin-1" ) arg_0 . _list . append ( ( arg_4 , arg_5 ) ) return arg_3

def Func(arg_0, arg_1: arg_2, arg_3: arg_2) -> arg_2:
        """
        If the header `key` does not exist, then set it to `value`.
        Returns the header value.
        """
        arg_4 = arg_1.lower().encode("latin-1")
        arg_5 = arg_3.encode("latin-1")

        for arg_6, (arg_7, arg_8) in enumerate(arg_0._list):
            if arg_7 == arg_4:
                return arg_8.decode("latin-1")
        arg_0._list.append((arg_4, arg_5))
        return arg_3

If the header key does not exist then set it to value . Returns the header value .


(directory, stringio, base='', exclude=None, include=None)

def Func ( arg_0 , arg_1 , arg_2 = '' , arg_3 = None , arg_4 = None ) : import fnmatch import os arg_5 = [ ( os . path . join ( arg_0 , i ) , i ) for i in os . listdir ( arg_0 ) ] arg_5 = [ i for i in arg_5 if os . path . isfile ( i [ 0 ] ) ] for arg_6 , arg_7 in arg_5 : if arg_4 is not None : if not fnmatch . fnmatch ( arg_6 , arg_4 ) : continue if arg_3 is not None : if fnmatch . fnmatch ( arg_6 , arg_3 ) : continue arg_8 = Md5Hex ( arg_6 ) if arg_2 : arg_1 . write ( '%s/%s=%s\n' % ( arg_2 , arg_7 , arg_8 ) ) else : arg_1 . write ( '%s=%s\n' % ( arg_7 , arg_8 ) )

def Func(arg_0, arg_1, arg_2='', arg_3=None, arg_4=None):
    '''
    Helper to iterate over the files in a directory putting those in the passed StringIO in ini
    format.

    :param unicode directory:
        The directory for which the hash should be done.

    :param StringIO stringio:
        The string to which the dump should be put.

    :param unicode base:
        If provided should be added (along with a '/') before the name=hash of file.

    :param unicode exclude:
        Pattern to match files to exclude from the hashing. E.g.: *.gz

    :param unicode include:
        Pattern to match files to include in the hashing. E.g.: *.zip
    '''
    import fnmatch
    import os

    arg_5 = [(os.path.join(arg_0, i), i) for i in os.listdir(arg_0)]
    arg_5 = [i for i in arg_5 if os.path.isfile(i[0])]
    for arg_6, arg_7 in arg_5:
        if arg_4 is not None:
            if not fnmatch.fnmatch(arg_6, arg_4):
                continue

        if arg_3 is not None:
            if fnmatch.fnmatch(arg_6, arg_3):
                continue

        arg_8 = Md5Hex(arg_6)
        if arg_2:
            arg_1.write('%s/%s=%s\n' % (arg_2, arg_7, arg_8))
        else:
            arg_1.write('%s=%s\n' % (arg_7, arg_8))

Helper to iterate over the files in a directory putting those in the passed StringIO in ini format .


Long explanation of the value from the numeric value
        with optional extra bits
        Used by Layout.verboseRead when printing the value

def Func ( arg_0 , arg_1 = None ) : if isinstance ( arg_0 . code , WithExtra ) : return arg_0 . code . callback ( arg_0 , arg_1 ) return arg_0 . code . callback ( arg_0 )

def Func(arg_0, arg_1=None):
        """Long Func of the value from the numeric value
        with optional extra bits
        Used by Layout.verboseRead when printing the value
        """
        if isinstance(arg_0.code, WithExtra):
            return arg_0.code.callback(arg_0, arg_1)
        return arg_0.code.callback(arg_0)

Long explanation of the value from the numeric value with optional extra bits Used by Layout . verboseRead when printing the value


def
Func
(
arg_0
,
arg_1
)
:
check_environment
(
arg_0
,
arg_1
)
click
.
secho
(
'Fetching tags from the upstream ...'
)
arg_2
=
TagHandler
(
git
.
list_tags
(
)
)
print_information
(
arg_2
,
arg_1
)
arg_3
=
arg_2
.
yield_tag
(
arg_0
,
arg_1
)
confirm
(
arg_3
)

def Func(arg_0, arg_1):
    """
    Semver tag triggered deployment helper
    """
    check_environment(arg_0, arg_1)

    click.secho('Fetching tags from the upstream ...')
    arg_2 = TagHandler(git.list_tags())

    print_information(arg_2, arg_1)

    arg_3 = arg_2.yield_tag(arg_0, arg_1)
    confirm(arg_3)


def Func ( arg_0 ) : from bolt . local . array import BoltArrayLocal arg_1 = arg_0 . _rdd if arg_0 . _ordered else arg_0 . _rdd . sortByKey ( ) return BoltArrayLocal ( arg_1 . values ( ) . Func ( ) )

def Func(arg_0):
        """
        Return the Func element of an array
        """
        from bolt.local.array import BoltArrayLocal
        arg_1 = arg_0._rdd if arg_0._ordered else arg_0._rdd.sortByKey()
        return BoltArrayLocal(arg_1.values().Func())


def Func ( arg_0 , arg_1 , arg_2 = 30 ) : arg_3 = len ( arg_0 . citation ) arg_4 = [ reff . split ( ":" ) [ - 1 ] for reff in arg_1 ( arg_3 = arg_3 ) ] arg_5 = [ ] arg_6 = 0 while arg_6 + arg_2 - 1 < len ( arg_4 ) : arg_5 . append ( tuple ( [ arg_4 [ arg_6 ] + "-" + arg_4 [ arg_6 + arg_2 - 1 ] , arg_4 [ arg_6 ] ] ) ) arg_6 += arg_2 if arg_6 < len ( arg_4 ) : arg_5 . append ( tuple ( [ arg_4 [ arg_6 ] + "-" + arg_4 [ len ( arg_4 ) - 1 ] , arg_4 [ arg_6 ] ] ) ) return arg_5

def Func(arg_0, arg_1, arg_2=30):
    """ Groups line reference together

    :param text: Text object
    :type text: MyCapytains.resources.text.api
    :param getreffs: Callback function to retrieve text
    :type getreffs: function(level)
    :param lines: Number of lines to use by group
    :type lines: int
    :return: List of grouped urn references with their human readable version
    :rtype: [(str, str)]
    """
    arg_3 = len(arg_0.citation)
    arg_4 = [reff.split(":")[-1] for reff in arg_1(arg_3=arg_3)]
    arg_5 = []
    arg_6 = 0
    while arg_6 + arg_2 - 1 < len(arg_4):
        arg_5.append(tuple([arg_4[arg_6]+"-"+arg_4[arg_6+arg_2-1], arg_4[arg_6]]))
        arg_6 += arg_2
    if arg_6 < len(arg_4):
        arg_5.append(tuple([arg_4[arg_6]+"-"+arg_4[len(arg_4)-1], arg_4[arg_6]]))
    return arg_5


return self.dist(src, tar, *args, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 , * arg_3 , ** arg_4 ) : return arg_0 . dist ( arg_1 , arg_2 , * arg_3 , ** arg_4 )

def Func(arg_0, arg_1, arg_2, *arg_3, **arg_4):
        """Return absolute distance.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison
        *args
            Variable length argument list.
        **kwargs
            Arbitrary keyword arguments.

        Returns
        -------
        int
            Absolute distance

        """
        return arg_0.dist(arg_1, arg_2, *arg_3, **arg_4)


def Func(arg_0):
    """
    Perform a quick check on a BAM via `samtools quickcheck`.
    This will detect obvious BAM errors such as truncation.

    :param str bam_path: path to BAM file to checked

    :rtype: boolean
    :return: True if the BAM is valid, False is BAM is invalid or something related to the call went wrong
    """
    arg_1, arg_2 = os.path.split(arg_0)
    arg_3 = subprocess.call(['docker', 'run', '-v', arg_1 + ':/data',
                                 'quay.io/ucsc_cgl/samtools:1.3--256539928ea162949d8a65ca5c79a72ef557ce7c',
                                 'quickcheck', '-vv', '/data/' + arg_2])
    if arg_3 != 0:
        return False
    return True

Perform a quick check on a BAM via samtools quickcheck . This will detect obvious BAM errors such as truncation .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_3
=
list
(
zip
(
arg_1
,
[
' '
]
*
len
(
arg_1
)
)
)
if
arg_1
and
arg_1
[
0
]
else
arg_4
=
itertools
.
zip_longest
if
sys
.
version_info
[
0
]
==
3
else
itertools
.
izip_longest
if
arg_0
.
args
:
arg_5
=
[
v
if
hasattr
(
v
,
'parse'
)
else
v
for
v
in
copy
.
copy
(
arg_0
.
args
)
]
arg_1
=
arg_1
if
isinstance
(
arg_1
,
list
)
else
[
arg_1
]
arg_6
=
[
arg_0
.
_parse_arg
(
arg_7
,
arg
,
arg_2
)
for
arg
,
arg_7
in
arg_4
(
[
a
for
a
in
arg_1
]
,
arg_5
)
]
for
arg_7
in
arg_6
:
if
arg_7
:
arg_7
.
parse
(
arg_2
)
if
not
arg_3
:
arg_3
=
[
v
.
value
for
v
in
arg_6
if
v
]
if
not
arg_3
:
arg_3
=
''
Variable
(
[
'@arguments'
,
,
arg_3
]
)
.
parse
(
arg_2
)

def Func(arg_0, arg_1, arg_2):
        """Parse arguments to mixin. Add them to scope
        as variables. Sets upp special variable @arguments
        as well.
        args:
            args (list): arguments
            scope (Scope): current scope
        raises:
            SyntaxError
        """
        arg_3 = list(zip(arg_1,
                             [' '] * len(arg_1))) if arg_1 and arg_1[0] else None
        arg_4 = itertools.zip_longest if sys.version_info[
            0] == 3 else itertools.izip_longest
        if arg_0.args:
            arg_5 = [
                v if hasattr(v, 'parse') else v for v in copy.copy(arg_0.args)
            ]
            arg_1 = arg_1 if isinstance(arg_1, list) else [arg_1]
            arg_6 = [
                arg_0._parse_arg(arg_7, arg, arg_2)
                for arg, arg_7 in arg_4([a for a in arg_1], arg_5)
            ]
            for arg_7 in arg_6:
                if arg_7:
                    arg_7.parse(arg_2)
            if not arg_3:
                arg_3 = [v.value for v in arg_6 if v]
        if not arg_3:
            arg_3 = ''
        Variable(['@arguments', None, arg_3]).parse(arg_2)

Parse arguments to mixin . Add them to scope as variables . Sets upp special variable


return [field['name'] for field in obj_description['fields']]

def Func ( arg_0 , arg_1 ) : arg_0 . get_conn ( ) arg_2 = arg_0 . describe_object ( arg_1 ) return [ arg_3 [ 'name' ] for arg_3 in arg_2 [ 'fields' ] ]

def Func(arg_0, arg_1):
        """
        Get a list of all available fields for an object.

        :param obj: The name of the Salesforce object that we are getting a description of.
        :type obj: str
        :return: the names of the fields.
        :rtype: list of str
        """
        arg_0.get_conn()

        arg_2 = arg_0.describe_object(arg_1)

        return [arg_3['name'] for arg_3 in arg_2['fields']]

Get a list of all available fields for an object .


def Func ( arg_0 , arg_1 ) : arg_2 = ffi . new ( 'OM_uint32[1]' ) arg_3 = ffi . new ( 'gss_buffer_desc[1]' ) arg_3 [ 0 ] . length = len ( arg_1 ) arg_5 = ffi . new ( 'char[]' , arg_1 ) arg_3 [ 0 ] . value = arg_5 arg_7 = ffi . new ( 'gss_OID[1]' ) arg_8 = ffi . new ( 'gss_buffer_desc[1]' ) arg_9 = ffi . new ( 'gss_name_t[1]' ) arg_10 = ffi . new ( 'OM_uint32[1]' ) arg_11 = ffi . new ( 'OM_uint32[1]' ) arg_12 = ffi . new ( 'gss_cred_id_t[1]' ) if arg_0 . _cred_object is not None : arg_13 = arg_0 . _cred_object . _cred [ 0 ] else : arg_13 = ffi . cast ( 'gss_cred_id_t' , C . GSS_C_NO_CREDENTIAL ) arg_14 = C . gss_accept_sec_context ( arg_2 , arg_0 . _ctx , arg_13 , arg_3 , arg_0 . _channel_bindings , arg_9 , arg_7 , arg_8 , arg_10 , arg_11 , arg_12 ) if arg_9 [ 0 ] : arg_15 = MechName ( arg_9 , arg_7 [ 0 ] ) try : if arg_8 [ 0 ] . length != 0 : arg_16 = _buf_to_str ( arg_8 [ 0 ] ) else : arg_16 = None if GSS_ERROR ( arg_14 ) : if arg_2 [ 0 ] and arg_7 [ 0 ] : raise _exception_for_status ( arg_14 , arg_2 [ 0 ] , arg_7 [ 0 ] , arg_16 ) else : raise _exception_for_status ( arg_14 , arg_2 [ 0 ] , None , arg_16 ) arg_0 . established = not ( arg_14 & C . GSS_S_CONTINUE_NEEDED ) arg_0 . flags = arg_10 [ 0 ] if ( arg_0 . flags & C . GSS_C_DELEG_FLAG ) : arg_0 . delegated_cred = Credential ( arg_12 ) if arg_7 [ 0 ] : arg_0 . mech_type = OID ( arg_7 [ 0 ] [ 0 ] ) if arg_9 [ 0 ] : arg_15 . _mech_type = arg_0 . mech_type arg_0 . peer_name = arg_15 return arg_16 except : if arg_0 . _ctx : C . gss_delete_sec_context ( arg_2 , arg_0 . _ctx , ffi . cast ( 'gss_buffer_t' , C . GSS_C_NO_BUFFER ) ) arg_0 . _reset_flags ( ) raise finally : if arg_8 [ 0 ] . length != 0 : C . gss_release_buffer ( arg_2 , arg_8 ) if arg_12 [ 0 ] and not arg_0 . delegated_cred : C . gss_release_cred ( arg_2 , arg_12 )

def Func(arg_0, arg_1):
        """Performs a Func to establish the context as an acceptor.

        This method should be called in a loop and fed input tokens from the initiator, and its
        output tokens should be sent to the initiator, until this context's :attr:`established`
        attribute is True.

        :param input_token: The input token from the initiator (required).
        :type input_token: bytes
        :returns: either a byte string with the next token to send to the initiator,
            or None if there is no further token to send to the initiator.
        :raises: :exc:`~gssapi.error.GSSException` if there is an error establishing the context.
        """
        arg_2 = ffi.new('OM_uint32[1]')
        arg_3 = ffi.new('gss_buffer_desc[1]')
        arg_3[0].length = len(arg_1)
        arg_5 = ffi.new('char[]', arg_1)
        arg_3[0].value = arg_5

        arg_7 = ffi.new('gss_OID[1]')
        arg_8 = ffi.new('gss_buffer_desc[1]')
        arg_9 = ffi.new('gss_name_t[1]')
        arg_10 = ffi.new('OM_uint32[1]')
        arg_11 = ffi.new('OM_uint32[1]')
        arg_12 = ffi.new('gss_cred_id_t[1]')

        if arg_0._cred_object is not None:
            arg_13 = arg_0._cred_object._cred[0]
        else:
            arg_13 = ffi.cast('gss_cred_id_t', C.GSS_C_NO_CREDENTIAL)

        arg_14 = C.gss_accept_sec_context(
            arg_2,
            arg_0._ctx,
            arg_13,
            arg_3,
            arg_0._channel_bindings,
            arg_9,
            arg_7,
            arg_8,
            arg_10,
            arg_11,
            arg_12
        )
        if arg_9[0]:
            arg_15 = MechName(arg_9, arg_7[0])  # make sure src_name is GC'd
        try:
            if arg_8[0].length != 0:
                arg_16 = _buf_to_str(arg_8[0])
            else:
                arg_16 = None

            if GSS_ERROR(arg_14):
                if arg_2[0] and arg_7[0]:
                    raise _exception_for_status(arg_14, arg_2[0], arg_7[0], arg_16)
                else:
                    raise _exception_for_status(arg_14, arg_2[0], None, arg_16)

            arg_0.established = not (arg_14 & C.GSS_S_CONTINUE_NEEDED)
            arg_0.flags = arg_10[0]

            if (arg_0.flags & C.GSS_C_DELEG_FLAG):
                arg_0.delegated_cred = Credential(arg_12)

            if arg_7[0]:
                arg_0.mech_type = OID(arg_7[0][0])

                if arg_9[0]:
                    arg_15._mech_type = arg_0.mech_type
                    arg_0.peer_name = arg_15

            return arg_16
        except:
            if arg_0._ctx:
                C.gss_delete_sec_context(
                    arg_2,
                    arg_0._ctx,
                    ffi.cast('gss_buffer_t', C.GSS_C_NO_BUFFER)
                )
                arg_0._reset_flags()
            raise
        finally:
            if arg_8[0].length != 0:
                C.gss_release_buffer(arg_2, arg_8)
            # if self.delegated_cred is present, it will handle gss_release_cred:
            if arg_12[0] and not arg_0.delegated_cred:
                C.gss_release_cred(arg_2, arg_12)

Performs a step to establish the context as an acceptor.

        This method should be called in a loop and fed input tokens from the initiator, and its
        output tokens should be sent to the initiator, until this context's :attr:`established`
        attribute is True.

        :param input_token: The input token from the initiator (required).
        :type input_token: bytes
        :returns: either a byte string with the next token to send to the initiator,
            or None if there is no further token to send to the initiator.
        :raises: :exc:`~gssapi.error.GSSException` if there is an error establishing the context.

Performs a step to establish the context as an acceptor .


def
Func
(
arg_0
,
arg_1
,
arg_2
=
'pkcs7'
)
:
arg_3
=
len
(
arg_0
)
if
arg_3
%
arg_1
:
raise
ValueError
(
"Input data is not padded"
)
if
arg_2
in
(
'pkcs7'
,
'x923'
)
:
arg_4
=
bord
(
arg_0
[
1
]
)
if
arg_4
<
1
or
arg_4
>
min
(
arg_1
,
arg_3
)
:
raise
ValueError
(
"Padding is incorrect."
)
if
arg_2
==
'pkcs7'
:
if
arg_0
[
arg_4
:
]
!=
bchr
(
arg_4
)
*
arg_4
:
raise
ValueError
(
"PKCS#7 padding is incorrect."
)
else
:
if
arg_0
[
arg_4
:
1
]
!=
bchr
(
0
)
*
(
arg_4
1
)
:
raise
ValueError
(
"ANSI X.923 padding is incorrect."
)
elif
arg_2
==
'iso7816'
:
arg_4
=
arg_3
arg_0
.
rfind
(
bchr
(
128
)
)
if
arg_4
<
1
or
arg_4
>
min
(
arg_1
,
arg_3
)
:
raise
ValueError
(
"Padding is incorrect."
)
if
arg_4
>
1
and
arg_0
[
1
arg_4
:
]
!=
bchr
(
0
)
*
(
arg_4
1
)
:
raise
ValueError
(
"ISO 7816-4 padding is incorrect."
)
else
:
raise
ValueError
(
"Unknown padding style"
)
return
arg_0
[
:
arg_4
]

def Func(arg_0, arg_1, arg_2='pkcs7'):
    """Remove standard padding.

    :Parameters:
      padded_data : byte string
        A piece of data with padding that needs to be stripped.
      block_size : integer
        The block boundary to use for padding. The input length
        must be a multiple of ``block_size``.
      style : string
        Padding algorithm. It can be *'pkcs7'* (default), *'iso7816'* or *'x923'*.
    :Return:
        Data without padding.
    :Raises ValueError:
        if the padding is incorrect.
    """

    arg_3 = len(arg_0)
    if arg_3 % arg_1:
        raise ValueError("Input data is not padded")
    if arg_2 in ('pkcs7', 'x923'):
        arg_4 = bord(arg_0[-1])
        if arg_4<1 or arg_4>min(arg_1, arg_3):
            raise ValueError("Padding is incorrect.")
        if arg_2 == 'pkcs7':
            if arg_0[-arg_4:]!=bchr(arg_4)*arg_4:
                raise ValueError("PKCS#7 padding is incorrect.")
        else:
            if arg_0[-arg_4:-1]!=bchr(0)*(arg_4-1):
                raise ValueError("ANSI X.923 padding is incorrect.")
    elif arg_2 == 'iso7816':
        arg_4 = arg_3 - arg_0.rfind(bchr(128))
        if arg_4<1 or arg_4>min(arg_1, arg_3):
            raise ValueError("Padding is incorrect.")
        if arg_4>1 and arg_0[1-arg_4:]!=bchr(0)*(arg_4-1):
            raise ValueError("ISO 7816-4 padding is incorrect.")
    else:
        raise ValueError("Unknown padding style")
    return arg_0[:-arg_4]


def Func(arg_0, arg_1, arg_2):
        """
        Register unit object on interface level object
        """
        nameAvailabilityCheck(arg_0, arg_1, arg_2)
        assert arg_2._parent is None
        arg_2._parent = arg_0
        arg_2._name = arg_1
        arg_0._units.append(arg_2)


return cached_download('https://docs.mikeboers.com/pyav/samples/' + name,
                           os.path.join('pyav-curated', name.replace('/', os.path.sep)))

def Func(arg_0):
    """Download and return a path to a sample that is Func by the PyAV developers.

    Data is handled by :func:`cached_download`.

    """
    return cached_download('https://docs.mikeboers.com/pyav/samples/' + arg_0,
                           os.path.join('pyav-Func', arg_0.replace('/', os.path.sep)))

Download and return a path to a sample that is curated by the PyAV developers.

    Data is handled by :func:`cached_download`.

Download and return a path to a sample that is curated by the PyAV developers .


def
Func
(
arg_0
,
arg_1
,
arg_2
=
)
:
arg_0
.
find_code_units
(
arg_1
)
arg_3
=
max
(
[
len
(
arg_11
.
name
)
for
arg_11
in
arg_0
.
code_units
]
+
[
5
]
)
arg_4
=
"%%- %ds  "
%
arg_3
arg_5
=
"%s   %s: %s\n"
arg_6
=
(
arg_4
%
"Name"
)
+
" Stmts   Miss"
arg_7
=
arg_4
+
"%6d %6d"
if
arg_0
.
branches
:
arg_6
+=
" Branch BrMiss"
arg_7
+=
" %6d %6d"
arg_8
=
Numbers
.
pc_str_width
(
)
arg_6
+=
"%*s"
%
(
arg_8
+
4
,
"Cover"
)
arg_7
+=
"%%%ds%%%%"
%
(
arg_8
+
3
,
)
if
arg_0
.
config
.
show_missing
:
arg_6
+=
"   Missing"
arg_7
+=
"   %s"
arg_9
=
"-"
*
len
(
arg_6
)
+
"\n"
arg_6
+=
"\n"
arg_7
+=
"\n"
if
not
arg_2
:
arg_2
=
sys
.
stdout
arg_2
.
write
(
arg_6
)
arg_2
.
write
(
arg_9
)
arg_10
=
Numbers
(
)
for
arg_11
in
arg_0
.
code_units
:
try
:
arg_12
=
arg_0
.
coverage
.
_analyze
(
arg_11
)
arg_13
=
arg_12
.
numbers
arg_14
=
(
arg_11
.
name
,
arg_13
.
n_statements
,
arg_13
.
n_missing
)
if
arg_0
.
branches
:
arg_14
+=
(
arg_13
.
n_branches
,
arg_13
.
n_missing_branches
)
arg_14
+=
(
arg_13
.
pc_covered_str
,
)
if
arg_0
.
config
.
show_missing
:
arg_14
+=
(
arg_12
.
missing_formatted
(
)
,
)
arg_2
.
write
(
arg_7
%
arg_14
)
arg_10
+=
arg_13
except
KeyboardInterrupt
:
raise
except
:
arg_15
=
not
arg_0
.
config
.
ignore_errors
if
arg_15
:
arg_16
,
arg_17
=
sys
.
exc_info
(
)
[
:
2
]
if
arg_16
is
NotPython
and
not
arg_11
.
should_be_python
(
)
:
arg_15
=
False
if
arg_15
:
arg_2
.
write
(
arg_5
%
(
arg_11
.
name
,
arg_16
.
__name__
,
arg_17
)
)
if
arg_10
.
n_files
>
1
:
arg_2
.
write
(
arg_9
)
arg_14
=
(
"TOTAL"
,
arg_10
.
n_statements
,
arg_10
.
n_missing
)
if
arg_0
.
branches
:
arg_14
+=
(
arg_10
.
n_branches
,
arg_10
.
n_missing_branches
)
arg_14
+=
(
arg_10
.
pc_covered_str
,
)
if
arg_0
.
config
.
show_missing
:
arg_14
+=
(
""
,
)
arg_2
.
write
(
arg_7
%
arg_14
)
return
arg_10
.
pc_covered

def Func(arg_0, arg_1, arg_2=None):
        """Writes a Func summarizing coverage statistics per module.

        `outfile` is a file object to write the summary to.

        """
        arg_0.find_code_units(arg_1)

        # Prepare the formatting strings
        arg_3 = max([len(arg_11.name) for arg_11 in arg_0.code_units] + [5])
        arg_4 = "%%- %ds  " % arg_3
        arg_5 = "%s   %s: %s\n"
        arg_6 = (arg_4 % "Name") + " Stmts   Miss"
        arg_7 = arg_4 + "%6d %6d"
        if arg_0.branches:
            arg_6 += " Branch BrMiss"
            arg_7 += " %6d %6d"
        arg_8 = Numbers.pc_str_width()
        arg_6 += "%*s" % (arg_8+4, "Cover")
        arg_7 += "%%%ds%%%%" % (arg_8+3,)
        if arg_0.config.show_missing:
            arg_6 += "   Missing"
            arg_7 += "   %s"
        arg_9 = "-" * len(arg_6) + "\n"
        arg_6 += "\n"
        arg_7 += "\n"

        if not arg_2:
            arg_2 = sys.stdout

        # Write the header
        arg_2.write(arg_6)
        arg_2.write(arg_9)

        arg_10 = Numbers()

        for arg_11 in arg_0.code_units:
            try:
                arg_12 = arg_0.coverage._analyze(arg_11)
                arg_13 = arg_12.numbers
                arg_14 = (arg_11.name, arg_13.n_statements, arg_13.n_missing)
                if arg_0.branches:
                    arg_14 += (arg_13.n_branches, arg_13.n_missing_branches)
                arg_14 += (arg_13.pc_covered_str,)
                if arg_0.config.show_missing:
                    arg_14 += (arg_12.missing_formatted(),)
                arg_2.write(arg_7 % arg_14)
                arg_10 += arg_13
            except KeyboardInterrupt:                   # pragma: not covered
                raise
            except:
                arg_15 = not arg_0.config.ignore_errors
                if arg_15:
                    arg_16, arg_17 = sys.exc_info()[:2]
                    if arg_16 is NotPython and not arg_11.should_be_python():
                        arg_15 = False
                if arg_15:
                    arg_2.write(arg_5 % (arg_11.name, arg_16.__name__, arg_17))

        if arg_10.n_files > 1:
            arg_2.write(arg_9)
            arg_14 = ("TOTAL", arg_10.n_statements, arg_10.n_missing)
            if arg_0.branches:
                arg_14 += (arg_10.n_branches, arg_10.n_missing_branches)
            arg_14 += (arg_10.pc_covered_str,)
            if arg_0.config.show_missing:
                arg_14 += ("",)
            arg_2.write(arg_7 % arg_14)

        return arg_10.pc_covered

Writes a report summarizing coverage statistics per module.

        `outfile` is a file object to write the summary to.

Writes a report summarizing coverage statistics per module .


def
Func
(
arg_0
)
:
if
"version"
in
arg_0
.
document
.
attrib
:
arg_1
=
arg_0
.
document
.
attrib
[
"version"
]
.
lower
(
)
if
arg_1
in
allowed_versions
[
arg_0
.
params
[
'service'
]
]
:
arg_0
.
params
[
"version"
]
=
arg_1
else
:
raise
OWSInvalidParameterValue
(
"Version %s is not supported"
%
arg_1
,
arg_1
=
"version"
)
elif
arg_0
.
_get_request_type
(
)
==
"getcapabilities"
:
arg_0
.
params
[
"version"
]
=
else
:
raise
OWSMissingParameterValue
(
'Parameter "version" is missing'
,
arg_1
=
"version"
)
return
arg_0
.
params
[
"version"
]

def Func(arg_0):
        """Find requested version in POST request."""
        if "version" in arg_0.document.attrib:
            arg_1 = arg_0.document.attrib["version"].lower()
            if arg_1 in allowed_versions[arg_0.params['service']]:
                arg_0.params["version"] = arg_1
            else:
                raise OWSInvalidParameterValue("Version %s is not supported" % arg_1, arg_1="version")
        elif arg_0._get_request_type() == "getcapabilities":
            arg_0.params["version"] = None
        else:
            raise OWSMissingParameterValue('Parameter "version" is missing', arg_1="version")
        return arg_0.params["version"]

Find requested version in POST request .


def Func ( arg_0 , Func ) : _set_params ( arg_0 . ode_obj , 'ERP' , Func , arg_0 . ADOF + arg_0 . LDOF )

def Func(arg_0, Func):
        '''Set the ERP values for this object's degrees of freedom.

        Parameters
        ----------
        erps : float or sequence of float
            An ERP value to set on all degrees of freedom, or a list
            containing one such value for each degree of freedom.
        '''
        _set_params(arg_0.ode_obj, 'ERP', Func, arg_0.ADOF + arg_0.LDOF)

Set the ERP values for this object s degrees of freedom .


def Func ( arg_0 ) : try : arg_1 = arg_0 . schema . validate ( arg_0 . to_dict ( ) ) except ValidationError as ex : raise ModelValidationError ( ex . messages , ex . field_names , ex . fields , ex . data , ** ex . kwargs )

def Func(arg_0):
        """Validate the internal representation of the instance."""
        try:
            arg_1 = arg_0.schema.validate(arg_0.to_dict())
        except ValidationError as ex:
            raise ModelValidationError(
                ex.messages, ex.field_names, ex.fields, ex.data, **ex.kwargs)

Validate the internal representation of the instance .


def Func ( arg_0 , arg_1 ) : arg_1 = arg_0 . _inject_project_id ( arg_1 , BODY , PROJECT_ID ) return arg_0 . get_conn ( ) . transferJobs ( ) . create ( arg_1 = arg_1 ) . execute ( num_retries = arg_0 . num_retries )

def Func(arg_0, arg_1):
        """
        Creates a transfer job that runs periodically.

        :param body: (Required) A request body, as described in
            https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/patch#request-body
        :type body: dict
        :return: transfer job.
            See:
            https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob
        :rtype: dict
        """
        arg_1 = arg_0._inject_project_id(arg_1, BODY, PROJECT_ID)
        return arg_0.get_conn().transferJobs().create(arg_1=arg_1).execute(num_retries=arg_0.num_retries)

Creates a transfer job that runs periodically .


(currentlyIncluding, cache, namFilename, unique_glyphs)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = os . path . abspath ( os . path . normcase ( arg_2 ) ) if arg_4 in arg_0 : raise NamelistRecursionError ( arg_4 ) arg_0 . add ( arg_4 ) try : arg_5 = _Func ( arg_1 , arg_4 , arg_3 ) finally : arg_0 . remove ( arg_4 ) return arg_5

def Func(arg_0, arg_1, arg_2, arg_3):
  """ Detect infinite recursion and prevent it.

  This is an implementation detail of readNamelist.

  Raises NamelistRecursionError if namFilename is in the process of being included
  """
  # normalize
  arg_4 = os.path.abspath(os.path.normcase(arg_2))
  if arg_4 in arg_0:
    raise NamelistRecursionError(arg_4)
  arg_0.add(arg_4)
  try:
    arg_5 = _Func(arg_1, arg_4, arg_3)
  finally:
    arg_0.remove(arg_4)
  return arg_5

Detect infinite recursion and prevent it .


def Func ( arg_0 , ** arg_1 ) : arg_0 . interactive = arg_1 [ 'interactive' ] arg_0 . verbosity = arg_1 [ 'verbosity' ] arg_0 . symlink = arg_1 [ 'link' ] arg_0 . clear = arg_1 [ 'clear' ] arg_0 . dry_run = arg_1 [ 'dry_run' ] arg_7 = arg_1 [ 'ignore_patterns' ] if arg_1 [ 'use_default_ignore_patterns' ] : arg_7 += [ 'CVS' , '.*' , '*~' ] arg_0 . ignore_patterns = list ( set ( arg_7 ) ) arg_0 . post_process = arg_1 [ 'post_process' ]

def Func(arg_0, **arg_1):
        """
        Set instance variables based on an options dict
        """
        arg_0.interactive = arg_1['interactive']
        arg_0.verbosity = arg_1['verbosity']
        arg_0.symlink = arg_1['link']
        arg_0.clear = arg_1['clear']
        arg_0.dry_run = arg_1['dry_run']
        arg_7 = arg_1['ignore_patterns']
        if arg_1['use_default_ignore_patterns']:
            arg_7 += ['CVS', '.*', '*~']
        arg_0.ignore_patterns = list(set(arg_7))
        arg_0.post_process = arg_1['post_process']


def Func ( arg_0 ) : assert isinstance ( arg_0 , basestring ) return [ int ( arg_1 ) for arg_1 in arg_0 . split ( ) ]

def Func(arg_0):
  """
  Parse a string of space-separated numbers, returning a Python list.

  :param s: (string) to parse
  :returns: (list) binary SDR
  """
  assert isinstance(arg_0, basestring)
  return [int(arg_1) for arg_1 in arg_0.split()]

Parse a string of space - separated numbers returning a Python list .


def Func(arg_0, arg_1, arg_2):
        """Initializes sitetree in memory.

        Returns tuple with resolved tree alias and items on success.

        On fail returns (None, None).

        :param str|unicode tree_alias:
        :param Context context:
        :rtype: tuple
        """
        arg_3 = arg_2.get('request', None)

        if arg_3 is None:
            raise SiteTreeError(
                'Sitetree requires "django.core.context_processors.request" template context processor to be active. '
                'If it is, check that your view pushes request data into the template.')

        if id(arg_3) != id(arg_0.current_request):
            arg_0.init(arg_2)

        # Resolve tree_alias from the context.
        arg_1 = arg_0.resolve_var(arg_1)
        arg_1, arg_4 = arg_0.get_sitetree(arg_1)

        if not arg_4:
            return None, None

        return arg_1, arg_4


def
Func
(
arg_0
,
arg_1
)
:
if
arg_1
not
in
arg_0
.
spaces
:
raise
ValueError
(
"Space '%s' does not exist"
%
arg_1
)
if
arg_1
in
arg_0
.
static_spaces
:
arg_2
=
arg_0
.
static_spaces
[
arg_1
]
if
arg_2
.
is_derived
:
raise
ValueError
(
"%s has derived spaces"
%
repr
(
arg_2
.
interface
)
)
else
:
arg_0
.
static_spaces
.
del_item
(
arg_1
)
arg_0
.
model
.
spacegraph
.
remove_node
(
arg_2
)
arg_0
.
inherit
(
)
arg_0
.
model
.
spacegraph
.
update_subspaces
(
arg_0
)
elif
arg_1
in
arg_0
.
dynamic_spaces
:
arg_0
.
dynamic_spaces
.
del_item
(
arg_1
)
else
:
raise
ValueError
(
"Derived cells cannot be deleted"
)

def Func(arg_0, arg_1):
        """Delete a space."""
        if arg_1 not in arg_0.spaces:
            raise ValueError("Space '%s' does not exist" % arg_1)

        if arg_1 in arg_0.static_spaces:
            arg_2 = arg_0.static_spaces[arg_1]
            if arg_2.is_derived:
                raise ValueError(
                    "%s has derived spaces" % repr(arg_2.interface)
                )
            else:
                arg_0.static_spaces.del_item(arg_1)
                arg_0.model.spacegraph.remove_node(arg_2)
                arg_0.inherit()
                arg_0.model.spacegraph.update_subspaces(arg_0)
                # TODO: Destroy space

        elif arg_1 in arg_0.dynamic_spaces:
            # TODO: Destroy space
            arg_0.dynamic_spaces.del_item(arg_1)

        else:
            raise ValueError("Derived cells cannot be deleted")


def Func(arg_0):
    """Convert Monero decimal to atomic integer of piconero."""
    if not isinstance(arg_0, (Decimal, float) + _integer_types):
        raise ValueError("Amount '{}' doesn't have numeric type. Only Decimal, int, long and "
                "float (not recommended) are accepted as amounts.")
    return int(arg_0 * 10**12)

Convert Monero decimal to atomic integer of piconero .


(self, location_id='global', **params: keys)

return self._get_model(url, PartialClan, **params)

def Func ( arg_0 , arg_1 = 'global' , ** arg_2 : arg_3 ) : arg_4 = arg_0 . api . LOCATIONS + '/' + str ( arg_1 ) + '/rankings/clans' return arg_0 . _get_model ( arg_4 , PartialClan , ** arg_2 )

def Func(arg_0, arg_1='global', **arg_2: arg_3):
        """Get a list of top clans by trophy

        Parameters
        ----------
        location_id: Optional[str] = 'global'
            A location ID or global
            See https://github.com/RoyaleAPI/cr-api-data/blob/master/json/regions.json
            for a list of acceptable location IDs
        \*\*limit: Optional[int] = None
            Limit the number of items returned in the response
        \*\*timeout: Optional[int] = None
            Custom timeout that overwrites Client.timeout
        """
        arg_4 = arg_0.api.LOCATIONS + '/' + str(arg_1) + '/rankings/clans'
        return arg_0._get_model(arg_4, PartialClan, **arg_2)


def
Func
(
arg_0
)
:
print
(
'Tagging "{}"'
.
format
(
arg_0
)
)
arg_1
=
'"Released version {}"'
.
format
(
arg_0
)
Popen
(
[
'git'
,
'tag'
,
'-s'
,
'-m'
,
arg_1
,
arg_0
]
)
.
wait
(
)

def Func(arg_0):
    """Tags the current version."""
    print('Tagging "{}"'.format(arg_0))
    arg_1 = '"Released version {}"'.format(arg_0)
    Popen(['git', 'tag', '-s', '-m', arg_1, arg_0]).wait()


return self._execute(Command.EXECUTE_ASYNC_SCRIPT, {
            'script': script,
            'args': list(args)})

def Func ( arg_0 , arg_1 , * arg_2 ) : return arg_0 . _execute ( Command . EXECUTE_ASYNC_SCRIPT , { 'script' : arg_1 , 'args' : list ( arg_2 ) } )

def Func(arg_0, arg_1, *arg_2):
        """Execute JavaScript Asynchronously in current context.

        Support:
            Web(WebView)

        Args:
            script: The JavaScript to execute.
            *args: Arguments for your JavaScript.

        Returns:
            Returns the return value of the function.
        """
        return arg_0._execute(Command.EXECUTE_ASYNC_SCRIPT, {
            'script': arg_1,
            'args': list(arg_2)})

Execute JavaScript Asynchronously in current context .


def Func ( arg_0 ) : with open ( arg_0 , 'r' ) as f : for arg_1 in f . readlines ( ) : yield json . loads ( arg_1 )

def Func (arg_0):
    """
    iterator for JSON-per-line in a file pattern
    """
    with open(arg_0, 'r') as f:
        for arg_1 in f.readlines():
            yield json.loads(arg_1)

iterator for JSON - per - line in a file pattern


def Func ( arg_0 , arg_1 = None , arg_2 = [ ] , arg_3 = "" ) : if arg_1 is not None and len ( arg_2 ) != 0 : if arg_1 in arg_0 . logList : for arg_4 in arg_2 : if arg_4 not in arg_0 . logList . get ( arg_1 ) [ 0 ] : arg_0 . logList . get ( arg_1 ) [ 0 ] . append ( arg_4 ) else : arg_0 . logList [ arg_1 ] = [ ] arg_0 . logList [ arg_1 ] . append ( arg_2 ) if len ( arg_0 . logList [ arg_1 ] ) > 1 and arg_3 != "" : arg_0 . logList . get ( arg_1 ) [ 1 ] == arg_3 else : arg_0 . logList . get ( arg_1 ) . append ( arg_3 ) arg_0 . logType . clear ( ) arg_0 . logType . addItems ( list ( arg_0 . logList . keys ( ) ) ) arg_0 . changeLogType ( )

def Func(arg_0, arg_1=None, arg_2=[], arg_3=""):
        '''Add or change list of logbooks.'''
        if arg_1 is not None and len(arg_2) != 0:
            if arg_1 in arg_0.logList:
                for arg_4 in arg_2:
                    if arg_4 not in arg_0.logList.get(arg_1)[0]:
                        # print("Adding log " + " to " + type + " log type.")
                        arg_0.logList.get(arg_1)[0].append(arg_4)
            else:
                # print("Adding log type: " + type)
                arg_0.logList[arg_1] = []
                arg_0.logList[arg_1].append(arg_2)

            # If default given, auto-select upon menu creation
            if len(arg_0.logList[arg_1]) > 1 and arg_3 != "":
                arg_0.logList.get(arg_1)[1] == arg_3
            else:
                arg_0.logList.get(arg_1).append(arg_3)

            arg_0.logType.clear()
            arg_0.logType.addItems(list(arg_0.logList.keys()))
            arg_0.changeLogType()


return lambda model_cls_name: decorate(model_cls_name, name)

def Func(arg_0: arg_1 = None) -> arg_3:
    """
    Register classes that could be initialized from JSON configuration file.
    If name is not passed, the class name is converted to snake-case.
    """
    def decorate(arg_2: arg_3, arg_4: arg_1 = None) -> arg_3:
        arg_5 = arg_4 or short_name(arg_2)
        global arg_7
        arg_6 = arg_2.__module__ + ':' + arg_2.__name__
        if arg_5 in arg_7 and arg_7[arg_5] != arg_6:
            logger.warning('Registry name "{}" has been already Funced and will be overwritten.'.format(arg_5))
        arg_7[arg_5] = arg_6
        return arg_2

    return lambda model_cls_name: decorate(model_cls_name, arg_0)

Register classes that could be initialized from JSON configuration file . If name is not passed the class name is converted to snake - case .


def
Func
(
arg_0
)
:
if
arg_0
not
in
__NAMESPACE__
:
raise
NamespaceError
(
'Unknown Func: {:s}'
.
format
(
arg_0
)
)
arg_1
=
copy
.
deepcopy
(
JAMS_SCHEMA
[
'definitions'
]
[
'SparseObservation'
]
)
for
arg_2
in
[
'value'
,
'confidence'
]
:
try
:
arg_1
[
'properties'
]
[
arg_2
]
=
__NAMESPACE__
[
arg_0
]
[
arg_2
]
except
KeyError
:
pass
return
arg_1

def Func(arg_0):
    '''Construct a validation schema for a given Func.

    Parameters
    ----------
    ns_key : str
        Namespace key identifier (eg, 'beat' or 'segment_tut')

    Returns
    -------
    schema : dict
        JSON schema of `Func`
    '''

    if arg_0 not in __NAMESPACE__:
        raise NamespaceError('Unknown Func: {:s}'.format(arg_0))

    arg_1 = copy.deepcopy(JAMS_SCHEMA['definitions']['SparseObservation'])

    for arg_2 in ['value', 'confidence']:
        try:
            arg_1['properties'][arg_2] = __NAMESPACE__[arg_0][arg_2]
        except KeyError:
            pass

    return arg_1

Construct a validation schema for a given namespace.

    Parameters
    ----------
    ns_key : str
        Namespace key identifier (eg, 'beat' or 'segment_tut')

    Returns
    -------
    schema : dict
        JSON schema of `namespace`

Construct a validation schema for a given namespace .


def Func(arg_0, arg_1, arg_2, arg_3):
        """Reduce dicts of dicts to dot separated keys."""
        arg_4 = {}
        for arg_5, arg_6, arg_3 in iterate_schema(arg_1, arg_2, arg_3):
            arg_7 = arg_5['name']
            arg_8 = arg_5['type']
            arg_9 = arg_5['label']
            arg_10 = arg_6[arg_7] if arg_7 in arg_6 else None
            arg_4[arg_3] = {'name': arg_7, 'value': arg_10, 'type': arg_8, 'label': arg_9}

        return arg_4

Reduce dicts of dicts to dot separated keys .


def Func ( arg_0 ) : if len ( arg_0 . __members ) != 0 : if arg_0 . __num_processes > 1 : arg_1 = [ m . get ( ) for m in arg_0 . __members ] else : arg_1 = arg_0 . __members arg_2 = { } for arg_3 in arg_0 . __Func : arg_2 [ arg_3 . name ] = sum ( m . Func [ arg_3 . name ] for m in arg_1 ) / len ( arg_1 ) return arg_2 else : return None

def Func(arg_0):
        '''Population parameter vals == average member parameter vals'''

        if len(arg_0.__members) != 0:
            if arg_0.__num_processes > 1:
                arg_1 = [m.get() for m in arg_0.__members]
            else:
                arg_1 = arg_0.__members
            arg_2 = {}
            for arg_3 in arg_0.__Func:
                arg_2[arg_3.name] = sum(
                    m.Func[arg_3.name] for m in arg_1
                ) / len(arg_1)
            return arg_2
        else:
            return None


def Func ( arg_0 ) : arg_1 = { } arg_1 [ 'hosts' ] = [ arg_0 . get ( 'jackal' , 'host' ) ] if int ( arg_0 . get ( 'jackal' , 'use_ssl' ) ) : arg_1 [ 'use_ssl' ] = True if arg_0 . get ( 'jackal' , 'ca_certs' ) : arg_1 [ 'ca_certs' ] = arg_0 . get ( 'jackal' , 'ca_certs' ) if int ( arg_0 . get ( 'jackal' , 'client_certs' ) ) : arg_1 [ 'client_cert' ] = arg_0 . get ( 'jackal' , 'client_cert' ) arg_1 [ 'client_key' ] = arg_0 . get ( 'jackal' , 'client_key' ) arg_1 [ 'ssl_assert_hostname' ] = False connections . Func ( ** arg_1 )

def Func(arg_0):
    """
        Creates a connection based upon the given configuration object.
    """
    arg_1 = {}
    arg_1['hosts'] = [arg_0.get('jackal', 'host')]
    if int(arg_0.get('jackal', 'use_ssl')):
        arg_1['use_ssl'] = True
    if arg_0.get('jackal', 'ca_certs'):
        arg_1['ca_certs'] = arg_0.get('jackal', 'ca_certs')
    if int(arg_0.get('jackal', 'client_certs')):
        arg_1['client_cert'] = arg_0.get('jackal', 'client_cert')
        arg_1['client_key'] = arg_0.get('jackal', 'client_key')

    # Disable hostname checking for now.
    arg_1['ssl_assert_hostname'] = False

    connections.Func(**arg_1)

Creates a connection based upon the given configuration object .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
)
:
arg_0
=
wolframalpha
.
Client
(
pmxbot
.
config
[
'Wolfram|Alpha API key'
]
)
arg_5
=
arg_0
.
query
(
arg_4
)
return
next
(
arg_5
.
results
)
.
text

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
	"""
	A free-text query resolver by Wolfram|Alpha. Returns the first
	result, if available.
	"""
	arg_0 = wolframalpha.Client(pmxbot.config['Wolfram|Alpha API key'])
	arg_5 = arg_0.query(arg_4)
	return next(arg_5.results).text

A free - text query resolver by Wolfram|Alpha . Returns the first result if available .


(
        self, command, callback=True, command_type=QRTPacketType.PacketCommand
    )

def
Func
(
arg_0
,
arg_1
,
arg_2
=
True
,
arg_3
=
arg_4
.
PacketCommand
)
:
if
arg_0
.
transport
is
not
:
arg_6
=
len
(
arg_1
)
LOG
.
debug
(
"S: %s"
,
arg_1
)
arg_0
.
transport
.
write
(
struct
.
pack
(
RTCommand
%
arg_6
,
RTheader
.
size
+
arg_6
+
1
,
arg_3
.
value
,
arg_1
.
encode
(
)
,
b"\0"
,
)
)
arg_7
=
arg_0
.
loop
.
create_future
(
)
if
arg_2
:
arg_0
.
request_queue
.
append
(
arg_7
)
else
:
arg_7
.
set_result
(
)
return
arg_7
raise
QRTCommandException
(
"Not connected!"
)

def Func(
        arg_0, arg_1, arg_2=True, arg_3=arg_4.PacketCommand
    ):
        """ Sends commands to QTM """
        if arg_0.transport is not None:
            arg_6 = len(arg_1)
            LOG.debug("S: %s", arg_1)
            arg_0.transport.write(
                struct.pack(
                    RTCommand % arg_6,
                    RTheader.size + arg_6 + 1,
                    arg_3.value,
                    arg_1.encode(),
                    b"\0",
                )
            )

            arg_7 = arg_0.loop.create_future()
            if arg_2:
                arg_0.request_queue.append(arg_7)
            else:
                arg_7.set_result(None)
            return arg_7

        raise QRTCommandException("Not connected!")


(self, key, ignoreMissingKey=True, timeoutSecs=60, **kwargs)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
True
,
arg_3
=
60
,
**
arg_4
)
:
assert
arg_1
is
not
,
'"key" parameter is null'
arg_5
=
arg_0
.
do_json_request
(
'/3/Models.json/'
+
arg_1
,
cmd
=
'delete'
,
timeout
=
arg_3
)
if
not
arg_2
and
'f00b4r'
in
arg_5
:
raise
ValueError
(
'Model key not found: '
+
arg_1
)
verboseprint
(
"Func result:"
,
dump_json
(
arg_5
)
)
return
arg_5

def Func(arg_0, arg_1, arg_2=True, arg_3=60, **arg_4):
    '''
    Delete a model on the h2o cluster, given its key.
    '''
    assert arg_1 is not None, '"key" parameter is null'

    arg_5 = arg_0.do_json_request('/3/Models.json/' + arg_1, cmd='delete', timeout=arg_3)

    # TODO: look for what?
    if not arg_2 and 'f00b4r' in arg_5:
        raise ValueError('Model key not found: ' + arg_1)

    verboseprint("Func result:", dump_json(arg_5))
    return arg_5

Delete a model on the h2o cluster given its key .


def Func(arg_0, arg_1, arg_2):
        """Get a rate for a given currency and date.

        :type date: datetime.date

        >>> from datetime import date
        >>> c = CurrencyConverter()
        >>> c.Func('USD', date=date(2014, 3, 28))
        1.375...
        >>> c.Func('BGN', date=date(2010, 11, 21))
        Traceback (most recent call last):
        RateNotFoundError: BGN has no rate for 2010-11-21
        """
        if arg_1 == arg_0.ref_currency:
            return 1.0

        if arg_2 not in arg_0._rates[arg_1]:
            arg_3, arg_4 = arg_0.bounds[arg_1]

            if not arg_0.fallback_on_wrong_date:
                raise RateNotFoundError('{0} not in {1} bounds {2}/{3}'.format(
                    arg_2, arg_1, arg_3, arg_4))

            if arg_2 < arg_3:
                arg_5 = arg_3
            elif arg_2 > arg_4:
                arg_5 = arg_4
            else:
                raise AssertionError('Should never happen, bug in the code!')

            if arg_0.verbose:
                print(r'/!\ {0} not in {1} bounds {2}/{3}, falling back to {4}'.format(
                    arg_2, arg_1, arg_3, arg_4, arg_5))

            arg_2 = arg_5

        arg_6 = arg_0._rates[arg_1][arg_2]
        if arg_6 is None:
            raise RateNotFoundError('{0} has no rate for {1}'.format(arg_1, arg_2))
        return arg_6

Get a rate for a given currency and date.

        :type date: datetime.date

        >>> from datetime import date
        >>> c = CurrencyConverter()
        >>> c._get_rate('USD', date=date(2014, 3, 28))
        1.375...
        >>> c._get_rate('BGN', date=date(2010, 11, 21))
        Traceback (most recent call last):
        RateNotFoundError: BGN has no rate for 2010-11-21

Get a rate for a given currency and date .


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_1 : try : arg_0 . clusterprocids_finished . remove ( arg_2 ) except ValueError : pass

def Func(arg_0, arg_1):
        """Provide the run IDs of failed jobs

        Returns
        -------
        None

        """

        # remove failed clusterprocids from self.clusterprocids_finished
        # so that len(self.clusterprocids_finished)) becomes the number
        # of the successfully finished jobs
        for arg_2 in arg_1:
            try:
                arg_0.clusterprocids_finished.remove(arg_2)
            except ValueError:
                pass


def Func ( arg_0 , arg_1 ) : arg_2 = tokenize ( arg_0 , include_hrefs = False ) for arg_3 in arg_2 : arg_3 . annotation = arg_1 return arg_2

def Func(arg_0, arg_1):
    """Tokenize a document and add an annotation attribute to each token
    """
    arg_2 = tokenize(arg_0, include_hrefs=False)
    for arg_3 in arg_2:
        arg_3.annotation = arg_1
    return arg_2


def
Func
(
arg_0
)
:
try
:
for
arg_1
in
arg_0
.
items
:
yield
arg_0
.
read_dcm
(
arg_1
)
except
IOError
as
ioe
:
raise
IOError
(
'Error reading DICOM file: {}.'
.
format
(
arg_1
)
)
from
ioe

def Func(arg_0):
        """
        Generator that yields one by one the return value for self.read_dcm
        for each file within this set
        """
        try:
            for arg_1 in arg_0.items:
                yield arg_0.read_dcm(arg_1)
        except IOError as ioe:
            raise IOError('Error reading DICOM file: {}.'.format(arg_1)) from ioe

Generator that yields one by one the return value for self . read_dcm for each file within this set


return Table(df=df, name='BE' + '(' + self.name + ')')

def Func(arg_0):
        """
        Return binding energies instead of mass excesses
        """
        arg_1 = 938.2723
        # MeV
        arg_2 = 0.5110
        # MeV
        arg_3 = 939.5656
        # MeV
        arg_4 = 931.494028
        # MeV
        arg_5 = arg_0.Z * (arg_1 + arg_2) + (arg_0.A - arg_0.Z) * arg_3 - (arg_0.df + arg_0.A * arg_4)
        return Table(arg_5=arg_5, name='BE' + '(' + arg_0.name + ')')


def Func ( arg_0 ) : arg_1 = "" for arg_2 in arg_0 : arg_1 += "\\x" + format ( arg_2 , "02x" ) _LOGGER . debug ( arg_1 )

def Func(arg_0):
    """Debugging method to print out frames in hex."""
    arg_1 = ""
    for arg_2 in arg_0:
        arg_1 += "\\x" + format(arg_2, "02x")
    _LOGGER.debug(arg_1)

Debugging method to print out frames in hex .


def Func ( arg_0 ) : arg_1 = arg_0 . xmlnode . prop ( "name" ) if not arg_1 : arg_1 = "" return arg_1 . decode ( "utf-8" )

def Func(arg_0):
        """Get the name of the item.

        :return: the name of the item or `None`.
        :returntype: `unicode`"""
        arg_1 = arg_0.xmlnode.prop("name")
        if not arg_1:
            arg_1 = ""
        return arg_1.decode("utf-8")


def Func ( arg_0 ) : arg_1 = str ( arg_0 ) arg_2 = namedtuple ( 'EkmDate' , [ 'yy' , 'mm' , 'dd' , 'weekday' , 'hh' , 'minutes' , 'ss' ] ) if len ( arg_1 ) != 14 : arg_2 . yy = arg_2 . mm = arg_2 . dd = arg_2 . weekday = arg_2 . hh = arg_2 . minutes = arg_2 . ss = 0 return arg_2 arg_2 . yy = int ( arg_1 [ 0 : 2 ] ) arg_2 . mm = int ( arg_1 [ 2 : 4 ] ) arg_2 . dd = int ( arg_1 [ 4 : 6 ] ) arg_2 . weekday = int ( arg_1 [ 6 : 8 ] ) arg_2 . hh = int ( arg_1 [ 8 : 10 ] ) arg_2 . minutes = int ( arg_1 [ 10 : 12 ] ) arg_2 . ss = int ( arg_1 [ 12 : 14 ] ) return arg_2

def Func(arg_0):
        """Break out a date from Omnimeter read.

        Note a corrupt date will raise an exception when you
        convert it to int to hand to this method.

        Args:
            dateint (int):  Omnimeter datetime as int.

        Returns:
            tuple: Named tuple which breaks out as followws:

            ========== =====================
            yy         Last 2 digits of year
            mm         Month 1-12
            dd         Day 1-31
            weekday    Zero based weekday
            hh         Hour 0-23
            minutes    Minutes 0-59
            ss         Seconds 0-59
            ========== =====================

        """
        arg_1 = str(arg_0)
        arg_2 = namedtuple('EkmDate', ['yy', 'mm', 'dd', 'weekday', 'hh', 'minutes', 'ss'])

        if len(arg_1) != 14:
            arg_2.yy = arg_2.mm = arg_2.dd = arg_2.weekday = arg_2.hh = arg_2.minutes = arg_2.ss = 0
            return arg_2

        arg_2.yy = int(arg_1[0:2])
        arg_2.mm = int(arg_1[2:4])
        arg_2.dd = int(arg_1[4:6])
        arg_2.weekday = int(arg_1[6:8])
        arg_2.hh = int(arg_1[8:10])
        arg_2.minutes = int(arg_1[10:12])
        arg_2.ss = int(arg_1[12:14])
        return arg_2


def Func ( arg_0 ) : arg_1 = None arg_2 = None if 'key' in arg_0 . attrib : arg_1 = arg_0 . attrib [ 'key' ] else : arg_1 = None if arg_1 in [ 'time' , 'elevation' ] or arg_1 . startswith ( 'custom_dimension' ) : arg_2 = md_dimension_info ( arg_1 , arg_0 . find ( "dimensionInfo" ) ) elif arg_1 == 'DynamicDefaultValues' : arg_2 = md_dynamic_default_values_info ( arg_1 , arg_0 . find ( "DynamicDefaultValues" ) ) elif arg_1 == 'JDBC_VIRTUAL_TABLE' : arg_2 = md_jdbc_virtual_table ( arg_1 , arg_0 . find ( "virtualTable" ) ) else : arg_2 = arg_0 . text if None in [ arg_1 , arg_2 ] : return None else : return ( arg_1 , arg_2 )

def Func(arg_0):
    """Extract metadata entries from an xml node"""
    arg_1 = None
    arg_2 = None
    if 'key' in arg_0.attrib:
        arg_1 = arg_0.attrib['key']
    else:
        arg_1 = None

    if arg_1 in ['time', 'elevation'] or arg_1.startswith('custom_dimension'):
        arg_2 = md_dimension_info(arg_1, arg_0.find("dimensionInfo"))
    elif arg_1 == 'DynamicDefaultValues':
        arg_2 = md_dynamic_default_values_info(arg_1, arg_0.find("DynamicDefaultValues"))
    elif arg_1 == 'JDBC_VIRTUAL_TABLE':
        arg_2 = md_jdbc_virtual_table(arg_1, arg_0.find("virtualTable"))
    else:
        arg_2 = arg_0.text

    if None in [arg_1, arg_2]:
        return None
    else:
        return (arg_1, arg_2)


(self, sql_str, columns, *args, **kwargs)

return self._assemble_with_columns(sql_str, columns, *args, **kwargs)

def Func(arg_0, arg_1, arg_2, *arg_3, **arg_4):
        """ Alias for _assemble_with_columns
        """
        warnings.warn("Func has been depreciated for _assemble_with_columns. It will be removed in a future version.", DeprecationWarning)
        return arg_0._assemble_with_columns(arg_1, arg_2, *arg_3, **arg_4)


async def Func(arg_0):
    """
    Open authorize page in a browser,
    print the url if it didn't work

    Arguments
    ---------
    oauth_token : str
        The oauth token received in :func:`get_oauth_token`

    Returns
    -------
    str
        The PIN entered by the user
    """
    arg_1 = "https://api.twitter.com/oauth/authorize?oauth_token=" + arg_0

    try:
        arg_2 = webbrowser.open(arg_1)
        await asyncio.sleep(2)

        if not arg_2:
            raise RuntimeError
    except RuntimeError:
        print("could not open a browser\ngo here to enter your PIN: " + arg_1)

    arg_3 = input("\nEnter your PIN: ")
    return arg_3

Open authorize page in a browser print the url if it didn t work


return render(request, 'happenings/add_memories.html', {'form': form, 'event': event})

def Func(arg_0, arg_1):
    """ Adds a memory to an event. """
    arg_2 = get_object_or_404(Event, arg_1=arg_1)
    arg_3 = MemoryForm(arg_0.POST or None, arg_0.FILES or None)
    if arg_3.is_valid():
        arg_4 = arg_3.save(commit=False)
        arg_4.user = arg_0.user
        arg_4.event = arg_2
        arg_4.save()
        arg_6 = "Your thoughts were added. "

        if arg_0.FILES:
            arg_7 = arg_0.FILES.getlist('photos')
            arg_8 = len(arg_7)
            for arg_9 in arg_7:
                process_upload(arg_9, arg_4, arg_3, arg_2, arg_0)
            if arg_8 > 1:
                arg_6 += "{} images were added and should appear soon.".format(arg_8)
            else:
                arg_6 += "{} image was added and should appear soon.".format(arg_8)
        messages.success(arg_0, arg_6)
        return HttpResponseRedirect('../')
    return render(arg_0, 'happenings/add_memories.html', {'form': arg_3, 'event': arg_2})


(graph: BELGraph, annotation: str = 'Subgraph')

def Func ( arg_0 : arg_1 , arg_2 : arg_3 = 'Subgraph' ) -> Mapping [ arg_3 , Mapping [ arg_3 , float ] ] : arg_4 = get_subgraphs_by_annotation ( arg_0 , arg_2 ) arg_5 = _transform_graph_dict_to_node_dict ( arg_4 ) arg_6 = generate_bioprocess_mechanisms ( arg_0 ) arg_7 = _transform_graph_dict_to_node_dict ( arg_6 ) arg_8 : Dict [ arg_3 , Dict [ arg_3 , float ] ] = defaultdict ( dict ) arg_9 = itt . product ( arg_5 . items ( ) , arg_7 . items ( ) ) for ( arg_10 , arg_11 ) , ( arg_12 , arg_13 ) in arg_9 : arg_14 = tanimoto_set_similarity ( arg_7 , arg_5 ) arg_8 [ arg_10 ] [ arg_12 ] = arg_14 return dict ( arg_8 )

def Func(arg_0: arg_1, arg_2: arg_3 = 'Subgraph') -> Mapping[arg_3, Mapping[arg_3, float]]:
    """Compare generated mechanisms to actual ones.

    1. Generates candidate mechanisms for each biological process
    2. Gets sub-graphs for all NeuroMMSig signatures
    3. Make tanimoto similarity comparison for all sets

    :return: A dictionary table comparing the canonical subgraphs to generated ones
    """
    arg_4 = get_subgraphs_by_annotation(arg_0, arg_2)
    arg_5 = _transform_graph_dict_to_node_dict(arg_4)

    arg_6 = generate_bioprocess_mechanisms(arg_0)
    arg_7 = _transform_graph_dict_to_node_dict(arg_6)

    arg_8: Dict[arg_3, Dict[arg_3, float]] = defaultdict(dict)

    arg_9 = itt.product(arg_5.items(), arg_7.items())
    for (arg_10, arg_11), (arg_12, arg_13) in arg_9:
        arg_14 = tanimoto_set_similarity(arg_7, arg_5)
        arg_8[arg_10][arg_12] = arg_14

    return dict(arg_8)

Compare generated mechanisms to actual ones .


def Func(arg_0, arg_1, arg_2):
        """
        Execute a BigQuery query multiple times with different parameters.

        :param operation: The query to execute.
        :type operation: str
        :param seq_of_parameters: List of dictionary parameters to substitute into the
            query.
        :type seq_of_parameters: list
        """
        for arg_3 in arg_2:
            arg_0.execute(arg_1, arg_3)

Execute a BigQuery query multiple times with different parameters .


def Func(arg_0, arg_1, arg_2=False):
        r'''Method to set the T, P, and composition dependent property methods
        desired for consideration by the user. Can be used to exclude certain
        methods which might have unacceptable accuracy.

        As a side effect, the previously selected method is removed when
        this method is called to ensure user methods are tried in the desired
        order.

        Parameters
        ----------
        user_methods : str or list
            Methods by name to be considered for calculation of the mixture
            property, ordered by preference.
        forced : bool, optional
            If True, only the user specified methods will ever be considered;
            if False, other methods will be considered if no user methods
            suceed.
        '''
        # Accept either a string or a list of methods, and whether
        # or not to only consider the false methods
        if isinstance(arg_1, str):
            arg_1 = [arg_1]

        # The user's order matters and is retained for use by select_valid_methods
        arg_0.user_methods = arg_1
        arg_0.forced = arg_2

        # Validate that the user's specified methods are actual methods
        if set(arg_0.user_methods).difference(arg_0.all_methods):
            raise Exception("One of the given methods is not available for this mixture")
        if not arg_0.user_methods and arg_0.forced:
            raise Exception('Only user specified methods are considered when forced is True, but no methods were provided')

        # Remove previously selected methods
        arg_0.method = None
        arg_0.sorted_valid_methods = []
        arg_0.TP_zs_ws_cached = (None, None, None, None)

r Method to set the T P and composition dependent property methods desired for consideration by the user . Can be used to exclude certain methods which might have unacceptable accuracy .


Run all abort tasks, then all exit tasks, then exit with error
        return status

def
Func
(
arg_0
,
arg_1
)
:
arg_0
.
log
.
info
(
'Signal handler received Func request'
)
arg_0
.
_Func
(
arg_1
)
arg_0
.
_exit
(
arg_1
)
os
.
_exit
(
1
)

def Func(arg_0, arg_1):
        """ Run all Func tasks, then all exit tasks, then exit with error
        return status"""
        arg_0.log.info('Signal handler received Func request')
        arg_0._Func(arg_1)
        arg_0._exit(arg_1)
        os._exit(1)

Run all abort tasks then all exit tasks then exit with error return status


def Func ( arg_0 , arg_1 ) : arg_2 = np . eye ( arg_0 ) - 1. / arg_0 arg_2 [ - 1 , : ] = 1. / arg_0 arg_3 = np . linalg . inv ( arg_2 ) arg_4 = arg_2 [ : - 1 , : ] arg_5 = arg_3 [ : , : - 1 ] arg_4 = tf . cast ( arg_4 , arg_1 = arg_1 , name = 'effects_to_residuals' ) arg_5 = tf . cast ( arg_5 , arg_1 = arg_1 , name = 'residuals_to_effects' ) return arg_4 , arg_5

def Func(arg_0, arg_1):
  """Build change-of-basis matrices for constrained seasonal effects.

  This method builds the matrix that transforms seasonal effects into
  effect residuals (differences from the mean effect), and additionally
  projects these residuals onto the subspace where the mean effect is zero.

  See `ConstrainedSeasonalStateSpaceModel` for mathematical details.

  Args:
    num_seasons: scalar `int` number of seasons.
    dtype: TensorFlow `dtype` for the returned values.
  Returns:
    effects_to_residuals: `Tensor` of shape
      `[num_seasons-1, num_seasons]`, such that `differences_from_mean_effect =
      matmul(effects_to_residuals, seasonal_effects)`.  In the
      notation of `ConstrainedSeasonalStateSpaceModel`, this is
      `effects_to_residuals = P * R`.
    residuals_to_effects: the (pseudo)-inverse of the above; a
      `Tensor` of shape `[num_seasons, num_seasons-1]`. In the
      notation of `ConstrainedSeasonalStateSpaceModel`, this is
      `residuals_to_effects = R^{-1} * P'`.
  """

  # Build the matrix that converts effects `e_i` into differences from the mean
  # effect `(e_i - sum(e_i)) / num_seasons`, with the mean effect in the last
  # row so that the transformation is invertible.
  arg_2 = np.eye(arg_0) - 1./arg_0
  arg_2[-1, :] = 1./arg_0  # compute mean effect
  arg_3 = np.linalg.inv(arg_2)

  # Drop the final dimension, effectively setting the mean effect to zero.
  arg_4 = arg_2[:-1, :]
  arg_5 = arg_3[:, :-1]

  # Return Tensor values of the specified dtype.
  arg_4 = tf.cast(
      arg_4, arg_1=arg_1, name='effects_to_residuals')
  arg_5 = tf.cast(
      arg_5, arg_1=arg_1, name='residuals_to_effects')

  return arg_4, arg_5

Build change - of - basis matrices for constrained seasonal effects .


def Func ( arg_0 , arg_1 , arg_2 = - 1 ) : arg_1 = unicode_normalize ( 'NFKD' , text_type ( arg_1 . upper ( ) ) ) arg_1 = '' . join ( c for c in arg_1 if c in arg_0 . _uc_set ) arg_1 = arg_1 . replace ( 'LL' , 'L' ) arg_1 = arg_1 . replace ( 'R' , 'R' ) arg_3 = arg_1 . translate ( arg_0 . _trans ) if arg_2 > 0 : arg_3 = ( arg_3 + ( '0' * arg_2 ) ) [ : arg_2 ] return arg_3

def Func(arg_0, arg_1, arg_2=-1):
        """Return the PhoneticSpanish coding of word.

        Parameters
        ----------
        word : str
            The word to transform
        max_length : int
            The length of the code returned (defaults to unlimited)

        Returns
        -------
        str
            The PhoneticSpanish code

        Examples
        --------
        >>> pe = PhoneticSpanish()
        >>> pe.Func('Perez')
        '094'
        >>> pe.Func('Martinez')
        '69364'
        >>> pe.Func('Gutierrez')
        '83994'
        >>> pe.Func('Santiago')
        '4638'
        >>> pe.Func('Nicolás')
        '6454'

        """
        # uppercase, normalize, and decompose, filter to A-Z minus vowels & W
        arg_1 = unicode_normalize('NFKD', text_type(arg_1.upper()))
        arg_1 = ''.join(c for c in arg_1 if c in arg_0._uc_set)

        # merge repeated Ls & Rs
        arg_1 = arg_1.replace('LL', 'L')
        arg_1 = arg_1.replace('R', 'R')

        # apply the Soundex algorithm
        arg_3 = arg_1.translate(arg_0._trans)

        if arg_2 > 0:
            arg_3 = (arg_3 + ('0' * arg_2))[:arg_2]

        return arg_3

Return the PhoneticSpanish coding of word.

        Parameters
        ----------
        word : str
            The word to transform
        max_length : int
            The length of the code returned (defaults to unlimited)

        Returns
        -------
        str
            The PhoneticSpanish code

        Examples
        --------
        >>> pe = PhoneticSpanish()
        >>> pe.encode('Perez')
        '094'
        >>> pe.encode('Martinez')
        '69364'
        >>> pe.encode('Gutierrez')
        '83994'
        >>> pe.encode('Santiago')
        '4638'
        >>> pe.encode('Nicolás')
        '6454'

Return the PhoneticSpanish coding of word .


def Func ( ) : return { 'activate' : activate , 'config' : hconfig , 'deactivate' : deactivate , 'help' : cli_help , 'kill' : kill , 'restart' : restart , 'submit' : submit , 'update' : update , 'version' : version }

def Func():
  '''
  Create a map of command names and handlers
  '''
  return {
      'activate': activate,
      'config': hconfig,
      'deactivate': deactivate,
      'help': cli_help,
      'kill': kill,
      'restart': restart,
      'submit': submit,
      'update': update,
      'version': version
  }


Increase the processed task counter and show progress message

def Func(arg_0):
    '''Increase the Func task counter and show progress message'''
    arg_0.Func_tasks += 1
    arg_1 = arg_0.tasks.qsize()
    if arg_1 > 0:
      progress('[%d task(s) completed, %d remaining, %d thread(s)]', arg_0.Func_tasks, arg_1, len(arg_0.workers))
    else:
      progress('[%d task(s) completed, %d thread(s)]', arg_0.Func_tasks, len(arg_0.workers))


def Func(arg_0: arg_1) -> lmap.Map:
    """Return a map from the input stream."""
    arg_2 = arg_0.reader
    arg_3 = arg_2.advance()
    assert arg_3 == "{"
    arg_4: MutableMapping[Any, Any] = {}
    while True:
        if arg_2.peek() == "}":
            arg_2.next_token()
            break
        arg_5 = _read_next(arg_0)
        if arg_5 is COMMENT:
            continue
        while True:
            if arg_2.peek() == "}":
                raise SyntaxError("Unexpected token '}'; expected map value")
            arg_6 = _read_next(arg_0)
            if arg_6 is COMMENT:
                continue
            if arg_5 in arg_4:
                raise SyntaxError(f"Duplicate key '{k}' in map literal")
            break
        arg_4[arg_5] = arg_6

    return lmap.map(arg_4)


def Func ( arg_0 , arg_1 ) : arg_2 = [ 'last-update' , 'create-time' , 'start-time' , 'end-time' ] arg_3 = [ 'task-attempt' ] for arg_4 in arg_2 : if arg_4 in arg_1 : arg_1 [ arg_4 ] = arg_0 . default_format_date ( arg_1 [ arg_4 ] ) for arg_4 in arg_3 : if arg_4 in arg_1 and arg_1 [ arg_4 ] is not None : arg_1 [ arg_4 ] = int ( arg_1 [ arg_4 ] ) return arg_1

def Func(arg_0, arg_1):
    """Convert types of task fields."""
    arg_2 = ['last-update', 'create-time', 'start-time', 'end-time']
    arg_3 = ['task-attempt']

    for arg_4 in arg_2:
      if arg_4 in arg_1:
        arg_1[arg_4] = arg_0.default_format_date(arg_1[arg_4])

    for arg_4 in arg_3:
      if arg_4 in arg_1 and arg_1[arg_4] is not None:
        arg_1[arg_4] = int(arg_1[arg_4])

    return arg_1


(self, client_id, client_secret, code, redirect_uri)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """Exchange an Authorization Code for an Access Token.

        Exchange an Authorization Code for an Access Token that can be used to
        invoke the APIs.

        Args:
            client_id(basestring): Provided when you created your integration.
            client_secret(basestring): Provided when you created your
                integration.
            code(basestring): The Authorization Code provided by the user
                OAuth process.
            redirect_uri(basestring): The redirect URI used in the user OAuth
                process.

        Returns:
            AccessToken: An AccessToken object with the access token provided
            by the Webex Teams cloud.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.

        """
        check_type(arg_1, basestring, may_be_none=False)
        check_type(arg_2, basestring, may_be_none=False)
        check_type(arg_3, basestring, may_be_none=False)
        check_type(arg_4, basestring, may_be_none=False)

        arg_5 = dict_from_items_with_values(
            grant_type="authorization_code",
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
        )

        # API request
        arg_6 = requests.post(arg_0._endpoint_url, data=arg_5,
                                 **arg_0._request_kwargs)
        check_response_code(arg_6, EXPECTED_RESPONSE_CODE['POST'])
        arg_7 = extract_and_parse_json(arg_6)

        # Return a access_token object created from the response JSON data
        return arg_0._object_factory(OBJECT_TYPE, arg_7)

Exchange an Authorization Code for an Access Token .


return [action[2:] for action in actions]

def Func ( arg_0 ) : arg_1 = _a11y . AXUIElement . Func ( arg_0 ) return [ arg_2 [ 2 : ] for arg_2 in arg_1 ]

def Func(arg_0):
        """Retrieve a list of actions supported by the object."""
        arg_1 = _a11y.AXUIElement.Func(arg_0)
        # strip leading AX from actions - help distinguish them from attributes
        return [arg_2[2:] for arg_2 in arg_1]

Retrieve a list of actions supported by the object .


def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_0 . poly . flip ( ) else : arg_0 . poly . flip ( arg_1 [ 0 ] )

def Func(arg_0, arg_1=None):
        """Flip the shape in the x direction, in-place.

        Parameters
        ----------
        center : array-like, optional
            Point about which to flip.
            If not passed, the center of the shape will be used.

         """
        if arg_1 is None:
            arg_0.poly.flip()
        else:
            arg_0.poly.flip(arg_1[0])

Flip the shape in the x direction in - place .


def Func(arg_0, arg_1: "HdlStatement"):
        """
        Assign parent statement and propagate dependency flags if necessary
        """
        arg_2 = arg_0.parentStm is None
        arg_0.parentStm = arg_1
        if not arg_0._now_is_event_dependent\
                and arg_1._now_is_event_dependent:
            arg_0._on_parent_event_dependent()

        arg_3 = arg_1
        while arg_3.parentStm is not None:
            arg_3 = arg_3.parentStm

        arg_4 = arg_3._outputs.append
        arg_5 = arg_3._inputs.append

        if arg_2:
            for arg_6 in arg_0._inputs:
                arg_6.endpoints.discard(arg_0)
                arg_6.endpoints.append(arg_3)
                arg_5(arg_6)

            for arg_7 in arg_0._outputs:
                arg_7.drivers.discard(arg_0)
                arg_7.drivers.append(arg_3)
                arg_4(arg_7)

            arg_8 = arg_0._get_rtl_context()
            arg_8.statements.discard(arg_0)

        arg_1.rank += arg_0.rank


(self, item, data, instance, commit=True)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = True ) : if arg_4 : arg_3 . save ( ) return arg_3

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=True):
        """
        Saves a model instance to the database.
        """
        if arg_4:
            arg_3.save()
        return arg_3

Saves a model instance to the database .


def Func(arg_0):
        """
        Stops running proxy.

        You should stop the proxy after you stop using it.
        """
        if not arg_0.sql_proxy_process:
            raise AirflowException("The sql proxy is not started yet")
        else:
            arg_0.log.info("Stopping the cloud_sql_proxy pid: %s",
                          arg_0.sql_proxy_process.pid)
            arg_0.sql_proxy_process.kill()
            arg_0.sql_proxy_process = None
        # Cleanup!
        arg_0.log.info("Removing the socket directory: %s",
                      arg_0.cloud_sql_proxy_socket_directory)
        shutil.rmtree(arg_0.cloud_sql_proxy_socket_directory, ignore_errors=True)
        if arg_0.sql_proxy_was_downloaded:
            arg_0.log.info("Removing downloaded proxy: %s", arg_0.sql_proxy_path)
            # Silently ignore if the file has already been removed (concurrency)
            try:
                os.remove(arg_0.sql_proxy_path)
            except OSError as e:
                if not e.errno == errno.ENOENT:
                    raise
        else:
            arg_0.log.info("Skipped removing proxy - it was not downloaded: %s",
                          arg_0.sql_proxy_path)
        if os.path.isfile(arg_0.credentials_path):
            arg_0.log.info("Removing generated credentials file %s",
                          arg_0.credentials_path)
            # Here file cannot be delete by concurrent task (each task has its own copy)
            os.remove(arg_0.credentials_path)


def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , list ) : return [ arg_0 . Func ( arg_2 ) for arg_2 in arg_1 ] arg_3 = arg_0 . checker . is_url_valid ( url = arg_1 , return_base = True ) if arg_3 : return arg_3 if "/" in arg_1 : return arg_1 . split ( "/" ) [ 0 ] return arg_1

def Func(arg_0, arg_1):
        """
        Extract the base of the given element.

        .. example:
            given "hello/world?world=beautiful" return "hello"

        :param element: The element we are working with.
        :type element: str|list
        """

        if isinstance(arg_1, list):
            # The given element is a list.

            # We get the base of each element of the list.
            return [arg_0.Func(arg_2) for arg_2 in arg_1]

        # We get the base if it is an URL.
        arg_3 = arg_0.checker.is_url_valid(url=arg_1, return_base=True)

        if arg_3:
            # It is an URL.

            # We return the extracted base.
            return arg_3

        if "/" in arg_1:
            # / is in the given element.

            # We return the first element before the
            # first /
            return arg_1.split("/")[0]

        # / is not in the given element.

        # We return the given element.
        return arg_1


def Func ( arg_0 ) : for arg_1 , arg_2 in arg_0 : if isinstance ( arg_2 , ( list , tuple ) ) : for arg_1 , arg_3 in arg_2 : yield arg_1 else : yield arg_1

def Func(arg_0):
    """
    Return list of choices's keys
    """
    for arg_1, arg_2 in arg_0:
        if isinstance(arg_2, (list, tuple)):
            for arg_1, arg_3 in arg_2:
                yield arg_1
        else:
            yield arg_1


return self.append(UBase(theta, phi, lam), [q], [])

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : return arg_0 . append ( UBase ( arg_1 , arg_2 , arg_3 ) , [ arg_4 ] , [ ] )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """Apply U to q."""
    return arg_0.append(UBase(arg_1, arg_2, arg_3), [arg_4], [])


return SuperOp(data, input_dims, output_dims)

def Func(arg_0, arg_1, arg_2, arg_3=False):
        """Return the composition channel."""
        # Compute tensor contraction indices from qargs
        arg_4 = list(arg_0.input_dims())
        arg_5 = list(arg_0.output_dims())
        if arg_3:
            arg_6 = len(arg_0.input_dims())
            arg_7 = 2 * len(arg_0.output_dims())
            arg_8 = True
            for arg_9, arg_10 in enumerate(arg_2):
                arg_4[arg_10] = arg_1._input_dims[arg_9]
        else:
            arg_6 = len(arg_0.output_dims())
            arg_7 = 0
            arg_8 = False
            for arg_9, arg_10 in enumerate(arg_2):
                arg_5[arg_10] = arg_1._output_dims[arg_9]
        # Reshape current matrix
        # Note that we must reverse the subsystem dimension order as
        # qubit 0 corresponds to the right-most position in the tensor
        # product, which is the last tensor wire index.
        arg_11 = np.reshape(arg_0.data, arg_0._shape)
        arg_12 = np.reshape(arg_1.data, arg_1._shape)
        # Add first set of indicies
        arg_13 = [2 * arg_6 - 1 - arg_10 for arg_10 in arg_2
                   ] + [arg_6 - 1 - arg_10 for arg_10 in arg_2]
        arg_14 = [np.product(arg_5)**2, np.product(arg_4)**2]
        arg_15 = np.reshape(
            arg_0._einsum_matmul(arg_11, arg_12, arg_13, arg_7, arg_8),
            arg_14)
        return SuperOp(arg_15, arg_4, arg_5)


def Func ( * arg_0 ) : with open ( join ( abspath ( dirname ( __file__ ) ) , * arg_0 ) ) as thefile : return thefile . Func ( )

def Func(*arg_0):
    """Read the contents of a file located relative to setup.py"""
    with open(join(abspath(dirname(__file__)), *arg_0)) as thefile:
        return thefile.Func()

Read the contents of a file located relative to setup . py


def Func(arg_0, arg_1):
        """
        Specify a callback function that will be called when a server offers
        Next Protocol Negotiation options.

        :param callback: The callback function.  It will be invoked with two
            arguments: the Connection, and a list of offered protocols as
            bytestrings, e.g. ``[b'http/1.1', b'spdy/2']``.  It should return
            one of those bytestrings, the chosen protocol.

        .. versionadded:: 0.15
        """
        _warn_npn()
        arg_0._npn_select_helper = _NpnSelectHelper(arg_1)
        arg_0._npn_select_callback = arg_0._npn_select_helper.callback
        _lib.SSL_CTX_set_next_proto_select_cb(
            arg_0._context, arg_0._npn_select_callback, _ffi.NULL)

Specify a callback function that will be called when a server offers Next Protocol Negotiation options .


(self, inputVector, trueCatIndex, partition=0)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 0 ) : if arg_0 . _samples is None : arg_0 . _samples = numpy . zeros ( ( 0 , len ( arg_1 ) ) , dtype = RealNumpyDType ) assert arg_0 . _labels is None arg_0 . _labels = [ ] arg_0 . _samples = numpy . concatenate ( ( arg_0 . _samples , numpy . atleast_2d ( arg_1 ) ) , axis = 0 ) arg_0 . _labels += [ arg_2 ] if arg_0 . _partitions is None : arg_0 . _partitions = [ ] if arg_3 is None : arg_3 = 0 arg_0 . _partitions += [ arg_3 ]

def Func(arg_0, arg_1, arg_2, arg_3=0):
    """
    Store a training sample and associated category label
    """

    # If this is the first sample, then allocate a numpy array
    # of the appropriate size in which to store all samples.
    if arg_0._samples is None:
      arg_0._samples = numpy.zeros((0, len(arg_1)), dtype=RealNumpyDType)
      assert arg_0._labels is None
      arg_0._labels = []

    # Add the sample vector and category lable
    arg_0._samples = numpy.concatenate((arg_0._samples, numpy.atleast_2d(arg_1)), axis=0)
    arg_0._labels += [arg_2]

    # Add the partition ID
    if arg_0._partitions is None:
      arg_0._partitions = []
    if arg_3 is None:
      arg_3 = 0
    arg_0._partitions += [arg_3]


def Func(arg_0, arg_1):
        """
        Extract required fields from an array
        """
        arg_2 = {}
        for arg_3 in arg_1:
            arg_4 = arg_0.extract_fields(arg_3)
            arg_2[arg_3['name']] = arg_4
        return arg_2


(self, jwt: 'Jwt', compare_dates: bool = False)

def Func ( arg_0 , arg_1 : 'Jwt' , arg_2 : arg_3 = False ) -> arg_3 : if arg_0 . secret != arg_1 . secret : return False if arg_0 . payload != arg_1 . payload : return False if arg_0 . alg != arg_1 . alg : return False if arg_0 . header != arg_1 . header : return False arg_4 = arg_0 . registered_claims arg_5 = arg_1 . registered_claims if not arg_2 : arg_6 = [ 'exp' , 'nbf' , 'iat' ] arg_4 = { k : { v if k not in arg_6 else None } for k , v in arg_4 . items ( ) } arg_5 = { k : { v if k not in arg_6 else None } for k , v in arg_5 . items ( ) } if arg_4 != arg_5 : return False return True

def Func(arg_0, arg_1: 'Jwt', arg_2: arg_3 = False) -> arg_3:
        """
        Compare against another `Jwt`.

        :param jwt: The token to Func against.
        :type jwt: Jwt
        :param Func_dates: Should the comparision take dates into account?
        :type Func_dates: bool
        :return: Are the two Jwt's the same?
        :rtype: bool
        """
        if arg_0.secret != arg_1.secret:
            return False
        if arg_0.payload != arg_1.payload:
            return False
        if arg_0.alg != arg_1.alg:
            return False
        if arg_0.header != arg_1.header:
            return False
        arg_4 = arg_0.registered_claims
        arg_5 = arg_1.registered_claims
        if not arg_2:
            arg_6 = ['exp', 'nbf', 'iat']
            arg_4 = {k: {v if k not in arg_6 else None} for k, v in
                               arg_4.items()}
            arg_5 = {k: {v if k not in arg_6 else None} for k, v in
                             arg_5.items()}
        if arg_4 != arg_5:
            return False
        return True

Compare against another `Jwt`.

        :param jwt: The token to compare against.
        :type jwt: Jwt
        :param compare_dates: Should the comparision take dates into account?
        :type compare_dates: bool
        :return: Are the two Jwt's the same?
        :rtype: bool


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = set ( ) def calc ( arg_0 , arg_1 ) : if arg_0 in arg_3 : return arg_3 . add ( arg_0 ) for arg_4 in collect_imports ( arg_0 , arg_1 , arg_2 ) : if arg_4 . is_native : arg_3 . add ( arg_4 . name ) continue arg_5 = arg_4 . name . split ( '.' ) calc ( arg_4 . name , arg_4 . script ) if len ( arg_5 ) == 1 : continue arg_6 , arg_7 = os . path . split ( arg_4 . script ) if arg_7 == '__init__.py' : arg_6 = os . path . dirname ( arg_6 ) for arg_8 in xrange ( len ( arg_5 ) - 1 , 0 , - 1 ) : arg_0 = '.' . join ( arg_5 [ : arg_8 ] ) arg_1 = os . path . join ( arg_6 , '__init__.py' ) calc ( arg_0 , arg_1 ) arg_6 = os . path . dirname ( arg_6 ) calc ( arg_0 , arg_1 ) arg_3 . remove ( arg_0 ) return arg_3

def Func(arg_0, arg_1, arg_2):
  """Determines all modules that script transitively depends upon."""
  arg_3 = set()
  def calc(arg_0, arg_1):
    if arg_0 in arg_3:
      return
    arg_3.add(arg_0)
    for arg_4 in collect_imports(arg_0, arg_1, arg_2):
      if arg_4.is_native:
        arg_3.add(arg_4.name)
        continue
      arg_5 = arg_4.name.split('.')
      calc(arg_4.name, arg_4.script)
      if len(arg_5) == 1:
        continue
      # For submodules, the parent packages are also deps.
      arg_6, arg_7 = os.path.split(arg_4.script)
      if arg_7 == '__init__.py':
        arg_6 = os.path.dirname(arg_6)
      for arg_8 in xrange(len(arg_5) - 1, 0, -1):
        arg_0 = '.'.join(arg_5[:arg_8])
        arg_1 = os.path.join(arg_6, '__init__.py')
        calc(arg_0, arg_1)
        arg_6 = os.path.dirname(arg_6)
  calc(arg_0, arg_1)
  arg_3.remove(arg_0)
  return arg_3

Determines all modules that script transitively depends upon .