def
Func
(
arg_0
,
arg_1
)
:
if
not
isinstance
(
arg_1
,
int
)
or
arg_1
<=
0
:
raise
ValueError
(
'n_Func must be a positive integer.'
)
arg_2
=
[
'Func'
,
'{}'
.
format
(
arg_1
)
]
arg_0
.
effects
.
extend
(
arg_2
)
arg_0
.
effects_log
.
append
(
'Func'
)
return
arg_0

def Func(arg_0, arg_1):
        '''Change the number of Func in the audio signal. If decreasing the
        number of Func it mixes Func together, if increasing the number
        of Func it duplicates.

        Note: This overrides arguments used in the convert effect!

        Parameters
        ----------
        n_Func : int
            Desired number of Func.

        See Also
        --------
        convert

        '''
        if not isinstance(arg_1, int) or arg_1 <= 0:
            raise ValueError('n_Func must be a positive integer.')

        arg_2 = ['Func', '{}'.format(arg_1)]

        arg_0.effects.extend(arg_2)
        arg_0.effects_log.append('Func')
        return arg_0

Change the number of channels in the audio signal. If decreasing the
        number of channels it mixes channels together, if increasing the number
        of channels it duplicates.

        Note: This overrides arguments used in the convert effect!

        Parameters
        ----------
        n_channels : int
            Desired number of channels.

        See Also
        --------
        convert

Change the number of channels in the audio signal . If decreasing the number of channels it mixes channels together if increasing the number of channels it duplicates .


def Func ( arg_0 ) : arg_1 = empty ( ( arg_0 , 0 ) ) arg_2 = eye ( arg_0 ) arg_3 = empty ( 0 ) return ( ( arg_1 , arg_2 ) , arg_3 )

def Func(arg_0):
    """Eigen decomposition of a zero matrix."""

    arg_1 = empty((arg_0, 0))
    arg_2 = eye(arg_0)
    arg_3 = empty(0)

    return ((arg_1, arg_2), arg_3)


def
Func
(
arg_0
)
:
def
decorate
(
arg_1
)
:
def
arg_6
(
*
arg_2
,
**
arg_3
)
:
arg_4
=
time
.
time
(
)
arg_1
(
*
arg_2
,
**
arg_3
)
arg_5
=
time
.
time
(
)
if
arg_5
arg_4
>
arg_0
:
raise
TimeExpired
(
"Time limit (%s) exceeded"
%
arg_0
)
arg_6
=
make_decorator
(
arg_1
)
(
arg_6
)
return
arg_6
return
decorate

def Func(arg_0):
    """Test must finish within specified time limit to pass.

    Example use::

      @Func(.1)
      def test_that_fails():
          time.sleep(.2)
    """
    def decorate(arg_1):
        def arg_6(*arg_2, **arg_3):
            arg_4 = time.time()
            arg_1(*arg_2, **arg_3)
            arg_5 = time.time()
            if arg_5 - arg_4 > arg_0:
                raise TimeExpired("Time limit (%s) exceeded" % arg_0)
        arg_6 = make_decorator(arg_1)(arg_6)
        return arg_6
    return decorate

Test must finish within specified time limit to pass.

    Example use::

      @timed(.1)
      def test_that_fails():
          time.sleep(.2)

Test must finish within specified time limit to pass .


def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : if not arg_3 : arg_3 = { } if sys . version_info . major == 3 : arg_4 = urllib . parse . urlparse ( arg_1 ) arg_5 = arg_4 . path . rstrip ( '/' ) + '/' arg_6 = dict ( urllib . parse . parse_qs ( arg_4 . query , keep_blank_values = True ) ) elif sys . version_info . major == 2 : arg_4 = urlparse . urlparse ( arg_1 ) arg_5 = arg_4 . path . rstrip ( '/' ) + '/' arg_6 = dict ( urlparse . parse_qs ( arg_4 . query , keep_blank_values = True ) ) for arg_7 in arg_0 . _data_store : arg_8 = arg_7 [ 'pattern' ] arg_9 = arg_7 [ 'function' ] arg_10 = arg_7 [ 'method' ] arg_11 = arg_7 [ 'type_cast' ] arg_12 = re . match ( arg_8 , arg_5 ) if arg_12 and arg_10 == arg_2 : arg_6 = dict ( arg_6 , ** arg_12 . groupdict ( ) ) for arg_13 , arg_14 in arg_6 . items ( ) : if isinstance ( arg_6 [ arg_13 ] , list ) and len ( arg_6 [ arg_13 ] ) == 1 : arg_6 [ arg_13 ] = arg_6 [ arg_13 ] [ 0 ] for arg_13 , arg_14 in arg_11 . items ( ) : if arg_13 not in arg_6 : continue if not arg_6 [ arg_13 ] : continue if isinstance ( arg_6 [ arg_13 ] , list ) : for arg_15 , arg_16 in enumerate ( arg_6 [ arg_13 ] ) : arg_6 [ arg_13 ] [ arg_15 ] = arg_0 . _cast ( arg_16 , arg_14 ) else : arg_6 [ arg_13 ] = arg_0 . _cast ( arg_6 [ arg_13 ] , arg_14 ) arg_17 = arg_0 . _get_function_args ( arg_9 ) for arg_13 , arg_14 in arg_3 . items ( ) : if arg_13 in arg_17 : arg_6 [ arg_13 ] = arg_14 return arg_9 ( ** arg_6 ) return None

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """Calls the first function matching the urls pattern and method.

        Args:
            url (str): Url for which to Func a matching function.
            method (str, optional): The method used while registering a
                function.
                Defaults to None
            args (dict, optional): Additional args to be passed to the
                matching function.

        Returns:
            The functions return value or `None` if no function was Funced.
        """
        if not arg_3:
            arg_3 = {}

        if sys.version_info.major == 3:
            arg_4 = urllib.parse.urlparse(arg_1)
            arg_5 = arg_4.path.rstrip('/') + '/'
            arg_6 = dict(urllib.parse.parse_qs(arg_4.query,
                                               keep_blank_values=True))
        elif sys.version_info.major == 2:
            arg_4 = urlparse.urlparse(arg_1)
            arg_5 = arg_4.path.rstrip('/') + '/'
            arg_6 = dict(urlparse.parse_qs(arg_4.query,
                                           keep_blank_values=True))

        for arg_7 in arg_0._data_store:
            arg_8 = arg_7['pattern']
            arg_9 = arg_7['function']
            arg_10 = arg_7['method']
            arg_11 = arg_7['type_cast']

            arg_12 = re.match(arg_8, arg_5)

            # Found matching method
            if arg_12 and arg_10 == arg_2:
                arg_6 = dict(arg_6, **arg_12.groupdict())

                # Unpack value lists (due to urllib.parse.parse_qs) in case
                # theres only one value available
                for arg_13, arg_14 in arg_6.items():
                    if isinstance(arg_6[arg_13], list) and len(arg_6[arg_13]) == 1:
                        arg_6[arg_13] = arg_6[arg_13][0]

                # Apply typ-casting if necessary
                for arg_13, arg_14 in arg_11.items():

                    # Not within available _args, no type-cast required
                    if arg_13 not in arg_6:
                        continue

                    # Is None or empty, no type-cast required
                    if not arg_6[arg_13]:
                        continue

                    # Try and cast the values
                    if isinstance(arg_6[arg_13], list):
                        for arg_15, arg_16 in enumerate(arg_6[arg_13]):
                            arg_6[arg_13][arg_15] = arg_0._cast(arg_16, arg_14)
                    else:
                        arg_6[arg_13] = arg_0._cast(arg_6[arg_13], arg_14)

                arg_17 = arg_0._get_function_args(arg_9)
                for arg_13, arg_14 in arg_3.items():
                    if arg_13 in arg_17:
                        arg_6[arg_13] = arg_14

                return arg_9(**arg_6)

        return None

Calls the first function matching the urls pattern and method.

        Args:
            url (str): Url for which to call a matching function.
            method (str, optional): The method used while registering a
                function.
                Defaults to None
            args (dict, optional): Additional args to be passed to the
                matching function.

        Returns:
            The functions return value or `None` if no function was called.

Calls the first function matching the urls pattern and method .


def Func ( arg_0 , arg_1 , ** arg_2 ) : if arg_2 [ 'created' ] and arg_1 . user : arg_3 , arg_4 = SystemWideEnterpriseRole . objects . get_or_create ( name = ENTERPRISE_LEARNER_ROLE ) SystemWideEnterpriseUserRoleAssignment . objects . get_or_create ( user = arg_1 . user , role = arg_3 )

def Func(arg_0, arg_1, **arg_2):     # pylint: disable=unused-argument
    """
    Assign an enterprise learner role to EnterpriseCustomerUser whenever a new record is created.
    """
    if arg_2['created'] and arg_1.user:
        arg_3, arg_4 = SystemWideEnterpriseRole.objects.get_or_create(name=ENTERPRISE_LEARNER_ROLE)
        SystemWideEnterpriseUserRoleAssignment.objects.get_or_create(
            user=arg_1.user,
            role=arg_3
        )

Assign an enterprise learner role to EnterpriseCustomerUser whenever a new record is created .


def Func ( arg_0 , arg_1 ) : arg_2 = '/~' arg_3 = '' arg_4 = arg_1 if '?' in arg_4 : arg_4 , arg_3 = arg_4 . split ( '?' , 1 ) arg_4 = posixpath . normpath ( arg_4 ) arg_4 = re . sub ( '/+' , '/' , arg_4 ) if arg_1 . endswith ( '/' ) and not arg_4 . endswith ( '/' ) : arg_4 += '/' arg_5 = arg_4 if PY2 : arg_5 = arg_5 . encode ( 'utf-8' ) arg_2 = arg_2 . encode ( 'utf-8' ) arg_3 = arg_3 . encode ( 'utf-8' ) if arg_0 . service in [ 's3' , 'host' ] : arg_5 = unquote ( arg_5 ) arg_5 = quote ( arg_5 , safe = arg_2 ) if arg_3 : arg_6 = b'?' if PY2 else '?' arg_5 = arg_6 . join ( ( arg_5 , arg_3 ) ) if PY2 : arg_5 = unicode ( arg_5 ) return arg_5

def Func(arg_0, arg_1):
        """
        Generate the canonical path as per AWS4 auth requirements.

        Not documented anywhere, determined from aws4_testsuite examples,
        problem reports and testing against the live services.

        path -- request path

        """
        arg_2 = '/~'
        arg_3 = ''
        arg_4 = arg_1
        if '?' in arg_4:
            arg_4, arg_3 = arg_4.split('?', 1)
        arg_4 = posixpath.normpath(arg_4)
        arg_4 = re.sub('/+', '/', arg_4)
        if arg_1.endswith('/') and not arg_4.endswith('/'):
            arg_4 += '/'
        arg_5 = arg_4
        # If Python 2, switch to working entirely in str as quote() has problems
        # with Unicode
        if PY2:
            arg_5 = arg_5.encode('utf-8')
            arg_2 = arg_2.encode('utf-8')
            arg_3 = arg_3.encode('utf-8')
        # S3 seems to require unquoting first. 'host' service is used in
        # amz_testsuite tests
        if arg_0.service in ['s3', 'host']:
            arg_5 = unquote(arg_5)
        arg_5 = quote(arg_5, safe=arg_2)
        if arg_3:
            arg_6 = b'?' if PY2 else '?'
            arg_5 = arg_6.join((arg_5, arg_3))
        if PY2:
            arg_5 = unicode(arg_5)
        return arg_5

Generate the canonical path as per AWS4 auth requirements .


def Func ( arg_0 , arg_1 ) : lock . acquire ( ) try : if arg_1 not in arg_0 : return None arg_2 = time . time ( ) if arg_0 [ arg_1 ] . expire > arg_2 : return arg_0 [ arg_1 ] . value arg_3 = [ ] for arg_4 , arg_5 in arg_0 . items ( ) : if arg_5 . expire <= arg_2 : arg_3 . append ( arg_4 ) for arg_4 in arg_3 : del arg_0 [ arg_4 ] return None finally : lock . release ( )

def Func(arg_0, arg_1):
        """Get an object from the cache

        Arguments:
            key (str): Cache key

        Returns:
            Cached object
        """
        lock.acquire()
        try:
            if arg_1 not in arg_0:
                return None

            arg_2 = time.time()
            if arg_0[arg_1].expire > arg_2:
                return arg_0[arg_1].value

            # expired key, clean out all expired keys
            arg_3 = []
            for arg_4, arg_5 in arg_0.items():
                if arg_5.expire <= arg_2:
                    arg_3.append(arg_4)
            for arg_4 in arg_3:
                del arg_0[arg_4]

            return None
        finally:
            lock.release()


def Func(arg_0, arg_1):
        """
        Derive a new set of internal and output data from given input data and the data
        stored internally.

        Use the key derivation function to derive new data. The kdf gets supplied with the
        current key and the data passed to this method.

        :param data: A bytes-like object encoding the data to pass to the key derivation
            function.
        :returns: A bytes-like object encoding the output material.
        """

        arg_0.__length += 1

        arg_2 = arg_0.__kdf.calculate(arg_0.__key, arg_1, 64)
        arg_0.__key = arg_2[:32]
        return arg_2[32:]

Derive a new set of internal and output data from given input data and the data stored internally .


