def Func ( arg_0 , arg_1 ) : arg_2 = os . path . join ( getCheckpointParentDir ( arg_0 ) , arg_1 + g_defaultCheckpointExtension ) arg_2 = os . path . abspath ( arg_2 ) return arg_2

def Func(arg_0, arg_1):
  """Creates directory for serialization of the model

  checkpointLabel:
      Checkpoint label (string)

  Returns:
    absolute path to the serialization directory
  """
  arg_2 = os.path.join(getCheckpointParentDir(arg_0),
                               arg_1 + g_defaultCheckpointExtension)
  arg_2 = os.path.abspath(arg_2)

  return arg_2


def
Func
(
arg_0
)
:
if
arg_0
.
_Func
is
:
arg_1
=
arg_0
.
request
(
"POST /4/sessions"
)
arg_0
.
_Func
=
arg_1
.
get
(
"session_key"
)
or
arg_1
.
get
(
"Func"
)
return
CallableString
(
arg_0
.
_Func
)

def Func(arg_0):
        """
        Return the session id of the current connection.

        The session id is issued (through an API request) the first time it is requested, but no sooner. This is
        because generating a session id puts it into the DKV on the server, which effectively locks the cluster. Once
        issued, the session id will stay the same until the connection is closed.
        """
        if arg_0._Func is None:
            arg_1 = arg_0.request("POST /4/sessions")
            arg_0._Func = arg_1.get("session_key") or arg_1.get("Func")
        return CallableString(arg_0._Func)

Return the session id of the current connection .


(self, signature=None, encryption=None,
                       serialization=None, compression=None)

def Func(arg_0, arg_1=None, arg_2=None,
                       arg_3=None, arg_4=None):
        '''Set algorithms used for sealing. Defaults can not be overridden.'''

        arg_0.signature_algorithms = \
            arg_0._update_dict(arg_1, arg_0.DEFAULT_SIGNATURE)

        arg_0.encryption_algorithms = \
            arg_0._update_dict(arg_2, arg_0.DEFAULT_ENCRYPTION)

        arg_0.serialization_algorithms = \
            arg_0._update_dict(arg_3, arg_0.DEFAULT_SERIALIZATION)

        arg_0.compression_algorithms = \
            arg_0._update_dict(arg_4, arg_0.DEFAULT_COMPRESSION)

Set algorithms used for sealing . Defaults can not be overridden .


return {
        tuple(sorted([n, u, v], key=str))
        for n in graph
        for u, v in itt.combinations(graph[n], 2)
        if graph.has_edge(u, v)
    }

def Func ( arg_0 : arg_1 ) -> SetOfNodeTriples : return { tuple ( sorted ( [ arg_2 , arg_3 , arg_4 ] , key = str ) ) for arg_2 in arg_0 for arg_3 , arg_4 in itt . combinations ( arg_0 [ arg_2 ] , 2 ) if arg_0 . has_edge ( arg_3 , arg_4 ) }

def Func(arg_0: arg_1) -> SetOfNodeTriples:
    """Return a set of all triangles pointed by the given node."""
    return {
        tuple(sorted([arg_2, arg_3, arg_4], key=str))
        for arg_2 in arg_0
        for arg_3, arg_4 in itt.combinations(arg_0[arg_2], 2)
        if arg_0.has_edge(arg_3, arg_4)
    }

Return a set of all triangles pointed by the given node .


(self, bucket, folder, key=None, skip=None,
                      content_types=None)

def Func(arg_0, arg_1, arg_2, arg_3=None, arg_4=None,
                      arg_5=None):
        """Recursively upload a ``folder`` into a backet.

        :param bucket: bucket where to upload the folder to
        :param folder: the folder location in the local file system
        :param key: Optional key where the folder is uploaded
        :param skip: Optional list of files to skip
        :param content_types: Optional dictionary mapping suffixes to
            content types
        :return: a coroutine
        """
        arg_6 = FolderUploader(arg_0, arg_1, arg_2, arg_3, arg_4,
                                  arg_5)
        return arg_6.start()

Recursively upload a folder into a backet .


def
Func
(
arg_0
)
:
from
pylab
import
plot
,
xlim
,
grid
,
title
,
ylabel
,
axis
arg_1
=
linspace
(
0
,
1
,
arg_0
.
N
)
xlim
(
0
,
1
)
plot
(
arg_1
,
arg_0
.
data
)
grid
(
True
)
title
(
'%s Window (%s points)'
%
(
arg_0
.
name
.
capitalize
(
)
,
arg_0
.
N
)
)
ylabel
(
'Amplitude'
)
axis
(
[
0
,
1
,
0
,
1.1
]
)

def Func(arg_0):
        """Plot the window in the time domain

        .. plot::
            :width: 80%
            :include-source:

            from spectrum.window import Window
            w = Window(64, name='hamming')
            w.Func()

        """
        from pylab import plot, xlim, grid, title, ylabel, axis
        arg_1 = linspace(0, 1, arg_0.N)
        xlim(0, 1)
        plot(arg_1, arg_0.data)
        grid(True)
        title('%s Window (%s points)' % (arg_0.name.capitalize(), arg_0.N))
        ylabel('Amplitude')
        axis([0, 1, 0, 1.1])

Plot the window in the time domain

        .. plot::
            :width: 80%
            :include-source:

            from spectrum.window import Window
            w = Window(64, name='hamming')
            w.plot_window()


def Func(arg_0, arg_1):
    """
    Makes the python dict corresponding to the
    JSON that needs to be sent for a successful
    response. Result is the actual payload
    that gets sent.
    """
    arg_2 = arg_0.make_response(arg_3.RESPONSE_STATUS_SUCCESS)
    arg_2[arg_3.RESPONSE_KEY_RESULT] = arg_1
    return arg_2

Makes the python dict corresponding to the JSON that needs to be sent for a successful response . Result is the actual payload that gets sent .


(self, train_set, valid_set=None, test_set=None, train_size=None)

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None):
        """
        Train the model and return costs.
        """
        arg_0._epoch = 0
        while True:
            if arg_0._skip_epochs > 0:
                logging.info("skipping one epoch ...")
                arg_0._skip_epochs -= 1
                arg_0._epoch += 1
                yield None
                continue
            # Test
            if not arg_0._epoch % arg_0.config.test_frequency and arg_3:
                try:
                    arg_0._run_test(arg_0._epoch, arg_3)
                except KeyboardInterrupt:
                    logging.info('interrupted!')
                    break
            # Validate
            if not arg_0._epoch % arg_0.validation_frequency and arg_2:
                try:

                    if not arg_0._run_valid(arg_0._epoch, arg_2):
                        logging.info('patience elapsed, bailing out')
                        break
                except KeyboardInterrupt:
                    logging.info('interrupted!')
                    break
            # Train one step

            try:
                arg_6 = arg_0._run_Func(arg_0._epoch, arg_1, arg_4)
            except KeyboardInterrupt:
                logging.info('interrupted!')
                break
            # Check costs
            if np.isnan(arg_6[0][1]):
                logging.info("NaN detected in costs, rollback to last parameters")
                arg_0.set_params(*arg_0.checkpoint)
            else:
                arg_0._epoch += 1
                arg_0.network.epoch_callback()

            yield dict(arg_6)

        if arg_2 and arg_0.config.get("save_best_parameters", True):
            arg_0.set_params(*arg_0.best_params)
        if arg_3:
            arg_0._run_test(-1, arg_3)


def Func(*arg_0):
    """ Deprecation warning decorator. Takes optional deprecation message,
    otherwise will use a generic warning. """
    def wrap(arg_1):
        def wrapped_func(*arg_0, **arg_2):
            warnings.warn(arg_3, category=DeprecationWarning)
            return arg_1(*arg_0, **arg_2)
        return wrapped_func

    if len(arg_0) == 1 and callable(arg_0[0]):
        arg_3 = "Function '%s' will be Func in future versions of " \
            "Neurosynth." % arg_0[0].__name__
        return wrap(arg_0[0])
    else:
        arg_3 = arg_0[0]
        return wrap

Deprecation warning decorator . Takes optional deprecation message otherwise will use a generic warning .


def Func ( arg_0 , arg_1 = 'r' ) : arg_2 , arg_3 , arg_4 = ZIP_REGEX . search ( arg_0 ) . groups ( ) if arg_3 and zipfile . is_zipfile ( arg_3 ) : return zipfile . ZipFile ( arg_3 , arg_1 = arg_1 ) . open ( arg_4 ) else : return io . open ( arg_0 , arg_1 = arg_1 )

def Func(arg_0, arg_1='r'):
    """
    Opens the given file. If the path contains a folder with a .zip suffix, then
    the folder is treated as a zip archive, opening the file inside the archive.

    :return: a file object, as in `open`, or as in `ZipFile.open`.
    """

    arg_2, arg_3, arg_4 = ZIP_REGEX.search(arg_0).groups()
    if arg_3 and zipfile.is_zipfile(arg_3):
        return zipfile.ZipFile(arg_3, arg_1=arg_1).open(arg_4)
    else:
        return io.open(arg_0, arg_1=arg_1)

Opens the given file . If the path contains a folder with a . zip suffix then the folder is treated as a zip archive opening the file inside the archive .


return User(user_id, entity.properties.display_name,
                    entity.properties.first_name,
                    entity.properties.photo_url,
                    entity.properties.email,
                    (self_user_id == user_id) or (self_user_id is None))

def Func ( arg_0 , arg_1 ) : arg_2 = UserID ( chat_id = arg_0 . id . chat_id , gaia_id = arg_0 . id . gaia_id ) return User ( arg_2 , arg_0 . properties . display_name , arg_0 . properties . first_name , arg_0 . properties . photo_url , arg_0 . properties . email , ( arg_1 == arg_2 ) or ( arg_1 is None ) )

def Func(arg_0, arg_1):
        """Construct user from ``Entity`` message.

        Args:
            entity: ``Entity`` message.
            self_user_id (~hangups.user.UserID or None): The ID of the current
                user. If ``None``, assume ``entity`` is the current user.

        Returns:
            :class:`~hangups.user.User` object.
        """
        arg_2 = UserID(chat_id=arg_0.id.chat_id,
                         gaia_id=arg_0.id.gaia_id)
        return User(arg_2, arg_0.properties.display_name,
                    arg_0.properties.first_name,
                    arg_0.properties.photo_url,
                    arg_0.properties.email,
                    (arg_1 == arg_2) or (arg_1 is None))


(self,
                                    other_trajectory,
                                    used_runs,
                                    rename_dict,
                                    allowed_translations,
                                    ignore_data)

def Func(arg_0,
                                    arg_1,
                                    arg_2,
                                    arg_3,
                                    arg_4,
                                    arg_5):
        """ Merges derived parameters that have the `run_ALL` in a name.

        Creates a new parameter with the name of the first new run and links to this
        parameter to avoid copying in all other runs.

        """
        arg_6 = arg_1._derived_parameters.copy()
        # get first run_idx
        arg_7 = min(arg_2.values())

        arg_8 = arg_1.f_wildcard('$', -1)
        for arg_9 in arg_6:
            if arg_9 in arg_5:
                continue
            arg_10 = arg_9.split('.')
            if not any(arg_11 in arg_8 for arg_11 in arg_10):
                continue
            arg_5.add(arg_9)

            arg_12 = arg_6[arg_9]
            arg_13 = arg_0._rename_full_name(arg_9, arg_1,
                                                    arg_2=arg_2)
            if arg_13 in arg_0:
                arg_14 = arg_0.f_get(arg_13, fast_access=False)
                if (arg_14._equal_values(arg_14.f_get(), arg_12.f_get()) and
                        not (arg_14.f_has_range() or arg_12.f_has_range())):
                    continue

            arg_15 = arg_0._rename_full_name(arg_9,
                                                          arg_1,
                                                          new_run_idx=arg_7)

            arg_3[arg_9] = arg_15
            arg_16 = arg_12.v_comment
            arg_17 = arg_12.f_get_class_name()
            arg_17 = arg_0._create_class(arg_17)
            arg_18 = arg_0.f_add_leaf(arg_17,
                                          arg_15,
                                          arg_16=arg_16)
            for arg_19 in arg_2.values():
                if arg_19 == arg_7:
                    continue
                arg_20 = arg_0._rename_full_name(arg_9, arg_1,
                                                    new_run_idx=arg_19)
                arg_10 = arg_20.split('.')
                arg_21 = arg_10.pop()
                arg_22 = '.'.join(arg_10)
                if not arg_0.f_contains(arg_22, shortcuts=False):
                    arg_23 = arg_0.f_add_group(arg_22)
                else:
                    arg_23 = arg_0.f_get(arg_22)

                arg_23.f_add_link(arg_21, arg_18)

        for arg_9 in arg_6:
            if arg_9 in arg_5:
                continue
            arg_10 = arg_9.split('.')
            arg_5.add(arg_9)
            if any(arg_11 in arg_1._reversed_wildcards and arg_11 not in arg_4
                        for arg_11 in arg_10):
                continue
            arg_24 = arg_0._rename_full_name(arg_9, arg_1,
                                                    arg_2=arg_2)
            if arg_0.f_contains(arg_24):
                arg_14 = arg_0.f_get(arg_24, fast_access=False)
                arg_12 = arg_6[arg_9]
                if (arg_14._equal_values(arg_14.f_get(), arg_12.f_get()) and
                        not (arg_14.f_has_range() or arg_12.f_has_range())):
                    continue
                else:
                    arg_0._logger.error('Could not merge parameter `%s`. '
                                       'I will ignore it!' % arg_24)
            arg_3[arg_9] = arg_24

