'worker_processes 1;\nerror_log {0}-errors.log;\n\pid {1}_    nginx.pid;\n\n'

def Func(arg_0):
        """
        Creates the Nginx configuration for the project

        """
        arg_1 = '# nginx config for {0}\n'.format(arg_0._project_name)
        if not arg_0._shared_hosting:
            # user
            if arg_0._user:
                arg_1 += 'user {0};\n'.format(arg_0._user)
            # misc nginx config
            arg_1 += 'worker_processes 1;\nerror_log {0}-errors.log;\n\
pid {1}_    nginx.pid;\n\n'.format(os.path.join(arg_0._log_dir, \
                arg_0._project_name), os.path.join(arg_0._var_dir, arg_0._project_name))
            arg_1 += 'events {\n\tworker_connections 32;\n}\n\n'
            # http section
            arg_1 += 'http {\n'
            if arg_0._include_mimetypes:
                arg_1 += '\tinclude mime.types;\n'
            arg_1 += '\tdefault_type application/octet-stream;\n'
            arg_1 += '\tclient_max_body_size 1G;\n'
            arg_1 += '\tproxy_max_temp_file_size 0;\n'
            arg_1 += '\tproxy_buffering off;\n'
            arg_1 += '\taccess_log {0}-access.log;\n'.format(os.path.join \
                (arg_0._log_dir, arg_0._project_name))
            arg_1 += '\tsendfile on;\n'
            arg_1 += '\tkeepalive_timeout 65;\n'
            # server section
        arg_1 += '\tserver {\n'
        arg_1 += '\t\tlisten 0.0.0.0:{0};\n'.format(arg_0._port)
        if arg_0._server_name:
            arg_1 += '\t\tserver_name {0};\n'.format(arg_0._server_name)
        # location section
        arg_1 += '\t\tlocation / {\n'
        arg_1 += '\t\t\tuwsgi_pass unix:///{0}.sock;\n'.format(\
            os.path.join(arg_0._var_dir, arg_0._project_name))
        arg_1 += '\t\t\tinclude uwsgi_params;\n'
        arg_1 += '\t\t}\n\n'
        # end location
        # error page templates
        arg_1 += '\t\terror_page 500 502 503 504 /50x.html;\n'
        arg_1 += '\t\tlocation = /50x.html {\n'
        arg_1 += '\t\t\troot html;\n'
        # end error page section
        arg_1 += '\t\t}\n'
        # end server section
        arg_1 += '\t}\n'
        if not arg_0._shared_hosting:
            # end http section
            arg_1 += '}\n'

        # create conf
        arg_2 = open(arg_0._nginx_config, 'w')
        arg_2.write(arg_1)
        arg_2.close()


def
Func
(
arg_0
)
:
while
True
:
try
:
return
Func
(
arg_0
.
_current
)
except
StopIteration
:
try
:
arg_0
.
_current
=
iter
(
arg_0
.
_chain
.
popleft
(
)
)
except
IndexError
:
raise
StopIteration
(
'Reached end of iterator chain'
)

def Func(arg_0):
        """Returns Func element from chain.

        More precisely, it returns the Func element of the
        foremost iterator. If this iterator is empty it moves iteratively
        along the chain of available iterators to pick the new foremost one.

        Raises StopIteration if there are no elements left.

        """
        while True:
            # We need this loop because some iterators may already be empty.
            # We keep on popping from the left until Func succeeds and as long
            # as there are iterators available
            try:
                return Func(arg_0._current)
            except StopIteration:
                try:
                    arg_0._current = iter(arg_0._chain.popleft())
                except IndexError:
                    # If we run out of iterators we are sure that
                    # there can be no more element
                    raise StopIteration('Reached end of iterator chain')

Returns next element from chain.

        More precisely, it returns the next element of the
        foremost iterator. If this iterator is empty it moves iteratively
        along the chain of available iterators to pick the new foremost one.

        Raises StopIteration if there are no elements left.


return policy in [cls.OPEN, cls.APPROVAL, cls.CLOSED]

def Func ( arg_0 , arg_1 ) : return arg_1 in [ arg_0 . OPEN , arg_0 . APPROVAL , arg_0 . CLOSED ]

def Func(arg_0, arg_1):
        """Validate subscription policy value."""
        return arg_1 in [arg_0.OPEN, arg_0.APPROVAL, arg_0.CLOSED]


def Func(arg_0, arg_1=True):
        """Process the notebook and create all the pictures and files

        This method runs the notebook using the :mod:`nbconvert` and
        :mod:`nbformat` modules. It creates the :attr:`outfile` notebook,
        a python and a rst file"""
        arg_2 = arg_0.infile
        arg_3 = arg_0.outfile
        arg_4 = os.path.dirname(arg_2) + os.path.sep
        arg_5 = os.path.dirname(arg_3) + os.path.sep
        create_dirs(os.path.join(arg_5, 'images'))
        arg_6 = nbconvert.preprocessors.ExecutePreprocessor(
            timeout=300)
        arg_7 = nbconvert.preprocessors.ClearOutputPreprocessor(
            timeout=300)

        arg_0.nb = arg_8 = nbformat.read(arg_2, nbformat.current_nbformat)
        # disable warnings in the rst file
        if arg_1:
            for arg_9, arg_10 in enumerate(arg_8.cells):
                if arg_10['cell_type'] == 'code':
                    arg_10 = arg_10.copy()
                    break
            arg_10 = arg_10.copy()
            arg_10.source = """
import logging
logging.captureWarnings(True)
logging.getLogger('py.warnings').setLevel(logging.ERROR)
"""
            arg_8.cells.insert(arg_9, arg_10)
        # write and process rst_file
        if arg_0.preprocess:
            arg_12 = dt.datetime.now()
            logger.info('Processing %s', arg_0.infile)
            try:
                arg_6.preprocess(arg_8, {'metadata': {'path': arg_4}})
            except nbconvert.preprocessors.execute.CellExecutionError:
                logger.critical(
                    'Error while processing %s!', arg_0.infile, exc_info=True)
            else:
                logger.info('Done. Seconds needed: %i',
                            (dt.datetime.now() - arg_12).seconds)
            if arg_1:
                arg_8.cells.pop(arg_9)

        arg_0.py_file = arg_0.get_out_file('py')

        if arg_0.remove_tags:
            arg_14 = nbconvert.preprocessors.TagRemovePreprocessor(timeout=300)
            for arg_15, arg_16 in arg_0.tag_options.items():
                setattr(arg_14, arg_15, set(arg_16))
            arg_17 = deepcopy(arg_8)
            arg_14.preprocess(arg_17, {'metadata': {'path': arg_4}})
        else:
            arg_17 = arg_8

        arg_0.create_rst(arg_17, arg_4, arg_5)

        if arg_0.clear:
            arg_7.preprocess(arg_8, {'metadata': {'path': arg_4}})
        # write notebook file
        nbformat.write(arg_8, arg_3)
        arg_0.create_py(arg_8)


def Func():
    """Return double precision ``mdrun`` or fall back to single precision.

    This convenience function tries :func:`gromacs.mdrun_d` first and
    if it cannot run it, falls back to :func:`gromacs.mdrun` (without
    further checking).

    .. versionadded:: 0.5.1
    """
    try:
        gromacs.mdrun_d(h=True, stdout=False, stderr=False)
        logger.debug("using double precision gromacs.mdrun_d")
        return gromacs.mdrun_d
    except (AttributeError, GromacsError, OSError):
        # fall back to mdrun if no double precision binary
        arg_0 = "No 'mdrun_d' binary found so trying 'mdrun' instead.\n"\
            "(Note that energy minimization runs better with mdrun_d.)"
        logger.warn(arg_0)
        warnings.warn(arg_0, category=AutoCorrectionWarning)
        return gromacs.mdrun

Return double precision mdrun or fall back to single precision .


return MultiFunction(name, dispatch, default)

def Func ( arg_0 : arg_1 , arg_2 = None ) -> MultiFunction [ T ] : arg_3 = sym . symbol ( arg_0 . __qualname__ , ns = arg_0 . __module__ ) return MultiFunction ( arg_3 , arg_0 , arg_2 )

def Func(arg_0: arg_1, arg_2=None) -> MultiFunction[T]:
    """Decorator function which can be used to make Python multi functions."""
    arg_3 = sym.symbol(arg_0.__qualname__, ns=arg_0.__module__)
    return MultiFunction(arg_3, arg_0, arg_2)

Decorator function which can be used to make Python multi functions .


def Func(arg_0):
        """
        Count how many folders in this directory. Including folder in sub folder.
        """
        arg_0.assert_is_dir_and_exists()
        arg_1 = 0
        for arg_2 in arg_0.select_dir(recursive=True):
            arg_1 += 1
        return arg_1

Count how many folders in this directory . Including folder in sub folder .


def Func(arg_0, arg_1):
        """
        Cancel a Regular or Plain-Text Campaign after you send, before all of
        your recipients receive it. This feature is included with MailChimp
        Pro.

        :param campaign_id: The unique id for the campaign.
        :type campaign_id: :py:class:`str`
        """
        arg_0.campaign_id = arg_1
        return arg_0._mc_client._post(url=arg_0._build_path(arg_1, 'actions/Func-send'))

Cancel a Regular or Plain - Text Campaign after you send before all of your recipients receive it . This feature is included with MailChimp Pro .


def Func(arg_0,arg_1=None):
        """Set the autoindent flag, checking for readline support.

        If called with no arguments, it acts as a toggle."""

        if arg_1 != 0 and not arg_0.has_readline:
            if os.name == 'posix':
                warn("The auto-indent feature requires the readline library")
            arg_0.autoindent = 0
            return
        if arg_1 is None:
            arg_0.autoindent = not arg_0.autoindent
        else:
            arg_0.autoindent = arg_1

Set the autoindent flag checking for readline support .


def
Func
(
arg_0
,
arg_1
=
)
:
for
arg_2
in
arg_0
:
arg_3
=
Index
(
arg_2
)
try
:
if
not
arg_3
.
exists
(
)
:
logger
.
debug
(
"Creating Elasticsearch index: {0}"
.
format
(
arg_2
)
)
if
arg_1
is
:
arg_3
.
settings
(
number_of_shards
=
1
,
number_of_replicas
=
1
)
else
:
arg_3
.
settings
(
**
arg_1
)
arg_3
.
create
(
)
except
Exception
as
e
:
raise
ElasticsearchError
(
"Elasticsearch error: {0}"
.
format
(
e
.
__str__
(
)
)
)

def Func(arg_0, arg_1=None):
    """
    Create Elasticsearch indexes

    Args:
        names (list): A list of index names
        settings (dict): Index settings

    """
    for arg_2 in arg_0:
        arg_3 = Index(arg_2)
        try:
            if not arg_3.exists():
                logger.debug("Creating Elasticsearch index: {0}".format(arg_2))
                if arg_1 is None:
                    arg_3.settings(number_of_shards=1,
                                   number_of_replicas=1)
                else:
                    arg_3.settings(**arg_1)
                arg_3.create()
        except Exception as e:
            raise ElasticsearchError(
                "Elasticsearch error: {0}".format(e.__str__()))


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ ] arg_4 = 'projects/{}/models/{}' . format ( arg_1 , arg_2 ) arg_5 = arg_0 . _mlengine . projects ( ) . models ( ) . versions ( ) . list ( parent = arg_4 , pageSize = 100 ) arg_6 = arg_5 . execute ( ) arg_7 = arg_6 . get ( 'nextPageToken' , None ) arg_3 . extend ( arg_6 . get ( 'versions' , [ ] ) ) while arg_7 is not None : arg_8 = arg_0 . _mlengine . projects ( ) . models ( ) . versions ( ) . list ( parent = arg_4 , pageToken = arg_7 , pageSize = 100 ) arg_6 = arg_8 . execute ( ) arg_7 = arg_6 . get ( 'nextPageToken' , None ) arg_3 . extend ( arg_6 . get ( 'versions' , [ ] ) ) time . sleep ( 5 ) return arg_3

def Func(arg_0, arg_1, arg_2):
        """
        Lists all available versions of a model. Blocks until finished.
        """
        arg_3 = []
        arg_4 = 'projects/{}/models/{}'.format(
            arg_1, arg_2)
        arg_5 = arg_0._mlengine.projects().models().versions().list(
            parent=arg_4, pageSize=100)

        arg_6 = arg_5.execute()
        arg_7 = arg_6.get('nextPageToken', None)
        arg_3.extend(arg_6.get('versions', []))
        while arg_7 is not None:
            arg_8 = arg_0._mlengine.projects().models().versions().list(
                parent=arg_4,
                pageToken=arg_7,
                pageSize=100)
            arg_6 = arg_8.execute()
            arg_7 = arg_6.get('nextPageToken', None)
            arg_3.extend(arg_6.get('versions', []))
            time.sleep(5)
        return arg_3

Lists all available versions of a model . Blocks until finished .


return {
        k.lower().replace('cors_', ''): app_config.get(k)
        for k in CONFIG_OPTIONS
        if app_config.get(k) is not None
    }

def Func ( arg_0 = None ) : arg_1 = ( arg_0 or current_app ) arg_2 = getattr ( arg_1 , 'config' , { } ) return { arg_3 . lower ( ) . replace ( 'cors_' , '' ) : arg_2 . get ( arg_3 ) for arg_3 in CONFIG_OPTIONS if arg_2 . get ( arg_3 ) is not None }