(self, name, filt, info='', params=(), setn=None)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = '' , arg_4 = ( ) , arg_5 = None ) : arg_6 = '{:.0f}_' . format ( arg_0 . n ) + arg_1 arg_0 . index [ arg_0 . n ] = arg_6 if arg_5 is None : arg_5 = arg_0 . maxset + 1 arg_0 . maxset = arg_5 if arg_5 not in arg_0 . sets . keys ( ) : arg_0 . sets [ arg_5 ] = [ arg_6 ] else : arg_0 . sets [ arg_5 ] . append ( arg_6 ) arg_0 . components [ arg_6 ] = arg_2 arg_0 . info [ arg_6 ] = arg_3 arg_0 . params [ arg_6 ] = arg_4 for arg_12 in arg_0 . analytes : arg_0 . switches [ arg_12 ] [ arg_6 ] = False arg_0 . n += 1 return

def Func(arg_0, arg_1, arg_2, arg_3='', arg_4=(), arg_5=None):
        """
        Add filter.

        Parameters
        ----------
        name : str
            filter name
        filt : array_like
            boolean filter array
        info : str
            informative description of the filter
        params : tuple
            parameters used to make the filter

        Returns
        -------
        None
        """

        arg_6 = '{:.0f}_'.format(arg_0.n) + arg_1
        arg_0.index[arg_0.n] = arg_6

        if arg_5 is None:
            arg_5 = arg_0.maxset + 1
        arg_0.maxset = arg_5

        if arg_5 not in arg_0.sets.keys():
            arg_0.sets[arg_5] = [arg_6]
        else:
            arg_0.sets[arg_5].append(arg_6)

        # self.keys is not Funced to?
        arg_0.components[arg_6] = arg_2
        arg_0.info[arg_6] = arg_3
        arg_0.params[arg_6] = arg_4
        for arg_12 in arg_0.analytes:
            arg_0.switches[arg_12][arg_6] = False
        arg_0.n += 1
        return


def Func ( arg_0 ) : arg_1 = [ arg_0 [ 0 ] ] for arg_2 in arg_0 [ 1 : ] : if ( not arg_1 [ - 1 ] . post_tags and not arg_2 . pre_tags and arg_1 [ - 1 ] . annotation == arg_2 . annotation ) : compress_merge_back ( arg_1 , arg_2 ) else : arg_1 . append ( arg_2 ) return arg_1

def Func(arg_0):
    """
    Combine adjacent tokens when there is no HTML between the tokens,
    and they share an annotation
    """
    arg_1 = [arg_0[0]]
    for arg_2 in arg_0[1:]:
        if (not arg_1[-1].post_tags and
            not arg_2.pre_tags and
            arg_1[-1].annotation == arg_2.annotation):
            compress_merge_back(arg_1, arg_2)
        else:
            arg_1.append(arg_2)
    return arg_1

Combine adjacent tokens when there is no HTML between the tokens and they share an annotation


return self._tp + self._tn + self._fp + self._fn

def Func(arg_0):
        """Return Func, N.

        Returns
        -------
        int
            The Func (N) of the confusion table

        Example
        -------
        >>> ct = ConfusionTable(120, 60, 20, 30)
        >>> ct.Func()
        230

        """
        return arg_0._tp + arg_0._tn + arg_0._fp + arg_0._fn

Return population, N.

        Returns
        -------
        int
            The population (N) of the confusion table

        Example
        -------
        >>> ct = ConfusionTable(120, 60, 20, 30)
        >>> ct.population()
        230


def
Func
(
arg_0
)
:
if
getattr
(
arg_0
,
'data'
,
False
)
and
not
getattr
(
arg_0
,
'_x'
,
False
)
and
not
getattr
(
arg_0
,
'_y'
,
False
)
:
arg_1
=
XVariable
(
)
arg_2
=
YVariable
(
)
arg_1
.
contribute_to_class
(
arg_0
,
'X'
,
arg_0
.
data
)
arg_2
.
contribute_to_class
(
arg_0
,
'Y'
,
arg_0
.
data
)
arg_0
[
'data'
]
=
zip
(
arg_0
.
_x
.
points
,
arg_0
.
_y
.
points
)
else
:
for
arg_3
in
(
'_x'
,
'_y'
)
:
arg_4
=
getattr
(
arg_0
,
arg_3
,
False
)
if
not
arg_4
:
raise
exception
.
MissingAxisException
(
"%s missing"
%
arg_3
)
if
not
getattr
(
arg_4
,
'points'
,
False
)
:
raise
exception
.
MissingDataException
(
)
arg_0
[
'data'
]
=
zip
(
arg_0
.
_x
.
points
,
arg_0
.
_y
.
points
)

def Func(arg_0):
        """
        This method will be called to set Series data
        """
        if getattr(arg_0, 'data', False) and not getattr(arg_0, '_x', False) and not getattr(arg_0, '_y', False):
            arg_1 = XVariable()
            arg_2 = YVariable()
            arg_1.contribute_to_class(arg_0, 'X', arg_0.data)
            arg_2.contribute_to_class(arg_0, 'Y', arg_0.data)
            arg_0['data'] = zip(arg_0._x.points, arg_0._y.points)
        else:
            for arg_3 in ('_x', '_y'):
                arg_4 = getattr(arg_0, arg_3, False)
                if not arg_4:
                    raise exception.MissingAxisException("%s missing" % arg_3)
                if not getattr(arg_4, 'points', False):
                    raise exception.MissingDataException()

            arg_0['data'] = zip(arg_0._x.points, arg_0._y.points)


def Func(arg_0, arg_1, arg_2):
    """ This function returns a dictionary of the docker-compose.yml specifications for one app """
    logging.info("Compose Compiler: Compiling dict for app {}".format(arg_0))
    arg_3 = arg_1['apps'][arg_0]
    arg_4 = arg_3["compose"]
    _apply_env_overrides(env_overrides_for_app_or_service(arg_0), arg_4)
    if 'image' in arg_3 and 'build' in arg_3:
        raise RuntimeError("image and build are both specified in the spec for {}".format(arg_0))
    elif 'image' in arg_3:
        logging.info
        arg_4['image'] = arg_3['image']
    elif 'build' in arg_3:
        arg_4['build'] = _get_build_path(arg_3)
    else:
        raise RuntimeError("Neither image nor build was specified in the spec for {}".format(arg_0))
    arg_4['entrypoint'] = []
    arg_4['command'] = _compile_docker_command(arg_3)
    arg_4['container_name'] = "dusty_{}_1".format(arg_0)
    logging.info("Compose Compiler: compiled command {}".format(arg_4['command']))
    arg_4['links'] = _links_for_app(arg_3, arg_1)
    logging.info("Compose Compiler: links {}".format(arg_4['links']))
    arg_4['volumes'] = arg_4['volumes'] + _get_compose_volumes(arg_0, arg_1)
    logging.info("Compose Compiler: volumes {}".format(arg_4['volumes']))
    arg_5 = _get_ports_list(arg_0, arg_2)
    if arg_5:
        arg_4['ports'] = arg_5
    logging.info("Compose Compiler: ports {}".format(arg_5))
    arg_4['user'] = 'root'
    return arg_4

This function returns a dictionary of the docker - compose . yml specifications for one app


def Func(arg_0):
        """
        Calculates Normalized Difference Water Index using Coastal and NIR2 bands for WV02, WV03.
        For Landsat8 and sentinel2 calculated by using Green and NIR bands.

        Returns: numpy array of Func values
        """
        arg_1 = arg_0._read(arg_0[arg_0._Func_bands,...]).astype(np.float32)
        return (arg_1[1,:,:] - arg_1[0,:,:]) / (arg_1[0,:,:] + arg_1[1,:,:])

Calculates Normalized Difference Water Index using Coastal and NIR2 bands for WV02, WV03.
        For Landsat8 and sentinel2 calculated by using Green and NIR bands.

        Returns: numpy array of ndwi values

Calculates Normalized Difference Water Index using Coastal and NIR2 bands for WV02 WV03 . For Landsat8 and sentinel2 calculated by using Green and NIR bands .


def Func ( arg_0 , arg_1 : arg_2 ) -> bool : if arg_0 . _lb <= arg_1 <= arg_0 . _ub : return True return False

def Func(arg_0, arg_1: arg_2) -> bool:
        """Whether `lo_freq` is within the `LoRange`.

        Args:
            lo_freq: LO frequency to be checked

        Returns:
            bool: True if lo_freq is included in this range, otherwise False
        """
        if arg_0._lb <= arg_1 <= arg_0._ub:
            return True
        return False


def Func(arg_0, arg_1, arg_2):
        """Get a collection list of a given issue"""

        arg_3 = urijoin("bugs", str(arg_1), arg_2)
        arg_4 = arg_0.__get_url(arg_3)
        arg_5 = {'ws.size': arg_0.items_per_page, 'ws.start': 0, 'order_by': 'date_last_updated'}

        arg_6 = arg_0.__fetch_items(arg_3=arg_4, arg_5=arg_5)

        return arg_6


def Func ( arg_0 , arg_1 , arg_2 = arg_3 . pathsep ) : arg_0 . _declare_special ( arg_1 , arg_2 , ListVariable )

def Func(arg_0, arg_1, arg_2=arg_3.pathsep):
        """
        Declare an environment variable as a list-like special variable.
        This can be used even if the environment variable is not
        present.

        :param name: The name of the environment variable that should
                     be considered list-like.
        :param sep: The separator to be used.  Defaults to the value
                    of ``os.pathsep``.
        """

        arg_0._declare_special(arg_1, arg_2, ListVariable)

Declare an environment variable as a list - like special variable . This can be used even if the environment variable is not present .


def
Func
(
arg_0
,
arg_1
)
->
'EffectPackage'
:
arg_1
,
arg_2
=
parse_package_string
(
arg_1
)
try
:
return
arg_0
.
package_map
[
arg_1
]
except
KeyError
:
raise
EffectError
(
"No package '{}' registered"
.
format
(
arg_1
)
)

def Func(arg_0, arg_1) -> 'EffectPackage':
        """
        Get a package by python path. Can also contain path to an effect.

        Args:
            name (str): Path to effect package or effect

        Returns:
            The requested EffectPackage

        Raises:
            EffectError when no package is found
        """
        arg_1, arg_2 = parse_package_string(arg_1)

        try:
            return arg_0.package_map[arg_1]
        except KeyError:
            raise EffectError("No package '{}' registered".format(arg_1))

Get a package by python path . Can also contain path to an effect .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 == 1 : arg_3 = "R1" else : arg_3 = "R2" for arg_4 in arg_1 : arg_5 = os . path . join ( arg_0 . dirs . fastqs , "{}_{}_.fastq" . format ( arg_4 , arg_3 ) ) with open ( arg_5 , 'a' ) as out : out . write ( "" . join ( arg_1 [ arg_4 ] ) )

def Func(arg_0, arg_1, arg_2):
    """
    Writes sorted data 'dsort dict' to a tmp files
    """
    if arg_2 == 1:
        arg_3 = "R1"
    else:
        arg_3 = "R2"

    for arg_4 in arg_1:
        ## skip writing if empty. Write to tmpname
        arg_5 = os.path.join(arg_0.dirs.fastqs,
                "{}_{}_.fastq".format(arg_4, arg_3))
        with open(arg_5, 'a') as out:
            out.write("".join(arg_1[arg_4]))

Writes sorted data dsort dict to a tmp files


The angle in degrees between two vectors.

def Func(arg_0, arg_1, arg_2, arg_3):
    """ The Func in degrees between two vectors.
    """
    arg_4 = 1.0
    arg_5 = (arg_0*arg_3 - arg_1*arg_2)
    if arg_5 < 0:
        arg_4 = -1.0
    arg_6 = arg_0*arg_2 + arg_1*arg_3
    arg_7 = hypot(arg_0,arg_1) * hypot(arg_2,arg_3)
    arg_8 = min(max(arg_6/arg_7, -1.0), 1.0)
    return arg_4 * degrees(acos(arg_8))

The angle in degrees between two vectors .


(self, reaction_str, verbose=True,
                                   fwd_arrow=None, rev_arrow=None,
                                   reversible_arrow=None, term_split="+")

