def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
False
)
:
arg_4
=
arg_1
.
setdefault
(
"wsgidav.hg.cache"
,
{
}
)
if
arg_4
.
get
(
arg_17
.
to_native
(
arg_2
)
)
is
not
:
_logger
.
debug
(
"Func(%s): cache hit."
%
arg_2
)
return
arg_4
[
arg_17
.
to_native
(
arg_2
)
]
arg_5
=
time
.
time
(
)
arg_0
.
ui
.
pushbuffer
(
)
commands
.
manifest
(
arg_0
.
ui
,
arg_0
.
repo
,
arg_2
)
arg_6
=
arg_0
.
ui
.
popbuffer
(
)
arg_7
=
[
]
arg_8
=
{
}
arg_9
=
{
}
for
arg_10
in
arg_6
.
split
(
"\n"
)
:
if
arg_10
.
strip
(
)
==
""
:
continue
arg_10
=
arg_10
.
replace
(
"\\"
,
"/"
)
arg_11
=
arg_10
.
split
(
"/"
)
if
len
(
arg_11
)
>=
1
:
arg_12
=
""
for
arg_13
in
range
(
0
,
len
(
arg_11
)
1
)
:
arg_14
=
arg_11
[
arg_13
]
arg_15
=
arg_8
.
setdefault
(
arg_12
,
(
[
]
,
[
]
)
)
if
arg_14
not
in
arg_15
[
0
]
:
arg_15
[
0
]
.
append
(
arg_14
)
if
arg_12
==
""
:
arg_12
=
arg_14
else
:
arg_12
=
"%s/%s"
%
(
arg_12
,
arg_14
)
arg_8
.
setdefault
(
arg_12
,
(
[
]
,
[
]
)
)
[
1
]
.
append
(
arg_11
[
1
]
)
arg_9
[
arg_10
]
=
True
arg_7
.
sort
(
)
arg_16
=
{
"files"
:
arg_7
,
"dirinfos"
:
arg_8
,
"filedict"
:
arg_9
}
arg_4
[
arg_17
.
to_native
(
arg_2
)
]
=
arg_16
_logger
.
info
(
"_getRepoInfo(%s) took %.3f"
%
(
arg_2
,
time
.
time
(
)
arg_5
)
)
return
arg_16

def Func(arg_0, arg_1, arg_2, arg_3=False):
        """Return a dictionary containing all files under source control.

        dirinfos:
            Dictionary containing direct members for every collection.
            {folderpath: (collectionlist, filelist), ...}
        files:
            Sorted list of all file paths in the manifest.
        filedict:
            Dictionary containing all files under source control.

        ::

            {'dirinfos': {'': (['wsgidav',
                                'tools',
                                'WsgiDAV.egg-info',
                                'tests'],
                               ['index.rst',
                                'wsgidav MAKE_DAILY_BUILD.launch',
                                'wsgidav run_server.py DEBUG.launch',
                                'wsgidav-paste.conf',
                                ...
                                'setup.py']),
                          'wsgidav': (['addons', 'samples', 'server', 'interfaces'],
                                      ['__init__.pyc',
                                       'dav_error.pyc',
                                       'dav_provider.pyc',
                                       ...
                                       'wsgidav_app.py']),
                           },
             'files': ['.hgignore',
                       'ADDONS.txt',
                       'wsgidav/samples/mysql_dav_provider.py',
                       ...
                       ],
             'filedict': {'.hgignore': True,
                           'README.txt': True,
                           'WsgiDAV.egg-info/PKG-INFO': True,
                           }
                           }
        """
        arg_4 = arg_1.setdefault("wsgidav.hg.cache", {})
        if arg_4.get(arg_17.to_native(arg_2)) is not None:
            _logger.debug("Func(%s): cache hit." % arg_2)
            return arg_4[arg_17.to_native(arg_2)]

        arg_5 = time.time()
        arg_0.ui.pushbuffer()
        commands.manifest(arg_0.ui, arg_0.repo, arg_2)
        arg_6 = arg_0.ui.popbuffer()
        arg_7 = []
        arg_8 = {}
        arg_9 = {}
        for arg_10 in arg_6.split("\n"):
            if arg_10.strip() == "":
                continue
            arg_10 = arg_10.replace("\\", "/")
            # add all parent directories to 'dirinfos'
            arg_11 = arg_10.split("/")
            if len(arg_11) >= 1:
                arg_12 = ""
                for arg_13 in range(0, len(arg_11) - 1):
                    arg_14 = arg_11[arg_13]
                    arg_15 = arg_8.setdefault(arg_12, ([], []))
                    if arg_14 not in arg_15[0]:
                        arg_15[0].append(arg_14)
                    if arg_12 == "":
                        arg_12 = arg_14
                    else:
                        arg_12 = "%s/%s" % (arg_12, arg_14)
                arg_8.setdefault(arg_12, ([], []))[1].append(arg_11[-1])
            arg_9[arg_10] = True
        arg_7.sort()

        arg_16 = {"files": arg_7, "dirinfos": arg_8, "filedict": arg_9}
        arg_4[arg_17.to_native(arg_2)] = arg_16
        _logger.info("_getRepoInfo(%s) took %.3f" % (arg_2, time.time() - arg_5))
        return arg_16

Return a dictionary containing all files under source control .


