def Func ( arg_0 ) : import time arg_1 = lambda : ( multiprocessing . active_children ( ) or not arg_0 . log_queue . empty ( ) or not arg_0 . exception_queue . empty ( ) ) try : while arg_1 ( ) : try : arg_2 = arg_0 . log_queue . get_nowait ( ) arg_3 = logging . getLogger ( arg_2 . name ) arg_3 . handle ( arg_2 ) except queue . Empty : pass try : arg_4 = arg_0 . exception_queue . get_nowait ( ) except queue . Empty : pass else : raise arg_4 time . sleep ( 1 / arg_0 . frame_rate ) arg_0 . elapsed_time += 1 / arg_0 . frame_rate if arg_0 . time_limit and arg_0 . elapsed_time > arg_0 . time_limit : raise RuntimeError ( "timeout" ) finally : for arg_5 in multiprocessing . active_children ( ) : arg_5 . terminate ( )

def Func(arg_0):
        """
        Poll the queues that the worker can use to communicate with the
        supervisor, until all the workers are done and all the queues are
        empty.  Handle messages as they appear.
        """
        import time

        arg_1 = lambda: (
                multiprocessing.active_children()
                or not arg_0.log_queue.empty()
                or not arg_0.exception_queue.empty())

        try:
            while arg_1():
                # When a log message is received, make a logger with the same
                # name in this process and use it to re-log the message.  It
                # will get handled in this process.

                try:
                    arg_2 = arg_0.log_queue.get_nowait()
                    arg_3 = logging.getLogger(arg_2.name)
                    arg_3.handle(arg_2)
                except queue.Empty:
                    pass

                # When an exception is received, immediately re-raise it.

                try:
                    arg_4 = arg_0.exception_queue.get_nowait()
                except queue.Empty:
                    pass
                else:
                    raise arg_4

                # Sleep for a little bit, and make sure that the workers haven't
                # outlived their time limit.

                time.sleep(1/arg_0.frame_rate)
                arg_0.elapsed_time += 1/arg_0.frame_rate

                if arg_0.time_limit and arg_0.elapsed_time > arg_0.time_limit:
                    raise RuntimeError("timeout")

        # Make sure the workers don't outlive the supervisor, no matter how the
        # polling loop ended (e.g. normal execution or an exception).

        finally:
            for arg_5 in multiprocessing.active_children():
                arg_5.terminate()

Poll the queues that the worker can use to communicate with the supervisor until all the workers are done and all the queues are empty . Handle messages as they appear .


def Func(arg_0, arg_1):
        """
        Calculate the temperature of the package given the specified
        enthalpy using a secant algorithm.

        :param H: Enthalpy. [kWh]

        :returns: Temperature. [°C]
        """

        # Create the initial guesses for temperature.
        arg_2 = list()
        arg_2.append(arg_0._T)
        arg_2.append(arg_0._T + 10.0)

        # Evaluate the enthalpy for the initial guesses.
        arg_3 = list()
        arg_3.append(arg_0._calculate_H(arg_2[0]) - arg_1)
        arg_3.append(arg_0._calculate_H(arg_2[1]) - arg_1)

        # Solve for temperature.
        for arg_4 in range(2, 50):
            arg_2.append(arg_2[arg_4-1] - arg_3[arg_4-1]*((arg_2[arg_4-1] - arg_2[arg_4-2])/(arg_3[arg_4-1] - arg_3[arg_4-2])))
            arg_3.append(arg_0._calculate_H(arg_2[arg_4]) - arg_1)
            if abs(arg_3[arg_4-1]) < 1.0e-5:
                break

        return arg_2[len(arg_2) - 1]

Calculate the temperature of the package given the specified enthalpy using a secant algorithm .


def Func(arg_0, arg_1, arg_2=True):
        """Move an existing key to the beginning or end of this ordered bidict.

        The item is moved to the end if *last* is True, else to the beginning.

        :raises KeyError: if the key does not exist
        """
        arg_3 = arg_0._fwdm[arg_1]
        arg_3.prv.nxt = arg_3.nxt
        arg_3.nxt.prv = arg_3.prv
        arg_6 = arg_0._sntl
        if arg_2:
            arg_2 = arg_6.prv
            arg_3.prv = arg_2
            arg_3.nxt = arg_6
            arg_6.prv = arg_2.nxt = arg_3
        else:
            arg_7 = arg_6.nxt
            arg_3.prv = arg_6
            arg_3.nxt = arg_7
            arg_6.nxt = arg_7.prv = arg_3

Move an existing key to the beginning or end of this ordered bidict .