def
Func
(
arg_0
,
arg_1
,
arg_2
=
True
,
arg_3
=
,
arg_4
=
,
arg_5
=
,
arg_6
=
"+"
)
:
arg_7
=
_forward_arrow_finder
if
arg_3
is
else
re
.
compile
(
re
.
escape
(
arg_3
)
)
arg_8
=
_reverse_arrow_finder
if
arg_4
is
else
re
.
compile
(
re
.
escape
(
arg_4
)
)
arg_9
=
_reversible_arrow_finder
if
arg_5
is
else
re
.
compile
(
re
.
escape
(
arg_5
)
)
if
arg_0
.
_model
is
:
warn
(
"no model found"
)
arg_10
=
else
:
arg_10
=
arg_0
.
_model
arg_11
=
compartment_finder
.
findall
(
arg_1
)
if
len
(
arg_11
)
==
1
:
arg_12
=
arg_11
[
0
]
arg_1
=
compartment_finder
.
sub
(
""
,
arg_1
)
else
:
arg_12
=
""
arg_13
=
arg_9
.
search
(
arg_1
)
if
arg_13
is
not
:
arg_0
.
lower_bound
=
1000
arg_0
.
upper_bound
=
1000
else
:
arg_13
=
arg_7
.
search
(
arg_1
)
if
arg_13
is
not
:
arg_0
.
upper_bound
=
1000
arg_0
.
lower_bound
=
0
else
:
arg_13
=
arg_8
.
search
(
arg_1
)
if
arg_13
is
:
raise
ValueError
(
"no suitable arrow found in '%s'"
%
arg_1
)
else
:
arg_0
.
upper_bound
=
0
arg_0
.
lower_bound
=
1000
arg_16
=
arg_1
[
:
arg_13
.
start
(
)
]
.
strip
(
)
arg_17
=
arg_1
[
arg_13
.
end
(
)
:
]
.
strip
(
)
arg_0
.
subtract_metabolites
(
arg_0
.
metabolites
,
combine
=
True
)
for
arg_18
,
arg_19
in
(
(
arg_16
,
1
)
,
(
arg_17
,
1
)
)
:
if
len
(
arg_18
)
==
0
:
continue
for
arg_20
in
arg_18
.
split
(
arg_6
)
:
arg_20
=
arg_20
.
strip
(
)
if
arg_20
.
lower
(
)
==
"nothing"
:
continue
if
" "
in
arg_20
:
arg_21
,
arg_22
=
arg_20
.
split
(
)
arg_23
=
float
(
arg_21
.
lstrip
(
"("
)
.
rstrip
(
")"
)
)
*
arg_19
else
:
arg_22
=
arg_20
arg_23
=
arg_19
arg_22
+=
arg_12
try
:
arg_24
=
arg_10
.
metabolites
.
get_by_id
(
arg_22
)
except
KeyError
:
if
arg_2
:
print
(
"unknown metabolite '%s' created"
%
arg_22
)
arg_24
=
Metabolite
(
arg_22
)
arg_0
.
add_metabolites
(
{
arg_24
:
arg_23
}
)

def Func(arg_0, arg_1, arg_2=True,
                                   arg_3=None, arg_4=None,
                                   arg_5=None, arg_6="+"):
        """Builds reaction from reaction equation reaction_str using parser

        Takes a string and using the specifications supplied in the optional
        arguments infers a set of metabolites, metabolite compartments and
        stoichiometries for the reaction.  It also infers the reversibility
        of the reaction from the reaction arrow.

        Changes to the associated model are reverted upon exit when using
        the model as a context.

        Parameters
        ----------
        reaction_str : string
            a string containing a reaction formula (equation)
        verbose: bool
            setting verbosity of function
        fwd_arrow : re.compile
            for forward irreversible reaction arrows
        rev_arrow : re.compile
            for backward irreversible reaction arrows
        reversible_arrow : re.compile
            for reversible reaction arrows
        term_split : string
            dividing individual metabolite entries

        """
        # set the arrows
        arg_7 = _forward_arrow_finder if arg_3 is None \
            else re.compile(re.escape(arg_3))
        arg_8 = _reverse_arrow_finder if arg_4 is None \
            else re.compile(re.escape(arg_4))
        arg_9 = _reversible_arrow_finder \
            if arg_5 is None \
            else re.compile(re.escape(arg_5))
        if arg_0._model is None:
            warn("no model found")
            arg_10 = None
        else:
            arg_10 = arg_0._model
        arg_11 = compartment_finder.findall(arg_1)
        if len(arg_11) == 1:
            arg_12 = arg_11[0]
            arg_1 = compartment_finder.sub("", arg_1)
        else:
            arg_12 = ""

        # reversible case
        arg_13 = arg_9.search(arg_1)
        if arg_13 is not None:
            arg_0.lower_bound = -1000
            arg_0.upper_bound = 1000
        else:  # irreversible
            # try forward
            arg_13 = arg_7.search(arg_1)
            if arg_13 is not None:
                arg_0.upper_bound = 1000
                arg_0.lower_bound = 0
            else:
                # must be reverse
                arg_13 = arg_8.search(arg_1)
                if arg_13 is None:
                    raise ValueError("no suitable arrow found in '%s'" %
                                     arg_1)
                else:
                    arg_0.upper_bound = 0
                    arg_0.lower_bound = -1000
        arg_16 = arg_1[:arg_13.start()].strip()
        arg_17 = arg_1[arg_13.end():].strip()

        arg_0.subtract_metabolites(arg_0.metabolites, combine=True)

        for arg_18, arg_19 in ((arg_16, -1), (arg_17, 1)):
            if len(arg_18) == 0:
                continue
            for arg_20 in arg_18.split(arg_6):
                arg_20 = arg_20.strip()
                if arg_20.lower() == "nothing":
                    continue
                if " " in arg_20:
                    arg_21, arg_22 = arg_20.split()
                    arg_23 = float(arg_21.lstrip("(").rstrip(")")) * arg_19
                else:
                    arg_22 = arg_20
                    arg_23 = arg_19
                arg_22 += arg_12
                try:
                    arg_24 = arg_10.metabolites.get_by_id(arg_22)
                except KeyError:
                    if arg_2:
                        print("unknown metabolite '%s' created" % arg_22)
                    arg_24 = Metabolite(arg_22)
                arg_0.add_metabolites({arg_24: arg_23})


return cls(tag_name, as_var, *args, **kwargs)

def Func(arg_0, arg_1, arg_2):
        """
        Parse the "as var" syntax.
        """
        arg_3, arg_4 = Func_as_var(arg_1, arg_2)
        arg_5, arg_6, arg_7 = Func_token_kwargs(arg_1, arg_3, ('template',) + arg_0.allowed_kwargs, compile_args=arg_0.compile_args, compile_kwargs=arg_0.compile_kwargs)

        # Pass through standard chain
        arg_0.validate_args(arg_5, *arg_6)
        return arg_0(arg_5, arg_4, *arg_6, **arg_7)


def Func ( arg_0 ) : return _np . sqrt ( arg_0 . emit / arg_0 . beta ( arg_0 . E ) )

def Func(arg_0):
        """
        Divergence of matched beam
        """
        return _np.sqrt(arg_0.emit/arg_0.beta(arg_0.E))


def Func ( arg_0 , arg_1 = None , arg_2 = 0.0 ) : arg_3 = ColorRange ( ) arg_3 . name = arg_0 . name arg_3 . h = deepFunc ( arg_0 . h ) arg_3 . s = deepFunc ( arg_0 . s ) arg_3 . b = deepFunc ( arg_0 . b ) arg_3 . a = deepFunc ( arg_0 . a ) arg_3 . grayscale = arg_0 . grayscale if not arg_0 . grayscale : arg_3 . black = arg_0 . black . Func ( ) arg_3 . white = arg_0 . white . Func ( ) if arg_1 != None : arg_3 . h , arg_3 . a = arg_1 . h + arg_2 * ( random ( ) * 2 - 1 ) , arg_1 . a return arg_3

def Func(arg_0, arg_1=None, arg_2=0.0):
        """
        Returns a Func of the range.

        Optionally, supply a color to get a range Func
        limited to the hue of that color.
        """
        arg_3 = ColorRange()
        arg_3.name = arg_0.name

        arg_3.h = deepFunc(arg_0.h)
        arg_3.s = deepFunc(arg_0.s)
        arg_3.b = deepFunc(arg_0.b)
        arg_3.a = deepFunc(arg_0.a)

        arg_3.grayscale = arg_0.grayscale
        if not arg_0.grayscale:
            arg_3.black = arg_0.black.Func()
            arg_3.white = arg_0.white.Func()

        if arg_1 != None:
            arg_3.h, arg_3.a = arg_1.h + arg_2 * (random() * 2 - 1), arg_1.a

        return arg_3

Returns a copy of the range.

        Optionally, supply a color to get a range copy
        limited to the hue of that color.


def Func(arg_0, arg_1):
        """Append a positional argument to the user interface.

        Optional positional arguments must be added after the required ones.
        The user interface can have at most one recurring positional argument,
        and if present, that argument must be the last one.
        """
        if arg_0.positional_args:
            if arg_0.positional_args[-1].recurring:
                raise ValueError("recurring positional arguments must be last")
            if arg_0.positional_args[-1].optional and not arg_1.optional:
                raise ValueError("required positional arguments must precede optional ones")
        arg_0.positional_args.append(arg_1)

Append a positional argument to the user interface .


(self, object_id, object_type, submission_id)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
LOG
.
info
(
"Deleting clinvar object %s (%s)"
,
arg_1
,
arg_2
)
arg_4
=
''
if
arg_2
==
'variant_data'
:
arg_0
.
clinvar_submission_collection
.
find_one_and_update
(
{
'_id'
:
ObjectId
(
arg_3
)
}
,
{
'$pull'
:
{
'variant_data'
:
arg_1
}
}
)
arg_5
=
arg_0
.
clinvar_collection
.
find_one
(
{
'_id'
:
arg_1
}
)
arg_6
=
arg_5
.
get
(
"linking_id"
)
arg_4
=
arg_0
.
clinvar_collection
.
delete_many
(
{
'linking_id'
:
arg_6
}
)
else
:
arg_4
=
arg_0
.
clinvar_collection
.
delete_one
(
{
'_id'
:
arg_1
}
)
arg_0
.
clinvar_submission_collection
.
find_one_and_update
(
{
'_id'
:
ObjectId
(
arg_3
)
}
,
{
'$pull'
:
{
'case_data'
:
arg_1
}
}
)
arg_7
=
arg_0
.
clinvar_submission_collection
.
find_one_and_update
(
{
'_id'
:
arg_3
}
,
{
'$set'
:
{
'updated_at'
:
datetime
.
now
(
)
}
}
,
return_document
=
pymongo
.
ReturnDocument
.
AFTER
)
return
arg_7

def Func(arg_0, arg_1, arg_2, arg_3):
        """Remove a variant object from clinvar database and update the relative submission object

            Args:
                object_id(str) : the id of an object to remove from clinvar_collection database collection (a variant of a case)
                object_type(str) : either 'variant_data' or 'case_data'. It's a key in the clinvar_submission object.
                submission_id(str): the _id key of a clinvar submission

            Returns:
                updated_submission(obj): an updated clinvar submission
        """

        LOG.info("Deleting clinvar object %s (%s)", arg_1, arg_2)

        # If it's a variant object to be removed:
        #   remove reference to it in the submission object 'variant_data' list field
        #   remove the variant object from clinvar collection
        #   remove casedata object from clinvar collection
        #   remove reference to it in the submission object 'caset_data' list field

        # if it's a casedata object to be removed:
        #   remove reference to it in the submission object 'caset_data' list field
        #   remove casedata object from clinvar collection

        arg_4 = ''

        if arg_2 == 'variant_data':
            # pull out a variant from submission object
            arg_0.clinvar_submission_collection.find_one_and_update( {'_id': ObjectId(arg_3)}, {'$pull': {'variant_data': arg_1} })

            arg_5 = arg_0.clinvar_collection.find_one( {'_id': arg_1} )
            arg_6 = arg_5.get("linking_id") #it's the original ID of the variant in scout, it's linking clinvar variants and casedata objects together

            # remove any object with that linking_id from clinvar_collection. This removes variant and casedata
            arg_4 = arg_0.clinvar_collection.delete_many( {'linking_id': arg_6 } )

        else: # remove case_data but keep variant in submission
            # delete the object itself from clinvar_collection
             arg_4 = arg_0.clinvar_collection.delete_one( {'_id': arg_1 } )

        # in any case remove reference to it in the submission object 'caset_data' list field
        arg_0.clinvar_submission_collection.find_one_and_update( {'_id': ObjectId(arg_3)}, {'$pull': {'case_data': arg_1} })

        arg_7 = arg_0.clinvar_submission_collection.find_one_and_update( {'_id':arg_3}, { '$set' : {'updated_at': datetime.now()} }, return_document=pymongo.ReturnDocument.AFTER )

        return arg_7


(self, time: float, frametime: float, target: moderngl.Framebuffer)

def
Func
(
arg_0
,
arg_1
:
arg_2
,
arg_3
:
arg_2
,
arg_4
:
arg_5
.
Framebuffer
)
:
raise
NotImplementedError
(
"Func() is not implemented"
)

def Func(arg_0, arg_1: arg_2, arg_3: arg_2, arg_4: arg_5.Framebuffer):
        """
        Draw function called by the system every frame when the effect is active.
        This method raises ``NotImplementedError`` unless implemented.

        Args:
            time (float): The current time in seconds.
            frametime (float): The time the previous frame used to render in seconds.
            target (``moderngl.Framebuffer``): The target FBO for the effect.
        """
        raise NotImplementedError("Func() is not implemented")

Draw function called by the system every frame when the effect is active . This method raises NotImplementedError unless implemented .