def Func ( arg_0 ) : glEnable ( arg_0 . region . material . target ) glBindTexture ( arg_0 . region . material . target , arg_0 . region . material . id ) arg_0 . region . bone . setRotate ( arg_0 . data )

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

        Currently binds and enables the texture of the material of the region.
        """
        glEnable(arg_0.region.material.target)
        glBindTexture(arg_0.region.material.target, arg_0.region.material.id)
        arg_0.region.bone.setRotate(arg_0.data)

Sets the state required for this vertex region . Currently binds and enables the texture of the material of the region .


(sites=None, site=None, renderer=None, setter=None, no_secure=False, verbose=None)

def Func(arg_0=None, arg_1=None, arg_2=None, arg_3=None, arg_4=False, arg_5=None):
    """
    Iterates over sites, safely setting environment variables for each site.
    """
    if arg_5 is None:
        arg_5 = get_verbose()

    arg_6 = get_current_hostname()

    arg_7 = arg_11.available_sites_by_host.get(arg_6, None)

    if arg_0 is None:
        arg_1 = arg_1 or arg_11.SITE or ALL
        if arg_1 == ALL:
            arg_0 = list(six.iteritems(arg_11.sites))
        else:
            sys.stderr.flush()
            arg_0 = [(arg_1, arg_11.sites.get(arg_1))]

    arg_2 = arg_2 #or render_remote_paths
    arg_8 = save_env()
    for arg_9, arg_10 in sorted(arg_0):
        if arg_4 and arg_9.endswith('_secure'):
            continue

        # Only load site configurations that are allowed for this host.
        if arg_7 is None:
            pass
        else:
            assert isinstance(arg_7, (tuple, list))
            if arg_9 not in arg_7:
                if arg_5:
                    print('Skipping site %s because not in among target sites.' % arg_9)
                continue

        arg_11.update(arg_8)
        arg_11.update(arg_11.sites.get(arg_9, {}))
        arg_11.SITE = arg_9
        if callable(arg_2):
            arg_2()
        if arg_3:
            arg_3(arg_9)
        yield arg_9, arg_10

    # Revert modified keys.
    arg_11.update(arg_8)

    # Remove keys that were added, not simply updated.
    arg_13 = set(arg_11).difference(arg_8)
    for arg_14 in arg_13:
        # Don't remove internally maintained variables, because these are used to cache hostnames
        # used by Func().
        if arg_14.startswith('_'):
            continue
        del arg_11[arg_14]

Iterates over sites safely setting environment variables for each site .


def Func(arg_0, arg_1, **arg_2):
        """
        Returns a simple fragment
        """
        arg_3 = Fragment(TEST_HTML)
        arg_3.add_javascript(TEST_JS)
        arg_3.add_css(TEST_CSS)
        return arg_3


(self, pk=None, host_config_key='', extra_vars=None)

def Func ( arg_0 , arg_1 = None , arg_2 = '' , arg_3 = None ) : arg_4 = arg_0 . endpoint + '%s/Func/' % arg_1 if not arg_2 : arg_2 = client . get ( arg_4 ) . json ( ) [ 'host_config_key' ] arg_5 = { 'host_config_key' : arg_2 } if arg_3 : arg_5 [ 'extra_vars' ] = parser . process_extra_vars ( list ( arg_3 ) , force_json = True ) arg_6 = client . post ( arg_4 , data = arg_5 , auth = None ) if arg_6 . status_code == 201 : return { 'changed' : True }

def Func(arg_0, arg_1=None, arg_2='', arg_3=None):
        """Contact Tower and request a configuration update using this job template.

        =====API DOCS=====
        Contact Tower and request a provisioning Func using this job template.

        :param pk: Primary key of the job template to run provisioning Func against.
        :type pk: int
        :param host_config_key: Key string used to authenticate the Func host.
        :type host_config_key: str
        :param extra_vars: Extra variables that are passed to provisioning Func.
        :type extra_vars: array of str
        :returns: A dictionary of a single key "changed", which indicates whether the provisioning Func
                  is successful.
        :rtype: dict

        =====API DOCS=====
        """
        arg_4 = arg_0.endpoint + '%s/Func/' % arg_1
        if not arg_2:
            arg_2 = client.get(arg_4).json()['host_config_key']
        arg_5 = {'host_config_key': arg_2}
        if arg_3:
            arg_5['extra_vars'] = parser.process_extra_vars(list(arg_3), force_json=True)
        arg_6 = client.post(arg_4, data=arg_5, auth=None)
        if arg_6.status_code == 201:
            return {'changed': True}

Contact Tower and request a configuration update using this job template.

        =====API DOCS=====
        Contact Tower and request a provisioning callback using this job template.

        :param pk: Primary key of the job template to run provisioning callback against.
        :type pk: int
        :param host_config_key: Key string used to authenticate the callback host.
        :type host_config_key: str
        :param extra_vars: Extra variables that are passed to provisioning callback.
        :type extra_vars: array of str
        :returns: A dictionary of a single key "changed", which indicates whether the provisioning callback
                  is successful.
        :rtype: dict

        =====API DOCS=====

Contact Tower and request a configuration update using this job template .


def Func ( arg_0 , arg_1 ) : arg_2 = None arg_3 = arg_1 [ 'module_short' ] + '.' + arg_1 [ 'name' ] if arg_3 in arg_0 . _searchindex [ 'objects' ] : arg_4 = arg_0 . _searchindex [ 'objects' ] [ arg_3 ] if isinstance ( arg_4 , dict ) : arg_4 = arg_4 [ next ( iter ( arg_4 . keys ( ) ) ) ] arg_2 = arg_4 [ 0 ] elif arg_1 [ 'module_short' ] in arg_0 . _searchindex [ 'objects' ] : arg_4 = arg_0 . _searchindex [ 'objects' ] [ arg_1 [ 'module_short' ] ] if arg_1 [ 'name' ] in arg_4 . keys ( ) : arg_2 = arg_4 [ arg_1 [ 'name' ] ] [ 0 ] if arg_2 is not None : arg_5 = arg_0 . _searchindex [ 'filenames' ] [ arg_2 ] + '.html' if arg_0 . _is_windows : arg_5 = arg_5 . replace ( '/' , '\\' ) arg_6 = os . path . join ( arg_0 . doc_url , arg_5 ) else : arg_6 = posixpath . join ( arg_0 . doc_url , arg_5 ) if hasattr ( arg_6 , 'decode' ) : arg_6 = arg_6 . decode ( 'utf-8' , 'replace' ) if arg_6 in arg_0 . _page_cache : arg_7 = arg_0 . _page_cache [ arg_6 ] else : arg_7 = get_data ( arg_6 , arg_0 . gallery_dir ) arg_0 . _page_cache [ arg_6 ] = arg_7 arg_9 = [ arg_1 [ 'module_short' ] + '.' + arg_1 [ 'name' ] ] if arg_0 . extra_modules_test is not None : for arg_10 in arg_0 . extra_modules_test : arg_9 . append ( arg_10 + '.' + arg_1 [ 'name' ] ) arg_11 = False if hasattr ( arg_7 , 'decode' ) : arg_7 = arg_7 . decode ( 'utf-8' , 'replace' ) for arg_12 in arg_9 : if hasattr ( arg_12 , 'decode' ) : arg_12 = arg_12 . decode ( 'utf-8' , 'replace' ) if arg_12 in arg_7 : arg_11 = arg_6 + u'#' + arg_12 arg_6 = arg_11 else : arg_6 = False return arg_6

def Func(arg_0, arg_1):
        """Get a valid link, False if not found"""

        arg_2 = None
        arg_3 = arg_1['module_short'] + '.' + arg_1['name']
        if arg_3 in arg_0._searchindex['objects']:
            arg_4 = arg_0._searchindex['objects'][arg_3]
            if isinstance(arg_4, dict):
                arg_4 = arg_4[next(iter(arg_4.keys()))]
            arg_2 = arg_4[0]
        elif arg_1['module_short'] in arg_0._searchindex['objects']:
            arg_4 = arg_0._searchindex['objects'][arg_1['module_short']]
            if arg_1['name'] in arg_4.keys():
                arg_2 = arg_4[arg_1['name']][0]

        if arg_2 is not None:
            arg_5 = arg_0._searchindex['filenames'][arg_2] + '.html'

            if arg_0._is_windows:
                arg_5 = arg_5.replace('/', '\\')
                arg_6 = os.path.join(arg_0.doc_url, arg_5)
            else:
                arg_6 = posixpath.join(arg_0.doc_url, arg_5)

            if hasattr(arg_6, 'decode'):
                arg_6 = arg_6.decode('utf-8', 'replace')

            if arg_6 in arg_0._page_cache:
                arg_7 = arg_0._page_cache[arg_6]
            else:
                arg_7 = get_data(arg_6, arg_0.gallery_dir)
                arg_0._page_cache[arg_6] = arg_7

            # test if cobj appears in page
            arg_9 = [arg_1['module_short'] + '.' + arg_1['name']]
            if arg_0.extra_modules_test is not None:
                for arg_10 in arg_0.extra_modules_test:
                    arg_9.append(arg_10 + '.' + arg_1['name'])
            arg_11 = False
            if hasattr(arg_7, 'decode'):
                # Decode bytes under Python 3
                arg_7 = arg_7.decode('utf-8', 'replace')

            for arg_12 in arg_9:
                if hasattr(arg_12, 'decode'):
                    # Decode bytes under Python 3
                    arg_12 = arg_12.decode('utf-8', 'replace')
                if arg_12 in arg_7:
                    arg_11 = arg_6 + u'#' + arg_12
            arg_6 = arg_11
        else:
            arg_6 = False

        return arg_6


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . alias [ arg_1 ] return arg_0 . items [ arg_2 ]

def Func(arg_0, arg_1):
        """Gets an item by its alias."""
        arg_2 = arg_0.alias[arg_1]
        return arg_0.items[arg_2]


def Func ( arg_0 , arg_1 , arg_2 = 7 ) : arg_3 = User . objects . get ( id = int ( arg_1 ) ) arg_4 = CartController . for_user ( arg_3 ) arg_4 . Func ( datetime . timedelta ( arg_2 = arg_2 ) ) return redirect ( arg_0 . META [ "HTTP_REFERER" ] )

def Func(arg_0, arg_1, arg_2=7):
    ''' Allows staff to extend the reservation on a given user's cart.
    '''

    arg_3 = User.objects.get(id=int(arg_1))
    arg_4 = CartController.for_user(arg_3)
    arg_4.Func(datetime.timedelta(arg_2=arg_2))

    return redirect(arg_0.META["HTTP_REFERER"])

Allows staff to extend the reservation on a given user s cart .


return tuple(property(lambda self, f=f: getattr(self, f)) for f in fields)

def Func ( * arg_0 ) : return tuple ( property ( lambda self , arg_1 = arg_1 : getattr ( self , arg_1 ) ) for arg_1 in arg_0 )

def Func(*arg_0):
    '''
    `Func` is a sugar for multi-`property`.

    ``` py
    name, age = Func('_name', '_age')

    # equals:

    @property
    def name(self):
        return getattr(self, '_name')

    @property
    def age(self):
        return getattr(self, '_age')
    ```
    '''
    return tuple(property(lambda self, arg_1=arg_1: getattr(self, arg_1)) for arg_1 in arg_0)

`get_onlys` is a sugar for multi-`property`.

    ``` py
    name, age = get_onlys('_name', '_age')

    # equals:

    @property
    def name(self):
        return getattr(self, '_name')

    @property
    def age(self):
        return getattr(self, '_age')
    ```

get_onlys is a sugar for multi - property .


def Func ( arg_0 ) : try : arg_1 = os . stat ( arg_0 ) except os . error : return False return stat . S_ISREG ( arg_1 . st_mode )

def Func(arg_0):
    """Test whether a path is a regular file"""
    try:
        arg_1 = os.stat(arg_0)
    except os.error:
        return False
    return stat.S_ISREG(arg_1.st_mode)


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
[
'N'
]
arg_3
=
arg_1
[
'M'
]
arg_4
=
(
'spanning_cluster'
in
arg_1
)
arg_5
=
dict
(
)
arg_5
[
'ps'
]
=
arg_0
arg_5
[
'N'
]
=
arg_2
arg_5
[
'M'
]
=
arg_3
arg_5
[
'max_cluster_size'
]
=
np
.
empty
(
arg_0
.
size
)
arg_5
[
'max_cluster_size_ci'
]
=
np
.
empty
(
(
arg_0
.
size
,
2
)
)
if
arg_4
:
arg_5
[
'spanning_cluster'
]
=
np
.
empty
(
arg_0
.
size
)
arg_5
[
'spanning_cluster_ci'
]
=
np
.
empty
(
(
arg_0
.
size
,
2
)
)
arg_5
[
'moments'
]
=
np
.
empty
(
(
5
,
arg_0
.
size
)
)
arg_5
[
'moments_ci'
]
=
np
.
empty
(
(
5
,
arg_0
.
size
,
2
)
)
for
arg_6
,
arg_7
in
enumerate
(
arg_0
)
:
arg_8
=
_binomial_pmf
(
n
=
arg_3
,
arg_7
=
arg_7
)
for
arg_9
,
arg_10
in
arg_1
.
items
(
)
:
if
len
(
arg_9
)
<=
1
:
continue
if
arg_9
in
[
'max_cluster_size'
,
'spanning_cluster'
]
:
arg_5
[
arg_9
]
[
arg_6
]
=
np
.
sum
(
arg_8
*
arg_10
)
elif
arg_9
in
[
'max_cluster_size_ci'
,
'spanning_cluster_ci'
]
:
arg_5
[
arg_9
]
[
arg_6
]
=
np
.
sum
(
np
.
tile
(
arg_8
,
(
2
,
1
)
)
.
T
*
arg_10
,
axis
=
0
)
elif
arg_9
==
'moments'
:
arg_5
[
arg_9
]
[
:
,
arg_6
]
=
np
.
sum
(
np
.
tile
(
arg_8
,
(
5
,
1
)
)
*
arg_10
,
axis
=
1
)
elif
arg_9
==
'moments_ci'
:
arg_5
[
arg_9
]
[
:
,
arg_6
]
=
np
.
sum
(
np
.
rollaxis
(
np
.
tile
(
arg_8
,
(
5
,
2
,
1
)
)
,
2
,
1
)
*
arg_10
,
axis
=
1
)
else
:
raise
NotImplementedError
(
'{}-dimensional array'
.
format
(
arg_10
.
ndim
)
)
return
arg_5

def Func(arg_0, arg_1):
    """
    Compute the canonical cluster statistics from microcanonical statistics

    This is according to Newman and Ziff, Equation (2).
    Note that we also simply average the bounds of the confidence intervals
    according to this formula.

    Parameters
    ----------

    ps : iterable of float
       Each entry is a probability for which to form the canonical ensemble
       and compute the weighted statistics from the microcanonical statistics

    microFunc_arrays
       Typically the output of :func:`microFunc_arrays`

    Returns
    -------

    ret : dict
       Canonical ensemble cluster statistics

    ret['ps'] : iterable of float
        The parameter `ps`

    ret['N'] : int
        Total number of sites

    ret['M'] : int
        Total number of bonds

    ret['spanning_cluster'] : 1-D :py:class:`numpy.ndarray` of float
        The percolation probability:
        The normalized average number of runs that have a spanning cluster.

    ret['spanning_cluster_ci'] : 2-D :py:class:`numpy.ndarray` of float, size 2
        The lower and upper bounds of the percolation probability.

    ret['max_cluster_size'] : 1-D :py:class:`numpy.ndarray` of float
        The percolation strength:
        Average relative size of the largest cluster

    ret['max_cluster_size_ci'] : 2-D :py:class:`numpy.ndarray` of float
        Lower and upper bounds of the normal confidence interval of the
        percolation strength.

    ret['moments'] : 2-D :py:class:`numpy.ndarray` of float, shape (5, M + 1)
        Average raw moments of the (relative) cluster size distribution.

    ret['moments_ci'] : 3-D :py:class:`numpy.ndarray` of float, shape (5, M + 1, 2)
        Lower and upper bounds of the normal confidence interval of the raw
        moments of the (relative) cluster size distribution.

    See Also
    --------

    microFunc

    microFunc_arrays

    """

    arg_2 = arg_1['N']
    arg_3 = arg_1['M']
    arg_4 = ('spanning_cluster' in arg_1)

    arg_5 = dict()
    arg_5['ps'] = arg_0
    arg_5['N'] = arg_2
    arg_5['M'] = arg_3

    arg_5['max_cluster_size'] = np.empty(arg_0.size)
    arg_5['max_cluster_size_ci'] = np.empty((arg_0.size, 2))

    if arg_4:
        arg_5['spanning_cluster'] = np.empty(arg_0.size)
        arg_5['spanning_cluster_ci'] = np.empty((arg_0.size, 2))

    arg_5['moments'] = np.empty((5, arg_0.size))
    arg_5['moments_ci'] = np.empty((5, arg_0.size, 2))

    for arg_6, arg_7 in enumerate(arg_0):
        arg_8 = _binomial_pmf(n=arg_3, arg_7=arg_7)

        for arg_9, arg_10 in arg_1.items():
            if len(arg_9) <= 1:
                continue

            if arg_9 in ['max_cluster_size', 'spanning_cluster']:
                arg_5[arg_9][arg_6] = np.sum(arg_8 * arg_10)
            elif arg_9 in ['max_cluster_size_ci', 'spanning_cluster_ci']:
                arg_5[arg_9][arg_6] = np.sum(
                    np.tile(arg_8, (2, 1)).T * arg_10, axis=0
                )
            elif arg_9 == 'moments':
                arg_5[arg_9][:, arg_6] = np.sum(
                    np.tile(arg_8, (5, 1)) * arg_10, axis=1
                )
            elif arg_9 == 'moments_ci':
                arg_5[arg_9][:, arg_6] = np.sum(
                    np.rollaxis(np.tile(arg_8, (5, 2, 1)), 2, 1) * arg_10,
                    axis=1
                )
            else:
                raise NotImplementedError(
                    '{}-dimensional array'.format(arg_10.ndim)
                )

    return arg_5

Compute the canonical cluster statistics from microcanonical statistics

    This is according to Newman and Ziff, Equation (2).
    Note that we also simply average the bounds of the confidence intervals
    according to this formula.

    Parameters
    ----------

    ps : iterable of float
       Each entry is a probability for which to form the canonical ensemble
       and compute the weighted statistics from the microcanonical statistics

    microcanonical_averages_arrays
       Typically the output of :func:`microcanonical_averages_arrays`

    Returns
    -------

    ret : dict
       Canonical ensemble cluster statistics

    ret['ps'] : iterable of float
        The parameter `ps`

    ret['N'] : int
        Total number of sites

    ret['M'] : int
        Total number of bonds

    ret['spanning_cluster'] : 1-D :py:class:`numpy.ndarray` of float
        The percolation probability:
        The normalized average number of runs that have a spanning cluster.

    ret['spanning_cluster_ci'] : 2-D :py:class:`numpy.ndarray` of float, size 2
        The lower and upper bounds of the percolation probability.

    ret['max_cluster_size'] : 1-D :py:class:`numpy.ndarray` of float
        The percolation strength:
        Average relative size of the largest cluster

    ret['max_cluster_size_ci'] : 2-D :py:class:`numpy.ndarray` of float
        Lower and upper bounds of the normal confidence interval of the
        percolation strength.

    ret['moments'] : 2-D :py:class:`numpy.ndarray` of float, shape (5, M + 1)
        Average raw moments of the (relative) cluster size distribution.

    ret['moments_ci'] : 3-D :py:class:`numpy.ndarray` of float, shape (5, M + 1, 2)
        Lower and upper bounds of the normal confidence interval of the raw
        moments of the (relative) cluster size distribution.

    See Also
    --------

    microcanonical_averages

    microcanonical_averages_arrays


def Func ( arg_0 ) : arg_1 = ( arg_0 . screen . width / float ( len ( arg_0 . points ) ) ) arg_2 = ( arg_0 . screen . height ) arg_3 = np . array ( arg_0 . points ) - arg_0 . minimum arg_3 = arg_3 * 4.0 / arg_0 . extents * arg_0 . size . y for arg_4 , arg_5 in enumerate ( arg_3 ) : yield Point ( ( arg_1 * arg_4 , min ( arg_2 , arg_2 - arg_5 ) , ) )

def Func(arg_0):
        """Normalised data points using numpy."""
        arg_1 = (arg_0.screen.width / float(len(arg_0.points)))
        arg_2 = (arg_0.screen.height)
        arg_3 = np.array(arg_0.points) - arg_0.minimum
        arg_3 = arg_3 * 4.0 / arg_0.extents * arg_0.size.y
        for arg_4, arg_5 in enumerate(arg_3):
            yield Point((
                arg_1 * arg_4,
                min(arg_2, arg_2 - arg_5),
            ))


(self, name, gl_structure, description=None)

def Func(arg_0, arg_1, arg_2, arg_3=None):
        """
        Create an entity and add it to the model.

        :param name: The entity name.
        :param gl_structure: The entity's general ledger structure.
        :param description: The entity description.

        :returns: The created entity.
        """

        arg_4 = Entity(arg_1, arg_2, arg_3=arg_3)
        arg_0.entities.append(arg_4)
        return arg_4

Create an entity and add it to the model .


return self.ws.subscribe(stream, callback, transform)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = "" ) : return arg_0 . ws . Func ( arg_1 , arg_2 , arg_3 )

def Func(arg_0, arg_1, arg_2, arg_3=""):
        """Subscribe to the given stream with the callback"""
        return arg_0.ws.Func(arg_1, arg_2, arg_3)


return [self.source_buffer.source_line(line)
                for line in range(self.line(), self.end().line() + 1)]

def Func ( arg_0 ) : return [ arg_0 . source_buffer . source_line ( arg_1 ) for arg_1 in range ( arg_0 . line ( ) , arg_0 . end ( ) . line ( ) + 1 ) ]

def Func(arg_0):
        """
        Returns the lines of source code containing the entirety of this range.
        """
        return [arg_0.source_buffer.source_line(arg_1)
                for arg_1 in range(arg_0.line(), arg_0.end().line() + 1)]

Returns the lines of source code containing the entirety of this range .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
[
]
for
arg_3
in
arg_1
:
arg_2
.
append
(
str
(
arg_3
)
)
raise
exceptions
.
ElasticsearchException
(
', '
.
join
(
arg_2
)
)

def Func(arg_0, arg_1):
        """ Logs indexing errors and raises a general ElasticSearch Exception"""
        arg_2 = []
        for arg_3 in arg_1:
            arg_2.append(str(arg_3))
        raise exceptions.ElasticsearchException(', '.join(arg_2))


def Func ( arg_0 ) : from theano . tensor . var import TensorVariable from deepy . core . neural_var import NeuralVariable if not arg_0 . _loop_vars : arg_0 . _ordered_out_keys = arg_0 . _outputs . keys ( ) arg_2 = arg_0 . _sequences . keys ( ) arg_3 = [ arg_10 for arg_10 in arg_0 . _ordered_out_keys if arg_0 . _outputs [ arg_10 ] ] arg_4 = arg_0 . _non_sequences . keys ( ) arg_5 , arg_0 . _scan_local_vars = get_dummy_args ( sequences = [ arg_0 . _sequences [ arg_10 ] . tensor for arg_10 in arg_2 ] , outputs_info = [ arg_0 . _outputs [ arg_10 ] . tensor for arg_10 in arg_0 . _ordered_out_keys ] , non_sequences = [ arg_0 . _non_sequences [ arg_10 ] . tensor for arg_10 in arg_4 ] , ** arg_0 . _kwargs ) arg_7 = dict ( zip ( arg_2 + arg_3 + arg_4 , arg_5 ) ) arg_8 = arg_0 . _sequences . copy ( ) arg_8 . update ( arg_0 . _outputs ) arg_8 . update ( arg_0 . _non_sequences ) arg_0 . _loop_vars = LoopVars ( ) for arg_10 , arg_11 in arg_7 . items ( ) : arg_12 = NeuralVariable ( arg_11 , dim = arg_8 [ arg_10 ] . dim ( ) ) arg_0 . _loop_vars [ arg_10 ] = arg_12

def Func(arg_0):
        """
        Create inner loop variables.
        """
        from theano.tensor.var import TensorVariable
        from deepy.core.neural_var import NeuralVariable
        if not arg_0._loop_vars:
            arg_0._ordered_out_keys = arg_0._outputs.keys()
            arg_2 = arg_0._sequences.keys()
            arg_3 = [arg_10 for arg_10 in arg_0._ordered_out_keys if arg_0._outputs[arg_10]]
            arg_4 = arg_0._non_sequences.keys()
            arg_5, arg_0._scan_local_vars = get_dummy_args(
                sequences=[arg_0._sequences[arg_10].tensor for arg_10 in arg_2],
                outputs_info=[arg_0._outputs[arg_10].tensor for arg_10 in arg_0._ordered_out_keys],
                non_sequences=[arg_0._non_sequences[arg_10].tensor for arg_10 in arg_4],
                **arg_0._kwargs
            )
            arg_7 = dict(zip(arg_2 + arg_3 + arg_4, arg_5))
            arg_8 = arg_0._sequences.copy()
            arg_8.update(arg_0._outputs)
            arg_8.update(arg_0._non_sequences)
            arg_0._loop_vars = LoopVars()
            for arg_10, arg_11 in arg_7.items():
                arg_12 = NeuralVariable(arg_11, dim=arg_8[arg_10].dim())
                arg_0._loop_vars[arg_10] = arg_12


def
Func
(
arg_0
,
arg_1
)
:
if
not
arg_1
:
raise
ValueError
(
"var is None"
)
if
'"'
not
in
arg_1
:
arg_2
=
'd:feature[@var="%s"]'
%
(
arg_1
,
)
elif
"'"
not
in
arg_1
:
arg_2
=
"d:feature[@var='%s']"
%
(
arg_1
,
)
else
:
raise
ValueError
(
"Invalid feature name"
)
arg_3
=
arg_0
.
xpath_ctxt
.
xpathEval
(
arg_2
)
if
not
arg_3
:
return
for
arg_4
in
arg_3
:
arg_4
.
unlinkNode
(
)
arg_4
.
freeNode
(
)

def Func(arg_0,arg_1):
        """Remove a feature from `self`.

        :Parameters:
            - `var`: the feature name.
        :Types:
            - `var`: `unicode`"""
        if not arg_1:
            raise ValueError("var is None")
        if '"' not in arg_1:
            arg_2='d:feature[@var="%s"]' % (arg_1,)
        elif "'" not in arg_1:
            arg_2="d:feature[@var='%s']" % (arg_1,)
        else:
            raise ValueError("Invalid feature name")

        arg_3=arg_0.xpath_ctxt.xpathEval(arg_2)
        if not arg_3:
            return

        for arg_4 in arg_3:
            arg_4.unlinkNode()
            arg_4.freeNode()


return Result(res,
                      not query._no_content,
                      duration=(time.time() - st) * 1000.0,
                      has_payload=query._with_payloads)

def Func ( arg_0 , arg_1 ) : arg_2 , arg_1 = arg_0 . _mk_query_args ( arg_1 ) arg_3 = time . time ( ) arg_4 = arg_0 . redis . execute_command ( arg_0 . SEARCH_CMD , * arg_2 ) return Result ( arg_4 , not arg_1 . _no_content , duration = ( time . time ( ) - arg_3 ) * 1000.0 , has_payload = arg_1 . _with_payloads )

def Func(arg_0, arg_1):
        """
        Search the index for a given query, and return a result of documents

        ### Parameters

        - **query**: the Func query. Either a text for simple queries with default parameters, or a Query object for complex queries.
                     See RediSearch's documentation on query format
        - **snippet_sizes**: A dictionary of {field: snippet_size} used to trim and format the result. e.g.e {'body': 500}
        """
        arg_2, arg_1 = arg_0._mk_query_args(arg_1)
        arg_3 = time.time()
        arg_4 = arg_0.redis.execute_command(arg_0.SEARCH_CMD, *arg_2)

        return Result(arg_4,
                      not arg_1._no_content,
                      duration=(time.time() - arg_3) * 1000.0,
                      has_payload=arg_1._with_payloads)

Search the index for a given query, and return a result of documents

        ### Parameters

        - **query**: the search query. Either a text for simple queries with default parameters, or a Query object for complex queries.
                     See RediSearch's documentation on query format
        - **snippet_sizes**: A dictionary of {field: snippet_size} used to trim and format the result. e.g.e {'body': 500}

Search the index for a given query and return a result of documents


def Func(arg_0, arg_1, arg_2):
        """place the instruction on a grid"""
        arg_0._rows_in_grid[arg_1] = RowInGrid(arg_1, arg_2)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { } for arg_4 in arg_0 . values ( ) : arg_5 = arg_4 . pkg_name arg_6 = arg_4 . debian_pkg_name arg_7 = [ ] for arg_8 in arg_2 : arg_7 . append ( set ( [ ] ) ) for arg_9 in arg_1 : arg_10 = _strip_version_suffix ( arg_8 . get ( arg_9 , { } ) . get ( arg_6 , None ) ) arg_7 [ - 1 ] . add ( arg_10 ) arg_3 [ arg_5 ] = max ( [ len ( v ) for v in arg_7 ] ) == 1 return arg_3

def Func(arg_0, arg_1, arg_2):
    """
    For each package check if the version in one repo is equal for all targets.

    The version could be different in different repos though.

    :return: a dict indexed by package names containing a boolean flag
    """
    arg_3 = {}
    for arg_4 in arg_0.values():
        arg_5 = arg_4.pkg_name
        arg_6 = arg_4.debian_pkg_name

        arg_7 = []
        for arg_8 in arg_2:
            arg_7.append(set([]))
            for arg_9 in arg_1:
                arg_10 = _strip_version_suffix(
                    arg_8.get(arg_9, {}).get(arg_6, None))
                arg_7[-1].add(arg_10)
        arg_3[arg_5] = max([len(v) for v in arg_7]) == 1
    return arg_3

For each package check if the version in one repo is equal for all targets .


def Func(arg_0):
        """
        Collect all fields marked as editable booleans. We do not
        want the user to be able to edit arbitrary fields by crafting
        an AJAX request by hand.
        """
        if hasattr(arg_0, '_ajax_editable_booleans'):
            return

        arg_0._ajax_editable_booleans = {}

        for arg_2 in arg_0.list_display:
            # The ajax_editable_boolean return value has to be assigned
            # to the ModelAdmin class
            arg_3 = getattr(arg_0.__class__, arg_2, None)
            if not arg_3:
                continue

            arg_4 = getattr(arg_3, 'editable_boolean_field', None)
            if arg_4:
                def arg_6(arg_0, arg_5):
                    return [ajax_editable_boolean_cell(arg_5, arg_6.attr)]

                arg_6.attr = arg_4
                arg_7 = getattr(arg_3, 'editable_boolean_result', arg_6)
                arg_0._ajax_editable_booleans[arg_4] = arg_7

Collect all fields marked as editable booleans . We do not want the user to be able to edit arbitrary fields by crafting an AJAX request by hand .


def Func(arg_0, arg_1, arg_2):
    '''This submits a POST query to an LCC-Server search API endpoint.

    Handles streaming of the results, and returns the final JSON stream. Also
    handles results that time out.

    Parameters
    ----------

    url : str
        The URL of the search API endpoint to hit. This is something like
        `https://data.hatsurveys.org/api/conesearch`

    data : dict
        A dict of the search query parameters to pass to the search service.

    apikey : str
        The API key to use to access the search service. API keys are required
        for all POST request made to an LCC-Server's API endpoints.

    Returns
    -------

    (status_flag, data_dict, dataset_id) : tuple
        This returns a tuple containing the status of the request: ('complete',
        'failed', 'background', etc.), a dict parsed from the JSON result of the
        request, and a dataset ID, which can be used to reconstruct the URL on
        the LCC-Server where the results can be browsed.

    '''

    # first, we need to convert any columns and collections items to broken out
    # params
    arg_3 = {}

    for arg_4 in arg_1:

        if arg_4 == 'columns':
            arg_3['columns[]'] = arg_1[arg_4]
        elif arg_4 == 'collections':
            arg_3['collections[]'] = arg_1[arg_4]
        else:
            arg_3[arg_4] = arg_1[arg_4]

    # do the urlencode with doseq=True
    # we also need to encode to bytes
    arg_5 = urlencode(arg_3, doseq=True).encode()

    # if apikey is not None, add it in as an Authorization: Bearer [apikey]
    # header
    if arg_2:
        arg_6 = {'Authorization':'Bearer: %s' % arg_2}
    else:
        arg_6 = {}

    LOGINFO('submitting search query to LCC-Server API URL: %s' % arg_0)

    try:

        # hit the server with a POST request
        arg_7 = Request(arg_0, arg_1=arg_5, arg_6=arg_6)
        arg_8 = urlopen(arg_7)

        if arg_8.code == 200:

            # we'll iterate over the lines in the response
            # this works super-well for ND-JSON!
            for arg_9 in arg_8:

                arg_1 = json.loads(arg_9)
                arg_10 = arg_1['message']
                arg_11 = arg_1['status']

                if arg_11 != 'failed':
                    LOGINFO('status: %s, %s' % (arg_11, arg_10))
                else:
                    LOGERROR('status: %s, %s' % (arg_11, arg_10))

                # here, we'll decide what to do about the query

                # completed query or query sent to background...
                if arg_11 in ('ok','background'):

                    arg_12 = arg_1['result']['setid']
                    # save the data pickle to astrobase lccs directory
                    arg_13 = os.path.join(os.path.expanduser('~'),
                                             '.astrobase',
                                             'lccs',
                                             'query-%s.pkl' % arg_12)
                    if not os.path.exists(os.path.dirname(arg_13)):
                        os.makedirs(os.path.dirname(arg_13))

                    with open(arg_13,'wb') as outfd:
                        pickle.dump(arg_1, outfd, pickle.HIGHEST_PROTOCOL)
                        LOGINFO('saved query info to %s, use this to '
                                'download results later with '
                                'retrieve_dataset_files' % arg_13)

                    # we're done at this point, return
                    return arg_11, arg_1, arg_1['result']['setid']

                # the query probably failed...
                elif arg_11 == 'failed':

                    # we're done at this point, return
                    return arg_11, arg_1, None

        # if the response was not OK, then we probably failed
        else:

            try:
                arg_1 = json.load(arg_8)
                arg_10 = arg_1['message']

                LOGERROR(arg_10)
                return 'failed', None, None

            except Exception as e:

                LOGEXCEPTION('failed to submit query to %s' % arg_0)
                return 'failed', None, None

    except HTTPError as e:

        LOGERROR('could not submit query to LCC API at: %s' % arg_0)
        LOGERROR('HTTP status code was %s, reason: %s' % (e.code, e.reason))
        return 'failed', None, None

This submits a POST query to an LCC - Server search API endpoint .


def Func ( arg_0 ) : arg_1 = ET . XML ( arg_0 ) arg_2 = { 'title' : '' , 'links' : [ ] , 'size' : 0 , 'flashvars' : '' , } arg_3 = dictify ( arg_1 ) [ 'ckplayer' ] if 'info' in arg_3 : if '_text' in arg_3 [ 'info' ] [ 0 ] [ 'title' ] [ 0 ] : arg_2 [ 'title' ] = arg_3 [ 'info' ] [ 0 ] [ 'title' ] [ 0 ] [ '_text' ] . strip ( ) if '_text' in arg_3 [ 'video' ] [ 0 ] [ 'size' ] [ 0 ] : arg_2 [ 'size' ] = sum ( [ int ( i [ 'size' ] [ 0 ] [ '_text' ] ) for i in arg_3 [ 'video' ] ] ) if '_text' in arg_3 [ 'video' ] [ 0 ] [ 'file' ] [ 0 ] : arg_2 [ 'links' ] = [ i [ 'file' ] [ 0 ] [ '_text' ] . strip ( ) for i in arg_3 [ 'video' ] ] if '_text' in arg_3 [ 'flashvars' ] [ 0 ] : arg_2 [ 'flashvars' ] = arg_3 [ 'flashvars' ] [ 0 ] [ '_text' ] . strip ( ) return arg_2

def Func(arg_0):
    """str->dict
    Information for CKPlayer API content."""
    arg_1 = ET.XML(arg_0)
    arg_2 = {'title': '',
                  #'duration': 0,
                  'links': [],
                  'size': 0,
                  'flashvars': '',}
    arg_3 = dictify(arg_1)['ckplayer']
    if 'info' in arg_3:
        if '_text' in arg_3['info'][0]['title'][0]:  #title
            arg_2['title'] = arg_3['info'][0]['title'][0]['_text'].strip()

    #if dictify(e)['ckplayer']['info'][0]['title'][0]['_text'].strip():  #duration
        #video_dict['title'] = dictify(e)['ckplayer']['info'][0]['title'][0]['_text'].strip()

    if '_text' in arg_3['video'][0]['size'][0]:  #size exists for 1 piece
        arg_2['size'] = sum([int(i['size'][0]['_text']) for i in arg_3['video']])

    if '_text' in arg_3['video'][0]['file'][0]:  #link exist
        arg_2['links'] = [i['file'][0]['_text'].strip() for i in arg_3['video']]

    if '_text' in arg_3['flashvars'][0]:
        arg_2['flashvars'] = arg_3['flashvars'][0]['_text'].strip()

    return arg_2

str - > dict Information for CKPlayer API content .


return convert_constants(jmag,hmag,kmag,
                             SDSSZ_JHK,
                             SDSSZ_JH, SDSSZ_JK, SDSSZ_HK,
                             SDSSZ_J, SDSSZ_H, SDSSZ_K)

def Func(arg_0,arg_1,arg_2):
    '''Converts given J, H, Ks mags to an SDSS z magnitude value.

    Parameters
    ----------

    jmag,hmag,kmag : float
        2MASS J, H, Ks mags of the object.

    Returns
    -------

    float
        The converted SDSS z band magnitude.

    '''

    return convert_constants(arg_0,arg_1,arg_2,
                             SDSSZ_JHK,
                             SDSSZ_JH, SDSSZ_JK, SDSSZ_HK,
                             SDSSZ_J, SDSSZ_H, SDSSZ_K)

Converts given J H Ks mags to an SDSS z magnitude value .


def Func ( arg_0 , arg_1 = arg_2 ) : arg_0 = list ( arg_0 ) arg_3 = threading . Event ( ) def changed ( ) : if arg_1 ( arg_4 . is_set ( ) for arg_4 in arg_0 ) : arg_3 . set ( ) else : arg_3 . clear ( ) def add_changed ( arg_5 ) : @ functools . wraps ( arg_5 ) def wrapped ( ) : arg_5 ( ) changed ( ) return wrapped for arg_4 in arg_0 : arg_4 . set = add_changed ( arg_4 . set ) arg_4 . clear = add_changed ( arg_4 . clear ) changed ( ) return arg_3

def Func(arg_0, arg_1=arg_2):
    """
    Compose a sequence of events into one event.

    Arguments:
        events:    a sequence of objects looking like threading.Event
        condition: a function taking a sequence of bools and returning a bool.
    """
    arg_0 = list(arg_0)
    arg_3 = threading.Event()

    def changed():
        if arg_1(arg_4.is_set() for arg_4 in arg_0):
            arg_3.set()
        else:
            arg_3.clear()

    def add_changed(arg_5):
        @functools.wraps(arg_5)
        def wrapped():
            arg_5()
            changed()

        return wrapped

    for arg_4 in arg_0:
        arg_4.set = add_changed(arg_4.set)
        arg_4.clear = add_changed(arg_4.clear)

    changed()
    return arg_3

Compose a sequence of events into one event .


def
Func
(
arg_0
,
arg_1
)
:
arg_0
.
_lock
.
acquire_write
(
)
try
:
arg_2
=
arg_0
.
_dict
.
get
(
arg_1
)
_logger
.
debug
(
"Func {}"
.
format
(
lock_string
(
arg_2
)
)
)
if
arg_2
is
:
return
False
arg_3
=
"URL2TOKEN:{}"
.
format
(
arg_2
.
get
(
"root"
)
)
if
arg_3
in
arg_0
.
_dict
:
arg_4
=
arg_0
.
_dict
[
arg_3
]
if
len
(
arg_4
)
>
1
:
arg_4
.
remove
(
arg_1
)
arg_0
.
_dict
[
arg_3
]
=
arg_4
else
:
del
arg_0
.
_dict
[
arg_3
]
del
arg_0
.
_dict
[
arg_1
]
arg_0
.
_flush
(
)
finally
:
arg_0
.
_lock
.
release
(
)
return
True

def Func(arg_0, arg_1):
        """Delete lock.

        Returns True on success. False, if token does not exist, or is expired.
        """
        arg_0._lock.acquire_write()
        try:
            arg_2 = arg_0._dict.get(arg_1)
            _logger.debug("Func {}".format(lock_string(arg_2)))
            if arg_2 is None:
                return False
            # Remove url to lock mapping
            arg_3 = "URL2TOKEN:{}".format(arg_2.get("root"))
            if arg_3 in arg_0._dict:
                # _logger.debug("    Func token {} from url {}".format(token, lock.get("root")))
                arg_4 = arg_0._dict[arg_3]
                if len(arg_4) > 1:
                    # Note: shelve dictionary returns copies, so we must
                    # reassign values:
                    arg_4.remove(arg_1)
                    arg_0._dict[arg_3] = arg_4
                else:
                    del arg_0._dict[arg_3]
            # Remove the lock
            del arg_0._dict[arg_1]

            arg_0._flush()
        finally:
            arg_0._lock.release()
        return True


def Func(arg_0, arg_1):
        """Send the specified text to the frontend to be presented at the next
        input cell."""
        arg_2 = dict(
            source='IPython.zmq.zmqshell.ZMQInteractiveShell.Func',
            arg_1=arg_1
        )
        arg_0.payload_manager.write_payload(arg_2)

Send the specified text to the frontend to be presented at the next input cell .


def Func ( arg_0 , arg_1 ) : arg_2 = DETAILS_URL + "?doc={}" . format ( requests . utils . quote ( arg_1 ) ) arg_3 = arg_0 . executeRequestApi2 ( arg_2 ) return utils . parseProtobufObj ( arg_3 . payload . FuncResponse . docV2 )

def Func(arg_0, arg_1):
        """Get app Func from a package name.

        packageName is the app unique ID (usually starting with 'com.')."""
        arg_2 = DETAILS_URL + "?doc={}".format(requests.utils.quote(arg_1))
        arg_3 = arg_0.executeRequestApi2(arg_2)
        return utils.parseProtobufObj(arg_3.payload.FuncResponse.docV2)

Get app details from a package name.

        packageName is the app unique ID (usually starting with 'com.').


def Func ( arg_0 ) : from os . path import dirname , join if '__file__' not in globals ( ) : arg_1 = '.' else : arg_1 = dirname ( __file__ ) for arg_2 in open ( join ( arg_1 , arg_0 ) , 'rb' ) : arg_2 = arg_2 . decode ( 'cp437' ) if '__version__' in arg_2 : if '"' in arg_2 : return arg_2 . split ( '"' ) [ 1 ] elif "'" in arg_2 : return arg_2 . split ( "'" ) [ 1 ]

def Func(arg_0):
    """Read version info from a file without importing it"""
    from os.path import dirname, join

    if '__file__' not in globals():
        # Allow to use function interactively
        arg_1 = '.'
    else:
        arg_1 = dirname(__file__)

    # The code below reads text file with unknown encoding in
    # in Python2/3 compatible way. Reading this text file
    # without specifying encoding will fail in Python 3 on some
    # systems (see http://goo.gl/5XmOH). Specifying encoding as
    # open() parameter is incompatible with Python 2

    # cp437 is the encoding without missing points, safe against:
    #   UnicodeDecodeError: 'charmap' codec can't decode byte...

    for arg_2 in open(join(arg_1, arg_0), 'rb'):
        arg_2 = arg_2.decode('cp437')
        if '__version__' in arg_2:
            if '"' in arg_2:
                # __version__ = "0.9"
                return arg_2.split('"')[1]
            elif "'" in arg_2:
                return arg_2.split("'")[1]


(rec, tag, fields, field_position_local=None,
                      field_position_global=None)

def Func(arg_0, arg_1, arg_2, arg_3=None,
                      arg_4=None):
    """
    Add the fields into the record at the required position.

    The position is specified by the tag and the field_position_local in the
    list of fields.

    :param rec: a record structure
    :param tag: the tag of the fields to be moved
    :param field_position_local: the field_position_local to which the field
                                 will be inserted. If not specified, appends
                                 the fields to the tag.
    :param a: list of fields to be added
    :return: -1 if the operation failed, or the field_position_local if it was
             successful
    """
    if arg_3 is None and arg_4 is None:
        for arg_5 in arg_2:
            record_add_field(
                arg_0, arg_1, ind1=arg_5[1],
                ind2=arg_5[2], subfields=arg_5[0],
                controlfield_value=arg_5[3])
    else:
        arg_2.reverse()
        for arg_5 in arg_2:
            record_add_field(
                arg_0, arg_1, ind1=arg_5[1], ind2=arg_5[2],
                subfields=arg_5[0], controlfield_value=arg_5[3],
                arg_3=arg_3,
                arg_4=arg_4)

    return arg_3

Add the fields into the record at the required position .


def Func ( arg_0 ) : if arg_0 . _path : try : arg_1 , arg_2 = arg_0 . _resolve_path ( ) return arg_1 [ arg_2 ] except KeyError : return None except IndexError : return None else : return arg_0 . _data

def Func(arg_0):
        """
        Get the value represented by this node.
        """
        if arg_0._path:
            try:
                arg_1, arg_2 = arg_0._resolve_path()
                return arg_1[arg_2]
            except KeyError:
                return None
            except IndexError:
                return None
        else:
            return arg_0._data

Get the value represented by this node .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . get ( arg_0 ) if arg_2 : for arg_3 in arg_2 : for arg_3 in Func ( arg_3 , arg_1 ) : yield arg_3 else : yield arg_0

def Func(arg_0, arg_1):
    """Recursively expand name benchmark names.

    Args:
        bm_name: string naming a benchmark or benchmark group.

    Yields:
        Names of actual benchmarks, with all group names fully expanded.
    """
    arg_2 = arg_1.get(arg_0)
    if arg_2:
        for arg_3 in arg_2:
            for arg_3 in Func(arg_3, arg_1):
                yield arg_3
    else:
        yield arg_0

Recursively expand name benchmark names .


def Func(arg_0, arg_1=None):
        """
        Will test the filepath result and test if its size is at least self.filesize

        :param result: a list of dicts returned by Snakebite ls
        :param size: the file size in MB a file should be at least to trigger True
        :return: (bool) depending on the matching criteria
        """
        if arg_1:
            arg_2 = LoggingMixin().log
            arg_2.debug(
                'Filtering for file size >= %s in files: %s',
                arg_1, map(lambda x: x['path'], arg_0)
            )
            arg_1 *= settings.MEGABYTE
            arg_0 = [x for x in arg_0 if x['length'] >= arg_1]
            arg_2.debug('HdfsSensor.poke: after size filter result is %s', arg_0)
        return arg_0

Will test the filepath result and test if its size is at least self . filesize


def Func(arg_0,arg_1):
        """Get the current block index, validating and checking status.

        Returns None if the demo is finished"""

        if arg_1 is None:
            if arg_0.finished:
                print >>io.stdout, 'Demo finished.  Use <demo_name>.reset() if you want to rerun it.'
                return None
            arg_1 = arg_0.block_index
        else:
            arg_0._validate_index(arg_1)
        return arg_1

Get the current block index validating and checking status .


def
Func
(
arg_0
)
:
arg_1
=
{
}
for
arg_2
in
iter_entry_points
(
group
=
arg_0
.
entry_point_group_queries
)
:
for
arg_3
in
arg_2
.
load
(
)
(
)
:
if
arg_3
[
'query_name'
]
not
in
arg_0
.
enabled_queries
:
continue
elif
arg_3
[
'query_name'
]
in
arg_1
:
raise
DuplicateQueryError
(
'Duplicate query {0} in entry point '
'{1}'
.
format
(
arg_3
[
'query'
]
,
arg_2
.
name
)
)
arg_3
.
update
(
arg_0
.
enabled_queries
[
arg_3
[
'query_name'
]
]
or
{
}
)
arg_1
[
arg_3
[
'query_name'
]
]
=
arg_3
return
arg_1

def Func(arg_0):
        """Load queries configuration."""
        arg_1 = {}
        for arg_2 in iter_entry_points(group=arg_0.entry_point_group_queries):
            for arg_3 in arg_2.load()():
                if arg_3['query_name'] not in arg_0.enabled_queries:
                    continue
                elif arg_3['query_name'] in arg_1:
                    raise DuplicateQueryError(
                        'Duplicate query {0} in entry point '
                        '{1}'.format(arg_3['query'], arg_2.name))
                # Update the default configuration with env/overlay config.
                arg_3.update(
                    arg_0.enabled_queries[arg_3['query_name']] or {}
                )
                arg_1[arg_3['query_name']] = arg_3
        return arg_1


return dict(
        action=request.route_url('dropbox_form_submit', token=token),
        fileupload_url=request.route_url('dropbox_fileupload', token=token),
        **defaults(request))

def Func ( arg_0 ) : from briefkasten import generate_post_token arg_1 = generate_post_token ( secret = arg_0 . registry . settings [ 'post_secret' ] ) return dict ( action = arg_0 . route_url ( 'Func_submit' , arg_1 = arg_1 ) , fileupload_url = arg_0 . route_url ( 'dropbox_fileupload' , arg_1 = arg_1 ) , ** defaults ( arg_0 ) )

def Func(arg_0):
    """ generates a dropbox uid and renders the submission form with a signed version of that id"""
    from briefkasten import generate_post_token
    arg_1 = generate_post_token(secret=arg_0.registry.settings['post_secret'])
    return dict(
        action=arg_0.route_url('Func_submit', arg_1=arg_1),
        fileupload_url=arg_0.route_url('dropbox_fileupload', arg_1=arg_1),
        **defaults(arg_0))


(dataset, regions, masker=None, threshold=None,
                           remove_zero=True)

def Func(arg_0, arg_1, arg_2=None, arg_3=None,
                           arg_4=True):
    """ Aggregates over all voxels within each ROI in the input image.

    Takes a Dataset and a Nifti image that defines distinct regions, and
    returns a numpy matrix of  ROIs x mappables, where the value at each
    ROI is the proportion of active voxels in that ROI. Each distinct ROI
    must have a unique value in the image; non-contiguous voxels with the
    same value will be assigned to the same ROI.

    Args:
        dataset: Either a Dataset instance from which image data are
            extracted, or a Numpy array containing image data to use. If
            the latter, the array contains voxels in rows and
            features/studies in columns. The number of voxels must be equal
            to the length of the vectorized image mask in the regions
            image.
        regions: An image defining the boundaries of the regions to use.
            Can be one of:
            1) A string name of the NIFTI or Analyze-format image
            2) A NiBabel SpatialImage
            3) A list of NiBabel images
            4) A 1D numpy array of the same length as the mask vector in
                the Dataset's current Masker.
        masker: Optional masker used to load image if regions is not a
            numpy array. Must be passed if dataset is a numpy array.
        threshold: An optional float in the range of 0 - 1 or integer. If
            passed, the array will be binarized, with ROI values above the
            threshold assigned to True and values below the threshold
            assigned to False. (E.g., if threshold = 0.05, only ROIs in
            which more than 5% of voxels are active will be considered
            active.) If threshold is integer, studies will only be
            considered active if they activate more than that number of
            voxels in the ROI.
        remove_zero: An optional boolean; when True, assume that voxels
            with value of 0 should not be considered as a separate ROI, and
            will be ignored.

    Returns:
        A 2D numpy array with ROIs in rows and mappables in columns.
    """

    if arg_2 is not None:
        arg_2 = arg_2
    else:
        if isinstance(arg_0, Dataset):
            arg_2 = arg_0.masker
        else:
            if not type(arg_1).__module__.startswith('numpy'):
                raise ValueError(
                    "If dataset is a numpy array and regions is not a numpy "
                    "array, a masker must be provided.")

    if not type(arg_1).__module__.startswith('numpy'):
        arg_1 = arg_2.mask(arg_1)

    if isinstance(arg_0, Dataset):
        arg_0 = arg_0.get_image_data(dense=False)

    # If multiple images are passed, give each one a unique value
    if arg_1.ndim == 2:
        arg_5 = arg_1
        for arg_6 in range(arg_1.shape[1]):
            arg_7 = np.nonzero(arg_5[:, arg_6])[0]
            if isinstance(arg_3, int):
                arg_5[arg_7, arg_6] = 1.0
            else:
                arg_5[arg_7, arg_6] = 1.0 / np.count_nonzero(arg_5[:, arg_6])

    # Otherwise create an ROI-coding matrix
    else:
        arg_8 = np.unique(arg_1)

        if arg_4:
            arg_8 = arg_8[np.nonzero(arg_8)]

        arg_9 = arg_8.size

        arg_5 = np.zeros((arg_1.size, arg_9))
        for arg_6 in range(arg_9):
            if isinstance(arg_3, int):
                arg_5[arg_1 == arg_8[arg_6], arg_6] = 1.0
            else:
                arg_5[arg_1 == arg_8[arg_6], arg_6] = 1.0 / \
                    np.sum(arg_1 == arg_8[arg_6])

    # Call dot() on the array itself as this will use sparse matrix
    # multiplication if possible.
    arg_10 = arg_0.T.dot(arg_5).T

    if arg_3 is not None:
        arg_10[arg_10 < arg_3] = 0.0
        arg_10 = arg_10.astype(bool)

    return arg_10

Aggregates over all voxels within each ROI in the input image .


def Func ( arg_0 , arg_1 , arg_2 ) : if validations . validate_creator ( arg_2 ) : arg_1 . creation_info . Func ( arg_2 ) return True else : raise SPDXValueError ( 'CreationInfo::Creator' )

def Func(arg_0, arg_1, arg_2):
        """Adds a creator to the document's creation info.
        Returns true if creator is valid.
        Creator must be built by an EntityBuilder.
        Raises SPDXValueError if not a creator type.
        """
        if validations.validate_creator(arg_2):
            arg_1.creation_info.Func(arg_2)
            return True
        else:
            raise SPDXValueError('CreationInfo::Creator')

Adds a creator to the document s creation info . Returns true if creator is valid . Creator must be built by an EntityBuilder . Raises SPDXValueError if not a creator type .


def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : if hasattr ( arg_0 , 'exception_handler_decorator' ) : arg_1 = arg_0 . exception_handler_decorator ( arg_1 ) arg_4 = gevent . Func ( arg_1 , * arg_2 , ** arg_3 ) arg_0 . jobs . append ( arg_4 ) return arg_4

def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Spawn a new process, attached to this Namespace.

        It will be monitored by the "watcher" process in the Socket. If the
        socket disconnects, all these greenlets are going to be killed, after
        calling BaseNamespace.disconnect()

        This method uses the ``exception_handler_decorator``.  See
        Namespace documentation for more information.

        """
        # self.log.debug("Spawning sub-Namespace Greenlet: %s" % fn.__name__)
        if hasattr(arg_0, 'exception_handler_decorator'):
            arg_1 = arg_0.exception_handler_decorator(arg_1)
        arg_4 = gevent.Func(arg_1, *arg_2, **arg_3)
        arg_0.jobs.append(arg_4)
        return arg_4

