def Func(arg_0, arg_1, arg_2=True):
    """Return the process fidelity between two quantum channels.

    This is given by

        F_p(E1, E2) = Tr[S2^dagger.S1])/dim^2

    where S1 and S2 are the SuperOp matrices for channels E1 and E2,
    and dim is the dimension of the input output statespace.

    Args:
        channel1 (QuantumChannel or matrix): a quantum channel or unitary matrix.
        channel2 (QuantumChannel or matrix): a quantum channel or unitary matrix.
        require_cptp (bool): require input channels to be CPTP [Default: True].

    Returns:
        array_like: The state fidelity F(state1, state2).

    Raises:
        QiskitError: if inputs channels do not have the same dimensions,
        have different input and output dimensions, or are not CPTP with
        `require_cptp=True`.
    """
    # First we must determine if input is to be interpreted as a unitary matrix
    # or as a channel.
    # If input is a raw numpy array we will interpret it as a unitary matrix.
    arg_3 = None
    arg_4 = None
    if isinstance(arg_0, (list, np.ndarray)):
        arg_0 = Operator(arg_0)
        if arg_2:
            arg_3 = arg_0.is_unitary()
    if isinstance(arg_1, (list, np.ndarray)):
        arg_1 = Operator(arg_1)
        if arg_2:
            arg_4 = arg_1.is_unitary()

    # Next we convert inputs SuperOp objects
    # This works for objects that also have a `to_operator` or `to_channel` method
    arg_5 = SuperOp(arg_0)
    arg_6 = SuperOp(arg_1)

    # Check inputs are CPTP
    if arg_2:
        # Only check SuperOp if we didn't already check unitary inputs
        if arg_3 is None:
            arg_3 = arg_5.is_cptp()
        if not arg_3:
            raise QiskitError('channel1 is not CPTP')
        if arg_4 is None:
            arg_4 = arg_6.is_cptp()
        if not arg_4:
            raise QiskitError('channel2 is not CPTP')

    # Check dimensions match
    arg_7, arg_8 = arg_5.dim
    arg_9, arg_10 = arg_6.dim
    if arg_7 != arg_8 or arg_9 != arg_10:
        raise QiskitError('Input channels must have same size input and output dimensions.')
    if arg_7 != arg_9:
        raise QiskitError('Input channels have different dimensions.')

    # Compute process fidelity
    arg_11 = np.trace(arg_5.compose(arg_6.adjoint()).data) / (arg_7 ** 2)
    return arg_11

Return the process fidelity between two quantum channels .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
try
:
arg_3
=
arg_0
.
_prm_read_table
(
arg_1
,
arg_2
)
arg_4
=
arg_3
.
to_dict
(
'list'
)
arg_5
=
{
}
for
arg_6
,
arg_7
in
arg_4
.
items
(
)
:
arg_5
[
arg_6
]
=
arg_7
[
0
]
return
arg_5
except
:
arg_0
.
_logger
.
error
(
'Failed loading `%s` of `%s`.'
%
(
arg_1
.
_v_name
,
arg_2
)
)
raise

def Func(arg_0, arg_1, arg_2):
        """Loads data that was originally a dictionary when stored

        :param leaf:

            PyTables table containing the dictionary data

        :param full_name:

            Full name of the parameter or result whose data is to be loaded

        :return:

            Data to be loaded

        """
        try:
            # Load as Pbject Table
            arg_3 = arg_0._prm_read_table(arg_1, arg_2)
            # Turn the ObjectTable into a dictionary of lists (with length 1).
            arg_4 = arg_3.to_dict('list')

            arg_5 = {}

            # Turn the dictionary of lists into a normal dictionary
            for arg_6, arg_7 in arg_4.items():
                arg_5[arg_6] = arg_7[0]

            return arg_5
        except:
            arg_0._logger.error('Failed loading `%s` of `%s`.' % (arg_1._v_name, arg_2))
            raise


def Func ( arg_0 , arg_1 , arg_2 = 0.02 , arg_3 = True ) : assert arg_0 . shape == arg_1 . shape assert arg_0 . ndim == 2 or ( arg_0 . ndim == 3 and arg_0 . shape [ - 1 ] == 1 ) arg_0 , arg_1 = [ dequantize ( d , - arg_2 , arg_2 , 255 ) for d in [ arg_0 , arg_1 ] ] if arg_3 : arg_0 *= arg_0 . shape [ 1 ] arg_1 *= arg_0 . shape [ 0 ] arg_4 = np . dstack ( ( arg_0 , arg_1 ) ) return arg_4

def Func(arg_0, arg_1, arg_2=0.02, arg_3=True):
    """Recover from quantized flow.

    Args:
        dx (ndarray): Quantized dx.
        dy (ndarray): Quantized dy.
        max_val (float): Maximum value used when quantizing.
        denorm (bool): Whether to multiply flow values with width/height.

    Returns:
        ndarray: Dequantized flow.
    """
    assert arg_0.shape == arg_1.shape
    assert arg_0.ndim == 2 or (arg_0.ndim == 3 and arg_0.shape[-1] == 1)

    arg_0, arg_1 = [dequantize(d, -arg_2, arg_2, 255) for d in [arg_0, arg_1]]

    if arg_3:
        arg_0 *= arg_0.shape[1]
        arg_1 *= arg_0.shape[0]
    arg_4 = np.dstack((arg_0, arg_1))
    return arg_4


Check the rules for each node in the graph and apply the style.

def Func ( arg_0 ) : arg_1 = arg_0 . order + arg_0 . keys ( ) arg_2 = [ ] [ arg_2 . append ( arg_3 ) for arg_3 in arg_1 if arg_3 not in arg_2 ] for arg_4 in arg_0 . graph . nodes : for arg_5 in arg_2 : if arg_0 . has_key ( arg_5 ) and arg_0 [ arg_5 ] ( arg_0 . graph , arg_4 ) : arg_4 . style = arg_5

def Func(arg_0):
        """ Check the rules for each node in the graph and Func the style.
        """
        arg_1 = arg_0.order + arg_0.keys()
        arg_2 = []; [arg_2.append(arg_3) for arg_3 in arg_1 if arg_3 not in arg_2]
        for arg_4 in arg_0.graph.nodes:
            for arg_5 in arg_2:
                if arg_0.has_key(arg_5) and arg_0[arg_5](arg_0.graph, arg_4):
                    arg_4.style = arg_5

Check the rules for each node in the graph and apply the style .


(self, traj_group, load_data=pypetconstants.LOAD_DATA, with_links=True,
                        recursive=False, max_depth=None,
                        _traj=None, _as_new=False, _hdf5_group=None)

def Func(arg_0, arg_1, arg_2=arg_3.LOAD_DATA, arg_5=True,
                        arg_6=False, arg_7=None,
                        arg_8=None, arg_9=False, arg_10=None):
        """Loads a group node and potentially everything recursively below"""
        if arg_10 is None:
            arg_10 = arg_0._all_get_node_by_name(arg_1.v_full_name)
            arg_8 = arg_1.v_root

        if arg_6:
            arg_11 = arg_1.f_get_parent()
            arg_0._tree_load_nodes_dfs(arg_11, arg_2=arg_2, arg_5=arg_5,
                                  arg_6=arg_6, arg_7=arg_7,
                                  current_depth=0,
                                  trajectory=arg_8, as_new=arg_9,
                                  hdf5_group=arg_10)
        else:
            if arg_2 == arg_3.LOAD_NOTHING:
                return

            elif arg_2 == arg_3.OVERWRITE_DATA:
                arg_1.v_annotations.f_empty()
                arg_1.v_comment = ''

            arg_0._all_load_skeleton(arg_1, arg_10)
            arg_1._stored = not arg_9

            # Signal completed node loading
            arg_0._node_processing_timer.signal_update()


return 100 * np.min([a, b], axis=0).sum() / np.max([a, b], axis=0).sum()

def Func ( arg_0 , arg_1 ) : return 100 * np . min ( [ arg_0 , arg_1 ] , axis = 0 ) . sum ( ) / np . max ( [ arg_0 , arg_1 ] , axis = 0 ) . sum ( )

def Func(arg_0, arg_1):
    """Figure of merit in time
    """
    return 100 * np.min([arg_0, arg_1], axis=0).sum() / np.max([arg_0, arg_1], axis=0).sum()


return self._load_data(
            self.CATALOGS_COURSES_ENDPOINT.format(catalog_id),
            default=[],
            querystring=querystring,
            traverse_pagination=False,
            many=False,
        )

def Func ( arg_0 , arg_1 , arg_2 = None ) : return arg_0 . _load_data ( arg_0 . CATALOGS_COURSES_ENDPOINT . format ( arg_1 ) , default = [ ] , arg_2 = arg_2 , traverse_pagination = False , many = False , )

def Func(arg_0, arg_1, arg_2=None):
        """
        Return paginated response for all catalog courses.

        Returns:
            dict: API response with links to next and previous pages.

        """
        return arg_0._load_data(
            arg_0.CATALOGS_COURSES_ENDPOINT.format(arg_1),
            default=[],
            arg_2=arg_2,
            traverse_pagination=False,
            many=False,
        )

Return paginated response for all catalog courses .


def Func(arg_0, arg_1=None):
    """
    Given a datetime and a time zone, determine whether or not a given datetime
    would fall in a gap.

    :param dt:
        A :class:`datetime.datetime` (whose time zone will be ignored if ``tz``
        is provided.)

    :param tz:
        A :class:`datetime.tzinfo` with support for the ``fold`` attribute. If
        ``None`` or not provided, the datetime's own time zone will be used.

    :return:
        Returns a boolean value whether or not the "wall time" exists in ``tz``.
    """
    if arg_1 is None:
        if arg_0.tzinfo is None:
            raise ValueError('Datetime is naive and no time zone provided.')
        arg_1 = arg_0.tzinfo

    arg_0 = arg_0.replace(tzinfo=None)

    # This is essentially a test of whether or not the datetime can survive
    # a round trip to UTC.
    arg_2 = arg_0.replace(tzinfo=arg_1).astimezone(tzutc()).astimezone(arg_1)
    arg_2 = arg_2.replace(tzinfo=None)

    return arg_0 == arg_2

Given a datetime and a time zone determine whether or not a given datetime would fall in a gap .


def Func ( arg_0 , arg_1 ) : if arg_0 . checksum : return ( arg_0 . address_from_digest ( digest = arg_0 . _get_digest ( arg_1 ) , ) . with_valid_checksum ( ) ) else : return arg_0 . address_from_digest ( arg_0 . _get_digest ( arg_1 ) )

def Func(arg_0, arg_1):
        # type: (KeyIterator) -> Address
        """
        Generates a new address.

        Used in the event of a cache miss.
        """
        if arg_0.checksum:
            return (
                arg_0.address_from_digest(
                    digest=arg_0._get_digest(arg_1),
                ).with_valid_checksum()
            )
        else:
            return arg_0.address_from_digest(arg_0._get_digest(arg_1))


return ParseNode(new_type,
                      children=list(self.children),
                      consumed=self.consumed,
                      position=self.position,
                      ignored=self.ignored)

def Func ( arg_0 , arg_1 ) : return ParseNode ( arg_1 , children = list ( arg_0 . children ) , consumed = arg_0 . consumed , position = arg_0 . position , ignored = arg_0 . ignored )

def Func(arg_0, arg_1):
    """Returns a new node with the same contents as self, but with a new node_type."""
    return ParseNode(arg_1,
                      children=list(arg_0.children),
                      consumed=arg_0.consumed,
                      position=arg_0.position,
                      ignored=arg_0.ignored)

Returns a new node with the same contents as self but with a new node_type .


def Func ( arg_0 ) : if arg_0 . _Func is None : arg_0 . _Func = [ c for c in arg_0 . grammar . children if c . is_type ( TokenType . comment ) ] return arg_0 . _Func

def Func(arg_0):
    """The AST Func."""
    if arg_0._Func is None:
      arg_0._Func = [c for c in arg_0.grammar.children if c.is_type(TokenType.comment)]
    return arg_0._Func


(self, service_name, deployment_name, role_names,
                       post_shutdown_action='Stopped')

return self._perform_post(
            self._get_roles_operations_path(service_name, deployment_name),
            _XmlSerializer.shutdown_roles_operation_to_xml(
                role_names, post_shutdown_action),
            as_async=True)

def Func(arg_0, arg_1, arg_2, arg_3,
                       arg_4='Stopped'):
        '''
        Shuts down the specified virtual machines.

        service_name:
            The name of the service.
        deployment_name:
            The name of the deployment.
        role_names:
            The names of the roles, as an enumerable of strings.
        post_shutdown_action:
            Specifies how the Virtual Machine should be shut down. Values are:
                Stopped
                    Shuts down the Virtual Machine but retains the compute
                    resources. You will continue to be billed for the resources
                    that the stopped machine uses.
                StoppedDeallocated
                    Shuts down the Virtual Machine and releases the compute
                    resources. You are not billed for the compute resources that
                    this Virtual Machine uses. If a static Virtual Network IP
                    address is assigned to the Virtual Machine, it is reserved.
        '''
        _validate_not_none('service_name', arg_1)
        _validate_not_none('deployment_name', arg_2)
        _validate_not_none('role_names', arg_3)
        _validate_not_none('post_shutdown_action', arg_4)
        return arg_0._perform_post(
            arg_0._get_roles_operations_path(arg_1, arg_2),
            _XmlSerializer.Func_operation_to_xml(
                arg_3, arg_4),
            as_async=True)