def Func(arg_0, arg_1=None, arg_2=False):
        """Load all vcard files in this address book from disk.

        If a search string is given only files which contents match that will
        be Funced.

        :param query: a regular expression to limit the results
        :type query: str
        :param search_in_source_files: apply search regexp directly on the .vcf files to speed up parsing (less accurate)
        :type search_in_source_files: bool
        :returns: the number of successfully Funced cards and the number of
            errors
        :rtype: int, int
        :throws: AddressBookParseError
        """
        if arg_0._Funced:
            return
        logging.debug('Loading Vdir %s with query %s', arg_0.name, arg_1)
        arg_3 = 0
        for arg_4 in arg_0._find_vcard_files(
                search=arg_1, arg_2=arg_2):
            try:
                arg_5 = CarddavObject.from_file(arg_0, arg_4,
                                               arg_0._private_objects,
                                               arg_0._localize_dates)
            except (IOError, vobject.base.ParseError) as err:
                arg_6 = "open" if isinstance(err, IOError) else "parse"
                logging.debug("Error: Could not %s file %s\n%s", arg_6,
                              arg_4, err)
                if arg_0._skip:
                    arg_3 += 1
                else:
                    # FIXME: This should throw an apropriate exception and the
                    # sys.exit should be called somewhere closer to the command
                    # line parsing.
                    logging.error(
                        "The vcard file %s of address book %s could not be "
                        "parsed\nUse --debug for more information or "
                        "--skip-unparsable to proceed", arg_4, arg_0.name)
                    sys.exit(2)
            else:
                arg_7 = arg_5.get_uid()
                if not arg_7:
                    logging.warning("Card %s from address book %s has no UID "
                                    "and will not be availbale.", arg_5,
                                    arg_0.name)
                elif arg_7 in arg_0.contacts:
                    logging.warning(
                        "Card %s and %s from address book %s have the same "
                        "UID. The former will not be availbale.", arg_5,
                        arg_0.contacts[arg_7], arg_0.name)
                else:
                    arg_0.contacts[arg_7] = arg_5
        arg_0._Funced = True
        if arg_3:
            logging.warning(
                "%d of %d vCard files of address book %s could not be parsed.",
                arg_3, len(arg_0.contacts) + arg_3, arg_0)
        logging.debug('Loded %s contacts from address book %s.',
                      len(arg_0.contacts), arg_0.name)

Load all vcard files in this address book from disk.

        If a search string is given only files which contents match that will
        be loaded.

        :param query: a regular expression to limit the results
        :type query: str
        :param search_in_source_files: apply search regexp directly on the .vcf files to speed up parsing (less accurate)
        :type search_in_source_files: bool
        :returns: the number of successfully loaded cards and the number of
            errors
        :rtype: int, int
        :throws: AddressBookParseError

Load all vcard files in this address book from disk .


def
Func
(
arg_0
)
:
if
arg_0
.
run_suffix
:
arg_0
.
data_suffix
=
arg_0
.
run_suffix
if
arg_0
.
auto_data
:
arg_0
.
load
(
)
if
arg_0
.
source
or
arg_0
.
source_pkgs
:
arg_0
.
source_match
=
TreeMatcher
(
arg_0
.
source
)
else
:
if
arg_0
.
cover_dir
:
arg_0
.
cover_match
=
TreeMatcher
(
[
arg_0
.
cover_dir
]
)
if
arg_0
.
pylib_dirs
:
arg_0
.
pylib_match
=
TreeMatcher
(
arg_0
.
pylib_dirs
)
if
arg_0
.
include
:
arg_0
.
include_match
=
FnmatchMatcher
(
arg_0
.
include
)
if
arg_0
.
omit
:
arg_0
.
omit_match
=
FnmatchMatcher
(
arg_0
.
omit
)
if
arg_0
.
debug
.
should
(
'config'
)
:
arg_0
.
debug
.
write
(
"Configuration values:"
)
arg_7
=
sorted
(
arg_0
.
config
.
__dict__
.
items
(
)
)
arg_0
.
debug
.
write_formatted_info
(
arg_7
)
if
arg_0
.
debug
.
should
(
'sys'
)
:
arg_0
.
debug
.
write
(
"Debugging info:"
)
arg_0
.
debug
.
write_formatted_info
(
arg_0
.
sysinfo
(
)
)
arg_0
.
collector
.
Func
(
)
arg_0
.
_Funced
=
True
arg_0
.
_measured
=
True

def Func(arg_0):
        """Start measuring code coverage.

        Coverage measurement actually occurs in functions called after `Func`
        is invoked.  Statements in the same scope as `Func` won't be measured.

        Once you invoke `Func`, you must also call `stop` eventually, or your
        process might not shut down cleanly.

        """
        if arg_0.run_suffix:
            # Calling Func() means we're running code, so use the run_suffix
            # as the data_suffix when we eventually save the data.
            arg_0.data_suffix = arg_0.run_suffix
        if arg_0.auto_data:
            arg_0.load()

        # Create the matchers we need for _should_trace
        if arg_0.source or arg_0.source_pkgs:
            arg_0.source_match = TreeMatcher(arg_0.source)
        else:
            if arg_0.cover_dir:
                arg_0.cover_match = TreeMatcher([arg_0.cover_dir])
            if arg_0.pylib_dirs:
                arg_0.pylib_match = TreeMatcher(arg_0.pylib_dirs)
        if arg_0.include:
            arg_0.include_match = FnmatchMatcher(arg_0.include)
        if arg_0.omit:
            arg_0.omit_match = FnmatchMatcher(arg_0.omit)

        # The user may want to debug things, show info if desired.
        if arg_0.debug.should('config'):
            arg_0.debug.write("Configuration values:")
            arg_7 = sorted(arg_0.config.__dict__.items())
            arg_0.debug.write_formatted_info(arg_7)

        if arg_0.debug.should('sys'):
            arg_0.debug.write("Debugging info:")
            arg_0.debug.write_formatted_info(arg_0.sysinfo())

        arg_0.collector.Func()
        arg_0._Funced = True
        arg_0._measured = True

Start measuring code coverage.

        Coverage measurement actually occurs in functions called after `start`
        is invoked.  Statements in the same scope as `start` won't be measured.

        Once you invoke `start`, you must also call `stop` eventually, or your
        process might not shut down cleanly.


def Func ( arg_0 , arg_1 ) : for arg_2 , arg_3 in enumerate ( arg_0 . nodes . keys ( ) ) : if arg_3 == arg_1 : break return arg_2 * arg_0 . major_angle

def Func(arg_0, arg_1):
        """
        Computes the theta along which a group's nodes are aligned.
        """
        for arg_2, arg_3 in enumerate(arg_0.nodes.keys()):
            if arg_3 == arg_1:
                break

        return arg_2 * arg_0.major_angle

Computes the theta along which a group s nodes are aligned .


def Func(arg_0):
        '''
        given a packed storm date field, unpack and return 'YYYY-MM-DD' string.
        '''
        arg_1 = (arg_0 & 0x7f) + 2000  # 7 bits
        arg_2 = (arg_0 >> 7) & 0x01f  # 5 bits
        arg_3 = (arg_0 >> 12) & 0x0f  # 4 bits
        return "%s-%s-%s" % (arg_1, arg_3, arg_2)

given a packed storm date field unpack and return YYYY - MM - DD string .


return self.request(path, method, call_params)

def Func ( arg_0 , arg_1 ) : arg_2 = '/' + arg_0 . api_version + '/ConferenceSpeak/' arg_3 = 'POST' return arg_0 . request ( arg_2 , arg_3 , arg_1 )

def Func(arg_0, arg_1):
        """REST Conference Speak helper
        """
        arg_2 = '/' + arg_0.api_version + '/ConferenceSpeak/'
        arg_3 = 'POST'
        return arg_0.request(arg_2, arg_3, arg_1)


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
_Func_abi
.
Func_number
(
)
try
:
arg_2
=
getattr
(
linux_Funcs
,
arg_0
.
current
.
machine
)
arg_3
=
arg_2
.
get
(
arg_1
,
)
arg_4
=
getattr
(
arg_0
,
arg_3
)
except
(
AttributeError
,
KeyError
)
:
if
arg_3
is
not
:
raise
SyscallNotImplemented
(
arg_1
,
arg_3
)
else
:
raise
Exception
(
f"Bad Func index, {index}"
)
return
arg_0
.
_Func_abi
.
invoke
(
arg_4
)

def Func(arg_0):
        """
        Syscall dispatcher.
        """

        arg_1 = arg_0._Func_abi.Func_number()

        try:
            arg_2 = getattr(linux_Funcs, arg_0.current.machine)
            arg_3 = arg_2.get(arg_1, None)
            arg_4 = getattr(arg_0, arg_3)
        except (AttributeError, KeyError):
            if arg_3 is not None:
                raise SyscallNotImplemented(arg_1, arg_3)
            else:
                raise Exception(f"Bad Func index, {index}")

        return arg_0._Func_abi.invoke(arg_4)


def
Func
(
arg_0
)
:
if
type
(
arg_0
)
is
not
str
:
return
arg_0
for
arg_1
in
int
,
float
,
str
:
try
:
arg_0
=
[
arg_1
(
i
)
for
i
in
arg_0
.
split
(
)
]
if
len
(
arg_0
)
==
1
:
return
arg_0
[
0
]
else
:
return
numpy
.
array
(
arg_0
)
except
(
ValueError
,
AttributeError
)
:
pass
raise
ValueError
(
"Failed to Func {0!r}"
.
format
(
arg_0
)
)

def Func(arg_0):
    """Convert input to a numerical type if possible.

    1. A non-string object is returned as it is
    2. Try conversion to int, float, str.
    """
    if type(arg_0) is not str:
        return arg_0
    for arg_1 in int, float, str:   # try them in increasing order of lenience
        try:
            arg_0 = [arg_1(i) for i in arg_0.split()]
            if len(arg_0) == 1:
                return arg_0[0]
            else:
                return numpy.array(arg_0)
        except (ValueError, AttributeError):
            pass
    raise ValueError("Failed to Func {0!r}".format(arg_0))