Merges derived parameters that have the run_ALL in a name .


def Func(arg_0, arg_1):
        """Examines out the response returned by a stanza handler and sends all
        stanzas provided.

        :Parameters:
            - `response`: the response to process. `None` or `False` means 'not
              handled'. `True` means 'handled'. Stanza or stanza list means
              handled with the stanzas to send back
        :Types:
            - `response`: `bool` or `Stanza` or iterable of `Stanza`

        :Returns:
            - `True`: if `response` is `Stanza`, iterable or `True` (meaning
              the stanza was processed).
            - `False`: when `response` is `False` or `None`

        :returntype: `bool`
        """

        if arg_1 is None or arg_1 is False:
            return False

        if isinstance(arg_1, Stanza):
            arg_0.send(arg_1)
            return True

        try:
            arg_1 = iter(arg_1)
        except TypeError:
            return bool(arg_1)

        for arg_2 in arg_1:
            if isinstance(arg_2, Stanza):
                arg_0.send(arg_2)
            else:
                logger.warning(u"Unexpected object in stanza handler result:"
                                                    u" {0!r}".format(arg_2))
        return True

Examines out the response returned by a stanza handler and sends all stanzas provided .


def
Func
(
arg_0
,
arg_1
=
False
)
:
if
arg_0
.
variant_level
!=
0
and
not
arg_1
:
return
'v'
if
isinstance
(
arg_0
,
dbus
.
Array
)
:
arg_2
=
frozenset
(
Func
(
arg_4
)
for
arg_4
in
arg_0
)
arg_3
=
len
(
arg_2
)
if
arg_3
>
1
:
raise
IntoDPValueError
(
arg_0
,
"dbus_object"
,
"has bad Func"
)
if
arg_3
==
0
:
return
'a'
+
arg_0
.
Func
return
'a'
+
[
arg_4
for
arg_4
in
arg_2
]
[
0
]
if
isinstance
(
arg_0
,
dbus
.
Struct
)
:
arg_2
=
(
Func
(
arg_4
)
for
arg_4
in
arg_0
)
return
'('
+
""
.
join
(
arg_4
for
arg_4
in
arg_2
)
+
')'
if
isinstance
(
arg_0
,
dbus
.
Dictionary
)
:
arg_5
=
frozenset
(
Func
(
arg_4
)
for
arg_4
in
arg_0
.
keys
(
)
)
arg_6
=
frozenset
(
Func
(
arg_4
)
for
arg_4
in
arg_0
.
values
(
)
)
arg_7
=
len
(
arg_5
)
arg_8
=
len
(
arg_6
)
if
arg_7
!=
arg_8
:
raise
IntoDPValueError
(
arg_0
,
"dbus_object"
,
"has bad Func"
)
if
arg_7
>
1
:
raise
IntoDPValueError
(
arg_0
,
"dbus_object"
,
"has bad Func"
)
if
arg_7
==
0
:
return
'a{'
+
arg_0
.
Func
+
'}'
return
'a{'
+
[
arg_4
for
arg_4
in
arg_5
]
[
0
]
+
[
arg_4
for
arg_4
in
arg_6
]
[
0
]
+
'}'
if
isinstance
(
arg_0
,
dbus
.
Boolean
)
:
return
'b'
if
isinstance
(
arg_0
,
dbus
.
Byte
)
:
return
'y'
if
isinstance
(
arg_0
,
dbus
.
Double
)
:
return
'd'
if
isinstance
(
arg_0
,
dbus
.
Int16
)
:
return
'n'
if
isinstance
(
arg_0
,
dbus
.
Int32
)
:
return
'i'
if
isinstance
(
arg_0
,
dbus
.
Int64
)
:
return
'x'
if
isinstance
(
arg_0
,
dbus
.
ObjectPath
)
:
return
'o'
if
isinstance
(
arg_0
,
dbus
.
Signature
)
:
return
'g'
if
isinstance
(
arg_0
,
dbus
.
String
)
:
return
's'
if
isinstance
(
arg_0
,
dbus
.
UInt16
)
:
return
'q'
if
isinstance
(
arg_0
,
dbus
.
UInt32
)
:
return
'u'
if
isinstance
(
arg_0
,
dbus
.
UInt64
)
:
return
't'
if
isinstance
(
arg_0
,
dbus
.
types
.
UnixFd
)
:
return
'h'
raise
IntoDPValueError
(
arg_0
,
"dbus_object"
,
"has no Func"
)

def Func(arg_0, arg_1=False):
    """
    Get the Func of a dbus object.

    :param dbus_object: the object
    :type dbus_object: a dbus object
    :param bool unpack: if True, unpack from enclosing variant type
    :returns: the corresponding Func
    :rtype: str
    """
    # pylint: disable=too-many-return-statements
    # pylint: disable=too-many-branches

    if arg_0.variant_level != 0 and not arg_1:
        return 'v'

    if isinstance(arg_0, dbus.Array):
        arg_2 = frozenset(Func(arg_4) for arg_4 in arg_0)
        arg_3 = len(arg_2)
        if arg_3 > 1:  # pragma: no cover
            raise IntoDPValueError(arg_0, "dbus_object",
                                   "has bad Func")

        if arg_3 == 0:
            return 'a' + arg_0.Func

        return 'a' + [arg_4 for arg_4 in arg_2][0]

    if isinstance(arg_0, dbus.Struct):
        arg_2 = (Func(arg_4) for arg_4 in arg_0)
        return '(' + "".join(arg_4 for arg_4 in arg_2) + ')'

    if isinstance(arg_0, dbus.Dictionary):
        arg_5 = frozenset(Func(arg_4) for arg_4 in arg_0.keys())
        arg_6 = frozenset(Func(arg_4) for arg_4 in arg_0.values())

        arg_7 = len(arg_5)
        arg_8 = len(arg_6)

        if arg_7 != arg_8:  # pragma: no cover
            raise IntoDPValueError(arg_0, "dbus_object",
                                   "has bad Func")

        if arg_7 > 1:  # pragma: no cover
            raise IntoDPValueError(arg_0, "dbus_object",
                                   "has bad Func")

        if arg_7 == 0:
            return 'a{' + arg_0.Func + '}'

        return 'a{' + [arg_4 for arg_4 in arg_5][0] + [arg_4
                                                  for arg_4 in arg_6][0] + '}'

    if isinstance(arg_0, dbus.Boolean):
        return 'b'

    if isinstance(arg_0, dbus.Byte):
        return 'y'

    if isinstance(arg_0, dbus.Double):
        return 'd'

    if isinstance(arg_0, dbus.Int16):
        return 'n'

    if isinstance(arg_0, dbus.Int32):
        return 'i'

    if isinstance(arg_0, dbus.Int64):
        return 'x'

    if isinstance(arg_0, dbus.ObjectPath):
        return 'o'

    if isinstance(arg_0, dbus.Signature):
        return 'g'

    if isinstance(arg_0, dbus.String):
        return 's'

    if isinstance(arg_0, dbus.UInt16):
        return 'q'

    if isinstance(arg_0, dbus.UInt32):
        return 'u'

    if isinstance(arg_0, dbus.UInt64):
        return 't'

    if isinstance(arg_0, dbus.types.UnixFd):  # pragma: no cover
        return 'h'

    raise IntoDPValueError(arg_0, "dbus_object",
                           "has no Func")

Get the signature of a dbus object.

    :param dbus_object: the object
    :type dbus_object: a dbus object
    :param bool unpack: if True, unpack from enclosing variant type
    :returns: the corresponding signature
    :rtype: str


def Func ( arg_0 , arg_1 ) : if arg_1 and arg_0 . synonyms : arg_2 = { } for arg_3 , arg_4 in arg_0 . synonyms . items ( ) : for arg_5 in arg_4 : arg_2 [ arg_5 . lower ( ) ] = arg_3 . lower ( ) if arg_1 . lower ( ) in arg_2 : return arg_2 [ arg_1 . lower ( ) ] return arg_1

def Func(arg_0, arg_1):
        """
        Given a string and a dict of synonyms, returns the 'preferred'
        word. Case insensitive.

        Args:
            word (str): A word.

        Returns:
            str: The preferred word, or the input word if not found.

        Example:
            >>> syn = {'snake': ['python', 'adder']}
            >>> Func('adder', syn)
            'snake'
            >>> Func('rattler', syn)
            'rattler'

        TODO:
            Make it handle case, returning the same case it received.
        """
        if arg_1 and arg_0.synonyms:
            # Make the reverse look-up table.
            arg_2 = {}
            for arg_3, arg_4 in arg_0.synonyms.items():
                for arg_5 in arg_4:
                    arg_2[arg_5.lower()] = arg_3.lower()

            # Now check words against this table.
            if arg_1.lower() in arg_2:
                return arg_2[arg_1.lower()]

        return arg_1

Given a string and a dict of synonyms, returns the 'preferred'
        word. Case insensitive.

        Args:
            word (str): A word.

        Returns:
            str: The preferred word, or the input word if not found.

        Example:
            >>> syn = {'snake': ['python', 'adder']}
            >>> find_synonym('adder', syn)
            'snake'
            >>> find_synonym('rattler', syn)
            'rattler'

        TODO:
            Make it handle case, returning the same case it received.

Given a string and a dict of synonyms returns the preferred word . Case insensitive .


def
Func
(
arg_0
,
arg_1
,
arg_2
=
arg_3
)
:
if
arg_2
is
not
arg_3
and
not
isinstance
(
arg_2
,
ActorRef
)
:
raise
ValueError
(
"Sender must be actor reference"
)
arg_0
.
_cell
.
send_message
(
arg_1
,
arg_2
)

def Func(arg_0, arg_1, arg_2=arg_3):
        """ Send a message to this actor. Asynchronous fire-and-forget.

        :param message: The message to send.
        :type message: Any

        :param sender: The sender of the message. If provided it will be made
            available to the receiving actor via the :attr:`Actor.sender` attribute.
        :type sender: :class:`Actor`
        """
        if arg_2 is not arg_3 and not isinstance(arg_2, ActorRef):
            raise ValueError("Sender must be actor reference")

        arg_0._cell.send_message(arg_1, arg_2)

Send a message to this actor . Asynchronous fire - and - forget .


def Func(arg_0, arg_1):
        """Returns the locations found via self.index_urls

        Checks the url_name on the main (first in the list) index and
        use this url_name to produce all locations
        """

        def mkurl_pypi_url(arg_2):
            arg_3 = posixpath.join(arg_2, arg_4)
            # For maximum compatibility with easy_install, ensure the path
            # ends in a trailing slash.  Although this isn't in the spec
            # (and PyPI can handle it without the slash) some other index
            # implementations might break if they relied on easy_install's
            # behavior.
            if not arg_3.endswith('/'):
                arg_3 = arg_3 + '/'
            return arg_3

        arg_4 = urllib_parse.quote(arg_1.lower())

        if arg_0.index_urls:
            # Check that we have the url_name correctly spelled:

            # Only check main index if index URL is given
            arg_5 = Link(
                mkurl_pypi_url(arg_0.index_urls[0]),
                trusted=True,
            )

            arg_6 = arg_0._get_page(arg_5)
            if arg_6 is None and PyPI.netloc not in str(arg_5):
                warnings.warn(
                    "Failed to find %r at %s. It is suggested to upgrade "
                    "your index to support normalized names as the name in "
                    "/simple/{name}." % (arg_1, arg_5),
                    RemovedInPip8Warning,
                )

                arg_4 = arg_0._find_url_name(
                    Link(arg_0.index_urls[0], trusted=True),
                    arg_4,
                ) or arg_4

        if arg_4 is not None:
            return [mkurl_pypi_url(arg_2) for arg_2 in arg_0.index_urls]
        return []