Shuts down the specified virtual machines .


def Func ( arg_0 , arg_1 ) : if arg_1 . chat . type == 'private' : return arg_1 . user . id return arg_1 . chat . id

def Func(arg_0, arg_1):
        '''
        Telegram chat type can be either "private", "group", "supergroup" or
        "channel".
        Return user ID if it is of type "private", chat ID otherwise.
        '''
        if arg_1.chat.type == 'private':
            return arg_1.user.id

        return arg_1.chat.id

Telegram chat type can be either private group supergroup or channel . Return user ID if it is of type private chat ID otherwise .


def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_2 is None : arg_2 = arg_0 . default_include_headers arg_2 = [ x . lower ( ) for x in arg_2 ] arg_3 = arg_1 . headers . copy ( ) if 'host' not in arg_3 : arg_3 [ 'host' ] = urlparse ( arg_1 . url ) . netloc . split ( ':' ) [ 0 ] arg_4 = { } for arg_5 , arg_6 in arg_3 . items ( ) : arg_5 = arg_5 . strip ( ) . lower ( ) arg_6 = arg_0 . amz_norm_whitespace ( arg_6 ) . strip ( ) if ( arg_5 in arg_2 or '*' in arg_2 or ( 'x-amz-*' in arg_2 and arg_5 . startswith ( 'x-amz-' ) and not arg_5 == 'x-amz-client-context' ) ) : arg_7 = arg_4 . setdefault ( arg_5 , [ ] ) arg_7 . append ( arg_6 ) arg_8 = '' arg_9 = [ ] for arg_5 in sorted ( arg_4 ) : arg_7 = arg_4 [ arg_5 ] arg_6 = ',' . join ( sorted ( arg_7 ) ) arg_8 += '{}:{}\n' . format ( arg_5 , arg_6 ) arg_9 . append ( arg_5 ) arg_10 = ';' . join ( arg_9 ) return ( arg_8 , arg_10 )

def Func(arg_0, arg_1, arg_2=None):
        """
        Generate the Canonical Headers section of the Canonical Request.

        Return the Canonical Headers and the Signed Headers strs as a tuple
        (canonical_headers, signed_headers).

        req     -- Requests PreparedRequest object
        include -- List of headers to include in the canonical and signed
                   headers. It's primarily included to allow testing against
                   specific examples from Amazon. If omitted or None it
                   includes host, content-type and any header starting 'x-amz-'
                   except for x-amz-client context, which appears to break
                   mobile analytics auth if included. Except for the
                   x-amz-client-context exclusion these defaults are per the
                   AWS documentation.

        """
        if arg_2 is None:
            arg_2 = arg_0.default_include_headers
        arg_2 = [x.lower() for x in arg_2]
        arg_3 = arg_1.headers.copy()
        # Temporarily include the host header - AWS requires it to be included
        # in the signed headers, but Requests doesn't include it in a
        # PreparedRequest
        if 'host' not in arg_3:
            arg_3['host'] = urlparse(arg_1.url).netloc.split(':')[0]
        # Aggregate for upper/lowercase header name collisions in header names,
        # AMZ requires values of colliding headers be concatenated into a
        # single header with lowercase name.  Although this is not possible with
        # Requests, since it uses a case-insensitive dict to hold headers, this
        # is here just in case you duck type with a regular dict
        arg_4 = {}
        for arg_5, arg_6 in arg_3.items():
            arg_5 = arg_5.strip().lower()
            arg_6 = arg_0.amz_norm_whitespace(arg_6).strip()
            if (arg_5 in arg_2 or '*' in arg_2 or
                    ('x-amz-*' in arg_2 and arg_5.startswith('x-amz-') and not
                    arg_5 == 'x-amz-client-context')):
                arg_7 = arg_4.setdefault(arg_5, [])
                arg_7.append(arg_6)
        # Flatten cano_headers dict to string and generate signed_headers
        arg_8 = ''
        arg_9 = []
        for arg_5 in sorted(arg_4):
            arg_7 = arg_4[arg_5]
            arg_6 = ','.join(sorted(arg_7))
            arg_8 += '{}:{}\n'.format(arg_5, arg_6)
            arg_9.append(arg_5)
        arg_10 = ';'.join(arg_9)
        return (arg_8, arg_10)

Generate the Canonical Headers section of the Canonical Request .


(modname, hide_init=True, hide_main=False, sys_path=None)

def Func(arg_0, arg_1=True, arg_2=False, arg_3=None):
    """
    Finds the path to a python module from its name.

    Determines the path to a python module without directly import it

    Converts the name of a module (__name__) to the path (__file__) where it is
    located without importing the module. Returns None if the module does not
    exist.

    Args:
        modname (str): module filepath
        hide_init (bool): if False, __init__.py will be returned for packages
        hide_main (bool): if False, and hide_init is True, __main__.py will be
            returned for packages, if it exists.
        sys_path (list): if specified overrides `sys.path` (default None)

    Returns:
        str: modpath - path to the module, or None if it doesn't exist

    CommandLine:
        python -m xdoctest.static_analysis Func:0
        pytest  /home/joncrall/code/xdoctest/xdoctest/static_analysis.py::Func:0

    Example:
        >>> modname = 'xdoctest.__main__'
        >>> modpath = Func(modname, hide_main=False)
        >>> assert modpath.endswith('__main__.py')
        >>> modname = 'xdoctest'
        >>> modpath = Func(modname, hide_init=False)
        >>> assert modpath.endswith('__init__.py')
        >>> modpath = basename(Func('_ctypes'))
        >>> assert 'ctypes' in modpath
    """
    arg_4 = _syspath_Func(arg_0, arg_3)
    if arg_4 is None:
        return None

    arg_4 = normalize_modpath(arg_4, arg_1=arg_1,
                                arg_2=arg_2)
    return arg_4

Finds the path to a python module from its name.

    Determines the path to a python module without directly import it

    Converts the name of a module (__name__) to the path (__file__) where it is
    located without importing the module. Returns None if the module does not
    exist.

    Args:
        modname (str): module filepath
        hide_init (bool): if False, __init__.py will be returned for packages
        hide_main (bool): if False, and hide_init is True, __main__.py will be
            returned for packages, if it exists.
        sys_path (list): if specified overrides `sys.path` (default None)

    Returns:
        str: modpath - path to the module, or None if it doesn't exist

    CommandLine:
        python -m xdoctest.static_analysis modname_to_modpath:0
        pytest  /home/joncrall/code/xdoctest/xdoctest/static_analysis.py::modname_to_modpath:0

    Example:
        >>> modname = 'xdoctest.__main__'
        >>> modpath = modname_to_modpath(modname, hide_main=False)
        >>> assert modpath.endswith('__main__.py')
        >>> modname = 'xdoctest'
        >>> modpath = modname_to_modpath(modname, hide_init=False)
        >>> assert modpath.endswith('__init__.py')
        >>> modpath = basename(modname_to_modpath('_ctypes'))
        >>> assert 'ctypes' in modpath

Finds the path to a python module from its name .


def
Func
(
arg_0
,
*
arg_1
)
:
arg_0
.
filtered_ids
=
[
]
arg_0
.
report
=
{
}
arg_4
=
[
[
"gc_prop"
,
">="
,
arg_0
.
min_gc
]
,
[
"gc_prop"
,
"<="
,
1
arg_0
.
min_gc
]
]
arg_0
.
filters
=
list
(
arg_1
)
+
arg_4
logger
.
debug
(
"Filtering contigs using filters: {}"
.
format
(
arg_0
.
filters
)
)
for
arg_6
,
arg_7
in
arg_0
.
contigs
.
items
(
)
:
for
arg_8
,
arg_9
,
arg_10
in
list
(
arg_1
)
+
arg_4
:
if
not
arg_0
.
_test_truth
(
arg_7
[
arg_8
]
,
arg_9
,
arg_10
)
:
arg_0
.
filtered_ids
.
append
(
arg_6
)
arg_0
.
report
[
arg_6
]
=
"{}/{}/{}"
.
format
(
arg_8
,
arg_7
[
arg_8
]
,
arg_10
)
break
else
:
arg_0
.
report
[
arg_6
]
=
"pass"

def Func(arg_0, *arg_1):
        """Filters the contigs of the assembly according to user provided\
        comparisons.

        The comparisons must be a list of three elements with the
        :py:attr:`~Assembly.contigs` key, operator and test value. For
        example, to filter contigs with a minimum length of 250, a comparison
        would be::

            self.Func(["length", ">=", 250])

        The filtered contig ids will be stored in the
        :py:attr:`~Assembly.filtered_ids` list.

        The result of the test for all contigs will be stored in the
        :py:attr:`~Assembly.report` dictionary.

        Parameters
        ----------
        comparisons : list
            List with contig key, operator and value to test.

        """

        # Reset list of filtered ids
        arg_0.filtered_ids = []
        arg_0.report = {}

        arg_4 = [
            ["gc_prop", ">=", arg_0.min_gc],
            ["gc_prop", "<=", 1 - arg_0.min_gc]
        ]

        arg_0.filters = list(arg_1) + arg_4

        logger.debug("Filtering contigs using filters: {}".format(
            arg_0.filters))

        for arg_6, arg_7 in arg_0.contigs.items():
            for arg_8, arg_9, arg_10 in list(arg_1) + arg_4:
                if not arg_0._test_truth(arg_7[arg_8], arg_9, arg_10):
                    arg_0.filtered_ids.append(arg_6)
                    arg_0.report[arg_6] = "{}/{}/{}".format(arg_8,
                                                               arg_7[arg_8],
                                                               arg_10)
                    break
                else:
                    arg_0.report[arg_6] = "pass"

Filters the contigs of the assembly according to user provided\
        comparisons.

        The comparisons must be a list of three elements with the
        :py:attr:`~Assembly.contigs` key, operator and test value. For
        example, to filter contigs with a minimum length of 250, a comparison
        would be::

            self.filter_contigs(["length", ">=", 250])

        The filtered contig ids will be stored in the
        :py:attr:`~Assembly.filtered_ids` list.

        The result of the test for all contigs will be stored in the
        :py:attr:`~Assembly.report` dictionary.

        Parameters
        ----------
        comparisons : list
            List with contig key, operator and value to test.

Filters the contigs of the assembly according to user provided \ comparisons .


def Func(arg_0):
        """Getter for various Utilisation variables"""
        if arg_0._Func is None:
            arg_1 = "SYNO.Core.System.Utilization"
            arg_2 = "%s/entry.cgi?api=%s&version=1&method=get" % (
                arg_0.base_url,
                arg_1)
            arg_0._Func = SynoUtilization(arg_0._get_url(arg_2))
        return arg_0._Func


async def Func(arg_0):
        """Get the application bearer token from client_id and client_secret."""
        if arg_0.client_id is None:
            raise SpotifyException(_GET_BEARER_ERR % 'client_id')

        elif arg_0.client_secret is None:
            raise SpotifyException(_GET_BEARER_ERR % 'client_secret')

        arg_1 = b64encode(':'.join((arg_0.client_id, arg_0.client_secret)).encode())

        arg_2 = {
            'url': 'https://accounts.spotify.com/api/token',
            'data': {'grant_type': 'client_credentials'},
            'headers': {'Authorization': 'Basic ' + arg_1.decode()}
        }

        async with arg_0._session.post(**arg_2) as resp:
            return json.loads(await resp.text(encoding='utf-8'))

Get the application bearer token from client_id and client_secret .


def Func ( arg_0 , * arg_1 : arg_2 [ arg_3 ] ) -> int : arg_4 = list ( itertools . chain ( * ( arg_0 . _table [ chan ] for chan in arg_1 if chan in arg_0 . _table ) ) ) if arg_4 : return max ( ( arg_5 . end for arg_5 in arg_4 ) ) return 0

def Func(arg_0, *arg_1: arg_2[arg_3]) -> int:
        """Return maximum time of timeslots over all channels.

        Args:
            *channels: Channels over which to obtain stop time.
        """
        arg_4 = list(itertools.chain(*(arg_0._table[chan] for chan in arg_1
                                           if chan in arg_0._table)))
        if arg_4:
            return max((arg_5.end for arg_5 in arg_4))
        return 0

Return maximum time of timeslots over all channels .