def Func(arg_0=None):
    """Returns the dictionary of CORS specific app configurations."""
    arg_1 = (arg_0 or current_app)

    # In order to support blueprints which do not have a config attribute
    arg_2 = getattr(arg_1, 'config', {})

    return {
        arg_3.lower().replace('cors_', ''): arg_2.get(arg_3)
        for arg_3 in CONFIG_OPTIONS
        if arg_2.get(arg_3) is not None
    }

Returns the dictionary of CORS specific app configurations .


def Func(arg_0, arg_1):
        """Join prefixes & suffixes in cases of alternate phonetic values.

        Parameters
        ----------
        phonetic : str
            A Beider-Morse phonetic encoding

        Returns
        -------
        str
            A Beider-Morse phonetic code

        """
        arg_2 = arg_1.find('(')
        if arg_2 == -1:
            return ' ' + arg_0._phonetic_number(arg_1)

        arg_3 = arg_1[:arg_2]
        arg_2 += 1  # get past the (
        arg_4 = arg_1.find(')', arg_2)
        arg_5 = arg_1[arg_2:arg_4]
        arg_4 += 1  # get past the )
        arg_6 = arg_1[arg_4:]
        arg_7 = arg_5.split('|')
        arg_8 = ''
        for arg_9 in arg_7:
            arg_8 += arg_0.Func(arg_3 + arg_9 + arg_6)

        return arg_8

Join prefixes & suffixes in cases of alternate phonetic values .


def Func(arg_0, arg_1=None):
        """Actual closing code, both from manual close and errors."""
        arg_0._closing = True
        arg_0.pause_reading()
        arg_0._loop.call_soon(arg_0._call_connection_lost, arg_1)

Actual closing code both from manual close and errors .


def Func ( ) : if env . vm_type == EC2 : for arg_0 in get_all_running_ec2_instances ( ) : if env . host_string == arg_0 . public_dns_name : arg_1 = arg_0 . tags . get ( env . vm_name_tag ) return arg_1 else : raise NotImplementedError

def Func():
    """
    Retrieves the instance name associated with the current host string.
    """
    if env.vm_type == EC2:
        for arg_0 in get_all_running_ec2_instances():
            if env.host_string == arg_0.public_dns_name:
                arg_1 = arg_0.tags.get(env.vm_name_tag)
                return arg_1
    else:
        raise NotImplementedError

Retrieves the instance name associated with the current host string .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = requests . delete ( arg_0 . endpoint + arg_1 , arg_2 = arg_2 ) return arg_3 . text

def Func(arg_0, arg_1, arg_2):
        """
        Sends the DELETE request to the Route53 endpoint.

        :param str path: The path to tack on to the endpoint URL for
            the query.
        :param dict headers: A dict of headers to send with the request.
        :rtype: str
        :returns: The body of the response.
        """

        arg_3 = requests.delete(arg_0.endpoint + arg_1, arg_2=arg_2)
        return arg_3.text

Sends the DELETE request to the Route53 endpoint .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = parse_env_config ( arg_1 , arg_2 . environment ) arg_4 = arg_3 . get ( 'option_settings' , { } ) arg_5 = parse_option_settings ( arg_4 ) for arg_6 in arg_5 : out ( str ( arg_6 ) )

def Func(arg_0, arg_1, arg_2):
    """
    dump command dumps things
    """
    arg_3 = parse_env_config(arg_1, arg_2.environment)
    arg_4 = arg_3.get('option_settings', {})
    arg_5 = parse_option_settings(arg_4)
    for arg_6 in arg_5:
        out(str(arg_6))


(loc=None,
                    scale_tril=None,
                    scale_diag=None,
                    scale_identity_multiplier=None,
                    shape_hint=None,
                    validate_args=False,
                    assert_positive=False,
                    name=None)

return make_diag_scale(
      loc=loc,
      scale_diag=scale_diag,
      scale_identity_multiplier=scale_identity_multiplier,
      shape_hint=shape_hint,
      validate_args=validate_args,
      assert_positive=assert_positive,
      name=name)

def
Func
(
arg_0
=
,
arg_1
=
,
arg_2
=
,
arg_3
=
,
arg_4
=
,
arg_5
=
False
,
arg_6
=
False
,
arg_7
=
)
:
def
_maybe_attach_assertion
(
arg_8
)
:
if
not
arg_5
:
return
arg_8
if
arg_6
:
return
with_dependencies
(
[
assert_util
.
assert_positive
(
tf
.
linalg
.
diag_part
(
arg_8
)
,
message
=
"diagonal part must be positive"
)
,
]
,
arg_8
)
return
with_dependencies
(
[
assert_util
.
assert_none_equal
(
tf
.
linalg
.
diag_part
(
arg_8
)
,
tf
.
zeros
(
[
]
,
arg_8
.
dtype
)
,
message
=
"diagonal part must be non-zero"
)
,
]
,
arg_8
)
with
tf
.
name_scope
(
arg_7
or
"Func"
)
:
arg_9
=
dtype_util
.
common_dtype
(
[
arg_0
,
arg_1
,
arg_2
,
arg_3
]
,
preferred_dtype
=
tf
.
float32
)
arg_0
=
_convert_to_tensor
(
arg_0
,
arg_7
=
"loc"
,
arg_9
=
arg_9
)
arg_1
=
_convert_to_tensor
(
arg_1
,
arg_7
=
"scale_tril"
,
arg_9
=
arg_9
)
arg_2
=
_convert_to_tensor
(
arg_2
,
arg_7
=
"scale_diag"
,
arg_9
=
arg_9
)
arg_3
=
_convert_to_tensor
(
arg_3
,
arg_7
=
"scale_identity_multiplier"
,
arg_9
=
arg_9
)
if
arg_1
is
not
:
arg_1
=
tf
.
linalg
.
band_part
(
arg_1
,
1
,
0
)
arg_10
=
tf
.
linalg
.
diag_part
(
arg_1
)
if
arg_2
is
not
:
arg_10
+=
arg_2
if
arg_3
is
not
:
arg_10
+=
arg_3
[
...
,
tf
.
newaxis
]
arg_1
=
tf
.
linalg
.
set_diag
(
arg_1
,
arg_10
)
return
tf
.
linalg
.
LinearOperatorLowerTriangular
(
tril
=
_maybe_attach_assertion
(
arg_1
)
,
is_non_singular
=
True
,
is_self_adjoint
=
False
,
is_positive_definite
=
arg_6
)
return
make_diag_scale
(
arg_0
=
arg_0
,
arg_2
=
arg_2
,
arg_3
=
arg_3
,
arg_4
=
arg_4
,
arg_5
=
arg_5
,
arg_6
=
arg_6
,
arg_7
=
arg_7
)

def Func(arg_0=None,
                    arg_1=None,
                    arg_2=None,
                    arg_3=None,
                    arg_4=None,
                    arg_5=False,
                    arg_6=False,
                    arg_7=None):
  """Creates a LinearOperator representing a lower triangular matrix.

  Args:
    loc: Floating-point `Tensor`. This is used for inferring shape in the case
      where only `scale_identity_multiplier` is set.
    scale_tril: Floating-point `Tensor` representing the diagonal matrix.
      `scale_diag` has shape [N1, N2, ...  k, k], which represents a k x k lower
      triangular matrix. When `None` no `scale_tril` term is added to the
      LinearOperator. The upper triangular elements above the diagonal are
      ignored.
    scale_diag: Floating-point `Tensor` representing the diagonal matrix.
      `scale_diag` has shape [N1, N2, ...  k], which represents a k x k diagonal
      matrix. When `None` no diagonal term is added to the LinearOperator.
    scale_identity_multiplier: floating point rank 0 `Tensor` representing a
      scaling done to the identity matrix. When `scale_identity_multiplier =
      scale_diag = scale_tril = None` then `scale += IdentityMatrix`. Otherwise
      no scaled-identity-matrix is added to `scale`.
    shape_hint: scalar integer `Tensor` representing a hint at the dimension of
      the identity matrix when only `scale_identity_multiplier` is set.
    validate_args: Python `bool` indicating whether arguments should be checked
      for correctness.
    assert_positive: Python `bool` indicating whether LinearOperator should be
      checked for being positive definite.
    name: Python `str` name given to ops managed by this object.

  Returns:
    `LinearOperator` representing a lower triangular matrix.

  Raises:
    ValueError:  If only `scale_identity_multiplier` is set and `loc` and
      `shape_hint` are both None.
  """

  def _maybe_attach_assertion(arg_8):
    if not arg_5:
      return arg_8
    if arg_6:
      return with_dependencies([
          assert_util.assert_positive(
              tf.linalg.diag_part(arg_8), message="diagonal part must be positive"),
      ], arg_8)
    return with_dependencies([
        assert_util.assert_none_equal(
            tf.linalg.diag_part(arg_8),
            tf.zeros([], arg_8.dtype),
            message="diagonal part must be non-zero"),
    ], arg_8)

  with tf.name_scope(arg_7 or "Func"):

    arg_9 = dtype_util.common_dtype(
        [arg_0, arg_1, arg_2, arg_3],
        preferred_dtype=tf.float32)
    arg_0 = _convert_to_tensor(arg_0, arg_7="loc", arg_9=arg_9)
    arg_1 = _convert_to_tensor(arg_1, arg_7="scale_tril", arg_9=arg_9)
    arg_2 = _convert_to_tensor(arg_2, arg_7="scale_diag", arg_9=arg_9)
    arg_3 = _convert_to_tensor(
        arg_3,
        arg_7="scale_identity_multiplier",
        arg_9=arg_9)

  if arg_1 is not None:
    arg_1 = tf.linalg.band_part(arg_1, -1, 0)  # Zero out TriU.
    arg_10 = tf.linalg.diag_part(arg_1)
    if arg_2 is not None:
      arg_10 += arg_2
    if arg_3 is not None:
      arg_10 += arg_3[..., tf.newaxis]

    arg_1 = tf.linalg.set_diag(arg_1, arg_10)

    return tf.linalg.LinearOperatorLowerTriangular(
        tril=_maybe_attach_assertion(arg_1),
        is_non_singular=True,
        is_self_adjoint=False,
        is_positive_definite=arg_6)

  return make_diag_scale(
      arg_0=arg_0,
      arg_2=arg_2,
      arg_3=arg_3,
      arg_4=arg_4,
      arg_5=arg_5,
      arg_6=arg_6,
      arg_7=arg_7)

Creates a LinearOperator representing a lower triangular matrix .


def Func ( arg_0 ) : try : arg_1 = arg_0 . get_argument ( constants . PARAM_QUERY ) return arg_1 except tornado . web . MissingArgumentError as e : raise Exception ( e . log_message )

def Func(arg_0):
    """
    Helper function to get query argument.
    Raises exception if argument is missing.
    Returns the query argument.
    """
    try:
      arg_1 = arg_0.get_argument(constants.PARAM_QUERY)
      return arg_1
    except tornado.web.MissingArgumentError as e:
      raise Exception(e.log_message)

Helper function to get query argument . Raises exception if argument is missing . Returns the query argument .


def Func(arg_0):
    """Delete group."""
    arg_1 = Group.query.get_or_404(arg_0)

    if arg_1.can_edit(current_user):
        try:
            arg_1.Func()
        except Exception as e:
            flash(str(e), "error")
            return redirect(url_for(".index"))

        flash(_('Successfully removed group "%(group_name)s"',
                group_name=arg_1.name), 'success')
        return redirect(url_for(".index"))

    flash(
        _(
            'You cannot Func the group %(group_name)s',
            group_name=arg_1.name
        ),
        'error'
    )
    return redirect(url_for(".index"))


def Func(arg_0):
        """Send discover."""
        assert arg_0.client
        assert arg_0.current_state == STATE_INIT or \
            arg_0.current_state == STATE_SELECTING
        arg_1 = arg_0.client.gen_discover()
        sendp(arg_1)
        # FIXME:20 check that this is correct,: all or only discover?
        if arg_0.discover_attempts < MAX_ATTEMPTS_DISCOVER:
            arg_0.discover_attempts += 1
        arg_2 = gen_timeout_resend(arg_0.discover_attempts)
        arg_0.set_timeout(arg_0.current_state,
                         arg_0.timeout_selecting,
                         arg_2)


def Func ( arg_0 ) : def op ( * arg_1 , arg_2 = None ) -> RtlSignalBase : assert arg_1 , arg_1 arg_3 = None if arg_2 is not None : arg_1 = map ( arg_2 , arg_1 ) for arg_4 in arg_1 : if arg_3 is None : arg_3 = arg_4 else : arg_3 = arg_0 ( arg_3 , arg_4 ) return arg_3 return op

def Func(arg_0):
    """
    Function to create variadic operator function

    :param fn: function to perform binary operation
    """
    def op(*arg_1, arg_2=None) -> RtlSignalBase:
        """
        :param operands: variadic parameter of input uperands
        :param key: optional function applied on every operand
            before processing
        """
        assert arg_1, arg_1
        arg_3 = None
        if arg_2 is not None:
            arg_1 = map(arg_2, arg_1)

        for arg_4 in arg_1:
            if arg_3 is None:
                arg_3 = arg_4
            else:
                arg_3 = arg_0(arg_3, arg_4)
        return arg_3

    return op


(attachment: Attachment, text: str = None, speak: str = None,
                   input_hint: Union[InputHints, str] = None)

return attachment_activity(AttachmentLayoutTypes.list, [attachment], text, speak, input_hint)

def Func ( Func : arg_1 , arg_2 : arg_3 = None , arg_4 : arg_3 = None , arg_5 : arg_6 [ arg_7 , arg_3 ] = None ) : return attachment_activity ( AttachmentLayoutTypes . list , [ Func ] , arg_2 , arg_4 , arg_5 )