Spawn a new process attached to this Namespace .


def
Func
(
arg_0
,
arg_1
)
:
try
:
arg_2
=
arg_0
[
arg_1
]
if
isinstance
(
arg_2
,
Alias
)
:
arg_2
=
arg_0
[
arg_2
.
target
]
return
arg_2
except
KeyError
:
raise
KeyError
(
"No matches for engine %s"
%
arg_1
)

def Func(arg_0, arg_1):
    """
    Get engine or raise exception, Funcs Alias-instances to a sibling target.

    :param cursor: The object so search in
    :param key: The key to get
    :return: The object found
    """
    try:
        arg_2 = arg_0[arg_1]

        # Resolve alias
        if isinstance(arg_2, Alias):
            arg_2 = arg_0[arg_2.target]

        return arg_2
    except KeyError:
        raise KeyError("No matches for engine %s" % arg_1)

Get engine or raise exception, resolves Alias-instances to a sibling target.

    :param cursor: The object so search in
    :param key: The key to get
    :return: The object found

Get engine or raise exception resolves Alias - instances to a sibling target .


def Func ( arg_0 , arg_1 ) : arg_2 = { } arg_3 = None if isinstance ( arg_1 , dict ) : arg_2 . update ( arg_3 = arg_1 . get ( 'filters' , None ) , output = arg_1 . get ( 'output' , None ) , debug = arg_1 . get ( 'debug' , None ) , extra = arg_1 . get ( 'extra' , { } ) , config = arg_1 . get ( 'config' , { } ) , depends = arg_1 . get ( 'depends' , None ) ) arg_4 = Bundle ( * list ( arg_0 . _yield_bundle_contents ( arg_1 ) ) , ** arg_2 ) return arg_0 . _auto_filter_bundle ( arg_4 )