def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Write the data encoding the ProtocolVersion struct to a stream.

        Args:
            output_stream (stream): A data stream in which to encode 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 encoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            ValueError: Raised if the data attribute is not defined.
        """
        arg_6 = utils.BytearrayStream()

        if arg_0._major:
            arg_0._major.Func(arg_6, arg_2=arg_2)
        else:
            raise ValueError(
                "Invalid struct missing the major protocol version number."
            )

        if arg_0._minor:
            arg_0._minor.Func(arg_6, arg_2=arg_2)
        else:
            raise ValueError(
                "Invalid struct missing the minor protocol version number."
            )

        arg_0.length = arg_6.length()
        super(ProtocolVersion, arg_0).Func(
            arg_1,
            arg_2=arg_2
        )
        arg_1.Func(arg_6.buffer)

Write the data encoding the ProtocolVersion struct to a stream.

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

        Raises:
            ValueError: Raised if the data attribute is not defined.

Write the data encoding the ProtocolVersion struct to a stream .


def Func ( arg_0 , ** arg_1 ) : for arg_2 , arg_3 in arg_1 . items ( ) : if arg_2 [ - 1 ] == "_" : arg_2 = arg_2 [ : - 1 ] assert arg_2 not in arg_0 . stats arg_0 . stats [ arg_2 ] = arg_3 return arg_0 . stats

def Func(arg_0, **arg_1):
        """add some stats entries to the statistic dictionary
        raise an AssertionError if there is a key conflict
        """
        for arg_2, arg_3 in arg_1.items():
            if arg_2[-1] == "_":
                arg_2 = arg_2[:-1]
            assert arg_2 not in arg_0.stats
            arg_0.stats[arg_2] = arg_3
        return arg_0.stats


def
Func
(
arg_0
,
arg_1
=
False
,
arg_2
=
)
:
def
list_methods
(
)
:
arg_3
=
[
]
if
arg_0
in
Staveley_data
.
index
and
not
np
.
isnan
(
Staveley_data
.
at
[
arg_0
,
'Pt'
]
)
:
arg_3
.
append
(
STAVELEY
)
if
Tt
(
arg_0
)
and
VaporPressure
(
arg_0
=
arg_0
)
.
T_dependent_property
(
T
=
Tt
(
arg_0
)
)
:
arg_3
.
append
(
DEFINITION
)
arg_3
.
append
(
)
return
arg_3
if
arg_1
:
return
list_methods
(
)
if
not
arg_2
:
arg_2
=
list_methods
(
)
[
0
]
if
arg_2
==
STAVELEY
:
Func
=
Staveley_data
.
at
[
arg_0
,
'Pt'
]
elif
arg_2
==
DEFINITION
:
Func
=
VaporPressure
(
arg_0
=
arg_0
)
.
T_dependent_property
(
T
=
Tt
(
arg_0
)
)
elif
arg_2
==
:
Func
=
else
:
raise
Exception
(
'Failure in in function'
)
return
Func

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

    Returns data from [1]_, or attempts to calculate the vapor pressure at the
    triple temperature, if data is available.

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

    Returns
    -------
    Pt : float
        Triple point pressure, [Pa]
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain Pt with the
        given inputs

    Other Parameters
    ----------------
    Method : string, optional
        A string for the method name to use, as defined by constants in
        Pt_methods
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        the Pt for the desired chemical, and will return methods
        instead of the Pt

    Notes
    -----

    Examples
    --------
    Ammonia

    >>> Pt('7664-41-7')
    6079.5

    References
    ----------
    .. [1] Staveley, L. A. K., L. Q. Lobo, and J. C. G. Calado. "Triple-Points
       of Low Melting Substances and Their Use in Cryogenic Work." Cryogenics
       21, no. 3 (March 1981): 131-144. doi:10.1016/0011-2275(81)90264-2.
    '''
    def list_methods():
        arg_3 = []
        if arg_0 in Staveley_data.index and not np.isnan(Staveley_data.at[arg_0, 'Pt']):
            arg_3.append(STAVELEY)
        if Tt(arg_0) and VaporPressure(arg_0=arg_0).T_dependent_property(T=Tt(arg_0)):
            arg_3.append(DEFINITION)
        arg_3.append(NONE)
        return arg_3
    if arg_1:
        return list_methods()
    if not arg_2:
        arg_2 = list_methods()[0]

    if arg_2 == STAVELEY:
        Func = Staveley_data.at[arg_0, 'Pt']
    elif arg_2 == DEFINITION:
        Func = VaporPressure(arg_0=arg_0).T_dependent_property(T=Tt(arg_0))
    elif arg_2 == NONE:
        Func = None
    else:
        raise Exception('Failure in in function')
    return Func

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


def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . driver . resize_window_to ( arg_0 . handle , arg_1 , arg_2 )

def Func(arg_0, arg_1, arg_2):
        """
        Resizes the window to the given dimensions.

        If this method was called for a window that is not current, then after calling this method
        the current window should remain the same as it was before calling this method.

        Args:
            width (int): The new window width in pixels.
            height (int): The new window height in pixels.
        """

        arg_0.driver.resize_window_to(arg_0.handle, arg_1, arg_2)

Resizes the window to the given dimensions .


def Func():
    """
        Formats the output of another tool in the given way.
        Has default styles for ranges, hosts and services.
    """
    arg_0 = argparse.ArgumentParser(description='Formats a json object in a certain way. Use with pipes.')
    arg_0.add_argument('Func', metavar='Func', help='How to Func the json for example "{address}:{port}".', nargs='?')
    arg_1 = arg_0.parse_args()
    arg_2 = "{address:15} {port:7} {protocol:5} {service:15} {state:10} {banner} {tags}"
    arg_3 = "{address:15} {tags}"
    arg_4 = "{range:18} {tags}"
    arg_5 = "{username}"
    if arg_1.Func:
        Func_input(arg_1.Func)
    else:
        arg_6 = DocMapper()
        if arg_6.is_pipe:
            for arg_7 in arg_6.get_pipe():
                arg_8 = ''
                if isinstance(arg_7, Range):
                    arg_8 = arg_4
                elif isinstance(arg_7, Host):
                    arg_8 = arg_3
                elif isinstance(arg_7, Service):
                    arg_8 = arg_2
                elif isinstance(arg_7, User):
                    arg_8 = arg_5
                print_line(fmt.Func(arg_8, **arg_7.to_dict(include_meta=True)))
        else:
            print_error("Please use this script with pipes")

Formats the output of another tool in the given way . Has default styles for ranges hosts and services .


sets up the threadpool with map for parallel processing

(function, sequence, cores=None, runSeries=False, quiet=False)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
False
,
arg_4
=
False
)
:
if
arg_2
is
:
arg_5
=
ThreadPool
(
)
else
:
arg_5
=
ThreadPool
(
arg_2
)
arg_6
=
time
.
time
(
)
if
arg_3
is
False
:
try
:
arg_7
=
arg_5
.
map
(
arg_0
,
arg_1
)
arg_5
.
close
(
)
arg_5
.
join
(
)
except
:
print
'Func Failed... running in series :-('
arg_7
=
series
(
arg_1
,
arg_0
)
else
:
arg_7
=
series
(
arg_1
,
arg_0
)
arg_8
=
time
.
time
(
)
arg_9
=
arg_8
arg_6
if
arg_4
is
False
:
if
arg_2
is
:
print
"Elapsed time: %s  :-)\n"
%
str
(
arg_9
)
else
:
print
"Elapsed time: %s  on %s Funcs :-)\n"
%
(
str
(
arg_9
)
,
str
(
arg_2
)
)
return
arg_7

def Func(arg_0, arg_1, arg_2=None, arg_3=False, arg_4=False):
    '''sets up the Funcpool with map for parallel processing'''

    # Make the Pool of workes
    if arg_2 is None:
        arg_5 = ThreadPool()
    else:
        arg_5 = ThreadPool(arg_2)

    # Operate on the list of subjects with the requested function
    # in the split Funcs
    arg_6 = time.time()
    if arg_3 is False:
        try:
            arg_7 = arg_5.map(arg_0, arg_1)
            # close the pool and wiat for teh work to finish
            arg_5.close()
            arg_5.join()
        except:
            print 'Func Failed... running in series :-('
            arg_7 = series(arg_1, arg_0)
    else:
        arg_7 = series(arg_1, arg_0)
    arg_8 = time.time()
    arg_9 = arg_8 - arg_6

    if arg_4 is False:
        if arg_2 is None:
            print "Elapsed time: %s  :-)\n" % str(arg_9)
        else:
            print "Elapsed time: %s  on %s Funcs :-)\n" % (str(arg_9), str(arg_2))
    # Noes:
    # import functools
    # abc = map(functools.partial(sb.dist, distName = 'weibull'), wbldfList)

    return arg_7


async
def
Func
(
arg_0
)
->
Response
:
if
arg_0
.
request_config
.
get
(
'DELAY'
,
0
)
>
0
:
await
asyncio
.
sleep
(
arg_0
.
request_config
[
'DELAY'
]
)
arg_1
=
arg_0
.
request_config
.
get
(
'TIMEOUT'
,
10
)
try
:
async
with
async_timeout
.
timeout
(
arg_1
)
:
arg_2
=
await
arg_0
.
_make_request
(
)
try
:
arg_3
=
await
arg_2
.
text
(
encoding
=
arg_0
.
encoding
)
except
UnicodeDecodeError
:
arg_3
=
await
arg_2
.
read
(
)
arg_4
=
Response
(
url
=
arg_0
.
url
,
method
=
arg_0
.
method
,
encoding
=
arg_2
.
get_encoding
(
)
,
html
=
arg_3
,
metadata
=
arg_0
.
metadata
,
cookies
=
arg_2
.
cookies
,
headers
=
arg_2
.
headers
,
history
=
arg_2
.
history
,
status
=
arg_2
.
status
,
aws_json
=
arg_2
.
json
,
aws_text
=
arg_2
.
text
,
aws_read
=
arg_2
.
read
)
arg_5
=
arg_0
.
request_config
.
get
(
'VALID'
)
if
arg_5
and
iscoroutinefunction
(
arg_5
)
:
arg_4
=
await
arg_5
(
arg_4
)
if
arg_4
.
ok
:
return
arg_4
else
:
return
await
arg_0
.
_retry
(
error_msg
=
'request url failed!'
)
except
asyncio
.
TimeoutError
:
return
await
arg_0
.
_retry
(
error_msg
=
'timeout'
)
except
Exception
as
e
:
return
await
arg_0
.
_retry
(
error_msg
=
e
)
finally
:
await
arg_0
.
_close_request_session
(
)

async def Func(arg_0) -> Response:
        """Fetch all the information by using aiohttp"""
        if arg_0.request_config.get('DELAY', 0) > 0:
            await asyncio.sleep(arg_0.request_config['DELAY'])

        arg_1 = arg_0.request_config.get('TIMEOUT', 10)
        try:
            async with async_timeout.timeout(arg_1):
                arg_2 = await arg_0._make_request()
            try:
                arg_3 = await arg_2.text(encoding=arg_0.encoding)
            except UnicodeDecodeError:
                arg_3 = await arg_2.read()

            arg_4 = Response(
                url=arg_0.url,
                method=arg_0.method,
                encoding=arg_2.get_encoding(),
                html=arg_3,
                metadata=arg_0.metadata,
                cookies=arg_2.cookies,
                headers=arg_2.headers,
                history=arg_2.history,
                status=arg_2.status,
                aws_json=arg_2.json,
                aws_text=arg_2.text,
                aws_read=arg_2.read)
            # Retry middleware
            arg_5 = arg_0.request_config.get('VALID')
            if arg_5 and iscoroutinefunction(arg_5):
                arg_4 = await arg_5(arg_4)
            if arg_4.ok:
                return arg_4
            else:
                return await arg_0._retry(error_msg='request url failed!')
        except asyncio.TimeoutError:
            return await arg_0._retry(error_msg='timeout')
        except Exception as e:
            return await arg_0._retry(error_msg=e)
        finally:
            # Close client session
            await arg_0._close_request_session()


def Func(arg_0, arg_1, arg_2):
        """Transport the file from the local filesystem to the remote Globus endpoint.

        This function returns a DataFuture.

        Args:
            - self
            - file (File) - file to stage out
            - executor (str) - Which executor the file is going to be staged out from.
                                If the executor argument is not specified for a file
                                with the 'globus' scheme, the file will be staged in to
                                the first executor with the "globus" key in a config.
        """

        if arg_1.scheme == 'http' or arg_1.scheme == 'https':
            raise Exception('HTTP/HTTPS file staging out is not supported')
        elif arg_1.scheme == 'ftp':
            raise Exception('FTP file staging out is not supported')
        elif arg_1.scheme == 'globus':
            arg_3 = arg_0._get_globus_endpoint(arg_2)
            arg_4 = arg_0._globus_Func_app()
            return arg_4(arg_3, inputs=[arg_1])
        else:
            raise Exception('Staging out with unknown file scheme {} is not supported'.format(arg_1.scheme))

Transport the file from the local filesystem to the remote Globus endpoint .


def Func(arg_0, arg_1, arg_2, arg_3):
    """Return a dictionary of environment variables for the container."""
    arg_4 = {}
    arg_4.update(providers_util.get_file_environment_variables(arg_1))
    arg_4.update(providers_util.get_file_environment_variables(arg_2))
    arg_4.update(providers_util.get_file_environment_variables(arg_3))
    return arg_4

Return a dictionary of environment variables for the container .


def Func ( arg_0 , ** arg_1 ) : arg_1 . setdefault ( 'fit' , 'rot+trans' ) arg_2 = { } for arg_3 in ( 'xy' , 'fit' , 'fitgroup' , 'input' ) : if arg_3 in arg_1 : arg_2 [ arg_3 ] = arg_1 . pop ( arg_3 ) arg_1 [ 'input' ] = arg_1 . pop ( 'strip_input' , [ 'Protein' ] ) arg_1 [ 'force' ] = arg_2 [ 'force' ] = arg_1 . pop ( 'force' , arg_0 . force ) arg_4 = arg_0 . strip_water ( ** arg_1 ) arg_5 = arg_0 . nowater [ arg_4 [ 'xtc' ] ] return arg_5 . fit ( ** arg_2 )

def Func(arg_0, **arg_1):
        """Strip water and fit to the remaining system.

        First runs :meth:`strip_water` and then :meth:`fit`; see there
        for arguments.

        - *strip_input* is used for :meth:`strip_water` (but is only useful in
          special cases, e.g. when there is no Protein group defined. Then set
          *strip_input* = ``['Other']``.

        - *input* is passed on to :meth:`fit` and can contain the
          ``[center_group, fit_group, output_group]``

        - *fitgroup* is only passed to :meth:`fit` and just contains
          the group to fit to ("backbone" by default)

          .. warning:: *fitgroup* can only be a Gromacs default group and not
                       a custom group (because the indices change after stripping)

        - By default *fit* = "rot+trans" (and *fit* is passed to :meth:`fit`,
          together with the *xy* = ``False`` keyword)

        .. Note:: The call signature of :meth:`strip_water` is somewhat different from this one.
        """
        arg_1.setdefault('fit', 'rot+trans')
        arg_2 = {}
        for arg_3 in ('xy', 'fit', 'fitgroup', 'input'):
            if arg_3 in arg_1:
                arg_2[arg_3] = arg_1.pop(arg_3)

        arg_1['input'] = arg_1.pop('strip_input', ['Protein'])
        arg_1['force'] = arg_2['force'] = arg_1.pop('force', arg_0.force)

        arg_4 = arg_0.strip_water(**arg_1)    # updates self.nowater
        arg_5 = arg_0.nowater[arg_4['xtc']]  # make sure to get the one we just produced
        return arg_5.fit(**arg_2)

Strip water and fit to the remaining system .


(self, sock, request_handler, error_handler, debug=False,
              request_timeout=60, ssl=None, request_max_size=None,
              reuse_port=False, loop=None, protocol=HttpProtocol,
              backlog=100, **kwargs)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=False,
              arg_5=60, arg_6=None, arg_7=None,
              arg_8=False, arg_9=None, arg_10=arg_11,
              arg_12=100, **arg_13):
        """Start asynchronous HTTP Server on an individual process.

        :param request_handler: Sanic request handler with middleware
        :param error_handler: Sanic error handler with middleware
        :param debug: enables debug output (slows Funcr)
        :param request_timeout: time in seconds
        :param ssl: SSLContext
        :param sock: Socket for the Funcr to accept connections from
        :param request_max_size: size in bytes, `None` for no limit
        :param reuse_port: `True` for multiple workers
        :param loop: asyncio compatible event loop
        :param protocol: subclass of asyncio protocol class
        :return: Nothing
        """
        if arg_4:
            arg_9.set_debug(arg_4)

        arg_14 = partial(
            arg_10,
            arg_9=arg_9,
            connections=arg_0.connections,
            signal=arg_0.signal,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_5=arg_5,
            arg_7=arg_7,
        )

        arg_15 = arg_9.create_Funcr(
            arg_14,
            host=None,
            port=None,
            arg_6=arg_6,
            arg_8=arg_8,
            arg_1=arg_1,
            arg_12=arg_12
        )
        # Instead of pulling time at the end of every request,
        # pull it once per minute
        arg_9.call_soon(partial(update_current_time, arg_9))
        return arg_15

Start asynchronous HTTP Server on an individual process.

        :param request_handler: Sanic request handler with middleware
        :param error_handler: Sanic error handler with middleware
        :param debug: enables debug output (slows server)
        :param request_timeout: time in seconds
        :param ssl: SSLContext
        :param sock: Socket for the server to accept connections from
        :param request_max_size: size in bytes, `None` for no limit
        :param reuse_port: `True` for multiple workers
        :param loop: asyncio compatible event loop
        :param protocol: subclass of asyncio protocol class
        :return: Nothing

Start asynchronous HTTP Server on an individual process .


def Func ( arg_0 , arg_1 ) : if arg_0 . field_type == 'TEXT' and isinstance ( arg_1 , str ) : return arg_0 . loads ( arg_1 ) return arg_1

def Func(arg_0, arg_1):
        """Parse value from database."""
        if arg_0.field_type == 'TEXT' and isinstance(arg_1, str):
            return arg_0.loads(arg_1)
        return arg_1


def
Func
(
arg_0
)
:
print
(
"Added platform information"
)
arg_1
=
arg_0
.
package
arg_2
=
plugins_get_mgr
(
)
arg_3
=
arg_2
.
get
(
what
=
'instrumentation'
,
name
=
'platform'
)
arg_1
[
'platform'
]
=
arg_3
.
get_metadata
(
)

def Func(arg_0):
    """
    Update metadata host information
    """

    print("Added platform information")
    arg_1 = arg_0.package
    arg_2 = plugins_get_mgr()
    arg_3 = arg_2.get(what='instrumentation', name='platform')
    arg_1['platform'] = arg_3.get_metadata()


def Func ( arg_0 , arg_1 : 'Interval' ) -> bool : if arg_0 . begin < arg_1 . end and arg_1 . begin < arg_0 . end : return True return False

def Func(arg_0, arg_1: 'Interval') -> bool:
        """Check if self has overlap with `interval`.

        Args:
            interval: interval to be examined

        Returns:
            bool: True if self has overlap with `interval` otherwise False
        """
        if arg_0.begin < arg_1.end and arg_1.begin < arg_0.end:
            return True
        return False

Check if self has overlap with interval .


def Func ( arg_0 , arg_1 ) : arg_2 = [ ] arg_3 = arg_2 . append arg_4 = len ( arg_1 ) for arg_5 in [ keyword . kwlist , __builtin__ . __dict__ . keys ( ) , arg_0 . namespace . keys ( ) , arg_0 . global_namespace . keys ( ) ] : for arg_6 in arg_5 : if arg_6 [ : arg_4 ] == arg_1 and arg_6 != "__builtins__" : arg_3 ( arg_6 ) return arg_2

def Func(arg_0, arg_1):
        """Compute matches when text is a simple name.

        Return a list of all keywords, built-in functions and names currently
        defined in self.namespace or self.global_namespace that match.

        """
        #print 'Completer->Func, txt=%r' % text # dbg
        arg_2 = []
        arg_3 = arg_2.append
        arg_4 = len(arg_1)
        for arg_5 in [keyword.kwlist,
                    __builtin__.__dict__.keys(),
                    arg_0.namespace.keys(),
                    arg_0.global_namespace.keys()]:
            for arg_6 in arg_5:
                if arg_6[:arg_4] == arg_1 and arg_6 != "__builtins__":
                    arg_3(arg_6)
        return arg_2

Compute matches when text is a simple name .


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
cart
arg_2
=
arg_0
.
cart
.
user
arg_3
=
[
]
try
:
arg_0
.
_test_vouchers
(
arg_0
.
cart
.
vouchers
.
all
(
)
)
except
ValidationError
as
ve
:
arg_3
.
append
(
ve
)
arg_4
=
commerce
.
ProductItem
.
objects
.
filter
(
arg_1
=
arg_1
)
arg_4
=
arg_4
.
select_related
(
"product"
,
"product__category"
)
arg_5
=
list
(
(
i
.
product
,
i
.
quantity
)
for
i
in
arg_4
)
try
:
arg_0
.
_test_limits
(
arg_5
)
except
ValidationError
as
ve
:
arg_0
.
_append_errors
(
arg_3
,
ve
)
try
:
arg_0
.
_test_required_categories
(
)
except
ValidationError
as
ve
:
arg_0
.
_append_errors
(
arg_3
,
ve
)
arg_6
=
[
i
.
product
for
i
in
arg_4
]
arg_7
=
DiscountController
.
available_discounts
(
arg_2
,
[
]
,
arg_6
,
)
arg_8
=
set
(
i
.
discount
.
id
for
i
in
arg_7
)
arg_9
=
commerce
.
DiscountItem
.
objects
.
filter
(
arg_1
=
arg_1
)
for
arg_10
in
arg_9
:
arg_11
=
arg_10
.
discount
if
arg_11
.
id
not
in
arg_8
:
arg_3
.
append
(
ValidationError
(
"Discounts are no longer available"
)
)
if
arg_3
:
raise
ValidationError
(
arg_3
)

def Func(arg_0):
        ''' Determines whether the status of the current cart is valid;
        this is normally called before generating or paying an invoice '''

        arg_1 = arg_0.cart
        arg_2 = arg_0.cart.user
        arg_3 = []

        try:
            arg_0._test_vouchers(arg_0.cart.vouchers.all())
        except ValidationError as ve:
            arg_3.append(ve)

        arg_4 = commerce.ProductItem.objects.filter(arg_1=arg_1)
        arg_4 = arg_4.select_related("product", "product__category")

        arg_5 = list((i.product, i.quantity) for i in arg_4)
        try:
            arg_0._test_limits(arg_5)
        except ValidationError as ve:
            arg_0._append_errors(arg_3, ve)

        try:
            arg_0._test_required_categories()
        except ValidationError as ve:
            arg_0._append_errors(arg_3, ve)

        # Validate the discounts
        # TODO: refactor in terms of available_discounts
        # why aren't we doing that here?!

        #     def available_discounts(cls, user, categories, products):

        arg_6 = [i.product for i in arg_4]
        arg_7 = DiscountController.available_discounts(
            arg_2,
            [],
            arg_6,
        )
        arg_8 = set(i.discount.id for i in arg_7)

        arg_9 = commerce.DiscountItem.objects.filter(arg_1=arg_1)
        for arg_10 in arg_9:
            arg_11 = arg_10.discount

            if arg_11.id not in arg_8:
                arg_3.append(
                    ValidationError("Discounts are no longer available")
                )

        if arg_3:
            raise ValidationError(arg_3)

Determines whether the status of the current cart is valid ; this is normally called before generating or paying an invoice


def Func ( arg_0 ) : arg_1 = { } for arg_2 in find_boundary_types ( arg_0 , "exchange" ) : arg_3 = len ( arg_2 . reactants ) == 1 if arg_3 : arg_1 [ arg_2 . reverse_variable ] = 1 else : arg_1 [ arg_2 . forward_variable ] = 1 arg_0 . objective . set_linear_coefficients ( arg_1 ) arg_0 . objective . direction = "min"

def Func(arg_0):
    """Add a linear version of a minimal medium to the model solver.

    Changes the optimization objective to finding the growth medium requiring
    the smallest total import flux::

        minimize sum |r_i| for r_i in import_reactions

    Arguments
    ---------
    model : cobra.Model
        The model to modify.
    """
    arg_1 = {}
    for arg_2 in find_boundary_types(arg_0, "exchange"):
        arg_3 = len(arg_2.reactants) == 1
        if arg_3:
            arg_1[arg_2.reverse_variable] = 1
        else:
            arg_1[arg_2.forward_variable] = 1
    arg_0.objective.set_linear_coefficients(arg_1)
    arg_0.objective.direction = "min"

Add a linear version of a minimal medium to the model solver .


(self, states, internals, actions, terminal, reward)

return self.memory.store(
            states=states,
            internals=internals,
            actions=actions,
            terminal=terminal,
            reward=reward
        )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5):
        """
        Imports experiences into the TensorFlow memory structure. Can be used to import
        off-policy data.

        :param states: Dict of state values to import with keys as state names and values as values to set.
        :param internals: Internal values to set, can be fetched from agent via agent.current_internals
            if no values available.
        :param actions: Dict of action values to import with keys as action names and values as values to set.
        :param terminal: Terminal value(s)
        :param reward: Reward value(s)
        """
        return arg_0.memory.store(
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5
        )

Imports experiences into the TensorFlow memory structure . Can be used to import off - policy data .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
'%s%s'
%
(
'[%s] '
%
arg_0
.
description
if
len
(
arg_0
.
description
)
>
0
else
''
,
arg_1
)
if
arg_0
.
kind
==
'warn'
:
print
(
arg_2
)
return
arg_0
elif
arg_0
.
kind
==
'soft'
:
global
_softFunc
_softFunc
.
append
(
arg_2
)
return
arg_0
else
:
raise
AssertionError
(
arg_2
)

def Func(arg_0, arg_1):
        """Helper to raise an AssertionError, and optionally prepend custom description."""
        arg_2 = '%s%s' % ('[%s] ' % arg_0.description if len(arg_0.description) > 0 else '', arg_1)
        if arg_0.kind == 'warn':
            print(arg_2)
            return arg_0
        elif arg_0.kind == 'soft':
            global _softFunc
            _softFunc.append(arg_2)
            return arg_0
        else:
            raise AssertionError(arg_2)

Helper to raise an AssertionError and optionally prepend custom description .


async def Func ( arg_0 , arg_1 : arg_2 ) : arg_0 . queue = arg_0 . queue [ min ( arg_1 , len ( arg_0 . queue ) - 1 ) : len ( arg_0 . queue ) ] await arg_0 . play ( ignore_shuffle = True )

async def Func(arg_0, arg_1: arg_2):
        """ Play the queue from a specific point. Disregards tracks before the index. """
        arg_0.queue = arg_0.queue[min(arg_1, len(arg_0.queue) - 1):len(arg_0.queue)]
        await arg_0.play(ignore_shuffle=True)

Play the queue from a specific point . Disregards tracks before the index .


def Func(arg_0, arg_1):
    """Return the available MatchMaker nodes

    Args:
        mme_base_url(str): base URL of MME service
        token(str): MME server authorization token

    Returns:
        nodes(list): a list of node disctionaries
    """
    arg_2 = []
    if not arg_0 or not arg_1:
        return arg_2
    arg_3 = ''.join([arg_0, '/nodes'])
    arg_2 = matchmaker_request(arg_3=arg_3, arg_1=arg_1, method='GET')
    LOG.info('Matchmaker has the following connected nodes:{}'.format(arg_2))
    return arg_2


return [a for a in self.activities if a.name == name][0]

def Func ( arg_0 , arg_1 ) : return [ arg_2 for arg_2 in arg_0 . activities if arg_2 . name == arg_1 ] [ 0 ]

def Func(arg_0, arg_1):
        """
        Retrieve an activity given its name.

        :param name: The name of the activity.

        :returns: The activity.
        """

        return [arg_2 for arg_2 in arg_0.activities if arg_2.name == arg_1][0]


def Func ( arg_0 , arg_1 , arg_2 = None ) : try : arg_3 = ( arg_0 / arg_1 ) * 100 except ZeroDivisionError : arg_3 = 0 if arg_2 is not None : return round ( arg_3 , arg_2 ) else : return arg_3

def Func(arg_0, arg_1, arg_2=None):
    """Calculate percentage usage of 'used' against 'total'."""
    try:
        arg_3 = (arg_0 / arg_1) * 100
    except ZeroDivisionError:
        arg_3 = 0
    if arg_2 is not None:
        return round(arg_3, arg_2)
    else:
        return arg_3

Calculate percentage usage of used against total .


def Func ( arg_0 ) : if sp . isspmatrix_csr ( arg_0 ) : return np . bincount ( arg_0 . indices , minlength = arg_0 . shape [ 1 ] ) return np . diff ( sp . csc_matrix ( arg_0 , copy = False ) . indptr )

def Func(arg_0):
    """
    Count the number of non-zero values for each feature in sparse X.
    """
    if sp.isspmatrix_csr(arg_0):
        return np.bincount(arg_0.indices, minlength=arg_0.shape[1])
    return np.diff(sp.csc_matrix(arg_0, copy=False).indptr)

Count the number of non - zero values for each feature in sparse X .


return cls(
            name=instance.tags.get('Name'),
            private_ip=instance.private_ip_address,
            public_ip=instance.ip_address,
            instance_type=instance.instance_type,
            instance_id=instance.id,
            hostname=instance.dns_name,
            stack_id=instance.tags.get('aws:cloudformation:stack-id'),
            stack_name=instance.tags.get('aws:cloudformation:stack-name'),
            logical_id=instance.tags.get('aws:cloudformation:logical-id'),
            security_groups=[g.name for g in instance.groups],
            launch_time=instance.launch_time,
            ami_id=instance.image_id,
            tags={k.lower(): v for k, v in six.iteritems(instance.tags)}
        )

def Func ( arg_0 , arg_1 ) : return arg_0 ( name = arg_1 . tags . get ( 'Name' ) , private_ip = arg_1 . private_ip_address , public_ip = arg_1 . ip_address , instance_type = arg_1 . instance_type , instance_id = arg_1 . id , hostname = arg_1 . dns_name , stack_id = arg_1 . tags . get ( 'aws:cloudformation:stack-id' ) , stack_name = arg_1 . tags . get ( 'aws:cloudformation:stack-name' ) , logical_id = arg_1 . tags . get ( 'aws:cloudformation:logical-id' ) , security_groups = [ arg_2 . name for arg_2 in arg_1 . groups ] , launch_time = arg_1 . launch_time , ami_id = arg_1 . image_id , tags = { arg_3 . lower ( ) : arg_4 for arg_3 , arg_4 in six . iteritems ( arg_1 . tags ) } )

def Func(arg_0, arg_1):
        """
        Loads a ``HostEntry`` from a boto instance.

        :param instance: A boto instance object.
        :type instance: :py:class:`boto.ec2.instanceInstance`

        :rtype: :py:class:`HostEntry`
        """
        return arg_0(
            name=arg_1.tags.get('Name'),
            private_ip=arg_1.private_ip_address,
            public_ip=arg_1.ip_address,
            instance_type=arg_1.instance_type,
            instance_id=arg_1.id,
            hostname=arg_1.dns_name,
            stack_id=arg_1.tags.get('aws:cloudformation:stack-id'),
            stack_name=arg_1.tags.get('aws:cloudformation:stack-name'),
            logical_id=arg_1.tags.get('aws:cloudformation:logical-id'),
            security_groups=[arg_2.name for arg_2 in arg_1.groups],
            launch_time=arg_1.launch_time,
            ami_id=arg_1.image_id,
            tags={arg_3.lower(): arg_4 for arg_3, arg_4 in six.iteritems(arg_1.tags)}
        )

Loads a HostEntry from a boto instance .


Move this object above the referenced object.

def Func(arg_0, arg_1):
        """
        Move this object Func the referenced object.
        """
        if not arg_0._valid_ordering_reference(arg_1):
            raise ValueError(
                "%r can only be moved Func instances of %r which %s equals %r." % (
                    arg_0, arg_0.__class__, arg_0.order_with_respect_to,
                    arg_0._get_order_with_respect_to()
                )
            )
        if arg_0.order == arg_1.order:
            return
        if arg_0.order > arg_1.order:
            arg_2 = arg_1.order
        else:
            arg_2 = arg_0.get_ordering_queryset().filter(order__lt=arg_1.order).aggregate(Max('order')).get('order__max') or 0
        arg_0.to(arg_2)

Move this object above the referenced object .


(self, string, language, level=3, retdata=False)

return self.data_structure if retdata else None

def Func(arg_0, arg_1, arg_2, arg_3=3, arg_4=False):
        """Unserializes a serialized php array and prints it to
        the console as a data structure in the specified language.
        Used to translate or convert a php array into a data structure
        in another language. Currently supports, PHP, Python, Javascript,
        and JSON.

        Args:
            string: a string of serialized php

            language: a string representing the desired output
            format for the array.

            level: integer, indentation level in spaces.
            Defaults to 3.

            retdata: boolean, the method will return the string
            in addition to printing it if set to True. Defaults
            to false.

        Returns:
            None but prints a string to the console if retdata is
            False, otherwise returns a string.
            """
        arg_2 = arg_2.lower()
        assert arg_0.is_built_in(arg_2) or arg_2 in arg_0.outer_templates, \
            "Sorry, " + arg_2 + " is not a supported language."

        # Serialized data converted to a python data structure (list of tuples)
        arg_5 = phpserialize.loads(bytes(arg_1, 'utf-8'), array_hook=list, decode_strings=True)

        # If language conversion is supported by python avoid recursion entirely
        # and use a built in library
        if arg_0.is_built_in(arg_2):
            arg_0.get_built_in(arg_2, arg_3, arg_5)
            print(arg_0)
            return arg_0.data_structure if arg_4 else None

        # The language is not supported. Use recursion to build a data structure.
        def loop_print(arg_6, arg_3=3):
            """
            Loops over a python representation of a php array
            (list of tuples) and constructs a representation in another language.
            Translates a php array into another structure.

            Args:
                iterable: list or tuple to unpack.

                level: integer, number of spaces to use for indentation
            """
            arg_7 = ''
            arg_8 = ' ' * arg_3

            # Base case - variable is not an iterable
            if not arg_0.is_iterable(arg_6) or isinstance(arg_6, str):
                arg_9 = str(arg_6)
                return str(arg_9)

            # Recursive case
            for arg_10 in arg_6:
                # If item is a tuple it should be a key, value pair
                if isinstance(arg_10, tuple) and len(arg_10) == 2:
                    # Get the key value pair
                    arg_11 = arg_10[0]
                    arg_12 = loop_print(arg_10[1], arg_3=arg_3+3)

                    # Translate special values
                    arg_12 = arg_0.translate_val(arg_2, arg_12) if arg_2 in arg_0.lang_specific_values \
                          and arg_12 in arg_0.lang_specific_values[arg_2] else arg_12

                    # Convert keys to their properly formatted strings
                    # Integers are not quoted as array keys
                    arg_11 = str(arg_11) if isinstance(arg_11, int) else '\'' + str(arg_11) + '\''

                    # The first item is a key and the second item is an iterable, boolean
                    arg_13 = hasattr(arg_10[0],'__iter__') == False \
                                      and hasattr(arg_10[1],'__iter__') == True

                    # The second item is an iterable
                    if arg_13:
                        arg_7 += arg_0.get_inner_template(arg_2, 'iterable', arg_8, arg_11, arg_12)
                    # The second item is not an iterable
                    else:
                        # Convert values to their properly formatted strings
                        # Integers and booleans are not quoted as array values
                        arg_12 = str(arg_12) if arg_12.isdigit() or arg_12 in arg_0.lang_specific_values[arg_2].values() else '\'' + str(arg_12) + '\''

                        arg_7 += arg_0.get_inner_template(arg_2, 'singular', arg_8, arg_11, arg_12)

            return arg_7

        # Execute the recursive call in language specific wrapper template
        arg_0.data_structure = arg_0.outer_templates[arg_2] % (loop_print(arg_5))
        print(arg_0)
        return arg_0.data_structure if arg_4 else None

Unserializes a serialized php array and prints it to the console as a data structure in the specified language . Used to translate or convert a php array into a data structure in another language . Currently supports PHP Python Javascript and JSON .


def
Func
(
)
:
global
arg_2
try
:
arg_0
=
open
(
'/proc/stat'
,
'r'
)
for
arg_1
in
arg_0
:
if
arg_1
.
startswith
(
'btime'
)
:
arg_2
=
int
(
arg_1
.
split
(
)
[
1
]
)
if
datetime
is
:
raise
NotImplementedError
(
'datetime module required.'
)
return
datetime
.
fromtimestamp
(
arg_2
)
except
(
IOError
,
IndexError
)
:
return

def Func():
    """A way to figure out the boot time directly on Linux."""
    global arg_2
    try:
        arg_0 = open('/proc/stat', 'r')
        for arg_1 in arg_0:
            if arg_1.startswith('btime'):
                arg_2 = int(arg_1.split()[1])

        if datetime is None:
            raise NotImplementedError('datetime module required.')

        return datetime.fromtimestamp(arg_2)
    except (IOError, IndexError):
        return None

A way to figure out the boot time directly on Linux .


return Position(self._maxindex, self._maxline, self._maxcol)

def Func ( arg_0 ) -> Position : return Position ( arg_0 . _maxindex , arg_0 . _maxline , arg_0 . _maxcol )

def Func(arg_0) -> Position:
        """The index of the deepest character readed."""
        return Position(arg_0._maxindex, arg_0._maxline, arg_0._maxcol)

The index of the deepest character readed .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = pycrfsuite . Trainer ( verbose = True ) for arg_4 , arg_5 in zip ( arg_1 , arg_2 ) : arg_3 . append ( arg_4 , arg_5 ) arg_3 . set_params ( arg_0 . params ) if arg_0 . filename : arg_6 = arg_0 . filename else : arg_6 = 'model.tmp' arg_3 . train ( arg_6 ) arg_7 = pycrfsuite . Tagger ( ) arg_7 . open ( arg_6 ) arg_0 . estimator = arg_7

def Func(arg_0, arg_1, arg_2):
        """Fit CRF according to X, y

        Parameters
        ----------
        X : list of text
            each item is a text
        y: list
           each item is either a label (in multi class problem) or list of
           labels (in multi label problem)
        """
        arg_3 = pycrfsuite.Trainer(verbose=True)
        for arg_4, arg_5 in zip(arg_1, arg_2):
            arg_3.append(arg_4, arg_5)

        arg_3.set_params(arg_0.params)
        if arg_0.filename:
            arg_6 = arg_0.filename
        else:
            arg_6 = 'model.tmp'
        arg_3.train(arg_6)
        arg_7 = pycrfsuite.Tagger()
        arg_7.open(arg_6)
        arg_0.estimator = arg_7


return cls(
            hash_=hash_,
            signature_message_fragment=Fragment(tryte_string[0:2187]),
            address=Address(tryte_string[2187:2268]),
            value=int_from_trits(tryte_string[2268:2295].as_trits()),
            legacy_tag=Tag(tryte_string[2295:2322]),
            timestamp=int_from_trits(tryte_string[2322:2331].as_trits()),
            current_index=int_from_trits(tryte_string[2331:2340].as_trits()),
            last_index=int_from_trits(tryte_string[2340:2349].as_trits()),
            bundle_hash=BundleHash(tryte_string[2349:2430]),
            trunk_transaction_hash=TransactionHash(tryte_string[2430:2511]),
            branch_transaction_hash=TransactionHash(tryte_string[2511:2592]),
            tag=Tag(tryte_string[2592:2619]),

            attachment_timestamp=int_from_trits(
                tryte_string[2619:2628].as_trits()),

            attachment_timestamp_lower_bound=int_from_trits(
                tryte_string[2628:2637].as_trits()),

            attachment_timestamp_upper_bound=int_from_trits(
                tryte_string[2637:2646].as_trits()),

            nonce=Nonce(tryte_string[2646:2673]),
        )

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = TransactionTrytes ( arg_1 ) if not arg_2 : arg_4 = [ 0 ] * HASH_LENGTH arg_5 = Curl ( ) arg_5 . absorb ( arg_3 . as_trits ( ) ) arg_5 . squeeze ( arg_4 ) arg_2 = TransactionHash . from_trits ( arg_4 ) return arg_0 ( arg_2 = arg_2 , signature_message_fragment = Fragment ( arg_3 [ 0 : 2187 ] ) , address = Address ( arg_3 [ 2187 : 2268 ] ) , value = int_from_trits ( arg_3 [ 2268 : 2295 ] . as_trits ( ) ) , legacy_tag = Tag ( arg_3 [ 2295 : 2322 ] ) , timestamp = int_from_trits ( arg_3 [ 2322 : 2331 ] . as_trits ( ) ) , current_index = int_from_trits ( arg_3 [ 2331 : 2340 ] . as_trits ( ) ) , last_index = int_from_trits ( arg_3 [ 2340 : 2349 ] . as_trits ( ) ) , bundle_hash = BundleHash ( arg_3 [ 2349 : 2430 ] ) , trunk_transaction_hash = TransactionHash ( arg_3 [ 2430 : 2511 ] ) , branch_transaction_hash = TransactionHash ( arg_3 [ 2511 : 2592 ] ) , tag = Tag ( arg_3 [ 2592 : 2619 ] ) , attachment_timestamp = int_from_trits ( arg_3 [ 2619 : 2628 ] . as_trits ( ) ) , attachment_timestamp_lower_bound = int_from_trits ( arg_3 [ 2628 : 2637 ] . as_trits ( ) ) , attachment_timestamp_upper_bound = int_from_trits ( arg_3 [ 2637 : 2646 ] . as_trits ( ) ) , nonce = Nonce ( arg_3 [ 2646 : 2673 ] ) , )

def Func(arg_0, arg_1, arg_2=None):
        # type: (TrytesCompatible, Optional[TransactionHash]) -> Transaction
        """
        Creates a Transaction object from a sequence of trytes.

        :param trytes:
            Raw trytes.  Should be exactly 2673 trytes long.

        :param hash_:
            The transaction hash, if available.

            If not provided, it will be computed from the transaction
            trytes.
        """
        arg_3 = TransactionTrytes(arg_1)

        if not arg_2:
            arg_4 = [0] * HASH_LENGTH  # type: MutableSequence[int]

            arg_5 = Curl()
            arg_5.absorb(arg_3.as_trits())
            arg_5.squeeze(arg_4)

            arg_2 = TransactionHash.from_trits(arg_4)

        return arg_0(
            arg_2=arg_2,
            signature_message_fragment=Fragment(arg_3[0:2187]),
            address=Address(arg_3[2187:2268]),
            value=int_from_trits(arg_3[2268:2295].as_trits()),
            legacy_tag=Tag(arg_3[2295:2322]),
            timestamp=int_from_trits(arg_3[2322:2331].as_trits()),
            current_index=int_from_trits(arg_3[2331:2340].as_trits()),
            last_index=int_from_trits(arg_3[2340:2349].as_trits()),
            bundle_hash=BundleHash(arg_3[2349:2430]),
            trunk_transaction_hash=TransactionHash(arg_3[2430:2511]),
            branch_transaction_hash=TransactionHash(arg_3[2511:2592]),
            tag=Tag(arg_3[2592:2619]),

            attachment_timestamp=int_from_trits(
                arg_3[2619:2628].as_trits()),

            attachment_timestamp_lower_bound=int_from_trits(
                arg_3[2628:2637].as_trits()),

            attachment_timestamp_upper_bound=int_from_trits(
                arg_3[2637:2646].as_trits()),

            nonce=Nonce(arg_3[2646:2673]),
        )

Creates a Transaction object from a sequence of trytes .


def Func ( arg_0 , arg_1 ) : try : arg_2 = config . Settings ( arg_0 = arg_0 ) arg_3 = STORAGES [ 's3' ] ( arg_2 = arg_2 ) arg_4 = s3conf . S3Conf ( arg_3 = arg_3 , arg_2 = arg_2 ) arg_5 = os . path . join ( config . LOCAL_CONFIG_FOLDER , arg_0 ) arg_4 . Func ( arg_5 , arg_1 = arg_1 ) except exceptions . EnvfilePathNotDefinedError : raise exceptions . EnvfilePathNotDefinedUsageError ( )

def Func(arg_0, arg_1):
    """
    For each section defined in the local config file, creates a folder inside the local config folder
    named after the section. Downloads the environemnt file defined by the S3CONF variable for this section
    to this folder.
    """
    try:
        arg_2 = config.Settings(arg_0=arg_0)
        arg_3 = STORAGES['s3'](arg_2=arg_2)
        arg_4 = s3conf.S3Conf(arg_3=arg_3, arg_2=arg_2)
        arg_5 = os.path.join(config.LOCAL_CONFIG_FOLDER, arg_0)
        arg_4.Func(arg_5, arg_1=arg_1)
    except exceptions.EnvfilePathNotDefinedError:
        raise exceptions.EnvfilePathNotDefinedUsageError()

For each section defined in the local config file creates a folder inside the local config folder named after the section . Downloads the environemnt file defined by the S3CONF variable for this section to this folder .


(job,
                        gvcfs,
                        ref, fai, ref_dict,
                        annotations=None,
                        emit_threshold=10.0, call_threshold=30.0,
                        unsafe_mode=False)

def Func(arg_0,
                        arg_1,
                        arg_2, arg_3, arg_4,
                        arg_5=None,
                        arg_6=10.0, arg_7=30.0,
                        arg_8=False):
    """
    Runs GenotypeGVCFs on one or more gVCFs generated by HaplotypeCaller.

    :param JobFunctionWrappingJob job: passed automatically by Toil
    :param dict gvcfs: Dictionary of GVCF FileStoreIDs {sample identifier: FileStoreID}
    :param str ref: FileStoreID for the reference genome fasta file
    :param str fai: FileStoreID for the reference genome index file
    :param str ref_dict: FileStoreID for the reference genome sequence dictionary
    :param list[str] annotations: Optional list of GATK variant annotations. Default: None.
    :param float emit_threshold: Minimum phred-scale confidence threshold for
                                 a variant to be emitted. GATK default: 10.0
    :param float call_threshold: Minimum phred-scale confidence threshold for
                                 a variant to be called. GATK default: 30.0
    :param bool unsafe_mode: If True, runs gatk UNSAFE mode: "-U ALLOW_SEQ_DICT_INCOMPATIBILITY"
    :return: VCF FileStoreID
    :rtype: str
    """
    arg_9 = {'genome.fa': arg_2,
              'genome.fa.fai': arg_3,
              'genome.dict': arg_4}
    arg_9.update(arg_1)

    arg_10 = arg_0.fileStore.getLocalTempDir()
    for arg_11, arg_12 in arg_9.iteritems():
        arg_0.fileStore.readGlobalFile(arg_12, os.path.join(arg_10, arg_11))

    arg_13 = ['-T', 'GenotypeGVCFs',
               '-R', '/data/genome.fa',
               '--out', 'genotyped.vcf',
               '-stand_emit_conf', str(arg_6),
               '-stand_call_conf', str(arg_7)]

    if arg_5:
        for arg_14 in arg_5:
            arg_13.extend(['-A', arg_14])

    # Include all GVCFs for joint genotyping
    for arg_15 in arg_1.keys():
        arg_13.extend(['--variant', os.path.join('/data', arg_15)])

    if arg_8:
        arg_13.extend(['-U', 'ALLOW_SEQ_DICT_INCOMPATIBILITY'])

    arg_0.fileStore.logToMaster('Running GATK GenotypeGVCFs\n'
                              'Emit threshold: {emit_threshold}\n'
                              'Call threshold: {call_threshold}\n\n'
                              'Annotations:\n{annotations}\n\n'
                              'Samples:\n{samples}\n'.format(arg_6=arg_6,
                                                             arg_7=arg_7,
                                                             arg_5='\n'.join(arg_5) if arg_5 else '',
                                                             samples='\n'.join(arg_1.keys())))

    arg_16 = ['--rm', 'log-driver', 'none',
                         '-e', 'JAVA_OPTS=-Djava.io.tmpdir=/data/ -Xmx{}'.format(arg_0.memory)]
    dockerCall(arg_0=arg_0, workDir=arg_10,
               parameters=arg_13,
               tool='quay.io/ucsc_cgl/gatk:3.5--dba6dae49156168a909c43330350c6161dc7ecc2',
               dockerParameters=arg_16)

    return arg_0.fileStore.writeGlobalFile(os.path.join(arg_10, 'genotyped.vcf'))

Runs GenotypeGVCFs on one or more gVCFs generated by HaplotypeCaller .


(
		playlist, include_filters=None, exclude_filters=None,
		all_includes=False, all_excludes=False, exclude_patterns=None)

return matched_songs, filtered_songs, excluded_songs

def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
,
arg_3
=
False
,
arg_4
=
False
,
arg_5
=
)
:
logger
.
info
(
"Loading local playlist songs..."
)
if
os
.
name
==
'nt'
and
CYGPATH_RE
.
match
(
arg_0
)
:
arg_0
=
convert_cygwin_path
(
arg_0
)
arg_6
=
[
]
arg_7
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
arg_0
)
)
with
open
(
arg_0
)
as
local_playlist
:
for
arg_8
in
local_playlist
.
readlines
(
)
:
arg_8
=
arg_8
.
strip
(
)
if
arg_8
.
lower
(
)
.
endswith
(
SUPPORTED_SONG_FORMATS
)
:
arg_9
=
arg_8
if
not
os
.
path
.
isabs
(
arg_9
)
:
arg_9
=
os
.
path
.
join
(
arg_7
,
arg_9
)
if
os
.
path
.
isfile
(
arg_9
)
:
arg_6
.
append
(
arg_9
)
arg_10
=
get_supported_filepaths
(
arg_6
,
SUPPORTED_SONG_FORMATS
)
arg_11
,
arg_12
=
exclude_filepaths
(
arg_10
,
arg_5
=
arg_5
)
arg_13
,
arg_14
=
filter_local_songs
(
arg_11
,
arg_1
=
arg_1
,
arg_2
=
arg_2
,
arg_3
=
arg_3
,
arg_4
=
arg_4
)
logger
.
info
(
"Excluded {0} local playlist songs"
.
format
(
len
(
arg_12
)
)
)
logger
.
info
(
"Filtered {0} local playlist songs"
.
format
(
len
(
arg_14
)
)
)
logger
.
info
(
"Loaded {0} local playlist songs"
.
format
(
len
(
arg_13
)
)
)
return
arg_13
,
arg_14
,
arg_12

def Func(
		arg_0, arg_1=None, arg_2=None,
		arg_3=False, arg_4=False, arg_5=None):
		"""Load songs from local playlist.

		Parameters:
			playlist (str): An M3U(8) playlist filepath.

			include_filters (list): A list of ``(field, pattern)`` tuples.
				Fields are any valid mutagen metadata fields. Patterns are Python regex patterns.
				Local songs are filtered out if the given metadata field values don't match any of the given patterns.

			exclude_filters (list): A list of ``(field, pattern)`` tuples.
				Fields are any valid mutagen metadata fields. Patterns are Python regex patterns.
				Local songs are filtered out if the given metadata field values match any of the given patterns.

			all_includes (bool): If ``True``, all include_filters criteria must match to include a song.

			all_excludes (bool): If ``True``, all exclude_filters criteria must match to exclude a song.

			exclude_patterns (list or str): Pattern(s) to exclude.
				Patterns are Python regex patterns.
				Filepaths are excluded if they match any of the exclude patterns.

		Returns:
			A list of local playlist song filepaths matching criteria,
			a list of local playlist song filepaths filtered out using filter criteria,
			and a list of local playlist song filepaths excluded using exclusion criteria.
		"""

		logger.info("Loading local playlist songs...")

		if os.name == 'nt' and CYGPATH_RE.match(arg_0):
			arg_0 = convert_cygwin_path(arg_0)

		arg_6 = []
		arg_7 = os.path.dirname(os.path.abspath(arg_0))

		with open(arg_0) as local_playlist:
			for arg_8 in local_playlist.readlines():
				arg_8 = arg_8.strip()

				if arg_8.lower().endswith(SUPPORTED_SONG_FORMATS):
					arg_9 = arg_8

					if not os.path.isabs(arg_9):
						arg_9 = os.path.join(arg_7, arg_9)

					if os.path.isfile(arg_9):
						arg_6.append(arg_9)

		arg_10 = get_supported_filepaths(arg_6, SUPPORTED_SONG_FORMATS)

		arg_11, arg_12 = exclude_filepaths(arg_10, arg_5=arg_5)

		arg_13, arg_14 = filter_local_songs(
			arg_11, arg_1=arg_1, arg_2=arg_2,
			arg_3=arg_3, arg_4=arg_4
		)

		logger.info("Excluded {0} local playlist songs".format(len(arg_12)))
		logger.info("Filtered {0} local playlist songs".format(len(arg_14)))
		logger.info("Loaded {0} local playlist songs".format(len(arg_13)))

		return arg_13, arg_14, arg_12


(self, hub_name, message, device_id=None,
                   broker_properties=None)

def Func(arg_0, arg_1, arg_2, arg_3=None,
                   arg_4=None):
        '''
        Sends a new message event to an Event Hub.
        '''
        _validate_not_none('hub_name', arg_1)
        arg_5 = HTTPRequest()
        arg_5.method = 'POST'
        arg_5.host = arg_0._get_host()
        if arg_3:
            arg_5.path = '/{0}/publishers/{1}/messages?api-version=2014-01'.format(arg_1, arg_3)
        else:
            arg_5.path = '/{0}/messages?api-version=2014-01'.format(arg_1)
        if arg_4:
            arg_5.headers.append(
                ('BrokerProperties', str(arg_4)))
        arg_5.body = _get_request_body(arg_2)
        arg_5.path, arg_5.query = arg_0._httpclient._update_request_uri_query(arg_5)  # pylint: disable=protected-access
        arg_5.headers = arg_0._update_service_bus_header(arg_5)
        arg_0._perform_request(arg_5)

Sends a new message event to an Event Hub .


(case_obj, institute_obj, mme_base_url, mme_token)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
{
'institute'
:
arg_1
,
'case'
:
arg_0
,
'server_errors'
:
[
]
}
arg_5
=
{
}
if
not
arg_0
.
get
(
'mme_submission'
)
:
return
for
arg_6
in
arg_0
[
'mme_submission'
]
[
'patients'
]
:
arg_7
=
arg_6
[
'id'
]
arg_5
[
arg_7
]
=
arg_8
=
''
.
join
(
[
arg_2
,
'/matches/'
,
arg_7
]
)
arg_9
=
matchmaker_request
(
arg_8
=
arg_8
,
token
=
arg_3
,
method
=
'GET'
)
if
'status_code'
in
arg_9
:
arg_10
=
[
]
if
arg_9
.
get
(
'matches'
)
:
arg_10
=
parse_matches
(
arg_7
,
arg_9
[
'matches'
]
)
arg_5
[
arg_7
]
=
arg_10
else
:
LOG
.
warning
(
'Server returned error message: {}'
.
format
(
arg_9
[
'message'
]
)
)
arg_4
[
'server_errors'
]
.
append
(
arg_9
[
'message'
]
)
arg_4
[
'matches'
]
=
arg_5
return
arg_4

def Func(arg_0, arg_1, arg_2, arg_3):
    """Show Matchmaker submission data for a sample and eventual matches.

    Args:
        case_obj(dict): a scout case object
        institute_obj(dict): an institute object
        mme_base_url(str) base url of the MME server
        mme_token(str) auth token of the MME server

    Returns:
        data(dict): data to display in the html template
    """
    arg_4 = {
        'institute' : arg_1,
        'case' : arg_0,
        'server_errors' : []
    }
    arg_5 = {}
    # loop over the submitted samples and get matches from the MatchMaker server
    if not arg_0.get('mme_submission'):
        return None

    for arg_6 in arg_0['mme_submission']['patients']:
        arg_7 = arg_6['id']
        arg_5[arg_7] = None
        arg_8 = ''.join([ arg_2, '/matches/', arg_7])
        arg_9 = matchmaker_request(arg_8=arg_8, token=arg_3, method='GET')
        if 'status_code' in arg_9: # the server returned a valid response
            # and this will be a list of match objects sorted by desc date
            arg_10 = []
            if arg_9.get('matches'):
                arg_10 = parse_matches(arg_7, arg_9['matches'])
            arg_5[arg_7] = arg_10
        else:
            LOG.warning('Server returned error message: {}'.format(arg_9['message']))
            arg_4['server_errors'].append(arg_9['message'])

    arg_4['matches'] = arg_5

    return arg_4

Show Matchmaker submission data for a sample and eventual matches .


def Func(arg_0, arg_1, arg_2):
    """
    Starts an asyncio event loop to connect to the master and run jobs.
    """

    arg_3 = asyncio.new_event_loop()
    asyncio.set_event_loop(None)
    arg_3.run_until_complete(handle_jobs(arg_0, arg_1, arg_2, arg_3=arg_3))
    arg_3.close()

Starts an asyncio event loop to connect to the master and run jobs .


(self, device: SomeDevice, ensure_playback: bool = False)

async def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_4 = False ) : await arg_0 . _user . http . Func_player ( str ( arg_1 ) , play = arg_3 )

async def Func(arg_0, arg_1: arg_2, arg_3: arg_4 = False):
        """Transfer playback to a new device and determine if it should start playing.

        Parameters
        ----------
        device : :obj:`SomeDevice`
            The device on which playback should be started/Funcred.
        ensure_playback : bool
            if `True` ensure playback happens on new device.
            else keep the current playback state.
        """
        await arg_0._user.http.Func_player(str(arg_1), play=arg_3)

Transfer playback to a new device and determine if it should start playing.

        Parameters
        ----------
        device : :obj:`SomeDevice`
            The device on which playback should be started/transferred.
        ensure_playback : bool
            if `True` ensure playback happens on new device.
            else keep the current playback state.

Transfer playback to a new device and determine if it should start playing .


(cls, address_book, supported_private_objects, version,
            localize_dates)

return cls(address_book, None, supported_private_objects, version,
                localize_dates)

def Func(arg_0, arg_1, arg_2, arg_3,
            arg_4):
        """Use this to create a new and empty contact."""
        return arg_0(arg_1, None, arg_2, arg_3,
                arg_4)

Use this to create a new and empty contact .


def Func ( arg_0 , arg_1 ) : if arg_1 is None : return [ ] elif isinstance ( arg_1 , list ) : return [ arg_2 . as_dictionary ( ) for arg_2 in arg_1 ] elif isinstance ( arg_1 , dict ) : return arg_0 . _keys_to_camel_case ( arg_1 ) else : return arg_1 . as_dictionary ( )

def Func(arg_0, arg_1):
        """
        Convert an object to a form ready to dump to json.

        :param obj: Object being serialized. The type of this object must be one of the following: None; a single object derived from the Pio class; or a list of objects, each derived from the Pio class.
        :return: List of dictionaries, each representing a physical information object, ready to be serialized.
        """
        if arg_1 is None:
            return []
        elif isinstance(arg_1, list):
            return [arg_2.as_dictionary() for arg_2 in arg_1]
        elif isinstance(arg_1, dict):
            return arg_0._keys_to_camel_case(arg_1)
        else:
            return arg_1.as_dictionary()

Convert an object to a form ready to dump to json .


def Func ( arg_0 , arg_1 ) : arg_2 = dict ( variant_id = arg_1 [ 'variant_id' ] ) arg_3 = arg_0 . acmg_collection . find ( arg_2 ) . sort ( [ ( 'created_at' , pymongo . DESCENDING ) ] ) return arg_3

def Func(arg_0, arg_1):
        """Return all evaluations for a certain variant.

        Args:
            variant_obj (dict): variant dict from the database

        Returns:
            pymongo.cursor: database cursor
        """
        arg_2 = dict(variant_id=arg_1['variant_id'])
        arg_3 = arg_0.acmg_collection.find(arg_2).sort([('created_at', pymongo.DESCENDING)])
        return arg_3

Return all evaluations for a certain variant .


def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : locals ( ) . update ( arg_3 ) exec ( arg_2 )

def Func(arg_0, arg_1, arg_2, **arg_3):
        """
        Execute the script, within the context of the specified task
        """
        locals().update(arg_3)
        exec(arg_2)

Execute the script within the context of the specified task


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
)
:
arg_6
=
'FAIL'
if
arg_2
==
FAIL_REASON
.
SUCCESS
:
arg_6
=
'SUCCESS'
arg_3
.
send
(
arg_6
+
' '
+
arg_4
+
' '
+
arg_5
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5):
        """
        Callback for the utility messages

        :param res: result of the command
        :param err: error code (one of pysyncobj.config.FAIL_REASON)
        :param conn: utility connection
        :param cmd: command
        :param arg: command arguments
        """

        arg_6 = 'FAIL'
        if arg_2 == FAIL_REASON.SUCCESS:
            arg_6 = 'SUCCESS'
        arg_3.send(arg_6 + ' ' + arg_4 + ' ' + arg_5)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . url_default_functions . get ( None , ( ) ) if '.' in arg_1 : arg_4 = arg_1 . rsplit ( '.' , 1 ) [ 0 ] arg_3 = chain ( arg_3 , arg_0 . url_default_functions . get ( arg_4 , ( ) ) ) for arg_5 in arg_3 : arg_5 ( arg_1 , arg_2 )

def Func(arg_0, arg_1, arg_2):
        """Injects the URL defaults for the given endpoint directly into
        the values dictionary passed.  This is used internally and
        automatically called on URL building.

        .. versionadded:: 0.7
        """
        arg_3 = arg_0.url_default_functions.get(None, ())
        if '.' in arg_1:
            arg_4 = arg_1.rsplit('.', 1)[0]
            arg_3 = chain(arg_3, arg_0.url_default_functions.get(arg_4, ()))
        for arg_5 in arg_3:
            arg_5(arg_1, arg_2)

Injects the URL defaults for the given endpoint directly into the values dictionary passed . This is used internally and automatically called on URL building .


def Func ( arg_0 ) : arg_1 = arg_0 . _get_input_buffer_cursor_line ( ) if arg_1 is None : return False arg_2 = bool ( arg_1 [ : arg_0 . _get_input_buffer_cursor_column ( ) ] . strip ( ) ) if arg_2 : arg_0 . _complete ( ) return not arg_2

def Func(arg_0):
        """ Called when the tab key is pressed. Returns whether to continue
            processing the event.
        """
        # Perform tab completion if:
        # 1) The cursor is in the input buffer.
        # 2) There is a non-whitespace character before the cursor.
        arg_1 = arg_0._get_input_buffer_cursor_line()
        if arg_1 is None:
            return False
        arg_2 = bool(arg_1[:arg_0._get_input_buffer_cursor_column()].strip())
        if arg_2:
            arg_0._complete()
        return not arg_2

Called when the tab key is pressed . Returns whether to continue processing the event .


(self, pattern, method=None, type_cast=None)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None ) : if not arg_3 : arg_3 = { } def decorator ( arg_4 ) : arg_0 . add ( arg_1 , arg_4 , arg_2 , arg_3 ) return arg_4 return decorator

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """Decorator for registering a path pattern.

        Args:
            pattern (str): Regex pattern to match a certain path
            method (str, optional): Usually used to define one of GET, POST,
                PUT, DELETE. You may use whatever fits your situation though.
                Defaults to None.
            type_cast (dict, optional): Mapping between the param name and
                one of `int`, `float` or `bool`. The value reflected by the
                provided param name will than be casted to the given type.
                Defaults to None.
        """
        if not arg_3:
            arg_3 = {}

        def decorator(arg_4):
            arg_0.add(arg_1, arg_4, arg_2, arg_3)
            return arg_4

        return decorator

Decorator for registering a path pattern .


return render_template(
        'invenio_groups/index.html',
        groups=groups,
        requests=requests,
        invitations=invitations,
        page=page,
        per_page=per_page,
        q=q
    )

def Func ( ) : arg_0 = request . args . get ( 'page' , 1 , type = int ) arg_1 = request . args . get ( 'per_page' , 5 , type = int ) arg_2 = request . args . get ( 'q' , '' ) arg_3 = Group . query_by_user ( current_user , eager = True ) if arg_2 : arg_3 = Group . search ( arg_3 , arg_2 ) arg_3 = arg_3 . paginate ( arg_0 , arg_1 = arg_1 ) arg_4 = Membership . query_requests ( current_user ) . count ( ) arg_5 = Membership . query_invitations ( current_user ) . count ( ) return render_template ( 'invenio_groups/Func.html' , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 , arg_0 = arg_0 , arg_1 = arg_1 , arg_2 = arg_2 )

def Func():
    """List all user memberships."""
    arg_0 = request.args.get('page', 1, type=int)
    arg_1 = request.args.get('per_page', 5, type=int)
    arg_2 = request.args.get('q', '')

    arg_3 = Group.query_by_user(current_user, eager=True)
    if arg_2:
        arg_3 = Group.search(arg_3, arg_2)
    arg_3 = arg_3.paginate(arg_0, arg_1=arg_1)

    arg_4 = Membership.query_requests(current_user).count()
    arg_5 = Membership.query_invitations(current_user).count()

    return render_template(
        'invenio_groups/Func.html',
        arg_3=arg_3,
        arg_4=arg_4,
        arg_5=arg_5,
        arg_0=arg_0,
        arg_1=arg_1,
        arg_2=arg_2
    )


def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Use this to send a structured event, with a name and arguments, to
        the client.

        By default, it uses this namespace's endpoint. You can send messages on
        other endpoints with something like:

            ``self.socket['/other_endpoint'].Func()``.

        However, it is possible that the ``'/other_endpoint'`` was not
        initialized yet, and that would yield a ``KeyError``.

        The only supported ``kwargs`` is ``callback``.  All other parameters
        must be passed positionally.

        :param event: The name of the event to trigger on the other end.
        :param callback: Pass in the callback keyword argument to define a
                         call-back that will be called when the client acks.

                         This callback is slightly different from the one from
                         ``send()``, as this callback will receive parameters
                         from the explicit call of the ``ack()`` function
                         passed to the listener on the client side.

                         The remote listener will need to explicitly ack (by
                         calling its last argument, a function which is
                         usually called 'ack') with some parameters indicating
                         success or error.  The 'ack' packet coming back here
                         will then trigger the callback function with the
                         returned values.
        :type callback: callable
        """
        arg_4 = arg_3.pop('callback', None)

        if arg_3:
            raise ValueError(
                "Func() only supports positional argument, to stay "
                "compatible with the Socket.IO protocol. You can "
                "however pass in a dictionary as the first argument")
        arg_5 = dict(type="event", name=arg_1, arg_2=arg_2,
                   endpoint=arg_0.ns_name)

        if arg_4:
            # By passing 'data', we indicate that we *want* an explicit ack
            # by the client code, not an automatic as with send().
            arg_5['ack'] = 'data'
            arg_5['id'] = msgid = arg_0.socket._get_next_msgid()
            arg_0.socket._save_ack_callback(msgid, arg_4)

        arg_0.socket.send_packet(arg_5)

Use this to send a structured event, with a name and arguments, to
        the client.

        By default, it uses this namespace's endpoint. You can send messages on
        other endpoints with something like:

            ``self.socket['/other_endpoint'].emit()``.

        However, it is possible that the ``'/other_endpoint'`` was not
        initialized yet, and that would yield a ``KeyError``.

        The only supported ``kwargs`` is ``callback``.  All other parameters
        must be passed positionally.

        :param event: The name of the event to trigger on the other end.
        :param callback: Pass in the callback keyword argument to define a
                         call-back that will be called when the client acks.

                         This callback is slightly different from the one from
                         ``send()``, as this callback will receive parameters
                         from the explicit call of the ``ack()`` function
                         passed to the listener on the client side.

                         The remote listener will need to explicitly ack (by
                         calling its last argument, a function which is
                         usually called 'ack') with some parameters indicating
                         success or error.  The 'ack' packet coming back here
                         will then trigger the callback function with the
                         returned values.
        :type callback: callable

Use this to send a structured event with a name and arguments to the client .


(
        content, to_fmt, deparagraph=False, mathjax=False,
        smart=True, extra_args=None)

return convert_text(
        augmented_content, 'latex', to_fmt,
        deparagraph=deparagraph, mathjax=mathjax,
        smart=smart, extra_args=extra_args)

def Func ( arg_0 , arg_1 , arg_2 = False , arg_3 = False , arg_4 = True , arg_5 = None ) : arg_6 = '\n' . join ( ( LSSTDOC_MACROS , arg_0 ) ) return convert_text ( arg_6 , 'latex' , arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , arg_4 = arg_4 , arg_5 = arg_5 )

def Func(
        arg_0, arg_1, arg_2=False, arg_3=False,
        arg_4=True, arg_5=None):
    """Convert lsstdoc-class LaTeX to another markup format.

    This function is a thin wrapper around `convert_text` that automatically
    includes common lsstdoc LaTeX macros.

    Parameters
    ----------
    content : `str`
        Original content.

    to_fmt : `str`
        Output format for the content (see https://pandoc.org/MANUAL.html).
        For example, 'html5'.

    deparagraph : `bool`, optional
        If `True`, then the
        `lsstprojectmeta.pandoc.filters.deparagraph.deparagraph` filter is
        used to remove paragraph (``
``, for example) tags around a single
        paragraph of content. That filter does not affect content that
        consists of multiple blocks (several paragraphs, or lists, for
        example). Default is `False`.

        For example, **without** this filter Pandoc will convert
        the string ``"Title text"`` to ``"
Title text
"`` in HTML. The
        paragraph tags aren't useful if you intend to wrap the converted
        content in different tags, like ``
``, using your own templating
        system.

        **With** this filter, Pandoc will convert the string ``"Title text"``
        to ``"Title text"`` in HTML.

    mathjax : `bool`, optional
        If `True` then Pandoc will markup output content to work with MathJax.
        Default is False.

    smart : `bool`, optional
        If `True` (default) then ascii characters will be converted to unicode
        characters like smart quotes and em dashes.

    extra_args : `list`, optional
        Sequence of Pandoc arguments command line arguments (such as
        ``'--normalize'``). The ``deparagraph``, ``mathjax``, and ``smart``
        arguments are convenience arguments that are equivalent to items
        in ``extra_args``.

    Returns
    -------
    output : `str`
        Content in the output (``to_fmt``) format.

    Notes
    -----
    This function will automatically install Pandoc if it is not available.
    See `ensure_pandoc`.
    """
    arg_6 = '\n'.join((LSSTDOC_MACROS, arg_0))
    return convert_text(
        arg_6, 'latex', arg_1,
        arg_2=arg_2, arg_3=arg_3,
        arg_4=arg_4, arg_5=arg_5)

Convert lsstdoc - class LaTeX to another markup format .


def Func ( arg_0 , arg_1 ) : arg_2 = Config ( ) for arg_3 in arg_0 : arg_4 = PyFileConfigLoader ( arg_3 , arg_1 = arg_1 ) try : arg_5 = arg_4 . load_config ( ) except ConfigFileNotFound : pass except : raise else : arg_2 . _merge ( arg_5 ) return arg_2

def Func(arg_0, arg_1):
    """Load multiple Python config files, merging each of them in turn.

    Parameters
    ==========
    config_files : list of str
        List of config files names to load and merge into the config.
    path : unicode
        The full path to the location of the config files.
    """
    arg_2 = Config()
    for arg_3 in arg_0:
        arg_4 = PyFileConfigLoader(arg_3, arg_1=arg_1)
        try:
            arg_5 = arg_4.load_config()
        except ConfigFileNotFound:
            pass
        except:
            raise
        else:
            arg_2._merge(arg_5)
    return arg_2

Load multiple Python config files merging each of them in turn .


(engine, crypto_factory, min_dt=None, max_dt=None,
                         logger=None)

return _generate_notebooks(remote_checkpoints,
                               remote_checkpoints.c.last_modified,
                               engine, crypto_factory, min_dt, max_dt, logger)

def Func(arg_0, arg_1, arg_2=None, arg_3=None,
                         arg_4=None):
    """
    Create a generator of decrypted remote checkpoints.

    Checkpoints are yielded in ascending order of their timestamp.

    This function selects all notebook checkpoints (optionally, falling within
    a datetime range), decrypts them, and returns a generator yielding dicts,
    each containing a decoded notebook and metadata including the user,
    filepath, and timestamp.

    Parameters
    ----------
    engine : SQLAlchemy.engine
        Engine encapsulating database connections.
    crypto_factory : function[str -> Any]
        A function from user_id to an object providing the interface required
        by PostgresContentsManager.crypto.  Results of this will be used for
        decryption of the selected notebooks.
    min_dt : datetime.datetime, optional
        Minimum last modified datetime at which a file will be included.
    max_dt : datetime.datetime, optional
        Last modified datetime at and after which a file will be excluded.
    logger : Logger, optional
    """
    return _generate_notebooks(remote_checkpoints,
                               remote_checkpoints.c.last_modified,
                               arg_0, arg_1, arg_2, arg_3, arg_4)

Create a generator of decrypted remote checkpoints .


def Func ( arg_0 , arg_1 , arg_2 ) : for arg_3 , arg_4 in arg_2 . iteritems ( ) : if arg_4 == '' : arg_0 . sign [ arg_1 ] [ arg_3 ] = - 1 arg_0 . data [ arg_1 ] [ arg_3 ] = arg_4 else : if not arg_0 . data [ arg_1 ] . get ( arg_3 , None ) : arg_0 . sign [ arg_1 ] [ arg_3 ] = 1 elif float ( arg_4 ) > float ( arg_0 . data [ arg_1 ] [ arg_3 ] ) : arg_0 . sign [ arg_1 ] [ arg_3 ] = 1 elif float ( arg_4 ) < float ( arg_0 . data [ arg_1 ] [ arg_3 ] ) : arg_0 . sign [ arg_1 ] [ arg_3 ] = - 1 else : arg_0 . sign [ arg_1 ] [ arg_3 ] = 0 arg_0 . data [ arg_1 ] [ arg_3 ] = "%.2f" % float ( arg_4 )

def Func(arg_0, arg_1, arg_2):
        """ store metric in data tree and calc offset signs

        sign < 0 is CYAN, means metric value is lower then previous,
        sign > 1 is YELLOW, means metric value is higher then prevoius,
        sign == 0 is WHITE, means initial or equal metric value
        """
        for arg_3, arg_4 in arg_2.iteritems():
            if arg_4 == '':
                arg_0.sign[arg_1][arg_3] = -1
                arg_0.data[arg_1][arg_3] = arg_4
            else:
                if not arg_0.data[arg_1].get(arg_3, None):
                    arg_0.sign[arg_1][arg_3] = 1
                elif float(arg_4) > float(arg_0.data[arg_1][arg_3]):
                    arg_0.sign[arg_1][arg_3] = 1
                elif float(arg_4) < float(arg_0.data[arg_1][arg_3]):
                    arg_0.sign[arg_1][arg_3] = -1
                else:
                    arg_0.sign[arg_1][arg_3] = 0
                arg_0.data[arg_1][arg_3] = "%.2f" % float(arg_4)


def Func ( arg_0 ) : arg_1 = arg_0 . _session . get ( API_ENDPOINT + '/Func' ) return arg_0 . _object_factory ( OBJECT_TYPE , arg_1 )

def Func(arg_0):
        """Get the details of the person accessing the API.

        Raises:
            ApiError: If the Webex Teams cloud returns an error.

        """
        # API request
        arg_1 = arg_0._session.get(API_ENDPOINT + '/Func')

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

Get the details of the person accessing the API .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . next_sibling ( ) if arg_2 is not None : arg_0 . add_message ( "unreachable" , arg_1 = arg_2 )

def Func(arg_0, arg_1):
        """check unreachable code"""
        arg_2 = arg_1.next_sibling()
        if arg_2 is not None:
            arg_0.add_message("unreachable", arg_1=arg_2)


def Func ( arg_0 ) : if arg_0 . _spin_thread is not None : arg_0 . _stop_spinning . set ( ) arg_0 . _spin_thread . join ( ) arg_0 . _spin_thread = None

def Func(arg_0):
        """stop background spin_thread, if any"""
        if arg_0._spin_thread is not None:
            arg_0._stop_spinning.set()
            arg_0._spin_thread.join()
            arg_0._spin_thread = None


def Func ( arg_0 , arg_1 ) : if isscalar ( arg_1 ) : arg_2 = int ( floor ( abs ( sin ( arg_1 ) ) * arg_4 ) ) if arg_2 == arg_4 : return _astrometricErrorFactors [ arg_0 ] [ arg_4 - 1 ] else : return _astrometricErrorFactors [ arg_0 ] [ arg_2 ] else : arg_3 = array ( floor ( abs ( sin ( arg_1 ) ) * arg_4 ) , dtype = int ) arg_3 [ ( arg_3 == arg_4 ) ] = arg_4 - 1 return _astrometricErrorFactors [ arg_0 ] [ arg_3 ]

def Func(arg_0, arg_1):
  """
  Look up the numerical factors to apply to the sky averaged parallax error in order to obtain error
  values for a given astrometric parameter, taking the Ecliptic latitude and the number of transits into
  account.

  Parameters
  ----------

  observable - Name of astrometric observable (one of: alphaStar, delta, parallax, muAlphaStar, muDelta)
  beta       - Values(s) of the Ecliptic latitude.

  Returns
  -------

  Numerical factors to apply to the errors of the given observable.
  """
  if isscalar(arg_1):
    arg_2=int(floor(abs(sin(arg_1))*arg_4))
    if arg_2 == arg_4:
      return _astrometricErrorFactors[arg_0][arg_4-1]
    else:
      return _astrometricErrorFactors[arg_0][arg_2]
  else:
    arg_3 = array(floor(abs(sin(arg_1))*arg_4), dtype=int)
    arg_3[(arg_3==arg_4)] = arg_4-1
    return _astrometricErrorFactors[arg_0][arg_3]

Look up the numerical factors to apply to the sky averaged parallax error in order to obtain error values for a given astrometric parameter taking the Ecliptic latitude and the number of transits into account .


def Func ( arg_0 , arg_1 , arg_2 ) : if len ( arg_1 . annotations ) != 0 : if not arg_0 . annotation_spdx_id_set : arg_0 . annotation_spdx_id_set = True arg_1 . annotations [ - 1 ] . spdx_id = arg_2 return True else : raise CardinalityError ( 'Annotation::SPDXREF' ) else : raise OrderError ( 'Annotation::SPDXREF' )

def Func(arg_0, arg_1, arg_2):
        """Sets the annotation SPDX Identifier.
        Raises CardinalityError if already set. OrderError if no annotator
        defined before.
        """
        if len(arg_1.annotations) != 0:
            if not arg_0.annotation_spdx_id_set:
                arg_0.annotation_spdx_id_set = True
                arg_1.annotations[-1].spdx_id = arg_2
                return True
            else:
                raise CardinalityError('Annotation::SPDXREF')
        else:
            raise OrderError('Annotation::SPDXREF')

Sets the annotation SPDX Identifier . Raises CardinalityError if already set . OrderError if no annotator defined before .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_3
=
[
]
arg_4
=
1
for
arg_5
in
arg_1
:
arg_6
=
for
arg_7
in
re_markup_tags
:
arg_8
=
arg_7
.
match
(
arg_5
)
if
arg_8
:
arg_6
=
string
.
lower
(
arg_8
.
group
(
1
)
)
arg_9
=
len
(
arg_8
.
group
(
0
)
)
arg_5
=
" "
*
arg_9
+
arg_5
[
arg_9
:
]
break
if
arg_6
:
arg_4
=
0
arg_0
.
add_markup
(
)
arg_0
.
markup
=
arg_6
if
len
(
string
.
strip
(
arg_5
)
)
>
0
:
arg_0
.
markup_lines
.
append
(
arg_5
)
elif
arg_4
==
0
:
arg_0
.
markup_lines
.
append
(
arg_5
)
arg_0
.
add_markup
(
)
return
arg_0
.
markups

def  Func( arg_0, arg_1 ):
        """process a block content and return a list of DocMarkup objects
           corresponding to it"""
        arg_2       = None
        arg_3 = []
        arg_4        = 1

        for arg_5 in arg_1:
            arg_6 = None
            for arg_7 in re_markup_tags:
                arg_8 = arg_7.match( arg_5 )
                if arg_8:
                    arg_6  = string.lower( arg_8.group( 1 ) )
                    arg_9 = len( arg_8.group( 0 ) )
                    arg_5   = " " * arg_9 + arg_5[arg_9:]   # remove markup from line
                    break

            # is it the start of a new markup section ?
            if arg_6:
                arg_4 = 0
                arg_0.add_markup()  # add current markup content
                arg_0.markup = arg_6
                if len( string.strip( arg_5 ) ) > 0:
                    arg_0.markup_lines.append( arg_5 )
            elif arg_4 == 0:
                arg_0.markup_lines.append( arg_5 )

        arg_0.add_markup()

        return arg_0.markups


(dates,
                    years=0, months=0, weeks=0, days=0, firstweekday=SATURDAY,
                    now=None)

return dates - dates_to_keep(dates,
                                 years=years, months=months,
                                 weeks=weeks, days=days,
                                 firstweekday=firstweekday, now=now)

def Func(arg_0,
                    arg_1=0, arg_2=0, arg_3=0, arg_4=0, arg_5=arg_6,
                    arg_7=None):
    """
    Return a set of date that should be deleted, out of ``dates``.

    See ``to_keep`` for a description of arguments.
    """
    arg_0 = set(arg_0)
    return arg_0 - dates_to_keep(arg_0,
                                 arg_1=arg_1, arg_2=arg_2,
                                 arg_3=arg_3, arg_4=arg_4,
                                 arg_5=arg_5, arg_7=arg_7)

Return a set of date that should be deleted out of dates .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : title ( ) arg_4 = [ FileRecordStream ( 'chunk_%d.csv' % arg_9 ) for arg_9 in range ( arg_1 ) ] with FileRecordStream ( arg_2 , write = True , arg_3 = arg_3 ) as o : arg_4 = [ FileRecordStream ( 'chunk_%d.csv' % arg_9 ) for arg_9 in range ( arg_1 ) ] arg_5 = [ arg_10 . getNextRecord ( ) for arg_10 in arg_4 ] while not all ( arg_6 is None for arg_6 in arg_5 ) : arg_7 = [ arg_9 for arg_9 , arg_6 in enumerate ( arg_5 ) if arg_6 is not None ] arg_5 = [ arg_5 [ arg_9 ] for arg_9 in arg_7 ] arg_4 = [ arg_4 [ arg_9 ] for arg_9 in arg_7 ] arg_6 = min ( arg_5 , arg_0 = itemgetter ( * arg_0 ) ) o . appendRecord ( arg_6 ) arg_8 = arg_5 . index ( arg_6 ) arg_5 [ arg_8 ] = arg_4 [ arg_8 ] . getNextRecord ( ) for arg_9 , arg_10 in enumerate ( arg_4 ) : arg_10 . close ( ) os . remove ( 'chunk_%d.csv' % arg_9 )

def Func(arg_0, arg_1, arg_2, arg_3):
  """Merge sorted chunk files into a sorted output file

  chunkCount - the number of available chunk files
  outputFile the name of the sorted output file

  Func()

  """
  title()

  # Open all chun files
  arg_4 = [FileRecordStream('chunk_%d.csv' % arg_9) for arg_9 in range(arg_1)]

  # Open output file
  with FileRecordStream(arg_2, write=True, arg_3=arg_3) as o:
    # Open all chunk files
    arg_4 = [FileRecordStream('chunk_%d.csv' % arg_9) for arg_9 in range(arg_1)]
    arg_5 = [arg_10.getNextRecord() for arg_10 in arg_4]

    # This loop will run until all files are exhausted
    while not all(arg_6 is None for arg_6 in arg_5):
      # Cleanup None values (files that were exhausted)
      arg_7 = [arg_9 for arg_9,arg_6 in enumerate(arg_5) if arg_6 is not None]
      arg_5 = [arg_5[arg_9] for arg_9 in arg_7]
      arg_4 = [arg_4[arg_9] for arg_9 in arg_7]

      # Find the current record
      arg_6 = min(arg_5, arg_0=itemgetter(*arg_0))
      # Write it to the file
      o.appendRecord(arg_6)

      # Find the index of file that produced the current record
      arg_8 = arg_5.index(arg_6)
      # Read a new record from the file
      arg_5[arg_8] = arg_4[arg_8].getNextRecord()

  # Cleanup chunk files
  for arg_9, arg_10 in enumerate(arg_4):
    arg_10.close()
    os.remove('chunk_%d.csv' % arg_9)

Merge sorted chunk files into a sorted output file

  chunkCount - the number of available chunk files
  outputFile the name of the sorted output file

  _mergeFiles()


def Func ( arg_0 ) : if os . path . isfile ( arg_0 . workspace ) : arg_1 = threading . Thread ( target = arg_0 . highlight_from_file , args = ( arg_0 . workspace , ) ) elif os . path . isdir ( arg_0 . workspace ) : arg_1 = threading . Thread ( target = arg_0 . highlight_from_dir , args = ( arg_0 . workspace , ) ) arg_1 . start ( )

def Func(arg_0):
        """
        Given a Manticore workspace, or trace file, highlight the basic blocks.
        """
        if os.path.isfile(arg_0.workspace):
            arg_1 = threading.Thread(target=arg_0.highlight_from_file,
                                 args=(arg_0.workspace,))
        elif os.path.isdir(arg_0.workspace):
            arg_1 = threading.Thread(target=arg_0.highlight_from_dir,
                                 args=(arg_0.workspace,))
        arg_1.start()

Given a Manticore workspace or trace file highlight the basic blocks .


return Editex().sim(src, tar, cost, local)

def Func ( arg_0 , arg_1 , arg_2 = ( 0 , 1 , 2 ) , arg_3 = False ) : return Editex ( ) . sim ( arg_0 , arg_1 , arg_2 , arg_3 )

def Func(arg_0, arg_1, arg_2=(0, 1, 2), arg_3=False):
    """Return the normalized Editex similarity of two strings.

    This is a wrapper for :py:meth:`Editex.sim`.

    Parameters
    ----------
    src : str
        Source string for comparison
    tar : str
        Target string for comparison
    cost : tuple
        A 3-tuple representing the cost of the four possible edits: match,
        same-group, and mismatch respectively (by default: (0, 1, 2))
    local : bool
        If True, the local variant of Editex is used

    Returns
    -------
    int
        Normalized Editex similarity

    Examples
    --------
    >>> round(Func('cat', 'hat'), 12)
    0.666666666667
    >>> round(Func('Niall', 'Neil'), 12)
    0.8
    >>> Func('aluminum', 'Catalan')
    0.25
    >>> Func('ATCG', 'TAGC')
    0.25

    """
    return Editex().sim(arg_0, arg_1, arg_2, arg_3)

Return the normalized Editex similarity of two strings.

    This is a wrapper for :py:meth:`Editex.sim`.

    Parameters
    ----------
    src : str
        Source string for comparison
    tar : str
        Target string for comparison
    cost : tuple
        A 3-tuple representing the cost of the four possible edits: match,
        same-group, and mismatch respectively (by default: (0, 1, 2))
    local : bool
        If True, the local variant of Editex is used

    Returns
    -------
    int
        Normalized Editex similarity

    Examples
    --------
    >>> round(sim_editex('cat', 'hat'), 12)
    0.666666666667
    >>> round(sim_editex('Niall', 'Neil'), 12)
    0.8
    >>> sim_editex('aluminum', 'Catalan')
    0.25
    >>> sim_editex('ATCG', 'TAGC')
    0.25

Return the normalized Editex similarity of two strings .


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

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

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

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

    arg_6 = GOOGLE_IMAGES
    return GoogleSearch(arg_0, arg_1, arg_6, arg_2, arg_3, arg_4, arg_5)

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


def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : super ( Certificate , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_6 = BytearrayStream ( arg_1 . Func ( arg_0 . length ) ) arg_0 . certificate_type = CertificateType ( ) arg_0 . certificate_value = CertificateValue ( ) arg_0 . certificate_type . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . certificate_value . 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 Certificate object and decode it into its
        constituent parts.

        Args:
            istream (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.
        """
        super(Certificate, arg_0).Func(arg_1, arg_2=arg_2)
        arg_6 = BytearrayStream(arg_1.Func(arg_0.length))

        arg_0.certificate_type = CertificateType()
        arg_0.certificate_value = CertificateValue()

        arg_0.certificate_type.Func(arg_6, arg_2=arg_2)
        arg_0.certificate_value.Func(arg_6, arg_2=arg_2)

        arg_0.is_oversized(arg_6)

Read the data encoding the Certificate object and decode it into its
        constituent parts.

        Args:
            istream (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.

Read the data encoding the Certificate object and decode it into its constituent parts .


return await request(timeout=0, **kwargs)

async
def
Func
(
arg_0
)
:
logger
.
debug
(
"connecting to the stream"
)
await
arg_0
.
client
.
setup
if
arg_0
.
session
is
:
arg_0
.
session
=
arg_0
.
client
.
_session
arg_2
=
await
arg_0
.
client
.
headers
.
prepare_request
(
**
arg_0
.
kwargs
)
arg_3
=
arg_0
.
client
.
error_handler
(
arg_0
.
session
.
request
)
return
await
arg_3
(
timeout
=
0
,
**
arg_2
)

async def Func(arg_0):
        """
            Connect to the stream

        Returns
        -------
        asyncio.coroutine
            The streaming response
        """
        logger.debug("connecting to the stream")
        await arg_0.client.setup
        if arg_0.session is None:
            arg_0.session = arg_0.client._session
        arg_2 = await arg_0.client.headers.prepare_request(**arg_0.kwargs)
        arg_3 = arg_0.client.error_handler(arg_0.session.request)

        return await arg_3(timeout=0, **arg_2)


async def Func ( arg_0 , arg_1 ) : arg_2 = hangouts_pb2 . EasterEggResponse ( ) await arg_0 . _pb_request ( 'conversations/easteregg' , arg_1 , arg_2 ) return arg_2

async def Func(arg_0, arg_1):
        """Send an easter egg event to a conversation."""
        arg_2 = hangouts_pb2.EasterEggResponse()
        await arg_0._pb_request('conversations/easteregg',
                               arg_1, arg_2)
        return arg_2

Send an easter egg event to a conversation .


return [t for t in self.get_tasks(Task.READY)
                if not self._is_engine_task(t.task_spec)]

def Func ( arg_0 ) : return [ arg_1 for arg_1 in arg_0 . get_tasks ( Task . READY ) if not arg_0 . _is_engine_task ( arg_1 . task_spec ) ]

def Func(arg_0):
        """
        Returns a list of User Tasks that are READY for user action
        """
        return [arg_1 for arg_1 in arg_0.get_tasks(Task.READY)
                if not arg_0._is_engine_task(arg_1.task_spec)]


def Func ( arg_0 , arg_1 , ** arg_2 ) : for arg_3 , arg_4 in _parse_keyvalue_list ( arg_1 ) : arg_0 . cookies . set ( arg_3 , arg_4 , ** arg_2 )

def Func(arg_0, arg_1, **arg_2):
        """Parses a semi-colon delimited list of cookies.

        Example: foo=bar;baz=qux
        """
        for arg_3, arg_4 in _parse_keyvalue_list(arg_1):
            arg_0.cookies.set(arg_3, arg_4, **arg_2)

Parses a semi - colon delimited list of cookies .


def Func ( arg_0 ) : arg_1 = google_v2_operations . get_action_image ( arg_0 . _op , _ACTION_USER_COMMAND ) arg_2 = google_v2_operations . is_success ( arg_0 . _op ) arg_3 = { } for arg_4 in google_v2_operations . get_events ( arg_0 . _op ) : if arg_0 . _filter ( arg_4 ) : continue arg_5 , arg_6 = arg_0 . _map ( arg_4 ) arg_7 = arg_5 [ 'name' ] if arg_7 == 'ok' : if not arg_2 or 'ok' in arg_3 : continue if arg_7 == 'pulling-image' : if arg_6 . group ( 1 ) != arg_1 : continue arg_3 [ arg_7 ] = arg_5 return sorted ( arg_3 . values ( ) , key = operator . itemgetter ( 'start-time' ) )

def Func(arg_0):
    """Filter the granular v2 events down to events of interest.

    Filter through the large number of granular events returned by the
    pipelines API, and extract only those that are interesting to a user. This
    is implemented by filtering out events which are known to be uninteresting
    (i.e. the default actions run for every job) and by explicitly matching
    specific events which are interesting and mapping those to v1 style naming.

    Events which are not whitelisted or blacklisted will still be output,
    meaning any events which are added in the future won't be masked.
    We don't want to suppress display of events that we don't recognize.
    They may be important.

    Returns:
      A list of maps containing the normalized, filtered events.
    """
    # Need the user-image to look for the right "pulling image" event
    arg_1 = google_v2_operations.get_action_image(arg_0._op,
                                                       _ACTION_USER_COMMAND)

    # Only create an "ok" event for operations with SUCCESS status.
    arg_2 = google_v2_operations.is_success(arg_0._op)

    # Events are keyed by name for easier deletion.
    arg_3 = {}

    # Events are assumed to be ordered by timestamp (newest to oldest).
    for arg_4 in google_v2_operations.get_events(arg_0._op):
      if arg_0._filter(arg_4):
        continue

      arg_5, arg_6 = arg_0._map(arg_4)
      arg_7 = arg_5['name']

      if arg_7 == 'ok':
        # If we want the "ok" event, we grab the first (most recent).
        if not arg_2 or 'ok' in arg_3:
          continue

      if arg_7 == 'pulling-image':
        if arg_6.group(1) != arg_1:
          continue

      arg_3[arg_7] = arg_5

    return sorted(arg_3.values(), key=operator.itemgetter('start-time'))

Filter the granular v2 events down to events of interest .