def Func(Func: arg_1, arg_2: arg_3 = None, arg_4: arg_3 = None,
                   arg_5: arg_6[arg_7, arg_3] = None):
        """
        Returns a single message activity containing an attachment.

        :Example:
        message = MessageFactory.attachment(CardFactory.hero_card(HeroCard(title='White T-Shirt',
                                                                  images=[CardImage(url='https://example.com/whiteShirt.jpg')],
                                                                  buttons=[CardAction(title='buy')])))
        await context.send_activity(message)

        :param attachment:
        :param text:
        :param speak:
        :param input_hint:
        :return:
        """
        return attachment_activity(AttachmentLayoutTypes.list, [Func], arg_2, arg_4, arg_5)

Returns a single message activity containing an attachment .


def Func(arg_0, arg_1):
        """Handle typing updates."""
        arg_0._typing_statuses[arg_1.user_id] = arg_1.status
        arg_0._update()


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
get_private_dir
(
create
=
True
)
arg_2
=
os
.
path
.
join
(
arg_1
,
"virtual_meta.yaml"
)
try
:
if
os
.
path
.
exists
(
arg_2
)
:
os
.
remove
(
arg_2
)
if
not
os
.
listdir
(
arg_1
)
:
os
.
rmdir
(
arg_1
)
except
:
logger
.
exception
(
"error while trying to remove %s or %s"
,
arg_2
,
arg_1
)

def Func(arg_0):
        """Removes the file with the virtual column etc, it does not change the current virtual columns etc."""
        arg_1 = arg_0.get_private_dir(create=True)
        arg_2 = os.path.join(arg_1, "virtual_meta.yaml")
        try:
            if os.path.exists(arg_2):
                os.remove(arg_2)
            if not os.listdir(arg_1):
                os.rmdir(arg_1)
        except:
            logger.exception("error while trying to remove %s or %s", arg_2, arg_1)

Removes the file with the virtual column etc it does not change the current virtual columns etc .


(store, institute_id, case_name, variant_id)

return {
        'institute': institute_obj,
        'case': case_obj,
        'variant': variant_obj,
        'overlapping_snvs': overlapping_snvs,
        'manual_rank_options': MANUAL_RANK_OPTIONS,
        'dismiss_variant_options': DISMISS_VARIANT_OPTIONS
    }

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 , arg_5 = institute_and_case ( arg_0 , arg_1 , arg_2 ) arg_6 = arg_0 . variant ( arg_3 ) variant_case ( arg_0 , arg_5 , arg_6 ) arg_6 [ 'callers' ] = callers ( arg_6 , category = 'str' ) arg_6 [ 'comments' ] = arg_0 . events ( arg_4 , case = arg_5 , arg_3 = arg_6 [ 'variant_id' ] , comments = True ) return { 'institute' : arg_4 , 'case' : arg_5 , 'variant' : arg_6 , 'overlapping_snvs' : overlapping_snvs , 'manual_rank_options' : MANUAL_RANK_OPTIONS , 'dismiss_variant_options' : DISMISS_VARIANT_OPTIONS }

def Func(arg_0, arg_1, arg_2, arg_3):
    """Pre-process an STR variant entry for detail page.

    Adds information to display variant

    Args:
        store(scout.adapter.MongoAdapter)
        institute_id(str)
        case_name(str)
        variant_id(str)

    Returns:
        detailed_information(dict): {
            'institute': <institute_obj>,
            'case': <case_obj>,
            'variant': <variant_obj>,
            'overlapping_snvs': <overlapping_snvs>,
            'manual_rank_options': MANUAL_RANK_OPTIONS,
            'dismiss_variant_options': DISMISS_VARIANT_OPTIONS
        }
        """

    arg_4, arg_5 = institute_and_case(arg_0, arg_1, arg_2)
    arg_6 =  arg_0.variant(arg_3)

    # fill in information for pilup view
    variant_case(arg_0, arg_5, arg_6)

    arg_6['callers'] = callers(arg_6, category='str')

    # variant_obj['str_ru']
    # variant_obj['str_repid']
    # variant_obj['str_ref']

    arg_6['comments'] = arg_0.events(arg_4, case=arg_5,
                                           arg_3=arg_6['variant_id'], comments=True)

    return {
        'institute': arg_4,
        'case': arg_5,
        'variant': arg_6,
        'overlapping_snvs': overlapping_snvs,
        'manual_rank_options': MANUAL_RANK_OPTIONS,
        'dismiss_variant_options': DISMISS_VARIANT_OPTIONS
    }

Pre - process an STR variant entry for detail page .


return (self.x2 - self.x1) * (self.y2 - self.y1) * (self.z2 - self.z1)

def Func(arg_0):
        """Box Func in m^3."""
        return (arg_0.x2 - arg_0.x1) * (arg_0.y2 - arg_0.y1) * (arg_0.z2 - arg_0.z1)


(job,
                              mode,
                              vcf,
                              ref_fasta, ref_fai, ref_dict,
                              annotations,
                              hapmap=None, omni=None, phase=None, dbsnp=None, mills=None,
                              max_gaussians=4,
                              unsafe_mode=False)

def Func(arg_0,
                              arg_1,
                              arg_2,
                              arg_3, arg_4, arg_5,
                              arg_6,
                              arg_7=None, arg_8=None, arg_9=None, arg_10=None, arg_11=None,
                              arg_12=4,
                              arg_13=False):
    """
    Runs either SNP or INDEL variant quality score recalibration using GATK VariantRecalibrator. Because the VQSR method
    models SNPs and INDELs differently, VQSR must be run separately for these variant types.

    :param JobFunctionWrappingJob job: passed automatically by Toil
    :param str mode: Determines variant recalibration mode (SNP or INDEL)
    :param str vcf: FileStoreID for input VCF file
    :param str ref_fasta: FileStoreID for reference genome fasta
    :param str ref_fai: FileStoreID for reference genome index file
    :param str ref_dict: FileStoreID for reference genome sequence dictionary file
    :param list[str] annotations: List of GATK variant annotations to filter on
    :param str hapmap: FileStoreID for HapMap resource file, required for SNP VQSR
    :param str omni: FileStoreID for Omni resource file, required for SNP VQSR
    :param str phase: FileStoreID for 1000G resource file, required for SNP VQSR
    :param str dbsnp: FilesStoreID for dbSNP resource file, required for SNP and INDEL VQSR
    :param str mills: FileStoreID for Mills resource file, required for INDEL VQSR
    :param int max_gaussians: Number of Gaussians used during training, default is 4
    :param bool unsafe_mode: If True, runs gatk UNSAFE mode: "-U ALLOW_SEQ_DICT_INCOMPATIBILITY"
    :return: FileStoreID for the variant recalibration table, tranche file, and plots file
    :rtype: tuple
    """
    arg_1 = arg_1.upper()

    arg_14 = {'genome.fa': arg_3,
              'genome.fa.fai': arg_4,
              'genome.dict': arg_5,
              'input.vcf': arg_2}

    # Refer to GATK documentation for description of recommended parameters:
    # https://software.broadinstitute.org/gatk/documentation/article?id=1259
    # https://software.broadinstitute.org/gatk/documentation/article?id=2805

    # This base command includes parameters for both INDEL and SNP VQSR.
    arg_15 = ['-T', 'VariantRecalibrator',
               '-R', 'genome.fa',
               '-input', 'input.vcf',
               '-tranche', '100.0',
               '-tranche', '99.9',
               '-tranche', '99.0',
               '-tranche', '90.0',
               '--maxGaussians', str(arg_12),
               '-recalFile', 'output.recal',
               '-tranchesFile', 'output.tranches',
               '-rscriptFile', 'output.plots.R']

    # Parameters and resource files for SNP VQSR.
    if arg_1 == 'SNP':
        arg_15.extend(
            ['-resource:hapmap,known=false,training=true,truth=true,prior=15.0', 'hapmap.vcf',
             '-resource:omni,known=false,training=true,truth=true,prior=12.0', 'omni.vcf',
             '-resource:dbsnp,known=true,training=false,truth=false,prior=2.0', 'dbsnp.vcf',
             '-resource:1000G,known=false,training=true,truth=false,prior=10.0', '1000G.vcf',
             '-mode', 'SNP'])

        arg_14['hapmap.vcf'] = arg_7
        arg_14['omni.vcf'] = arg_8
        arg_14['dbsnp.vcf'] = arg_10
        arg_14['1000G.vcf'] = arg_9

    # Parameters and resource files for INDEL VQSR
    elif arg_1 == 'INDEL':
        arg_15.extend(
            ['-resource:mills,known=false,training=true,truth=true,prior=12.0', 'mills.vcf',
             '-resource:dbsnp,known=true,training=false,truth=false,prior=2.0', 'dbsnp.vcf',
             '-mode', 'INDEL'])

        arg_14['mills.vcf'] = arg_11
        arg_14['dbsnp.vcf'] = arg_10

    else:
        raise ValueError('Variant filter modes can be SNP or INDEL, got %s' % arg_1)

    for arg_16 in arg_6:
        arg_15.extend(['-an', arg_16])

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

    # Delay reading in files until function is configured
    arg_17 = arg_0.fileStore.getLocalTempDir()
    for arg_18, arg_19 in arg_14.iteritems():
        arg_0.fileStore.readGlobalFile(arg_19, os.path.join(arg_17, arg_18))

    arg_0.fileStore.logToMaster('Running GATK VariantRecalibrator on {mode}s using the following annotations:\n'
                              '{annotations}'.format(arg_1=arg_1, arg_6='\n'.join(arg_6)))

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

    arg_21 = arg_0.fileStore.writeGlobalFile(os.path.join(arg_17, 'output.recal'))
    arg_22 = arg_0.fileStore.writeGlobalFile(os.path.join(arg_17, 'output.tranches'))
    arg_23 = arg_0.fileStore.writeGlobalFile(os.path.join(arg_17, 'output.plots.R'))
    return arg_21, arg_22, arg_23

Runs either SNP or INDEL variant quality score recalibration using GATK VariantRecalibrator . Because the VQSR method models SNPs and INDELs differently VQSR must be run separately for these variant types .


def Func(arg_0):
        """Converts a unit-length quaternion to a sequence
        of ZYZ Euler angles.

        Returns:
            ndarray: Array of Euler angles.
        """
        arg_1 = arg_0.to_matrix()
        arg_2 = np.zeros(3, dtype=float)
        if arg_1[2, 2] < 1:
            if arg_1[2, 2] > -1:
                arg_2[0] = math.atan2(arg_1[1, 2], arg_1[0, 2])
                arg_2[1] = math.acos(arg_1[2, 2])
                arg_2[2] = math.atan2(arg_1[2, 1], -arg_1[2, 0])
            else:
                arg_2[0] = -math.atan2(arg_1[1, 0], arg_1[1, 1])
                arg_2[1] = np.pi
        else:
            arg_2[0] = math.atan2(arg_1[1, 0], arg_1[1, 1])
        return arg_2

Converts a unit - length quaternion to a sequence of ZYZ Euler angles .


(
            self,
            method,
            url,
            headers=None,
            params=None,
            data=None,
            files=None,
            timeout=None,
    )

def Func(
            arg_0,
            arg_1,
            arg_2,
            arg_3=None,
            arg_4=None,
            arg_5=None,
            arg_6=None,
            arg_7=None,
    ):
        """ Call API.

        This returns object containing data, with error details if applicable.

        Args:
            method (str): The HTTP method to use.
            url (str): Resource location relative to the base URL.
            headers (dict or None): Extra request headers to set.
            params (dict or None): Query-string parameters.
            data (dict or None): Request body contents for POST or PUT requests.
            files (dict or None: Files to be passed to the request.
            timeout (int): Maximum time before timing out.

        Returns:
            ResultParser or ErrorParser.
        """
        arg_1 = arg_1.upper()
        arg_3 = deepcopy(arg_3) or {}
        arg_3['Accept'] = arg_0.accept_type
        arg_4 = deepcopy(arg_4) or {}
        arg_5 = arg_5 or {}
        arg_6 = arg_6 or {}

        if arg_0.username and arg_0.api_key:
            arg_4.update(arg_0.get_credentials())

        arg_2 = urljoin(arg_0.base_url, arg_2)

        arg_8 = requests.request(
            arg_1,
            arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_6=arg_6,
            arg_5=arg_5,
            arg_7=arg_7,
        )

        return arg_8, arg_8.status_code


(self, filename, start_frame=0, max_frames=int(1e300))

def Func(arg_0, arg_1, arg_2=0, arg_3=arg_4(1e300)):
        '''Load marker data from a C3D file.

        The file will be imported using the c3d module, which must be installed
        to use this method. (``pip install c3d``)

        Parameters
        ----------
        filename : str
            Name of the C3D file to load.
        start_frame : int, optional
            Discard the first N frames. Defaults to 0.
        max_frames : int, optional
            Maximum number of frames to load. Defaults to loading all frames.
        '''
        import c3d

        with open(arg_1, 'rb') as handle:
            arg_5 = c3d.Reader(handle)

            logging.info('world frame rate %s, marker frame rate %s',
                         1 / arg_0.world.dt, arg_5.point_rate)

            # set up a map from marker label to index in the data stream.
            arg_0.channels = arg_0._map_labels_to_channels([
                s.strip() for s in arg_5.point_labels])

            # read the actual c3d data into a numpy array.
            arg_7 = []
            for arg_8, (arg_9, arg_10, arg_9) in enumerate(arg_5.read_frames()):
                if arg_8 >= arg_2:
                    arg_7.append(arg_10[:, [0, 1, 2, 4]])
                if len(arg_7) > arg_3:
                    break
            arg_0.data = np.array(arg_7)

            # scale the data to meters -- mm is a very common C3D unit.
            if arg_5.get('POINT:UNITS').string_value.strip().lower() == 'mm':
                logging.info('scaling point data from mm to m')
                arg_0.data[:, :, :3] /= 1000.

        logging.info('%s: loaded marker data %s', arg_1, arg_0.data.shape)
        arg_0.process_data()
        arg_0.create_bodies()


