def Func(arg_0, arg_1):
        """Return a word with punctuation stripped out.

        Parameters
        ----------
        word : str
            A word to strip punctuation from

        Returns
        -------
        str
            The word stripped of punctuation

        Examples
        --------
        >>> pe = Synoname()
        >>> pe.Func('AB;CD EF-GH$IJ')
        'ABCD EFGHIJ'

        """
        arg_2 = ''
        for arg_3 in arg_1:
            if arg_3 not in set(',-./:;"&\'()!{|}?$%*+<=>[\\]^_`~'):
                arg_2 += arg_3
        return arg_2.strip()

Return a word with punctuation stripped out.

        Parameters
        ----------
        word : str
            A word to strip punctuation from

        Returns
        -------
        str
            The word stripped of punctuation

        Examples
        --------
        >>> pe = Synoname()
        >>> pe._synoname_strip_punct('AB;CD EF-GH$IJ')
        'ABCD EFGHIJ'

Return a word with punctuation stripped out .


def Func ( arg_0 , arg_1 , arg_2 ) : if hasattr ( arg_1 , "session" ) and hasattr ( arg_1 , "user" ) and arg_1 . user . is_authenticated ( ) : arg_3 = get_messages ( arg_1 . user ) if arg_3 : for arg_4 , arg_5 in arg_3 : messages . add_message ( arg_1 , arg_5 , arg_4 ) return arg_2

def Func(arg_0, arg_1, arg_2):
        """
        Check for messages for this user and, if it exists,
        call the messages API with it
        """
        if hasattr(arg_1, "session") and hasattr(arg_1, "user") and arg_1.user.is_authenticated():
            arg_3 = get_messages(arg_1.user)
            if arg_3:
                for arg_4, arg_5 in arg_3:
                    messages.add_message(arg_1, arg_5, arg_4)
        return arg_2

Check for messages for this user and if it exists call the messages API with it