(self, datacenter_id,
                            loadbalancer_id, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : arg_4 = { } for arg_5 , arg_6 in arg_3 . items ( ) : arg_4 [ arg_0 . _underscore_to_camelcase ( arg_5 ) ] = arg_6 arg_8 = arg_0 . _perform_request ( url = '/datacenters/%s/loadbalancers/%s' % ( arg_1 , arg_2 ) , method = 'PATCH' , arg_4 = json . dumps ( arg_4 ) ) return arg_8

def Func(arg_0, arg_1,
                            arg_2, **arg_3):
        """
        Updates a load balancer

        :param      datacenter_id: The unique ID of the data center.
        :type       datacenter_id: ``str``

        :param      loadbalancer_id: The unique ID of the load balancer.
        :type       loadbalancer_id: ``str``

        """
        arg_4 = {}

        for arg_5, arg_6 in arg_3.items():
            arg_4[arg_0._underscore_to_camelcase(arg_5)] = arg_6

        arg_8 = arg_0._perform_request(
            url='/datacenters/%s/loadbalancers/%s' % (arg_1,
                                                      arg_2),
            method='PATCH',
            arg_4=json.dumps(arg_4))

        return arg_8


def Func(arg_0, arg_1):
        """
        Reads the expiration date of a local crt file.
        """
        arg_2 = arg_0.local_renderer
        arg_2.env.crt_fn = arg_1
        with hide('running'):
            arg_5 = arg_2.local('openssl x509 -noout -in {ssl_crt_fn} -dates', capture=True)
        arg_6 = re.findall('notAfter=(.*?)$', arg_5, flags=re.IGNORECASE)
        if arg_6:
            return dateutil.parser.parse(arg_6[0])

Reads the expiration date of a local crt file .


def Func ( arg_0 ) : arg_1 = [ b for b in arg_0 if isinstance ( b , Padding ) ] for arg_2 in arg_1 : arg_0 . remove ( arg_2 ) arg_3 = sum ( arg_4 . length for arg_4 in arg_1 ) arg_4 = Padding ( ) arg_4 . length = arg_3 + 4 * ( len ( arg_1 ) - 1 ) arg_0 . append ( arg_4 )

def Func(arg_0):
        """Consolidate FLAC padding metadata blocks.

        The overall size of the rendered blocks does not change, so
        this adds several bytes of padding for each merged block.
        """

        arg_1 = [b for b in arg_0 if isinstance(b, Padding)]
        for arg_2 in arg_1:
            arg_0.remove(arg_2)
        # total padding size is the sum of padding sizes plus 4 bytes
        # per removed header.
        arg_3 = sum(arg_4.length for arg_4 in arg_1)
        arg_4 = Padding()
        arg_4.length = arg_3 + 4 * (len(arg_1) - 1)
        arg_0.append(arg_4)

Consolidate FLAC padding metadata blocks .


def Func(arg_0, arg_1, arg_2, arg_3):
    """Takes the replacement template and some info about the match and returns filled template
       """
    arg_4 = 0
    arg_5 = ''
    while arg_4 < len(arg_0) - 1:
        arg_6 = arg_0[arg_4]
        if arg_6 == '$':
            if arg_0[arg_4 + 1] == '$':
                arg_5 += '$'
                arg_4 += 2
                continue
            elif arg_0[arg_4 + 1] == '`':
                # replace with string that is BEFORE match
                arg_5 += arg_1[:arg_2[0]]
                arg_4 += 2
                continue
            elif arg_0[arg_4 + 1] == '\'':
                # replace with string that is AFTER match
                arg_5 += arg_1[arg_2[1]:]
                arg_4 += 2
                continue
            elif arg_0[arg_4 + 1] in DIGS:
                arg_7 = arg_0[arg_4 + 1]
                if arg_4 + 2 < len(arg_0) and arg_0[arg_4 + 2] in DIGS:
                    arg_7 += arg_0[arg_4 + 2]
                arg_8 = int(arg_7)
                # we will not do any replacements if we dont have this npar or dig is 0
                if not arg_8 or arg_8 > len(arg_3):
                    arg_5 += '$' + arg_7
                else:
                    # None - undefined has to be replaced with ''
                    arg_5 += arg_3[arg_8 - 1] if arg_3[arg_8 - 1] else ''
                arg_4 += 1 + len(arg_7)
                continue
        arg_5 += arg_6
        arg_4 += 1
    if arg_4 < len(arg_0):
        arg_5 += arg_0[-1]
    return arg_5


(script, iterations=1, loop_weight=0, edge_threshold=0,
            selected=False)

def Func(arg_0, arg_1=1, arg_2=0, arg_3=0,
            arg_4=False):
    """ Apply LS3 Subdivision Surface algorithm using Loop's weights.

    This refinement method take normals into account.
    See: Boye', S. Guennebaud, G. & Schlick, C.
    "Least squares subdivision surfaces"
    Computer Graphics Forum, 2010.

    Alternatives weighting schemes are based on the paper:
    Barthe, L. & Kobbelt, L.
    "Subdivision scheme tuning around extraordinary vertices"
    Computer Aided Geometric Design, 2004, 21, 561-583.

    The current implementation of these schemes don't handle vertices of
    valence > 12

    Args:
        script: the FilterScript object or script filename to write
            the filter to.
        iterations (int): Number of times the model is subdivided.
        loop_weight (int): Change the weights used. Allow to optimize some
            behaviours in spite of others. Valid values are:
            0 - Loop (default)
            1 - Enhance regularity
            2 - Enhance continuity
        edge_threshold (float): All the edges longer than this threshold will
            be refined. Setting this value to zero will force a uniform
            refinement.
        selected (bool): If selected the filter is performed only on the
            selected faces.

    Layer stack:
        No impacts

    MeshLab versions:
        2016.12
        1.3.4BETA
    """
    arg_5 = ''.join([
        '  <filter name="Subdivision Surfaces: LS3 Loop">\n',
        '    <Param name="LoopWeight" ',
        'value="{:d}" '.format(arg_2),
        'description="Weighting scheme" ',
        'enum_val0="Loop" ',
        'enum_val1="Enhance regularity" ',
        'enum_val2="Enhance continuity" ',
        'enum_cardinality="3" ',
        'type="RichEnum" ',
        '/>\n',
        '    <Param name="Iterations" ',
        'value="{:d}" '.format(arg_1),
        'description="Iterations" ',
        'type="RichInt" ',
        '/>\n',
        '    <Param name="Threshold" ',
        'value="{}" '.format(arg_3),
        'description="Edge Threshold" ',
        'min="0" ',
        'max="100" ',
        'type="RichAbsPerc" ',
        '/>\n',
        '    <Param name="Selected" ',
        'value="{}" '.format(str(arg_4).lower()),
        'description="Affect only selected faces" ',
        'type="RichBool" ',
        '/>\n',
        '  </filter>\n'])
    util.write_filter(arg_0, arg_5)
    return None

Apply LS3 Subdivision Surface algorithm using Loop s weights .


(
        path_name, keyword='', has_date=False, date_fmt=DATE_FMT
)

def Func ( arg_0 , arg_1 = '' , arg_2 = False , arg_3 = arg_4 ) -> list : if not os . path . exists ( path = arg_0 ) : return [ ] arg_0 = arg_0 . replace ( '\\' , '/' ) if arg_1 : arg_5 = sort_by_modified ( [ f . replace ( '\\' , '/' ) for f in glob . iglob ( f'{path_name}/*{keyword}*' ) if os . path . isdir ( f ) and ( f . replace ( '\\' , '/' ) . split ( '/' ) [ - 1 ] [ 0 ] != '~' ) ] ) else : arg_5 = sort_by_modified ( [ f'{path_name}/{f}' for f in os . listdir ( path = arg_0 ) if os . path . isdir ( f'{path_name}/{f}' ) and ( f [ 0 ] != '~' ) ] ) if arg_2 : arg_5 = filter_by_dates ( arg_5 , arg_3 = arg_3 ) return arg_5

def Func(
        arg_0, arg_1='', arg_2=False, arg_3=arg_4
) -> list:
    """
    Search all folders with criteria
    Returned list will be sorted by last modified

    Args:
        path_name: full path name
        keyword: keyword to search
        has_date: whether has date in file name (default False)
        date_fmt: date format to check for has_date parameter

    Returns:
        list: all folder names fulfilled criteria
    """
    if not os.path.exists(path=arg_0): return []
    arg_0 = arg_0.replace('\\', '/')

    if arg_1:
        arg_5 = sort_by_modified([
            f.replace('\\', '/') for f in glob.iglob(f'{path_name}/*{keyword}*')
            if os.path.isdir(f) and (f.replace('\\', '/').split('/')[-1][0] != '~')
        ])

    else:
        arg_5 = sort_by_modified([
            f'{path_name}/{f}' for f in os.listdir(path=arg_0)
            if os.path.isdir(f'{path_name}/{f}') and (f[0] != '~')
        ])

    if arg_2:
        arg_5 = filter_by_dates(arg_5, arg_3=arg_3)

    return arg_5


(f, task_id, monitoring_hub_url, run_id, sleep_dur)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : def wrapped ( * arg_5 , ** arg_6 ) : arg_7 = Process ( target = monitor , arg_5 = ( os . getpid ( ) , arg_1 , arg_2 , arg_3 , arg_4 ) ) arg_7 . start ( ) try : return arg_0 ( * arg_5 , ** arg_6 ) finally : arg_7 . terminate ( ) arg_7 . join ( ) return wrapped

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """ Internal
        Wrap the Parsl app with a function that will call the monitor function and point it at the correct pid when the task begins.
        """
        def wrapped(*arg_5, **arg_6):
            arg_7 = Process(target=monitor, arg_5=(os.getpid(), arg_1, arg_2, arg_3, arg_4))
            arg_7.start()
            try:
                return arg_0(*arg_5, **arg_6)
            finally:
                # There's a chance of zombification if the workers are killed by some signals
                arg_7.terminate()
                arg_7.join()
        return wrapped

Internal Wrap the Parsl app with a function that will call the monitor function and point it at the correct pid when the task begins .


def Func(arg_0):
        """
        Final validations of model fields.

        1. Validate that selected site for enterprise customer matches with the selected identity provider's site.
        """
        super(EnterpriseCustomerIdentityProviderAdminForm, arg_0).Func()

        arg_1 = arg_0.Funced_data.get('provider_id', None)
        arg_2 = arg_0.Funced_data.get('enterprise_customer', None)

        if arg_1 is None or arg_2 is None:
            # field validation for either provider_id or enterprise_customer has already raised
            # a validation error.
            return

        arg_3 = utils.get_identity_provider(arg_1)
        if not arg_3:
            # This should not happen, as identity providers displayed in drop down are fetched dynamically.
            arg_4 = _(
                "The specified Identity Provider does not exist. For more "
                "information, contact a system administrator.",
            )
            # Log message for debugging
            logger.exception(arg_4)

            raise ValidationError(arg_4)

        if arg_3 and arg_3.site != arg_2.site:
            raise ValidationError(
                _(
                    "The site for the selected identity provider "
                    "({identity_provider_site}) does not match the site for "
                    "this enterprise customer ({enterprise_customer_site}). "
                    "To correct this problem, select a site that has a domain "
                    "of '{identity_provider_site}', or update the identity "
                    "provider to '{enterprise_customer_site}'."
                ).format(
                    enterprise_customer_site=arg_2.site,
                    identity_provider_site=arg_3.site,
                ),
            )


def Func(arg_0, arg_1, arg_2=True):
		"""Add a part to the package.

		It will also Func a content-type - by default an override.  If
		override is False then it will Func a content-type for the extension
		if one isn't already present.
		"""
		arg_3 = [
			arg_0.content_types.Func_default,
			arg_0.content_types.Func_override,
                ][arg_2]
		arg_0[arg_1.name] = arg_1
		arg_3(arg_1)

Add a part to the package.

		It will also add a content-type - by default an override.  If
		override is False then it will add a content-type for the extension
		if one isn't already present.


def Func(arg_0, arg_1, arg_2, arg_3=35, arg_4=35, arg_5=0):
        """
        Rectangle Func for this color.
        """
        _ctx.fill(arg_0)
        _ctx.rect(arg_1, arg_2, arg_3, arg_4, arg_5)


This function wraps NetMHC3 and NetMHC4 to automatically detect which class
    to use. Currently based on running the '-h' command and looking for
    discriminating substrings between the versions.

(alleles,
           default_peptide_lengths=[9],
           program_name="netMHC")

return netmhc_class(
        alleles=alleles,
        default_peptide_lengths=default_peptide_lengths,
        program_name=program_name)

def Func(arg_0,
           arg_1=[9],
           arg_2="netMHC"):
    """
    This function wraps Func3 and Func4 to automatically detect which class
    to use. Currently based on running the '-h' command and looking for
    discriminating substrings between the versions.
    """
    # run Func's help command and parse discriminating substrings out of
    # the resulting str output
    with open(os.devnull, 'w') as devnull:
        arg_3 = check_output([arg_2, "-h"], stderr=devnull)
    arg_4 = arg_3.decode("ascii", "ignore")

    arg_5 = {
        "-listMHC": Func4,
        "--Alleles": Func3,
    }

    arg_6 = []

    for arg_7, arg_8 in arg_5.items():
        if arg_7 in arg_4:
            arg_6.append(arg_8)

    if len(arg_6) > 1:
        raise SystemError("Command %s is valid for multiple Func versions. "
                          "This is likely an mhctools bug." % arg_2)
    if len(arg_6) == 0:
        raise SystemError("Command %s is not a valid way of calling any Func software."
                          % arg_2)

    arg_8 = arg_6[0]
    return arg_8(
        arg_0=arg_0,
        arg_1=arg_1,
        arg_2=arg_2)

This function wraps NetMHC3 and NetMHC4 to automatically detect which class to use . Currently based on running the - h command and looking for discriminating substrings between the versions .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
.
split_contents
(
)
if
len
(
arg_2
)
!=
1
:
raise
template
.
TemplateSyntaxError
(
'%s takes no parameters.'
%
arg_2
[
0
]
)
return
OEmbedURLSchemeNode
(
)

def Func(arg_0, arg_1):
    """
    Generates a <link> tag with oembed autodiscovery bits.

    {% oembed_url_scheme %}
    """
    arg_2 = arg_1.split_contents()
    if len(arg_2) != 1:
        raise template.TemplateSyntaxError('%s takes no parameters.' % arg_2[0])
    return OEmbedURLSchemeNode()

Generates a &lt ; link&gt ; tag with oembed autodiscovery bits .


(hostname, username, idfile, ssh_command, tunnel)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
)
:
arg_5
=
[
_get_path
(
'ssh'
)
,
'-o'
,
'StrictHostKeyChecking=no'
,
'-o'
,
'ConnectTimeout=5'
]
if
arg_2
is
not
:
arg_5
.
extend
(
[
'-i'
,
arg_2
]
)
if
arg_4
is
not
:
arg_5
.
extend
(
[
'-A'
,
'-t'
,
arg_4
,
'ssh'
,
'-A'
,
'-t'
]
)
if
arg_1
is
not
:
arg_5
.
append
(
'{}@{}'
.
format
(
arg_1
,
arg_0
)
)
else
:
arg_5
.
append
(
arg_0
)
if
arg_3
is
not
:
arg_5
.
append
(
repr
(
arg_3
)
)
return
(
' '
.
join
(
arg_5
)
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """Uses hostname and other info to construct an SSH command."""
    arg_5 = [_get_path('ssh'),
               '-o', 'StrictHostKeyChecking=no',
               '-o', 'ConnectTimeout=5']
    if arg_2 is not None:
        arg_5.extend(['-i', arg_2])
    if arg_4 is not None:
        # If there's a tunnel, run the ssh command on the tunneled host.
        arg_5.extend(['-A', '-t', arg_4, 'ssh', '-A', '-t'])
    if arg_1 is not None:
        arg_5.append('{}@{}'.format(arg_1, arg_0))
    else:
        arg_5.append(arg_0)
    if arg_3 is not None:
        arg_5.append(repr(arg_3))
    return(' '.join(arg_5))

Uses hostname and other info to construct an SSH command .


(binnedpkldir,
                               textlcdir,
                               timebinsec,
                               binnedpklglob='*binned*sec*.pkl',
                               textlcglob='*.tfalc.TF1*')

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = '*binned*sec*.pkl' , arg_4 = '*.tfalc.TF1*' ) : arg_5 = sorted ( glob . glob ( os . path . join ( arg_0 , arg_3 ) ) ) arg_6 = [ ] for arg_7 in arg_5 : arg_8 = HATIDREGEX . findall ( arg_7 ) if arg_8 is not None : arg_8 = arg_8 [ 0 ] arg_9 = os . path . join ( arg_1 , '%s-%s' % ( arg_8 , arg_4 ) ) arg_10 = glob . glob ( arg_9 ) if arg_10 : arg_6 . append ( arg_10 ) else : arg_6 . append ( None )