return constant_time_compare(sig, self.get_signature(key, value))

def Func(arg_0, arg_1, arg_2, arg_3):
        """Verifies the given signature matches the expected signature"""
        return constant_time_compare(arg_3, arg_0.get_signature(arg_1, arg_2))


def Func(arg_0,arg_1):
		'''It will download file specified by url using wget utility of linux '''
		arg_2=arg_1.split('/')[-1]
		print 'Downloading file %s '%arg_2
		arg_3='wget -c --read-timeout=50 --tries=3 -q --show-progress --no-check-certificate '
		arg_1='"'+arg_1+'"'
		arg_3=arg_3+arg_1
		os.system(arg_3)


def Func(arg_0, arg_1):
        """Construct an `LsstLatexDoc` instance by Funcing and parsing the
        LaTeX source.

        Parameters
        ----------
        root_tex_path : `str`
            Path to the LaTeX source on the filesystem. For multi-file LaTeX
            projects this should be the path to the root document.

        Notes
        -----
        This method implements the following pipeline:

        1. `lsstprojectmeta.tex.normalizer.Func_tex_file`
        2. `lsstprojectmeta.tex.scraper.get_macros`
        3. `lsstprojectmeta.tex.normalizer.replace_macros`

        Thus ``input`` and ``includes`` are resolved along with simple macros.
        """
        # Read and normalize the TeX source, replacing macros with content
        arg_2 = os.path.dirname(arg_1)
        arg_3 = Func_tex_file(arg_1)
        arg_4 = get_macros(arg_3)
        arg_3 = replace_macros(arg_3, arg_4)
        return arg_0(arg_3, arg_2=arg_2)

Construct an `LsstLatexDoc` instance by reading and parsing the
        LaTeX source.

        Parameters
        ----------
        root_tex_path : `str`
            Path to the LaTeX source on the filesystem. For multi-file LaTeX
            projects this should be the path to the root document.

        Notes
        -----
        This method implements the following pipeline:

        1. `lsstprojectmeta.tex.normalizer.read_tex_file`
        2. `lsstprojectmeta.tex.scraper.get_macros`
        3. `lsstprojectmeta.tex.normalizer.replace_macros`

        Thus ``input`` and ``includes`` are resolved along with simple macros.

Construct an LsstLatexDoc instance by reading and parsing the LaTeX source .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_2
==
'NHWC'
:
return
arg_0
*
arg_1
elif
arg_2
==
'NCHW'
:
return
arg_0
*
_to_channel_first_bias
(
arg_1
)
else
:
raise
ValueError
(
'invalid data_format: %s'
%
arg_2
)

def Func(arg_0, arg_1, arg_2):
    """The multiplication counter part of tf.nn.bias_add."""
    if arg_2 == 'NHWC':
        return arg_0 * arg_1
    elif arg_2 == 'NCHW':
        return arg_0 * _to_channel_first_bias(arg_1)
    else:
        raise ValueError('invalid data_format: %s' % arg_2)

The multiplication counter part of tf . nn . bias_add .


def Func(arg_0, arg_1, arg_2, arg_3):
        """Get the context to render this widget with."""
        if arg_0.has_template_widget_rendering:
            arg_4 = super(ClearableFileInputWithImagePreview, arg_0).Func(arg_1, arg_2, arg_3)
        else:
            # Build the context manually.
            arg_4 = {}
            arg_4['widget'] = {
                'name': arg_1,
                'is_hidden': arg_0.is_hidden,
                'required': arg_0.is_required,
                'value': arg_0._format_value(arg_2),
                'attrs': arg_0.build_attrs(arg_0.attrs, arg_3),
                'template_name': arg_0.template_name,
                'type': arg_0.input_type,
            }

        # It seems Django 1.11's ClearableFileInput doesn't add everything to the 'widget' key, so we can't use it
        # in MultiWidget. Add it manually here.
        arg_5 = arg_0.clear_checkbox_name(arg_1)
        arg_6 = arg_0.clear_checkbox_id(arg_5)

        arg_4['widget'].update({
            'checkbox_name': arg_5,
            'checkbox_id': arg_6,
            'is_initial': arg_0.is_initial(arg_2),
            'input_text': arg_0.input_text,
            'initial_text': arg_0.initial_text,
            'clear_checkbox_label': arg_0.clear_checkbox_label,
        })

        if arg_2 and hasattr(arg_2, "url"):
            arg_4['widget'].update({
                'hidden_field_id': arg_0.get_hidden_field_id(arg_1),
                'point_stage_id': arg_0.get_point_stage_id(arg_1),
                'ppoi_id': arg_0.get_ppoi_id(arg_1),
                'sized_url': arg_0.get_sized_url(arg_2),
                'image_preview_id': arg_0.image_preview_id(arg_1),
            })

        return arg_4

Get the context to render this widget with .


def
Func
(
arg_0
)
:
print
"-"
*
80
+
"Computing the SDR"
+
"-"
*
80
arg_0
.
sp
.
compute
(
arg_0
.
inputArray
,
True
,
arg_0
.
activeArray
)
print
arg_0
.
activeArray
.
nonzero
(
)

def Func(arg_0):
    """Run the spatial pooler with the input vector"""

    print "-" * 80 + "Computing the SDR" + "-" * 80

    #activeArray[column]=1 if column is active after spatial pooling
    arg_0.sp.compute(arg_0.inputArray, True, arg_0.activeArray)

    print arg_0.activeArray.nonzero()


def Func ( arg_0 ) : def _is_dagnode_parameterized ( arg_1 ) : return any ( isinstance ( arg_2 , Parameter ) for arg_2 in arg_1 . op . params ) arg_3 = [ ] for arg_4 in arg_0 : arg_5 = groupby ( arg_4 , _is_dagnode_parameterized ) for arg_6 , arg_7 in arg_5 : if not arg_6 : arg_3 . append ( list ( arg_7 ) ) return arg_3

def Func(arg_0):
    """Finds runs containing parameterized gates and splits them into sequential
    runs excluding the parameterized gates.
    """

    def _is_dagnode_parameterized(arg_1):
        return any(isinstance(arg_2, Parameter) for arg_2 in arg_1.op.params)

    arg_3 = []
    for arg_4 in arg_0:
        arg_5 = groupby(arg_4, _is_dagnode_parameterized)

        for arg_6, arg_7 in arg_5:
            if not arg_6:
                arg_3.append(list(arg_7))

    return arg_3

Finds runs containing parameterized gates and splits them into sequential runs excluding the parameterized gates .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_2
<=
0
:
raise
ValueError
(
"n must be strictly positive"
)
arg_3
=
numpy
.
linspace
(
arg_0
,
arg_1
,
arg_2
)
arg_4
=
(
1.
arg_3
**
2.
)
*
(
2.
/
(
numpy
.
sqrt
(
3.
)
*
pi
**
0.25
)
)
*
numpy
.
exp
(
arg_3
**
2
/
2.
)
return
arg_4

def Func(arg_0, arg_1, arg_2):
    r"""Generate the Func hat wavelet

    The Mexican wavelet is:

    .. math:: w[x] = \cos{5x}  \exp^{-x^2/2}

    :param lb: lower bound
    :param ub: upper bound
    :param int n: waveform data samples
    :return: the waveform

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

        from spectrum import Func
        from pylab import plot
        plot(Func(0, 10, 100))

    """
    if arg_2 <= 0:
        raise ValueError("n must be strictly positive")

    arg_3 = numpy.linspace(arg_0, arg_1, arg_2)
    arg_4 = (1.-arg_3**2.) * (2./(numpy.sqrt(3.)*pi**0.25)) * numpy.exp(-arg_3**2/2.)
    return arg_4