def Func(arg_0, arg_1):
        """Return a bundle initialised by the given dict."""
        arg_2 = {}
        arg_3 = None
        if isinstance(arg_1, dict):
            arg_2.update(
                arg_3=arg_1.get('filters', None),
                output=arg_1.get('output', None),
                debug=arg_1.get('debug', None),
                extra=arg_1.get('extra', {}),
                config=arg_1.get('config', {}),
                depends=arg_1.get('depends', None))
        arg_4 = Bundle(*list(arg_0._yield_bundle_contents(arg_1)), **arg_2)
        return arg_0._auto_filter_bundle(arg_4)

Return a bundle initialised by the given dict .


def Func(arg_0):
  """Wraps a setter so it applies to the inner-most results in `kernel_results`.

  The wrapped setter unwraps `kernel_results` and applies `setter` to the first
  results without an `inner_results` attribute.

  Args:
    setter: A callable that takes the kernel results as well as some `*args` and
      `**kwargs` and returns a modified copy of those kernel results.

  Returns:
    new_setter: A wrapped `setter`.
  """

  @functools.wraps(arg_0)
  def _new_setter(arg_1, *arg_2, **arg_3):
    """Wrapped setter."""
    arg_4 = []
    while hasattr(arg_1, 'inner_results'):
      arg_4.append(arg_1)
      arg_1 = arg_1.inner_results

    arg_5 = arg_0(arg_1, *arg_2, **arg_3)
    for arg_6 in reversed(arg_4):
      arg_5 = arg_6._replace(
          inner_results=arg_5)

    return arg_5

  return _new_setter