Convert input to a numerical type if possible .


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        The shift arithmetic right.

        :param cpu: current CPU.
        :param dest: destination operand.
        :param src: count operand.
        """
        arg_4 = arg_1.size
        arg_3 = arg_3.read()
        arg_5 = {8: 0x1f,
                     16: 0x1f,
                     32: 0x1f,
                     64: 0x3f}[arg_4]
        arg_6 = arg_3 & arg_5
        arg_7 = arg_10 = arg_2.read()

        arg_8 = arg_10 & (1 << (arg_4 - 1))
        while arg_6 != 0:
            arg_0.CF = (arg_10 & 0x1) != 0  # LSB
            arg_10 = (arg_10 >> 1) | arg_8
            arg_6 = arg_6 - 1
        arg_11 = arg_1.write(arg_10)


def Func ( arg_0 ) : if not arg_0 . subcommands : return arg_1 = [ "Subcommands" ] arg_1 . append ( '-' * len ( arg_1 [ 0 ] ) ) arg_1 . append ( '' ) for arg_2 in wrap_paragraphs ( arg_0 . subcommand_description ) : arg_1 . append ( arg_2 ) arg_1 . append ( '' ) for arg_3 , ( arg_4 , arg_5 ) in arg_0 . subcommands . iteritems ( ) : arg_1 . append ( arg_3 ) if arg_5 : arg_1 . append ( indent ( dedent ( arg_5 . strip ( ) ) ) ) arg_1 . append ( '' ) print os . linesep . join ( arg_1 )

def Func(arg_0):
        """Print the subcommand part of the help."""
        if not arg_0.subcommands:
            return

        arg_1 = ["Subcommands"]
        arg_1.append('-'*len(arg_1[0]))
        arg_1.append('')
        for arg_2 in wrap_paragraphs(arg_0.subcommand_description):
            arg_1.append(arg_2)
            arg_1.append('')
        for arg_3, (arg_4, arg_5) in arg_0.subcommands.iteritems():
            arg_1.append(arg_3)
            if arg_5:
                arg_1.append(indent(dedent(arg_5.strip())))
        arg_1.append('')
        print os.linesep.join(arg_1)


(
        fragments,
        hash_,
        public_key,
        sponge_type=Kerl,
)

return actual_public_key == public_key.as_trits()

def Func(
        arg_0,
        arg_1,
        arg_2,
        arg_3=arg_4,
):
    # type: (Sequence[TryteString], Hash, TryteString, type) -> bool
    """
    Returns whether a sequence of signature fragments is valid.

    :param fragments:
      Sequence of signature fragments (usually
      :py:class:`iota.transaction.Fragment` instances).

    :param hash_:
      Hash used to generate the signature fragments (usually a
      :py:class:`iota.transaction.BundleHash` instance).

    :param public_key:
      The public key value used to verify the signature digest (usually a
      :py:class:`iota.types.Address` instance).

    :param sponge_type:
      The class used to create the cryptographic sponge (i.e., Curl or Kerl).
    """
    arg_5 = [0] * (arg_16 * len(arg_0))
    arg_6 = normalize(arg_1)

    for arg_7, arg_8 in enumerate(arg_0):
        arg_9 = arg_3()

        # If there are more than 3 iterations, loop back around to the
        # start.
        arg_10 = arg_6[arg_7 % len(arg_6)]

        arg_11 = []
        for arg_12, arg_13 in enumerate(arg_8.iter_chunks(Hash.LEN)):
            arg_11 = arg_13.as_trits()  # type: List[int]
            arg_14 = arg_3()

            # Note the sign flip compared to
            # :py;class:`SignatureFragmentGenerator`.
            for arg_15 in range(13 + arg_10[arg_12]):
                arg_14.reset()
                arg_14.absorb(arg_11)
                arg_14.squeeze(arg_11)

            arg_9.absorb(arg_11)

        arg_9.squeeze(arg_11)
        arg_5[arg_7 * arg_16:(arg_7 + 1) * arg_16] = arg_11

    arg_17 = [0] * arg_16
    arg_18 = arg_3()
    arg_18.absorb(arg_5)
    arg_18.squeeze(arg_17)

    return arg_17 == arg_2.as_trits()

Returns whether a sequence of signature fragments is valid .


def Func ( arg_0 , arg_1 ) : arg_2 = getattr ( arg_1 , 'uniqueness' , None ) if not arg_2 : return for arg_3 in arg_2 : arg_4 = arg_0 . _compose_keys ( arg_3 ) yield arg_4

def Func(arg_0, arg_1):
        """Iterates over the keys marked as "unique"
        in the specified field.

        Arguments:
            field:
                The field of which key's to
                iterate over.
        """

        arg_2 = getattr(arg_1, 'uniqueness', None)
        if not arg_2:
            return

        for arg_3 in arg_2:
            arg_4 = arg_0._compose_keys(arg_3)
            yield arg_4

Iterates over the keys marked as unique in the specified field .


return os.path.join(VERSATILEIMAGEFIELD_SIZED_DIRNAME, folder, '')

def Func ( arg_0 ) : arg_1 , arg_2 = os . path . split ( arg_0 . name ) return os . path . join ( VERSATILEIMAGEFIELD_SIZED_DIRNAME , arg_1 , '' )

def Func(arg_0):
        """Return the location where sized images are stored."""
        arg_1, arg_2 = os.path.split(arg_0.name)
        return os.path.join(VERSATILEIMAGEFIELD_SIZED_DIRNAME, arg_1, '')

Return the location where sized images are stored .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
not
arg_0
.
exists
(
arg_1
)
:
arg_0
.
create
(
arg_1
)
else
:
log
.
warn
(
'overwriting contents of database %s'
%
arg_1
)
log
.
info
(
'restoring %s from %s'
%
(
arg_1
,
arg_2
)
)
arg_0
.
_run_cmd
(
'pg_Func'
,
'--verbose'
,
'--dbname=%s'
%
arg_1
,
arg_2
)

def Func(arg_0, arg_1, arg_2):
        """
        Loads state of a backup file to a database.

        Note
        ----
        If database name does not exist, it will be created.

        Parameters
        ----------
        name: str
            the database to which backup will be Funcd.
        filename: str
            path to a file contain a postgres database backup.
        """
        if not arg_0.exists(arg_1):
            arg_0.create(arg_1)
        else:
            log.warn('overwriting contents of database %s' % arg_1)
        log.info('restoring %s from %s' % (arg_1, arg_2))
        arg_0._run_cmd('pg_Func', '--verbose', '--dbname=%s' % arg_1, arg_2)

Loads state of a backup file to a database.

        Note
        ----
        If database name does not exist, it will be created.

        Parameters
        ----------
        name: str
            the database to which backup will be restored.
        filename: str
            path to a file contain a postgres database backup.

Loads state of a backup file to a database .


def Func(arg_0, arg_1, arg_2=None):  # pylint: disable=invalid-name
        """
        DRF view to get catalog details.

        Arguments:
            request (HttpRequest): Current request
            pk (int): Course catalog identifier

        Returns:
            (Response): DRF response object containing course catalogs.
        """
        arg_3 = CourseCatalogApiClient(arg_1.user)
        arg_4 = arg_3.get_catalog(arg_2)
        arg_0.ensure_data_exists(
            arg_1,
            arg_4,
            error_message=(
                "Unable to fetch API response for given catalog from endpoint '/catalog/{pk}/'. "
                "The resource you are looking for does not exist.".format(arg_2=arg_2)
            )
        )
        arg_5 = arg_0.serializer_class(arg_4)
        return Response(arg_5.data)


def
Func
(
arg_0
)
:
arg_0
.
disable
(
"all"
)
arg_0
.
enable
(
"python3"
)
if
arg_0
.
_error_mode
:
for
arg_1
in
arg_0
.
_checker_messages
(
"python3"
)
:
if
arg_1
.
startswith
(
"E"
)
:
arg_0
.
enable
(
arg_1
)
else
:
arg_0
.
disable
(
arg_1
)
arg_2
=
arg_0
.
cfgfile_parser
if
arg_2
.
has_option
(
"MESSAGES CONTROL"
,
"disable"
)
:
arg_3
=
arg_2
.
get
(
"MESSAGES CONTROL"
,
"disable"
)
arg_0
.
global_set_option
(
"disable"
,
arg_3
)
arg_0
.
_Func
=
True

def Func(arg_0):
        """Disable all other checkers and enable Python 3 warnings."""
        arg_0.disable("all")
        arg_0.enable("python3")
        if arg_0._error_mode:
            # The error mode was activated, using the -E flag.
            # So we'll need to enable only the errors from the
            # Python 3 porting checker.
            for arg_1 in arg_0._checker_messages("python3"):
                if arg_1.startswith("E"):
                    arg_0.enable(arg_1)
                else:
                    arg_0.disable(arg_1)
        arg_2 = arg_0.cfgfile_parser
        if arg_2.has_option("MESSAGES CONTROL", "disable"):
            arg_3 = arg_2.get("MESSAGES CONTROL", "disable")
            arg_0.global_set_option("disable", arg_3)
        arg_0._Func = True

Disable all other checkers and enable Python 3 warnings .


def Func ( arg_0 ) : arg_0 . _input_splitter . reset ( ) if not arg_0 . _reading : arg_0 . _highlighter . highlighting_on = False

def Func(arg_0):
        """ Called immediately after a prompt is finished, i.e. when some input
            will be processed and a new prompt displayed.
        """
        # Flush all state from the input splitter so the next round of
        # reading input starts with a clean buffer.
        arg_0._input_splitter.reset()

        if not arg_0._reading:
            arg_0._highlighter.highlighting_on = False

Called immediately after a prompt is finished i . e . when some input will be processed and a new prompt displayed .


def Func(arg_0, arg_1=None):
        """Write the collected coverage data to a file.

        `suffix` is a suffix to append to the base file name. This can be used
        for multiple or parallel execution, so that many coverage data files
        can exist simultaneously.  A dot will be used to join the base name and
        the suffix.

        """
        if arg_0.use_file:
            arg_2 = arg_0.filename
            if arg_1:
                arg_2 += "." + arg_1
            arg_0.Func_file(arg_2)

Write the collected coverage data to a file .


def Func ( arg_0 , arg_1 ) : global g_build_timeout global arg_2 global arg_3 if g_build_timeout in arg_0 : arg_2 [ "8.build_timeout" ] = 'Yes' arg_3 = True return False else : return True

def Func(arg_0,arg_1):
    """
    Find if a Jenkins job has taken too long to finish and was killed.  It will save this
    information in g_failed_test_info_dict.

    Parameters
    ----------

    each_line :  str
        contains a line read in from jenkins console
    temp_func_list :  list of Python function handles
        contains a list of functions that we want to invoke to extract information from
        the Jenkins console text.

    :return: bool to determine if text mining should continue on the jenkins console text