r"""Generate the mexican hat wavelet

    The Mexican wavelet is:

    .. math:: w[x] = \cos{5x}  \exp^{-x^2/2}

    :param lb: lower bound
    :param ub: upper bound
    :param int n: waveform data samples
    :return: the waveform

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

        from spectrum import mexican
        from pylab import plot
        plot(mexican(0, 10, 100))


def
Func
(
arg_0
,
arg_1
)
:
if
isinstance
(
arg_0
,
str
)
:
arg_0
=
PrivateKey
(
arg_0
)
else
:
arg_0
=
PrivateKey
(
repr
(
arg_0
)
)
arg_2
=
repr
(
arg_0
)
arg_3
=
format
(
arg_0
.
bitcoin
.
address
,
"BTC"
)
arg_4
=
_bytes
(
arg_3
)
arg_5
=
hashlib
.
sha256
(
hashlib
.
sha256
(
arg_4
)
.
digest
(
)
)
.
digest
(
)
[
0
:
4
]
if
SCRYPT_MODULE
==
"scrypt"
:
arg_6
=
scrypt
.
hash
(
arg_1
,
arg_5
,
16384
,
8
,
8
)
elif
SCRYPT_MODULE
==
"pylibscrypt"
:
arg_6
=
scrypt
.
scrypt
(
bytes
(
arg_1
,
"utf-8"
)
,
arg_5
,
16384
,
8
,
8
)
else
:
raise
ValueError
(
"No scrypt module loaded"
)
(
arg_7
,
arg_8
)
=
(
arg_6
[
:
32
]
,
arg_6
[
32
:
]
)
arg_9
=
AES
.
new
(
arg_8
,
AES
.
MODE_ECB
)
arg_10
=
_Func_xor
(
arg_2
[
:
32
]
,
arg_7
[
:
16
]
,
arg_9
)
arg_11
=
_Func_xor
(
arg_2
[
32
:
]
,
arg_7
[
16
:
]
,
arg_9
)
arg_12
=
b"\x01"
+
b"\x42"
+
b"\xc0"
+
arg_5
+
arg_10
+
arg_11
arg_13
=
hashlib
.
sha256
(
hashlib
.
sha256
(
arg_12
)
.
digest
(
)
)
.
digest
(
)
[
:
4
]
arg_14
=
hexlify
(
arg_12
+
arg_13
)
.
decode
(
"ascii"
)
return
Base58
(
arg_14
)

def Func(arg_0, arg_1):
    """ BIP0038 non-ec-multiply Funcion. Returns BIP0038 Funced privkey.

    :param privkey: Private key
    :type privkey: Base58
    :param str passphrase: UTF-8 encoded passphrase for Funcion
    :return: BIP0038 non-ec-multiply Funced wif key
    :rtype: Base58

    """
    if isinstance(arg_0, str):
        arg_0 = PrivateKey(arg_0)
    else:
        arg_0 = PrivateKey(repr(arg_0))

    arg_2 = repr(arg_0)  # hex
    arg_3 = format(arg_0.bitcoin.address, "BTC")
    arg_4 = _bytes(arg_3)
    arg_5 = hashlib.sha256(hashlib.sha256(arg_4).digest()).digest()[0:4]
    if SCRYPT_MODULE == "scrypt":  # pragma: no cover
        arg_6 = scrypt.hash(arg_1, arg_5, 16384, 8, 8)
    elif SCRYPT_MODULE == "pylibscrypt":  # pragma: no cover
        arg_6 = scrypt.scrypt(bytes(arg_1, "utf-8"), arg_5, 16384, 8, 8)
    else:  # pragma: no cover
        raise ValueError("No scrypt module loaded")  # pragma: no cover
    (arg_7, arg_8) = (arg_6[:32], arg_6[32:])
    arg_9 = AES.new(arg_8, AES.MODE_ECB)
    arg_10 = _Func_xor(arg_2[:32], arg_7[:16], arg_9)
    arg_11 = _Func_xor(arg_2[32:], arg_7[16:], arg_9)
    " flag byte is forced 0xc0 because Graphene only uses compressed keys "
    arg_12 = b"\x01" + b"\x42" + b"\xc0" + arg_5 + arg_10 + arg_11
    " Checksum "
    arg_13 = hashlib.sha256(hashlib.sha256(arg_12).digest()).digest()[:4]
    arg_14 = hexlify(arg_12 + arg_13).decode("ascii")
    return Base58(arg_14)

BIP0038 non-ec-multiply encryption. Returns BIP0038 encrypted privkey.

    :param privkey: Private key
    :type privkey: Base58
    :param str passphrase: UTF-8 encoded passphrase for encryption
    :return: BIP0038 non-ec-multiply encrypted wif key
    :rtype: Base58

BIP0038 non - ec - multiply encryption . Returns BIP0038 encrypted privkey .


def Func ( arg_0 , arg_1 = 'drop' ) : arg_2 = 'strict' if arg_1 == 'drop' else arg_1 arg_3 = [ ] for arg_4 in arg_0 . group_transactions ( ) : if arg_4 [ 0 ] . value < 0 : continue arg_5 = TryteString ( b'' ) for arg_6 in arg_4 : arg_5 += arg_6 . signature_message_fragment if arg_5 : try : arg_3 . append ( arg_5 . decode ( arg_2 ) ) except ( TrytesDecodeError , UnicodeDecodeError ) : if arg_1 != 'drop' : raise return arg_3

def Func(arg_0, arg_1='drop'):
        # type: (Text) -> List[Text]
        """
        Attempts to decipher encoded messages from the transactions in
        the bundle.

        :param errors:
            How to handle trytes that can't be converted, or bytes that
            can't be decoded using UTF-8:

            'drop'
                Drop the trytes from the result.

            'strict'
                Raise an exception.

            'replace'
                Replace with a placeholder character.

            'ignore'
                Omit the invalid tryte/byte sequence.
        """
        arg_2 = 'strict' if arg_1 == 'drop' else arg_1

        arg_3 = []

        for arg_4 in arg_0.group_transactions():
            # Ignore inputs.
            if arg_4[0].value < 0:
                continue

            arg_5 = TryteString(b'')
            for arg_6 in arg_4:
                arg_5 += arg_6.signature_message_fragment

            if arg_5:
                try:
                    arg_3.append(arg_5.decode(arg_2))
                except (TrytesDecodeError, UnicodeDecodeError):
                    if arg_1 != 'drop':
                        raise

        return arg_3

Attempts to decipher encoded messages from the transactions in the bundle .


(process_data, para_meter, scale, steady_time)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
arg_1
[
'filename'
]
+
'_steady.png'
plt
.
figure
(
figsize
=
(
4
*
arg_2
,
2.5
*
arg_2
)
)
for
arg_5
in
arg_0
.
keys
(
)
:
if
len
(
arg_0
[
arg_5
]
)
<
arg_3
:
arg_3
=
len
(
arg_0
[
arg_5
]
)
plt
.
scatter
(
arg_0
[
arg_5
]
[
1
*
arg_3
:
,
0
]
,
arg_0
[
arg_5
]
[
1
*
arg_3
:
,
1
]
,
label
=
str
(
arg_5
)
,
s
=
10
)
arg_6
=
np
.
mean
(
arg_0
[
arg_5
]
[
1
*
arg_3
:
,
1
]
)
arg_7
=
arg_6
*
(
1
+
0.05
)
arg_8
=
arg_6
*
(
1
+
0.1
)
arg_9
=
arg_6
*
(
1
0.05
)
arg_10
=
arg_6
*
(
1
0.1
)
plt
.
plot
(
arg_0
[
arg_5
]
[
1
*
arg_3
:
,
0
]
,
[
arg_6
]
*
arg_3
,
'b'
)
plt
.
plot
(
arg_0
[
arg_5
]
[
1
*
arg_3
:
,
0
]
,
[
arg_7
]
*
arg_3
,
'g'
)
plt
.
plot
(
arg_0
[
arg_5
]
[
1
*
arg_3
:
,
0
]
,
[
arg_9
]
*
arg_3
,
'g'
)
plt
.
plot
(
arg_0
[
arg_5
]
[
1
*
arg_3
:
,
0
]
,
[
arg_8
]
*
arg_3
,
'r'
)
plt
.
plot
(
arg_0
[
arg_5
]
[
1
*
arg_3
:
,
0
]
,
[
arg_10
]
*
arg_3
,
'r'
)
plt
.
title
(
arg_1
[
'title'
]
+
'(steady)'
)
plt
.
xlabel
(
arg_1
[
'x_axis_name'
]
+
'(steady)'
)
plt
.
ylabel
(
arg_1
[
'y_axis_name'
]
+
'(steady)'
)
plt
.
legend
(
loc
=
'upper left'
)
plt
.
savefig
(
arg_4
)
return
arg_4

def Func(arg_0, arg_1, arg_2, arg_3):
    """ generate rate steady"""
    arg_4 = arg_1['filename'] + '_steady.png'
    plt.figure(figsize=(4 * arg_2, 2.5 * arg_2))
    for arg_5 in arg_0.keys():
        if len(arg_0[arg_5]) < arg_3:
            arg_3 = len(arg_0[arg_5])
        plt.scatter(arg_0[arg_5][-1 * arg_3:, 0],
                    arg_0[arg_5][-1 * arg_3:, 1], label=str(arg_5), s=10)
        arg_6 = np.mean(arg_0[arg_5][-1 * arg_3:, 1])
        arg_7 = arg_6 * (1 + 0.05)
        arg_8 = arg_6 * (1 + 0.1)
        arg_9 = arg_6 * (1 - 0.05)
        arg_10 = arg_6 * (1 - 0.1)
        plt.plot(arg_0[arg_5][-1 * arg_3:, 0], [arg_6] * arg_3, 'b')
        plt.plot(arg_0[arg_5][-1 * arg_3:, 0], [arg_7] * arg_3, 'g')
        plt.plot(arg_0[arg_5][-1 * arg_3:, 0],
                 [arg_9] * arg_3, 'g')
        plt.plot(arg_0[arg_5][-1 * arg_3:, 0], [arg_8] * arg_3, 'r')
        plt.plot(arg_0[arg_5][-1 * arg_3:, 0],
                 [arg_10] * arg_3, 'r')
    plt.title(arg_1['title'] + '(steady)')
    plt.xlabel(arg_1['x_axis_name'] + '(steady)')
    plt.ylabel(arg_1['y_axis_name'] + '(steady)')
    plt.legend(loc='upper left')
    plt.savefig(arg_4)
    return arg_4


def Func ( arg_0 ) : if "wsgidav.conditions.if" in arg_0 : return if "HTTP_IF" not in arg_0 : arg_0 [ "wsgidav.conditions.if" ] = None arg_0 [ "wsgidav.ifLockTokenList" ] = [ ] return arg_1 = arg_0 [ "HTTP_IF" ] . strip ( ) if not arg_1 . startswith ( "<" ) : arg_1 = "<*>" + arg_1 arg_2 = dict ( [ ] ) arg_3 = [ ] arg_4 = "*" for ( arg_5 , arg_6 , arg_7 , arg_8 ) in reIfSeparator . findall ( arg_1 ) : if arg_5 != "" : arg_4 = arg_6 else : arg_9 = [ ] arg_10 = True for arg_11 in reIfTagListContents . findall ( arg_8 ) : if arg_11 . upper ( ) != "NOT" : if arg_11 . startswith ( "[" ) : arg_9 . append ( ( arg_10 , "entity" , arg_11 . strip ( '"[]' ) ) ) else : arg_9 . append ( ( arg_10 , "locktoken" , arg_11 . strip ( "<>" ) ) ) arg_3 . append ( arg_11 . strip ( "<>" ) ) arg_10 = arg_11 . upper ( ) != "NOT" if arg_4 in arg_2 : arg_12 = arg_2 [ arg_4 ] else : arg_12 = [ ] arg_2 [ arg_4 ] = arg_12 arg_12 . append ( arg_9 ) arg_0 [ "wsgidav.conditions.if" ] = arg_2 arg_0 [ "wsgidav.ifLockTokenList" ] = arg_3 _logger . debug ( "Func\n{}" . format ( pformat ( arg_2 ) ) ) return

def Func(arg_0):
    """Parse HTTP_IF header into a dictionary and lists, and cache the result.

    @see http://www.webdav.org/specs/rfc4918.html#HEADER_If
    """
    if "wsgidav.conditions.if" in arg_0:
        return

    if "HTTP_IF" not in arg_0:
        arg_0["wsgidav.conditions.if"] = None
        arg_0["wsgidav.ifLockTokenList"] = []
        return

    arg_1 = arg_0["HTTP_IF"].strip()
    if not arg_1.startswith("<"):
        arg_1 = "<*>" + arg_1

    arg_2 = dict([])
    arg_3 = []

    arg_4 = "*"
    for (arg_5, arg_6, arg_7, arg_8) in reIfSeparator.findall(
        arg_1
    ):
        if arg_5 != "":
            arg_4 = arg_6
        else:
            arg_9 = []
            arg_10 = True
            for arg_11 in reIfTagListContents.findall(arg_8):
                if arg_11.upper() != "NOT":
                    if arg_11.startswith("["):
                        arg_9.append(
                            (arg_10, "entity", arg_11.strip('"[]'))
                        )
                    else:
                        arg_9.append(
                            (arg_10, "locktoken", arg_11.strip("<>"))
                        )
                        arg_3.append(arg_11.strip("<>"))
                arg_10 = arg_11.upper() != "NOT"

            if arg_4 in arg_2:
                arg_12 = arg_2[arg_4]
            else:
                arg_12 = []
                arg_2[arg_4] = arg_12
            arg_12.append(arg_9)

    arg_0["wsgidav.conditions.if"] = arg_2
    arg_0["wsgidav.ifLockTokenList"] = arg_3
    _logger.debug("Func\n{}".format(pformat(arg_2)))
    return

Parse HTTP_IF header into a dictionary and lists and cache the result .


def Func(arg_0):
        """Enables GPIO interrupts."""
        try:
            bring_gpio_interrupt_into_userspace()
            set_gpio_interrupt_edge()
        except Timeout as e:
            raise InterruptEnableException(
                "There was an error bringing gpio%d into userspace. %s" %
                (GPIO_INTERRUPT_PIN, e.message)
            )


def Func(arg_0):
        """ Update internal counters """
        arg_0._ntypes = arg_0.count_types()
        arg_0._nvars = arg_0.count_vars()
        arg_0._nfuns = arg_0.count_funs()


def Func(arg_0, arg_1, arg_2=4):
        """
        Set the index buffer for this VAO

        Args:
            buffer: ``moderngl.Buffer``, ``numpy.array`` or ``bytes``

        Keyword Args:
            index_element_size (int): Byte size of each element. 1, 2 or 4
        """
        if not type(arg_1) in [moderngl.Buffer, numpy.ndarray, bytes]:
            raise VAOError("buffer parameter must be a moderngl.Buffer, numpy.ndarray or bytes instance")

        if isinstance(arg_1, numpy.ndarray):
            arg_1 = arg_0.ctx.buffer(arg_1.tobytes())

        if isinstance(arg_1, bytes):
            arg_1 = arg_0.ctx.buffer(data=arg_1)

        arg_0._Func = arg_1
        arg_0._index_element_size = arg_2


def Func ( arg_0 , * arg_1 ) : arg_2 = argpack ( arg_1 ) arg_3 = arg_0 . shape isFuncable ( arg_2 , arg_3 ) if arg_2 == arg_3 : return arg_0 . _barray def f ( arg_4 ) : return arg_4 . Func ( arg_2 ) arg_5 = arg_0 . _barray . _rdd . mapValues ( f ) arg_6 = arg_0 . _barray . keys . shape + arg_2 return BoltArraySpark ( arg_5 , arg_1 = arg_6 ) . __finalize__ ( arg_0 . _barray )

def Func(arg_0, *arg_1):
        """
        Reshape just the values of a BoltArraySpark, returning a
        new BoltArraySpark.

        Parameters
        ----------
        shape : tuple
              New proposed axes.
        """
        arg_2 = argpack(arg_1)
        arg_3 = arg_0.shape
        isFuncable(arg_2, arg_3)

        if arg_2 == arg_3:
            return arg_0._barray

        def f(arg_4):
            return arg_4.Func(arg_2)

        arg_5 = arg_0._barray._rdd.mapValues(f)
        arg_6 = arg_0._barray.keys.shape + arg_2

        return BoltArraySpark(arg_5, arg_1=arg_6).__finalize__(arg_0._barray)

Reshape just the values of a BoltArraySpark returning a new BoltArraySpark .


return self._get_stats_table('totals', kind=kind, summary=summary)

def Func ( arg_0 , arg_1 = 'R' , arg_2 = False ) : return arg_0 . _get_stats_table ( 'totals' , arg_1 = arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1='R', arg_2=False):
        """Returns a DataFrame of total box score statistics by season."""
        return arg_0._get_stats_table('totals', arg_1=arg_1, arg_2=arg_2)

Returns a DataFrame of total box score statistics by season .


(self, traj, network, current_subrun, subrun_list, network_dict)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
)
:
if
len
(
arg_4
)
==
0
:
arg_6
=
arg_1
.
results
.
monitors
.
spikes_e
arg_7
=
arg_1
.
parameters
.
analysis
.
statistics
.
time_window
arg_8
=
arg_1
.
parameters
.
simulation
.
durations
.
initial_run
arg_9
=
arg_8
+
arg_1
.
parameters
.
simulation
.
durations
.
measurement_run
arg_10
=
arg_1
.
parameters
.
analysis
.
statistics
.
neuron_ids
arg_11
=
arg_0
.
_compute_mean_fano_factor
(
arg_10
,
arg_6
,
arg_7
,
arg_8
,
arg_9
)
arg_1
.
f_add_result
(
'statistics.mean_fano_factor'
,
arg_11
,
comment
=
'Average Fano '
'Factor over all '
'exc neurons'
)
print
(
'R_ee: %f, Mean FF: %f'
%
(
arg_1
.
R_ee
,
arg_11
)
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5):
        """Calculates average Fano Factor of a network.

        :param traj:

            Trajectory container

            Expects:

            `results.monitors.spikes_e`: Data from SpikeMonitor for excitatory neurons

            Adds:

            `results.statistics.mean_fano_factor`: Average Fano Factor

        :param network:

            The BRIAN network

        :param current_subrun:

            BrianParameter

        :param subrun_list:

            Upcoming subruns, analysis is only performed if subruns is empty,
            aka the final subrun has finished.

        :param network_dict:

            Dictionary of items shared among componetns

        """
        #Check if we finished all subruns
        if len(arg_4)==0:
            arg_6 = arg_1.results.monitors.spikes_e

            arg_7 = arg_1.parameters.analysis.statistics.time_window
            arg_8 = arg_1.parameters.simulation.durations.initial_run
            arg_9 = arg_8+arg_1.parameters.simulation.durations.measurement_run
            arg_10 = arg_1.parameters.analysis.statistics.neuron_ids

            arg_11 = arg_0._compute_mean_fano_factor(
                arg_10, arg_6, arg_7, arg_8, arg_9)

            arg_1.f_add_result('statistics.mean_fano_factor', arg_11, comment='Average Fano '
                                                                      'Factor over all '
                                                                      'exc neurons')

            print('R_ee: %f, Mean FF: %f' % (arg_1.R_ee, arg_11))

Calculates average Fano Factor of a network .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . visible if arg_0 . options [ "text" ] : if isregex ( arg_0 . options [ "text" ] ) : arg_3 = arg_0 . options [ "text" ] elif arg_0 . exact_text is True : arg_3 = re . compile ( r"\A{}\Z" . format ( re . escape ( arg_0 . options [ "text" ] ) ) ) else : arg_3 = toregex ( arg_0 . options [ "text" ] ) arg_4 = normalize_text ( arg_1 . all_text if arg_2 == "all" else arg_1 . visible_text ) if not arg_3 . search ( arg_4 ) : return False if isinstance ( arg_0 . exact_text , ( bytes_ , str_ ) ) : arg_3 = re . compile ( r"\A{}\Z" . format ( re . escape ( arg_0 . exact_text ) ) ) arg_4 = normalize_text ( arg_1 . all_text if arg_2 == "all" else arg_1 . visible_text ) if not arg_3 . search ( arg_4 ) : return False if arg_2 == "visible" : if not arg_1 . visible : return False elif arg_2 == "hidden" : if arg_1 . visible : return False for arg_5 , arg_6 in iter ( arg_0 . _node_filters . items ( ) ) : if arg_5 in arg_0 . filter_options : if not arg_6 . matches ( arg_1 , arg_0 . filter_options [ arg_5 ] ) : return False elif arg_6 . has_default : if not arg_6 . matches ( arg_1 , arg_6 . default ) : return False if arg_0 . options [ "filter" ] and not arg_0 . options [ "filter" ] ( arg_1 ) : return False return True

def Func(arg_0, arg_1):
        """
        Returns whether the given node matches all filters.

        Args:
            node (Element): The node to evaluate.

        Returns:
            bool: Whether the given node matches.
        """

        arg_2 = arg_0.visible

        if arg_0.options["text"]:
            if isregex(arg_0.options["text"]):
                arg_3 = arg_0.options["text"]
            elif arg_0.exact_text is True:
                arg_3 = re.compile(r"\A{}\Z".format(re.escape(arg_0.options["text"])))
            else:
                arg_3 = toregex(arg_0.options["text"])

            arg_4 = normalize_text(
                arg_1.all_text if arg_2 == "all" else arg_1.visible_text)

            if not arg_3.search(arg_4):
                return False

        if isinstance(arg_0.exact_text, (bytes_, str_)):
            arg_3 = re.compile(r"\A{}\Z".format(re.escape(arg_0.exact_text)))

            arg_4 = normalize_text(
                arg_1.all_text if arg_2 == "all" else arg_1.visible_text)

            if not arg_3.search(arg_4):
                return False

        if arg_2 == "visible":
            if not arg_1.visible:
                return False
        elif arg_2 == "hidden":
            if arg_1.visible:
                return False

        for arg_5, arg_6 in iter(arg_0._node_filters.items()):
            if arg_5 in arg_0.filter_options:
                if not arg_6.matches(arg_1, arg_0.filter_options[arg_5]):
                    return False
            elif arg_6.has_default:
                if not arg_6.matches(arg_1, arg_6.default):
                    return False

        if arg_0.options["filter"] and not arg_0.options["filter"](arg_1):
            return False

        return True

Returns whether the given node matches all filters .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = arg_0 . get_value ( arg_1 , arg_3 ) try : return int ( arg_4 ) except : return 0

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Parse numeric fields.
        """
        arg_4 = arg_0.get_value(arg_1, arg_3)
        try:
            return int(arg_4)
        except:
            return 0