Wraps a setter so it applies to the inner - most results in kernel_results .


def Func ( arg_0 , arg_1 ) : arg_2 = numpy . linalg . solve ( arg_0 , arg_1 ) return arg_2

def Func(arg_0, arg_1):
    """This function solve Ax=B directly without taking care of the input
    matrix properties.
    """
    arg_2 = numpy.linalg.solve(arg_0, arg_1)
    return arg_2

This function solve Ax = B directly without taking care of the input matrix properties .


def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_1 = [ arg_1 . strip ( ) . lower ( ) for arg_1 in ensure_list ( arg_1 ) ] def filters ( arg_3 ) : return arg_3 . suffix . lower ( ) in arg_1 return arg_0 . select_file ( filters , arg_2 )

def Func(arg_0, arg_1, arg_2=True):
        """
        Select file path by extension.

        :param ext:

        **中文文档**

        选择与预定义的若干个扩展名匹配的文件。
        """
        arg_1 = [arg_1.strip().lower() for arg_1 in ensure_list(arg_1)]

        def filters(arg_3): return arg_3.suffix.lower() in arg_1

        return arg_0.select_file(filters, arg_2)


(
            self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config)

return AzureOperationPoller(
            long_running_send, get_long_running_output,
            get_long_running_status, long_running_operation_timeout)