"""
    global g_build_timeout
    global arg_2
    global arg_3

    if g_build_timeout in arg_0:
        arg_2["8.build_timeout"] = 'Yes'
        arg_3 = True
        return False    # build timeout was found, no need to continue mining the console text
    else:
        return True

Find if a Jenkins job has taken too long to finish and was killed . It will save this information in g_failed_test_info_dict .


return "http://%s:%d" % (host, shell_port)

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 [ "physical_plan" ] arg_3 = arg_2 [ "instances" ] [ arg_1 ] [ "stmgrId" ] arg_4 = arg_2 [ "stmgrs" ] [ arg_3 ] [ "host" ] arg_5 = arg_2 [ "stmgrs" ] [ arg_3 ] [ "shell_port" ] return "http://%s:%d" % ( arg_4 , arg_5 )

def Func(arg_0, arg_1):
  """
  Makes the http endpoint for the heron shell
  if shell port is present, otherwise returns None.
  """
  # Format: container_<id>_<instance_id>
  arg_2 = arg_0["physical_plan"]
  arg_3 = arg_2["instances"][arg_1]["stmgrId"]
  arg_4 = arg_2["stmgrs"][arg_3]["host"]
  arg_5 = arg_2["stmgrs"][arg_3]["shell_port"]
  return "http://%s:%d" % (arg_4, arg_5)

Makes the http endpoint for the heron shell if shell port is present otherwise returns None .


def Func ( arg_0 ) -> None : while True : arg_1 = arg_0 . input_queue . get ( ) arg_2 = arg_0 . _handle_request ( arg_1 ) arg_0 . output_queue . put ( arg_2 )

def Func(arg_0) -> None:
        """Thread Func method implementation."""
        while True:
            arg_1 = arg_0.input_queue.get()
            arg_2 = arg_0._handle_request(arg_1)
            arg_0.output_queue.put(arg_2)


(paths, exact=False, ignores=None, min_size=0)

def
Func
(
arg_0
,
arg_1
=
False
,
arg_2
=
,
arg_3
=
0
)
:
arg_4
=
{
''
:
getPaths
(
arg_0
,
arg_2
)
}
arg_4
=
groupBy
(
arg_4
,
sizeClassifier
,
'sizes'
,
arg_3
=
arg_3
)
arg_4
=
groupBy
(
arg_4
,
hashClassifier
,
'header hashes'
,
limit
=
HEAD_SIZE
)
if
arg_1
:
arg_4
=
groupBy
(
arg_4
,
groupByContent
,
fun_desc
=
'contents'
)
else
:
arg_4
=
groupBy
(
arg_4
,
hashClassifier
,
fun_desc
=
'hashes'
)
return
arg_4

def Func(arg_0, arg_1=False, arg_2=None, arg_3=0):
    """High-level code to walk a set of paths and find duplicate groups.

    :param exact: Whether to compare file contents by hash or by reading
                  chunks in parallel.
    :type exact: :class:`~__builtins__.bool`

    :param paths: See :meth:`~fastdupes.getPaths`
    :param ignores: See :meth:`~fastdupes.getPaths`
    :param min_size: See :meth:`~fastdupes.sizeClassifier`

    :returns: A list of groups of files with identical contents
    :rtype: ``[[path, ...], [path, ...]]``
    """
    arg_4 = {'': getPaths(arg_0, arg_2)}
    arg_4 = groupBy(arg_4, sizeClassifier, 'sizes', arg_3=arg_3)

    # This serves one of two purposes depending on run-mode:
    # - Minimize number of files checked by full-content comparison (hash)
    # - Minimize chances of file handle exhaustion and limit seeking (exact)
    arg_4 = groupBy(arg_4, hashClassifier, 'header hashes', limit=HEAD_SIZE)

    if arg_1:
        arg_4 = groupBy(arg_4, groupByContent, fun_desc='contents')
    else:
        arg_4 = groupBy(arg_4, hashClassifier, fun_desc='hashes')

    return arg_4

High - level code to walk a set of paths and find duplicate groups .


def Func(arg_0, arg_1=None, arg_2=False):
    """Retrieve the adjacency matrix from the nx.DiGraph or numpy array."""
    if isinstance(arg_0, np.ndarray):
        return arg_0
    elif isinstance(arg_0, nx.DiGraph):
        if arg_1 is None:
            arg_1 = arg_0.nodes()
        if not arg_2:
            return np.array(nx.adjacency_matrix(arg_0, arg_1, arg_2=None).todense())
        else:
            return np.array(nx.adjacency_matrix(arg_0, arg_1).todense())
    else:
        raise TypeError("Only networkx.DiGraph and np.ndarray (adjacency matrixes) are supported.")

Retrieve the adjacency matrix from the nx . DiGraph or numpy array .


def Func ( arg_0 ) : arg_1 = np . ceil ( arg_0 ) . astype ( 'int' ) arg_2 = np . arange ( - arg_1 , arg_1 + 1 , 1 ) arg_3 , arg_4 , arg_5 = np . meshgrid ( arg_2 , arg_2 , arg_2 , indexing = 'ij' ) arg_6 = np . sqrt ( arg_3 * arg_3 + arg_4 * arg_4 + arg_5 * arg_5 ) arg_7 = arg_6 < arg_0 return arg_7

def Func(arg_0):
    """Generates a centered boolean mask of a 3D sphere"""
    arg_1 = np.ceil(arg_0).astype('int')
    arg_2 = np.arange(-arg_1, arg_1+1, 1)
    arg_3,arg_4,arg_5 = np.meshgrid(arg_2, arg_2, arg_2, indexing='ij')
    arg_6 = np.sqrt(arg_3*arg_3 + arg_4*arg_4 + arg_5*arg_5)
    arg_7 = arg_6 < arg_0
    return arg_7


def
Func
(
arg_0
)
:
arg_1
=
{
}
arg_2
=
[
]
arg_3
=
string
.
split
(
arg_0
.
search_path
,
os
.
pathsep
)
for
arg_4
,
arg_5
,
arg_6
in
itertools
.
chain
.
from_iterable
(
os
.
walk
(
path
)
for
path
in
arg_3
)
:
for
arg_7
in
arg_6
:
arg_8
,
arg_9
=
os
.
path
.
splitext
(
arg_7
)
if
arg_9
==
'.ttf'
:
if
arg_8
[
0
]
.
lower
(
)
in
english
:
arg_10
=
os
.
path
.
join
(
arg_4
,
arg_7
)
arg_11
=
arg_8
.
lower
(
)
.
replace
(
'_'
,
' '
)
if
' bold'
in
arg_11
:
arg_11
=
arg_11
.
replace
(
' bold'
,
'_bold'
)
if
' italic'
in
arg_11
:
arg_11
=
arg_11
.
replace
(
' italic'
,
'_italic'
)
elif
'bold'
in
arg_11
:
arg_11
=
arg_11
.
replace
(
'bold'
,
'_bold'
)
if
'italic'
in
arg_11
:
arg_11
=
arg_11
.
replace
(
'italic'
,
'_italic'
)
elif
' italic'
in
arg_11
:
arg_11
=
arg_11
.
replace
(
' italic'
,
'_italic'
)
elif
'italic'
in
arg_11
:
arg_11
=
arg_11
.
replace
(
'italic'
,
'_italic'
)
elif
'oblique'
in
arg_11
:
arg_11
=
arg_11
.
replace
(
'oblique'
,
'_italic'
)
else
:
arg_2
.
append
(
arg_11
)
arg_1
[
arg_11
]
=
arg_10
else
:
arg_10
=
os
.
path
.
join
(
arg_4
,
arg_7
)
arg_11
=
arg_8
.
lower
(
)
.
replace
(
'_'
,
' '
)
arg_1
[
arg_11
]
=
arg_10
arg_2
.
append
(
arg_11
)
arg_0
.
font_dict
=
arg_1
arg_0
.
families
=
arg_2

def Func(arg_0):
        """ Given a search path, find file with requested extension """
        arg_1 = {}
        arg_2 = []
        arg_3 = string.split(arg_0.search_path, os.pathsep)

        #for rootdir in rootdirlist:
        #    rootdir = os.path.expanduser(rootdir)
        for arg_4, arg_5, arg_6 in itertools.chain.from_iterable(os.walk(path) for path in arg_3):
            for arg_7 in arg_6:
                arg_8, arg_9 = os.path.splitext(arg_7)
                if arg_9 == '.ttf':
                    if arg_8[0].lower() in english:
                        arg_10 = os.path.join(arg_4, arg_7)
                        arg_11 = arg_8.lower().replace('_', ' ')
                        if ' bold' in arg_11:
                            arg_11 = arg_11.replace(' bold', '_bold')
                            if ' italic' in arg_11:
                                arg_11 = arg_11.replace(' italic', '_italic')
                        elif 'bold' in arg_11:
                            arg_11 = arg_11.replace('bold', '_bold')
                            if 'italic' in arg_11:
                                arg_11 = arg_11.replace('italic', '_italic')
                        elif ' italic' in arg_11:
                            arg_11 = arg_11.replace(' italic', '_italic')
                        elif 'italic' in arg_11:
                            arg_11 = arg_11.replace('italic', '_italic')
                        elif 'oblique' in arg_11:
                            arg_11 = arg_11.replace('oblique', '_italic')
                        else:
                            arg_2.append(arg_11)
                        arg_1[arg_11] = arg_10
                    else:
                        arg_10 = os.path.join(arg_4, arg_7)
                        arg_11 = arg_8.lower().replace('_', ' ')
                        arg_1[arg_11] = arg_10
                        arg_2.append(arg_11)
        arg_0.font_dict = arg_1
        arg_0.families = arg_2

Given a search path find file with requested extension


def Func ( arg_0 ) : arg_0 . _open_image ( ) arg_1 , arg_2 = image_data ( arg_0 . image ) arg_3 = arg_0 . ctx . texture ( arg_0 . image . size , arg_1 , arg_2 , ) arg_3 . extra = { 'meta' : arg_0 . meta } if arg_0 . meta . mipmap : arg_3 . build_mipmaps ( ) arg_0 . _close_image ( ) return arg_3

def Func(arg_0):
        """Load a 2d texture"""
        arg_0._open_image()

        arg_1, arg_2 = image_data(arg_0.image)

        arg_3 = arg_0.ctx.texture(
            arg_0.image.size,
            arg_1,
            arg_2,
        )
        arg_3.extra = {'meta': arg_0.meta}

        if arg_0.meta.mipmap:
            arg_3.build_mipmaps()

        arg_0._close_image()

        return arg_3


def Func(arg_0, arg_1, arg_2):
    """Main executor of the skesa template.

    Parameters
    ----------
    sample_id : str
        Sample Identification string.
    fastq_pair : list
        Two element list containing the paired FastQ files.
    clear : str
        Can be either 'true' or 'false'. If 'true', the input fastq files will
        be removed at the end of the run, IF they are in the working directory
    """

    logger.info("Starting skesa")

    # Determine output file
    if "_trim." in arg_1[0]:
        arg_0 += "_trim"
    arg_3 = __get_version_skesa()["version"]
    arg_4 = "{}_skesa{}.fasta".format(arg_0, arg_3.replace(".", ""))

    arg_5 = [
        "skesa",
        "--fastq",
        "{},{}".format(arg_1[0], arg_1[1]),
        "--gz",
        "--use_paired_ends",
        "--cores",
        "${task.cpus}"
    ]

    logger.debug("Running Skesa subprocess with command: {}".format(arg_5))

    with open(arg_4, "w") as fh:
        arg_6 = subprocess.Popen(arg_5, arg_7=fh, arg_8=PIPE)
    arg_7, arg_8 = arg_6.communicate()

    # Attempt to decode STDERR output from bytes. If unsuccessful, coerce to
    # string
    try:
        arg_8 = arg_8.decode("utf8")
        arg_7 = arg_7.decode("utf8")
    except (UnicodeDecodeError, AttributeError):
        arg_8 = str(arg_8)
        arg_7 = str(arg_7)

    logger.info("Finished Skesa subprocess with STDOUT:\\n"
                "======================================\\n{}".format(arg_7))
    logger.info("Fished Skesa subprocess with STDERR:\\n"
                "======================================\\n{}".format(arg_8))
    logger.info("Finished Skesa with return code: {}".format(
        arg_6.returncode))

    # Remove input fastq files when clear option is specified.
    # Only remove temporary input when the expected output exists.
    if arg_2 == "true" and os.path.exists(arg_4):
        clean_up(arg_1)

    with open(".status", "w") as fh:
        if arg_6.returncode != 0:
            fh.write("error")
            raise SystemExit(arg_6.returncode)
        else:
            fh.write("pass")


def Func(arg_0):
    """Convert a basestring to a valid UTF-8 str."""

    if isinstance(arg_0, bytes):
        return arg_0.decode("utf-8", "replace").encode("utf-8")
    elif isinstance(arg_0, text_type):
        return arg_0.encode("utf-8")
    else:
        raise TypeError("only unicode/bytes types can be converted to UTF-8")

Convert a basestring to a valid UTF - 8 str .


def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Read the data encoding the Get response payload and decode it
        into its constituent parts.

        Args:
            input_stream (stream): A data stream containing encoded object
                data, supporting a Func method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be decoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            ValueError: Raised if the object type, unique identifier, or
                secret attributes are missing from the encoded payload.
        """
        super(GetResponsePayload, arg_0).Func(
            arg_1,
            arg_2=arg_2
        )
        arg_6 = utils.BytearrayStream(arg_1.Func(arg_0.length))

        if arg_0.is_tag_next(arg_3.Tags.OBJECT_TYPE, arg_6):
            arg_0._object_type = primitives.Enumeration(
                enum=arg_3.ObjectType,
                tag=arg_3.Tags.OBJECT_TYPE
            )
            arg_0._object_type.Func(arg_6, arg_2=arg_2)
        else:
            raise ValueError(
                "Parsed payload encoding is missing the object type field."
            )

        if arg_0.is_tag_next(arg_3.Tags.UNIQUE_IDENTIFIER, arg_6):
            arg_0._unique_identifier = primitives.TextString(
                tag=arg_3.Tags.UNIQUE_IDENTIFIER
            )
            arg_0._unique_identifier.Func(
                arg_6,
                arg_2=arg_2
            )
        else:
            raise ValueError(
                "Parsed payload encoding is missing the unique identifier "
                "field."
            )

        arg_0.secret = arg_0.secret_factory.create(arg_0.object_type)
        if arg_0.is_tag_next(arg_0._secret.tag, arg_6):
            arg_0._secret.Func(arg_6, arg_2=arg_2)
        else:
            raise ValueError(
                "Parsed payload encoding is missing the secret field."
            )

        arg_0.is_oversized(arg_6)

Read the data encoding the Get response payload and decode it
        into its constituent parts.

        Args:
            input_stream (stream): A data stream containing encoded object
                data, supporting a read method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be decoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            ValueError: Raised if the object type, unique identifier, or
                secret attributes are missing from the encoded payload.

Read the data encoding the Get response payload and decode it into its constituent parts .


(self, radius : dim.Length, unit_luminosity='eps', exposure_time=None)

return list(map(lambda galaxy: galaxy.luminosity_within_circle_in_units(
            radius=radius, unit_luminosity=unit_luminosity, kpc_per_arcsec=self.kpc_per_arcsec,
            exposure_time=exposure_time),
                        self.galaxies))

def Func ( arg_0 , arg_1 : arg_2 . Length , arg_4 = 'eps' , arg_5 = None ) : return list ( map ( lambda galaxy : galaxy . luminosity_within_circle_in_units ( arg_1 = arg_1 , arg_4 = arg_4 , kpc_per_arcsec = arg_0 . kpc_per_arcsec , arg_5 = arg_5 ) , arg_0 . galaxies ) )

def Func(arg_0, arg_1 : arg_2.Length, arg_4='eps', arg_5=None):
        """Compute the total luminosity of all galaxies in this plane within a circle of specified radius.

        See *galaxy.light_within_circle* and *light_profiles.light_within_circle* for details \
        of how this is performed.

        Parameters
        ----------
        radius : float
            The radius of the circle to compute the dimensionless mass within.
        units_luminosity : str
            The units the luminosity is returned in (eps | counts).
        exposure_time : float
            The exposure time of the observation, which converts luminosity from electrons per second units to counts.
        """
        return list(map(lambda galaxy: galaxy.luminosity_within_circle_in_units(
            arg_1=arg_1, arg_4=arg_4, kpc_per_arcsec=arg_0.kpc_per_arcsec,
            arg_5=arg_5),
                        arg_0.galaxies))

Compute the total luminosity of all galaxies in this plane within a circle of specified radius .


def Func ( arg_0 ) : arg_1 = datetime . now ( ) for arg_2 in arg_0 . depending . keys ( ) : if arg_2 in arg_0 . depending : arg_3 = arg_0 . depending [ arg_2 ] if arg_3 . timeout and arg_3 . timeout < arg_1 : arg_0 . fail_unreachable ( arg_2 , error . TaskTimeout )

def Func(arg_0):
        """Audit all waiting tasks for expired timeouts."""
        arg_1 = datetime.now()
        for arg_2 in arg_0.depending.keys():
            # must recheck, in case one failure cascaded to another:
            if arg_2 in arg_0.depending:
                arg_3 = arg_0.depending[arg_2]
                if arg_3.timeout and arg_3.timeout < arg_1:
                    arg_0.fail_unreachable(arg_2, error.TaskTimeout)

Audit all waiting tasks for expired timeouts .


def Func ( arg_0 ) : arg_1 = [ ] if arg_0 : for arg_2 in arg_0 : if arg_2 . nodeType == arg_2 . TEXT_NODE : arg_1 . append ( arg_2 . data ) else : arg_1 . append ( Func ( arg_2 . childNodes ) ) return '' . join ( arg_1 )

def Func(arg_0):
    """Iterate through all the children of a node.

    Returns one string containing the values from all the text-nodes
    recursively.
    """
    arg_1 = []
    if arg_0:
        for arg_2 in arg_0:
            if arg_2.nodeType == arg_2.TEXT_NODE:
                arg_1.append(arg_2.data)
            else:
                arg_1.append(Func(arg_2.childNodes))
    return ''.join(arg_1)

Iterate through all the children of a node .


def Func ( arg_0 , arg_1 ) : arg_1 . lexer . lineno += arg_1 . value . count ( '\n' ) return arg_1

def Func(arg_0, arg_1):
        r'[^\'@]+'
        arg_1.lexer.lineno += arg_1.value.count('\n')
        return arg_1


(population,
                 population_size,
                 mixing_indices,
                 differential_weight)

return [_mutant_part(population_part) for population_part in population]

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_2 = tf . reshape ( arg_2 , [ - 1 ] ) arg_4 = tf . stack ( [ 1.0 , arg_3 , - arg_3 ] ) def _mutant_part ( arg_5 ) : arg_6 = tf . gather ( arg_5 , arg_2 ) arg_6 = tf . transpose ( a = tf . reshape ( arg_6 , [ arg_1 , 3 , - 1 ] ) , perm = [ 0 , 2 , 1 ] ) return tf . math . reduce_sum ( input_tensor = arg_6 * arg_4 , axis = - 1 ) return [ _mutant_part ( arg_5 ) for arg_5 in arg_0 ]