(port, address, index_group, index_offset, value, plc_data_type)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : arg_6 = _adsDLL . AdsSyncWriteReqEx arg_7 = ctypes . pointer ( arg_1 . amsAddrStruct ( ) ) arg_8 = ctypes . c_ulong ( arg_2 ) arg_9 = ctypes . c_ulong ( arg_3 ) if arg_5 == PLCTYPE_STRING : arg_10 = ctypes . c_char_p ( arg_4 . encode ( "utf-8" ) ) arg_11 = arg_10 arg_12 = len ( arg_11 . value ) + 1 else : if type ( arg_5 ) . __name__ == "PyCArrayType" : arg_10 = arg_5 ( * arg_4 ) else : arg_10 = arg_5 ( arg_4 ) arg_11 = ctypes . pointer ( arg_10 ) arg_12 = ctypes . sizeof ( arg_10 ) arg_13 = arg_6 ( arg_0 , arg_7 , arg_8 , arg_9 , arg_12 , arg_11 , ) if arg_13 : raise ADSError ( arg_13 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5):
    # type: (int, AmsAddr, int, int, Any, Type) -> None
    """Send data synchronous to an ADS-device.

    :param int port: local AMS port as returned by adsPortOpenEx()
    :param pyads.structs.AmsAddr address: local or remote AmsAddr
    :param int indexGroup: PLC storage area, according to the INDEXGROUP
        constants
    :param int index_offset: PLC storage address
    :param value: value to write to the storage address of the PLC
    :param int plc_data_type: type of the data given to the PLC,
        according to PLCTYPE constants

    """
    arg_6 = _adsDLL.AdsSyncWriteReqEx

    arg_7 = ctypes.pointer(arg_1.amsAddrStruct())
    arg_8 = ctypes.c_ulong(arg_2)
    arg_9 = ctypes.c_ulong(arg_3)

    if arg_5 == PLCTYPE_STRING:
        arg_10 = ctypes.c_char_p(arg_4.encode("utf-8"))
        arg_11 = arg_10  # type: Union[ctypes.c_char_p, ctypes.pointer]
        arg_12 = len(arg_11.value) + 1  # type: ignore

    else:
        if type(arg_5).__name__ == "PyCArrayType":
            arg_10 = arg_5(*arg_4)
        else:
            arg_10 = arg_5(arg_4)

        arg_11 = ctypes.pointer(arg_10)
        arg_12 = ctypes.sizeof(arg_10)

    arg_13 = arg_6(
        arg_0,
        arg_7,
        arg_8,
        arg_9,
        arg_12,
        arg_11,
    )

    if arg_13:
        raise ADSError(arg_13)

Send data synchronous to an ADS - device .


def Func ( arg_0 , arg_1 : arg_2 ) -> Optional [ Method ] : arg_3 = arg_0 . methods . entry ( arg_1 , None ) if arg_3 : arg_0 . _methods . swap ( MultiFunction . __Func , arg_1 ) return arg_3

def Func(arg_0, arg_1: arg_2) -> Optional[Method]:
        """Remove the method defined for this key and return it."""
        arg_3 = arg_0.methods.entry(arg_1, None)
        if arg_3:
            arg_0._methods.swap(MultiFunction.__Func, arg_1)
        return arg_3

Remove the method defined for this key and return it .


def Func(arg_0, arg_1=0.01):
    '''
    Return a row-sparse matrix approximating the input `x`.

    Parameters
    ----------
    x : np.ndarray [ndim <= 2]
        The input matrix to sparsify.

    quantile : float in [0, 1.0)
        Percentage of magnitude to discard in each row of `x`

    Returns
    -------
    x_sparse : `scipy.sparse.csr_matrix` [shape=x.shape]
        Row-sparsified approximation of `x`

        If `x.ndim == 1`, then `x` is interpreted as a row vector,
        and `x_sparse.shape == (1, len(x))`.

    Raises
    ------
    ParameterError
        If `x.ndim > 2`

        If `quantile` lies outside `[0, 1.0)`

    Notes
    -----
    This function caches at level 40.

    Examples
    --------
    >>> # Construct a Hann window to sparsify
    >>> x = scipy.signal.hann(32)
    >>> x
    array([ 0.   ,  0.01 ,  0.041,  0.09 ,  0.156,  0.236,  0.326,
            0.424,  0.525,  0.625,  0.72 ,  0.806,  0.879,  0.937,
            0.977,  0.997,  0.997,  0.977,  0.937,  0.879,  0.806,
            0.72 ,  0.625,  0.525,  0.424,  0.326,  0.236,  0.156,
            0.09 ,  0.041,  0.01 ,  0.   ])
    >>> # Discard the bottom percentile
    >>> x_sparse = librosa.util.Func(x, quantile=0.01)
    >>> x_sparse
    <1x32 sparse matrix of type '<type 'numpy.float64'>'
        with 26 stored elements in Compressed Sparse Row format>
    >>> x_sparse.todense()
    matrix([[ 0.   ,  0.   ,  0.   ,  0.09 ,  0.156,  0.236,  0.326,
              0.424,  0.525,  0.625,  0.72 ,  0.806,  0.879,  0.937,
              0.977,  0.997,  0.997,  0.977,  0.937,  0.879,  0.806,
              0.72 ,  0.625,  0.525,  0.424,  0.326,  0.236,  0.156,
              0.09 ,  0.   ,  0.   ,  0.   ]])
    >>> # Discard up to the bottom 10th percentile
    >>> x_sparse = librosa.util.Func(x, quantile=0.1)
    >>> x_sparse
    <1x32 sparse matrix of type '<type 'numpy.float64'>'
        with 20 stored elements in Compressed Sparse Row format>
    >>> x_sparse.todense()
    matrix([[ 0.   ,  0.   ,  0.   ,  0.   ,  0.   ,  0.   ,  0.326,
              0.424,  0.525,  0.625,  0.72 ,  0.806,  0.879,  0.937,
              0.977,  0.997,  0.997,  0.977,  0.937,  0.879,  0.806,
              0.72 ,  0.625,  0.525,  0.424,  0.326,  0.   ,  0.   ,
              0.   ,  0.   ,  0.   ,  0.   ]])
    '''

    if arg_0.ndim == 1:
        arg_0 = arg_0.reshape((1, -1))

    elif arg_0.ndim > 2:
        raise ParameterError('Input must have 2 or fewer dimensions. '
                             'Provided x.shape={}.'.format(arg_0.shape))

    if not 0.0 <= arg_1 < 1:
        raise ParameterError('Invalid quantile {:.2f}'.format(arg_1))

    arg_2 = scipy.sparse.lil_matrix(arg_0.shape, dtype=arg_0.dtype)

    arg_3 = np.abs(arg_0)
    arg_4 = np.sum(arg_3, axis=1, keepdims=True)

    arg_5 = np.sort(arg_3, axis=1)
    arg_6 = np.cumsum(arg_5 / arg_4, axis=1)

    arg_7 = np.argmin(arg_6 < arg_1, axis=1)

    for arg_8, arg_9 in enumerate(arg_7):
        arg_10 = np.where(arg_3[arg_8] >= arg_5[arg_8, arg_9])
        arg_2[arg_8, arg_10] = arg_0[arg_8, arg_10]

    return arg_2.tocsr()

Return a row-sparse matrix approximating the input `x`.

    Parameters
    ----------
    x : np.ndarray [ndim <= 2]
        The input matrix to sparsify.

    quantile : float in [0, 1.0)
        Percentage of magnitude to discard in each row of `x`

    Returns
    -------
    x_sparse : `scipy.sparse.csr_matrix` [shape=x.shape]
        Row-sparsified approximation of `x`

        If `x.ndim == 1`, then `x` is interpreted as a row vector,
        and `x_sparse.shape == (1, len(x))`.

    Raises
    ------
    ParameterError
        If `x.ndim > 2`

        If `quantile` lies outside `[0, 1.0)`

    Notes
    -----
    This function caches at level 40.

    Examples
    --------
    >>> # Construct a Hann window to sparsify
    >>> x = scipy.signal.hann(32)
    >>> x
    array([ 0.   ,  0.01 ,  0.041,  0.09 ,  0.156,  0.236,  0.326,
            0.424,  0.525,  0.625,  0.72 ,  0.806,  0.879,  0.937,
            0.977,  0.997,  0.997,  0.977,  0.937,  0.879,  0.806,
            0.72 ,  0.625,  0.525,  0.424,  0.326,  0.236,  0.156,
            0.09 ,  0.041,  0.01 ,  0.   ])
    >>> # Discard the bottom percentile
    >>> x_sparse = librosa.util.sparsify_rows(x, quantile=0.01)
    >>> x_sparse
    <1x32 sparse matrix of type '<type 'numpy.float64'>'
        with 26 stored elements in Compressed Sparse Row format>
    >>> x_sparse.todense()
    matrix([[ 0.   ,  0.   ,  0.   ,  0.09 ,  0.156,  0.236,  0.326,
              0.424,  0.525,  0.625,  0.72 ,  0.806,  0.879,  0.937,
              0.977,  0.997,  0.997,  0.977,  0.937,  0.879,  0.806,
              0.72 ,  0.625,  0.525,  0.424,  0.326,  0.236,  0.156,
              0.09 ,  0.   ,  0.   ,  0.   ]])
    >>> # Discard up to the bottom 10th percentile
    >>> x_sparse = librosa.util.sparsify_rows(x, quantile=0.1)
    >>> x_sparse
    <1x32 sparse matrix of type '<type 'numpy.float64'>'
        with 20 stored elements in Compressed Sparse Row format>
    >>> x_sparse.todense()
    matrix([[ 0.   ,  0.   ,  0.   ,  0.   ,  0.   ,  0.   ,  0.326,
              0.424,  0.525,  0.625,  0.72 ,  0.806,  0.879,  0.937,
              0.977,  0.997,  0.997,  0.977,  0.937,  0.879,  0.806,
              0.72 ,  0.625,  0.525,  0.424,  0.326,  0.   ,  0.   ,
              0.   ,  0.   ,  0.   ,  0.   ]])