def Func(
            arg_0, arg_1, arg_2, arg_3, arg_4, arg_5=None, arg_6=None, arg_7=None, arg_8=False, **arg_9):
        """Creates a new certificate inside the specified account.

        :param resource_group_name: The name of the resource group that
         contains the Batch account.
        :type resource_group_name: str
        :param account_name: The name of the Batch account.
        :type account_name: str
        :param certificate_name: The identifier for the certificate. This must
         be made up of algorithm and thumbprint separated by a dash, and must
         match the certificate data in the request. For example SHA1-a3d1c5.
        :type certificate_name: str
        :param parameters: Additional parameters for certificate creation.
        :type parameters:
         ~azure.mgmt.batch.models.CertificateCreateOrUpdateParameters
        :param if_match: The entity state (ETag) version of the certificate to
         update. A value of "*" can be used to apply the operation only if the
         certificate already exists. If omitted, this operation will always be
         applied.
        :type if_match: str
        :param if_none_match: Set to '*' to allow a new certificate to be
         Funcd, but to prevent updating an existing certificate. Other values
         will be ignored.
        :type if_none_match: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :return: An instance of AzureOperationPoller that returns Certificate
         or ClientRawResponse if raw=true
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Certificate]
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
        """
        arg_10 = arg_0._Func_initial(
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5,
            arg_6=arg_6,
            arg_7=arg_7,
            arg_8=True,
            **arg_9
        )
        if arg_8:
            return arg_10

        # Construct and send request
        def long_running_send():
            return arg_10.response

        def get_long_running_status(arg_11, arg_12=None):

            arg_13 = arg_0._client.get(arg_11)
            if arg_12:
                arg_13.headers.update(arg_12)
            arg_14 = {}
            arg_14['x-ms-client-request-id'] = arg_10.response.request.headers['x-ms-client-request-id']
            return arg_0._client.send(
                arg_13, arg_14, stream=False, **arg_9)

        def get_long_running_output(arg_15):

            if arg_15.status_code not in [200]:
                arg_16 = CloudError(arg_15)
                arg_16.request_id = arg_15.headers.get('x-ms-request-id')
                raise arg_16

            arg_18 = {
                'ETag': 'str',
            }
            arg_19 = arg_0._deserialize('Certificate', arg_15)

            if arg_8:
                arg_20 = ClientRawResponse(arg_19, arg_15)
                arg_20.add_headers(arg_18)
                return arg_20

            return arg_19

        arg_21 = arg_9.get(
            'long_running_operation_timeout',
            arg_0.config.long_running_operation_timeout)
        return AzureOperationPoller(
            long_running_send, get_long_running_output,
            get_long_running_status, arg_21)