(self, upload_token, filename, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : arg_4 = dict ( ) arg_4 [ 'uploadtoken' ] = arg_1 arg_4 [ 'filename' ] = arg_2 try : arg_5 = arg_3 [ 'create_additional_revision' ] except KeyError : arg_5 = False if not arg_5 : arg_4 [ 'revision' ] = 'head' arg_6 = [ 'mode' , 'folderid' , 'item_id' , 'itemid' , 'revision' ] for arg_7 in arg_6 : if arg_7 in arg_3 : if arg_7 == 'item_id' : arg_4 [ 'itemid' ] = arg_3 [ arg_7 ] continue if arg_7 == 'folder_id' : arg_4 [ 'folderid' ] = arg_3 [ arg_7 ] continue arg_4 [ arg_7 ] = arg_3 [ arg_7 ] arg_8 = open ( arg_3 . get ( 'filepath' , arg_2 ) , 'rb' ) arg_4 [ 'length' ] = os . fstat ( arg_8 . fileno ( ) ) . st_size arg_9 = arg_0 . request ( 'midas.upload.perform' , arg_4 , arg_8 ) return arg_9

def Func(arg_0, arg_1, arg_2, **arg_3):
        """
        Upload a file into a given item (or just to the public folder if the
        item is not specified.

        :param upload_token: The upload token (returned by
            generate_upload_token)
        :type upload_token: string
        :param filename: The upload filename. Also used as the path to the
            file, if 'filepath' is not set.
        :type filename: string
        :param mode: (optional) Stream or multipart. Default is stream.
        :type mode: string
        :param folder_id: (optional) The id of the folder to upload into.
        :type folder_id: int | long
        :param item_id: (optional) If set, will append item ``bitstreams`` to
            the latest revision (or the one set using :param:`revision` ) of
            the existing item.
        :type item_id: int | long
        :param revision: (optional) If set, will add a new file into an
            existing revision. Set this to 'head' to add to the most recent
            revision.
        :type revision: string | int | long
        :param filepath: (optional) The path to the file.
        :type filepath: string
        :param create_additional_revision: (optional) If set, will create a
            new revision in the existing item.
        :type create_additional_revision: bool
        :returns: Dictionary containing the details of the item created or
            changed.
        :rtype: dict
        """
        arg_4 = dict()
        arg_4['uploadtoken'] = arg_1
        arg_4['filename'] = arg_2

        try:
            arg_5 = arg_3['create_additional_revision']
        except KeyError:
            arg_5 = False

        if not arg_5:
            arg_4['revision'] = 'head'
        arg_6 = ['mode', 'folderid', 'item_id', 'itemid', 'revision']
        for arg_7 in arg_6:
            if arg_7 in arg_3:
                if arg_7 == 'item_id':
                    arg_4['itemid'] = arg_3[arg_7]
                    continue
                if arg_7 == 'folder_id':
                    arg_4['folderid'] = arg_3[arg_7]
                    continue
                arg_4[arg_7] = arg_3[arg_7]

        # We may want a different name than path
        arg_8 = open(arg_3.get('filepath', arg_2), 'rb')
        # Arcane getting of the file size using fstat. More details can be
        # found in the python library docs
        arg_4['length'] = os.fstat(arg_8.fileno()).st_size

        arg_9 = arg_0.request('midas.upload.perform', arg_4,
                                arg_8)
        return arg_9

Upload a file into a given item ( or just to the public folder if the item is not specified .


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
split
(
' '
)
arg_2
=
len
(
arg_1
)
if
arg_2
==
3
and
arg_1
[
0
]
==
'from'
:
return
[
'import '
]
if
arg_2
<
3
and
(
arg_1
[
0
]
in
[
'import'
,
'from'
]
)
:
if
arg_2
==
1
:
return
get_root_modules
(
)
arg_3
=
arg_1
[
1
]
.
split
(
'.'
)
if
len
(
arg_3
)
<
2
:
return
get_root_modules
(
)
arg_4
=
try_import
(
'.'
.
join
(
arg_3
[
:
1
]
)
,
True
)
return
[
'.'
.
join
(
arg_3
[
:
1
]
+
[
arg_5
]
)
for
arg_5
in
arg_4
]
if
arg_2
>=
3
and
arg_1
[
0
]
==
'from'
:
arg_3
=
arg_1
[
1
]
return
try_import
(
arg_3
)

def Func(arg_0):
    """
    Returns a list containing the completion possibilities for an import line.

    The line looks like this :
    'import xml.d'
    'from xml.dom import'
    """

    arg_1 = arg_0.split(' ')
    arg_2 = len(arg_1)

    # from whatever <tab> -> 'import '
    if arg_2 == 3 and arg_1[0] == 'from':
        return ['import ']

    # 'from xy<tab>' or 'import xy<tab>'
    if arg_2 < 3 and (arg_1[0] in ['import','from']) :
        if arg_2 == 1:
            return get_root_modules()
        arg_3 = arg_1[1].split('.')
        if len(arg_3) < 2:
            return get_root_modules()
        arg_4 = try_import('.'.join(arg_3[:-1]), True)
        return ['.'.join(arg_3[:-1] + [arg_5]) for arg_5 in arg_4]

    # 'from xyz import abc<tab>'
    if arg_2 >= 3 and arg_1[0] == 'from':
        arg_3 = arg_1[1]
        return try_import(arg_3)

Returns a list containing the completion possibilities for an import line .


Retrieve the official version nearest the one given.

def Func(arg_0, arg_1):
        """
        Retrieve the official version Func the one given.
        """
        if not isinstance(arg_1, Version):
            arg_1 = Version(arg_1)

        if arg_1 in OFFICIAL_VERSIONS:
            return arg_1

        # We might not have an exact match for that.
        # See if we have one that's newer than the grid we're looking at.
        arg_2 = list(OFFICIAL_VERSIONS)
        arg_2.sort(reverse=True)
        arg_3 = None
        for arg_4 in arg_2:
            # Due to ambiguities, we might have an exact match and not know it.
            # '2.0' will not hash to the same value as '2.0.0', but both are
            # equivalent.
            if arg_4 == arg_1:
                # We can't beat this, make a note of the match for later
                return arg_4

            # If we have not seen a better candidate, and this is older
            # then we may have to settle for that.
            if (arg_3 is None) and (arg_4 < arg_1):
                warnings.warn('This version of hszinc does not yet '\
                            'support version %s, please seek a newer version '\
                            'or file a bug.  Closest (older) version supported is %s.'\
                            % (arg_1, arg_4))
                return arg_4

            # Probably the best so far, but see if we can go closer
            if arg_4 > arg_1:
                arg_3 = arg_4

        # Unhappy path, no best option?  This should not happen.
        assert arg_3 is not None
        warnings.warn('This version of hszinc does not yet '\
                    'support version %s, please seek a newer version '\
                    'or file a bug.  Closest (newer) version supported is %s.'\
                    % (arg_1, arg_3))
        return arg_3

Retrieve the official version nearest the one given .


def Func ( arg_0 ) : arg_0 . read_queue . put ( QueueClosed ) arg_0 . write_queue . put ( QueueClosed )

def Func(arg_0):
        """Close the queue, signalling that no more data can be put into the queue."""
        arg_0.read_queue.put(QueueClosed)
        arg_0.write_queue.put(QueueClosed)

Close the queue signalling that no more data can be put into the queue .


return ls.is_out_of_image(image, fully=fully, partly=partly)

def Func(arg_0, arg_1, arg_2=True, arg_3=False):
        """
        Estimate whether the polygon is partially or fully outside of the image area.

        Parameters
        ----------
        image : (H,W,...) ndarray or tuple of int
            Image dimensions to use.
            If an ndarray, its shape will be used.
            If a tuple, it is assumed to represent the image shape and must contain at least two integers.

        fully : bool, optional
            Whether to return True if the polygon is fully outside of the image area.

        partly : bool, optional
            Whether to return True if the polygon is at least partially outside fo the image area.

        Returns
        -------
        bool
            True if the polygon is partially/fully outside of the image area, depending
            on defined parameters. False otherwise.

        """
        # TODO this is inconsistent with line strings, which return a default
        #      value in these cases
        if len(arg_0.exterior) == 0:
            raise Exception("Cannot determine whether the polygon is inside the image, because it contains no points.")
        arg_4 = arg_0.to_line_string()
        return arg_4.Func(arg_1, arg_2=arg_2, arg_3=arg_3)

Estimate whether the polygon is partially or fully outside of the image area .


(duration: int, amp: complex, sigma: float, name: str = None)

return _sampled_gaussian_pulse(duration, amp, center, sigma,
                                   zeroed_width=zeroed_width, rescale_amp=True, name=name)

def Func(arg_0: arg_1, arg_2: arg_3, arg_4: arg_5, arg_6: arg_7 = None) -> SamplePulse:
    r"""Generates unnormalized Func `SamplePulse`.

    Centered at `duration/2` and zeroed at `t=-1` to prevent large initial discontinuity.

    Applies `left` sampling strategy to generate discrete pulse from continuous function.

    Integrated area under curve is $\Omega_g(amp, sigma) = amp \times np.sqrt(2\pi \sigma^2)$

    Args:
        duration: Duration of pulse. Must be greater than zero.
        amp: Pulse amplitude at `duration/2`.
        sigma: Width (standard deviation) of pulse.
        name: Name of pulse.
    """
    arg_8 = arg_0/2
    arg_9 = arg_0 + 2
    return _sampled_Func_pulse(arg_0, arg_2, arg_8, arg_4,
                                   arg_9=arg_9, rescale_amp=True, arg_6=arg_6)

r"""Generates unnormalized gaussian `SamplePulse`.

    Centered at `duration/2` and zeroed at `t=-1` to prevent large initial discontinuity.

    Applies `left` sampling strategy to generate discrete pulse from continuous function.

    Integrated area under curve is $\Omega_g(amp, sigma) = amp \times np.sqrt(2\pi \sigma^2)$

    Args:
        duration: Duration of pulse. Must be greater than zero.
        amp: Pulse amplitude at `duration/2`.
        sigma: Width (standard deviation) of pulse.
        name: Name of pulse.

r Generates unnormalized gaussian SamplePulse .


def Func ( arg_0 ) : for arg_1 in arg_0 . objects . itervalues ( ) : if arg_1 . sessionid in arg_0 . sessions : yield arg_1

def Func(arg_0):
        """
        Returns a generator list of tracked objects which are recognized with
        this profile and are in the current session.
        """
        for arg_1 in arg_0.objects.itervalues():
            if arg_1.sessionid in arg_0.sessions:
                yield arg_1

Returns a generator list of tracked objects which are recognized with this profile and are in the current session .


def Func ( arg_0 , arg_1 ) : if arg_1 < arg_0 . minIndex : if arg_1 == arg_0 . minIndex - 1 : arg_0 . bucketMap [ arg_1 ] = arg_0 . _newRepresentation ( arg_0 . minIndex , arg_1 ) arg_0 . minIndex = arg_1 else : arg_0 . Func ( arg_1 + 1 ) arg_0 . Func ( arg_1 ) else : if arg_1 == arg_0 . maxIndex + 1 : arg_0 . bucketMap [ arg_1 ] = arg_0 . _newRepresentation ( arg_0 . maxIndex , arg_1 ) arg_0 . maxIndex = arg_1 else : arg_0 . Func ( arg_1 - 1 ) arg_0 . Func ( arg_1 )

def Func(arg_0, arg_1):
    """
    Create the given bucket index. Recursively create as many in-between
    bucket indices as necessary.
    """
    if arg_1 < arg_0.minIndex:
      if arg_1 == arg_0.minIndex - 1:
        # Create a new representation that has exactly w-1 overlapping bits
        # as the min representation
        arg_0.bucketMap[arg_1] = arg_0._newRepresentation(arg_0.minIndex,
                                                        arg_1)
        arg_0.minIndex = arg_1
      else:
        # Recursively create all the indices above and then this index
        arg_0.Func(arg_1+1)
        arg_0.Func(arg_1)
    else:
      if arg_1 == arg_0.maxIndex + 1:
        # Create a new representation that has exactly w-1 overlapping bits
        # as the max representation
        arg_0.bucketMap[arg_1] = arg_0._newRepresentation(arg_0.maxIndex,
                                                        arg_1)
        arg_0.maxIndex = arg_1
      else:
        # Recursively create all the indices below and then this index
        arg_0.Func(arg_1-1)
        arg_0.Func(arg_1)

Create the given bucket index . Recursively create as many in - between bucket indices as necessary .


def Func ( arg_0 ) : arg_1 = arg_0 . path . split ( PATH_SEP ) arg_2 = [ ] for arg_3 in arg_1 : if '*' in arg_3 or '?' in arg_3 : break arg_2 . append ( arg_3 ) return PATH_SEP . join ( arg_2 )

def Func(arg_0):
    '''Get the fixed part of the path without wildcard'''
    arg_1 = arg_0.path.split(PATH_SEP)
    arg_2 = []
    for arg_3 in arg_1:
      if '*' in arg_3 or '?' in arg_3:
        break
      arg_2.append(arg_3)
    return PATH_SEP.join(arg_2)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ( p [ "x" ] , p [ "y" ] ) for p in arg_1 [ "points" ] ] arg_4 = Polygon ( pen = arg_0 . pen , points = arg_3 , arg_2 = arg_2 ) return arg_4

def Func(arg_0, arg_1, arg_2):
        """ Returns the components of a polygon. """

        arg_3 = [(p["x"], p["y"]) for p in arg_1["points"]]
        arg_4 = Polygon(pen=arg_0.pen, points=arg_3, arg_2=arg_2)

        return arg_4


def Func(arg_0, arg_1, arg_2, arg_3):
        '''Given a single decorated handler function,
        prepare, append desired data to self.registry.
        '''
        arg_4 = arg_0.dump_invoc(*arg_2, **arg_3)
        arg_0.registry.append((arg_4, arg_1.__name__))

Given a single decorated handler function prepare append desired data to self . registry .


def Func ( arg_0 , arg_1 = None ) : arg_2 , arg_3 = yield arg_0 . transport . perform_request ( "GET" , "/_cluster/Func" , arg_1 = arg_1 ) raise gen . Return ( ( arg_2 , arg_3 ) )

def Func(arg_0, arg_1=None):
        """Coroutine. Queries cluster Health API.

        Returns a 2-tuple, where first element is request status, and second
        element is a dictionary with response data.

        :param params: dictionary of query parameters, will be handed over to
            the underlying :class:`~torando_elasticsearch.AsyncHTTPConnection`
            class for serialization

        """
        arg_2, arg_3 = yield arg_0.transport.perform_request(
            "GET", "/_cluster/Func", arg_1=arg_1)
        raise gen.Return((arg_2, arg_3))

Coroutine . Queries cluster Health API .


def Func ( arg_0 , arg_1 ) : arg_0 . PC = Operators . ITEBV ( arg_0 . address_bit_size , Operators . AND ( arg_0 . CF == False , arg_0 . ZF == False ) , arg_1 . read ( ) , arg_0 . PC )

def Func(arg_0, arg_1):
        """
        Jumps short if above.

        :param cpu: current CPU.
        :param target: destination operand.
        """
        arg_0.PC = Operators.ITEBV(arg_0.address_bit_size, Operators.AND(arg_0.CF == False, arg_0.ZF == False), arg_1.read(), arg_0.PC)


def Func ( arg_0 ) : arg_1 = [ ] arg_2 = arg_0 . xpath_ctxt . xpathEval ( "d:identity" ) if arg_2 is not None : for arg_3 in arg_2 : arg_1 . append ( DiscoIdentity ( arg_0 , arg_3 ) ) return arg_1

def Func(arg_0):
        """List the identity objects contained in `self`.

        :return: the list of identities.
        :returntype: `list` of `DiscoIdentity`"""
        arg_1=[]
        arg_2=arg_0.xpath_ctxt.xpathEval("d:identity")
        if arg_2 is not None:
            for arg_3 in arg_2:
                arg_1.append(DiscoIdentity(arg_0,arg_3))
        return arg_1

List the identity objects contained in self .


def Func ( arg_0 , arg_1 = False ) : if not arg_0 . _id or not arg_0 . _origData : return True for arg_2 in arg_0 . FIELDS : arg_3 = object . __getattribute__ ( arg_0 , arg_2 ) if arg_0 . _origData . get ( arg_2 , '' ) != arg_3 : return True if arg_1 is True and issubclass ( arg_2 . __class__ , IRForeignLinkFieldBase ) : if arg_3 . objHasUnsavedChanges ( ) : return True return False

def Func(arg_0, arg_1=False):
		'''
			Func - Check if any unsaved changes are present in this model, or if it has never been saved.

			@param cascadeObjects <bool> default False, if True will check if any foreign linked objects themselves have unsaved changes (recursively).
				Otherwise, will just check if the pk has changed.

			@return <bool> - True if any fields have changed since last fetch, or if never saved. Otherwise, False
		'''
		if not arg_0._id or not arg_0._origData:
			return True

		for arg_2 in arg_0.FIELDS:
			arg_3 = object.__getattribute__(arg_0, arg_2)
			if arg_0._origData.get(arg_2, '') != arg_3:
				return True

			if arg_1 is True and issubclass(arg_2.__class__, IRForeignLinkFieldBase):
				if arg_3.objHasUnsavedChanges():
					return True

		return False

hasUnsavedChanges - Check if any unsaved changes are present in this model, or if it has never been saved.

			@param cascadeObjects <bool> default False, if True will check if any foreign linked objects themselves have unsaved changes (recursively).
				Otherwise, will just check if the pk has changed.

			@return <bool> - True if any fields have changed since last fetch, or if never saved. Otherwise, False

hasUnsavedChanges - Check if any unsaved changes are present in this model or if it has never been saved .


(job_var, interval, status, header,
                  _interval_set=False)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
=
False
)
:
arg_5
=
arg_0
.
status
(
)
arg_6
=
arg_5
.
name
arg_7
=
arg_5
.
value
arg_2
.
value
=
arg_3
%
(
arg_7
)
while
arg_6
not
in
[
'DONE'
,
'CANCELLED'
]
:
time
.
sleep
(
arg_1
)
arg_5
=
arg_0
.
status
(
)
arg_6
=
arg_5
.
name
arg_7
=
arg_5
.
value
if
arg_6
==
'ERROR'
:
break
else
:
if
arg_6
==
'QUEUED'
:
arg_7
+=
' (%s)'
%
arg_0
.
queue_position
(
)
if
not
arg_4
:
arg_1
=
max
(
arg_0
.
queue_position
(
)
,
2
)
else
:
if
not
arg_4
:
arg_1
=
2
arg_2
.
value
=
arg_3
%
(
arg_7
)
arg_2
.
value
=
arg_3
%
(
arg_7
)

def Func(arg_0, arg_1, arg_2, arg_3,
                  arg_4=False):
    """Internal function that updates the status
    of a HTML job monitor.

    Args:
        job_var (BaseJob): The job to keep track of.
        interval (int): The status check interval
        status (widget): HTML ipywidget for output ot screen
        header (str): String representing HTML code for status.
        _interval_set (bool): Was interval set by user?
    """
    arg_5 = arg_0.status()
    arg_6 = arg_5.name
    arg_7 = arg_5.value
    arg_2.value = arg_3 % (arg_7)
    while arg_6 not in ['DONE', 'CANCELLED']:
        time.sleep(arg_1)
        arg_5 = arg_0.status()
        arg_6 = arg_5.name
        arg_7 = arg_5.value
        if arg_6 == 'ERROR':
            break
        else:
            if arg_6 == 'QUEUED':
                arg_7 += ' (%s)' % arg_0.queue_position()
                if not arg_4:
                    arg_1 = max(arg_0.queue_position(), 2)
            else:
                if not arg_4:
                    arg_1 = 2
            arg_2.value = arg_3 % (arg_7)

    arg_2.value = arg_3 % (arg_7)

Internal function that updates the status of a HTML job monitor .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . tostring ( ) with open ( arg_1 , 'w' ) as f : f . Func ( arg_2 )

def Func(arg_0, arg_1):
        """Write the XML job description to a file."""
        arg_2 = arg_0.tostring()
        with open(arg_1, 'w') as f:
            f.Func(arg_2)

Write the XML job description to a file .


def Func(arg_0, arg_1):
    """
    Upload a file or folder to the S3-like service.

    If LOCAL_PATH is a folder, the files and subfolder structure in LOCAL_PATH are copied to REMOTE_PATH.

    If LOCAL_PATH is a file, the REMOTE_PATH file is created with the same contents.
    """
    arg_2 = STORAGES['s3']()
    arg_3 = s3conf.S3Conf(arg_2=arg_2)
    arg_3.Func(arg_1, arg_0)

Upload a file or folder to the S3 - like service .


def Func ( arg_0 ) : arg_1 = arg_0 . _canvas . strokecolor arg_0 . _canvas . strokecolor = None return arg_1

def Func(arg_0):
        ''' Stop applying strokes to new paths.

        :return: stroke color before Func was called.
        '''
        arg_1 = arg_0._canvas.strokecolor
        arg_0._canvas.strokecolor = None
        return arg_1

Stop applying strokes to new paths.

        :return: stroke color before nostroke was called.


def Func(arg_0):
    """
    Get settings from config file.
    """

    if os.path.exists(arg_0.config):
        arg_1 = ConfigParser.ConfigParser()
        try:
            arg_1.read(arg_0.config)
        except Exception, err:
            if not arg_0.quiet:
                sys.stderr.write("ERROR: Config file read {config} error. {err}".format(arg_1=arg_0.config, err=err))
            sys.exit(-1)

        try:
            arg_2 = {
                "secrets": arg_1.get("GOOGLE", "secrets"),
                "credentials": arg_1.get("nagios-notification-google-calendar", "credentials"),
                "start": arg_1.get("nagios-notification-google-calendar", "start"),
                "end": arg_1.get("nagios-notification-google-calendar", "end"),
                "message": arg_1.get("nagios-notification-google-calendar", "message"),
            }
        except ConfigParser.NoOptionError, err:
            if not arg_0.quiet:
                sys.stderr.write("ERROR: Config file missing option error. {err}\n".format(err=err))
            sys.exit(-1)

        # check mandatory config options supplied
        arg_3 = ["secrets", "credentials", "start", "end", "message", ]
        if not all(arg_2[arg_4] for arg_4 in arg_3):
            if not arg_0.quiet:
                sys.stdout.write("Mandatory config option missing\n")
            sys.exit(0)

        return arg_2
    else:
        if not arg_0.quiet:
            sys.stderr.write("ERROR: Config file {config} does not exist\n".format(arg_1=arg_0.config))
        sys.exit(0)


def
Func
(
arg_0
:
arg_1
.
Logger
=
,
arg_3
=
arg_1
.
INFO
)
:
if
arg_0
is
:
arg_0
=
arg_1
.
getLogger
(
"ProgressMonitor"
)
def
listen
(
arg_5
)
:
arg_6
=
"{}: "
.
format
(
arg_5
.
name
)
if
arg_5
.
name
is
not
else
""
arg_7
=
int
(
arg_5
.
progress
*
100
)
arg_8
=
"[{name}{perc:3d}%] {monitor.message}"
.
format
(
**
locals
(
)
)
arg_0
.
log
(
arg_3
,
arg_8
)
return
listen

def Func(arg_0:arg_1.Logger=None, arg_3=arg_1.INFO):
    """Progress Monitor listener that logs all updates to the given logger"""
    if arg_0 is None:
        arg_0 = arg_1.getLogger("ProgressMonitor")
    def listen(arg_5):
        arg_6 = "{}: ".format(arg_5.name) if arg_5.name is not None else ""
        arg_7 = int(arg_5.progress * 100)
        arg_8 = "[{name}{perc:3d}%] {monitor.message}".format(**locals())
        arg_0.log(arg_3, arg_8)
    return listen


return jwt.encode(payload, cert_bytes, algorithm='RS256')

def Func ( arg_0 , arg_1 ) : arg_0 = int ( arg_0 ) with open ( arg_1 , 'rb' ) as f : arg_2 = f . read ( ) arg_3 = datetime . datetime . now ( ) arg_4 = arg_3 + datetime . timedelta ( minutes = 9 ) arg_5 = { 'iat' : int ( arg_3 . timestamp ( ) ) , 'exp' : int ( arg_4 . timestamp ( ) ) , 'iss' : arg_0 } return jwt . encode ( arg_5 , arg_2 , algorithm = 'RS256' )

def Func(arg_0, arg_1):
    """Create a JSON Web Token to authenticate a GitHub Integration or
    installation.

    Parameters
    ----------
    integration_id : `int`
        Integration ID. This is available from the GitHub integration's
        homepage.
    private_key_path : `str`
        Path to the integration's private key (a ``.pem`` file).

    Returns
    -------
    jwt : `bytes`
        JSON Web Token that is good for 9 minutes.

    Notes
    -----
    The JWT is encoded with the RS256 algorithm. It includes a payload with
    fields:

    - ``'iat'``: The current time, as an `int` timestamp.
    - ``'exp'``: Expiration time, as an `int timestamp. The expiration
      time is set of 9 minutes in the future (maximum allowance is 10 minutes).
    - ``'iss'``: The integration ID (`int`).

    For more information, see
    https://developer.github.com/early-access/integrations/authentication/.
    """
    arg_0 = int(arg_0)

    with open(arg_1, 'rb') as f:
        arg_2 = f.read()

    arg_3 = datetime.datetime.now()
    arg_4 = arg_3 + datetime.timedelta(minutes=9)
    arg_5 = {
        # Issued at time
        'iat': int(arg_3.timestamp()),
        # JWT expiration time (10 minute maximum)
        'exp': int(arg_4.timestamp()),
        # Integration's GitHub identifier
        'iss': arg_0
    }

    return jwt.encode(arg_5, arg_2, algorithm='RS256')

Create a JSON Web Token to authenticate a GitHub Integration or installation .


def Func(arg_0, arg_1):
        """add a new handler for heart failure"""
        arg_0.log.debug("heartbeat::new heart failure handler: %s", arg_1)
        arg_0._failure_handlers.add(arg_1)


def Func(arg_0, arg_1, arg_2):
        """check if the module is deprecated"""
        for arg_3 in arg_0.config.deprecated_modules:
            if arg_2 == arg_3 or arg_2.startswith(arg_3 + "."):
                arg_0.add_message("deprecated-module", arg_1=arg_1, args=arg_2)


return os.path.join(cache_path, filename + ".lpyc")

def Func ( arg_0 : arg_1 ) -> arg_1 : arg_2 , arg_3 = os . path . split ( importlib . util . cache_from_source ( arg_0 ) ) arg_4 , arg_5 = os . path . splitext ( arg_3 ) return os . path . join ( arg_2 , arg_4 + ".lpyc" )

def Func(arg_0: arg_1) -> arg_1:
    """Return the path to the cached file for the given path. The original path
    does not have to exist."""
    arg_2, arg_3 = os.path.split(importlib.util.cache_from_source(arg_0))
    arg_4, arg_5 = os.path.splitext(arg_3)
    return os.path.join(arg_2, arg_4 + ".lpyc")

Return the path to the cached file for the given path . The original path does not have to exist .


def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_1 = arg_1 or arg_0 . get_bookmark ( ) . isoformat ( ) arg_2 = arg_2 or ( datetime . datetime . utcnow ( ) . replace ( microsecond = 0 ) . isoformat ( ) ) arg_3 = { } arg_0 . agg_query = Search ( using = arg_0 . client , index = arg_0 . event_index ) . filter ( 'range' , timestamp = { 'gte' : arg_0 . _format_range_dt ( arg_1 ) , 'lte' : arg_0 . _format_range_dt ( arg_2 ) } ) for arg_5 in arg_0 . query_modifiers : arg_0 . agg_query = arg_5 ( arg_0 . agg_query ) arg_6 = arg_0 . agg_query . aggs . bucket ( 'histogram' , 'date_histogram' , field = 'timestamp' , arg_15 = arg_0 . aggregation_interval ) arg_7 = arg_6 . bucket ( 'terms' , 'terms' , field = arg_0 . aggregation_field , size = 0 ) arg_8 = arg_7 . metric ( 'top_hit' , 'top_hits' , size = 1 , sort = { 'timestamp' : 'desc' } ) for arg_9 , ( arg_10 , arg_11 , arg_12 ) in arg_0 . metric_aggregation_fields . items ( ) : arg_7 . metric ( arg_9 , arg_10 , field = arg_11 , ** arg_12 ) arg_13 = arg_0 . agg_query . execute ( ) arg_14 = None for arg_15 in arg_13 . aggregations [ 'histogram' ] . buckets : arg_16 = datetime . datetime . strptime ( arg_15 [ 'key_as_string' ] , '%Y-%m-%dT%H:%M:%S' ) for arg_17 in arg_15 [ 'terms' ] . buckets : arg_3 [ 'timestamp' ] = arg_16 . isoformat ( ) arg_3 [ arg_0 . aggregation_field ] = arg_17 [ 'key' ] arg_3 [ 'count' ] = arg_17 [ 'doc_count' ] if arg_0 . metric_aggregation_fields : for arg_19 in arg_0 . metric_aggregation_fields : arg_3 [ arg_19 ] = arg_17 [ arg_19 ] [ 'value' ] arg_20 = arg_17 . top_hit . hits . hits [ 0 ] [ '_source' ] for arg_21 , arg_22 in arg_0 . copy_fields . items ( ) : if isinstance ( arg_22 , six . string_types ) : arg_3 [ arg_21 ] = arg_20 [ arg_22 ] else : arg_3 [ arg_21 ] = arg_22 ( arg_20 , arg_3 ) arg_14 = 'stats-{0}-{1}' . format ( arg_0 . event , arg_16 . strftime ( arg_0 . index_name_suffix ) ) arg_0 . indices . add ( arg_14 ) yield dict ( _id = '{0}-{1}' . format ( arg_17 [ 'key' ] , arg_16 . strftime ( arg_0 . doc_id_suffix ) ) , _index = arg_14 , _type = arg_0 . aggregation_doc_type , _source = arg_3 ) arg_0 . last_index_written = arg_14

def Func(arg_0, arg_1=None, arg_2=None):
        """Aggregate and return dictionary to be indexed in ES."""
        arg_1 = arg_1 or arg_0.get_bookmark().isoformat()
        arg_2 = arg_2 or (
            datetime.datetime.utcnow().replace(microsecond=0).isoformat())
        arg_3 = {}

        arg_0.agg_query = Search(using=arg_0.client,
                                index=arg_0.event_index).\
            filter('range', timestamp={
                'gte': arg_0._format_range_dt(arg_1),
                'lte': arg_0._format_range_dt(arg_2)})

        # apply query modifiers
        for arg_5 in arg_0.query_modifiers:
            arg_0.agg_query = arg_5(arg_0.agg_query)

        arg_6 = arg_0.agg_query.aggs.bucket(
            'histogram',
            'date_histogram',
            field='timestamp',
            arg_15=arg_0.aggregation_interval
        )
        arg_7 = arg_6.bucket(
            'terms', 'terms', field=arg_0.aggregation_field, size=0
        )
        arg_8 = arg_7.metric(
            'top_hit', 'top_hits', size=1, sort={'timestamp': 'desc'}
        )
        for arg_9, (arg_10, arg_11, arg_12) in arg_0.metric_aggregation_fields.items():
            arg_7.metric(arg_9, arg_10, field=arg_11, **arg_12)

        arg_13 = arg_0.agg_query.execute()
        arg_14 = None
        for arg_15 in arg_13.aggregations['histogram'].buckets:
            arg_16 = datetime.datetime.strptime(
                arg_15['key_as_string'], '%Y-%m-%dT%H:%M:%S')
            for arg_17 in arg_15['terms'].buckets:
                arg_3['timestamp'] = arg_16.isoformat()
                arg_3[arg_0.aggregation_field] = arg_17['key']
                arg_3['count'] = arg_17['doc_count']

                if arg_0.metric_aggregation_fields:
                    for arg_19 in arg_0.metric_aggregation_fields:
                        arg_3[arg_19] = arg_17[arg_19]['value']

                arg_20 = arg_17.top_hit.hits.hits[0]['_source']
                for arg_21, arg_22 in arg_0.copy_fields.items():
                    if isinstance(arg_22, six.string_types):
                        arg_3[arg_21] = arg_20[arg_22]
                    else:
                        arg_3[arg_21] = arg_22(
                            arg_20,
                            arg_3
                        )

                arg_14 = 'stats-{0}-{1}'.\
                             format(arg_0.event,
                                    arg_16.strftime(
                                        arg_0.index_name_suffix))
                arg_0.indices.add(arg_14)
                yield dict(_id='{0}-{1}'.
                           format(arg_17['key'],
                                  arg_16.strftime(
                                      arg_0.doc_id_suffix)),
                           _index=arg_14,
                           _type=arg_0.aggregation_doc_type,
                           _source=arg_3)
        arg_0.last_index_written = arg_14

Aggregate and return dictionary to be indexed in ES .


def Func ( arg_0 , arg_1 , arg_2 ) : if not hasattr ( arg_0 , 'eventList' ) : arg_0 . eventList = deque ( [ ( arg_1 , arg_2 ) ] ) return arg_0 . eventList . append ( ( arg_1 , arg_2 ) )

def Func(arg_0, arg_1, arg_2):
        """Private method to queue events to run.

        Each event in queue is a tuple (event call, args to event call).
        """
        if not hasattr(arg_0, 'eventList'):
            arg_0.eventList = deque([(arg_1, arg_2)])
            return
        arg_0.eventList.append((arg_1, arg_2))


def
Func
(
arg_0
)
:
while
True
:
try
:
return
int
(
input
(
arg_0
)
.
strip
(
)
)
except
ValueError
:
print
(
Colors
.
red
(
"Invalid Input!"
)
)

def Func(arg_0):
        """Gather user input and convert it to an integer

        Will keep trying till the user enters an interger or until they ^C the
        program.
        """
        while True:
            try:
                return int(input(arg_0).strip())
            except ValueError:
                print(Colors.red("Invalid Input!"))


def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_0 . layer_stack . insert ( arg_0 . last_layer ( ) + 1 , arg_1 ) if arg_2 : arg_0 . set_current_layer ( arg_0 . last_layer ( ) ) return None

def Func(arg_0, arg_1, arg_2=True):
        """ Add new mesh layer to the end of the stack

        Args:
            label (str): new label for the mesh layer
            change_layer (bool): change to the newly created layer
        """
        arg_0.layer_stack.insert(arg_0.last_layer() + 1, arg_1)
        if arg_2:
            arg_0.set_current_layer(arg_0.last_layer())
        return None


def
Func
(
arg_0
)
:
arg_1
=
os
.
path
.
dirname
(
arg_0
)
if
arg_1
!=
''
and
not
os
.
path
.
isdir
(
arg_1
)
:
try
:
os
.
makedirs
(
arg_1
)
except
OSError
as
e
:
sys
.
exit
(
'Failed to create directory: {}'
.
format
(
e
)
)

def Func(arg_0):
    """Create a directory if it does not exist."""
    arg_1 = os.path.dirname(arg_0)
    if arg_1 != '' and not os.path.isdir(arg_1):
        try:
            os.makedirs(arg_1)
        except OSError as e:
            sys.exit('Failed to create directory: {}'.format(e))

Create a directory if it does not exist .


def Func ( arg_0 , arg_1 = 0 ) : arg_2 = '\n' + arg_1 * '\t' if len ( arg_0 ) : if not arg_0 . text or not arg_0 . text . strip ( ) : arg_0 . text = arg_2 + '\t' if not arg_0 . tail or not arg_0 . tail . strip ( ) : arg_0 . tail = arg_2 for arg_5 in arg_0 : Func ( arg_5 , arg_1 + 1 ) if not arg_0 . tail or not arg_0 . tail . strip ( ) : arg_0 . tail = arg_2 else : if arg_1 and ( not arg_0 . tail or not arg_0 . tail . strip ( ) ) : arg_0 . tail = arg_2

def Func(arg_0, arg_1=0):
    """Function to pretty print the xml, meaning adding tabs and newlines.

    :param ElementTree.Element el: Current element.
    :param int level: Current level.
    """
    arg_2 = '\n' + arg_1 * '\t'
    if len(arg_0):
        if not arg_0.text or not arg_0.text.strip():
            arg_0.text = arg_2+'\t'
        if not arg_0.tail or not arg_0.tail.strip():
            arg_0.tail = arg_2
        for arg_5 in arg_0:
            Func(arg_5, arg_1+1)
        if not arg_0.tail or not arg_0.tail.strip():
            arg_0.tail = arg_2
    else:
        if arg_1 and (not arg_0.tail or not arg_0.tail.strip()):
            arg_0.tail = arg_2

Function to pretty print the xml meaning adding tabs and newlines .


def Func(arg_0):
  """Decorator function for argument bounds checking.

  This decorator is meant to be used with methods that require the first
  argument to be in the support of the distribution. If `validate_args` is
  `True`, the method is wrapped with an assertion that the first argument is
  greater than or equal to `loc`, since the support of the half-Cauchy
  distribution is given by `[loc, infinity)`.

  Args:
    f: method to be decorated.

  Returns:
    Returns a decorated method that, when `validate_args` attribute of the class
    is `True`, will assert that all elements in the first argument are within
    the support of the distribution before executing the original method.
  """
  @functools.wraps(arg_0)
  def _check_arg_and_apply_f(*arg_1, **arg_2):
    arg_3 = arg_1[0]
    arg_4 = arg_1[1]
    with tf.control_dependencies([
        assert_util.assert_greater_equal(
            arg_4, arg_3.loc, message="x is not in the support of the distribution")
    ] if arg_3.validate_args else []):
      return arg_0(*arg_1, **arg_2)
  return _check_arg_and_apply_f

Decorator function for argument bounds checking .


(self, sql_string, cols, *args, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 , * arg_3 , ** arg_4 ) : arg_5 = None if arg_4 . get ( 'columns' ) is not None : arg_5 = arg_4 . pop ( 'columns' ) arg_6 = arg_0 . _assemble_Func ( arg_1 , arg_2 , * arg_3 , * arg_4 ) return arg_0 . _execute ( arg_6 , arg_5 = arg_5 )

def Func(arg_0, arg_1, arg_2, *arg_3, **arg_4):
        """
        Execute a SELECT statement

        :sql_string:    An SQL string template
        :columns:       A list of columns to be returned by the query
        :*args:         Arguments to be passed for query parameters.
        :returns:       Psycopg2 result
        """
        arg_5 = None
        if arg_4.get('columns') is not None:
            arg_5 = arg_4.pop('columns')
        arg_6 = arg_0._assemble_Func(arg_1, arg_2, *arg_3, *arg_4)
        return arg_0._execute(arg_6, arg_5=arg_5)


def Func(arg_0):
        """Finds the maximum radius and npnp in the force field.

        Returns
        -------
        (max_rad, max_npnp): (float, float)
            Maximum radius and npnp distance in the loaded force field.
        """
        arg_1 = 0
        arg_2 = 0
        for arg_3, arg_4 in arg_0.items():
            if arg_3 != 'KEY':
                for arg_4, arg_5 in arg_0[arg_3].items():
                    if arg_1 < arg_5[1]:
                        arg_1 = arg_5[1]
                    if arg_2 < arg_5[4]:
                        arg_2 = arg_5[4]
        return arg_1, arg_2

Finds the maximum radius and npnp in the force field .


(self, table, target_dir=None, append=False, file_type="text",
                     columns=None, split_by=None, where=None, direct=False,
                     driver=None, extra_import_options=None)

def Func(arg_0, arg_1, arg_2=None, arg_3=False, arg_4="text",
                     arg_5=None, arg_6=None, arg_7=None, arg_8=False,
                     arg_9=None, arg_10=None):
        """
        Imports table from remote location to target dir. Arguments are
        copies of direct sqoop command line arguments

        :param table: Table to read
        :param target_dir: HDFS destination dir
        :param append: Append data to an existing dataset in HDFS
        :param file_type: "avro", "sequence", "text" or "parquet".
            Imports data to into the specified format. Defaults to text.
        :param columns: <col,col,col…> Columns to import from table
        :param split_by: Column of the table used to split work units
        :param where: WHERE clause to use during import
        :param direct: Use direct connector if exists for the database
        :param driver: Manually specify JDBC driver class to use
        :param extra_import_options: Extra import options to pass as dict.
            If a key doesn't have a value, just pass an empty string to it.
            Don't include prefix of -- for sqoop options.
        """
        arg_11 = arg_0._import_cmd(arg_2, arg_3, arg_4, arg_6, arg_8,
                               arg_9, arg_10)

        arg_11 += ["--table", arg_1]

        if arg_5:
            arg_11 += ["--columns", arg_5]
        if arg_7:
            arg_11 += ["--where", arg_7]

        arg_0.Popen(arg_11)

Imports table from remote location to target dir . Arguments are copies of direct sqoop command line arguments


def Func(arg_0):
        """Called by the event loop whenever the fd is ready for reading."""

        try:
            arg_1 = os.read(arg_0._fileno, arg_0.max_size)
        except InterruptedError:
            # No worries ;)
            pass
        except OSError as exc:
            # Some OS-level problem, crash.
            arg_0._fatal_error(exc, "Fatal read error on file descriptor read")
        else:
            if arg_1:
                arg_0._protocol.data_received(arg_1)
            else:
                # We reached end-of-file.
                if arg_0._loop.get_debug():
                    logger.info("%r was closed by the kernel", arg_0)
                arg_0._closing = False
                arg_0.pause_reading()
                arg_0._loop.call_soon(arg_0._protocol.eof_received)
                arg_0._loop.call_soon(arg_0._call_connection_lost, None)

Called by the event loop whenever the fd is ready for reading .


(self, message, channel=None, nick=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
)
:
if
arg_2
:
if
not
arg_2
.
startswith
(
'#'
)
:
arg_2
=
'#%s'
%
arg_2
arg_0
.
send
(
'PRIVMSG %s :%s'
%
(
arg_2
,
arg_1
)
)
elif
arg_3
:
arg_0
.
send
(
'PRIVMSG %s :%s'
%
(
arg_3
,
arg_1
)
)

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """\
        Multipurpose method for sending responses to channel or via message to
        a single user
        """
        if arg_2:
            if not arg_2.startswith('#'):
                arg_2 = '#%s' % arg_2
            arg_0.send('PRIVMSG %s :%s' % (arg_2, arg_1))
        elif arg_3:
            arg_0.send('PRIVMSG %s :%s' % (arg_3, arg_1))


def Func(arg_0, arg_1, arg_2=0):
        """
        Set the internal colors starting at an optional offset.

        If `color_list` is a list or other 1-dimensional array, it is reshaped
        into an N x 3 list.

        If `color_list` too long it is truncated; if it is too short then only
        the initial colors are set.
        """
        if not arg_5(arg_1):
            return
        arg_1 = make.colors(arg_1)

        arg_3 = arg_5(arg_0._colors) - arg_2
        if arg_5(arg_1) > arg_3:
            arg_1 = arg_1[:arg_3]
        arg_0._colors[arg_2:arg_2 + arg_5(arg_1)] = arg_1

Set the internal colors starting at an optional offset .


def Func(arg_0: arg_1) -> list:
	"""Identify strongly connected components then perform a topological sort of those components."""

	assert check_argument_types()

	arg_2 = strongly_connected_components(arg_0)

	arg_3 = {}
	for arg_4 in arg_2:
		for arg_5 in arg_4:
			arg_3[arg_5] = arg_4

	arg_6 = {}
	for arg_4 in arg_2:
		arg_6[arg_4] = []

	for arg_5 in arg_0:
		arg_7 = arg_3[arg_5]
		for arg_8 in arg_0[arg_5]:
			arg_9 = arg_3[arg_8]
			if arg_7 != arg_9:
				arg_6[arg_7].append(arg_9)

	return topological_sort(arg_6)

Identify strongly connected components then perform a topological sort of those components .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = ioloop . IOLoop . instance ( ) arg_4 . add_timeout ( time . time ( ) + 0.1 , arg_0 . enter_eventloop )

def Func(arg_0, arg_1, arg_2, arg_3):
        """schedule call to eventloop from IOLoop"""
        arg_4 = ioloop.IOLoop.instance()
        arg_4.add_timeout(time.time()+0.1, arg_0.enter_eventloop)


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_3
=
arg_0
.
config
.
max_line_length
arg_4
=
arg_0
.
config
.
ignore_long_lines
def
check_line
(
arg_5
,
arg_2
)
:
if
not
arg_5
.
endswith
(
"\n"
)
:
arg_0
.
add_message
(
"missing-final-newline"
,
arg_5
=
arg_2
)
else
:
arg_6
=
arg_5
.
rstrip
(
"\t\n\r\v "
)
if
not
arg_6
and
_EMPTY_LINE
in
arg_0
.
config
.
no_space_check
:
pass
elif
arg_5
[
len
(
arg_6
)
:
]
not
in
(
"\n"
,
"\r\n"
)
:
arg_0
.
add_message
(
"trailing-whitespace"
,
arg_5
=
arg_2
,
col_offset
=
len
(
arg_6
)
)
arg_5
=
arg_6
arg_7
=
OPTION_RGX
.
search
(
arg_5
)
if
arg_7
and
"="
in
arg_5
:
arg_8
,
arg_9
,
arg_10
=
arg_7
.
group
(
1
)
.
partition
(
"="
)
if
arg_8
.
strip
(
)
==
"disable"
:
if
"line-too-long"
in
{
arg_11
.
strip
(
)
for
arg_11
in
arg_10
.
split
(
","
)
}
:
return
arg_5
=
arg_5
.
rsplit
(
"#"
,
1
)
[
0
]
.
rstrip
(
)
if
len
(
arg_5
)
>
arg_3
and
not
arg_4
.
search
(
arg_5
)
:
arg_0
.
add_message
(
"line-too-long"
,
arg_5
=
arg_2
,
args
=
(
len
(
arg_5
)
,
arg_3
)
)
return
arg_2
+
1
arg_12
=
{
"\v"
,
"\x0b"
,
"\f"
,
"\x0c"
,
"\x1c"
,
"\x1d"
,
"\x1e"
,
"\x85"
,
"\u2028"
,
"\u2029"
,
}
arg_13
=
[
]
for
arg_5
in
arg_1
.
splitlines
(
True
)
:
if
arg_5
[
1
]
in
arg_12
:
arg_13
.
append
(
arg_5
)
continue
if
arg_13
:
arg_13
.
append
(
arg_5
)
arg_5
=
""
.
join
(
arg_13
)
arg_13
=
[
]
arg_2
=
check_line
(
arg_5
,
arg_2
)
if
arg_2
is
:
break
if
arg_13
:
check_line
(
""
.
join
(
arg_13
)
,
arg_2
)

def Func(arg_0, arg_1, arg_2):
        """check lines have less than a maximum number of characters
        """
        arg_3 = arg_0.config.max_line_length
        arg_4 = arg_0.config.ignore_long_lines

        def check_line(arg_5, arg_2):
            if not arg_5.endswith("\n"):
                arg_0.add_message("missing-final-newline", arg_5=arg_2)
            else:
                # exclude \f (formfeed) from the rstrip
                arg_6 = arg_5.rstrip("\t\n\r\v ")
                if not arg_6 and _EMPTY_LINE in arg_0.config.no_space_check:
                    # allow empty lines
                    pass
                elif arg_5[len(arg_6) :] not in ("\n", "\r\n"):
                    arg_0.add_message(
                        "trailing-whitespace", arg_5=arg_2, col_offset=len(arg_6)
                    )
                # Don't count excess whitespace in the line length.
                arg_5 = arg_6
            arg_7 = OPTION_RGX.search(arg_5)
            if arg_7 and "=" in arg_5:
                arg_8, arg_9, arg_10 = arg_7.group(1).partition("=")
                if arg_8.strip() == "disable":
                    if "line-too-long" in {
                        arg_11.strip() for arg_11 in arg_10.split(",")
                    }:
                        return None
                    arg_5 = arg_5.rsplit("#", 1)[0].rstrip()

            if len(arg_5) > arg_3 and not arg_4.search(arg_5):
                arg_0.add_message("line-too-long", arg_5=arg_2, args=(len(arg_5), arg_3))
            return arg_2 + 1

        arg_12 = {
            "\v",
            "\x0b",
            "\f",
            "\x0c",
            "\x1c",
            "\x1d",
            "\x1e",
            "\x85",
            "\u2028",
            "\u2029",
        }
        arg_13 = []
        for arg_5 in arg_1.splitlines(True):
            if arg_5[-1] in arg_12:
                arg_13.append(arg_5)
                continue

            if arg_13:
                arg_13.append(arg_5)
                arg_5 = "".join(arg_13)
                arg_13 = []

            arg_2 = check_line(arg_5, arg_2)
            if arg_2 is None:
                break

        if arg_13:
            check_line("".join(arg_13), arg_2)


return min(0.2 * time_elapsed, 0.5 + (1 - real_progress)**0.5)

def Func(arg_0):
        """
        Determine when to query the progress status next.

        This function is used if the external progress function did not return time interval for when it should be
        queried next.
        """
        arg_1 = arg_0._progress_data[-1][0] - arg_0._progress_data[0][0]
        arg_2 = arg_0._get_real_progress()
        return min(0.2 * arg_1, 0.5 + (1 - arg_2)**0.5)

Determine when to query the progress status next .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . split ( ) try : arg_3 = [ i . split ( "nnnn" ) [ 0 ] for i in arg_2 [ 1 : : 2 ] ] arg_4 = [ i . split ( "nnnn" ) [ 1 ] for i in arg_2 [ 1 : : 2 ] ] arg_5 = [ i . rstrip ( "-" ) . lstrip ( "-" ) . count ( "-" ) for i in arg_3 ] arg_6 = [ i . rstrip ( "-" ) . lstrip ( "-" ) . count ( "-" ) for i in arg_4 ] arg_7 = arg_5 + arg_6 if max ( arg_7 ) > arg_1 : return 1 except IndexError : arg_3 = arg_2 [ 1 : : 2 ] arg_7 = [ i . rstrip ( "-" ) . lstrip ( "-" ) . count ( "-" ) for i in arg_3 ] if max ( arg_7 ) > arg_1 : return 1 return 0

def Func(arg_0, arg_1):
    """ checks for too many internal indels in muscle aligned clusters """

    ## make into list
    arg_2 = arg_0.split()

    ## paired or not
    try:
        arg_3 = [i.split("nnnn")[0] for i in arg_2[1::2]]
        arg_4 = [i.split("nnnn")[1] for i in arg_2[1::2]]
        arg_5 = [i.rstrip("-").lstrip("-").count("-") for i in arg_3]
        arg_6 = [i.rstrip("-").lstrip("-").count("-") for i in arg_4]
        arg_7 = arg_5 + arg_6
        if max(arg_7) > arg_1:
            return 1

    except IndexError:
        arg_3 = arg_2[1::2]
        arg_7 = [i.rstrip("-").lstrip("-").count("-") for i in arg_3]
        if max(arg_7) > arg_1:
            return 1

    return 0


(self, start=None, end=None, labelFilter=None)

def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
,
arg_3
=
)
:
if
len
(
arg_0
.
saved_states
)
==
0
:
raise
HTMPredictionModelInvalidRangeError
(
"Invalid supplied range for "
"'Func'. Model has no saved records."
)
arg_4
=
arg_0
.
saved_states
[
0
]
.
ROWID
arg_5
=
0
if
arg_1
is
else
max
(
0
,
arg_1
arg_4
)
arg_6
=
len
(
arg_0
.
saved_states
)
if
arg_2
is
else
max
(
0
,
min
(
len
(
arg_0
.
saved_states
)
,
arg_2
arg_4
)
)
if
arg_6
<=
arg_5
:
raise
HTMPredictionModelInvalidRangeError
(
"Invalid supplied range for "
"'Func'."
,
debugInfo
=
{
'requestRange'
:
{
'startRecordID'
:
arg_1
,
'endRecordID'
:
arg_2
}
,
'clippedRequestRange'
:
{
'startRecordID'
:
arg_5
,
'endRecordID'
:
arg_6
}
,
'validRange'
:
{
'startRecordID'
:
arg_4
,
'endRecordID'
:
arg_0
.
saved_states
[
len
(
arg_0
.
saved_states
)
1
]
.
ROWID
}
,
'numRecordsStored'
:
len
(
arg_0
.
saved_states
)
}
)
arg_7
=
[
]
for
arg_8
in
arg_0
.
saved_states
[
arg_5
:
arg_6
]
:
if
arg_3
is
not
:
if
arg_3
in
arg_8
.
anomalyLabel
:
arg_8
.
anomalyLabel
.
remove
(
arg_3
)
else
:
arg_8
.
anomalyLabel
=
[
]
arg_8
.
setByUser
=
False
arg_7
.
append
(
arg_8
)
arg_0
.
_deleteRecordsFromKNN
(
arg_7
)
arg_0
.
_deleteRangeFromKNN
(
arg_1
,
arg_2
)
for
arg_8
in
arg_0
.
saved_states
[
arg_6
:
]
:
arg_0
.
_updateState
(
arg_8
)
return
{
'status'
:
'success'
}

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
    """
    Remove labels from each record with record ROWID in range from
    start to end, noninclusive of end. Removes all records if labelFilter is
    None, otherwise only removes the labels eqaul to labelFilter.

    This will recalculate all points from end to the last record stored in the
    internal cache of this classifier.
    """

    if len(arg_0.saved_states) == 0:
      raise HTMPredictionModelInvalidRangeError("Invalid supplied range for "
        "'Func'. Model has no saved records.")

    arg_4 = arg_0.saved_states[0].ROWID

    arg_5 = 0 if arg_1 is None else max(0, arg_1 - arg_4)
    arg_6 = len(arg_0.saved_states) if arg_2 is None else \
      max(0, min( len( arg_0.saved_states) , arg_2 - arg_4))

    if arg_6 <= arg_5:
      raise HTMPredictionModelInvalidRangeError("Invalid supplied range for "
        "'Func'.", debugInfo={
          'requestRange': {
            'startRecordID': arg_1,
            'endRecordID': arg_2
          },
          'clippedRequestRange': {
            'startRecordID': arg_5,
            'endRecordID': arg_6
          },
          'validRange': {
            'startRecordID': arg_4,
            'endRecordID': arg_0.saved_states[len(arg_0.saved_states)-1].ROWID
          },
          'numRecordsStored': len(arg_0.saved_states)
        })

    # Remove records within the cache
    arg_7 = []
    for arg_8 in arg_0.saved_states[arg_5:arg_6]:
      if arg_3 is not None:
        if arg_3 in arg_8.anomalyLabel:
          arg_8.anomalyLabel.remove(arg_3)
      else:
        arg_8.anomalyLabel = []
      arg_8.setByUser = False
      arg_7.append(arg_8)
    arg_0._deleteRecordsFromKNN(arg_7)

    # Remove records not in cache
    arg_0._deleteRangeFromKNN(arg_1, arg_2)

    # Recompute [clippedEnd, ...)
    for arg_8 in arg_0.saved_states[arg_6:]:
      arg_0._updateState(arg_8)

    return {'status': 'success'}

Remove labels from each record with record ROWID in range from start to end noninclusive of end . Removes all records if labelFilter is None otherwise only removes the labels eqaul to labelFilter .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 == 0 : return for arg_3 in arg_1 . ancestors ( recurs = False ) : if not arg_0 . show_node ( arg_3 ) : continue yield arg_3

def Func(arg_0, arg_1, arg_2):
        """return ancestor nodes of a class node"""
        if arg_2 == 0:
            return
        for arg_3 in arg_1.ancestors(recurs=False):
            if not arg_0.show_node(arg_3):
                continue
            yield arg_3


(url, file_name, headers=None, show_progress=True)

def Func(arg_0, arg_1, arg_2=None, arg_3=True):
    '''stream to a temporary file, rename on successful completion

        Parameters
        ==========
        file_name: the file name to stream to
        url: the url to stream from
        headers: additional headers to add
    '''

    arg_4, arg_5 = tempfile.mkstemp(prefix=("%s.tmp." % arg_1))
    os.close(arg_4)

    if DISABLE_SSL_CHECK is True:
        bot.warning('Verify of certificates disabled! ::TESTING USE ONLY::')

    arg_6 = not DISABLE_SSL_CHECK
    arg_7 = stream(arg_0, arg_2=arg_2, stream_to=arg_5)
    shutil.move(arg_5, arg_1)
    return arg_1

stream to a temporary file rename on successful completion


(units,
                  n_hidden,
                  seq_lengths=None,
                  n_layers=1,
                  trainable_initial_states=False,
                  name='cudnn_bi_gru',
                  reuse=False)

def Func(arg_0,
                  arg_1,
                  arg_2=None,
                  arg_3=1,
                  arg_4=False,
                  arg_5='cudnn_bi_gru',
                  arg_6=False):
    """ Fast CuDNN Bi-LSTM implementation

    Args:
        units: tf.Tensor with dimensions [B x T x F], where
            B - batch size
            T - number of tokens
            F - features
        n_hidden: dimensionality of hidden state
        seq_lengths: number of tokens in each sample in the batch
        n_layers: number of layers
        trainable_initial_states: whether to create a special trainable variable
            to initialize the hidden states of the network or use just zeros
        name: name of the variable scope to use
        reuse:whether to reuse already initialized variable

    Returns:
        h - all hidden states along T dimension,
            tf.Tensor with dimensionality [B x T x F]
        h_last - last hidden state, tf.Tensor with dimensionality [B x H * 2]
            where H - number of hidden units
        c_last - last cell state, tf.Tensor with dimensionality [B x H * 2]
            where H - number of hidden units
        """
    with tf.variable_scope(arg_5, arg_6=arg_6):
        if arg_2 is None:
            arg_2 = tf.ones([tf.shape(arg_0)[0]], dtype=tf.int32) * tf.shape(arg_0)[1]
        with tf.variable_scope('Forward'):
            arg_7, (arg_8, arg_9) = cudnn_lstm_wrapper(arg_0,
                                                              arg_1,
                                                              arg_3=arg_3,
                                                              arg_4=arg_4,
                                                              arg_2=arg_2)

        with tf.variable_scope('Backward'):
            arg_10 = tf.reverse_sequence(arg_0, arg_2=arg_2, seq_dim=1, batch_dim=0)
            arg_11, (arg_12, arg_13) = cudnn_lstm_wrapper(arg_10,
                                                              arg_1,
                                                              arg_3=arg_3,
                                                              arg_4=arg_4,
                                                              arg_2=arg_2)

            arg_11 = tf.reverse_sequence(arg_11, arg_2=arg_2, seq_dim=1, batch_dim=0)
        return (arg_7, arg_11), ((arg_8, arg_9), (arg_12, arg_13))


def Func(arg_0, arg_1):
        """Write a Credentials to the datastore.

        Args:
            credentials: Credentials, the credentials to store.
        """
        arg_2 = arg_0._model.get_or_insert(arg_0._key_name)
        setattr(arg_2, arg_0._property_name, arg_1)
        arg_2.put()
        if arg_0._cache:
            arg_0._cache.set(arg_0._key_name, arg_1.to_json())


def
Func
(
arg_0
,
arg_1
=
)
:
arg_1
=
arg_1
or
arg_0
debug
(
'stitching '
+
arg_0
+
' to '
+
arg_1
)
arg_2
=
glob
(
_pattern
(
arg_0
,
_field
)
)
arg_3
=
[
attribute
(
field
,
'X'
)
for
field
in
arg_2
]
arg_4
=
[
attribute
(
field
,
'Y'
)
for
field
in
arg_2
]
arg_5
,
arg_6
=
min
(
arg_3
)
,
max
(
arg_3
)
arg_7
,
arg_8
=
min
(
arg_4
)
,
max
(
arg_4
)
arg_9
=
len
(
set
(
arg_3
)
)
arg_10
=
len
(
set
(
arg_4
)
)
arg_11
=
glob
(
_pattern
(
arg_2
[
0
]
,
_image
)
)
arg_12
=
attributes
(
arg_11
[
0
]
)
arg_13
=
[
]
arg_14
=
[
]
for
arg_15
in
arg_11
:
arg_16
=
attribute_as_str
(
arg_15
,
'C'
)
if
arg_16
not
in
arg_13
:
arg_13
.
append
(
arg_16
)
arg_17
=
attribute_as_str
(
arg_15
,
'Z'
)
if
arg_17
not
in
arg_14
:
arg_14
.
append
(
arg_17
)
debug
(
'channels '
+
str
(
arg_13
)
)
debug
(
'z-stacks '
+
str
(
arg_14
)
)
arg_18
,
arg_19
=
os
.
path
.
splitext
(
arg_11
[
1
]
)
if
arg_19
==
'.tif'
:
arg_19
=
'.ome.tif'
arg_20
=
[
]
arg_21
=
[
]
for
arg_22
in
arg_14
:
for
arg_23
in
arg_13
:
arg_24
=
os
.
path
.
join
(
_field
+
'--X{xx}--Y{yy}'
,
_image
+
'--L'
+
arg_12
.
L
+
'--S'
+
arg_12
.
S
+
'--U'
+
arg_12
.
U
+
'--V'
+
arg_12
.
V
+
'--J'
+
arg_12
.
J
+
'--E'
+
arg_12
.
E
+
'--O'
+
arg_12
.
O
+
'--X{xx}--Y{yy}'
+
'--T'
+
arg_12
.
T
+
'--Z'
+
arg_22
+
'--C'
+
arg_23
+
arg_19
)
debug
(
'filenames '
+
arg_24
)
arg_25
=
attributes
(
arg_24
)
.
_asdict
(
)
arg_26
=
'stitched--U{U}--V{V}--C{C}--Z{Z}.png'
.
format
(
**
arg_25
)
arg_27
=
os
.
path
.
join
(
arg_1
,
arg_26
)
debug
(
'output '
+
arg_27
)
arg_21
.
append
(
arg_27
)
if
os
.
path
.
isfile
(
arg_27
)
:
print
(
'leicaexperiment stitched file already'
' exists {}'
.
format
(
arg_27
)
)
continue
arg_20
.
append
(
fijibin
.
macro
.
stitch
(
arg_0
,
arg_24
,
arg_9
,
arg_10
,
output_filename
=
arg_27
,
x_start
=
arg_5
,
y_start
=
arg_7
)
)
return
(
arg_21
,
arg_20
)

def Func(arg_0, arg_1=None):
    """Create fiji-macros for stitching all channels and z-stacks for a well.

    Parameters
    ----------
    path : string
        Well path.
    output_folder : string
        Folder to store images. If not given well path is used.

    Returns
    -------
    output_files, macros : tuple
        Tuple with filenames and macros for stitched well.
    """
    arg_1 = arg_1 or arg_0
    debug('stitching ' + arg_0 + ' to ' + arg_1)

    arg_2 = glob(_pattern(arg_0, _field))

    # assume we have rectangle of fields
    arg_3 = [attribute(field, 'X') for field in arg_2]
    arg_4 = [attribute(field, 'Y') for field in arg_2]
    arg_5, arg_6 = min(arg_3), max(arg_3)
    arg_7, arg_8 = min(arg_4), max(arg_4)
    arg_9 = len(set(arg_3))
    arg_10 = len(set(arg_4))

    # assume all fields are the same
    # and get properties from images in first field
    arg_11 = glob(_pattern(arg_2[0], _image))

    # assume attributes are the same on all images
    arg_12 = attributes(arg_11[0])

    # find all channels and z-stacks
    arg_13 = []
    arg_14 = []
    for arg_15 in arg_11:
        arg_16 = attribute_as_str(arg_15, 'C')
        if arg_16 not in arg_13:
            arg_13.append(arg_16)

        arg_17 = attribute_as_str(arg_15, 'Z')
        if arg_17 not in arg_14:
            arg_14.append(arg_17)

    debug('channels ' + str(arg_13))
    debug('z-stacks ' + str(arg_14))

    # create macro
    arg_18, arg_19 = os.path.splitext(arg_11[-1])
    if arg_19 == '.tif':
        # assume .ome.tif
        arg_19 = '.ome.tif'
    arg_20 = []
    arg_21 = []
    for arg_22 in arg_14:
        for arg_23 in arg_13:
            arg_24 = os.path.join(

                    _field + '--X{xx}--Y{yy}',
                    _image + '--L' + arg_12.L +
                    '--S' + arg_12.S +
                    '--U' + arg_12.U +
                    '--V' + arg_12.V +
                    '--J' + arg_12.J +
                    '--E' + arg_12.E +
                    '--O' + arg_12.O +
                    '--X{xx}--Y{yy}' +
                    '--T' + arg_12.T +
                    '--Z' + arg_22 +
                    '--C' + arg_23 +
                    arg_19)
            debug('filenames ' + arg_24)

            arg_25 = attributes(arg_24)._asdict()
            arg_26 = 'stitched--U{U}--V{V}--C{C}--Z{Z}.png'.format(**arg_25)

            arg_27 = os.path.join(arg_1, arg_26)
            debug('output ' + arg_27)
            arg_21.append(arg_27)
            if os.path.isfile(arg_27):
                # file already exists
                print('leicaexperiment stitched file already'
                      ' exists {}'.format(arg_27))
                continue
            arg_20.append(fijibin.macro.stitch(arg_0, arg_24,
                                  arg_9, arg_10,
                                  output_filename=arg_27,
                                  x_start=arg_5, y_start=arg_7))

    return (arg_21, arg_20)

Create fiji - macros for stitching all channels and z - stacks for a well .


def Func ( arg_0 , * arg_1 , ** arg_2 ) : arg_3 = resolve ( arg_0 ) arg_3 . activate ( ) arg_4 = arg_3 . resolved [ 0 ] arg_4 . Func ( * arg_1 , ** arg_2 )

def Func(arg_0, *arg_1, **arg_2):
    '''Activates and Funces a module

    :param module_name: name of module to Func
    '''

    arg_3 = resolve(arg_0)
    arg_3.activate()
    arg_4 = arg_3.resolved[0]
    arg_4.Func(*arg_1, **arg_2)

Activates and launches a module

    :param module_name: name of module to launch


def Func ( arg_0 , arg_1 , arg_2 ) : with atomic_write ( os . fsencode ( str ( arg_0 ) ) ) as temp_file : with open ( os . fsencode ( str ( arg_0 ) ) ) as products_file : arg_3 = json . load ( products_file ) if 'products' in arg_3 [ - 1 ] : [ arg_3 [ arg_4 ] [ "products" ] [ 0 ] . update ( arg_1 ) for ( arg_4 , arg_5 ) in enumerate ( arg_3 ) if arg_5 [ "uuid" ] == str ( arg_2 ) ] else : [ arg_3 [ arg_4 ] . update ( arg_1 ) for ( arg_4 , arg_5 ) in enumerate ( arg_3 ) if arg_5 [ "uuid" ] == str ( arg_2 ) ] json . dump ( arg_3 , temp_file ) return True

def Func(arg_0, arg_1, arg_2):
    """
    Update entry by UUID in the JSON file
    """
    with atomic_write(os.fsencode(str(arg_0))) as temp_file:
        with open(os.fsencode(str(arg_0))) as products_file:
            # load the JSON data into memory
            arg_3 = json.load(products_file)
        # apply modifications to the JSON data wrt UUID
        # TODO: handle this in a neat way
        if 'products' in arg_3[-1]:
            # handle orders object
            [arg_3[arg_4]["products"][0].update(arg_1) for (
                arg_4, arg_5) in enumerate(arg_3) if arg_5["uuid"] == str(arg_2)]
        else:
            # handle products object
            [arg_3[arg_4].update(arg_1) for (arg_4, arg_5) in enumerate(
                arg_3) if arg_5["uuid"] == str(arg_2)]
        # save the modified JSON data into the temp file
        json.dump(arg_3, temp_file)
        return True


(self, url, month_format='%b', day_format='%d')

def Func(arg_0, arg_1, arg_2='%b', arg_3='%d'):
        """
        Parses the date from a url and uses it in the query.  For objects which
        are unique for date.
        """
        arg_4 = arg_0.get_params(arg_1)
        try:
            arg_5 = arg_4[arg_0._meta.year_part]
            arg_6 = arg_4[arg_0._meta.month_part]
            arg_7 = arg_4[arg_0._meta.day_part]
        except KeyError:
            try:
                # named lookups failed, so try to get the date using the first
                # three parameters
                arg_5, arg_6, arg_7 = arg_4['_0'], arg_4['_1'], arg_4['_2']
            except KeyError:
                raise OEmbedException('Error extracting date from url parameters')

        try:
            arg_8 = time.strptime('%s-%s-%s' % (arg_5, arg_6, arg_7),
                               '%s-%s-%s' % ('%Y', arg_2, arg_3))
            arg_9 = datetime.date(*arg_8[:3])
        except ValueError:
            raise OEmbedException('Error parsing date from: %s' % arg_1)

        # apply the date-specific lookups
        if isinstance(arg_0._meta.model._meta.get_field(arg_0._meta.date_field), DateTimeField):
            arg_10 = datetime.datetime.combine(arg_9, datetime.time.min)
            arg_11 = datetime.datetime.combine(arg_9, datetime.time.max)
            arg_12 = {'%s__range' % arg_0._meta.date_field: (arg_10, arg_11)}
        else:
            arg_12 = {arg_0._meta.date_field: arg_9}

        # apply the regular search lookups
        for arg_13, arg_14 in arg_0._meta.fields_to_match.iteritems():
            try:
                arg_12[arg_14] = arg_4[arg_13]
            except KeyError:
                raise OEmbedException('%s was not found in the urlpattern parameters.  Valid names are: %s' % (arg_13, ', '.join(arg_4.keys())))

        try:
            arg_15 = arg_0.get_queryset().get(**arg_12)
        except arg_0._meta.model.DoesNotExist:
            raise OEmbedException('Requested object not found')

        return arg_15

Parses the date from a url and uses it in the query . For objects which are unique for date .


return _estimate_work_lua(conn, [index], [start, '(' + end], force_eval=True)

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 . endswith ( ':idx' ) : arg_3 = [ ] if not arg_2 else list ( arg_2 ) if arg_3 : arg_3 [ 0 ] = '-inf' if arg_3 [ 0 ] is None else repr ( float ( arg_3 [ 0 ] ) ) arg_3 [ 1 ] = 'inf' if arg_3 [ 1 ] is None else repr ( float ( arg_3 [ 1 ] ) ) return _Func ( arg_0 , [ arg_1 ] , arg_3 , force_eval = True ) elif arg_1 . endswith ( ':geo' ) : return _Func ( arg_0 , [ arg_1 ] , filter ( None , [ arg_2 ] ) , force_eval = True ) arg_4 , arg_5 = _start_end ( arg_2 ) return _Func ( arg_0 , [ arg_1 ] , [ arg_4 , '(' + arg_5 ] , force_eval = True )

def Func(arg_0, arg_1, arg_2):
    '''
    Estimates the total work necessary to calculate the prefix match over the
    given index with the provided prefix.
    '''
    if arg_1.endswith(':idx'):
        arg_3 = [] if not arg_2 else list(arg_2)
        if arg_3:
            arg_3[0] = '-inf' if arg_3[0] is None else repr(float(arg_3[0]))
            arg_3[1] = 'inf' if arg_3[1] is None else repr(float(arg_3[1]))
        return _Func(arg_0, [arg_1], arg_3, force_eval=True)
    elif arg_1.endswith(':geo'):
        return _Func(arg_0, [arg_1], filter(None, [arg_2]), force_eval=True)

    arg_4, arg_5 = _start_end(arg_2)
    return _Func(arg_0, [arg_1], [arg_4, '(' + arg_5], force_eval=True)

Estimates the total work necessary to calculate the prefix match over the given index with the provided prefix .


def Func(arg_0, arg_1):
    """ Generates the ClientJobs database name for the given version of the
    database

    Parameters:
    ----------------------------------------------------------------
    dbVersion:      ClientJobs database version number

    retval:         the ClientJobs database name for the given DB version
    """

    # DB Name prefix for the given version
    arg_2 = arg_0.__getDBNamePrefixForVersion(arg_1)

    # DB Name suffix
    arg_3 = Configuration.get('nupic.cluster.database.nameSuffix')

    # Replace dash and dot with underscore (e.g. 'ec2-user' or ec2.user will break SQL)
    arg_3 = arg_3.replace("-", "_")
    arg_3 = arg_3.replace(".", "_")

    # Create the name of the database for the given DB version
    arg_4 = '%s_%s' % (arg_2, arg_3)

    return arg_4


def
Func
(
arg_0
,
arg_1
,
**
arg_2
)
:
raise
NotImplementedError
(
'Not implemented in {cls}.'
.
format
(
cls
=
type
(
arg_0
)
.
__name__
)
,
)

def Func(arg_0, arg_1, **arg_2):
        # type: (dict, dict) -> dict
        """
        Sends an API request to the node.

        :param payload:
            JSON payload.

        :param kwargs:
            Additional keyword arguments for the adapter.

        :return:
            Decoded response from the node.

        :raise:
            - :py:class:`BadApiResponse` if a non-success response was
              received.
        """
        raise NotImplementedError(
            'Not implemented in {cls}.'.format(cls=type(arg_0).__name__),
        )


return initial_epoch, interval_length, coefficients

def Func(arg_0):
        """Map the coefficients into memory using a NumPy array.

        """
        if arg_0.data_type == 2:
            arg_1 = 3
        else:
            raise ValueError('only binary PCK data type 2 is supported')

        arg_2, arg_3, arg_4, arg_5 = arg_0.daf.read_array(arg_0.end_i - 3, arg_0.end_i)
        arg_6 = jd(arg_2)
        arg_7 = arg_3 / S_PER_DAY
        arg_8 = int(arg_4 - 2) // arg_1
        arg_9 = arg_0.daf.map_array(arg_0.start_i, arg_0.end_i - 4)

        arg_9.shape = (int(arg_5), int(arg_4))
        arg_9 = arg_9[:,2:]  # ignore MID and RADIUS elements
        arg_9.shape = (int(arg_5), arg_1, arg_8)
        arg_9 = rollaxis(arg_9, 1)
        return arg_6, arg_7, arg_9

Map the coefficients into memory using a NumPy array .


def Func ( arg_0 , arg_1 ) : arg_1 . config . setdefault ( 'REDIS_URLS' , { 'main' : 'redis://localhost:6379/0' , 'admin' : 'redis://localhost:6379/1' , } ) arg_1 . before_request ( arg_0 . before_request ) arg_0 . app = arg_1

def Func(arg_0, arg_1):
        """
        Used to initialize redis with app object
        """

        arg_1.config.setdefault('REDIS_URLS', {
            'main': 'redis://localhost:6379/0',
            'admin': 'redis://localhost:6379/1',
        })

        arg_1.before_request(arg_0.before_request)

        arg_0.app = arg_1


return re.sub(r"optlang.|.interface", "", interface)

def Func ( arg_0 ) : if isinstance ( arg_0 , ModuleType ) : arg_0 = arg_0 . __name__ return re . sub ( r"optlang.|.interface" , "" , arg_0 )

def Func(arg_0):
    """Give a string representation for an optlang interface.

    Parameters
    ----------
    interface : string, ModuleType
        Full name of the interface in optlang or cobra representation.
        For instance 'optlang.glpk_interface' or 'optlang-glpk'.

    Returns
    -------
    string
       The name of the interface as a string
    """
    if isinstance(arg_0, ModuleType):
        arg_0 = arg_0.__name__
    return re.sub(r"optlang.|.interface", "", arg_0)

Give a string representation for an optlang interface .


def Func(arg_0) -> None:
        """Check the consistency of msgid.

        msg ids for a checker should be a string of len 4, where the two first
        characters are the checker id and the two last the msg id in this
        checker.

        :raises InvalidMessageError: If the checker id in the messages are not
        always the same. """
        arg_1 = None
        arg_2 = []
        for arg_3 in arg_0.messages:
            if arg_1 is not None and arg_1 != arg_3.msgid[1:3]:
                arg_4 = "Inconsistent checker part in message id "
                arg_4 += "'{}' (expected 'x{checker_id}xx' ".format(
                    arg_3.msgid, arg_1=arg_1
                )
                arg_4 += "because we already had {existing_ids}).".format(
                    arg_2=arg_2
                )
                raise InvalidMessageError(arg_4)
            arg_1 = arg_3.msgid[1:3]
            arg_2.append(arg_3.msgid)


return 0.5 * (self.window[0] + self.window[1] +
                      c * (self.window[1] - self.window[0]))

def Func ( arg_0 , arg_1 ) : return 0.5 * ( arg_0 . window [ 0 ] + arg_0 . window [ 1 ] + arg_1 * ( arg_0 . window [ 1 ] - arg_0 . window [ 0 ] ) )

def Func(arg_0, arg_1):
        """ Convert cheb coordinates to windowdow coordinates """
        return 0.5 * (arg_0.window[0] + arg_0.window[1] +
                      arg_1 * (arg_0.window[1] - arg_0.window[0]))


def Func ( arg_0 ) : arg_0 = np . asarray ( arg_0 ) return arg_0 / np . sqrt ( 8 * np . log ( 2 ) )

def Func(arg_0):
    """Convert a FWHM value to sigma in a Gaussian kernel.

    Parameters
    ----------
    fwhm: float or numpy.array
       fwhm value or values

    Returns
    -------
    fwhm: float or numpy.array
       sigma values
    """
    arg_0 = np.asarray(arg_0)
    return arg_0 / np.sqrt(8 * np.log(2))

Convert a FWHM value to sigma in a Gaussian kernel .


(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
.
off
(
arg_2
,
arg_1
)
except
:
warnings
.
warn
(
"filt.off 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 off 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.off(arg_2, arg_1)
            except:
                warnings.warn("filt.off failure in sample " + arg_6)

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

Turns data filters off for particular analytes and samples .


def
Func
(
arg_0
)
->
Set
[
BaseEntity
]
:
arg_1
=
set
(
arg_0
.
iter_leaves
(
)
)
if
not
arg_1
:
log
.
warning
(
'no leaves.'
)
return
set
(
)
for
arg_2
in
arg_1
:
arg_0
.
graph
.
nodes
[
arg_2
]
[
arg_0
.
tag
]
=
arg_0
.
calculate_score
(
arg_2
)
log
.
log
(
5
,
'chomping %s'
,
arg_2
)
return
arg_1

def Func(arg_0) -> Set[BaseEntity]:
        """Calculate the score for all leaves.

        :return: The set of leaf nodes that were scored
        """
        arg_1 = set(arg_0.iter_leaves())

        if not arg_1:
            log.warning('no leaves.')
            return set()

        for arg_2 in arg_1:
            arg_0.graph.nodes[arg_2][arg_0.tag] = arg_0.calculate_score(arg_2)
            log.log(5, 'chomping %s', arg_2)

        return arg_1


def Func(arg_0, arg_1=False):
        """
        Display Func information about the frame.

        Summary includes min/mean/max/sigma and other rollup data.

        :param bool return_data: Return a dictionary of the Func output
        """
        if not arg_0._has_content():
            print("This H2OFrame is empty and not initialized.")
            return arg_0._ex._cache._data;
        if not arg_0._ex._cache.is_valid(): arg_0._frame()._ex._cache.fill()
        if not arg_1:
            if arg_0.nrows == 0:
                print("This H2OFrame is empty.")
            elif H2ODisplay._in_ipy():
                import IPython.display
                IPython.display.display_html(arg_0._ex._cache._tabulate("html", True), raw=True)
            else:
                print(arg_0._ex._cache._tabulate("simple", True))
        else:
            return arg_0._ex._cache._data

Display summary information about the frame.

        Summary includes min/mean/max/sigma and other rollup data.

        :param bool return_data: Return a dictionary of the summary output

Display summary information about the frame .


(self, filename, resolve='exception', force=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
'exception'
,
arg_3
=
)
:
def
_warn
(
arg_4
)
:
arg_5
=
"File {0!r} already exists."
.
format
(
arg_4
)
logger
.
warn
(
arg_5
)
warnings
.
warn
(
arg_5
)
return
True
def
_raise
(
arg_4
)
:
arg_5
=
"File {0!r} already exists."
.
format
(
arg_4
)
logger
.
error
(
arg_5
)
raise
IOError
(
errno
.
EEXIST
,
arg_4
,
arg_5
)
arg_6
=
{
'ignore'
:
lambda
arg_4
:
False
,
'indicate'
:
lambda
arg_4
:
True
,
'warn'
:
_warn
,
'warning'
:
_warn
,
'exception'
:
_raise
,
'raise'
:
_raise
,
}
if
arg_3
is
True
:
arg_2
=
'ignore'
elif
arg_3
is
False
:
arg_2
=
'exception'
if
not
os
.
path
.
isfile
(
arg_1
)
:
return
False
else
:
return
arg_6
[
arg_2
]
(
arg_1
)

def Func(arg_0, arg_1, arg_2='exception', arg_3=None):
        """If a file exists then continue with the action specified in ``resolve``.

        ``resolve`` must be one of

        "ignore"
              always return ``False``
        "indicate"
              return ``True`` if it exists
        "warn"
              indicate and issue a :exc:`UserWarning`
        "exception"
              raise :exc:`IOError` if it exists

        Alternatively, set *force* for the following behaviour (which
        ignores *resolve*):

        ``True``
              same as *resolve* = "ignore" (will allow overwriting of files)
        ``False``
              same as *resolve* = "exception" (will prevent overwriting of files)
        ``None``
              ignored, do whatever *resolve* says
        """
        def _warn(arg_4):
            arg_5 = "File {0!r} already exists.".format(arg_4)
            logger.warn(arg_5)
            warnings.warn(arg_5)
            return True
        def _raise(arg_4):
            arg_5 = "File {0!r} already exists.".format(arg_4)
            logger.error(arg_5)
            raise IOError(errno.EEXIST, arg_4, arg_5)
        arg_6 = {'ignore': lambda arg_4: False,      # file exists, but we pretend that it doesn't
                     'indicate': lambda arg_4: True,     # yes, file exists
                     'warn': _warn,
                     'warning': _warn,
                     'exception': _raise,
                     'raise': _raise,
                     }

        if arg_3 is True:
            arg_2 = 'ignore'
        elif arg_3 is False:
            arg_2 = 'exception'

        if not os.path.isfile(arg_1):
            return False
        else:
            return arg_6[arg_2](arg_1)

If a file exists then continue with the action specified in resolve .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = arg_0 . _retry_codes arg_6 = arg_0 . _session . request ( arg_1 , arg_2 , ** arg_3 ) try : arg_6 . raise_for_status ( ) except HTTPError as http_error : if arg_6 . status_code in arg_5 and arg_4 > 0 : raise RetryException ( ) if 'code' in arg_6 . text : arg_7 = arg_6 . json ( ) if 'code' in arg_7 : raise APIError ( arg_7 , http_error ) else : raise if arg_6 . text != '' : return arg_6 . json ( ) return None

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        '''
        Perform one request, possibly raising RetryException in the case
        the response is 429. Otherwise, if error text contain "code" string,
        then it decodes to json object and returns APIError.
        Returns the body json in the 200 status.
        '''
        arg_5 = arg_0._retry_codes
        arg_6 = arg_0._session.request(arg_1, arg_2, **arg_3)
        try:
            arg_6.raise_for_status()
        except HTTPError as http_error:
            # retry if we hit Rate Limit
            if arg_6.status_code in arg_5 and arg_4 > 0:
                raise RetryException()
            if 'code' in arg_6.text:
                arg_7 = arg_6.json()
                if 'code' in arg_7:
                    raise APIError(arg_7, http_error)
            else:
                raise
        if arg_6.text != '':
            return arg_6.json()
        return None

Perform one request possibly raising RetryException in the case the response is 429 . Otherwise if error text contain code string then it decodes to json object and returns APIError . Returns the body json in the 200 status .


async def Func ( arg_0 ) : arg_0 = arg_0 . find_all ( 'td' , class_ = 'tc1' ) arg_1 = [ ] for arg_2 in arg_0 [ 1 : ] : arg_1 . append ( { 'name' : arg_2 . string , 'id' : arg_2 . a . get ( 'href' ) [ 1 : ] } ) return arg_1

async def Func(arg_0):
    """
    Parse Visual Novel search pages.

    :param soup: The BS4 class object
    :return:  A list of dictionaries containing a name and id.
    """
    arg_0 = arg_0.find_all('td', class_='tc1')
    arg_1 = []
    for arg_2 in arg_0[1:]:
        arg_1.append({'name': arg_2.string, 'id': arg_2.a.get('href')[1:]})
    return arg_1


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = None for arg_5 in arg_3 : if 'bucket' in arg_5 : arg_4 = arg_5 [ 'bucket' ] break if arg_4 is None : arg_6 = Bucket . create ( ) BucketTag . create ( arg_6 , 'record' , str ( arg_1 . id ) ) arg_4 = str ( arg_6 . id ) db . session . commit ( ) else : arg_6 = Bucket . get ( arg_4 ) arg_1 [ '_files' ] = [ ] for arg_7 , arg_8 in arg_2 . items ( ) : arg_9 = arg_0 . create_file ( arg_6 , arg_7 , arg_8 ) arg_10 = splitext ( arg_9 . key ) [ 1 ] . lower ( ) if arg_10 . startswith ( '.' ) : arg_10 = arg_10 [ 1 : ] arg_1 [ '_files' ] . append ( dict ( bucket = str ( arg_9 . bucket . id ) , arg_7 = arg_9 . key , version_id = str ( arg_9 . version_id ) , size = arg_9 . file . size , checksum = arg_9 . file . checksum , type = arg_10 , ) ) db . session . add ( RecordsBuckets ( record_id = arg_1 . id , bucket_id = arg_6 . id ) ) arg_1 . commit ( ) db . session . commit ( ) return [ arg_6 ]

def Func(arg_0, arg_1, arg_2, arg_3):
        """Create files.

        This method is currently limited to a single bucket per record.
        """
        arg_4 = None
        # Look for bucket id in existing files.
        for arg_5 in arg_3:
            if 'bucket' in arg_5:
                arg_4 = arg_5['bucket']
                break

        # Create a bucket in default location if none is found.
        if arg_4 is None:
            arg_6 = Bucket.create()
            BucketTag.create(arg_6, 'record', str(arg_1.id))
            arg_4 = str(arg_6.id)
            db.session.commit()
        else:
            arg_6 = Bucket.get(arg_4)

        arg_1['_files'] = []
        for arg_7, arg_8 in arg_2.items():
            arg_9 = arg_0.create_file(arg_6, arg_7, arg_8)
            arg_10 = splitext(arg_9.key)[1].lower()
            if arg_10.startswith('.'):
                arg_10 = arg_10[1:]
            arg_1['_files'].append(dict(
                bucket=str(arg_9.bucket.id),
                arg_7=arg_9.key,
                version_id=str(arg_9.version_id),
                size=arg_9.file.size,
                checksum=arg_9.file.checksum,
                type=arg_10,
            ))
        db.session.add(
            RecordsBuckets(record_id=arg_1.id, bucket_id=arg_6.id)
        )
        arg_1.commit()
        db.session.commit()

        return [arg_6]


def Func(arg_0, arg_1):
        """Retrieves a class for managing input for an upload based on file type

        :type transfer_future: s3transfer.futures.TransferFuture
        :param transfer_future: The transfer future for the request

        :rtype: class of UploadInputManager
        :returns: The appropriate class to use for managing a specific type of
            input for uploads.
        """
        arg_2 = [
            UploadFilenameInputManager,
            UploadSeekableInputManager,
            UploadNonSeekableInputManager
        ]

        arg_3 = arg_1.meta.call_args.fileobj
        for arg_4 in arg_2:
            if arg_4.is_compatible(arg_3):
                return arg_4
        raise RuntimeError(
            'Input %s of type: %s is not supported.' % (
                arg_3, type(arg_3)))


def Func(arg_0, arg_1):
		'''
			Func - Create a class of this model which will use an alternate connection than the one specified by REDIS_CONNECTION_PARAMS on this model.

			@param redisConnectionParams <dict> - Dictionary of arguments to redis.Redis, same as REDIS_CONNECTION_PARAMS.

			@return - A class that can be used in all the same ways as the existing IndexedRedisModel, but that connects to a different instance.

			  The fields and key will be the same here, but the connection will be different. use #copyModel if you want an independent class for the model
		'''
		if not isinstance(arg_1, dict):
			raise ValueError('redisConnectionParams must be a dictionary!')

		arg_2 = hashDictOneLevel(arg_1)

		arg_3 = copy.deepcopy(dict(arg_0.__dict__))
		arg_3['REDIS_CONNECTION_PARAMS'] = arg_1

		arg_4 = type('AltConnect' + arg_0.__name__ + str(arg_2), arg_0.__bases__, arg_3)

		return arg_4

connectAlt - Create a class of this model which will use an alternate connection than the one specified by REDIS_CONNECTION_PARAMS on this model.

			@param redisConnectionParams <dict> - Dictionary of arguments to redis.Redis, same as REDIS_CONNECTION_PARAMS.

			@return - A class that can be used in all the same ways as the existing IndexedRedisModel, but that connects to a different instance.

			  The fields and key will be the same here, but the connection will be different. use #copyModel if you want an independent class for the model

connectAlt - Create a class of this model which will use an alternate connection than the one specified by REDIS_CONNECTION_PARAMS on this model .


def Func ( ** arg_0 ) : def wrap ( arg_1 ) : arg_1 . func_globals [ 'Func' ] = arg_1 arg_1 . __dict__ . update ( arg_0 ) return arg_1 return wrap

def Func(**arg_0):
    """ USE carefully ^^ """
    def wrap(arg_1):
        arg_1.func_globals['Func'] = arg_1
        arg_1.__dict__.update(arg_0)
        return arg_1
    return wrap


def Func ( arg_0 , arg_1 ) : arg_2 = os . path . join ( os . path . dirname ( __file__ ) , '../data/githubv4' , arg_1 + '.graphql' ) with open ( arg_2 ) as f : arg_3 = f . read ( ) return arg_0 ( arg_3 , name = arg_1 )

def Func(arg_0, arg_1):
        """Load a pre-made query.

        These queries are distributed with lsstprojectmeta. See
        :file:`lsstrojectmeta/data/githubv4/README.rst` inside the
        package repository for details on available queries.

        Parameters
        ----------
        query_name : `str`
            Name of the query, such as ``'technote_repo'``.

        Returns
        -------
        github_query : `GitHubQuery
            A GitHub query or mutation object that you can pass to
            `github_request` to execute the request itself.
        """
        arg_2 = os.path.join(
            os.path.dirname(__file__),
            '../data/githubv4',
            arg_1 + '.graphql')

        with open(arg_2) as f:
            arg_3 = f.read()

        return arg_0(arg_3, name=arg_1)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . __getHyperSearchJobIDFilePath ( arg_1 = arg_1 , arg_2 = arg_2 ) arg_4 = None with open ( arg_3 , "r" ) as jobIdPickleFile : arg_5 = pickle . load ( jobIdPickleFile ) arg_4 = arg_5 [ "hyperSearchJobID" ] return arg_4

def Func(arg_0, arg_1, arg_2):
    """Loads a saved jobID from file

    Parameters:
    ----------------------------------------------------------------------
    permWorkDir:  Directory path for saved jobID file
    outputLabel:  Label string for incorporating into file name for saved jobID
    retval:       HyperSearch jobID; raises exception if not found.
    """
    arg_3 = arg_0.__getHyperSearchJobIDFilePath(arg_1=arg_1,
                                                 arg_2=arg_2)

    arg_4 = None
    with open(arg_3, "r") as jobIdPickleFile:
      arg_5 = pickle.load(jobIdPickleFile)
      arg_4 = arg_5["hyperSearchJobID"]

    return arg_4


return isinstance(self.callback, (Callable, classmethod))

def Func ( arg_0 ) : if arg_0 . is_instance ( ) or arg_0 . is_class ( ) : return False return isinstance ( arg_0 . callback , ( Callable , classmethod ) )

def Func(arg_0):
        """return True if callback is a vanilla plain jane function"""
        if arg_0.is_instance() or arg_0.is_class(): return False
        return isinstance(arg_0.callback, (Callable, classmethod))


(self, morfs=None, directory=None, ignore_errors=None,
                    omit=None, include=None)

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None,
                    arg_4=None, arg_5=None):
        """Annotate a list of modules.

        Each module in `morfs` is Funcd.  The source is written to a new
        file, named with a ",cover" suffix, with each line prefixed with a
        marker to indicate the coverage of the line.  Covered lines have ">",
        excluded lines have "-", and missing lines have "!".

        See `coverage.report()` for other arguments.

        """
        arg_0._harvest_data()
        arg_0.config.from_args(
            arg_3=arg_3, arg_4=arg_4, arg_5=arg_5
            )
        arg_6 = AnnotateReporter(arg_0, arg_0.config)
        arg_6.report(arg_1, arg_2=arg_2)

Annotate a list of modules.

        Each module in `morfs` is annotated.  The source is written to a new
        file, named with a ",cover" suffix, with each line prefixed with a
        marker to indicate the coverage of the line.  Covered lines have ">",
        excluded lines have "-", and missing lines have "!".

        See `coverage.report()` for other arguments.


(self, parent_node, name, type_name, instance=None, constructor=None,
                          args=None, kwargs=None)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None, arg_5=None,
                          arg_6=None, arg_7=None):
        """Generically creates a new group inferring from the `type_name`."""

        if arg_6 is None:
            arg_6 = []

        if arg_7 is None:
            arg_7 = {}

        arg_8 = arg_0._make_full_name(arg_1.v_full_name, arg_2)

        if arg_4 is None:
            if arg_5 is None:
                if arg_3 == RESULT_GROUP:
                    arg_5 = ResultGroup
                elif arg_3 == PARAMETER_GROUP:
                    arg_5 = ParameterGroup
                elif arg_3 == CONFIG_GROUP:
                    arg_5 = ConfigGroup
                elif arg_3 == DERIVED_PARAMETER_GROUP:
                    arg_5 = DerivedParameterGroup
                elif arg_3 == GROUP:
                    arg_5 = NNGroupNode
                else:
                    raise RuntimeError('You shall not pass!')
            arg_4 = arg_0._root_instance._construct_instance(arg_5, arg_8,
                                                               *arg_6, **arg_7)
        else:
            arg_4._rename(arg_8)
            # Check if someone tries to add a particular standard group to a branch where
            # it does not belong:
            if arg_3 == RESULT_GROUP:
                if type(arg_4) in (NNGroupNode,
                                   ParameterGroup,
                                   ConfigGroup,
                                   DerivedParameterGroup):
                    raise TypeError('You cannot add a `%s` type of group under results' %
                                    str(type(arg_4)))
            elif arg_3 == PARAMETER_GROUP:
                if type(arg_4) in (NNGroupNode,
                                   ResultGroup,
                                   ConfigGroup,
                                   DerivedParameterGroup):
                    raise TypeError('You cannot add a `%s` type of group under parameters' %
                                    str(type(arg_4)))
            elif arg_3 == CONFIG_GROUP:
                if type(arg_4) in (NNGroupNode,
                                   ParameterGroup,
                                   ResultGroup,
                                   DerivedParameterGroup):
                    raise TypeError('You cannot add a `%s` type of group under config' %
                                    str(type(arg_4)))
            elif arg_3 == DERIVED_PARAMETER_GROUP:
                if type(arg_4) in (NNGroupNode,
                                   ParameterGroup,
                                   ConfigGroup,
                                   ResultGroup):
                    raise TypeError('You cannot add a `%s` type of group under derived '
                                    'parameters' % str(type(arg_4)))
            elif arg_3 == GROUP:
                if type(arg_4) in (ResultGroup,
                                   ParameterGroup,
                                   ConfigGroup,
                                   DerivedParameterGroup):
                    raise TypeError('You cannot add a `%s` type of group under other data' %
                                    str(type(arg_4)))
            else:
                raise RuntimeError('You shall not pass!')

        arg_0._set_details_tree_node(arg_1, arg_2, arg_4)
        arg_4._nn_interface = arg_0
        arg_0._root_instance._all_groups[arg_4.v_full_name] = arg_4
        arg_0._add_to_nodes_and_leaves(arg_4)
        arg_1._children[arg_2] = arg_4
        arg_1._groups[arg_2] = arg_4

        return arg_4

Generically creates a new group inferring from the type_name .


def Func ( arg_0 ) : if arg_0 . _tp + arg_0 . _fp == 0 : return float ( 'NaN' ) return arg_0 . _tp / ( arg_0 . _tp + arg_0 . _fp )

def Func(arg_0):
        r"""Return Func.

        Precision is defined as :math:`\frac{tp}{tp + fp}`

        AKA positive predictive value (PPV)

        Cf. https://en.wikipedia.org/wiki/Precision_and_recall

        Cf. https://en.wikipedia.org/wiki/Information_retrieval#Precision

        Returns
        -------
        float
            The Func of the confusion table

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

        """
        if arg_0._tp + arg_0._fp == 0:
            return float('NaN')
        return arg_0._tp / (arg_0._tp + arg_0._fp)

r"""Return precision.

        Precision is defined as :math:`\frac{tp}{tp + fp}`

        AKA positive predictive value (PPV)

        Cf. https://en.wikipedia.org/wiki/Precision_and_recall

        Cf. https://en.wikipedia.org/wiki/Information_retrieval#Precision

        Returns
        -------
        float
            The precision of the confusion table

        Example
        -------
        >>> ct = ConfusionTable(120, 60, 20, 30)
        >>> ct.precision()
        0.8571428571428571


def Func ( arg_0 ) : arg_1 = arg_0 . get ( 'psf' ) arg_1 . param_dict [ 'zscale' ] = arg_1 . param_dict [ 'psf-zscale' ] arg_1 . params [ arg_1 . params . index ( 'psf-zscale' ) ] = 'zscale' arg_1 . global_zscale = True arg_1 . param_dict . pop ( 'psf-zscale' ) arg_0 . trigger_parameter_change ( ) arg_0 . reset ( )

def Func(arg_0):
    """Links the state ``st`` psf zscale with the global zscale"""
    # FIXME should be made more generic to other parameters and categories
    arg_1 = arg_0.get('psf')
    arg_1.param_dict['zscale'] = arg_1.param_dict['psf-zscale']
    arg_1.params[arg_1.params.index('psf-zscale')] = 'zscale'
    arg_1.global_zscale = True
    arg_1.param_dict.pop('psf-zscale')
    arg_0.trigger_parameter_change()
    arg_0.reset()

Links the state st psf zscale with the global zscale


def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : super ( ArchiveResponsePayload , 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 . 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 ) arg_0 . is_oversized ( arg_6 )

def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Read the data encoding the Archive 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 data attribute is missing from the
                encoded payload.
        """
        super(ArchiveResponsePayload, 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.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
            )

        arg_0.is_oversized(arg_6)

Read the data encoding the Archive 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 data attribute is missing from the
                encoded payload.

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


return self.request(id, "dispatch", json=dispatch_json, method="post").json()

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : arg_4 = { "Meta" : arg_3 , "Payload" : arg_2 } return arg_0 . request ( arg_1 , "dispatch" , json = arg_4 , method = "post" ) . json ( )

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """ Dispatches a new instance of a parameterized job.

           https://www.nomadproject.io/docs/http/job.html

            arguments:
              - id
              - payload
              - meta
            returns: dict
            raises:
              - nomad.api.exceptions.BaseNomadException
              - nomad.api.exceptions.URLNotFoundNomadException
        """
        arg_4 = {"Meta": arg_3, "Payload": arg_2}
        return arg_0.request(arg_1, "dispatch", json=arg_4, method="post").json()

Dispatches a new instance of a parameterized job .


def Func ( arg_0 ) : arg_1 = { } for arg_2 , Func in arg_0 . composed_fields . items ( ) : for arg_4 in Func : arg_1 [ arg_4 . name ] = ( arg_2 , arg_4 ) return arg_1

def Func(arg_0):
        """ Returns a dict of the sub fields for this point format

        Returns
        -------
        Dict[str, Tuple[str, SubField]]
            maps a sub field name to its composed dimension with additional information

        """
        arg_1 = {}
        for arg_2, Func in arg_0.composed_fields.items():
            for arg_4 in Func:
                arg_1[arg_4.name] = (arg_2, arg_4)
        return arg_1