Return a row - sparse matrix approximating the input x .


def
Func
(
arg_0
,
arg_1
=
)
:
if
arg_1
:
return
_Func_formats
.
get
(
arg_1
,
lambda
v
:
Func_fmt
(
v
,
arg_1
)
)
(
arg_0
)
arg_2
=
len
(
arg_0
)
if
19
<=
arg_2
<=
24
and
arg_0
[
3
]
==
" "
:
try
:
return
Func_d_b_Y_H_M_S
(
arg_0
)
except
(
KeyError
,
ValueError
)
:
pass
if
30
<=
arg_2
<=
31
:
try
:
return
Func_a__d_b_Y_H_M_S_z
(
arg_0
)
except
(
KeyError
,
ValueError
)
:
pass
if
arg_2
==
14
:
try
:
return
Func_YmdHMS
(
arg_0
)
except
ValueError
:
pass
try
:
return
Func_epoch
(
arg_0
)
except
ValueError
:
pass
return
Func_any
(
arg_0
)

def Func(arg_0, arg_1=None):
    """Parse a datetime to a datetime object.

    Uses fast custom parsing for common datetime formats or the slow dateutil
    parser for other formats. This is a trade off between ease of use and speed
    and is very useful for fast parsing of timestamp strings whose format may
    standard but varied or unknown prior to parsing.

    Common formats include:
        1 Feb 2010 12:00:00 GMT
        Mon, 1 Feb 2010 22:00:00 +1000
        20100201120000
        1383470155 (seconds since epoch)

    See the other Func_*() functions for more details.

    Args:
        value: A string representing a datetime.

    Returns:
        A datetime object.
    """
    if arg_1:
        return _Func_formats.get(arg_1,
            lambda v: Func_fmt(v, arg_1)
        )(arg_0)

    arg_2 = len(arg_0)

    if 19 <= arg_2 <= 24 and arg_0[3] == " ":
        # '%d %b %Y %H:%M:%Sxxxx'
        try:
            return Func_d_b_Y_H_M_S(arg_0)
        except (KeyError, ValueError):
            pass

    if 30 <= arg_2 <= 31:
        # '%a, %d %b %Y %H:%M:%S %z'
        try:
            return Func_a__d_b_Y_H_M_S_z(arg_0)
        except (KeyError, ValueError):
            pass

    if arg_2 == 14:
        # '%Y%m%d%H%M%S'
        try:
            return Func_YmdHMS(arg_0)
        except ValueError:
            pass

    # epoch timestamp
    try:
        return Func_epoch(arg_0)
    except ValueError:
        pass

    # slow version
    return Func_any(arg_0)

Parse a datetime to a datetime object.

    Uses fast custom parsing for common datetime formats or the slow dateutil
    parser for other formats. This is a trade off between ease of use and speed
    and is very useful for fast parsing of timestamp strings whose format may
    standard but varied or unknown prior to parsing.

    Common formats include:
        1 Feb 2010 12:00:00 GMT
        Mon, 1 Feb 2010 22:00:00 +1000
        20100201120000
        1383470155 (seconds since epoch)

    See the other datetimeobj_*() functions for more details.

    Args:
        value: A string representing a datetime.

    Returns:
        A datetime object.


(cls, sample_names, rformat, sample_fields)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = OrderedDict ( ) arg_5 = VcfRecord . _format_list ( arg_2 ) for arg_6 , arg_7 in enumerate ( arg_3 ) : arg_8 = arg_7 . split ( ":" ) if arg_7 else "." arg_4 [ arg_1 [ arg_6 ] ] = OrderedDict ( zip ( arg_5 , arg_8 ) ) return arg_4

def Func(arg_0, arg_1, arg_2, arg_3):
        """Creates a sample dict of tag-value dicts for a single variant record.

        Args:
            sample_names: list of sample name strings.
            rformat: record format string (from VCF record).
            sample_fields: list of strings where each string is the ';'
                seperated format values for an individual sample.

        Returns:
            An dict of samples, where each key is a sample and each value
                is an dict of format-values. See attribute below for example.
                Will return '.' if no values for sampe field.
        """
        arg_4 = OrderedDict()
        arg_5 = VcfRecord._format_list(arg_2)
        for arg_6, arg_7 in enumerate(arg_3):
            arg_8 = arg_7.split(":") if arg_7 else "."
            arg_4[arg_1[arg_6]] = OrderedDict(zip(arg_5,
                                                                 arg_8))
        return arg_4

Creates a sample dict of tag - value dicts for a single variant record .


def Func(arg_0):
        # type: () -> str
        """
        Returns the filename which is effectively used by the application. If
        overridden by an environment variable, it will return that filename.
        """
        # same logic for the configuration filename. First, check if we were
        # initialized with a filename...
        arg_1 = ''
        if arg_0.filename:
            arg_1 = arg_0.filename

        # ... next, take the value from the environment
        arg_2 = getenv(arg_0.env_filename_name)
        if arg_2:
            arg_0._log.info('Configuration filename was overridden with %r '
                           'by the environment variable %s.',
                           arg_2,
                           arg_0.env_filename_name)
            arg_1 = arg_2

        return arg_1

Returns the filename which is effectively used by the application . If overridden by an environment variable it will return that filename .


def Func(arg_0):
    """Remove a file from the project's storage.

    The first part of the remote path is interpreted as the name of the
    storage provider. If there is no match the default (osfstorage) is
    used.
    """
    arg_1 = _setup_osf(arg_0)
    if arg_1.username is None or arg_1.password is None:
        sys.exit('To Func a file you need to provide a username and'
                 ' password.')

    arg_2 = arg_1.project(arg_0.project)

    arg_3, arg_4 = split_storage(arg_0.target)

    arg_5 = arg_2.storage(arg_3)
    for arg_6 in arg_5.files:
        if norm_remote_path(arg_6.path) == arg_4:
            arg_6.Func()

Remove a file from the project s storage .


def Func(arg_0, arg_1):
        """
        Call the SparkSqlHook to run the provided sql query
        """
        arg_0._hook = SparkSqlHook(sql=arg_0._sql,
                                  conf=arg_0._conf,
                                  conn_id=arg_0._conn_id,
                                  total_executor_cores=arg_0._total_executor_cores,
                                  executor_cores=arg_0._executor_cores,
                                  executor_memory=arg_0._executor_memory,
                                  keytab=arg_0._keytab,
                                  principal=arg_0._principal,
                                  name=arg_0._name,
                                  num_executors=arg_0._num_executors,
                                  master=arg_0._master,
                                  yarn_queue=arg_0._yarn_queue
                                  )
        arg_0._hook.run_query()


def Func ( arg_0 , arg_1 ) : arg_2 = [ term [ 0 ] for term in acquire_subject_vocabulary ( arg_0 ) ] arg_3 = arg_1 . metadata . get ( 'subjects' , [ ] ) arg_4 = [ s for s in arg_3 if s not in arg_2 ] if arg_4 : raise exceptions . InvalidMetadata ( 'subjects' , arg_4 )

def Func(arg_0, arg_1):
    """Give a database cursor and model, check the subjects against
    the subject vocabulary.
    """
    arg_2 = [term[0] for term in acquire_subject_vocabulary(arg_0)]
    arg_3 = arg_1.metadata.get('subjects', [])
    arg_4 = [s for s in arg_3 if s not in arg_2]
    if arg_4:
        raise exceptions.InvalidMetadata('subjects', arg_4)

Give a database cursor and model check the subjects against the subject vocabulary .


def Func(arg_0):
        """Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.conflicts_with appropriately."""
        if arg_0.req is None:
            return False
        try:
            arg_0.satisfied_by = pkg_resources.get_distribution(arg_0.req)
        except pkg_resources.DistributionNotFound:
            return False
        except pkg_resources.VersionConflict:
            arg_2 = pkg_resources.get_distribution(arg_0.req.project_name)
            if arg_0.use_user_site:
                if dist_in_usersite(arg_2):
                    arg_0.conflicts_with = arg_2
                elif running_under_virtualenv() and dist_in_site_packages(arg_2):
                    raise InstallationError("Will not install to the user site because it will lack sys.path precedence to %s in %s"
                                            %(arg_2.project_name, arg_2.location))
            else:
                arg_0.conflicts_with = arg_2
        return True

Find an installed distribution that satisfies or conflicts with this requirement and set self . satisfied_by or self . conflicts_with appropriately .


def Func(arg_0):
    """Open a volumetric file using the tools following the file extension.

    Parameters
    ----------
    filepath: str
        Path to a volume file

    Returns
    -------
    volume_data: np.ndarray
        Volume data

    pixdim: 1xN np.ndarray
        Vector with the description of the voxels physical size (usually in mm) for each volume dimension.

    Raises
    ------
    IOError
        In case the file is not found.
    """
    # check if the file exists
    if not op.exists(arg_0):
        raise IOError('Could not find file {}.'.format(arg_0))

    # define helper functions
    def open_nifti_file(arg_0):
        return NiftiImage(arg_0)

    def open_mhd_file(arg_0):
        return MedicalImage(arg_0)
        arg_1, arg_2 = load_raw_data_with_mhd(arg_0)
        # TODO: convert vol_data and hdr_data into MedicalImage
        return arg_1, arg_2

    def open_mha_file(arg_0):
        raise NotImplementedError('This function has not been implemented yet.')

    # generic loader function
    def _load_file(arg_0, arg_3):
        return arg_3(arg_0)

    # file_extension -> file loader function
    arg_4 = {
                    'nii': open_nifti_file,
                    'mhd': open_mhd_file,
                    'mha': open_mha_file,
                    }

    # get extension of the `filepath`
    arg_5 = get_extension(arg_0)

    # find the loader from `ext`
    arg_3 = None
    for arg_6 in arg_4:
        if arg_5 in arg_6:
            arg_3 = arg_4[arg_6]

    if arg_3 is None:
        raise ValueError('Could not find a loader for file {}.'.format(arg_0))

    return _load_file(arg_0, arg_3)

Open a volumetric file using the tools following the file extension .


(self, newer_tag_name, newer_tag_link,
                        newer_tag_time,
                        older_tag_link, project_url)

def Func(arg_0, arg_1, arg_2,
                        arg_3,
                        arg_4, arg_5):
        """
        Generate a header for a tag section with specific parameters.

        :param str newer_tag_name: Name (title) of newer tag.
        :param str newer_tag_link: Tag name of newer tag, used for links.
                               Could be same as **newer_tag_name** or some
                               specific value, like `HEAD`.
        :param datetime newer_tag_time: Date and time when
                                        newer tag was created.
        :param str older_tag_link: Tag name of older tag, used for links.
        :param str project_url: URL for current project.
        :rtype: str
        :return: Generated ready-to-add tag section.
        """

        arg_6 = ""
        # Generate date string:
        # noinspection PyUnresolvedReferences
        arg_7 = arg_3.strftime(arg_0.options.date_format)

        # Generate tag name and link
        if arg_0.options.release_url:
            arg_8 = arg_0.options.release_url.format(arg_2)
        else:
            arg_8 = u"{project_url}/tree/{newer_tag_link}".format(
                arg_5=arg_5, arg_2=arg_2)

        if not arg_0.options.unreleased_with_date and \
                arg_1 == arg_0.options.unreleased_label:
            arg_6 += u"## [{newer_tag_name}]({release_url})\n\n".format(
                arg_1=arg_1, arg_8=arg_8)
        else:
            arg_6 += u"## [{newer_tag_name}]({release_url}) " \
                   u"({time_string})\n".format(
                        arg_1=arg_1,
                        arg_8=arg_8,
                        arg_7=arg_7
                   )

        if arg_0.options.compare_link \
            and arg_4 != REPO_CREATED_TAG_NAME:
            # Generate compare link
            arg_6 += u"[Full Changelog]"
            arg_6 += u"({project_url}/compare/{older_tag_link}".format(
                arg_5=arg_5,
                arg_4=arg_4,
            )
            arg_6 += u"...{newer_tag_link})\n\n".format(
                arg_2=arg_2
            )
        return arg_6

Generate a header for a tag section with specific parameters .


def Func ( arg_0 , arg_1 ) : if arg_1 . get ( 'form_params' ) : arg_2 = json . loads ( arg_1 [ 'form_params' ] ) return arg_2 . get ( 'project' ) return None

def Func(arg_0, arg_1):
        '''Return slug of a project that given bet is associated with
        or None if bet is not associated with any project.
        '''
        if arg_1.get('form_params'):
            arg_2 = json.loads(arg_1['form_params'])
            return arg_2.get('project')
        return None

Return slug of a project that given bet is associated with or None if bet is not associated with any project .


def Func(arg_0, arg_1):
    """Copy file from `src` path to `dst` path. If `dst` already exists, will add '+' characters
    to the end of the basename without extension.

    Parameters
    ----------
    src: str

    dst: str

    Returns
    -------
    dstpath: str
    """
    arg_2 = get_extension(arg_1)
    arg_3 = remove_ext   (arg_1)

    while op.exists(arg_3 + arg_2):
        arg_3 += '+'

    shutil.copy(arg_0, arg_3 + arg_2)

    return arg_3 + arg_2

Copy file from src path to dst path . If dst already exists will add + characters to the end of the basename without extension .


return quote_plus(' '.join([course_run_key.org, course_run_key.course]))