Creates a new certificate inside the specified account.

        :param resource_group_name: The name of the resource group that
         contains the Batch account.
        :type resource_group_name: str
        :param account_name: The name of the Batch account.
        :type account_name: str
        :param certificate_name: The identifier for the certificate. This must
         be made up of algorithm and thumbprint separated by a dash, and must
         match the certificate data in the request. For example SHA1-a3d1c5.
        :type certificate_name: str
        :param parameters: Additional parameters for certificate creation.
        :type parameters:
         ~azure.mgmt.batch.models.CertificateCreateOrUpdateParameters
        :param if_match: The entity state (ETag) version of the certificate to
         update. A value of "*" can be used to apply the operation only if the
         certificate already exists. If omitted, this operation will always be
         applied.
        :type if_match: str
        :param if_none_match: Set to '*' to allow a new certificate to be
         created, but to prevent updating an existing certificate. Other values
         will be ignored.
        :type if_none_match: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :return: An instance of AzureOperationPoller that returns Certificate
         or ClientRawResponse if raw=true
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Certificate]
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`

Creates a new certificate inside the specified account .


(self, name=None, attrs={}, text=None, **kwargs)

return self._findOne(self.findPreviousSiblings, name, attrs, text,
                             **kwargs)

def Func ( arg_0 , arg_1 = None , arg_2 = { } , arg_3 = None , ** arg_4 ) : return arg_0 . _findOne ( arg_0 . Funcs , arg_1 , arg_2 , arg_3 , ** arg_4 )

def Func(arg_0, arg_1=None, arg_2={}, arg_3=None, **arg_4):
        """Returns the closest sibling to this Tag that matches the
        given criteria and appears before this Tag in the document."""
        return arg_0._findOne(arg_0.Funcs, arg_1, arg_2, arg_3,
                             **arg_4)

Returns the closest sibling to this Tag that matches the given criteria and appears before this Tag in the document .


evaluates expression in current context and returns its value

def
Func
(
arg_0
,
arg_1
,
arg_2
=
False
)
:
arg_3
=
'PyJsEvalResult = Func(%s)'
%
json
.
dumps
(
arg_1
)
arg_0
.
execute
(
arg_3
,
arg_2
=
arg_2
)
return
arg_0
[
'PyJsEvalResult'
]

def Func(arg_0, arg_1, arg_2=False):
        """Funcuates expression in current context and returns its value"""
        arg_3 = 'PyJsEvalResult = Func(%s)' % json.dumps(arg_1)
        arg_0.execute(arg_3, arg_2=arg_2)
        return arg_0['PyJsEvalResult']


def Func ( arg_0 , arg_1 = True , arg_2 = True ) : arg_3 = defaultdict ( list ) for arg_4 in arg_0 . variables : if arg_1 : for arg_5 in arg_0 . sources . get ( arg_4 , [ ] ) : if arg_5 is None : continue arg_3 [ arg_4 ] . append ( arg_0 . access_to_sympy ( arg_4 , arg_5 ) ) if arg_2 : for arg_6 in arg_0 . destinations . get ( arg_4 , [ ] ) : if arg_6 is None : continue arg_3 [ arg_4 ] . append ( arg_0 . access_to_sympy ( arg_4 , arg_6 ) ) return arg_3

def Func(arg_0, arg_1=True, arg_2=True):
        """
        Return a dictionary of lists of sympy accesses, for each variable.

        Use *source* and *destination* to filter output
        """
        arg_3 = defaultdict(list)
        # Compile sympy accesses
        for arg_4 in arg_0.variables:
            if arg_1:
                for arg_5 in arg_0.sources.get(arg_4, []):
                    if arg_5 is None:
                        continue
                    arg_3[arg_4].append(arg_0.access_to_sympy(arg_4, arg_5))
            if arg_2:
                for arg_6 in arg_0.destinations.get(arg_4, []):
                    if arg_6 is None:
                        continue
                    arg_3[arg_4].append(arg_0.access_to_sympy(arg_4, arg_6))

        return arg_3

Return a dictionary of lists of sympy accesses for each variable .


def Func ( arg_0 , arg_1 ) : super ( PreviousValueModel , arg_0 ) . FuncBaseToProto ( arg_1 . modelBase ) arg_1 . fieldNames = arg_0 . _fieldNames arg_1 . fieldTypes = arg_0 . _fieldTypes if arg_0 . _predictedField : arg_1 . predictedField = arg_0 . _predictedField arg_1 . predictionSteps = arg_0 . _predictionSteps

def Func(arg_0, arg_1):
    """ Serialize via capnp

    :param proto: capnp PreviousValueModelProto message builder
    """
    super(PreviousValueModel, arg_0).FuncBaseToProto(arg_1.modelBase)

    arg_1.fieldNames = arg_0._fieldNames
    arg_1.fieldTypes = arg_0._fieldTypes
    if arg_0._predictedField:
      arg_1.predictedField = arg_0._predictedField
    arg_1.predictionSteps = arg_0._predictionSteps


def
Func
(
arg_0
=
4118
,
arg_1
=
)
:
if
"LDTP_DEBUG"
in
os
.
environ
:
arg_2
=
True
else
:
arg_2
=
False
arg_3
=
os
.
environ
.
get
(
'LDTP_DEBUG_FILE'
,
)
if
arg_2
:
print
(
"Parent PID: {}"
.
format
(
int
(
arg_1
)
)
)
if
arg_3
:
with
open
(
unicode
(
arg_3
)
,
"a"
)
as
fp
:
fp
.
write
(
"Parent PID: {}"
.
format
(
int
(
arg_1
)
)
)
arg_4
=
LDTPServer
(
(
''
,
arg_0
)
,
allow_none
=
True
,
logRequests
=
arg_2
,
requestHandler
=
RequestHandler
)
arg_4
.
register_introspection_functions
(
)
arg_4
.
register_multicall_functions
(
)
arg_5
=
core
.
Core
(
)
arg_4
.
register_instance
(
arg_5
)
if
arg_1
:
thread
.
start_new_thread
(
notifyclient
,
(
arg_1
,
)
)
try
:
arg_4
.
serve_forever
(
)
except
KeyboardInterrupt
:
pass
except
:
if
arg_2
:
print
(
traceback
.
format_exc
(
)
)
if
arg_3
:
with
open
(
arg_3
,
"a"
)
as
fp
:
fp
.
write
(
traceback
.
format_exc
(
)
)

def Func(arg_0=4118, arg_1=None):
    """Main entry point. Parse command line options and start up a server."""
    if "LDTP_DEBUG" in os.environ:
        arg_2 = True
    else:
        arg_2 = False
    arg_3 = os.environ.get('LDTP_DEBUG_FILE', None)
    if arg_2:
        print("Parent PID: {}".format(int(arg_1)))
    if arg_3:
        with open(unicode(arg_3), "a") as fp:
            fp.write("Parent PID: {}".format(int(arg_1)))
    arg_4 = LDTPServer(('', arg_0), allow_none=True, logRequests=arg_2,
                        requestHandler=RequestHandler)
    arg_4.register_introspection_functions()
    arg_4.register_multicall_functions()
    arg_5 = core.Core()
    arg_4.register_instance(arg_5)
    if arg_1:
        thread.start_new_thread(notifyclient, (arg_1,))
    try:
        arg_4.serve_forever()
    except KeyboardInterrupt:
        pass
    except:
        if arg_2:
            print(traceback.format_exc())
        if arg_3:
            with open(arg_3, "a") as fp:
                fp.write(traceback.format_exc())

Main entry point . Parse command line options and start up a server .


def Func ( arg_0 , arg_1 = None ) : arg_2 = arg_0 . cfms [ arg_0 . _frame_no ] [ : , None ] arg_3 = arg_0 . erp / ( arg_2 * arg_0 . world . dt ) arg_4 = ( 1 - arg_0 . erp ) / arg_2 arg_5 = arg_0 . distances ( ) arg_6 = arg_3 * arg_5 if arg_1 is not None : arg_7 = np . isnan ( arg_5 ) | np . isnan ( arg_1 ) arg_6 [ ~ arg_7 ] += ( arg_4 * ( arg_5 - arg_1 ) / arg_0 . world . dt ) [ ~ arg_7 ] return arg_6

def Func(arg_0, arg_1=None):
        '''Return an array of the Func exerted by marker springs.

        Notes
        -----

        The Func exerted by the marker springs can be approximated by::

          F = kp * dx

        where ``dx`` is the current array of marker distances. An even more
        accurate value is computed by approximating the velocity of the spring
        displacement::

          F = kp * dx + kd * (dx - dx_tm1) / dt

        where ``dx_tm1`` is an array of distances from the previous time step.

        Parameters
        ----------
        dx_tm1 : ndarray
            An array of distances from markers to their attachment targets,
            measured at the previous time step.

        Returns
        -------
        F : ndarray
            An array of Func that the markers are exerting on the skeleton.
        '''
        arg_2 = arg_0.cfms[arg_0._frame_no][:, None]
        arg_3 = arg_0.erp / (arg_2 * arg_0.world.dt)
        arg_4 = (1 - arg_0.erp) / arg_2
        arg_5 = arg_0.distances()
        arg_6 = arg_3 * arg_5
        if arg_1 is not None:
            arg_7 = np.isnan(arg_5) | np.isnan(arg_1)
            arg_6[~arg_7] += (arg_4 * (arg_5 - arg_1) / arg_0.world.dt)[~arg_7]
        return arg_6

Return an array of the forces exerted by marker springs.

        Notes
        -----

        The forces exerted by the marker springs can be approximated by::

          F = kp * dx

        where ``dx`` is the current array of marker distances. An even more
        accurate value is computed by approximating the velocity of the spring
        displacement::

          F = kp * dx + kd * (dx - dx_tm1) / dt

        where ``dx_tm1`` is an array of distances from the previous time step.

        Parameters
        ----------
        dx_tm1 : ndarray
            An array of distances from markers to their attachment targets,
            measured at the previous time step.

        Returns
        -------
        F : ndarray
            An array of forces that the markers are exerting on the skeleton.

Return an array of the forces exerted by marker springs .


def
Func
(
arg_0
)
:
for
arg_1
in
xrange
(
arg_0
.
iterations
*
10
)
:
try
:
load_privatekey
(
FILETYPE_PEM
,
arg_0
.
ENCRYPTED_PEM
,
lambda
*
args
:
"hello, public"
)
except
Error
:
pass

def Func(arg_0):
        """
        Call the function with an encrypted PEM and a passphrase callback which
        returns the wrong passphrase.
        """
        for arg_1 in xrange(arg_0.iterations * 10):
            try:
                load_privatekey(
                    FILETYPE_PEM, arg_0.ENCRYPTED_PEM,
                    lambda *args: "hello, public")
            except Error:
                pass

Call the function with an encrypted PEM and a passphrase callback which returns the wrong passphrase .


def Func ( arg_0 , arg_1 = None , ** arg_2 ) : arg_3 = arg_2 . pop ( 'bar' ) arg_0 . bars [ arg_3 . name ] = arg_3

def Func(arg_0, arg_1=None, **arg_2):
        """Binds a navigation bar into this extension instance."""
        arg_3 = arg_2.pop('bar')
        arg_0.bars[arg_3.name] = arg_3

Binds a navigation bar into this extension instance .


def Func(arg_0, arg_1: arg_2):
        """ Read the config file """
        if not os.path.exists(arg_1):
            raise FileNotFoundError(f"File path not found: {file_path}")
        # check if file exists
        if not os.path.isfile(arg_1):
            arg_0.logger.error(f"file not found: {file_path}")
            raise FileNotFoundError(f"configuration file not found {file_path}")

        arg_0.config.read(arg_1)


def
Func
(
arg_0
)
:
print
(
"Reloading programs:"
)
for
arg_1
,
arg_2
in
arg_0
.
_programs
.
items
(
)
:
if
getattr
(
arg_2
,
'program'
,
)
:
print
(
" - {}"
.
format
(
arg_2
.
meta
.
label
)
)
arg_2
.
program
=
resources
.
programs
.
load
(
arg_2
.
meta
)

def Func(arg_0):
        """
        Reload all shader programs with the reloadable flag set
        """
        print("Reloading programs:")
        for arg_1, arg_2 in arg_0._programs.items():
            if getattr(arg_2, 'program', None):
                print(" - {}".format(arg_2.meta.label))
                arg_2.program = resources.programs.load(arg_2.meta)


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
LOG
.
info
(
'Func %s for tenant %s and body %s'
%
(
arg_1
,
arg_0
.
tenant_id
,
arg_2
)
)
if
'port_id'
not
in
arg_2
:
raise
n_exc
.
BadRequest
(
resource
=
'floating_ip'
,
msg
=
'port_id is required.'
)
arg_3
=
[
]
if
arg_2
.
get
(
'port_id'
)
:
arg_3
=
[
{
'port_id'
:
arg_2
.
get
(
'port_id'
)
}
]
arg_4
=
_update_flip
(
arg_0
,
arg_1
,
ip_types
.
FLOATING
,
arg_3
)
return
v
.
_make_floating_ip_dict
(
arg_4
)

def Func(arg_0, arg_1, arg_2):
    """Update an existing floating IP.

    :param context: neutron api request context.
    :param id: id of the floating ip
    :param content: dictionary with keys indicating fields to update.
        valid keys are those that have a value of True for 'allow_put'
        as listed in the RESOURCE_ATTRIBUTE_MAP object in
        neutron/api/v2/attributes.py.

    :returns: Dictionary containing details for the new floating IP.  If values
        are declared in the fields parameter, then only those keys will be
        present.
    """

    LOG.info('Func %s for tenant %s and body %s' %
             (arg_1, arg_0.tenant_id, arg_2))

    if 'port_id' not in arg_2:
        raise n_exc.BadRequest(resource='floating_ip',
                               msg='port_id is required.')

    arg_3 = []
    if arg_2.get('port_id'):
        arg_3 = [{'port_id': arg_2.get('port_id')}]
    arg_4 = _update_flip(arg_0, arg_1, ip_types.FLOATING, arg_3)
    return v._make_floating_ip_dict(arg_4)


return [cls.of_structs(x.value, y.value)
                for x, y in zip(msg_a.args, msg_b.args)
                if x.field_type == 'struct']

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 , arg_4 = arg_0 . can_diff ( arg_1 , arg_2 ) if not arg_3 : raise ValueError ( arg_4 ) return [ arg_0 . of_structs ( arg_5 . value , arg_6 . value ) for arg_5 , arg_6 in zip ( arg_1 . args , arg_2 . args ) if arg_5 . field_type == 'struct' ]

def Func(arg_0, arg_1, arg_2):
        """
        Diff two thrift messages by comparing their args, raises exceptions if
        for some reason the messages can't be diffed. Only args of type 'struct'
        are compared.

        Returns a list of ThriftDiff results - one for each struct arg
        """
        arg_3, arg_4 = arg_0.can_diff(arg_1, arg_2)
        if not arg_3:
            raise ValueError(arg_4)
        return [arg_0.of_structs(arg_5.value, arg_6.value)
                for arg_5, arg_6 in zip(arg_1.args, arg_2.args)
                if arg_5.field_type == 'struct']

Diff two thrift messages by comparing their args raises exceptions if for some reason the messages can t be diffed . Only args of type struct are compared .


def Func ( arg_0 , arg_1 ) : arg_2 = reapply ( arg_0 , arg_1 ) for arg_3 in reversed ( arg_2 ) : arg_3 ( )

def Func(arg_0, arg_1):
    """Reapplies the typed_ast node into the lib2to3 tree.

    Also does post-processing. This is done in reverse order to enable placing
    TypeVars and aliases that depend on one another.
    """
    arg_2 = reapply(arg_0, arg_1)
    for arg_3 in reversed(arg_2):
        arg_3()

Reapplies the typed_ast node into the lib2to3 tree .


def Func ( arg_0 , arg_1 ) : if isinstance ( arg_0 , str ) : return _get_terminal ( arg_0 , arg_1 ) else : return arg_0 ( arg_1 )

def Func(arg_0, arg_1):
  """This method calls an extractor on some text.

  If extractor is just a string, it is passed as the first value to _get_terminal. Otherwise it is
  treated as a callable and text is passed directly to it.

  This makes it so you can have a shorthand of terminal(val) <-> val.
  """
  if isinstance(arg_0, str):
    return _get_terminal(arg_0, arg_1)
  else:
    return arg_0(arg_1)

This method calls an extractor on some text .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . collection . find_one ( { 'url' : arg_1 } ) if not arg_2 : raise ServiceNotFound return Service ( arg_2 )

def Func(arg_0, arg_1):
        """
        Gets service for given ``url`` from mongodb storage.
        """
        arg_2 = arg_0.collection.find_one({'url': arg_1})
        if not arg_2:
            raise ServiceNotFound
        return Service(arg_2)

Gets service for given url from mongodb storage .


def Func ( arg_0 , arg_1 ) : arg_2 = super ( PostgresDbWriter , arg_0 ) . Func ( arg_1 ) for arg_3 in arg_2 : arg_0 . execute ( arg_3 )

def Func(arg_0, arg_1):
        """Send DDL to create the specified `table` indexes

        :Parameters:
          - `table`: an instance of a :py:class:`mysql2pgsql.lib.mysql_reader.MysqlReader.Table` object that represents the table to read/write.

        Returns None
        """
        arg_2 = super(PostgresDbWriter, arg_0).Func(arg_1)
        for arg_3 in arg_2:
            arg_0.execute(arg_3)

Send DDL to create the specified table indexes


def
Func
(
arg_0
)
:
def
parse_headers
(
arg_0
)
:
arg_1
=
{
}
for
arg_2
,
arg_3
in
arg_0
.
items
(
)
:
arg_4
=
[
]
for
arg_5
,
arg_6
in
email
.
header
.
decode_header
(
arg_3
)
:
if
type
(
arg_5
)
==
bytes
:
arg_6
=
arg_6
if
arg_6
else
'utf-8'
try
:
arg_5
=
arg_5
.
decode
(
arg_6
,
errors
=
'surrogateescape'
)
except
(
UnicodeError
,
LookupError
)
:
arg_5
=
arg_5
.
decode
(
'ascii'
,
errors
=
'surrogateescape'
)
arg_4
.
append
(
arg_5
)
arg_7
=
' '
.
join
(
arg_4
)
arg_1
[
arg_2
]
=
arg_7
if
arg_7
else
return
arg_1
def
parse_payload
(
arg_0
)
:
arg_8
=
{
}
if
not
arg_0
.
is_multipart
(
)
:
arg_9
=
decode_payload
(
arg_0
)
arg_10
=
arg_0
.
get_content_subtype
(
)
arg_8
[
arg_10
]
=
[
arg_9
]
else
:
for
arg_11
in
email
.
iterators
.
typed_subpart_iterator
(
arg_0
)
:
arg_9
=
decode_payload
(
arg_11
)
arg_10
=
arg_11
.
get_content_subtype
(
)
arg_8
.
setdefault
(
arg_10
,
[
]
)
.
append
(
arg_9
)
return
{
arg_12
:
'\n'
.
join
(
arg_7
)
for
arg_12
,
arg_7
in
arg_8
.
items
(
)
}
def
decode_payload
(
arg_13
)
:
arg_6
=
arg_13
.
get_content_charset
(
'utf-8'
)
arg_9
=
arg_13
.
get_payload
(
decode
=
True
)
try
:
arg_9
=
arg_9
.
decode
(
arg_6
,
errors
=
'surrogateescape'
)
except
(
UnicodeError
,
LookupError
)
:
arg_9
=
arg_9
.
decode
(
'ascii'
,
errors
=
'surrogateescape'
)
return
arg_9
arg_14
=
requests
.
structures
.
CaseInsensitiveDict
(
)
if
isinstance
(
arg_0
,
mailbox
.
mboxMessage
)
:
arg_14
[
'unixfrom'
]
=
arg_0
.
get_from
(
)
else
:
arg_14
[
'unixfrom'
]
=
try
:
for
arg_12
,
arg_7
in
parse_headers
(
arg_0
)
.
items
(
)
:
arg_14
[
arg_12
]
=
arg_7
arg_14
[
'body'
]
=
parse_payload
(
arg_0
)
except
UnicodeError
as
e
:
raise
ParseError
(
cause
=
str
(
e
)
)
return
arg_14

def Func(arg_0):
    """Convert an email message into a dictionary.

    This function transforms an `email.message.Message` object
    into a dictionary. Headers are stored as key:value pairs
    while the body of the message is stored inside `body` key.
    Body may have two other keys inside, 'plain', for plain body
    messages and 'html', for HTML encoded messages.

    The returned dictionary has the type `requests.structures.CaseInsensitiveDict`
    due to same headers with different case formats can appear in
    the same message.

    :param msg: email message of type `email.message.Message`

    :returns : dictionary of type `requests.structures.CaseInsensitiveDict`

    :raises ParseError: when an error occurs transforming the message
        to a dictionary
    """
    def parse_headers(arg_0):
        arg_1 = {}

        for arg_2, arg_3 in arg_0.items():
            arg_4 = []

            for arg_5, arg_6 in email.header.decode_header(arg_3):
                if type(arg_5) == bytes:
                    arg_6 = arg_6 if arg_6 else 'utf-8'
                    try:
                        arg_5 = arg_5.decode(arg_6, errors='surrogateescape')
                    except (UnicodeError, LookupError):
                        # Try again with a 7bit encoding
                        arg_5 = arg_5.decode('ascii', errors='surrogateescape')
                arg_4.append(arg_5)

            arg_7 = ' '.join(arg_4)
            arg_1[arg_2] = arg_7 if arg_7 else None

        return arg_1

    def parse_payload(arg_0):
        arg_8 = {}

        if not arg_0.is_multipart():
            arg_9 = decode_payload(arg_0)
            arg_10 = arg_0.get_content_subtype()
            arg_8[arg_10] = [arg_9]
        else:
            # Include all the attached texts if it is multipart
            # Ignores binary parts by default
            for arg_11 in email.iterators.typed_subpart_iterator(arg_0):
                arg_9 = decode_payload(arg_11)
                arg_10 = arg_11.get_content_subtype()
                arg_8.setdefault(arg_10, []).append(arg_9)

        return {arg_12: '\n'.join(arg_7) for arg_12, arg_7 in arg_8.items()}

    def decode_payload(arg_13):
        arg_6 = arg_13.get_content_charset('utf-8')
        arg_9 = arg_13.get_payload(decode=True)

        try:
            arg_9 = arg_9.decode(arg_6, errors='surrogateescape')
        except (UnicodeError, LookupError):
            # Try again with a 7bit encoding
            arg_9 = arg_9.decode('ascii', errors='surrogateescape')
        return arg_9

    # The function starts here
    arg_14 = requests.structures.CaseInsensitiveDict()

    if isinstance(arg_0, mailbox.mboxMessage):
        arg_14['unixfrom'] = arg_0.get_from()
    else:
        arg_14['unixfrom'] = None

    try:
        for arg_12, arg_7 in parse_headers(arg_0).items():
            arg_14[arg_12] = arg_7
        arg_14['body'] = parse_payload(arg_0)
    except UnicodeError as e:
        raise ParseError(cause=str(e))

    return arg_14

Convert an email message into a dictionary .


def
Func
(
arg_0
)
:
arg_1
=
object
.
__getattribute__
(
arg_0
,
'_Proxy__local'
)
if
not
hasattr
(
arg_1
,
'__release_local__'
)
:
return
arg_1
(
*
arg_0
.
__args
,
**
arg_0
.
__kwargs
)
try
:
return
getattr
(
arg_1
,
arg_0
.
__name__
)
except
AttributeError
:
raise
RuntimeError
(
'no object bound to {0.__name__}'
.
format
(
arg_0
)
)

def Func(arg_0):
        """Get current object.
        This is useful if you want the real
        object behind the proxy at a time for performance reasons or because
        you want to pass the object into a different context.
        """
        arg_1 = object.__getattribute__(arg_0, '_Proxy__local')
        if not hasattr(arg_1, '__release_local__'):
            return arg_1(*arg_0.__args, **arg_0.__kwargs)
        try:  # pragma: no cover
            # not sure what this is about
            return getattr(arg_1, arg_0.__name__)
        except AttributeError:  # pragma: no cover
            raise RuntimeError('no object bound to {0.__name__}'.format(arg_0))

Get current object . This is useful if you want the real object behind the proxy at a time for performance reasons or because you want to pass the object into a different context .


def Func(arg_0, arg_1, arg_2=0):
        """Get metadata information about an object.

        Parameters
        ----------
        oname : str
            A string specifying the object name.
        detail_level : int, optional
            The level of detail for the introspection (0-2)

        Returns
        -------
        The msg_id of the message sent.
        """
        arg_3 = dict(arg_1=arg_1, arg_2=arg_2)
        arg_4 = arg_0.session.msg('Func_request', arg_3)
        arg_0._queue_send(arg_4)
        return arg_4['header']['msg_id']

Get metadata information about an object .


def Func ( arg_0 ) : if not hasattr ( arg_0 , '_imgmax' ) : Func = _np . max ( arg_0 . images [ 0 ] ) for arg_2 in arg_0 . images : arg_3 = _np . max ( arg_2 ) if arg_3 > Func : Func = arg_3 arg_0 . _imgmax = Func return arg_0 . _imgmax

def Func(arg_0):
        """
        Highest value of input image.
        """
        if not hasattr(arg_0, '_imgmax'):
            Func = _np.max(arg_0.images[0])
            for arg_2 in arg_0.images:
                arg_3 = _np.max(arg_2)
                if arg_3 > Func:
                    Func = arg_3

            arg_0._imgmax = Func

        return arg_0._imgmax


(script, visible_layer=False, depth=8,
                             full_depth=5, cg_depth=0, scale=1.1,
                             samples_per_node=1.5, point_weight=4.0,
                             iterations=8, confidence=False, pre_clean=False)

def Func(arg_0, arg_1=False, arg_2=8,
                             arg_3=5, arg_4=0, arg_5=1.1,
                             arg_6=1.5, arg_7=4.0,
                             arg_8=8, arg_9=False, arg_10=False):
    """ This surface reconstruction algorithm creates watertight
        surfaces from oriented point sets.

    The filter uses the original code of Michael Kazhdan and Matthew Bolitho
    implementing the algorithm in the following paper:

    Michael Kazhdan, Hugues Hoppe,
    "Screened Poisson surface reconstruction"
    ACM Trans. Graphics, 32(3), 2013

    Args:
        script: the FilterScript object or script filename to write
            the filter to.
        visible_layer (bool): If True all the visible layers will be used for
            providing the points
        depth (int): This integer is the maximum depth of the tree that will
            be used for surface reconstruction. Running at depth d corresponds
            to solving on a voxel grid whose resolution is no larger than
            2^d x 2^d x 2^d. Note that since the reconstructor adapts the
            octree to the sampling density, the specified reconstruction depth
            is only an upper bound. The default value for this parameter is 8.
        full_depth (int): This integer specifies the depth beyond depth the
            octree will be adapted. At coarser depths, the octree will be
            complete, containing all 2^d x 2^d x 2^d nodes. The default value
            for this parameter is 5.
        cg_depth (int): This integer is the depth up to which a
            conjugate-gradients solver will be used to solve the linear system.
            Beyond this depth Gauss-Seidel relaxation will be used. The default
            value for this parameter is 0.
        scale (float): This floating point value specifies the ratio between
            the diameter of the cube used for reconstruction and the diameter
            of the samples' bounding cube.  The default value is 1.1.
        samples_per_node (float): This floating point value specifies the
            minimum number of sample points that should fall within an octree
            node as the octree construction is adapted to sampling density. For
            noise-free samples, small values in the range [1.0 - 5.0] can be
            used. For more noisy samples, larger values in the range
            [15.0 - 20.0] may be needed to provide a smoother, noise-reduced,
            reconstruction. The default value is 1.5.
        point_weight (float): This floating point value specifies the
            importance that interpolation of the point samples is given in the
            formulation of the screened Poisson equation. The results of the
            original (unscreened) Poisson Reconstruction can be obtained by
            setting this value to 0. The default value for this parameter is 4.
        iterations (int): This integer value specifies the number of
            Gauss-Seidel relaxations to be performed at each level of the
            hierarchy. The default value for this parameter is 8.
        confidence (bool): If True this tells the reconstructor to use the
            quality as confidence information; this is done by scaling the unit
            normals with the quality values. When the flag is not enabled, all
            normals are normalized to have unit-length prior to reconstruction.
        pre_clean (bool): If True will force a cleaning pre-pass on the data
            removing all unreferenced vertices or vertices with null normals.

    Layer stack:
        Creates 1 new layer 'Poisson mesh'
        Current layer is not changed

    MeshLab versions:
        2016.12
    """
    arg_11 = ''.join([
        '  <xmlfilter name="Screened Poisson Surface Reconstruction">\n',
        '    <xmlparam name="cgDepth" value="{:d}"/>\n'.format(arg_4),
        '    <xmlparam name="confidence" value="{}"/>\n'.format(str(arg_9).lower()),
        '    <xmlparam name="depth" value="{:d}"/>\n'.format(arg_2),
        '    <xmlparam name="fullDepth" value="{:d}"/>\n'.format(arg_3),
        '    <xmlparam name="iters" value="{:d}"/>\n'.format(arg_8),
        '    <xmlparam name="pointWeight" value="{}"/>\n'.format(arg_7),
        '    <xmlparam name="preClean" value="{}"/>\n'.format(str(arg_10).lower()),
        '    <xmlparam name="samplesPerNode" value="{}"/>\n'.format(arg_6),
        '    <xmlparam name="scale" value="{}"/>\n'.format(arg_5),
        '    <xmlparam name="visibleLayer" value="{}"/>\n'.format(str(arg_1).lower()),
        '  </xmlfilter>\n'])
    util.write_filter(arg_0, arg_11)
    if isinstance(arg_0, FilterScript):
        arg_0.add_layer('Poisson mesh', change_layer=False)
    return None

This surface reconstruction algorithm creates watertight surfaces from oriented point sets .


def Func(arg_0):
    """
    Make a callable returning True for names starting with the given prefix.

    The returned callable takes two arguments, the attribute or name of
    the object, and possibly its corresponding value (which is ignored),
    as suitable for use with :meth:`ObjectLocator.is_test_module` and
    :meth:`ObjectLocator.is_test_method`\ .

    """

    def Func_(arg_1, arg_2=None):
        return arg_1.startswith(arg_0)
    Func_.__name__ += arg_0
    return Func_

Make a callable returning True for names starting with the given prefix .


(
        graph: BELGraph,
        node: Protein,
        modifications: Optional[Set[str]] = None,
)

def Func(
        arg_0: arg_1,
        arg_2: arg_3,
        arg_4: arg_5[arg_6[arg_7]] = None,
) -> Mapping[arg_3, arg_6[arg_3]]:
    """Get a mapping from variants of the given node to all of its upstream controllers."""
    arg_8 = defaultdict(set)
    arg_9 = variants_of(arg_0, arg_2, arg_4)
    for arg_10, arg_11, arg_12 in arg_0.in_edges(arg_9, arg_12=True):
        if arg_12[RELATION] in CAUSAL_RELATIONS:
            arg_8[arg_11].add(arg_10)
    return arg_8

Get a mapping from variants of the given node to all of its upstream controllers .


def Func ( arg_0 , arg_1 = None ) : if arg_1 : try : with open ( arg_0 , 'w' ) as fdesc : fdesc . write ( json . dumps ( arg_1 ) ) except IOError as error : logger . exception ( error ) return False return True else : if os . path . isfile ( arg_0 ) : try : with open ( arg_0 , 'r' ) as fdesc : return json . loads ( fdesc . read ( ) ) except IOError as error : return False else : return { }

def Func(arg_0, arg_1=None):
    ''' Small configuration file management function'''
    if arg_1:
        # We're writing configuration
        try:
            with open(arg_0, 'w') as fdesc:
                fdesc.write(json.dumps(arg_1))
        except IOError as error:
            logger.exception(error)
            return False
        return True
    else:
        # We're reading config
        if os.path.isfile(arg_0):
            try:
                with open(arg_0, 'r') as fdesc:
                    return json.loads(fdesc.read())
            except IOError as error:
                return False
        else:
            return {}


return {HOURS: time.hour, MINUTES: time.minute, SECONDS: time.second}

def Func ( arg_0 ) : return { HOURS : arg_0 . hour , MINUTES : arg_0 . minute , SECONDS : arg_0 . second }

def Func(arg_0):
        """
        Convert native python ``datetime.time`` object  to a format supported by the API
        """
        return {HOURS: arg_0.hour, MINUTES: arg_0.minute, SECONDS: arg_0.second}

Convert native python datetime . time object to a format supported by the API


return self._nn_interface._add_generic(self, type_name=LEAF,
                                               group_type_name=GROUP,
                                               args=args, kwargs=kwargs,
                                               add_prefix=False)

def Func(arg_0, *arg_1, **arg_2):
        """Adds an empty generic leaf under the current node.

        You can add to a generic leaves anywhere you want. So you are free to build
        your trajectory tree with any structure. You do not necessarily have to follow the
        four subtrees `config`, `parameters`, `derived_parameters`, `results`.

        If you are operating within these subtrees this simply calls the corresponding adding
        function.

        Be aware that if you are within a single run and you add items not below a group
        `run_XXXXXXXX` that you have to manually
        save the items. Otherwise they will be lost after the single run is completed.

        """

        return arg_0._nn_interface._add_generic(arg_0, type_name=LEAF,
                                               group_type_name=GROUP,
                                               arg_1=arg_1, arg_2=arg_2,
                                               add_prefix=False)

Adds an empty generic leaf under the current node .


def Func(arg_0):
        """Read all attribute properties, g, r, and z attributes"""

        arg_1 = copy.deepcopy(arg_0._num_attrs)
        arg_2 = copy.deepcopy(arg_0.fname)
        arg_3 = fortran_cdf.inquire_all_attr(arg_2, arg_1, len(arg_2))
        arg_4 = arg_3[0]
        arg_5 = arg_3[1].astype('U')
        arg_6 = arg_3[2]
        arg_7 = arg_3[3]
        arg_8 = arg_3[4]
        arg_9 = arg_3[5]
        arg_10 = arg_3[6]

        arg_11 = {}
        arg_12 = {}
        if arg_4 == 0:
            for arg_13, arg_14, arg_15, arg_16, arg_17, arg_1 in zip(arg_5, arg_6, arg_7,
                                                                arg_8, arg_9,
                                                                arg_10):
                arg_13 = ''.join(arg_13)
                arg_13 = arg_13.rstrip()
                arg_18 = {}
                arg_18['scope'] = arg_14
                arg_18['max_gentry'] = arg_15
                arg_18['max_rentry'] = arg_16
                arg_18['max_zentry'] = arg_17
                arg_18['attr_num'] = arg_1
                arg_19 = (arg_15 == 0) & (arg_16 == 0) & (arg_17 == 0)
                if not arg_19:
                    if arg_14 == 1:
                        arg_11[arg_13] = arg_18
                    elif arg_14 == 2:
                        arg_12[arg_13] = arg_18

            arg_0.global_attrs_info = arg_11
            arg_0.var_attrs_info = arg_12
        else:
            raise IOError(fortran_cdf.statusreporter(arg_4))

Read all attribute properties g r and z attributes