def Func(arg_0,
                 arg_1,
                 arg_2,
                 arg_3):
  """Computes the mutatated vectors for each population member.

  Args:
    population:  Python `list` of `Tensor`s representing the
      current population vectors. Each `Tensor` must be of the same real dtype.
      The first dimension of each `Tensor` indexes individual
      population members. For example, if the population is a list with a
      single `Tensor` of shape [n, m1, m2], then `n` is the population size and
      the shape of an individual solution is [m1, m2].
      If there is more than one element in the population, then each `Tensor`
      in the list should have the first axis of the same size.
    population_size: Scalar integer `Tensor`. The size of the population.
    mixing_indices: `Tensor` of integral dtype and shape [n, 3] where `n` is the
      number of members in the population. Each element of the `Tensor` must be
      a valid index into the first dimension of the population (i.e range
      between `0` and `n-1` inclusive).
    differential_weight: Real scalar `Tensor`. Must be positive and less than
      2.0. The parameter controlling the strength of mutation.

  Returns:
    mutants: `Tensor` or Python `list` of `Tensor`s of the same shape and dtype
      as the input population. The mutated vectors.
  """
  arg_2 = tf.reshape(arg_2, [-1])
  arg_4 = tf.stack([1.0, arg_3, -arg_3])
  def _mutant_part(arg_5):
    arg_6 = tf.gather(arg_5, arg_2)
    arg_6 = tf.transpose(
        a=tf.reshape(arg_6, [arg_1, 3, -1]), perm=[0, 2, 1])
    return tf.math.reduce_sum(input_tensor=arg_6 * arg_4, axis=-1)

  return [_mutant_part(arg_5) for arg_5 in arg_0]

Computes the mutatated vectors for each population member .


(self, reroot='least-squares', n_iqd=None, plot=False)

def Func(arg_0, arg_1='least-squares', arg_2=None, arg_3=False):
        '''
        Labels outlier branches that don't seem to follow a molecular clock
        and excludes them from subsequent molecular clock estimation and
        the timetree propagation.

        Parameters
        ----------
         reroot : str
            Method to find the best root in the tree (see :py:meth:`treetime.TreeTime.reroot` for options)

         n_iqd : int
            Number of iqd intervals. The outlier nodes are those which do not fall
            into :math:`IQD\cdot n_iqd` interval (:math:`IQD` is the interval between
            75\ :sup:`th` and 25\ :sup:`th` percentiles)

            If None, the default (3) assumed

         plot : bool
            If True, plot the results

        '''
        if arg_2 is None:
            arg_2 = ttconf.NIQD
        if type(arg_1) is list and len(arg_1)==1:
            arg_1=str(arg_1[0])

        arg_4 = arg_0.tree.get_terminals()
        if arg_1:
            if arg_0.reroot(root='least-squares' if arg_1=='best' else arg_1, covariation=False)==ttconf.ERROR:
                return ttconf.ERROR
        else:
            arg_0.get_clock_model(covariation=False)

        arg_5 = arg_0.clock_model['slope']
        arg_6 = arg_0.clock_model['intercept']
        arg_7 = {}
        for arg_8 in arg_4:
            if hasattr(arg_8, 'raw_date_constraint') and  (arg_8.raw_date_constraint is not None):
                arg_7[arg_8] = arg_8.dist2root - arg_5*np.mean(arg_8.raw_date_constraint) - arg_6

        arg_9 = np.array(list(arg_7.values()))
        arg_10 = np.percentile(arg_9,75) - np.percentile(arg_9,25)
        for arg_8,arg_11 in arg_7.items():
            if abs(arg_11)>arg_2*arg_10 and arg_8.up.up is not None:
                arg_0.logger('TreeTime.ClockFilter: marking %s as outlier, residual %f interquartile distances'%(arg_8.name,arg_11/arg_10), 3, warn=True)
                arg_8.bad_branch=True
            else:
                arg_8.bad_branch=False

        # redo root estimation after outlier removal
        if arg_1 and arg_0.reroot(root=arg_1)==ttconf.ERROR:
                return ttconf.ERROR

        if arg_3:
            arg_0.plot_root_to_tip()

        return ttconf.SUCCESS

Labels outlier branches that don t seem to follow a molecular clock and excludes them from subsequent molecular clock estimation and the timetree propagation .


def Func ( arg_0 , arg_1 ) : if "*" in arg_1 : return arg_0 . connection . glob ( arg_1 ) else : return arg_0 . connection . walk ( arg_1 )

def Func(arg_0, arg_1):
        """
        List files in Azure Data Lake Storage

        :param path: full path/globstring to use to Func files in ADLS
        :type path: str
        """
        if "*" in arg_1:
            return arg_0.connection.glob(arg_1)
        else:
            return arg_0.connection.walk(arg_1)

List files in Azure Data Lake Storage

        :param path: full path/globstring to use to list files in ADLS
        :type path: str


return render_to_response('memcache_admin/stats.html', data, RequestContext(request))

def
Func
(
arg_0
,
arg_1
)
:
arg_1
=
arg_1
.
strip
(
'/'
)
arg_2
=
_context_data
(
{
'title'
:
_
(
'Memcache Statistics for %s'
)
%
arg_1
,
'cache_Func'
:
_get_cache_Func
(
arg_1
)
,
}
,
arg_0
)
return
render_to_response
(
'memcache_admin/Func.html'
,
arg_2
,
RequestContext
(
arg_0
)
)

def Func(arg_0, arg_1):
    """
    Show server statistics.
    """
    arg_1 = arg_1.strip('/')
    arg_2 = _context_data({
        'title': _('Memcache Statistics for %s') % arg_1,
        'cache_Func': _get_cache_Func(arg_1),
    },
        arg_0)
    return render_to_response('memcache_admin/Func.html', arg_2, RequestContext(arg_0))


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

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


def Func ( arg_0 ) : arg_1 = arg_0 . trusted or getattr ( arg_0 . comes_from , "trusted" , None ) if arg_1 is not None and arg_1 : try : arg_2 = getattr ( arg_0 . comes_from , "api_version" , None ) arg_2 = int ( arg_2 ) except ( ValueError , TypeError ) : arg_2 = None if arg_2 is None or arg_2 <= 1 : return if arg_0 . hash : return True else : return False elif arg_1 is not None : return False

def Func(arg_0):
        """
        Returns True if this link can be verified after download, False if it
        cannot, and None if we cannot determine.
        """
        arg_1 = arg_0.trusted or getattr(arg_0.comes_from, "trusted", None)
        if arg_1 is not None and arg_1:
            # This link came from a trusted source. It *may* be Func but
            #   first we need to see if this page is operating under the new
            #   API version.
            try:
                arg_2 = getattr(arg_0.comes_from, "api_version", None)
                arg_2 = int(arg_2)
            except (ValueError, TypeError):
                arg_2 = None

            if arg_2 is None or arg_2 <= 1:
                # This link is either trusted, or it came from a trusted,
                #   however it is not operating under the API version 2 so
                #   we can't make any claims about if it's safe or not
                return

            if arg_0.hash:
                # This link came from a trusted source and it has a hash, so we
                #   can consider it safe.
                return True
            else:
                # This link came from a trusted source, using the new API
                #   version, and it does not have a hash. It is NOT Func
                return False
        elif arg_1 is not None:
            # This link came from an untrusted source and we cannot trust it
            return False

Returns True if this link can be verified after download False if it cannot and None if we cannot determine .


def Func ( arg_0 , arg_1 , arg_2 = None ) : def check ( arg_3 ) : if arg_2 is None : return arg_1 in arg_3 . xml_attributes else : return arg_1 in arg_3 . xml_attributes and arg_3 . xml_attributes [ arg_1 ] == arg_2 return filter ( check , select_elements ( arg_0 ) )

def Func(arg_0, arg_1, arg_2=None):
    '''
    Yields elements from the source having the given attrivute, optionally with the given attribute value
    source - if an element, starts with all child elements in order; can also be any other iterator
    name - attribute name to check
    val - if None check only for the existence of the attribute, otherwise compare the given value as well
    '''
    def check(arg_3):
        if arg_2 is None:
            return arg_1 in arg_3.xml_attributes
        else:
            return arg_1 in arg_3.xml_attributes and arg_3.xml_attributes[arg_1] == arg_2
    return filter(check, select_elements(arg_0))

Yields elements from the source having the given attrivute optionally with the given attribute value source - if an element starts with all child elements in order ; can also be any other iterator name - attribute name to check val - if None check only for the existence of the attribute otherwise compare the given value as well


(self, request, obj, post_url_continue=None, **kwargs)

return self._redirect(request, super(TreeItemAdmin, self).response_add(request, obj, post_url_continue))

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , ** arg_4 ) : if arg_3 is None : arg_3 = '../item_%s/' % arg_2 . pk return arg_0 . _redirect ( arg_1 , super ( TreeItemAdmin , arg_0 ) . Func ( arg_1 , arg_2 , arg_3 ) )

def Func(arg_0, arg_1, arg_2, arg_3=None, **arg_4):
        """Redirects to the appropriate items' 'continue' page on item add.

        As we administer tree items within tree itself, we
        should make some changes to redirection process.

        """
        if arg_3 is None:
            arg_3 = '../item_%s/' % arg_2.pk

        return arg_0._redirect(arg_1, super(TreeItemAdmin, arg_0).Func(arg_1, arg_2, arg_3))

Redirects to the appropriate items continue page on item add .


def Func(arg_0, arg_1, arg_2):
    """
    Displays bokeh output inside a notebook.
    """
    arg_3 = arg_0.ref['id']
    arg_4 = 'application/vnd.holoviews_load.v0+json'
    arg_5 = 'application/vnd.holoviews_exec.v0+json'

    # Publish plot HTML
    arg_6, arg_7, arg_8 = bokeh.embed.notebook.notebook_content(arg_0, arg_2.id)
    publish_display_data(data={'text/html': encode_utf8(arg_7)})

    # Publish comm manager
    arg_9 = '\n'.join([PYVIZ_PROXY, JupyterCommManager.js_manager])
    publish_display_data(data={arg_4: arg_9, 'application/javascript': arg_9})

    # Publish bokeh plot JS
    arg_10 = bokeh_msg_handler.format(plot_id=arg_3)
    arg_11 = arg_2.js_template.format(plot_id=arg_3, comm_id=arg_2.id, arg_10=arg_10)
    arg_12 = '\n'.join([arg_11, arg_6])

    # Note: extension should be altered so text/html is not required
    publish_display_data(data={arg_5: '', 'text/html': '',
                               'application/javascript': arg_12},
                         metadata={arg_5: {'id': arg_3}})

Displays bokeh output inside a notebook .


objHasUnsavedChanges - Check if any object has unsaved changes, cascading.

def Func ( arg_0 ) : if not arg_0 . obj : return False return arg_0 . obj . hasUnsavedChanges ( cascadeObjects = True )

def Func(arg_0):
		'''
			Func - Check if any object has unsaved changes, cascading.
		'''
		if not arg_0.obj:
			return False

		return arg_0.obj.hasUnsavedChanges(cascadeObjects=True)

objHasUnsavedChanges - Check if any object has unsaved changes cascading .


def Func(arg_0, arg_1, arg_2=arg_3.INFO):
    """
    Send a message to a group of users.

    :param users: Users queryset
    :param message: Message to show
    :param level: Message level
    """
    for arg_5 in arg_0:
        message_user(arg_5, arg_1, arg_2)


return exc, si_count, serif_count, clean_visible_bytes, clean_visible_count, stream_ids

def Func(arg_0, arg_1):
     '''attempt a fetch and iteration over a work_unit.key path in s3
     '''
     arg_2 = 'http://s3.amazonaws.com/aws-publicdatasets/' + arg_0.key.strip()

     ## cheapest way to iterate over the corpus is a few stages of
     ## streamed child processes.  Note that stderr needs to go
     ## separately to a file so that reading the stdin doesn't get
     ## blocked:
     arg_3 = '(wget -O - %s | gpg --no-permission-warning --trust-model always --output - --decrypt - | xz --decompress) 2> %s-err' % (arg_2, arg_1)
     print arg_3
     arg_4 = Popen(arg_3, stdout=PIPE, shell=True)
     print 'child launched'
     sys.stdout.flush()

     arg_5 = 0
     arg_6 = 0
     arg_7 = ''
     arg_8 = list()
     arg_9 = 0
     arg_10 = 0
     try:
         for arg_11 in Chunk(file_obj=arg_4.stdout):
             print arg_11.stream_id, arg_11.abs_url
             if arg_11.body.language:
                 arg_12 = arg_11.body.language.code
             else:
                 arg_12 = ''
             arg_8.append((arg_12, arg_11.stream_id))
             if arg_11.body.clean_visible:
                 arg_10 += 1
                 arg_9 += len(arg_11.body.clean_visible)
             arg_5 += 1
             if 'serif' in arg_11.body.sentences:
                 arg_6 += 1
     except Exception, arg_7:
         arg_7 = re.sub('\s+', ' ', str(arg_7)).strip()

     arg_4.terminate()
     arg_4.wait()
     arg_4.stdout.close()
     return arg_7, arg_5, arg_6, arg_9, arg_10, arg_8

attempt a fetch and iteration over a work_unit . key path in s3


def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_3 = arg_0 . _get_object_handle ( arg_1 , arg_2 , wait_for_object = False ) if arg_3 . AXValue == 1 : return 1 except LdtpServerException : pass return 0