Returns the locations found via self . index_urls


def Func ( arg_0 ) : try : arg_1 = arg_0 . json . fuzzed if arg_0 . config . fuzz_web : arg_0 . client_queue . put ( ( request . environ . get ( 'REMOTE_ADDR' ) , arg_1 ) ) response . headers . append ( "Access-Control-Allow-Origin" , "*" ) response . headers . append ( "Accept-Encoding" , "identity" ) response . headers . append ( "Content-Type" , arg_0 . config . content_type ) if arg_0 . config . notify : PJFTestcaseServer . send_testcase ( arg_1 , '127.0.0.1' , arg_0 . config . ports [ "Funcrs" ] [ "TCASE_PORT" ] ) yield arg_1 except Exception as e : raise PJFBaseException ( e . message if hasattr ( e , "message" ) else str ( e ) )

def Func(arg_0):
        """
        Serve fuzzed JSON object
        """
        try:
            arg_1 = arg_0.json.fuzzed
            if arg_0.config.fuzz_web:
                arg_0.client_queue.put((request.environ.get('REMOTE_ADDR'), arg_1))
            response.headers.append("Access-Control-Allow-Origin", "*")
            response.headers.append("Accept-Encoding", "identity")
            response.headers.append("Content-Type", arg_0.config.content_type)
            if arg_0.config.notify:
                PJFTestcaseServer.send_testcase(arg_1, '127.0.0.1', arg_0.config.ports["Funcrs"]["TCASE_PORT"])
            yield arg_1
        except Exception as e:
            raise PJFBaseException(e.message if hasattr(e, "message") else str(e))


def Func ( arg_0 , arg_1 ) : def iterate_children ( arg_2 , arg_1 ) : if arg_2 . get_name ( ) == arg_1 : return arg_2 try : for arg_3 in arg_2 . get_children ( ) : arg_4 = iterate_children ( arg_3 , arg_1 ) if arg_4 is not None : return arg_4 else : continue except AttributeError : pass return iterate_children ( arg_0 , arg_1 )

def Func(arg_0, arg_1):
    """
    Iterate through a gtk container, `parent`,
    and return the widget with the name `name`.
    """
    # http://stackoverflow.com/questions/2072976/access-to-widget-in-gtk
    def iterate_children(arg_2, arg_1):
        if arg_2.get_name() == arg_1:
            return arg_2
        try:
            for arg_3 in arg_2.get_children():
                arg_4 = iterate_children(arg_3, arg_1)
                if arg_4 is not None:
                    return arg_4
                else:
                    continue
        except AttributeError:
            pass
    return iterate_children(arg_0, arg_1)

Iterate through a gtk container parent and return the widget with the name name .


def Func ( arg_0 , * arg_1 ) : for arg_2 in arg_0 . instructions : arg_2 . Func ( * arg_1 ) return arg_0

def Func(arg_0, *arg_1):
        """Add controls to all instructions."""
        for arg_2 in arg_0.instructions:
            arg_2.Func(*arg_1)
        return arg_0


def Func(arg_0,  arg_1):
    """
    Checks and validate provided input
    """
    for arg_2 in data.CONFIGURABLE_OPTIONS:
        arg_3 = arg_0._option_string_actions[arg_2]
        arg_4 = arg_7 = ''
        arg_5 = getattr(arg_1, arg_3.dest)
        arg_6 = None
        # cannot count this until we find a way to test input
        if not arg_1.noinput:  # pragma: no cover
            if arg_3.choices:
                arg_4 = ' (choices: {0})'.format(', '.join(arg_3.choices))
            if arg_5:
                if type(arg_5) == list:
                    arg_7 = ' [default {0}]'.format(', '.join(arg_5))
                else:
                    arg_7 = ' [default {0}]'.format(arg_5)

            while not arg_6:
                arg_8 = '{0}{1}{2}: '.format(arg_3.help, arg_4, arg_7)
                if arg_3.choices in ('yes', 'no'):
                    arg_6 = utils.query_yes_no(arg_8)
                else:
                    arg_6 = compat.input(arg_8)
                arg_6 = compat.clean(arg_6)
                if not arg_6 and arg_5:
                    arg_6 = arg_5
                if arg_6 and arg_3.dest == 'templates':
                    if arg_6 != 'no' and not os.path.isdir(arg_6):
                        sys.stdout.write('Given directory does not exists, retry\n')
                        arg_6 = False
                if arg_6 and arg_3.dest == 'db':
                    arg_3(arg_0, arg_1, arg_6, arg_3.option_strings)
                    arg_6 = getattr(arg_1, arg_3.dest)
        else:
            if not arg_5 and arg_3.required:
                raise ValueError(
                    'Option {0} is required when in no-input mode'.format(arg_3.dest)
                )
            arg_6 = arg_5
            if arg_3.dest == 'db':
                arg_3(arg_0, arg_1, arg_6, arg_3.option_strings)
                arg_6 = getattr(arg_1, arg_3.dest)
        if arg_3.dest == 'templates' and (arg_6 == 'no' or not os.path.isdir(arg_6)):
            arg_6 = False
        if arg_3.dest in ('bootstrap', 'starting_page'):
            arg_6 = (arg_6 == 'yes')
        setattr(arg_1, arg_3.dest, arg_6)
    return arg_1


return mir_eval.beat.evaluate(ref_times, est_times, **kwargs)

def Func(arg_0, arg_1, **arg_2):
    r'''Beat tracking evaluation

    Parameters
    ----------
    ref : jams.Annotation
        Reference annotation object
    est : jams.Annotation
        Estimated annotation object
    kwargs
        Additional keyword arguments

    Returns
    -------
    scores : dict
        Dictionary of scores, where the key is the metric name (str) and
        the value is the (float) score achieved.

    See Also
    --------
    mir_eval.Func.evaluate

    Examples
    --------
    >>> # Load in the JAMS objects
    >>> ref_jam = jams.load('reference.jams')
    >>> est_jam = jams.load('estimated.jams')
    >>> # Select the first relevant annotations
    >>> ref_ann = ref_jam.search(namespace='Func')[0]
    >>> est_ann = est_jam.search(namespace='Func')[0]
    >>> scores = jams.eval.Func(ref_ann, est_ann)
    '''

    arg_3 = 'Func'
    arg_0 = coerce_annotation(arg_0, arg_3)
    arg_1 = coerce_annotation(arg_1, arg_3)

    arg_4, arg_5 = arg_0.to_event_values()
    arg_6, arg_5 = arg_1.to_event_values()

    return mir_eval.Func.evaluate(arg_4, arg_6, **arg_2)