def Func(arg_0,
                               arg_1,
                               arg_2,
                               arg_3='*binned*sec*.pkl',
                               arg_4='*.tfalc.TF1*'):
    '''
    This generates the binnedlc pkls for a directory of such files.

    FIXME: finish this

    '''

    arg_5 = sorted(glob.glob(os.path.join(arg_0, arg_3)))

    # find all the textlcs associated with these
    arg_6 = []

    for arg_7 in arg_5:

        arg_8 = HATIDREGEX.findall(arg_7)
        if arg_8 is not None:
            arg_8 = arg_8[0]

        arg_9 = os.path.join(arg_1, '%s-%s' % (arg_8, arg_4))
        arg_10 = glob.glob(arg_9)
        if arg_10:
            arg_6.append(arg_10)
        else:
            arg_6.append(None)

This generates the binnedlc pkls for a directory of such files .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
try
:
arg_3
=
arg_0
.
parse_xml
(
arg_1
)
except
IOError
as
exc
:
logger
.
error
(
"Error loading config: %s"
,
exc
)
raise
RuntimeError
(
"Can't read monitoring config %s"
%
arg_1
)
arg_4
=
arg_3
.
findall
(
'Host'
)
arg_5
=
[
]
for
arg_6
in
arg_4
:
arg_7
=
arg_0
.
get_host_config
(
arg_6
,
arg_2
)
arg_5
.
append
(
arg_7
)
return
arg_5

def Func(arg_0, arg_1, arg_2):
        """Prepare config data."""
        try:
            arg_3 = arg_0.parse_xml(arg_1)
        except IOError as exc:
            logger.error("Error loading config: %s", exc)
            raise RuntimeError("Can't read monitoring config %s" % arg_1)
        arg_4 = arg_3.findall('Host')
        arg_5 = []
        for arg_6 in arg_4:
            arg_7 = arg_0.get_host_config(arg_6, arg_2)
            arg_5.append(arg_7)
        return arg_5


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = ( ) ) : if arg_0 . graph is None : arg_0 . graph = PathGraph ( arg_1 ) arg_0 . Func_parse ( arg_1 , arg_1 , arg_3 ) arg_0 . graphs [ "%s%s" % ( arg_0 . classname , arg_2 ) ] = arg_0 . graph arg_0 . reset ( ) else : arg_0 . _append_node ( arg_1 ) arg_0 . Func_parse ( arg_1 , arg_1 , arg_3 )

def Func(arg_0, arg_1, arg_2, arg_3=()):
        """create the subgraphs representing any `if` and `for` statements"""
        if arg_0.graph is None:
            # global loop
            arg_0.graph = PathGraph(arg_1)
            arg_0.Func_parse(arg_1, arg_1, arg_3)
            arg_0.graphs["%s%s" % (arg_0.classname, arg_2)] = arg_0.graph
            arg_0.reset()
        else:
            arg_0._append_node(arg_1)
            arg_0.Func_parse(arg_1, arg_1, arg_3)

create the subgraphs representing any if and for statements


def Func ( arg_0 , arg_1 ) : arg_0 . attempted_config_files . append ( arg_1 ) arg_2 = HandyConfigParser ( ) arg_3 = arg_2 . read ( arg_1 ) if arg_3 is not None : arg_0 . config_files . extend ( arg_3 ) for arg_4 in arg_0 . CONFIG_FILE_OPTIONS : arg_0 . set_attr_from_config_option ( arg_2 , * arg_4 ) if arg_2 . has_section ( 'paths' ) : for arg_5 in arg_2 . options ( 'paths' ) : arg_0 . paths [ arg_5 ] = arg_2 . getlist ( 'paths' , arg_5 )

def Func(arg_0, arg_1):
        """Read configuration from a .rc file.

        `filename` is a file name to read.

        """
        arg_0.attempted_config_files.append(arg_1)

        arg_2 = HandyConfigParser()
        arg_3 = arg_2.read(arg_1)
        if arg_3 is not None:  # return value changed in 2.4
            arg_0.config_files.extend(arg_3)

        for arg_4 in arg_0.CONFIG_FILE_OPTIONS:
            arg_0.set_attr_from_config_option(arg_2, *arg_4)

        # [paths] is special
        if arg_2.has_section('paths'):
            for arg_5 in arg_2.options('paths'):
                arg_0.paths[arg_5] = arg_2.getlist('paths', arg_5)


return set((id[0] for id in run_sql(
        'select id from bibrec where modification_date >= %s',
        (from_date, ), run_on_slave=True))), search_pattern

def Func(arg_0):
    """Get record ids for Invenio 1."""
    from invenio.search_engine import search_pattern
    from invenio.dbquery import run_sql
    return set((arg_1[0] for arg_1 in run_sql(
        'select id from bibrec where modification_date >= %s',
        (arg_0, ), run_on_slave=True))), search_pattern