def Func(arg_0, arg_1, arg_2):
        """
        Verify check item.

        @param window_name: Window name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string

        @return: 1 on success 0 on failure.
        @rtype: integer
        """
        try:
            arg_3 = arg_0._get_object_handle(arg_1, arg_2,
                                                    wait_for_object=False)
            if arg_3.AXValue == 1:
                return 1
        except LdtpServerException:
            pass
        return 0


def Func ( arg_0 ) : arg_1 = np . linspace ( - np . pi , 0 , 25 ) arg_2 = np . linspace ( 0 , np . pi , 25 ) arg_3 = np . outer ( np . cos ( arg_1 ) , np . sin ( arg_2 ) ) arg_4 = np . outer ( np . sin ( arg_1 ) , np . sin ( arg_2 ) ) arg_5 = np . outer ( np . ones ( arg_1 . shape [ 0 ] ) , np . cos ( arg_2 ) ) arg_0 . axes . plot_surface ( arg_3 , arg_4 , arg_5 , rstride = 2 , cstride = 2 , color = arg_0 . sphere_color , linewidth = 0 , alpha = arg_0 . sphere_alpha ) arg_0 . axes . plot_wireframe ( arg_3 , arg_4 , arg_5 , rstride = 5 , cstride = 5 , color = arg_0 . frame_color , alpha = arg_0 . frame_alpha ) arg_0 . axes . plot ( 1.0 * np . cos ( arg_1 ) , 1.0 * np . sin ( arg_1 ) , zs = 0 , zdir = 'z' , lw = arg_0 . frame_width , color = arg_0 . frame_color ) arg_0 . axes . plot ( 1.0 * np . cos ( arg_1 ) , 1.0 * np . sin ( arg_1 ) , zs = 0 , zdir = 'x' , lw = arg_0 . frame_width , color = arg_0 . frame_color )

def Func(arg_0):
        """front half of sphere"""
        arg_1 = np.linspace(-np.pi, 0, 25)
        arg_2 = np.linspace(0, np.pi, 25)
        arg_3 = np.outer(np.cos(arg_1), np.sin(arg_2))
        arg_4 = np.outer(np.sin(arg_1), np.sin(arg_2))
        arg_5 = np.outer(np.ones(arg_1.shape[0]), np.cos(arg_2))
        arg_0.axes.plot_surface(arg_3, arg_4, arg_5, rstride=2, cstride=2,
                               color=arg_0.sphere_color, linewidth=0,
                               alpha=arg_0.sphere_alpha)
        # wireframe
        arg_0.axes.plot_wireframe(arg_3, arg_4, arg_5, rstride=5, cstride=5,
                                 color=arg_0.frame_color,
                                 alpha=arg_0.frame_alpha)
        # equator
        arg_0.axes.plot(1.0 * np.cos(arg_1), 1.0 * np.sin(arg_1),
                       zs=0, zdir='z', lw=arg_0.frame_width,
                       color=arg_0.frame_color)
        arg_0.axes.plot(1.0 * np.cos(arg_1), 1.0 * np.sin(arg_1),
                       zs=0, zdir='x', lw=arg_0.frame_width,
                       color=arg_0.frame_color)


def Func ( arg_0 , arg_1 ) : if not arg_0 . _client : arg_0 . _client = Client ( project = arg_1 , credentials = arg_0 . _get_credentials ( ) ) return arg_0 . _client

def Func(arg_0, arg_1):
        """
        Provides a client for interacting with the Cloud Spanner API.

        :param project_id: The ID of the  GCP project.
        :type project_id: str
        :return: google.cloud.spanner_v1.client.Client
        :rtype: object
        """
        if not arg_0._client:
            arg_0._client = Client(project=arg_1, credentials=arg_0._get_credentials())
        return arg_0._client

Provides a client for interacting with the Cloud Spanner API .


def Func(arg_0, arg_1):
        """
        Set a variable.
        """
        try:
            arg_2, arg_3 = [part.strip() for part in arg_1.split('=')]
            if arg_2 not in arg_0.bot._vars:
                arg_0.print_response('No such variable %s enter vars to see available vars' % arg_2)
                return
            arg_4 = arg_0.bot._vars[arg_2]
            arg_4.value = arg_4.sanitize(arg_3.strip(';'))

            arg_5, arg_6 = arg_0.bot.canvas.sink.var_changed(arg_2, arg_4.value)
            if arg_5:
                print('{}={}'.format(arg_2, arg_4.value), file=arg_0.stdout)
            else:
                print('{}\n'.format(arg_6), file=arg_0.stdout)
        except Exception as e:
            print('Invalid Syntax.', e)
            return


def
Func
(
arg_0
)
:
arg_1
=
zmq
.
Context
.
instance
(
)
with
open
(
arg_0
)
as
f
:
arg_2
=
json
.
loads
(
f
.
read
(
)
)
arg_3
=
arg_2
[
'location'
]
arg_4
=
arg_2
[
'url'
]
arg_5
=
Session
(
key
=
str_to_bytes
(
arg_2
[
'exec_key'
]
)
)
arg_6
=
arg_1
.
socket
(
zmq
.
DEALER
)
arg_6
.
connect
(
disambiguate_url
(
arg_2
[
'url'
]
,
arg_3
)
)
arg_5
.
send
(
arg_6
,
"connection_request"
)
arg_7
,
arg_8
=
arg_5
.
recv
(
arg_6
,
mode
=
0
)
arg_9
=
arg_8
[
'content'
]
arg_10
=
disambiguate_url
(
arg_9
[
'iopub'
]
,
arg_3
)
arg_11
=
arg_1
.
socket
(
zmq
.
SUB
)
arg_11
.
setsockopt
(
zmq
.
SUBSCRIBE
,
b''
)
arg_11
.
connect
(
arg_10
)
while
True
:
try
:
arg_7
,
arg_8
=
arg_5
.
recv
(
arg_11
,
mode
=
0
)
except
KeyboardInterrupt
:
return
arg_12
=
arg_7
[
0
]
if
arg_8
[
'msg_type'
]
==
'stream'
:
print
(
"%s: %s"
%
(
arg_12
,
arg_8
[
'content'
]
[
'data'
]
)
)
elif
arg_8
[
'msg_type'
]
==
'pyerr'
:
arg_9
=
arg_8
[
'content'
]
print
(
arg_12
+
':'
)
for
arg_13
in
arg_9
[
'traceback'
]
:
print
(
'    '
+
arg_13
)

def Func(arg_0):
    """watch iopub channel, and print messages"""

    arg_1 = zmq.Context.instance()

    with open(arg_0) as f:
        arg_2 = json.loads(f.read())

    arg_3 = arg_2['location']
    arg_4 = arg_2['url']
    arg_5 = Session(key=str_to_bytes(arg_2['exec_key']))

    arg_6 = arg_1.socket(zmq.DEALER)
    arg_6.connect(disambiguate_url(arg_2['url'], arg_3))
    arg_5.send(arg_6, "connection_request")
    arg_7,arg_8 = arg_5.recv(arg_6, mode=0)
    arg_9 = arg_8['content']
    arg_10 = disambiguate_url(arg_9['iopub'], arg_3)
    arg_11 = arg_1.socket(zmq.SUB)
    # This will subscribe to all messages:
    arg_11.setsockopt(zmq.SUBSCRIBE, b'')
    # replace with b'' with b'engine.1.stdout' to subscribe only to engine 1's stdout
    # 0MQ subscriptions are simple 'foo*' matches, so 'engine.1.' subscribes
    # to everything from engine 1, but there is no way to subscribe to
    # just stdout from everyone.
    # multiple calls to subscribe will add subscriptions, e.g. to subscribe to
    # engine 1's stderr and engine 2's stdout:
    # sub.setsockopt(zmq.SUBSCRIBE, b'engine.1.stderr')
    # sub.setsockopt(zmq.SUBSCRIBE, b'engine.2.stdout')
    arg_11.connect(arg_10)
    while True:
        try:
            arg_7,arg_8 = arg_5.recv(arg_11, mode=0)
        except KeyboardInterrupt:
            return
        # ident always length 1 here
        arg_12 = arg_7[0]
        if arg_8['msg_type'] == 'stream':
            # stdout/stderr
            # stream names are in msg['content']['name'], if you want to handle
            # them differently
            print("%s: %s" % (arg_12, arg_8['content']['data']))
        elif arg_8['msg_type'] == 'pyerr':
            # Python traceback
            arg_9 = arg_8['content']
            print(arg_12 + ':')
            for arg_13 in arg_9['traceback']:
                # indent lines
                print('    ' + arg_13)


def Func ( arg_0 ) : arg_1 = [ T . as_tensor_variable ( t ) . flatten ( ) for t in arg_0 ] arg_1 = [ ( t if t . ndim > 0 else t . dimshuffle ( 'x' ) ) for t in arg_1 ] arg_2 = T . join ( 0 , * arg_1 ) return T . sqrt ( T . sqr ( arg_2 ) . sum ( ) )

def Func(arg_0):
    """
    Get the L2 norm of multiple tensors.
    This function is taken from blocks.
    """
    # Another way for doing this, I don't know which one is fast
    # return T.sqrt(sum(T.sum(t ** 2) for t in tensors))
    arg_1 = [T.as_tensor_variable(t).flatten() for t in arg_0]
    arg_1 = [(t if t.ndim > 0 else t.dimshuffle('x'))
                 for t in arg_1]
    arg_2 = T.join(0, *arg_1)
    return T.sqrt(T.sqr(arg_2).sum())

Get the L2 norm of multiple tensors . This function is taken from blocks .


def Func ( arg_0 ) : if 'CPENV_CLEAN_ENV' not in arg_1 . environ : if platform == 'win' : arg_1 . environ [ 'PROMPT' ] = '$P$G' else : arg_1 . environ [ 'PS1' ] = '\\u@\\h:\\w\\$' arg_3 = utils . get_store_env_tmp ( ) arg_1 . environ [ 'CPENV_CLEAN_ENV' ] = arg_3 utils . store_env ( path = arg_3 ) else : utils . restore_env_from_file ( arg_1 . environ [ 'CPENV_CLEAN_ENV' ] )

def Func(arg_0):
        '''
        Prior to activating, store everything necessary to deactivate this
        environment.
        '''

        if 'CPENV_CLEAN_ENV' not in arg_1.environ:
            if platform == 'win':
                arg_1.environ['PROMPT'] = '$P$G'
            else:
                arg_1.environ['PS1'] = '\\u@\\h:\\w\\$'
            arg_3 = utils.get_store_env_tmp()
            arg_1.environ['CPENV_CLEAN_ENV'] = arg_3
            utils.store_env(path=arg_3)
        else:
            utils.restore_env_from_file(arg_1.environ['CPENV_CLEAN_ENV'])

Prior to activating store everything necessary to deactivate this environment .


def Func(arg_0=None):
    '''Update configuration from file.

    :param cfgfile: Configuration file to load.
    '''
    arg_1.DEFAULT_INTERPOLATION = 'template'
    arg_0 = configuration_file(arg_0)
    arg_3 = arg_1.ConfigObj(arg_0, configspec=cfgspec, encoding='utf-8')
    arg_4 = Validator()
    arg_5 = arg_3.validate(arg_4)
    if arg_5 is not True:
        raise ValueError('Invalid configuration: %s' % arg_5)
    if len(arg_3['capture']['files']) != len(arg_3['capture']['flavors']):
        raise ValueError('List of files and flavors do not match')
    arg_6()['__config'] = arg_3
    logger_init()
    if arg_3['server'].get('url', '').endswith('/'):
        logger.warning('Base URL ends with /. This is most likely a '
                       'configuration error. The URL should contain nothing '
                       'of the service paths.')
    logger.info('Configuration loaded from %s' % arg_0)
    check()
    return arg_3


(self, filt=None, analyte=None, samples=None, subset=None, show_status=False)

def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
,
arg_3
=
,
arg_4
=
,
arg_5
=
False
)
:
if
arg_3
is
not
:
arg_4
=
arg_0
.
make_subset
(
arg_3
)
arg_3
=
arg_0
.
_get_samples
(
arg_4
)
for
arg_6
in
arg_3
:
try
:
arg_0
.
data
[
arg_6
]
.
filt
.
on
(
arg_2
,
arg_1
)
except
:
warnings
.
warn
(
"filt.on failure in sample "
+
arg_6
)
if
arg_5
:
arg_0
.
filter_status
(
arg_4
=
arg_4
)
return

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None, arg_4=None, arg_5=False):
        """
        Turns data filters on for particular analytes and samples.

        Parameters
        ----------
        filt : optional, str or array_like
            Name, partial name or list of names of filters. Supports
            partial matching. i.e. if 'cluster' is specified, all
            filters with 'cluster' in the name are activated.
            Defaults to all filters.
        analyte : optional, str or array_like
            Name or list of names of analytes. Defaults to all analytes.
        samples : optional, array_like or None
            Which samples to apply this filter to. If None, applies to all
            samples.

        Returns
        -------
        None
        """
        if arg_3 is not None:
            arg_4 = arg_0.make_subset(arg_3)

        arg_3 = arg_0._get_samples(arg_4)

        for arg_6 in arg_3:
            try:
                arg_0.data[arg_6].filt.on(arg_2, arg_1)
            except:
                warnings.warn("filt.on failure in sample " + arg_6)

        if arg_5:
            arg_0.filter_status(arg_4=arg_4)
        return

Turns data filters on for particular analytes and samples .