def
Func
(
arg_0
)
:
try
:
arg_1
=
CourseKey
.
from_string
(
arg_0
)
except
InvalidKeyError
:
return
arg_0
return
quote_plus
(
' '
.
join
(
[
arg_1
.
org
,
arg_1
.
course
]
)
)

def Func(arg_0):
    """
    Return the serialized course key given either a course run ID or course key.
    """
    try:
        arg_1 = CourseKey.from_string(arg_0)
    except InvalidKeyError:
        # Assume we already have a course key.
        return arg_0

    return quote_plus(' '.join([arg_1.org, arg_1.course]))

Return the serialized course key given either a course run ID or course key .


def
Func
(
arg_0
,
arg_1
)
:
if
arg_0
.
_closed
:
return
assert
arg_0
.
_job
is
not
logger
.
debug
(
"worker {} got response"
.
format
(
id
(
arg_0
)
)
)
arg_2
=
arg_0
.
_job
.
get_result
(
arg_1
)
arg_0
.
_manager
.
add_result
(
arg_0
.
_job
,
arg_2
)
arg_0
.
_load_job
(
)

def Func(arg_0, arg_1):
        """
        Called when a response to a job RPC has been received. Decodes the
        response and finalizes the result, then reports the result to the
        job manager.
        """

        if arg_0._closed:
            return

        assert arg_0._job is not None

        logger.debug("worker {} got response".format(id(arg_0)))
        arg_2 = arg_0._job.get_result(arg_1)
        arg_0._manager.add_result(arg_0._job, arg_2)

        arg_0._load_job()

Called when a response to a job RPC has been received . Decodes the response and finalizes the result then reports the result to the job manager .


(
            self,
            columns=BindingPrediction.fields + ("length",))

return pd.DataFrame.from_records(
            [tuple([getattr(x, name) for name in columns]) for x in self],
            columns=columns)

def Func ( arg_0 , arg_1 = arg_2 . fields + ( "length" , ) ) : return pd . DataFrame . from_records ( [ tuple ( [ getattr ( arg_5 , arg_4 ) for arg_4 in arg_1 ] ) for arg_5 in arg_0 ] , arg_1 = arg_1 )

def Func(
            arg_0,
            arg_1=arg_2.fields + ("length",)):
        """
        Converts collection of BindingPrediction objects to DataFrame
        """
        return pd.DataFrame.from_records(
            [tuple([getattr(arg_5, arg_4) for arg_4 in arg_1]) for arg_5 in arg_0],
            arg_1=arg_1)


def Func ( arg_0 , arg_1 = 1 ) : arg_2 = [ ] for arg_3 in range ( 0 , len ( arg_0 ) - 1 ) : arg_4 = list ( arg_0 ) arg_4 [ arg_3 ] , arg_4 [ arg_3 + 1 ] = arg_4 [ arg_3 + 1 ] , arg_4 [ arg_3 ] arg_2 . append ( '' . join ( arg_4 ) ) for arg_5 in string . ascii_lowercase : for arg_3 in range ( 0 , len ( arg_0 ) ) : arg_4 = list ( arg_0 ) if arg_5 != arg_4 [ arg_3 ] : arg_4 [ arg_3 ] = arg_5 arg_2 . append ( '' . join ( arg_4 ) ) for arg_5 in string . ascii_lowercase : for arg_3 in range ( 0 , len ( arg_0 ) + 1 ) : arg_4 = list ( arg_0 ) arg_4 . insert ( arg_3 , arg_5 ) arg_2 . append ( '' . join ( arg_4 ) ) if len ( arg_0 ) > 3 : for arg_3 in range ( 0 , len ( arg_0 ) ) : arg_4 = list ( arg_0 ) del arg_4 [ arg_3 ] arg_2 . append ( '' . join ( arg_4 ) ) return arg_2

def Func(arg_0, arg_1=1):
    """Naive neighborhoods algo."""
    # inversions
    arg_2 = []
    for arg_3 in range(0, len(arg_0) - 1):
        arg_4 = list(arg_0)
        arg_4[arg_3], arg_4[arg_3+1] = arg_4[arg_3+1], arg_4[arg_3]
        arg_2.append(''.join(arg_4))
    # substitutions
    for arg_5 in string.ascii_lowercase:
        for arg_3 in range(0, len(arg_0)):
            arg_4 = list(arg_0)
            if arg_5 != arg_4[arg_3]:
                arg_4[arg_3] = arg_5
                arg_2.append(''.join(arg_4))
    # insertions
    for arg_5 in string.ascii_lowercase:
        for arg_3 in range(0, len(arg_0) + 1):
            arg_4 = list(arg_0)
            arg_4.insert(arg_3, arg_5)
            arg_2.append(''.join(arg_4))
    if len(arg_0) > 3:
        # removal
        for arg_3 in range(0, len(arg_0)):
            arg_4 = list(arg_0)
            del arg_4[arg_3]
            arg_2.append(''.join(arg_4))
    return arg_2


def Func ( arg_0 , arg_1 ) : if not none_and_length_check ( [ arg_0 , arg_1 ] ) : return None arg_2 = sum ( frac * prop for frac , prop in zip ( arg_0 , arg_1 ) ) return arg_2

def Func(arg_0, arg_1):
    r'''Simple function calculates a property based on weighted averages of
    properties. Weights could be mole fractions, volume fractions, mass
    fractions, or anything else.

    .. math::
        y = \sum_i \text{frac}_i \cdot \text{prop}_i

    Parameters
    ----------
    fracs : array-like
        Fractions of a mixture
    props: array-like
        Properties

    Returns
    -------
    prop : value
        Calculated property

    Notes
    -----
    Returns None if any fractions or properties are missing or are not of the
    same length.

    Examples
    --------
    >>> Func([0.1, 0.9], [0.01, 0.02])
    0.019000000000000003
    '''
    if not none_and_length_check([arg_0, arg_1]):
        return None
    arg_2 = sum(frac*prop for frac, prop in zip(arg_0, arg_1))
    return arg_2

r'''Simple function calculates a property based on weighted averages of
    properties. Weights could be mole fractions, volume fractions, mass
    fractions, or anything else.

    .. math::
        y = \sum_i \text{frac}_i \cdot \text{prop}_i

    Parameters
    ----------
    fracs : array-like
        Fractions of a mixture
    props: array-like
        Properties

    Returns
    -------
    prop : value
        Calculated property

    Notes
    -----
    Returns None if any fractions or properties are missing or are not of the
    same length.

    Examples
    --------
    >>> mixing_simple([0.1, 0.9], [0.01, 0.02])
    0.019000000000000003

r Simple function calculates a property based on weighted averages of properties . Weights could be mole fractions volume fractions mass fractions or anything else .


return node.root().name != BUILTINS_NAME

def Func ( arg_0 , arg_1 ) : if arg_0 . config . show_builtin : return True return arg_1 . root ( ) . name != BUILTINS_NAME

def Func(arg_0, arg_1):
        """true if builtins and not show_builtins"""
        if arg_0.config.show_builtin:
            return True
        return arg_1.root().name != BUILTINS_NAME


def Func(arg_0=128, arg_1=0.0, arg_2=11025.0, arg_3=False):
    """Compute an array of acoustic frequencies tuned to the mel scale.

    The mel scale is a quasi-logarithmic function of acoustic frequency
    designed such that perceptually similar pitch intervals (e.g. octaves)
    appear equal in width over the full hearing range.

    Because the definition of the mel scale is conditioned by a finite number
    of subjective psychoaoustical experiments, several implementations coexist
    in the audio signal processing literature [1]_. By default, librosa replicates
    the behavior of the well-established MATLAB Auditory Toolbox of Slaney [2]_.
    According to this default implementation,  the conversion from Hertz to mel is
    linear below 1 kHz and logarithmic above 1 kHz. Another available implementation
    replicates the Hidden Markov Toolkit [3]_ (HTK) according to the following formula:

    `mel = 2595.0 * np.log10(1.0 + f / 700.0).`

    The choice of implementation is determined by the `htk` keyword argument: setting
    `htk=False` leads to the Auditory toolbox implementation, whereas setting it `htk=True`
    leads to the HTK implementation.

    .. [1] Umesh, S., Cohen, L., & Nelson, D. Fitting the mel scale.
        In Proc. International Conference on Acoustics, Speech, and Signal Processing
        (ICASSP), vol. 1, pp. 217-220, 1998.

    .. [2] Slaney, M. Auditory Toolbox: A MATLAB Toolbox for Auditory
        Modeling Work. Technical Report, version 2, Interval Research Corporation, 1998.

    .. [3] Young, S., Evermann, G., Gales, M., Hain, T., Kershaw, D., Liu, X.,
        Moore, G., Odell, J., Ollason, D., Povey, D., Valtchev, V., & Woodland, P.
        The HTK book, version 3.4. Cambridge University, March 2009.

    See Also
    --------
    hz_to_mel
    mel_to_hz
    librosa.feature.melspectrogram
    librosa.feature.mfcc

    Parameters
    ----------
    n_mels    : int > 0 [scalar]
        Number of mel bins.

    fmin      : float >= 0 [scalar]
        Minimum frequency (Hz).

    fmax      : float >= 0 [scalar]
        Maximum frequency (Hz).

    htk       : bool
        If True, use HTK formula to convert Hz to mel.
        Otherwise (False), use Slaney's Auditory Toolbox.

    Returns
    -------
    bin_frequencies : ndarray [shape=(n_mels,)]
        Vector of n_mels frequencies in Hz which are uniformly spaced on the Mel
        axis.

    Examples
    --------
    >>> librosa.Func(n_mels=40)
    array([     0.   ,     85.317,    170.635,    255.952,
              341.269,    426.586,    511.904,    597.221,
              682.538,    767.855,    853.173,    938.49 ,
             1024.856,   1119.114,   1222.042,   1334.436,
             1457.167,   1591.187,   1737.532,   1897.337,
             2071.84 ,   2262.393,   2470.47 ,   2697.686,
             2945.799,   3216.731,   3512.582,   3835.643,
             4188.417,   4573.636,   4994.285,   5453.621,
             5955.205,   6502.92 ,   7101.009,   7754.107,
             8467.272,   9246.028,  10096.408,  11025.   ])

    """

    # 'Center freqs' of mel bands - uniformly spaced between limits
    arg_4 = hz_to_mel(arg_1, arg_3=arg_3)
    arg_5 = hz_to_mel(arg_2, arg_3=arg_3)

    arg_6 = np.linspace(arg_4, arg_5, arg_0)

    return mel_to_hz(arg_6, arg_3=arg_3)

Compute an array of acoustic frequencies tuned to the mel scale.

    The mel scale is a quasi-logarithmic function of acoustic frequency
    designed such that perceptually similar pitch intervals (e.g. octaves)
    appear equal in width over the full hearing range.

    Because the definition of the mel scale is conditioned by a finite number
    of subjective psychoaoustical experiments, several implementations coexist
    in the audio signal processing literature [1]_. By default, librosa replicates
    the behavior of the well-established MATLAB Auditory Toolbox of Slaney [2]_.
    According to this default implementation,  the conversion from Hertz to mel is
    linear below 1 kHz and logarithmic above 1 kHz. Another available implementation
    replicates the Hidden Markov Toolkit [3]_ (HTK) according to the following formula:

    `mel = 2595.0 * np.log10(1.0 + f / 700.0).`

    The choice of implementation is determined by the `htk` keyword argument: setting
    `htk=False` leads to the Auditory toolbox implementation, whereas setting it `htk=True`
    leads to the HTK implementation.

    .. [1] Umesh, S., Cohen, L., & Nelson, D. Fitting the mel scale.
        In Proc. International Conference on Acoustics, Speech, and Signal Processing
        (ICASSP), vol. 1, pp. 217-220, 1998.

    .. [2] Slaney, M. Auditory Toolbox: A MATLAB Toolbox for Auditory
        Modeling Work. Technical Report, version 2, Interval Research Corporation, 1998.

    .. [3] Young, S., Evermann, G., Gales, M., Hain, T., Kershaw, D., Liu, X.,
        Moore, G., Odell, J., Ollason, D., Povey, D., Valtchev, V., & Woodland, P.
        The HTK book, version 3.4. Cambridge University, March 2009.

    See Also
    --------
    hz_to_mel
    mel_to_hz
    librosa.feature.melspectrogram
    librosa.feature.mfcc

    Parameters
    ----------
    n_mels    : int > 0 [scalar]
        Number of mel bins.

    fmin      : float >= 0 [scalar]
        Minimum frequency (Hz).

    fmax      : float >= 0 [scalar]
        Maximum frequency (Hz).

    htk       : bool
        If True, use HTK formula to convert Hz to mel.
        Otherwise (False), use Slaney's Auditory Toolbox.

    Returns
    -------
    bin_frequencies : ndarray [shape=(n_mels,)]
        Vector of n_mels frequencies in Hz which are uniformly spaced on the Mel
        axis.

    Examples
    --------
    >>> librosa.mel_frequencies(n_mels=40)
    array([     0.   ,     85.317,    170.635,    255.952,
              341.269,    426.586,    511.904,    597.221,
              682.538,    767.855,    853.173,    938.49 ,
             1024.856,   1119.114,   1222.042,   1334.436,
             1457.167,   1591.187,   1737.532,   1897.337,
             2071.84 ,   2262.393,   2470.47 ,   2697.686,
             2945.799,   3216.731,   3512.582,   3835.643,
             4188.417,   4573.636,   4994.285,   5453.621,
             5955.205,   6502.92 ,   7101.009,   7754.107,
             8467.272,   9246.028,  10096.408,  11025.   ])

Compute an array of acoustic frequencies tuned to the mel scale .