def
Func
(
arg_0
,
arg_1
=
False
,
arg_2
=
)
:
def
list_methods
(
)
:
arg_3
=
[
]
if
arg_0
in
_dipole_CCDB
.
index
and
not
np
.
isnan
(
_dipole_CCDB
.
at
[
arg_0
,
'Dipole'
]
)
:
arg_3
.
append
(
CCCBDB
)
if
arg_0
in
_dipole_Muller
.
index
and
not
np
.
isnan
(
_dipole_Muller
.
at
[
arg_0
,
'Dipole'
]
)
:
arg_3
.
append
(
MULLER
)
if
arg_0
in
_dipole_Poling
.
index
and
not
np
.
isnan
(
_dipole_Poling
.
at
[
arg_0
,
'Dipole'
]
)
:
arg_3
.
append
(
POLING
)
arg_3
.
append
(
)
return
arg_3
if
arg_1
:
return
list_methods
(
)
if
not
arg_2
:
arg_2
=
list_methods
(
)
[
0
]
if
arg_2
==
CCCBDB
:
arg_4
=
float
(
_dipole_CCDB
.
at
[
arg_0
,
'Dipole'
]
)
elif
arg_2
==
MULLER
:
arg_4
=
float
(
_dipole_Muller
.
at
[
arg_0
,
'Dipole'
]
)
elif
arg_2
==
POLING
:
arg_4
=
float
(
_dipole_Poling
.
at
[
arg_0
,
'Dipole'
]
)
elif
arg_2
==
:
arg_4
=
else
:
raise
Exception
(
'Failure in in function'
)
return
arg_4

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

    Prefered source is 'CCCBDB'. Considerable variation in reported data has
    found.

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

    Returns
    -------
    dipole : float
        Dipole moment, [debye]
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain dipole moment with the
        given inputs

    Other Parameters
    ----------------
    Method : string, optional
        The method name to use. Accepted methods are 'CCCBDB', 'MULLER', or
        'POLING'. All valid values are also held in the list `dipole_methods`.
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        the dipole moment for the desired chemical, and will return methods
        instead of the dipole moment

    Notes
    -----
    A total of three sources are available for this function. They are:

        * 'CCCBDB', a series of critically evaluated data for compounds in
          [1]_, intended for use in predictive modeling.
        * 'MULLER', a collection of data in a
          group-contribution scheme in [2]_.
        * 'POLING', in the appendix in [3].

    This function returns dipole moment in units of Debye. This is actually
    a non-SI unit; to convert to SI, multiply by 3.33564095198e-30 and its
    units will be in ampere*second^2 or equivalently and more commonly given,
    coulomb*second. The constant is the result of 1E-21/c, where c is the
    speed of light.

    Examples
    --------
    >>> Func(CASRN='64-17-5')
    1.44

    References
    ----------
    .. [1] NIST Computational Chemistry Comparison and Benchmark Database
       NIST Standard Reference Database Number 101 Release 17b, September 2015,
       Editor: Russell D. Johnson III http://cccbdb.nist.gov/
    .. [2] Muller, Karsten, Liudmila Mokrushina, and Wolfgang Arlt. "Second-
       Order Group Contribution Method for the Determination of the Dipole
       Moment." Journal of Chemical & Engineering Data 57, no. 4 (April 12,
       2012): 1231-36. doi:10.1021/je2013395.
    .. [3] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition.
       New York: McGraw-Hill Professional, 2000.
    '''
    def list_methods():
        arg_3 = []
        if arg_0 in _dipole_CCDB.index and not np.isnan(_dipole_CCDB.at[arg_0, 'Dipole']):
            arg_3.append(CCCBDB)
        if arg_0 in _dipole_Muller.index and not np.isnan(_dipole_Muller.at[arg_0, 'Dipole']):
            arg_3.append(MULLER)
        if arg_0 in _dipole_Poling.index and not np.isnan(_dipole_Poling.at[arg_0, 'Dipole']):
            arg_3.append(POLING)
        arg_3.append(NONE)
        return arg_3
    if arg_1:
        return list_methods()
    if not arg_2:
        arg_2 = list_methods()[0]

    if arg_2 == CCCBDB:
        arg_4 = float(_dipole_CCDB.at[arg_0, 'Dipole'])
    elif arg_2 == MULLER:
        arg_4 = float(_dipole_Muller.at[arg_0, 'Dipole'])
    elif arg_2 == POLING:
        arg_4 = float(_dipole_Poling.at[arg_0, 'Dipole'])
    elif arg_2 == NONE:
        arg_4 = None
    else:
        raise Exception('Failure in in function')
    return arg_4

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

    Prefered source is 'CCCBDB'. Considerable variation in reported data has
    found.

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

    Returns
    -------
    dipole : float
        Dipole moment, [debye]
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain dipole moment with the
        given inputs

    Other Parameters
    ----------------
    Method : string, optional
        The method name to use. Accepted methods are 'CCCBDB', 'MULLER', or
        'POLING'. All valid values are also held in the list `dipole_methods`.
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        the dipole moment for the desired chemical, and will return methods
        instead of the dipole moment

    Notes
    -----
    A total of three sources are available for this function. They are:

        * 'CCCBDB', a series of critically evaluated data for compounds in
          [1]_, intended for use in predictive modeling.
        * 'MULLER', a collection of data in a
          group-contribution scheme in [2]_.
        * 'POLING', in the appendix in [3].

    This function returns dipole moment in units of Debye. This is actually
    a non-SI unit; to convert to SI, multiply by 3.33564095198e-30 and its
    units will be in ampere*second^2 or equivalently and more commonly given,
    coulomb*second. The constant is the result of 1E-21/c, where c is the
    speed of light.

    Examples
    --------
    >>> dipole_moment(CASRN='64-17-5')
    1.44

    References
    ----------
    .. [1] NIST Computational Chemistry Comparison and Benchmark Database
       NIST Standard Reference Database Number 101 Release 17b, September 2015,
       Editor: Russell D. Johnson III http://cccbdb.nist.gov/
    .. [2] Muller, Karsten, Liudmila Mokrushina, and Wolfgang Arlt. "Second-
       Order Group Contribution Method for the Determination of the Dipole
       Moment." Journal of Chemical & Engineering Data 57, no. 4 (April 12,
       2012): 1231-36. doi:10.1021/je2013395.
    .. [3] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition.
       New York: McGraw-Hill Professional, 2000.

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


def Func ( arg_0 : arg_1 . AST ) -> arg_1 . AST : if isinstance ( arg_0 , ( arg_1 . Assign , arg_1 . AnnAssign , arg_1 . AugAssign , arg_1 . Expr , arg_1 . Raise , arg_1 . Assert , arg_1 . Pass , arg_1 . Import , arg_1 . ImportFrom , arg_1 . If , arg_1 . For , arg_1 . While , arg_1 . Continue , arg_1 . Break , arg_1 . Try , arg_1 . ExceptHandler , arg_1 . With , arg_1 . FunctionDef , arg_1 . Return , arg_1 . Yield , arg_1 . YieldFrom , arg_1 . Global , arg_1 . ClassDef , arg_1 . AsyncFunctionDef , arg_1 . AsyncFor , arg_1 . AsyncWith , ) , ) : return arg_0 return arg_1 . Expr ( value = arg_0 )

def Func(arg_0: arg_1.AST) -> arg_1.AST:
    """Transform non-statements into ast.Expr nodes so they can
    stand alone as statements."""
    # noinspection PyPep8
    if isinstance(
        arg_0,
        (
            arg_1.Assign,
            arg_1.AnnAssign,
            arg_1.AugAssign,
            arg_1.Expr,
            arg_1.Raise,
            arg_1.Assert,
            arg_1.Pass,
            arg_1.Import,
            arg_1.ImportFrom,
            arg_1.If,
            arg_1.For,
            arg_1.While,
            arg_1.Continue,
            arg_1.Break,
            arg_1.Try,
            arg_1.ExceptHandler,
            arg_1.With,
            arg_1.FunctionDef,
            arg_1.Return,
            arg_1.Yield,
            arg_1.YieldFrom,
            arg_1.Global,
            arg_1.ClassDef,
            arg_1.AsyncFunctionDef,
            arg_1.AsyncFor,
            arg_1.AsyncWith,
        ),
    ):
        return arg_0
    return arg_1.Expr(value=arg_0)

Transform non - statements into ast . Expr nodes so they can stand alone as statements .


def Func ( arg_0 , arg_1 ) : arg_0 . href_prefix = arg_1 for arg_3 in arg_0 . properties . values ( ) : arg_3 . Func ( arg_1 ) for arg_4 in arg_0 . actions . keys ( ) : for arg_5 in arg_0 . actions [ arg_4 ] : arg_5 . Func ( arg_1 )

def Func(arg_0, arg_1):
        """
        Set the prefix of any hrefs associated with this thing.

        prefix -- the prefix
        """
        arg_0.href_prefix = arg_1

        for arg_3 in arg_0.properties.values():
            arg_3.Func(arg_1)

        for arg_4 in arg_0.actions.keys():
            for arg_5 in arg_0.actions[arg_4]:
                arg_5.Func(arg_1)

Set the prefix of any hrefs associated with this thing .


return line_indent + " " * (self.start_col(idx) - len(line_indent))

def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_0
.
line_indent
(
arg_1
)
return
arg_2
+
" "
*
(
arg_0
.
start_col
(
arg_1
)
len
(
arg_2
)
)

def Func(arg_0, arg_1):
        """Get an indentation string for hanging indentation, consisting of the line-indent plus
        a number of spaces to fill up to the column of this token.

        e.g. the token indent for foo
        in "<TAB><TAB>print(foo)"
        is "<TAB><TAB>      "
        """
        arg_2 = arg_0.line_indent(arg_1)
        return arg_2 + " " * (arg_0.start_col(arg_1) - len(arg_2))

Get an indentation string for hanging indentation consisting of the line - indent plus a number of spaces to fill up to the column of this token .


def
Func
(
arg_0
,
arg_1
,
arg_2
=
False
)
:
if
not
arg_2
:
log
.
debug
(
'write: %s'
,
arg_1
)
else
:
log
.
debug
(
'write binary: %s'
,
hexify
(
arg_1
)
)
arg_0
.
_port
.
write
(
arg_1
)
arg_0
.
_port
.
flush
(
)

def Func(arg_0, arg_1, arg_2=False):
        """write data on the nodemcu port. If 'binary' is True the debug log
        will show the intended output as hex, otherwise as string"""
        if not arg_2:
            log.debug('write: %s', arg_1)
        else:
            log.debug('write binary: %s', hexify(arg_1))
        arg_0._port.write(arg_1)
        arg_0._port.flush()

write data on the nodemcu port . If binary is True the debug log will show the intended output as hex otherwise as string


(self, url, method="GET", data=None, params=None, retry=True)

def Func(arg_0, arg_1, arg_2="GET", arg_3=None, arg_4=None, arg_5=True):
        """
        Make a Func to the NuHeat API

        :param url: The URL to Func
        :param method: The type of Func to make (GET, POST)
        :param data: Data to be sent along with POST Funcs
        :param params: Querystring parameters
        :param retry: Attempt to re-authenticate and retry Func if necessary
        """
        arg_6 = config.REQUEST_HEADERS

        if arg_4 and arg_0._session_id:
            arg_4['sessionid'] = arg_0._session_id

        if arg_2 == "GET":
            arg_7 = Funcs.get(arg_1, arg_6=arg_6, arg_4=arg_4)
        elif arg_2 == "POST":
            arg_7 = Funcs.post(arg_1, arg_6=arg_6, arg_4=arg_4, arg_3=arg_3)

        # Handle expired sessions
        if arg_7.status_code == 401 and arg_5:
            _LOGGER.warn("NuHeat APIFunc unauthorized [401]. Try to re-authenticate.")
            arg_0._session_id = None
            arg_0.authenticate()
            return arg_0.Func(arg_1, arg_2=arg_2, arg_3=arg_3, arg_4=arg_4, arg_5=False)

        arg_7.raise_for_status()
        try:
            return arg_7.json()
        except ValueError:
            # No JSON object
            return arg_7

Make a request to the NuHeat API

        :param url: The URL to request
        :param method: The type of request to make (GET, POST)
        :param data: Data to be sent along with POST requests
        :param params: Querystring parameters
        :param retry: Attempt to re-authenticate and retry request if necessary


def Func(arg_0, arg_1, arg_2):
        """Extra format methods for multi methods that adds all the commands
        after the options.
        """
        arg_0.format_command_subsection(
            arg_1, arg_2, arg_0.list_misc_commands(), 'Commands'
        )
        arg_0.format_command_subsection(
            arg_1, arg_2, arg_0.list_resource_commands(), 'Resources'
        )

Extra format methods for multi methods that adds all the commands after the options .


def Func ( arg_0 , arg_1 ) : try : for arg_2 in arg_1 . value . infer ( ) : if not isinstance ( arg_2 , astroid . Instance ) : continue if utils . inherit_from_std_ex ( arg_2 ) : arg_0 . add_message ( "indexing-exception" , arg_1 = arg_1 ) except astroid . InferenceError : return

def Func(arg_0, arg_1):
        """ Look for indexing exceptions. """
        try:
            for arg_2 in arg_1.value.infer():
                if not isinstance(arg_2, astroid.Instance):
                    continue
                if utils.inherit_from_std_ex(arg_2):
                    arg_0.add_message("indexing-exception", arg_1=arg_1)
        except astroid.InferenceError:
            return


def
Func
(
arg_0
,
arg_1
=
)
:
if
isinstance
(
arg_0
,
np
.
ndarray
)
:
return
np
.
Func
(
arg_0
,
arg_1
)
elif
isinstance
(
arg_0
,
RemoteArray
)
:
return
arg_0
.
Func
(
*
arg_1
)
elif
isinstance
(
arg_0
,
Remote
)
:
return
_remote_to_array
(
arg_0
)
.
Func
(
*
arg_1
)
elif
isinstance
(
arg_0
,
DistArray
)
:
if
arg_1
is
:
arg_1
=
range
(
arg_0
.
ndim
1
,
1
,
1
)
arg_1
=
list
(
arg_1
)
if
len
(
set
(
arg_1
)
)
<
len
(
arg_1
)
:
raise
ValueError
(
"repeated axis in Func"
)
if
sorted
(
arg_1
)
!=
list
(
range
(
arg_0
.
ndim
)
)
:
raise
ValueError
(
"axes don't match array"
)
arg_2
=
arg_0
.
_distaxis
arg_3
=
arg_1
.
index
(
arg_2
)
arg_4
=
[
ra
.
Func
(
*
arg_1
)
for
ra
in
arg_0
.
_subarrays
]
return
DistArray
(
arg_4
,
arg_3
)
else
:
return
np
.
Func
(
arg_0
,
arg_1
)

def Func(arg_0, arg_1=None):
    """Returns a view of the array with axes Funcd.

    For a 1-D array, this has no effect.
    For a 2-D array, this is the usual matrix Func.
    For an n-D array, if axes are given, their order indicates how the
    axes are permuted

    Args:
      a (array_like): Input array.
      axes (list of int, optional): By default, reverse the dimensions,
        otherwise permute the axes according to the values given.
    """
    if isinstance(arg_0, np.ndarray):
        return np.Func(arg_0, arg_1)
    elif isinstance(arg_0, RemoteArray):
        return arg_0.Func(*arg_1)
    elif isinstance(arg_0, Remote):
        return _remote_to_array(arg_0).Func(*arg_1)
    elif isinstance(arg_0, DistArray):
        if arg_1 is None:
            arg_1 = range(arg_0.ndim - 1, -1, -1)
        arg_1 = list(arg_1)
        if len(set(arg_1)) < len(arg_1):
            raise ValueError("repeated axis in Func")
        if sorted(arg_1) != list(range(arg_0.ndim)):
            raise ValueError("axes don't match array")
        arg_2 = arg_0._distaxis
        arg_3 = arg_1.index(arg_2)
        arg_4 = [ra.Func(*arg_1) for ra in arg_0._subarrays]
        return DistArray(arg_4, arg_3)
    else:
        return np.Func(arg_0, arg_1)

Returns a view of the array with axes transposed.

    For a 1-D array, this has no effect.
    For a 2-D array, this is the usual matrix transpose.
    For an n-D array, if axes are given, their order indicates how the
    axes are permuted

    Args:
      a (array_like): Input array.
      axes (list of int, optional): By default, reverse the dimensions,
        otherwise permute the axes according to the values given.

Returns a view of the array with axes transposed .


def
Func
(
arg_0
)
:
arg_1
=
LatexCommand
(
'author'
,
{
'name'
:
'authors'
,
'required'
:
True
,
'bracket'
:
'{'
}
)
try
:
arg_2
=
next
(
arg_1
.
parse
(
arg_0
.
_tex
)
)
except
StopIteration
:
arg_0
.
_logger
.
warning
(
'lsstdoc has no author'
)
arg_0
.
_authors
=
[
]
return
try
:
arg_4
=
arg_2
[
'authors'
]
except
KeyError
:
arg_0
.
_logger
.
warning
(
'lsstdoc has no author'
)
arg_0
.
_authors
=
[
]
return
arg_4
=
arg_4
.
replace
(
'\n'
,
' '
)
arg_4
=
arg_4
.
replace
(
'~'
,
' '
)
arg_4
=
arg_4
.
strip
(
)
arg_5
=
[
]
for
arg_6
in
arg_4
.
split
(
','
)
:
arg_6
=
arg_6
.
strip
(
)
for
arg_7
in
arg_6
.
split
(
'and '
)
:
arg_7
=
arg_7
.
strip
(
)
if
len
(
arg_7
)
>
0
:
arg_5
.
append
(
arg_7
)
arg_0
.
_authors
=
arg_5

def Func(arg_0):
        r"""Parse the author from TeX source.

        Sets the ``_authors`` attribute.

        Goal is to parse::

           \author{
           A.~Author,
           B.~Author,
           and
           C.~Author}

        Into::

           ['A. Author', 'B. Author', 'C. Author']
        """
        arg_1 = LatexCommand(
            'author',
            {'name': 'authors', 'required': True, 'bracket': '{'})
        try:
            arg_2 = next(arg_1.parse(arg_0._tex))
        except StopIteration:
            arg_0._logger.warning('lsstdoc has no author')
            arg_0._authors = []
            return

        try:
            arg_4 = arg_2['authors']
        except KeyError:
            arg_0._logger.warning('lsstdoc has no author')
            arg_0._authors = []
            return

        # Clean content
        arg_4 = arg_4.replace('\n', ' ')
        arg_4 = arg_4.replace('~', ' ')
        arg_4 = arg_4.strip()

        # Split content into list of individual authors
        arg_5 = []
        for arg_6 in arg_4.split(','):
            arg_6 = arg_6.strip()
            for arg_7 in arg_6.split('and '):
                arg_7 = arg_7.strip()
                if len(arg_7) > 0:
                    arg_5.append(arg_7)
        arg_0._authors = arg_5


def Func(arg_0, arg_1="", **arg_2):
        """
        Remote Popen to execute the spark-Func job

        :param application: Submitted application, jar or py file
        :type application: str
        :param kwargs: extra arguments to Popen (see subprocess.Popen)
        """
        arg_3 = arg_0._build_spark_Func_command(arg_1)

        if hasattr(arg_0, '_env'):
            arg_4 = os.environ.copy()
            arg_4.update(arg_0._env)
            arg_2["env"] = arg_4

        arg_0._Func_sp = subprocess.Popen(arg_3,
                                           stdout=subprocess.PIPE,
                                           stderr=subprocess.STDOUT,
                                           bufsize=-1,
                                           universal_newlines=True,
                                           **arg_2)

        arg_0._process_spark_Func_log(iter(arg_0._Func_sp.stdout.readline, ''))
        arg_6 = arg_0._Func_sp.wait()

        # Check spark-Func return code. In Kubernetes mode, also check the value
        # of exit code in the log, as it may differ.
        if arg_6 or (arg_0._is_kubernetes and arg_0._spark_exit_code != 0):
            raise AirflowException(
                "Cannot execute: {}. Error code is: {}.".format(
                    arg_3, arg_6
                )
            )

        arg_0.log.debug("Should track driver: {}".format(arg_0._should_track_driver_status))

        # We want the Airflow job to wait until the Spark driver is finished
        if arg_0._should_track_driver_status:
            if arg_0._driver_id is None:
                raise AirflowException(
                    "No driver id is known: something went wrong when executing " +
                    "the spark Func command"
                )

            # We start with the SUBMITTED status as initial status
            arg_0._driver_status = "SUBMITTED"

            # Start tracking the driver status (blocking function)
            arg_0._start_driver_status_tracking()

            if arg_0._driver_status != "FINISHED":
                raise AirflowException(
                    "ERROR : Driver {} badly exited with status {}"
                    .format(arg_0._driver_id, arg_0._driver_status)
                )

Remote Popen to execute the spark-submit job

        :param application: Submitted application, jar or py file
        :type application: str
        :param kwargs: extra arguments to Popen (see subprocess.Popen)

Remote Popen to execute the spark - submit job


return {compound: mass(compound, amounts[compound])
            for compound in amounts.keys()}

def Func ( arg_0 ) : return { arg_1 : mass ( arg_1 , arg_0 [ arg_1 ] ) for arg_1 in arg_0 . keys ( ) }

def Func(arg_0):
    """
    Calculate the Func from the specified compound amounts.

    :param Func: [kmol] dictionary, e.g. {'SiO2': 3.0, 'FeO': 1.5}

    :returns: [kg] dictionary
    """

    return {arg_1: mass(arg_1, arg_0[arg_1])
            for arg_1 in arg_0.keys()}

Calculate the masses from the specified compound amounts.

    :param masses: [kmol] dictionary, e.g. {'SiO2': 3.0, 'FeO': 1.5}

    :returns: [kg] dictionary

Calculate the masses from the specified compound amounts .


return float(snum if snum[-1].isdigit() else snum[:-1]) * power

def
Func
(
arg_0
)
:
arg_0
=
arg_0
.
rstrip
(
)
arg_1
=
_SUFFIX_POWER_DICT
[
" "
if
arg_0
[
1
]
.
isdigit
(
)
else
arg_0
[
1
]
]
return
float
(
arg_0
if
arg_0
[
1
]
.
isdigit
(
)
else
arg_0
[
:
1
]
)
*
arg_1

def Func(arg_0):
    r"""
    Return floating point equivalent of a number represented in engineering notation.

    :param snum: Number
    :type  snum: :ref:`EngineeringNotationNumber`

    :rtype: string

    .. [[[cog cog.out(exobj_eng.get_sphinx_autodoc()) ]]]
    .. Auto-generated exceptions documentation for
    .. peng.functions.Func

    :raises: RuntimeError (Argument \`snum\` is not valid)

    .. [[[end]]]

    For example:

        >>> import peng
        >>> peng.Func(peng.peng(1235.6789E3, 3, False))
        1236000.0
    """
    # This can be coded as peng_mant(snum)*(peng_power(snum)[1]), but the
    # "function unrolling" is about 4x faster
    arg_0 = arg_0.rstrip()
    arg_1 = _SUFFIX_POWER_DICT[" " if arg_0[-1].isdigit() else arg_0[-1]]
    return float(arg_0 if arg_0[-1].isdigit() else arg_0[:-1]) * arg_1

r"""
    Return floating point equivalent of a number represented in engineering notation.

    :param snum: Number
    :type  snum: :ref:`EngineeringNotationNumber`

    :rtype: string

    .. [[[cog cog.out(exobj_eng.get_sphinx_autodoc()) ]]]
    .. Auto-generated exceptions documentation for
    .. peng.functions.peng_float

    :raises: RuntimeError (Argument \`snum\` is not valid)

    .. [[[end]]]

    For example:

        >>> import peng
        >>> peng.peng_float(peng.peng(1235.6789E3, 3, False))
        1236000.0

r Return floating point equivalent of a number represented in engineering notation .


def
Func
(
arg_0
)
:
arg_1
=
sys
.
version
[
0
]
<
'3'
arg_2
=
list
(
list
(
range
(
0xE000
,
0xF8FF
+
1
)
)
+
list
(
range
(
0xF0000
,
0xFFFFD
+
1
)
)
+
list
(
range
(
0x100000
,
0x10FFFD
+
1
)
)
)
for
arg_3
in
arg_2
:
if
arg_1
:
yield
(
unichr
(
arg_3
)
)
else
:
yield
(
chr
(
arg_3
)
)
raise
ValueError
(
"To many input strings."
)

def Func(arg_0):
        """Generator of unique terminal symbols used for building the Generalized Suffix Tree.
        Unicode Private Use Area U+E000..U+F8FF is used to ensure that terminal symbols
        are not part of the input string.
        """
        arg_1 = sys.version[0] < '3'
        arg_2 = list(list(range(0xE000,0xF8FF+1)) + list(range(0xF0000,0xFFFFD+1)) + list(range(0x100000, 0x10FFFD+1)))
        for arg_3 in arg_2:
            if arg_1:
                yield(unichr(arg_3))
            else:
                yield(chr(arg_3))
        raise ValueError("To many input strings.")

Generator of unique terminal symbols used for building the Generalized Suffix Tree . Unicode Private Use Area U + E000 .. U + F8FF is used to ensure that terminal symbols are not part of the input string .


Print a detailed summary of the explored models.

def
Func
(
arg_0
,
arg_1
=
True
)
:
arg_2
=
[
]
for
arg_3
in
arg_0
.
models
:
arg_4
=
arg_3
.
_model_json
[
"output"
]
[
"model_Func"
]
arg_5
=
list
(
arg_4
.
cell_values
[
0
]
)
arg_5
[
0
]
=
arg_3
.
model_id
arg_2
.
append
(
arg_5
)
print
(
)
if
arg_1
:
print
(
'Grid Summary:'
)
print
(
)
H2ODisplay
(
arg_2
,
[
'Model Id'
]
+
arg_4
.
col_header
[
1
:
]
,
numalign
=
"left"
,
stralign
=
"left"
)

def Func(arg_0, arg_1=True):
        """Print a detailed Func of the explored models."""
        arg_2 = []
        for arg_3 in arg_0.models:
            arg_4 = arg_3._model_json["output"]["model_Func"]
            arg_5 = list(arg_4.cell_values[0])
            arg_5[0] = arg_3.model_id
            arg_2.append(arg_5)

        # if h2o.can_use_pandas():
        #  import pandas
        #  pandas.options.display.max_rows = 20
        #  print pandas.DataFrame(table,columns=self.col_header)
        #  return
        print()
        if arg_1:
            print('Grid Summary:')
        print()
        H2ODisplay(arg_2, ['Model Id'] + arg_4.col_header[1:], numalign="left", stralign="left")

Print a detailed summary of the explored models .


(self, service_name, deployment_name, role_names)

return self._perform_post(
            self._get_roles_operations_path(service_name, deployment_name),
            _XmlSerializer.start_roles_operation_to_xml(role_names),
            as_async=True)

def Func(arg_0, arg_1, arg_2, arg_3):
        '''
        Starts the specified virtual machines.

        service_name:
            The name of the service.
        deployment_name:
            The name of the deployment.
        role_names:
            The names of the roles, as an enumerable of strings.
        '''
        _validate_not_none('service_name', arg_1)
        _validate_not_none('deployment_name', arg_2)
        _validate_not_none('role_names', arg_3)
        return arg_0._perform_post(
            arg_0._get_roles_operations_path(arg_1, arg_2),
            _XmlSerializer.Func_operation_to_xml(arg_3),
            as_async=True)


def Func ( arg_0 ) : if ( Inactive ( ) . is_present ( ) and arg_0 . domain_status in [ PyFunceble . STATUS [ "official" ] [ "down" ] , PyFunceble . STATUS [ "official" ] [ "invalid" ] , ] and PyFunceble . INTERN [ "to_test" ] not in PyFunceble . INTERN [ "extracted_list_to_test" ] ) : return True return False

def Func(arg_0):
        """
        Check if we are allowed to produce a file based from the given
        information.

        :return:
            The state of the production.
            True: We do not produce file.
            False: We do produce file.
        :rtype: bool
        """

        if (
            Inactive().is_present()
            and arg_0.domain_status
            in [
                PyFunceble.STATUS["official"]["down"],
                PyFunceble.STATUS["official"]["invalid"],
            ]
            and PyFunceble.INTERN["to_test"]
            not in PyFunceble.INTERN["extracted_list_to_test"]
        ):
            return True
        return False

Check if we are allowed to produce a file based from the given information .


def Func ( arg_0 ) : arg_1 = os . listdir ( arg_0 ) for arg_2 in arg_1 : if "doublefann" in arg_2 : return True

def Func(arg_0):
    '''Return true if substring is in string for files
    in specified path'''
    arg_1 = os.listdir(arg_0)
    for arg_2 in arg_1:
        if "doublefann" in arg_2:
            return True


def
Func
(
arg_0
,
arg_1
)
:
try
:
arg_2
=
arg_0
.
template
.
render
(
**
arg_1
)
except
:
log
.
exception
(
'Error rendering Document '
'for {}.'
.
format
(
arg_1
)
)
raise
else
:
arg_0
.
file_content_
=
arg_2
return
arg_2

def Func(arg_0, arg_1):
        """ Fill the content of the document with the information in doc_contents.

        Parameters
        ----------
        doc_contents: dict
            Set of values to set the template document.

        Returns
        -------
        Funced_doc: str
            The content of the document with the template information Funced.
        """
        try:
            arg_2 = arg_0.template.render(**arg_1)
        except:
            log.exception('Error rendering Document '
                          'for {}.'.format(arg_1))
            raise
        else:
            arg_0.file_content_ = arg_2
            return arg_2

Fill the content of the document with the information in doc_contents.

        Parameters
        ----------
        doc_contents: dict
            Set of values to set the template document.

        Returns
        -------
        filled_doc: str
            The content of the document with the template information filled.

Fill the content of the document with the information in doc_contents .


def
Func
(
arg_0
)
:
if
not
arg_0
:
return
""
if
not
isinstance
(
arg_0
,
datetime
.
date
)
:
return
arg_0
arg_1
=
datetime
.
datetime
.
now
(
)
arg_2
=
arg_1
arg_0
if
arg_0
>
arg_1
:
return
"right now"
elif
arg_2
.
days
>
365
:
return
'%d years ago'
%
(
arg_2
.
days
/
365
)
elif
arg_2
.
days
>
30
:
return
'%d months ago'
%
(
arg_2
.
days
/
30
)
elif
arg_2
.
days
>
0
:
return
'%d days ago'
%
arg_2
.
days
elif
arg_2
.
seconds
>
3600
:
return
'%d hours ago'
%
(
arg_2
.
seconds
/
3600
)
elif
arg_2
.
seconds
>
60
:
return
'%d minutes ago'
%
(
arg_2
.
seconds
/
60
)
else
:
return
'right now'

def Func(arg_0):
    """Friendly time gap"""
    if not arg_0:
        return ""

    if not isinstance(arg_0, datetime.date):
        return arg_0

    arg_1 = datetime.datetime.now()
    arg_2 = arg_1 - arg_0

    if arg_0 > arg_1:
        return "right now"
    elif arg_2.days > 365:
        return '%d years ago' % (arg_2.days / 365)
    elif arg_2.days > 30:
        return '%d months ago' % (arg_2.days / 30)
    elif arg_2.days > 0:
        return '%d days ago' % arg_2.days
    elif arg_2.seconds > 3600:
        return '%d hours ago' % (arg_2.seconds / 3600)
    elif arg_2.seconds > 60:
        return '%d minutes ago' % (arg_2.seconds / 60)
    else:
        return 'right now'


Iterates over the "iter_content" and draws a progress bar to stdout.

def
Func
(
arg_0
,
arg_1
,
arg_2
=
''
)
:
arg_1
=
max
(
float
(
arg_1
)
,
1.0
)
arg_3
=
10
arg_4
=
0
arg_5
=
arg_3
/
arg_1
arg_6
=
lambda
arg_4
:
sys
.
stdout
.
write
(
'\r[{0:10}] {1:.2f}% {2}'
.
format
(
'#'
*
int
(
arg_4
)
,
arg_4
*
arg_3
,
arg_2
)
)
for
arg_7
in
arg_0
:
yield
arg_7
arg_4
+=
arg_5
arg_6
(
arg_4
)
sys
.
stdout
.
flush
(
)
arg_6
(
arg_3
)
print
(
''
)

def Func(arg_0, arg_1, arg_2=''):
    """ Iterates over the "iter_content" and draws a progress Func to stdout.
    """
    arg_1 = max(float(arg_1), 1.0)
    arg_3 = 10
    arg_4 = 0
    arg_5 = arg_3 / arg_1

    arg_6 = lambda arg_4: sys.stdout.write(
        '\r[{0:10}] {1:.2f}% {2}'.format(
            '#'*int(arg_4), arg_4 * arg_3, arg_2))

    for arg_7 in arg_0:
        yield arg_7

        arg_4 += arg_5
        arg_6(arg_4)
        sys.stdout.flush()

    arg_6(arg_3)
    print('')

Iterates over the iter_content and draws a progress bar to stdout .


def Func(arg_0, arg_1, arg_2):
        """
        Get a JSON field from the response JSON.

        :param: response_json:
            The parsed JSON content of the response.
        :param: field_name:
            The name of the field in the JSON to get.
        """
        if arg_2 not in arg_1:
            raise KeyError('Unable to get value for "%s" from Marathon '
                           'response: "%s"' % (
                               arg_2, json.dumps(arg_1),))

        return arg_1[arg_2]

Get a JSON field from the response JSON .


(self, service_name, thumbalgorithm,
                                   thumbprint)

return self._perform_delete(
            '/' + self.subscription_id + '/services/hostedservices/' +
            _str(service_name) + '/certificates/' +
            _str(thumbalgorithm) + '-' + _str(thumbprint),
            as_async=True)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : _validate_not_none ( 'service_name' , arg_1 ) _validate_not_none ( 'thumbalgorithm' , arg_2 ) _validate_not_none ( 'thumbprint' , arg_3 ) return arg_0 . _perform_delete ( '/' + arg_0 . subscription_id + '/services/hostedservices/' + _str ( arg_1 ) + '/certificates/' + _str ( arg_2 ) + '-' + _str ( arg_3 ) , as_async = True )

def Func(arg_0, arg_1, arg_2,
                                   arg_3):
        '''
        Deletes a service certificate from the certificate store of a hosted
        service.

        service_name:
            Name of the hosted service.
        thumbalgorithm:
            The algorithm for the certificate's thumbprint.
        thumbprint:
            The hexadecimal representation of the thumbprint.
        '''
        _validate_not_none('service_name', arg_1)
        _validate_not_none('thumbalgorithm', arg_2)
        _validate_not_none('thumbprint', arg_3)
        return arg_0._perform_delete(
            '/' + arg_0.subscription_id + '/services/hostedservices/' +
            _str(arg_1) + '/certificates/' +
            _str(arg_2) + '-' + _str(arg_3),
            as_async=True)

Deletes a service certificate from the certificate store of a hosted service .


(self, lflags=None, verbose=False, openmp=False)

def Func(arg_0, arg_1=None, arg_2=False, arg_3=False):
        """Compile source to executable with likwid capabilities and return the executable name."""
        arg_4, arg_5 = arg_0._machine.get_compiler()

        arg_6 = arg_0.compile_kernel(arg_3=arg_3, arg_2=arg_2)
        arg_7, arg_8 = arg_0._get_intermediate_file(
            os.path.splitext(os.path.basename(arg_6))[0], binary=True, fp=False)

        if not arg_8:
            arg_9 = arg_0.get_main_code(as_filename=True)

            if not (('LIKWID_INCLUDE' in os.environ or 'LIKWID_INC' in os.environ) and
                    'LIKWID_LIB' in os.environ):
                print('Could not find LIKWID_INCLUDE (e.g., "-I/app/likwid/4.1.2/include") and '
                      'LIKWID_LIB (e.g., "-L/apps/likwid/4.1.2/lib") environment variables',
                      file=sys.stderr)
                sys.exit(1)

            arg_5 += [
                '-std=c99',
                '-I'+reduce_path(os.path.abspath(os.path.dirname(
                    os.path.realpath(__file__)))+'/headers/'),
                os.environ.get('LIKWID_INCLUDE', ''),
                os.environ.get('LIKWID_INC', ''),
                '-llikwid']

            # This is a special case for unittesting
            if os.environ.get('LIKWID_LIB') == '':
                arg_5 = arg_5[:-1]

            if arg_1 is None:
                arg_1 = []
            arg_1 += os.environ['LIKWID_LIB'].split(' ') + ['-pthread']
            arg_5 += os.environ['LIKWID_LIB'].split(' ') + ['-pthread']

            arg_10 = [reduce_path(os.path.abspath(os.path.dirname(
                os.path.realpath(__file__)))+'/headers/dummy.c'),
                       arg_6, arg_9]

            arg_11 = [arg_4] + arg_10 + arg_5 + ['-o', arg_7]
            # remove empty arguments
            arg_11 = list(filter(bool, arg_11))
            if arg_2:
                print('Executing (Func): ', ' '.join(arg_11))
            try:
                subprocess.check_output(arg_11)
            except subprocess.CalledProcessError as e:
                print("Build failed:", e, file=sys.stderr)
                sys.exit(1)
        else:
            if arg_2:
                print('Executing (Func): ', 'using cached', arg_7)

        return arg_7

Compile source to executable with likwid capabilities and return the executable name .


def Func ( arg_0 ) : arg_1 = stoich . elements ( arg_0 . compounds ) return sorted ( list ( arg_1 ) )

def Func(arg_0):
        """
        Extract an alphabetically sorted list of elements from the compounds of
        the material.

        :returns: An alphabetically sorted list of elements.
        """

        arg_1 = stoich.elements(arg_0.compounds)
        return sorted(list(arg_1))

Extract an alphabetically sorted list of elements from the compounds of the material .


def Func(arg_0, arg_1=False):
        """Print the help for each Configurable class in self.classes.

        If classes=False (the default), only flags and aliases are printed.
        """
        arg_0.print_subcommands()
        arg_0.print_options()

        if arg_1:
            if arg_0.classes:
                print "Class parameters"
                print "----------------"
                print
                for arg_2 in wrap_paragraphs(arg_0.keyvalue_description):
                    print arg_2
                    print

            for arg_3 in arg_0.classes:
                arg_3.class_Func()
                print
        else:
            print "To see all available configurables, use `--help-all`"
            print

Print the help for each Configurable class in self . classes .


def
Func
(
arg_0
,
arg_1
,
arg_2
=
''
)
:
arg_3
=
arg_0
.
_ftp
.
pwd
(
)
if
not
arg_2
.
startswith
(
'/'
)
:
arg_2
=
join
(
getcwd
(
)
,
arg_2
)
arg_4
=
os
.
path
.
dirname
(
arg_1
)
arg_0
.
cd
(
arg_4
)
if
arg_4
.
startswith
(
"/"
)
:
arg_4
=
arg_4
[
1
:
]
arg_5
=
join
(
arg_2
,
arg_4
)
if
not
os
.
path
.
exists
(
arg_5
)
:
print
(
"Creating folder"
,
arg_5
)
os
.
makedirs
(
arg_5
)
arg_1
=
os
.
path
.
basename
(
arg_1
)
arg_6
=
join
(
arg_5
,
arg_1
)
try
:
with
open
(
arg_6
,
'wb'
)
as
result
:
arg_0
.
_ftp
.
retrbinary
(
'RETR %s'
%
(
arg_1
,
)
,
result
.
write
)
except
error_perm
as
e
:
print
(
e
)
remove
(
join
(
arg_2
,
arg_1
)
)
raise
arg_0
.
_ftp
.
cwd
(
arg_3
)

def Func(arg_0, arg_1, arg_2=''):
        """ Downloads a file from the FTP server to target folder

        :param source_file: the absolute path for the file on the server
                   it can be the one of the files coming from
                   FtpHandler.dir().
        :type source_file: string
        :param target_folder: relative or absolute path of the
                              destination folder default is the
                              working directory.
        :type target_folder: string
        """
        arg_3 = arg_0._ftp.pwd()

        if not arg_2.startswith('/'):  # relative path
            arg_2 = join(getcwd(), arg_2)

        arg_4 = os.path.dirname(arg_1)
        arg_0.cd(arg_4)

        if arg_4.startswith("/"):
            arg_4 = arg_4[1:]

        arg_5 = join(arg_2, arg_4)
        if not os.path.exists(arg_5):
            print("Creating folder", arg_5)
            os.makedirs(arg_5)

        arg_1 = os.path.basename(arg_1)
        arg_6 = join(arg_5, arg_1)
        try:
            with open(arg_6, 'wb') as result:
                arg_0._ftp.retrbinary('RETR %s' % (arg_1,),
                                     result.write)
        except error_perm as e:  # source_file is a folder
            print(e)
            remove(join(arg_2, arg_1))
            raise
        arg_0._ftp.cwd(arg_3)


def Func(arg_0, arg_1, arg_2):
        """Get RGB color tuple of color at index pixel"""
        arg_3 = arg_0.angleToPixel(arg_2, arg_1)
        return arg_0._Func_base(arg_3)


( idx_bytes, stop_bytes=None, run_bytes=None )

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_3 = None arg_4 = [ ] arg_5 = None while 1 : try : arg_3 , arg_5 = arg_0 . next ( ) except StopIteration : arg_3 = None arg_5 = None break if arg_1 and arg_5 in arg_1 : break if arg_2 and arg_5 not in arg_2 : break arg_4 . append ( arg_5 ) return arg_3 , b'' . join ( arg_4 ) , arg_5

def Func( arg_0, arg_1=None, arg_2=None ):
    '''
    iterates through idx_bytes until a byte in stop_bytes or a byte
    not in run_bytes.

    :rtype (int, string): idx of last byte and all of bytes including
    the terminal byte from stop_bytes or not in run_bytes
    '''
    arg_3 = None
    arg_4 = []
    arg_5 = None
    while 1:
        try:
            arg_3, arg_5 = arg_0.next()
        except StopIteration:
            ## maybe something going wrong?
            arg_3 = None
            arg_5 = None
            break
        ## stop when we see any byte in stop_bytes
        if arg_1 and arg_5 in arg_1:
            break
        ## stop when we see any byte not in run_bytes
        if arg_2 and arg_5 not in arg_2:
            break
        ## assemble the ret_val
        arg_4.append( arg_5 )

    ## return whatever we have assembled
    return arg_3, b''.join(arg_4), arg_5

iterates through idx_bytes until a byte in stop_bytes or a byte not in run_bytes .


def Func(arg_0, arg_1=37):
    """Update a gene object with links

    Args:
        gene_obj(dict)
        build(int)

    Returns:
        gene_obj(dict): gene_obj updated with many links
    """
    try:
        arg_1 = int(arg_1)
    except ValueError:
        arg_1 = 37
    # Add links that use the hgnc_id
    arg_2 = arg_0['hgnc_id']

    arg_0['hgnc_link'] = genenames(arg_2)
    arg_0['omim_link'] = omim(arg_2)
    # Add links that use ensembl_id
    if not 'ensembl_id' in arg_0:
        arg_3 = arg_0.get('common',{}).get('ensembl_id')
    else:
        arg_3 = arg_0['ensembl_id']
    arg_4 = ensembl(arg_3, arg_1=37)
    arg_5 = ensembl(arg_3, arg_1=38)
    arg_0['ensembl_37_link'] = arg_4
    arg_0['ensembl_38_link'] = arg_5
    arg_0['ensembl_link'] = arg_4
    if arg_1 == 38:
        arg_0['ensembl_link'] = arg_5
    arg_0['hpa_link'] = hpa(arg_3)
    arg_0['string_link'] = string(arg_3)
    arg_0['reactome_link'] = reactome(arg_3)
    arg_0['clingen_link'] = clingen(arg_2)
    arg_0['expression_atlas_link'] = expression_atlas(arg_3)
    arg_0['exac_link'] = exac(arg_3)
    # Add links that use entrez_id
    arg_0['entrez_link'] = entrez(arg_0.get('entrez_id'))
    # Add links that use omim id
    arg_0['omim_link'] = omim(arg_0.get('omim_id'))
    # Add links that use hgnc_symbol
    arg_0['ppaint_link'] = ppaint(arg_0['hgnc_symbol'])
    # Add links that use vega_id
    arg_0['vega_link'] = vega(arg_0.get('vega_id'))
    # Add links that use ucsc link
    arg_0['ucsc_link'] = ucsc(arg_0.get('ucsc_id'))


def Func(arg_0):
      """Reset all OneTimeProperty attributes that may have fired already."""
      arg_1 = arg_0.__dict__
      arg_2 = arg_0.__class__.__dict__
      # To Func them, we simply remove them from the instance dict.  At that
      # point, it's as if they had never been computed.  On the next access,
      # the accessor function from the parent class will be called, simply
      # because that's how the python descriptor protocol works.
      for arg_3, arg_4 in arg_2.items():
         if arg_3 in arg_1 and isinstance(arg_4, OneTimeProperty):
            delattr(arg_0, arg_3)

Reset all OneTimeProperty attributes that may have fired already .


def Func ( arg_0 , arg_1 , ** arg_2 ) : arg_3 = 'rb' if isinstance ( arg_0 , str ) : arg_4 = open ( arg_0 , arg_3 = arg_3 , ** arg_2 ) else : arg_4 = open ( fileobj = arg_0 , arg_3 = arg_3 , ** arg_2 ) with arg_4 : for arg_5 in arg_4 : arg_6 = arg_1 ( ) arg_6 . ParseFromString ( arg_5 ) yield arg_6

def Func(arg_0, arg_1, **arg_2):
    """Parse a stream.

    Args:
        ifp (string or file-like object): input stream.
        pb_cls (protobuf.message.Message.__class__): The class object of
            the protobuf message type encoded in the stream.
    """
    arg_3 = 'rb'
    if isinstance(arg_0, str):
        arg_4 = open(arg_0, arg_3=arg_3, **arg_2)
    else:
        arg_4 = open(fileobj=arg_0, arg_3=arg_3, **arg_2)
    with arg_4:
        for arg_5 in arg_4:
            arg_6 = arg_1()
            arg_6.ParseFromString(arg_5)
            yield arg_6


def Func(arg_0, arg_1):
    """
    Task to unlink inactive learners of provided integrated channel.

    Arguments:
        channel_code (str): Capitalized identifier for the integrated channel
        channel_pk (str): Primary key for identifying integrated channel

    """
    arg_2 = time.time()
    arg_3 = INTEGRATED_CHANNEL_CHOICES[arg_0].objects.get(pk=arg_1)
    LOGGER.info('Processing learners to unlink inactive users using configuration: [%s]', arg_3)

    # Note: learner data transmission code paths don't raise any uncaught exception, so we don't need a broad
    # try-except block here.
    arg_3.Func()

    arg_4 = time.time() - arg_2
    LOGGER.info(
        'Unlink inactive learners task for integrated channel configuration [%s] took [%s] seconds',
        arg_3,
        arg_4
    )

Task to unlink inactive learners of provided integrated channel .


def
Func
(
arg_0
)
:
arg_0
.
setWindowTitle
(
'Filesystem Browser'
)
arg_0
.
_filesystemWidget
.
sortByColumn
(
0
,
QtCore
.
Qt
.
AscendingOrder
)
arg_0
.
_bookmarksWidget
.
hide
(
)
arg_0
.
_acceptButton
.
setDefault
(
True
)
arg_0
.
_acceptButton
.
setDisabled
(
True
)
arg_0
.
_acceptButton
.
clicked
.
connect
(
arg_0
.
accept
)
arg_0
.
_cancelButton
.
clicked
.
connect
(
arg_0
.
reject
)
arg_0
.
_configureShortcuts
(
)
arg_0
.
setLocation
(
arg_0
.
_root
)
arg_0
.
_filesystemWidget
.
horizontalHeader
(
)
.
setResizeMode
(
QtGui
.
QHeaderView
.
ResizeToContents
)
arg_0
.
_filesystemWidget
.
horizontalHeader
(
)
.
setResizeMode
(
0
,
QtGui
.
QHeaderView
.
Stretch
)
arg_0
.
_upButton
.
clicked
.
connect
(
arg_0
.
_onNavigateUpButtonClicked
)
arg_0
.
_locationWidget
.
currentIndexChanged
.
connect
(
arg_0
.
_onNavigate
)
arg_0
.
_filesystemWidget
.
activated
.
connect
(
arg_0
.
_onActivateItem
)
arg_1
=
arg_0
.
_filesystemWidget
.
selectionModel
(
)
arg_1
.
currentRowChanged
.
connect
(
arg_0
.
_onSelectItem
)

def Func(arg_0):
        '''Perform post-construction operations.'''
        arg_0.setWindowTitle('Filesystem Browser')
        arg_0._filesystemWidget.sortByColumn(0, QtCore.Qt.AscendingOrder)

        # TODO: Remove once bookmarks widget implemented.
        arg_0._bookmarksWidget.hide()

        arg_0._acceptButton.setDefault(True)
        arg_0._acceptButton.setDisabled(True)

        arg_0._acceptButton.clicked.connect(arg_0.accept)
        arg_0._cancelButton.clicked.connect(arg_0.reject)

        arg_0._configureShortcuts()

        arg_0.setLocation(arg_0._root)

        arg_0._filesystemWidget.horizontalHeader().setResizeMode(
            QtGui.QHeaderView.ResizeToContents
        )
        arg_0._filesystemWidget.horizontalHeader().setResizeMode(
            0, QtGui.QHeaderView.Stretch
        )

        arg_0._upButton.clicked.connect(arg_0._onNavigateUpButtonClicked)
        arg_0._locationWidget.currentIndexChanged.connect(
            arg_0._onNavigate
        )

        arg_0._filesystemWidget.activated.connect(arg_0._onActivateItem)
        arg_1 = arg_0._filesystemWidget.selectionModel()
        arg_1.currentRowChanged.connect(arg_0._onSelectItem)

Perform post - construction operations .


def Func ( ) : for arg_0 in standard_paths ( ) : if arg_0 . startswith ( '_' ) or '-' in arg_0 : continue if '.' in arg_0 and arg_0 . rsplit ( '.' ) [ - 1 ] not in [ 'so' , 'py' , 'pyc' ] : continue yield arg_0 . split ( '.' ) [ 0 ]

def Func():
    """Yield standard module names."""
    for arg_0 in standard_paths():
        if arg_0.startswith('_') or '-' in arg_0:
            continue

        if '.' in arg_0 and arg_0.rsplit('.')[-1] not in ['so', 'py', 'pyc']:
            continue

        yield arg_0.split('.')[0]


def Func ( arg_0 ) : arg_1 , arg_2 , arg_3 = arg_0 . obj . pos glTranslatef ( arg_1 , arg_2 , arg_3 )

def Func(arg_0):
        """
        Sets the state required for this actor.

        Currently translates the matrix to the position of the actor.
        """
        arg_1,arg_2,arg_3 = arg_0.obj.pos
        glTranslatef(arg_1,arg_2,arg_3)

Sets the state required for this actor . Currently translates the matrix to the position of the actor .


def Func(arg_0, arg_1, arg_2='_temp.png'):
    """Save multiple images into one single image.

    Parameters
    -----------
    images : numpy array
        (batch, w, h, c)
    size : list of 2 ints
        row and column number.
        number of images should be equal or less than size[0] * size[1]
    image_path : str
        save path

    Examples
    ---------
    >>> import numpy as np
    >>> import tensorlayer as tl
    >>> images = np.random.rand(64, 100, 100, 3)
    >>> tl.visualize.Func(images, [8, 8], 'temp.png')

    """
    if len(arg_0.shape) == 3:  # Greyscale [batch, h, w] --> [batch, h, w, 1]
        arg_0 = arg_0[:, :, :, np.newaxis]

    def merge(arg_0, arg_1):
        arg_3, arg_4 = arg_0.shape[1], arg_0.shape[2]
        arg_5 = np.zeros((arg_3 * arg_1[0], arg_4 * arg_1[1], 3), dtype=arg_0.dtype)
        for arg_6, arg_7 in enumerate(arg_0):
            arg_8 = arg_6 % arg_1[1]
            arg_9 = arg_6 // arg_1[1]
            arg_5[arg_9 * arg_3:arg_9 * arg_3 + arg_3, arg_8 * arg_4:arg_8 * arg_4 + arg_4, :] = arg_7
        return arg_5

    def imsave(arg_0, arg_1, arg_10):
        if np.max(arg_0) <= 1 and (-1 <= np.min(arg_0) < 0):
            arg_0 = ((arg_0 + 1) * 127.5).astype(np.uint8)
        elif np.max(arg_0) <= 1 and np.min(arg_0) >= 0:
            arg_0 = (arg_0 * 255).astype(np.uint8)

        return imageio.imwrite(arg_10, merge(arg_0, arg_1))

    if len(arg_0) > arg_1[0] * arg_1[1]:
        raise AssertionError("number of images should be equal or less than size[0] * size[1] {}".format(len(arg_0)))

    return imsave(arg_0, arg_1, arg_2)

Save multiple images into one single image.

    Parameters
    -----------
    images : numpy array
        (batch, w, h, c)
    size : list of 2 ints
        row and column number.
        number of images should be equal or less than size[0] * size[1]
    image_path : str
        save path

    Examples
    ---------
    >>> import numpy as np
    >>> import tensorlayer as tl
    >>> images = np.random.rand(64, 100, 100, 3)
    >>> tl.visualize.save_images(images, [8, 8], 'temp.png')

Save multiple images into one single image .


def Func ( arg_0 ) : arg_1 = arg_0 . first ( ) . shape Func = arg_0 . _rdd . map ( lambda x : x . shape [ 0 ] ) . sum ( ) return ( Func , ) + arg_1 [ 1 : ]

def Func(arg_0):
        """Returns the shape of the data."""
        # TODO cache
        arg_1 = arg_0.first().shape
        Func = arg_0._rdd.map(lambda x: x.shape[0]).sum()
        return (Func,) + arg_1[1:]


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

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

        return arg_0.user_from_json(arg_0._get_resource(arg_2)["user"])


(store, institute_id, case_name, variant_id)

return dict(institute=institute_obj, case=case_obj, variant=variant_obj,
                CRITERIA=ACMG_CRITERIA, ACMG_OPTIONS=ACMG_OPTIONS)

def Func(arg_0, arg_1, arg_2, arg_3):
    """Collect data relevant for rendering ACMG classification form."""
    arg_4, arg_5 = institute_and_case(arg_0, arg_1, arg_2)
    arg_6 = arg_0.variant(arg_3)
    return dict(institute=arg_4, case=arg_5, variant=arg_6,
                CRITERIA=ACMG_CRITERIA, ACMG_OPTIONS=ACMG_OPTIONS)

Collect data relevant for rendering ACMG classification form .


def Func ( arg_0 , arg_1 ) : if not arg_1 : arg_0 . wx_obj . SetPage ( "" ) else : arg_0 . wx_obj . LoadPage ( arg_1 )

def Func(arg_0, arg_1):
        "Loads HTML page from location and then displays it"
        if not arg_1:
            arg_0.wx_obj.SetPage("")
        else:
            arg_0.wx_obj.LoadPage(arg_1)


def Func ( arg_0 , arg_1 ) : if not isinstance ( arg_1 , Color ) : return False if not isinstance ( arg_1 , _list ) : arg_1 = [ arg_1 ] for arg_1 in arg_1 : if arg_1 . is_grey and not arg_0 . grayscale : return ( arg_0 . black . Func ( arg_1 ) or arg_0 . white . Func ( arg_1 ) ) for arg_2 , arg_3 in [ ( arg_0 . h , arg_1 . h ) , ( arg_0 . s , arg_1 . s ) , ( arg_0 . b , arg_1 . brightness ) , ( arg_0 . a , arg_1 . a ) ] : if isinstance ( arg_2 , _list ) : pass elif isinstance ( arg_2 , tuple ) : arg_2 = [ arg_2 ] else : arg_2 = [ ( arg_2 , arg_2 ) ] for arg_4 , arg_5 in arg_2 : if not ( arg_4 <= arg_3 <= arg_5 ) : return False return True

def Func(arg_0, arg_1):
        """
        Returns True if the given color is part of this color range.

        Check whether each h, s, b, a component of the color
        falls within the defined range for that component.

        If the given color is grayscale,
        checks against the definitions for black and white.
        """
        if not isinstance(arg_1, Color):
            return False

        if not isinstance(arg_1, _list):
            arg_1 = [arg_1]

        for arg_1 in arg_1:

            if arg_1.is_grey and not arg_0.grayscale:
                return (arg_0.black.Func(arg_1) or \
                        arg_0.white.Func(arg_1))

            for arg_2, arg_3 in [(arg_0.h, arg_1.h), (arg_0.s, arg_1.s), (arg_0.b, arg_1.brightness), (arg_0.a, arg_1.a)]:
                if isinstance(arg_2, _list):
                    pass
                elif isinstance(arg_2, tuple):
                    arg_2 = [arg_2]
                else:
                    arg_2 = [(arg_2, arg_2)]
                for arg_4, arg_5 in arg_2:
                    if not (arg_4 <= arg_3 <= arg_5):
                        return False

        return True

Returns True if the given color is part of this color range .


def Func(arg_0, arg_1):
    """
    Marks reads as PCR duplicates using SAMBLASTER

    :param JobFunctionWrappingJob job: passed automatically by Toil
    :param str sam: FileStoreID for SAM file
    :return: FileStoreID for deduped SAM file
    :rtype: str
    """
    arg_2 = arg_0.fileStore.getLocalTempDir()
    arg_0.fileStore.readGlobalFile(arg_1, os.path.join(arg_2, 'input.sam'))
    arg_3 = ['/usr/local/bin/samblaster',
               '-i', '/data/input.sam',
               '-o', '/data/output.sam',
               '--ignoreUnmated']

    arg_4 = time.time()
    dockerCall(arg_0=arg_0, workDir=arg_2,
               parameters=arg_3,
               tool='quay.io/biocontainers/samblaster:0.1.24--0')
    arg_5 = time.time()
    _log_runtime(arg_0, arg_4, arg_5, "SAMBLASTER")
    return arg_0.fileStore.writeGlobalFile(os.path.join(arg_2, 'output.sam'))