r'''Beat tracking evaluation

    Parameters
    ----------
    ref : jams.Annotation
        Reference annotation object
    est : jams.Annotation
        Estimated annotation object
    kwargs
        Additional keyword arguments

    Returns
    -------
    scores : dict
        Dictionary of scores, where the key is the metric name (str) and
        the value is the (float) score achieved.

    See Also
    --------
    mir_eval.beat.evaluate

    Examples
    --------
    >>> # Load in the JAMS objects
    >>> ref_jam = jams.load('reference.jams')
    >>> est_jam = jams.load('estimated.jams')
    >>> # Select the first relevant annotations
    >>> ref_ann = ref_jam.search(namespace='beat')[0]
    >>> est_ann = est_jam.search(namespace='beat')[0]
    >>> scores = jams.eval.beat(ref_ann, est_ann)


(self, trytes, depth=3, min_weight_magnitude=None)

return extended.SendTrytesCommand(self.adapter)(
            trytes=trytes,
            depth=depth,
            minWeightMagnitude=min_weight_magnitude,
        )

def Func ( arg_0 , arg_1 , arg_2 = 3 , arg_3 = None ) : if arg_3 is None : arg_3 = arg_0 . default_min_weight_magnitude return extended . SendTrytesCommand ( arg_0 . adapter ) ( arg_1 = arg_1 , arg_2 = arg_2 , minWeightMagnitude = arg_3 , )

def Func(arg_0, arg_1, arg_2=3, arg_3=None):
        # type: (Iterable[TransactionTrytes], int, Optional[int]) -> dict
        """
        Attaches transaction trytes to the Tangle, then broadcasts and
        stores them.

        :param trytes:
            Transaction encoded as a tryte sequence.

        :param depth:
            Depth at which to attach the bundle.
            Defaults to 3.

        :param min_weight_magnitude:
            Min weight magnitude, used by the node to calibrate Proof of
            Work.

            If not provided, a default value will be used.

        :return:
            Dict with the following structure::

                {
                    'trytes': List[TransactionTrytes],
                        Raw trytes that were published to the Tangle.
                }

        References:

        - https://github.com/iotaledger/wiki/blob/master/api-proposal.md#sendtrytes
        """
        if arg_3 is None:
            arg_3 = arg_0.default_min_weight_magnitude

        return extended.SendTrytesCommand(arg_0.adapter)(
            arg_1=arg_1,
            arg_2=arg_2,
            minWeightMagnitude=arg_3,
        )

Attaches transaction trytes to the Tangle then broadcasts and stores them .


def
Func
(
arg_0
)
:
arg_0
.
_download_sql_proxy_if_needed
(
)
arg_1
=
[
arg_0
.
sql_proxy_path
]
arg_1
.
extend
(
[
'--version'
]
)
arg_1
.
extend
(
arg_0
.
_get_credential_parameters
(
)
)
arg_2
=
subprocess
.
check_output
(
arg_1
)
.
decode
(
'utf-8'
)
arg_3
=
re
.
compile
(
"^.*[V|v]ersion ([^;]*);.*$"
)
arg_4
=
arg_3
.
match
(
arg_2
)
if
arg_4
:
return
arg_4
.
group
(
1
)
else
:
return

def Func(arg_0):
        """
        Returns version of the Cloud SQL Proxy.
        """
        arg_0._download_sql_proxy_if_needed()
        arg_1 = [arg_0.sql_proxy_path]
        arg_1.extend(['--version'])
        arg_1.extend(arg_0._get_credential_parameters())
        arg_2 = subprocess.check_output(arg_1).decode('utf-8')
        arg_3 = re.compile("^.*[V|v]ersion ([^;]*);.*$")
        arg_4 = arg_3.match(arg_2)
        if arg_4:
            return arg_4.group(1)
        else:
            return None

Returns version of the Cloud SQL Proxy .


def Func(arg_0, arg_1):
        """Returns the number of elements in the set that ``s`` belongs to.

        Parameters
        ----------
        s : object
            An object

        Returns
        -------
        out : int
            The number of elements in the set that ``s`` belongs to.
        """
        arg_2 = arg_0.find(arg_1)
        return arg_0._Func[arg_2]

Returns the number of elements in the set that s belongs to .


def Func(arg_0):
    """
    Raises a `requests.exceptions.HTTPError` if the response has a non-200
    status code.
    """
    if arg_0.code != OK:
        raise HTTPError('Non-200 response code (%s) for url: %s' % (
            arg_0.code, uridecode(arg_0.request.absoluteURI)))

    return arg_0

Raises a requests . exceptions . HTTPError if the response has a non - 200 status code .


def Func(arg_0, arg_1):
        """
        Returns position data.

        http://dev.wheniwork.com/#get-existing-position
        """
        arg_2 = "/2/positions/%s" % arg_1

        return arg_0.position_from_json(arg_0._get_resource(arg_2)["position"])


'     idx |        min        max       step\n'

def Func(arg_0, arg_1=arg_2.stdout):
        """Print kernel information in human readble format."""
        arg_4 = ('     idx |        min        max       step\n' +
                 '---------+---------------------------------\n')
        for arg_5 in arg_0._loop_stack:
            arg_4 += '{:>8} | {!r:>10} {!r:>10} {!r:>10}\n'.format(*arg_5)
        print(prefix_indent('loop stack:        ', arg_4), file=arg_1)

        arg_4 = ('    name |  offsets   ...\n' +
                 '---------+------------...\n')
        for arg_6, arg_7 in list(arg_0.sources.items()):
            arg_8 = '{:>8} | '.format(arg_6)
            arg_9 = '\n'.join(['{!r:}'.format(o) for o in arg_7])
            arg_4 += prefix_indent(arg_8, arg_9, later_prefix='         | ')
        print(prefix_indent('data sources:      ', arg_4), file=arg_1)

        arg_4 = ('    name |  offsets   ...\n' +
                 '---------+------------...\n')
        for arg_6, arg_7 in list(arg_0.destinations.items()):
            arg_8 = '{:>8} | '.format(arg_6)
            arg_9 = '\n'.join(['{!r:}'.format(o) for o in arg_7])
            arg_4 += prefix_indent(arg_8, arg_9, later_prefix='         | ')
        print(prefix_indent('data destinations: ', arg_4), file=arg_1)

        arg_4 = (' op | count \n' +
                 '----+-------\n')
        for arg_10, arg_11 in list(arg_0._flops.items()):
            arg_4 += '{:>3} | {:>4}\n'.format(arg_10, arg_11)
        arg_4 += '     =======\n'
        arg_4 += '      {:>4}'.format(sum(arg_0._flops.values()))
        print(prefix_indent('FLOPs:     ', arg_4), file=arg_1)

Print kernel information in human readble format .


(self, task_instances,
                                                    acceptable_states, session=None)

def Func(arg_0, arg_1,
                                                    arg_2, arg_3=None):
        """
        Changes the state of task instances in the list with one of the given states
        to QUEUED atomically, and returns the TIs changed in SimpleTaskInstance format.

        :param task_instances: TaskInstances to change the state of
        :type task_instances: list[airflow.models.TaskInstance]
        :param acceptable_states: Filters the TaskInstances updated to be in these states
        :type acceptable_states: Iterable[State]
        :rtype: list[airflow.utils.dag_processing.SimpleTaskInstance]
        """
        if len(arg_1) == 0:
            arg_3.commit()
            return []

        arg_4 = models.TaskInstance
        arg_5 = (
            [and_(
                arg_4.dag_id == ti.dag_id,
                arg_4.task_id == ti.task_id,
                arg_4.execution_date == ti.execution_date)
                for ti in arg_1])
        arg_6 = (
            arg_3
            .query(arg_4)
            .filter(or_(*arg_5)))

        if None in arg_2:
            arg_6 = arg_6.filter(
                or_(arg_4.state == None, arg_4.state.in_(arg_2))  # noqa: E711
            )
        else:
            arg_6 = arg_6.filter(arg_4.state.in_(arg_2))

        arg_7 = (
            arg_6
            .with_for_update()
            .all())
        if len(arg_7) == 0:
            arg_0.log.info("No tasks were able to have their state changed to queued.")
            arg_3.commit()
            return []

        # set TIs to queued state
        for arg_8 in arg_7:
            arg_8.state = State.QUEUED
            arg_8.queued_dttm = (timezone.utcnow()
                                         if not arg_8.queued_dttm
                                         else arg_8.queued_dttm)
            arg_3.merge(arg_8)

        # Generate a list of SimpleTaskInstance for the use of queuing
        # them in the executor.
        arg_11 = [SimpleTaskInstance(ti) for ti in
                                 arg_7]

        arg_12 = "\n\t".join(
            [repr(x) for x in arg_7])

        arg_3.commit()
        arg_0.log.info("Setting the following %s tasks to queued state:\n\t%s",
                      len(arg_7), arg_12)
        return arg_11

Changes the state of task instances in the list with one of the given states to QUEUED atomically and returns the TIs changed in SimpleTaskInstance format .


def Func(arg_0, arg_1):
    """Returns count difference in two collections of Python objects."""
    arg_2 = _process_in_memory_objects(arg_0)
    arg_3 = _process_in_memory_objects(arg_1)
    arg_4 = _get_object_count_by_type(arg_2)
    arg_5 = _get_object_count_by_type(arg_3)
    return arg_4 - arg_5

Returns count difference in two collections of Python objects .


(self, id_tier, start, end, value='', svg_ref=None)

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

        :param str id_tier: Name of the tier.
        :param int start: Start time of the annotation.
        :param int end: End time of the annotation.
        :param str value: Value of the annotation.
        :param str svg_ref: Svg reference.
        :raises KeyError: If the tier is non existent.
        :raises ValueError: If one of the values is negative or start is bigger
                            then end or if the tiers already contains ref
                            annotations.
        """
        if arg_0.tiers[arg_1][1]:
            raise ValueError('Tier already contains ref annotations...')
        if arg_2 == arg_3:
            raise ValueError('Annotation length is zero...')
        if arg_2 > arg_3:
            raise ValueError('Annotation length is negative...')
        if arg_2 < 0:
            raise ValueError('Start is negative...')
        arg_6 = arg_0.generate_ts_id(arg_2)
        arg_7 = arg_0.generate_ts_id(arg_3)
        arg_8 = arg_0.generate_annotation_id()
        arg_0.annotations[arg_8] = arg_1
        arg_0.tiers[arg_1][0][arg_8] = (arg_6, arg_7, arg_4, arg_5)


def Func ( arg_0 : arg_1 , ** arg_2 ) -> Counter : arg_3 = defaultdict ( set ) arg_4 = build_edge_data_filter ( arg_2 ) for arg_5 , arg_6 , arg_7 , arg_8 in filter_edges ( arg_0 , arg_4 ) : if CITATION not in arg_8 : continue arg_3 [ arg_5 , arg_6 ] . add ( ( arg_8 [ CITATION ] [ CITATION_TYPE ] , arg_8 [ CITATION ] [ CITATION_REFERENCE ] . strip ( ) ) ) return Counter ( itt . chain . from_iterable ( arg_3 . values ( ) ) )

def Func(arg_0: arg_1, **arg_2) -> Counter:
    """Counts the citations in a graph based on a given filter

    :param graph: A BEL graph
    :param dict annotations: The annotation filters to use
    :return: A counter from {(citation type, citation reference): frequency}
    """
    arg_3 = defaultdict(set)

    arg_4 = build_edge_data_filter(arg_2)

    for arg_5, arg_6, arg_7, arg_8 in filter_edges(arg_0, arg_4):
        if CITATION not in arg_8:
            continue

        arg_3[arg_5, arg_6].add((arg_8[CITATION][CITATION_TYPE], arg_8[CITATION][CITATION_REFERENCE].strip()))

    return Counter(itt.chain.from_iterable(arg_3.values()))


def Func ( arg_0 ) : arg_1 = "_cache_" + arg_0 . __name__ def _wrapped ( arg_2 ) : if not hasattr ( arg_2 , arg_1 ) : setattr ( arg_2 , arg_1 , arg_0 ( arg_2 ) ) return getattr ( arg_2 , arg_1 ) return _wrapped

def Func(arg_0):
    """A decorator to cache the result of an Func operation.

    Only applies to methods with no arguments.

    """
    arg_1 = "_cache_" + arg_0.__name__
    def _wrapped(arg_2):
        """Inner fn that checks the cache."""
        if not hasattr(arg_2, arg_1):
            setattr(arg_2, arg_1, arg_0(arg_2))
        return getattr(arg_2, arg_1)
    return _wrapped

A decorator to cache the result of an expensive operation.

    Only applies to methods with no arguments.

A decorator to cache the result of an expensive operation .


def Func ( arg_0 , arg_1 ) : if not arg_0 . is_initialized or arg_1 [ 'type' ] != 'update' : return arg_2 = arg_0 . block arg_3 = arg_1 [ 'value' ] arg_4 = arg_1 [ 'oldvalue' ] for arg_5 in arg_4 : if arg_5 not in arg_3 and not arg_5 . is_destroyed : arg_5 . destroy ( ) else : arg_5 . set_parent ( None ) if arg_2 : arg_6 = None if arg_0 . mode == 'replace' : arg_2 . children = [ ] if arg_0 . mode == 'prepend' and arg_2 . children : arg_6 = arg_2 . children [ 0 ] arg_2 . insert_children ( arg_6 , arg_3 ) else : arg_0 . parent . insert_children ( arg_0 , arg_3 )

def Func(arg_0, arg_1):
        """ When the children of the block change. Update the referenced
        block.

        """
        if not arg_0.is_initialized or arg_1['type'] != 'update':
            return

        arg_2 = arg_0.block
        arg_3 = arg_1['value']
        arg_4 = arg_1['oldvalue']
        for arg_5 in arg_4:
            if arg_5 not in arg_3 and not arg_5.is_destroyed:
                arg_5.destroy()
            else:
                arg_5.set_parent(None)

        if arg_2:
            # This block is inserting into another block
            arg_6 = None
            if arg_0.mode == 'replace':
                arg_2.children = []
            if arg_0.mode == 'prepend' and arg_2.children:
                arg_6 = arg_2.children[0]
            arg_2.insert_children(arg_6, arg_3)
        else:
            # This block is a placeholder
            arg_0.parent.insert_children(arg_0, arg_3)

When the children of the block change . Update the referenced block .


(self, colour, tolerance=0, default=None)

def Func(arg_0, arg_1, arg_2=0, arg_3=None):
        """
        Get the component corresponding to a display colour. This is for
        generating a Striplog object from a colour image of a striplog.

        Args:
           colour (str): The hex colour string to look up.
           tolerance (float): The colourspace distance within which to match.
           default (component or None): The component to return in the event
           of no match.

        Returns:
           component. The component best matching the provided colour.
        """
        if not (0 <= arg_2 <= np.sqrt(195075)):
            raise LegendError('Tolerance must be between 0 and 441.67')

        for arg_4 in arg_0.__list:
            if arg_1.lower() == arg_4.colour:
                return arg_4.component

        # If we're here, we didn't find one yet.
        arg_5, arg_6, arg_7 = utils.hex_to_rgb(arg_1)

        # Start with a best match of black.
        arg_8 = '#000000'
        arg_9 = np.sqrt(arg_5**2. + arg_6**2. + arg_7**2.)

        # Now compare to each colour in the legend.
        for arg_4 in arg_0.__list:
            arg_10, arg_11, arg_12 = arg_4.rgb
            arg_13 = np.sqrt((arg_10-arg_5)**2. + (arg_11-arg_6)**2. + (arg_12-arg_7)**2.)
            if arg_13 < arg_9:
                arg_8 = arg_4.component
                arg_9 = arg_13
                arg_14 = arg_4.colour

        if arg_9 <= arg_2:
            return arg_8
        else:
            with warnings.catch_warnings():
                warnings.simplefilter("always")
                arg_15 = "No match found for {0} ".format(arg_1.lower())
                arg_15 += "with tolerance of {0}. Best match is ".format(arg_2)
                arg_15 += "{0}, {1}".format(arg_8.summary(), arg_14)
                arg_15 += ", d={0}".format(arg_9)
                warnings.warn(arg_15)

            return arg_3

Get the component corresponding to a display colour . This is for generating a Striplog object from a colour image of a striplog .


def Func(arg_0, arg_1=None):
    """Enable integration with a given GUI"""
    if arg_0 not in loop_map:
        raise ValueError("GUI %r not supported" % arg_0)
    if arg_1 is None:
        if Application.initialized():
            arg_1 = getattr(Application.instance(), 'kernel', None)
        if arg_1 is None:
            raise RuntimeError("You didn't specify a kernel,"
                " and no IPython Application with a kernel appears to be running."
            )
    arg_2 = loop_map[arg_0]
    if arg_1.eventloop is not None and arg_1.eventloop is not arg_2:
        raise RuntimeError("Cannot activate multiple GUI eventloops")
    arg_1.eventloop = arg_2


def Func(arg_0, arg_1=None):
        """Generator for the LIST NEWSGROUPS command.

        Generates a list of newsgroups including the name and a short
        description.

        See <http://tools.ietf.org/html/rfc3977#section-7.6.6>

        Args:
            pattern: Glob matching newsgroups of intrest.

        Yields:
            A tuple containing the name, and description for the newsgroup.
        """
        arg_2 = arg_1

        arg_3, arg_4 = arg_0.command("LIST NEWSGROUPS", arg_2)
        if arg_3 != 215:
            raise NNTPReplyError(arg_3, arg_4)

        for arg_5 in arg_0.info_gen(arg_3, arg_4):
            arg_6 = arg_5.strip().split()
            arg_7, arg_8 = arg_6[0], ""
            if len(arg_6) > 1:
                arg_8 = arg_6[1]
            yield arg_7, arg_8

Generator for the LIST NEWSGROUPS command .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
""
)
:
arg_4
=
select
.
select
(
[
arg_1
]
,
[
]
,
[
]
,
0
)
[
0
]
if
arg_2
:
arg_5
=
select
.
select
(
[
arg_2
]
,
[
]
,
[
]
,
0
)
[
0
]
else
:
arg_5
=
[
]
arg_0
.
debug
(
"Selected: %s, %s"
,
arg_4
,
arg_5
)
for
arg_6
in
arg_4
:
arg_7
=
arg_6
.
read
(
)
arg_4
.
remove
(
arg_6
)
if
arg_7
:
arg_0
.
debug
(
"%s stdout: %s"
,
arg_3
,
arg_7
.
strip
(
)
)
for
arg_6
in
arg_5
:
arg_7
=
arg_6
.
read
(
)
arg_5
.
remove
(
arg_6
)
if
arg_7
:
arg_0
.
warn
(
"%s stderr: %s"
,
arg_3
,
arg_7
.
strip
(
)
)

def Func(arg_0, arg_1, arg_2, arg_3=""):
    """
    This function polls stdout and stderr streams and writes their contents
    to log
    """
    arg_4 = select.select([arg_1], [], [], 0)[0]
    if arg_2:
        arg_5 = select.select([arg_2], [], [], 0)[0]
    else:
        arg_5 = []

    arg_0.debug("Selected: %s, %s", arg_4, arg_5)

    for arg_6 in arg_4:
        arg_7 = arg_6.read()
        arg_4.remove(arg_6)
        if arg_7:
            arg_0.debug("%s stdout: %s", arg_3, arg_7.strip())

    for arg_6 in arg_5:
        arg_7 = arg_6.read()
        arg_5.remove(arg_6)
        if arg_7:
            arg_0.warn("%s stderr: %s", arg_3, arg_7.strip())


def Func ( arg_0 ) : with open ( arg_0 . path , 'rb' ) as f : return hashlib . Func ( f . read ( ) ) . hexdigest ( )

def Func(arg_0):
        """SHA1 hash of the config file itself."""
        with open(arg_0.path, 'rb') as f:
            return hashlib.Func(f.read()).hexdigest()


return (x-self.x)/d, (y-self.y)/d, (z-self.z)/d

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=50.0):

        """ Tendency towards a particular place.
        """

        return (arg_1-arg_0.x)/arg_4, (arg_2-arg_0.y)/arg_4, (arg_3-arg_0.z)/arg_4


(self, method, endpoint, data=None, *args, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = None , * arg_4 , ** arg_5 ) : arg_6 = arg_0 . _get_session ( ) arg_7 = 'https://api.heroku.com' arg_8 = arg_7 + arg_2 if arg_3 : arg_3 = json . dumps ( arg_3 ) arg_9 = arg_6 . request ( arg_1 , arg_8 , arg_3 = arg_3 , * arg_4 , ** arg_5 ) if not arg_9 . ok : try : arg_10 = arg_9 . json ( ) . get ( 'message' ) except ValueError : arg_10 = arg_9 . content raise APIError ( arg_10 ) return arg_9 . json ( )

def Func(arg_0, arg_1, arg_2, arg_3=None, *arg_4, **arg_5):
        """Sends an API request to Heroku.

        :param method: HTTP method.
        :param endpoint: API endpoint, e.g. ``/apps``.
        :param data: A dict sent as JSON in the body of the request.
        :returns: A dict represntation of the JSON response.
        """
        arg_6 = arg_0._get_session()

        arg_7 = 'https://api.heroku.com'
        arg_8 = arg_7 + arg_2

        if arg_3:
            arg_3 = json.dumps(arg_3)

        arg_9 = arg_6.request(arg_1, arg_8, arg_3=arg_3, *arg_4, **arg_5)

        if not arg_9.ok:
            try:
                arg_10 = arg_9.json().get('message')
            except ValueError:
                arg_10 = arg_9.content

            raise APIError(arg_10)

        return arg_9.json()


return np.array([[sum(1 for rate in unit if rate == v) for v in value_domain] for unit in reliability_data.T])

def Func ( arg_0 , arg_1 ) : return np . array ( [ [ sum ( 1 for arg_2 in arg_4 if arg_2 == arg_3 ) for arg_3 in arg_1 ] for arg_4 in arg_0 . T ] )

def Func(arg_0, arg_1):
    """Return the value counts given the reliability data.

    Parameters
    ----------
    reliability_data : ndarray, with shape (M, N)
        Reliability data matrix which has the rate the i coder gave to the j unit, where M is the number of raters
        and N is the unit count.
        Missing rates are represented with `np.nan`.

    value_domain : array_like, with shape (V,)
        Possible values the units can take.

    Returns
    -------
    value_counts : ndarray, with shape (N, V)
        Number of coders that assigned a certain value to a determined unit, where N is the number of units
        and V is the value count.
    """
    return np.array([[sum(1 for arg_2 in arg_4 if arg_2 == arg_3) for arg_3 in arg_1] for arg_4 in arg_0.T])

Return the value counts given the reliability data .


def Func(arg_0, arg_1, arg_2=None):  # pylint: disable=invalid-name,unused-argument
        """
        Retrieve the list of Func available to this learner.

        Only those Func are returned that satisfy enterprise customer's data sharing setting.

        Arguments:
            request (HttpRequest): Reference to in-progress request instance.
            pk (Int): Primary key value of the selected enterprise learner.

        Returns:
            (HttpResponse): Response object containing a list of learner's Func.
        """
        arg_3 = arg_0.get_object()
        arg_4 = {"Func": arg_3.Func}
        arg_5 = serializers.EnterpriseCustomerUserEntitlementSerializer(arg_4, context={'request': arg_1})
        return Response(arg_5.data)

Retrieve the list of entitlements available to this learner.

        Only those entitlements are returned that satisfy enterprise customer's data sharing setting.

        Arguments:
            request (HttpRequest): Reference to in-progress request instance.
            pk (Int): Primary key value of the selected enterprise learner.

        Returns:
            (HttpResponse): Response object containing a list of learner's entitlements.

Retrieve the list of entitlements available to this learner .


(C, D, D_steps, step_sizes_sigma,
                         weights_mul, weights_add, max_0, max_1)

def Func(arg_0, arg_1, arg_2, arg_3,
                         arg_4, arg_5, arg_6, arg_7):  # pragma: no cover
    '''Calculate the accumulated cost matrix D.

    Use dynamic programming to calculate the accumulated costs.

    Parameters
    ----------
    C : np.ndarray [shape=(N, M)]
        pre-computed cost matrix

    D : np.ndarray [shape=(N, M)]
        accumulated cost matrix

    D_steps : np.ndarray [shape=(N, M)]
        steps which were used for calculating D

    step_sizes_sigma : np.ndarray [shape=[n, 2]]
        Specifies allowed step sizes as used by the dtw.

    weights_add : np.ndarray [shape=[n, ]]
        Additive weights to penalize certain step sizes.

    weights_mul : np.ndarray [shape=[n, ]]
        Multiplicative weights to penalize certain step sizes.

    max_0 : int
        maximum number of steps in step_sizes_sigma in dim 0.

    max_1 : int
        maximum number of steps in step_sizes_sigma in dim 1.

    Returns
    -------
    D : np.ndarray [shape=(N,M)]
        accumulated cost matrix.
        D[N,M] is the total alignment cost.
        When doing subsequence DTW, D[N,:] indicates a matching function.

    D_steps : np.ndarray [shape=(N,M)]
        steps which were used for calculating D.

    See Also
    --------
    dtw
    '''
    for arg_8 in range(arg_6, arg_1.shape[0]):
        for arg_9 in range(arg_7, arg_1.shape[1]):
            # accumulate costs
            for arg_10, arg_11, arg_12 in zip(range(arg_3.shape[0]),
                                                          arg_5, arg_4):
                arg_13 = arg_1[arg_8 - arg_3[arg_10, 0],
                          arg_9 - arg_3[arg_10, 1]]
                arg_14 = arg_12 * arg_0[arg_8 - arg_6, arg_9 - arg_7]
                arg_14 += arg_11
                arg_15 = arg_13 + arg_14

                # check if cur_cost is smaller than the one stored in D
                if arg_15 < arg_1[arg_8, arg_9]:
                    arg_1[arg_8, arg_9] = arg_15

                    # save step-index
                    arg_2[arg_8, arg_9] = arg_10

    return arg_1, arg_2

Calculate the accumulated cost matrix D .


def Func ( arg_0 , arg_1 = False ) : arg_2 = np . outer ( arg_0 . conjugate ( ) , arg_0 ) if arg_1 : return arg_2 . flatten ( order = 'F' ) return arg_2

def Func(arg_0, arg_1=False):
    """
    maps a pure state to a state matrix

    Args:
        state (ndarray): the number of qubits
        flatten (bool): determine if state matrix of column work
    Returns:
        ndarray:  state_mat(2**num, 2**num) if flatten is false
        ndarray:  state_mat(4**num) if flatten is true stacked on by the column
    """
    arg_2 = np.outer(arg_0.conjugate(), arg_0)
    if arg_1:
        return arg_2.flatten(order='F')
    return arg_2


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . DFuncref for arg_3 in sorted ( [ float ( TT ) for TT in arg_0 . _Cp_records . keys ( ) ] ) : arg_2 += arg_0 . _Cp_records [ str ( arg_3 ) ] . Func ( arg_1 ) if arg_1 <= arg_3 : return arg_2 + arg_0 . Func_mag ( arg_1 ) arg_3 = max ( [ float ( TT ) for TT in arg_0 . _Cp_records . keys ( ) ] ) arg_2 += arg_0 . Cp ( arg_3 ) * ( arg_1 - arg_3 ) return arg_2 + arg_0 . Func_mag ( arg_1 )

def Func(arg_0, arg_1):
        """
        Calculate the enthalpy of the compound phase at the specified
        temperature.

        :param T: [K] temperature

        :returns: [J/mol] The enthalpy of the compound phase.
        """

        arg_2 = arg_0.DFuncref

        for arg_3 in sorted([float(TT) for TT in arg_0._Cp_records.keys()]):
            arg_2 += arg_0._Cp_records[str(arg_3)].Func(arg_1)
            if arg_1 <= arg_3:
                return arg_2 + arg_0.Func_mag(arg_1)

        # Extrapolate beyond the upper limit by using a constant heat capacity.
        arg_3 = max([float(TT) for TT in arg_0._Cp_records.keys()])
        arg_2 += arg_0.Cp(arg_3)*(arg_1 - arg_3)

        return arg_2 + arg_0.Func_mag(arg_1)

Calculate the enthalpy of the compound phase at the specified temperature .


return date.__new__(type(self), year, month, day)

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
        """Return a new date with new values for the specified fields."""
        if arg_1 is None:
            arg_1 = arg_0._year
        if arg_2 is None:
            arg_2 = arg_0._month
        if arg_3 is None:
            arg_3 = arg_0._day
        return date.__new__(type(arg_0), arg_1, arg_2, arg_3)

Return a new date with new values for the specified fields .


(self, model, index_cls=AlgoliaIndex, auto_indexing=None)

def Func(arg_0, arg_1, arg_2=arg_3, arg_4=None):
        """
        Registers the given model with Algolia engine.

        If the given model is already Funced with Algolia engine, a
        RegistrationError will be raised.
        """
        # Check for existing registration.
        if arg_0.is_Funced(arg_1):
            raise RegistrationError(
                '{} is already Funced with Algolia engine'.format(arg_1))

        # Perform the registration.
        if not issubclass(arg_2, arg_3):
            raise RegistrationError(
                '{} should be a subclass of AlgoliaIndex'.format(arg_2))
        arg_5 = arg_2(arg_1, arg_0.client, arg_0.__settings)
        arg_0.__Funced_models[arg_1] = arg_5

        if (isinstance(arg_4, bool) and
                arg_4) or arg_0.__auto_indexing:
            # Connect to the signalling framework.
            post_save.connect(arg_0.__post_save_receiver, arg_1)
            pre_delete.connect(arg_0.__pre_delete_receiver, arg_1)
            logger.info('REGISTER %s', arg_1)

Registers the given model with Algolia engine.

        If the given model is already registered with Algolia engine, a
        RegistrationError will be raised.

Registers the given model with Algolia engine .


def Func ( arg_0 , arg_1 ) : arg_2 = tf . cast ( tf . reduce_sum ( input_tensor = tf . cast ( ~ arg_1 , tf . int32 ) , axis = - 1 ) , arg_0 . dtype ) arg_3 = ( tf . reduce_sum ( input_tensor = tf . where ( arg_1 , tf . zeros_like ( arg_0 ) , arg_0 ) , axis = - 1 ) / arg_2 ) arg_4 = ( tf . reduce_sum ( input_tensor = tf . where ( arg_1 , tf . zeros_like ( arg_0 ) , ( arg_0 - arg_3 [ ... , tf . newaxis ] ) ** 2 ) , axis = - 1 ) / arg_2 ) return arg_3 , arg_4

def Func(arg_0, arg_1):
  """Compute mean and variance, accounting for a mask.

  Args:
    time_series_tensor: float `Tensor` time series of shape
      `concat([batch_shape, [num_timesteps]])`.
    broadcast_mask: bool `Tensor` of the same shape as `time_series`.
  Returns:
    mean: float `Tensor` of shape `batch_shape`.
    variance: float `Tensor` of shape `batch_shape`.
  """
  arg_2 = tf.cast(
      tf.reduce_sum(input_tensor=tf.cast(~arg_1, tf.int32), axis=-1),
      arg_0.dtype)

  # Manually compute mean and variance, excluding masked entries.
  arg_3 = (tf.reduce_sum(input_tensor=tf.where(
      arg_1,
      tf.zeros_like(arg_0),
      arg_0), axis=-1) / arg_2)
  arg_4 = (tf.reduce_sum(input_tensor=tf.where(
      arg_1,
      tf.zeros_like(arg_0),
      (arg_0 - arg_3[..., tf.newaxis]) ** 2), axis=-1)
              / arg_2)
  return arg_3, arg_4

Compute mean and variance accounting for a mask .


def Func ( arg_0 ) : arg_1 = Chem . MolFromSmiles ( arg_0 , sanitize = False ) arg_1 = Standardizer ( ) . standardize ( arg_1 ) return Chem . MolToSmiles ( arg_1 , isomericSmiles = True )

def Func(arg_0):
    """Return a standardized canonical SMILES string given a SMILES string.

    Note: This is a convenience function for quickly standardizing a single SMILES string. It is more efficient to use
    the :class:`~molvs.standardize.Standardizer` class directly when working with many molecules or when custom options
    are needed.

    :param string smiles: The SMILES for the molecule.
    :returns: The SMILES for the standardized molecule.
    :rtype: string.
    """
    # Skip sanitize as standardize does this anyway
    arg_1 = Chem.MolFromSmiles(arg_0, sanitize=False)
    arg_1 = Standardizer().standardize(arg_1)
    return Chem.MolToSmiles(arg_1, isomericSmiles=True)

Return a standardized canonical SMILES string given a SMILES string .


def Func ( arg_0 : arg_1 , arg_2 : arg_1 ) : arg_3 = b"" arg_3 += arg_0 . to_bytes ( 1 , byteorder = "little" ) if isinstance ( arg_2 , arg_1 ) : if PY36 : arg_3 += arg_2 . to_bytes ( 1 , byteorder = "little" ) else : arg_3 += arg_2 . to_bytes ( 2 , byteorder = "little" ) else : arg_3 += arg_2 return arg_3

def Func(arg_0: arg_1, arg_2: arg_1):
    """
    Generates a simple call, with an index for something.

    :param opcode: The opcode to generate.
    :param index: The index to use as an argument.
    :return:
    """
    arg_3 = b""
    # add the opcode
    arg_3 += arg_0.to_bytes(1, byteorder="little")
    # Add the index
    if isinstance(arg_2, arg_1):
        if PY36:
            arg_3 += arg_2.to_bytes(1, byteorder="little")
        else:
            arg_3 += arg_2.to_bytes(2, byteorder="little")
    else:
        arg_3 += arg_2
    return arg_3

Generates a simple call with an index for something .


def Func(arg_0, arg_1, arg_2):
        '''Add signature to data'''

        if arg_2['signature_algorithm_id'] not in arg_0.signature_algorithms:
            raise Exception('Unknown signature algorithm id: %d'
                            % arg_2['signature_algorithm_id'])

        arg_3 = \
            arg_0.signature_algorithms[arg_2['signature_algorithm_id']]

        arg_4 = arg_0._get_algorithm_info(arg_3)

        arg_5 = get_random_bytes(arg_4['salt_size'])
        arg_6 = arg_0._generate_key(arg_2['signature_passphrase_id'],
                            arg_0.signature_passphrases, arg_5, arg_4)

        arg_1 = arg_0._encode(arg_1, arg_4, arg_6)

        return arg_1 + arg_5


(self, resource_type, resource_id, depth=1)

def Func(arg_0, arg_1, arg_2, arg_3=1):
        """
        Retrieves a single resource of a particular type.

        :param      resource_type: The resource type: datacenter, image,
                                   snapshot or ipblock.
        :type       resource_type: ``str``

        :param      resource_id: The unique ID of the resource.
        :type       resource_id: ``str``

        :param      depth: The depth of the response data.
        :type       depth: ``int``

        """
        arg_4 = arg_0._perform_request(
            '/um/resources/%s/%s?depth=%s' % (
                arg_1, arg_2, str(arg_3)))

        return arg_4

Retrieves a single resource of a particular type .


def Func(arg_0, arg_1):
  '''
  Start Heron tracker and UI
  '''
  arg_2 = list(arg_0)[0]
  wait_for_master_to_start(arg_2)

  arg_3 = "%s run %s >> /tmp/heron_tools_start.log 2>&1 &" \
        % (get_nomad_path(arg_1), get_heron_tools_job_file(arg_1))
  Log.info("Starting Heron Tools on %s" % arg_2)

  if not is_self(arg_2):
    arg_3 = ssh_remote_execute(arg_3, arg_2, arg_1)
  Log.debug(arg_3)
  arg_4 = subprocess.Popen(arg_3,
                         shell=True,
                         stdout=subprocess.PIPE,
                         stderr=subprocess.PIPE)

  arg_5 = arg_4.wait()
  arg_6 = arg_4.communicate()
  Log.debug("return code: %s output: %s" % (arg_5, arg_6))
  if arg_5 != 0:
    Log.error("Failed to start Heron Tools on %s with error:\n%s" % (arg_2, arg_6[1]))
    sys.exit(-1)

  wait_for_job_to_start(arg_2, "heron-tools")
  Log.info("Done starting Heron Tools")


(
        df,
        date: str,
        value: str,
        start: Dict[str, str],
        end: Dict[str, str],
        upperGroup: Dict[str, str],
        insideGroup: Dict[str, str] = None,
        filters: List[str] = None
)

def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_2 , arg_4 : arg_5 [ arg_2 , arg_2 ] , arg_6 : arg_5 [ arg_2 , arg_2 ] , arg_7 : arg_5 [ arg_2 , arg_2 ] , arg_8 : arg_5 [ arg_2 , arg_2 ] = None , arg_9 : arg_10 [ arg_2 ] = None ) : if len ( arg_0 ) == 0 : return arg_0 if arg_9 is not None : if isinstance ( arg_9 , arg_2 ) : arg_9 = [ arg_9 ] def sub_Func ( arg_0 ) : arg_11 = Func ( arg_0 , arg_1 , arg_3 , arg_4 , arg_6 , arg_7 , arg_8 ) for arg_12 in arg_9 : arg_11 [ arg_12 ] = arg_0 [ arg_12 ] . values [ 0 ] return arg_11 arg_13 = [ arg_0 [ ( arg_0 [ arg_9 ] . values == i ) . all ( axis = 1 ) ] for i in arg_0 [ arg_9 ] . drop_duplicates ( ) . values ] return pd . concat ( [ sub_Func ( arg_0 ) for arg_0 in arg_13 ] , sort = False ) arg_14 = { 'upperGroup' : { 'type' : 'parent' , 'id' : 'upperGroup' , 'order' : { 'by' : [ 'upperGroup_order' , 'groups' ] , 'ascending' : [ True , True ] } , 'obj' : arg_7 } } if arg_8 is not None : arg_14 [ 'insideGroup' ] = { 'type' : 'child' , 'id' : 'insideGroup' , 'order' : { 'by' : [ 'type' , 'insideGroup_order' , 'label' ] , 'ascending' : [ False , True , True ] } , 'obj' : arg_8 } arg_0 = _compute_rename ( arg_0 , arg_1 , arg_3 , arg_14 ) arg_15 = { 'value' : sum } arg_15 . update ( { f'{col}_label' : 'first' for arg_16 in arg_14 . keys ( ) } ) arg_15 . update ( { f'{col}_order' : 'first' for arg_16 in arg_14 . keys ( ) } ) arg_0 = arg_0 . groupby ( list ( arg_14 . keys ( ) ) + [ 'date' ] ) . agg ( arg_15 ) . reset_index ( ) arg_17 , arg_18 = _compute_start_end ( arg_0 , arg_4 , arg_6 ) arg_0 = _compute_value_diff ( arg_0 , arg_4 , arg_6 , arg_14 ) arg_19 = _compute_upper_group ( arg_0 ) if arg_8 is not None : arg_19 = pd . concat ( [ arg_19 , _compute_inside_group ( arg_0 ) ] ) arg_20 = _compute_order ( arg_17 , arg_18 , arg_19 , arg_14 ) return arg_20

def Func(
        arg_0,
        arg_1: arg_2,
        arg_3: arg_2,
        arg_4: arg_5[arg_2, arg_2],
        arg_6: arg_5[arg_2, arg_2],
        arg_7: arg_5[arg_2, arg_2],
        arg_8: arg_5[arg_2, arg_2] = None,
        arg_9: arg_10[arg_2] = None
):
    """
    Return a line for each bars of a Func chart, totals, groups, subgroups.
    Compute the variation and variation rate for each line.

    ---

    ### Parameters

    *mandatory :*
    - `date` (*str*): name of the column that id the period of each lines
    - `value` (*str*): name of the column that contains the vaue for each lines
    - `start` (*dict*):
        - `label`: text displayed under the first master column
        - `id`: value in the date col that id lines for the first period
    - `end` (*dict*):
        - `label`: text displayed under the last master column
        - `id`: value in the date col that id lines for the second period

    *optional :*
    - `upperGroup` (*dict*):
        - `id`: name of the column that contains upperGroups unique IDs
        - `label`: not required, text displayed under each upperGroups bars,
          using ID when it's absent
        - `groupsOrder`: not required, order of upperGroups
    - `insideGroup` (*dict*):
        - `id`: name of the column that contains insideGroups unique IDs
        - `label`: not required, text displayed under each insideGroups bars,
          using ID when it's absent
        - `groupsOrder`: not required, order of insideGroups
    - `filters` (*list*): columns to filters on

    ---

    ### Example

    **Input**

    | product_id   |   played | date   |   ord | category_id   | category_name   |
    |:------------:|:--------:|:------:|:-----:|:-------------:|:---------------:|
    | super clap   |       12 | t1     |     1 | clap          | Clap            |
    | clap clap    |        1 | t1     |    10 | clap          | Clap            |
    | tac          |        1 | t1     |     1 | snare         | Snare           |
    | super clap   |       10 | t2     |     1 | clap          | Clap            |
    | tac          |      100 | t2     |     1 | snare         | Snare           |
    | bom          |        1 | t2     |     1 | tom           | Tom             |

    ```cson
    Func:
      upperGroup:
        id: 'category_id'
        label: 'category_name'
      insideGroup:
        id: 'product_id'
        groupsOrder: 'ord'
      date: 'date'
      value: 'played'
      start:
        label: 'Trimestre 1'
        id: 't1'
      end:
        label: 'Trimester 2'
        id: 't2'
    ```

    **Output**

    |   value | label       |   variation | groups   | type   |   order |
    |:-------:|:-----------:|:-----------:|:--------:|:------:|:-------:|
    |      14 | Trimestre 1 |  NaN        | NaN      | NaN    |     NaN |
    |      -3 | Clap        |   -0.230769 | clap     | parent |     NaN |
    |      -2 | super clap  |   -0.166667 | clap     | child  |       1 |
    |      -1 | clap clap   |   -1        | clap     | child  |      10 |
    |      99 | Snare       |   99        | snare    | parent |     NaN |
    |      99 | tac         |   99        | snare    | child  |       1 |
    |       1 | Tom         |  inf        | tom      | parent |     NaN |
    |       1 | bom         |  inf        | tom      | child  |       1 |
    |     111 | Trimester 2 |  NaN        | NaN      | NaN    |     NaN |
    """

    if len(arg_0) == 0:
        return arg_0

    if arg_9 is not None:
        if isinstance(arg_9, arg_2):
            arg_9 = [arg_9]

        def sub_Func(arg_0):
            arg_11 = Func(arg_0, arg_1, arg_3, arg_4, arg_6, arg_7, arg_8)
            for arg_12 in arg_9:
                arg_11[arg_12] = arg_0[arg_12].values[0]
            return arg_11

        # filters df into a list of sub_df
        arg_13 = [arg_0[(arg_0[arg_9].values == i).all(axis=1)]
                          for i in arg_0[arg_9].drop_duplicates().values]

        return pd.concat([sub_Func(arg_0) for arg_0 in arg_13], sort=False)

    arg_14 = {
        'upperGroup': {
            'type': 'parent',
            'id':  'upperGroup',
            'order': {
                'by': ['upperGroup_order', 'groups'],
                'ascending': [True, True]
            },
            'obj': arg_7
        }
    }
    if arg_8 is not None:
        arg_14['insideGroup'] = {
            'type': 'child',
            'id': 'insideGroup',
            'order': {
                'by': ['type', 'insideGroup_order', 'label'],
                'ascending': [False, True, True]
            },
            'obj': arg_8
        }
    # prepare the dataframe with standard column names
    arg_0 = _compute_rename(arg_0, arg_1, arg_3, arg_14)

    arg_15 = {'value': sum}
    arg_15.update({f'{col}_label': 'first' for arg_16 in arg_14.keys()})
    arg_15.update({f'{col}_order': 'first' for arg_16 in arg_14.keys()})
    arg_0 = arg_0.groupby(list(arg_14.keys()) + ['date']).agg(arg_15).reset_index()

    arg_17, arg_18 = _compute_start_end(arg_0, arg_4, arg_6)

    arg_0 = _compute_value_diff(arg_0, arg_4, arg_6, arg_14)

    arg_19 = _compute_upper_group(arg_0)
    if arg_8 is not None:
        arg_19 = pd.concat([arg_19, _compute_inside_group(arg_0)])

    arg_20 = _compute_order(arg_17, arg_18, arg_19, arg_14)

    return arg_20

Return a line for each bars of a waterfall chart, totals, groups, subgroups.
    Compute the variation and variation rate for each line.

    ---

    ### Parameters

    *mandatory :*
    - `date` (*str*): name of the column that id the period of each lines
    - `value` (*str*): name of the column that contains the vaue for each lines
    - `start` (*dict*):
        - `label`: text displayed under the first master column
        - `id`: value in the date col that id lines for the first period
    - `end` (*dict*):
        - `label`: text displayed under the last master column
        - `id`: value in the date col that id lines for the second period

    *optional :*
    - `upperGroup` (*dict*):
        - `id`: name of the column that contains upperGroups unique IDs
        - `label`: not required, text displayed under each upperGroups bars,
          using ID when it's absent
        - `groupsOrder`: not required, order of upperGroups
    - `insideGroup` (*dict*):
        - `id`: name of the column that contains insideGroups unique IDs
        - `label`: not required, text displayed under each insideGroups bars,
          using ID when it's absent
        - `groupsOrder`: not required, order of insideGroups
    - `filters` (*list*): columns to filters on

    ---

    ### Example

    **Input**

    | product_id   |   played | date   |   ord | category_id   | category_name   |
    |:------------:|:--------:|:------:|:-----:|:-------------:|:---------------:|
    | super clap   |       12 | t1     |     1 | clap          | Clap            |
    | clap clap    |        1 | t1     |    10 | clap          | Clap            |
    | tac          |        1 | t1     |     1 | snare         | Snare           |
    | super clap   |       10 | t2     |     1 | clap          | Clap            |
    | tac          |      100 | t2     |     1 | snare         | Snare           |
    | bom          |        1 | t2     |     1 | tom           | Tom             |

    ```cson
    waterfall:
      upperGroup:
        id: 'category_id'
        label: 'category_name'
      insideGroup:
        id: 'product_id'
        groupsOrder: 'ord'
      date: 'date'
      value: 'played'
      start:
        label: 'Trimestre 1'
        id: 't1'
      end:
        label: 'Trimester 2'
        id: 't2'
    ```

    **Output**

    |   value | label       |   variation | groups   | type   |   order |
    |:-------:|:-----------:|:-----------:|:--------:|:------:|:-------:|
    |      14 | Trimestre 1 |  NaN        | NaN      | NaN    |     NaN |
    |      -3 | Clap        |   -0.230769 | clap     | parent |     NaN |
    |      -2 | super clap  |   -0.166667 | clap     | child  |       1 |
    |      -1 | clap clap   |   -1        | clap     | child  |      10 |
    |      99 | Snare       |   99        | snare    | parent |     NaN |
    |      99 | tac         |   99        | snare    | child  |       1 |
    |       1 | Tom         |  inf        | tom      | parent |     NaN |
    |       1 | bom         |  inf        | tom      | child  |       1 |
    |     111 | Trimester 2 |  NaN        | NaN      | NaN    |     NaN |

Return a line for each bars of a waterfall chart totals groups subgroups . Compute the variation and variation rate for each line .


(connection, name, caller_reference, comment)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if not arg_2 : arg_2 = str ( uuid . uuid4 ( ) ) arg_4 = etree . Element ( "CreateHostedZoneRequest" , xmlns = arg_0 . _xml_namespace ) arg_5 = etree . SubElement ( arg_4 , "Name" ) arg_5 . text = arg_1 arg_7 = etree . SubElement ( arg_4 , "CallerReference" ) arg_7 . text = arg_2 if arg_3 : arg_8 = etree . SubElement ( arg_4 , "HostedZoneConfig" ) arg_9 = etree . SubElement ( arg_8 , "Comment" ) arg_9 . text = arg_3 arg_10 = etree . ElementTree ( element = arg_4 ) arg_11 = BytesIO ( ) arg_10 . write ( arg_11 , xml_declaration = True , encoding = 'utf-8' , method = "xml" ) return arg_11 . getvalue ( ) . decode ( 'utf-8' )

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Forms an XML string that we'll send to Route53 in order to create
    a new hosted zone.

    :param Route53Connection connection: The connection instance used to
        query the API.
    :param str name: The name of the hosted zone to create.
    """

    if not arg_2:
        arg_2 = str(uuid.uuid4())

    arg_4 = etree.Element(
        "CreateHostedZoneRequest",
        xmlns=arg_0._xml_namespace
    )

    arg_5 = etree.SubElement(arg_4, "Name")
    arg_5.text = arg_1

    arg_7 = etree.SubElement(arg_4, "CallerReference")
    arg_7.text = arg_2

    if arg_3:
        arg_8 = etree.SubElement(arg_4, "HostedZoneConfig")
        arg_9 = etree.SubElement(arg_8, "Comment")
        arg_9.text = arg_3

    arg_10 = etree.ElementTree(element=arg_4)

    arg_11 = BytesIO()
    # This writes bytes.
    arg_10.write(arg_11, xml_declaration=True, encoding='utf-8', method="xml")
    return arg_11.getvalue().decode('utf-8')

Forms an XML string that we ll send to Route53 in order to create a new hosted zone .


def
Func
(
arg_0
,
arg_1
)
:
arg_0
.
fix_in_stanza
(
arg_1
)
arg_2
=
arg_1
.
to_jid
if
not
arg_0
.
process_all_stanzas
and
arg_2
and
(
arg_2
!=
arg_0
.
me
and
arg_2
.
bare
(
)
!=
arg_0
.
me
.
bare
(
)
)
:
return
arg_0
.
route_stanza
(
arg_1
)
try
:
if
isinstance
(
arg_1
,
Iq
)
:
if
arg_0
.
process_iq
(
arg_1
)
:
return
True
elif
isinstance
(
arg_1
,
Message
)
:
if
arg_0
.
process_message
(
arg_1
)
:
return
True
elif
isinstance
(
arg_1
,
Presence
)
:
if
arg_0
.
process_presence
(
arg_1
)
:
return
True
except
ProtocolError
,
err
:
arg_3
=
arg_1
.
stanza_type
if
arg_3
!=
'error'
and
(
arg_3
!=
'result'
or
arg_1
.
stanza_type
!=
'iq'
)
:
arg_4
=
arg_1
.
make_error_response
(
err
.
xmpp_name
)
arg_0
.
send
(
arg_4
)
err
.
log_reported
(
)
else
:
err
.
log_ignored
(
)
return
logger
.
debug
(
"Unhandled %r stanza: %r"
%
(
arg_1
.
stanza_type
,
arg_1
.
serialize
(
)
)
)
return
False

def Func(arg_0, arg_1):
        """Process stanza received from the stream.

        First "fix" the stanza with `self.fix_in_stanza()`,
        then pass it to `self.route_stanza()` if it is not directed
        to `self.me` and `self.process_all_stanzas` is not True. Otherwise
        stanza is passwd to `self.process_iq()`, `self.process_message()`
        or `self.process_presence()` appropriately.

        :Parameters:
            - `stanza`: the stanza received.

        :returns: `True` when stanza was handled
        """

        arg_0.fix_in_stanza(arg_1)
        arg_2 = arg_1.to_jid

        if not arg_0.process_all_stanzas and arg_2 and (
                arg_2 != arg_0.me and arg_2.bare() != arg_0.me.bare()):
            return arg_0.route_stanza(arg_1)

        try:
            if isinstance(arg_1, Iq):
                if arg_0.process_iq(arg_1):
                    return True
            elif isinstance(arg_1, Message):
                if arg_0.process_message(arg_1):
                    return True
            elif isinstance(arg_1, Presence):
                if arg_0.process_presence(arg_1):
                    return True
        except ProtocolError, err:
            arg_3 = arg_1.stanza_type
            if arg_3 != 'error' and (arg_3 != 'result'
                                                or arg_1.stanza_type != 'iq'):
                arg_4 = arg_1.make_error_response(err.xmpp_name)
                arg_0.send(arg_4)
                err.log_reported()
            else:
                err.log_ignored()
            return
        logger.debug("Unhandled %r stanza: %r" % (arg_1.stanza_type,
                                                        arg_1.serialize()))
        return False

Process stanza received from the stream .


def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : arg_4 = arg_3 [ "fn_loss" ] if arg_2 is None : arg_2 = tf . trainable_variables return tf . gradients ( arg_4 , arg_2 )

def Func(arg_0, arg_1, arg_2, **arg_3):
        """
        Creates the TensorFlow operations for performing an optimization step on the given variables, including
        actually changing the values of the variables.

        Args:
            time: Time tensor. Not used for this optimizer.
            variables: List of variables to optimize.
            **kwargs:
                fn_loss : loss function tensor to differentiate.

        Returns:
            List of delta tensors corresponding to the updates for each optimized variable.
        """
        arg_4 = arg_3["fn_loss"]
        if arg_2 is None:
            arg_2 = tf.trainable_variables
        return tf.gradients(arg_4, arg_2)

Creates the TensorFlow operations for performing an optimization step on the given variables including actually changing the values of the variables .


def Func(*arg_0):
    """Runs a series of parsers in sequence passing the result of each parser to the next.
    The result of the last parser is returned.
    """
    def Func_block(*arg_0, **arg_1):
        arg_2 = arg_0[0](*arg_0, **arg_1)
        for arg_3 in arg_0[1:]:
            arg_2 = arg_3(arg_2)
        return arg_2
    return Func_block

Runs a series of parsers in sequence passing the result of each parser to the next . The result of the last parser is returned .


return int(ilvls[0].get('%sval' % w_namespace))

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . xpath ( './/w:ilvl' , namespaces = arg_0 . nsmap ) if len ( arg_2 ) == 0 : return - 1 return int ( arg_2 [ 0 ] . get ( '%sval' % arg_1 ) )

def Func(arg_0, arg_1):
    """
    The ilvl on an li tag tells the li tag at what level of indentation this
    tag is at. This is used to determine if the li tag needs to be nested or
    not.
    """
    arg_2 = arg_0.xpath('.//w:ilvl', namespaces=arg_0.nsmap)
    if len(arg_2) == 0:
        return -1
    return int(arg_2[0].get('%sval' % arg_1))

The ilvl on an li tag tells the li tag at what level of indentation this tag is at . This is used to determine if the li tag needs to be nested or not .


def
Func
(
arg_0
,
arg_1
)
:
LOG
.
info
(
"Saving case %s"
,
arg_1
[
'_id'
]
)
arg_1
[
'updated_at'
]
=
datetime
.
datetime
.
now
(
)
,
arg_2
=
arg_0
.
case_collection
.
find_one_and_replace
(
{
'_id'
:
arg_1
[
'_id'
]
}
,
arg_1
,
return_document
=
pymongo
.
ReturnDocument
.
AFTER
)
return
arg_2

def Func(arg_0, arg_1):
        """Replace a existing case with a new one

        Keeps the object id

        Args:
            case_obj(dict)

        Returns:
            updated_case(dict)
        """
        # Todo: Figure out and describe when this method destroys a case if invoked instead of
        # update_case
        LOG.info("Saving case %s", arg_1['_id'])
        # update updated_at of case to "today"

        arg_1['updated_at'] = datetime.datetime.now(),

        arg_2 = arg_0.case_collection.find_one_and_replace(
            {'_id': arg_1['_id']},
            arg_1,
            return_document=pymongo.ReturnDocument.AFTER
        )

        return arg_2


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : if arg_3 == 'asc' : arg_1 = arg_1 . Func_by ( asc ( arg_2 ) ) elif arg_3 == 'desc' : arg_1 = arg_1 . Func_by ( desc ( arg_2 ) ) return arg_1

def Func(arg_0, arg_1, arg_2, arg_3):
        """Modify query as so to Func the results.

        :param query: Query object.
        :param str s: Orderinig: ``asc`` or ``desc``.
        :returs: Query object.
        """
        if arg_3 == 'asc':
            arg_1 = arg_1.Func_by(asc(arg_2))
        elif arg_3 == 'desc':
            arg_1 = arg_1.Func_by(desc(arg_2))
        return arg_1

Modify query as so to order the results.

        :param query: Query object.
        :param str s: Orderinig: ``asc`` or ``desc``.
        :returs: Query object.

Modify query as so to order the results .


(
            self, user_name, environment_id, custom_headers=None, raw=False, polling=True, **operation_config)

return LROPoller(self._client, raw_result, get_long_running_output, polling_method)

def Func(
            arg_0, arg_1, arg_2, arg_3=None, arg_4=False, arg_5=True, **arg_6):
        """Starts an environment by starting all resources inside the environment.
        This operation can take a while to complete.

        :param user_name: The name of the user.
        :type user_name: str
        :param environment_id: The resourceId of the environment
        :type environment_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns None or
         ClientRawResponse<None> if raw==True
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        arg_7 = arg_0._Func_initial(
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=True,
            **arg_6
        )

        def get_long_running_output(arg_8):
            if arg_4:
                arg_9 = ClientRawResponse(None, arg_8)
                return arg_9

        arg_10 = arg_6.get(
            'long_running_operation_timeout',
            arg_0.config.long_running_operation_timeout)
        if arg_5 is True: arg_11 = ARMPolling(arg_10, **arg_6)
        elif arg_5 is False: arg_11 = NoPolling()
        else: arg_11 = arg_5
        return LROPoller(arg_0._client, arg_7, get_long_running_output, arg_11)

Starts an environment by starting all resources inside the environment . This operation can take a while to complete .


def Func(arg_0, arg_1):
        """
        Swap the positions of this object with a reference object.
        """
        try:
            arg_2 = arg_1[0]
        except IndexError:
            # already first/last
            return
        if not arg_0._valid_ordering_reference(arg_2):
            raise ValueError(
                "%r can only be Funcped with 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()
                )
            )
        arg_0.order, arg_2.order = arg_2.order, arg_0.order
        arg_0.save()
        arg_2.save()

Swap the positions of this object with a reference object .


def Func ( arg_0 , arg_1 = 60 ) : if arg_1 <= 0 : raise ErrBadTimeout if arg_0 . is_closed : raise ErrConnectionClosed arg_2 = asyncio . Future ( loop = arg_0 . _loop ) try : yield from arg_0 . _send_ping ( arg_2 ) yield from asyncio . wait_for ( arg_2 , arg_1 , loop = arg_0 . _loop ) except asyncio . TimeoutError : arg_2 . cancel ( ) raise ErrTimeout

def Func(arg_0, arg_1=60):
        """
        Sends a ping to the server expecting a pong back ensuring
        what we have written so far has made it to the server and
        also enabling measuring of roundtrip time.
        In case a pong is not returned within the allowed timeout,
        then it will raise ErrTimeout.
        """
        if arg_1 <= 0:
            raise ErrBadTimeout

        if arg_0.is_closed:
            raise ErrConnectionClosed

        arg_2 = asyncio.Future(loop=arg_0._loop)
        try:
            yield from arg_0._send_ping(arg_2)
            yield from asyncio.wait_for(arg_2, arg_1, loop=arg_0._loop)
        except asyncio.TimeoutError:
            arg_2.cancel()
            raise ErrTimeout

Sends a ping to the server expecting a pong back ensuring what we have written so far has made it to the server and also enabling measuring of roundtrip time . In case a pong is not returned within the allowed timeout then it will raise ErrTimeout .


def Func ( arg_0 , arg_1 ) : arg_2 = np . zeros ( arg_1 . shape [ 0 ] , dtype = np . int ) for arg_3 in range ( arg_1 . shape [ 0 ] ) : arg_4 = tuple ( arg_1 [ arg_3 ] ) if arg_4 in arg_0 . feature_map : arg_2 [ arg_3 ] = arg_0 . feature_map [ arg_4 ] else : arg_2 [ arg_3 ] = arg_0 . default_label return arg_2 . reshape ( arg_1 . shape [ 0 ] , 1 )

def Func(arg_0, arg_1):
        """Uses the Continuous MDR feature map to construct a new feature from the provided features.

        Parameters
        ----------
        features: array-like {n_samples, n_features}
            Feature matrix to Func

        Returns
        ----------
        array-like: {n_samples}
            Constructed feature from the provided feature matrix
            The constructed feature will be a binary variable, taking the values 0 and 1

        """
        arg_2 = np.zeros(arg_1.shape[0], dtype=np.int)

        for arg_3 in range(arg_1.shape[0]):
            arg_4 = tuple(arg_1[arg_3])
            if arg_4 in arg_0.feature_map:
                arg_2[arg_3] = arg_0.feature_map[arg_4]
            else:
                arg_2[arg_3] = arg_0.default_label

        return arg_2.reshape(arg_1.shape[0], 1)

Uses the Continuous MDR feature map to construct a new feature from the provided features.

        Parameters
        ----------
        features: array-like {n_samples, n_features}
            Feature matrix to transform

        Returns
        ----------
        array-like: {n_samples}
            Constructed feature from the provided feature matrix
            The constructed feature will be a binary variable, taking the values 0 and 1

Uses the Continuous MDR feature map to construct a new feature from the provided features .


def Func(arg_0, arg_1, arg_2):
    """
    Residual resistance coefficient estimation from slenderness function, prismatic coefficient and Froude number.

    :param slenderness: Slenderness coefficient dimensionless :math:`L/(∇^{1/3})` where L is length of ship, ∇ is displacement
    :param prismatic_coef: Prismatic coefficient dimensionless :math:`∇/(L\cdot A_m)` where L is length of ship, ∇ is displacement Am is midsection area of the ship
    :param froude_number: Froude number of the ship dimensionless
    :return: Residual resistance of the ship
    """
    arg_3 = cr(arg_0, arg_1, arg_2)
    if math.isnan(arg_3):
        arg_3 = cr_nearest(arg_0, arg_1, arg_2)

    # if Froude number is out of interpolation range, nearest extrapolation is used
    return arg_3

Residual resistance coefficient estimation from slenderness function prismatic coefficient and Froude number .


def
Func
(
)
:
arg_0
=
dt
.
fromtimestamp
(
time
.
time
(
)
)
.
strftime
(
'%Y%m%d_%H%M'
)
arg_1
=
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
)
+
"/nanoGUI_"
+
arg_0
+
".log"
)
arg_2
=
[
logging
.
FileHandler
(
arg_1
)
]
logging
.
basicConfig
(
format
=
'%(asctime)s %(message)s'
,
arg_2
=
arg_2
,
level
=
logging
.
INFO
)
logging
.
info
(
'NanoGUI {} started with NanoPlot {}'
.
format
(
__version__
,
nanoplot
.
__version__
)
)
logging
.
info
(
'Python version is: {}'
.
format
(
sys
.
version
.
replace
(
'\n'
,
' '
)
)
)
return
arg_1

def Func():
    """Initiate log file."""
    arg_0 = dt.fromtimestamp(time.time()).strftime('%Y%m%d_%H%M')
    arg_1 = os.path.join(os.path.expanduser("~") + "/nanoGUI_" + arg_0 + ".log")
    arg_2 = [logging.FileHandler(arg_1)]
    logging.basicConfig(
        format='%(asctime)s %(message)s',
        arg_2=arg_2,
        level=logging.INFO)
    logging.info('NanoGUI {} started with NanoPlot {}'.format(__version__, nanoplot.__version__))
    logging.info('Python version is: {}'.format(sys.version.replace('\n', ' ')))
    return arg_1


def Func(arg_0, **arg_1):
        """
        Search for Funcs by title.

        Args:
            query: CGI escpaed string.
            page: (optional) Minimum value of 1. Expected value is an integer.
            language: (optional) ISO 639-1 code.
            include_adult: (optional) Toggle the inclusion of adult titles.
                           Expected value is True or False.
            year: (optional) Filter the results release dates to matches that
                  include this value.
            primary_release_year: (optional) Filter the results so that only
                                  the primary release dates have this value.
            search_type: (optional) By default, the search type is 'phrase'.
                         This is almost guaranteed the option you will want.
                         It's a great all purpose search type and by far the
                         most tuned for every day querying. For those wanting
                         more of an "autocomplete" type search, set this
                         option to 'ngram'.

        Returns:
            A dict respresentation of the JSON returned from the API.
        """
        arg_2 = arg_0._get_path('Func')

        arg_3 = arg_0._GET(arg_2, arg_1)
        arg_0._set_attrs_to_values(arg_3)
        return arg_3

Search for movies by title.

        Args:
            query: CGI escpaed string.
            page: (optional) Minimum value of 1. Expected value is an integer.
            language: (optional) ISO 639-1 code.
            include_adult: (optional) Toggle the inclusion of adult titles.
                           Expected value is True or False.
            year: (optional) Filter the results release dates to matches that
                  include this value.
            primary_release_year: (optional) Filter the results so that only
                                  the primary release dates have this value.
            search_type: (optional) By default, the search type is 'phrase'.
                         This is almost guaranteed the option you will want.
                         It's a great all purpose search type and by far the
                         most tuned for every day querying. For those wanting
                         more of an "autocomplete" type search, set this
                         option to 'ngram'.

        Returns:
            A dict respresentation of the JSON returned from the API.


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . has_package ( arg_1 ) : arg_1 . package . files . append ( file . File ( arg_2 ) ) arg_0 . reset_file_stat ( ) return True else : raise OrderError ( 'File::Name' )

def Func(arg_0, arg_1, arg_2):
        """Raises OrderError if no package defined.
        """
        if arg_0.has_package(arg_1):
            arg_1.package.files.append(file.File(arg_2))
            # A file name marks the start of a new file instance.
            # The builder must be reset
            # FIXME: this state does not make sense
            arg_0.reset_file_stat()
            return True
        else:
            raise OrderError('File::Name')

Raises OrderError if no package defined .


def Func ( arg_0 ) : if len ( arg_0 ) > 1 : arg_1 = Composite ( [ StepFactory . produce ( step_config ) for step_config in arg_0 ] ) else : arg_1 = StepFactory . produce ( arg_0 [ 0 ] ) arg_2 . status . publish ( 'duration' , arg_1 . get_duration ( ) / 1000 ) arg_2 . status . publish ( 'steps' , arg_1 . get_rps_list ( ) ) arg_2 . status . lp_len = len ( arg_1 ) return arg_1

def Func(arg_0):
    """
    Create Load Plan as defined in schedule. Publish info about its duration.
    """
    if len(arg_0) > 1:
        arg_1 = Composite(
            [StepFactory.produce(step_config) for step_config in arg_0])
    else:
        arg_1 = StepFactory.produce(arg_0[0])
    arg_2.status.publish('duration', arg_1.get_duration() / 1000)
    arg_2.status.publish('steps', arg_1.get_rps_list())
    arg_2.status.lp_len = len(arg_1)
    return arg_1

Create Load Plan as defined in schedule . Publish info about its duration .


(self, store_id, product_id, image_id, **queryparams)

return self._mc_client._post(
            url=self._build_path(store_id, 'products', product_id, 'images', image_id),
            **queryparams
        )

def Func(arg_0, arg_1, arg_2, arg_3, **arg_4):
        """
        Get information about a specific product image.

        :param store_id: The store id.
        :type store_id: :py:class:`str`
        :param product_id: The id for the product of a store.
        :type product_id: :py:class:`str`
        :param image_id: The id for the product image.
        :type image_id: :py:class:`str`
        :param queryparams: The query string parameters
        queryparams['fields'] = []
        queryparams['exclude_fields'] = []
        """
        arg_0.store_id = arg_1
        arg_0.product_id = arg_2
        arg_0.image_id = arg_3
        return arg_0._mc_client._post(
            url=arg_0._build_path(arg_1, 'products', arg_2, 'images', arg_3),
            **arg_4
        )

Get information about a specific product image .