def Func ( arg_0 , arg_1 ) : arg_2 = len ( arg_1 . _explored_parameters ) if arg_2 > 0 : if hasattr ( arg_0 . _overview_group , 'explorations' ) : arg_3 = arg_0 . _overview_group . _f_get_child ( 'explorations' ) if len ( arg_3 ) != arg_2 : arg_0 . _hdf5file . remove_node ( where = arg_0 . _overview_group , name = 'explorations' ) if not hasattr ( arg_0 . _overview_group , 'explorations' ) : arg_4 = list ( arg_1 . _explored_parameters . keys ( ) ) if arg_4 : arg_5 = arg_0 . _all_get_table_col ( 'explorations' , arg_4 , 'overview.explorations' ) else : arg_5 = pt . StringCol ( 1 ) arg_6 = { 'explorations' : arg_5 } arg_3 = arg_0 . _hdf5file . create_table ( where = arg_0 . _overview_group , name = 'explorations' , arg_6 = arg_6 ) arg_7 = [ ( x . encode ( 'utf-8' ) , ) for x in arg_4 ] if arg_7 : arg_3 . append ( arg_7 ) arg_3 . flush ( )

def Func(arg_0, arg_1):
        """Stores a all explored parameter names for internal recall"""
        arg_2 = len(arg_1._explored_parameters)
        if arg_2 > 0:
            if hasattr(arg_0._overview_group, 'explorations'):
                arg_3 = arg_0._overview_group._f_get_child('explorations')
                if len(arg_3) != arg_2:
                    arg_0._hdf5file.remove_node(where=arg_0._overview_group,
                                         name='explorations')
        if not hasattr(arg_0._overview_group, 'explorations'):
            arg_4 = list(arg_1._explored_parameters.keys())
            if arg_4:
                arg_5 = arg_0._all_get_table_col('explorations',
                                                      arg_4,
                                                      'overview.explorations')
            else:
                arg_5 = pt.StringCol(1)
            arg_6 = {'explorations': arg_5}
            arg_3 = arg_0._hdf5file.create_table(where=arg_0._overview_group,
                                                       name='explorations',
                                                       arg_6=arg_6)
            arg_7 = [(x.encode('utf-8'),) for x in arg_4]
            if arg_7:
                arg_3.append(arg_7)
                arg_3.flush()


async def Func ( arg_0 , arg_1 ) : arg_2 = { 'data' : arg_1 } arg_3 = { 'data.reportNumber' : arg_1 [ 'reportNumber' ] } await arg_0 . update ( arg_3 , arg_2 , upsert = True , multi = False )

async def Func(arg_0, arg_1):
    """Upsert the technote resource into the projectmeta MongoDB collection.

    Parameters
    ----------
    collection : `motor.motor_asyncio.AsyncIOMotorCollection`
        The MongoDB collection.
    jsonld : `dict`
        The JSON-LD document that represents the document resource.
    """
    arg_2 = {
        'data': arg_1
    }
    arg_3 = {
        'data.reportNumber': arg_1['reportNumber']
    }
    await arg_0.update(arg_3, arg_2, upsert=True, multi=False)

Upsert the technote resource into the projectmeta MongoDB collection .


def
Func
(
arg_0
,
arg_1
=
arg_2
.
inf
,
arg_4
=
)
:
with
tf
.
compat
.
v1
.
name_scope
(
arg_4
,
'Func'
,
[
arg_0
,
arg_1
]
)
:
if
not
is_list_like
(
arg_0
)
:
raise
TypeError
(
'Expected list input.'
)
if
not
arg_0
:
raise
ValueError
(
'Input should not be empty.'
)
arg_5
=
arg_0
[
0
]
.
shape
arg_0
=
tf
.
stack
(
arg_0
,
axis
=
1
)
arg_0
=
tf
.
reduce_sum
(
input_tensor
=
arg_0
,
axis
=
1
)
arg_1
=
arg_2
.
array
(
arg_1
,
arg_0
.
dtype
.
as_numpy_dtype
)
arg_6
=
tf
.
fill
(
tf
.
shape
(
input
=
arg_0
)
,
value
=
arg_1
)
arg_0
=
tf
.
where
(
tf
.
math
.
is_finite
(
arg_0
)
,
arg_0
,
arg_6
)
arg_0
.
set_shape
(
arg_0
.
shape
.
merge_with
(
arg_5
)
)
return
arg_0

def Func(arg_0, arg_1=-arg_2.inf, arg_4=None):
  """Elementwise adds list members, replacing non-finite results with alt_value.

  Typically the `alt_value` is chosen so the `MetropolisHastings`
  `TransitionKernel` always rejects the proposal.

  Args:
    x: Python `list` of `Tensors` to elementwise add.
    alt_value: Python scalar used to replace any elementwise sums which would
      otherwise be non-finite.
    name: Python `str` name prefixed to Ops created by this function.
      Default value: `None` (i.e., "Func").

  Returns:
    Func: `Tensor` representing the elementwise sum of list of `Tensor`s
      `x` or `alt_value` where sums are non-finite.

  Raises:
    TypeError: if `x` is not list-like.
    ValueError: if `x` is empty.
  """
  with tf.compat.v1.name_scope(arg_4, 'Func', [arg_0, arg_1]):
    if not is_list_like(arg_0):
      raise TypeError('Expected list input.')
    if not arg_0:
      raise ValueError('Input should not be empty.')
    arg_5 = arg_0[0].shape
    arg_0 = tf.stack(arg_0, axis=-1)
    arg_0 = tf.reduce_sum(input_tensor=arg_0, axis=-1)
    arg_1 = arg_2.array(arg_1, arg_0.dtype.as_numpy_dtype)
    arg_6 = tf.fill(tf.shape(input=arg_0), value=arg_1)
    arg_0 = tf.where(tf.math.is_finite(arg_0), arg_0, arg_6)
    arg_0.set_shape(arg_0.shape.merge_with(arg_5))
    return arg_0

Elementwise adds list members, replacing non-finite results with alt_value.

  Typically the `alt_value` is chosen so the `MetropolisHastings`
  `TransitionKernel` always rejects the proposal.

  Args:
    x: Python `list` of `Tensors` to elementwise add.
    alt_value: Python scalar used to replace any elementwise sums which would
      otherwise be non-finite.
    name: Python `str` name prefixed to Ops created by this function.
      Default value: `None` (i.e., "safe_sum").

  Returns:
    safe_sum: `Tensor` representing the elementwise sum of list of `Tensor`s
      `x` or `alt_value` where sums are non-finite.

  Raises:
    TypeError: if `x` is not list-like.
    ValueError: if `x` is empty.

Elementwise adds list members replacing non - finite results with alt_value .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
try
:
arg_0
.
define_alias
(
arg_1
,
arg_2
)
except
AliasError
,
e
:
error
(
"Invalid alias: %s"
%
e
)

def Func(arg_0, arg_1, arg_2):
        """Define an alias, but don't raise on an AliasError."""
        try:
            arg_0.define_alias(arg_1, arg_2)
        except AliasError, e:
            error("Invalid alias: %s" % e)

Define an alias but don t raise on an AliasError .


(self, taskspec, sequence_flow_id, sequence_flow_name,
                         documentation)

def Func(arg_0, arg_1, arg_2, arg_3,
                         arg_4):
        """
        Connect this task spec to the indicated child.

        :param sequence_flow_id: The ID of the connecting sequenceFlow node.

        :param sequence_flow_name: The name of the connecting sequenceFlow
        node.
        """
        arg_0.connect(arg_1)
        arg_5 = SequenceFlow(
            arg_2, arg_3, arg_4, arg_1)
        arg_0.outgoing_sequence_flows[arg_1.name] = arg_5
        arg_0.outgoing_sequence_flows_by_id[arg_2] = arg_5

Connect this task spec to the indicated child .


(ip, notation=IP_DOT, inotation=IP_UNKNOWN, check=True)

return _convert(ip, notation, inotation, _check=check, _isnm=False)

def Func(arg_0, arg_1=arg_2, arg_3=arg_4, arg_5=True):
    """Convert among IP address notations.

    Given an IP address, this function returns the address
    in another notation.

    @param ip: the IP address.
    @type ip: integers, strings or object with an appropriate __str()__ method.

    @param notation: the notation of the output (default: IP_DOT).
    @type notation: one of the IP_* constants, or the equivalent strings.

    @param inotation: force the input to be considered in the given notation
                    (default the notation of the input is autodetected).
    @type inotation: one of the IP_* constants, or the equivalent strings.

    @param check: force the notation check on the input.
    @type check: True force the check, False force not to check and None
                do the check only if the inotation is unknown.

    @return: a string representing the IP in the selected notation.

    @raise ValueError: raised when the input is in unknown notation."""
    return _Func(arg_0, arg_1, arg_3, _check=arg_5, _isnm=False)


return memory_file(data, self.profile()), 'image/png'

def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _prepare_array_for_png ( arg_1 ) arg_1 = ma . masked_where ( arg_2 == arg_0 . nodata , arg_2 ) return memory_file ( arg_1 , arg_0 . profile ( ) ) , 'image/png'

def Func(arg_0, arg_1):
        """
        Convert data to web output.

        Parameters
        ----------
        data : array

        Returns
        -------
        web data : array
        """
        arg_2 = arg_0._prepare_array_for_png(arg_1)
        arg_1 = ma.masked_where(arg_2 == arg_0.nodata, arg_2)
        return memory_file(arg_1, arg_0.profile()), 'image/png'


(self, profile_pair, multiplicity, t,
                        return_log=False, ignore_gaps=True)

return logP if return_log else np.exp(logP)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = False , arg_5 = True ) : if arg_3 < 0 : arg_6 = - ttconf . BIG_NUMBER else : arg_7 = arg_0 . expQt ( arg_3 ) if len ( arg_7 . shape ) == 3 : arg_8 = np . einsum ( 'ai,ija,aj->a' , arg_1 [ 1 ] , arg_7 , arg_1 [ 0 ] ) else : arg_8 = np . einsum ( 'ai,ij,aj->a' , arg_1 [ 1 ] , arg_7 , arg_1 [ 0 ] ) if arg_5 and ( arg_0 . gap_index is not None ) : arg_9 = ( 1 - arg_1 [ 0 ] [ : , arg_0 . gap_index ] ) * ( 1 - arg_1 [ 1 ] [ : , arg_0 . gap_index ] ) arg_6 = np . sum ( arg_2 * np . log ( arg_8 ) * arg_9 ) else : arg_6 = np . sum ( arg_2 * np . log ( arg_8 ) ) return arg_6 if arg_4 else np . exp ( arg_6 )

def Func(arg_0, arg_1, arg_2, arg_3,
                        arg_4=False, arg_5=True):
        '''
        Calculate the probability of observing a node pair at a distance t

        Parameters
        ----------

          profile_pair: numpy arrays
            Probability distributions of the nucleotides at either
            end of the branch. pp[0] = parent, pp[1] = child

          multiplicity : numpy array
            The number of times an alignment pattern is observed

          t : float
            Length of the branch separating parent and child

          ignore_gaps: bool
            If True, ignore mutations to and from gaps in distance calculations

          return_log : bool
            Whether or not to exponentiate the result

        '''
        if arg_3<0:
            arg_6 = -ttconf.BIG_NUMBER
        else:
            arg_7 = arg_0.expQt(arg_3)
            if len(arg_7.shape)==3:
                arg_8 = np.einsum('ai,ija,aj->a', arg_1[1], arg_7, arg_1[0])
            else:
                arg_8 = np.einsum('ai,ij,aj->a', arg_1[1], arg_7, arg_1[0])
            if arg_5 and (arg_0.gap_index is not None): # calculate the probability that neither outgroup/node has a gap
                arg_9 = (1-arg_1[0][:,arg_0.gap_index])*(1-arg_1[1][:,arg_0.gap_index])
                # weigh log LH by the non-gap probability
                arg_6 = np.sum(arg_2*np.log(arg_8)*arg_9)
            else:
                arg_6 = np.sum(arg_2*np.log(arg_8))

        return arg_6 if arg_4 else np.exp(arg_6)


def Func(arg_0):
        """move cursor down"""
        arg_1, arg_2 = arg_0._index
        arg_0._select_index(arg_1+1, arg_2)


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 [ 'event_type' ] arg_3 = neutron_customer_process . get ( arg_2 ) if arg_3 is not None : arg_3 ( arg_0 , arg_1 ) else : arg_4 = False arg_5 = None for arg_6 in neutron_customer_process_wildcard . keys ( ) : if arg_6 . match ( arg_2 ) : arg_5 = neutron_customer_process_wildcard . get ( arg_6 ) arg_4 = True break if arg_4 : arg_5 ( arg_0 , arg_1 ) else : default_process ( arg_0 , arg_1 ) arg_1 . ack ( )

def Func(arg_0, arg_1):
    """
    This function deal with the neutron notification.

    First, find process from customer_process that not include wildcard.
    if not find from customer_process, then find process from customer_process_wildcard.
    if not find from customer_process_wildcard, then use ternya default process.
    :param body: dict of openstack notification.
    :param message: kombu Message class
    :return:
    """
    arg_2 = arg_0['event_type']
    arg_3 = neutron_customer_process.get(arg_2)
    if arg_3 is not None:
        arg_3(arg_0, arg_1)
    else:
        arg_4 = False
        arg_5 = None
        for arg_6 in neutron_customer_process_wildcard.keys():
            if arg_6.match(arg_2):
                arg_5 = neutron_customer_process_wildcard.get(arg_6)
                arg_4 = True
                break
        if arg_4:
            arg_5(arg_0, arg_1)
        else:
            default_process(arg_0, arg_1)
    arg_1.ack()

This function deal with the neutron notification .


def Func ( ) : pyblish . api . Func ( "mayabatch" ) pyblish . api . Func ( "mayapy" ) pyblish . api . Func ( "maya" )

def Func():
    """Register supported hosts"""
    pyblish.api.Func("mayabatch")
    pyblish.api.Func("mayapy")
    pyblish.api.Func("maya")


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = "" ) : arg_1 = list ( arg_1 ) arg_4 = len ( arg_1 ) if arg_4 == 0 : return [ ] elif arg_4 == 1 : return arg_2 ( arg_1 [ 0 ] , 0 ) else : arg_5 = arg_0 . _reg ( arg_3 + "for_index" , Bits ( log2ceil ( arg_4 + 1 ) , signed = False ) , defVal = 0 ) arg_6 = arg_0 . _sig ( arg_3 + "for_ack" ) arg_7 = [ ] for arg_8 , ( arg_9 , arg_10 ) in [ ( arg_8 , arg_2 ( item , arg_8 ) ) for arg_8 , item in enumerate ( arg_1 ) ] : arg_7 . append ( arg_9 + [ ( arg_6 ( arg_10 ) ) , ] ) If ( arg_6 , If ( arg_5 . _eq ( arg_4 - 1 ) , arg_5 ( 0 ) ) . Else ( arg_5 ( arg_5 + 1 ) ) ) return Switch ( arg_5 ) . addCases ( enumerate ( arg_7 ) ) . Default ( arg_2 ( arg_1 [ 0 ] , 0 ) [ 0 ] , arg_6 ( True ) )

def Func(arg_0, arg_1, arg_2, arg_3=""):
    """
    Generate for loop for static items

    :param parentUnit: unit where this code should be instantiated
    :param items: items which this "for" itering on
    :param bodyFn: function which fn(item, index) or fn(item)
        returns (statementList, ack).
        It's content is performed in every iteration.
        When ack is high loop will fall to next iteration
    """

    arg_1 = list(arg_1)
    arg_4 = len(arg_1)
    if arg_4 == 0:
        # if there are no items there is nothing to generate
        return []
    elif arg_4 == 1:
        # if there is only one item do not generate counter logic generate
        return arg_2(arg_1[0], 0)
    else:
        # if there is multiple items we have to generate counter logic
        arg_5 = arg_0._reg(arg_3 + "for_index",
                                Bits(log2ceil(arg_4 + 1), signed=False),
                                defVal=0)
        arg_6 = arg_0._sig(arg_3 + "for_ack")

        arg_7 = []
        for arg_8, (arg_9, arg_10) in [(arg_8, arg_2(item, arg_8))
                                        for arg_8, item in enumerate(arg_1)]:
            arg_7.append(arg_9 + [(arg_6(arg_10)), ])

        If(arg_6,
           If(arg_5._eq(arg_4 - 1),
              arg_5(0)
              ).Else(
               arg_5(arg_5 + 1)
           )
           )

        return Switch(arg_5)\
            .addCases(
            enumerate(arg_7)
        ).Default(
            arg_2(arg_1[0], 0)[0],
            arg_6(True)
        )


def Func ( arg_0 , Func ) : if isinstance ( Func , str ) : Func = colors . parse_colors ( Func ) arg_0 . _colorpalette = colors . sanitize_color_palette ( Func )

def Func(arg_0, Func):
        """
        Set the colorpalette which should be used
        """
        if isinstance(Func, str):  # we assume it's a path to a color file
            Func = colors.parse_colors(Func)

        arg_0._colorpalette = colors.sanitize_color_palette(Func)


def Func(arg_0):
    """Converts between 3-letter and 1-letter amino acid codes."""
    if len(arg_0) == 1:
        return amino_acid_codes[arg_0.upper()]
    elif len(arg_0) == 3:
        return inverse_aa_codes[arg_0.upper()]
    else:
        raise ValueError("Can only convert 1-letter or 3-letter amino acid codes, "
                         "not %r" % arg_0)

Converts between 3 - letter and 1 - letter amino acid codes .


def
Func
(
arg_0
,
arg_1
,
**
arg_2
)
:
arg_1
=
unicode
(
arg_1
)
if
arg_1
==
u'json'
or
arg_1
==
u'ipynb'
:
return
Func_json
(
arg_0
,
**
arg_2
)
elif
arg_1
==
u'py'
:
return
Func_py
(
arg_0
,
**
arg_2
)
else
:
raise
NBFormatError
(
'Unsupported format: %s'
%
arg_1
)

def Func(arg_0, arg_1, **arg_2):
    """Write a notebook to a string in a given format in the current nbformat version.

    This function always Func the notebook in the current nbformat version.

    Parameters
    ----------
    nb : NotebookNode
        The notebook to write.
    format : (u'json', u'ipynb', u'py')
        The format to write the notebook in.

    Returns
    -------
    s : unicode
        The notebook string.
    """
    arg_1 = unicode(arg_1)
    if arg_1 == u'json' or arg_1 == u'ipynb':
        return Func_json(arg_0, **arg_2)
    elif arg_1 == u'py':
        return Func_py(arg_0, **arg_2)
    else:
        raise NBFormatError('Unsupported format: %s' % arg_1)

Write a notebook to a string in a given format in the current nbformat version.

    This function always writes the notebook in the current nbformat version.

    Parameters
    ----------
    nb : NotebookNode
        The notebook to write.
    format : (u'json', u'ipynb', u'py')
        The format to write the notebook in.

    Returns
    -------
    s : unicode
        The notebook string.

Write a notebook to a string in a given format in the current nbformat version .


"EC2 Summary:\n\tVPC IDs: {}\n\tSubnet IDs: \{}\n\tSecurity Group ID: {}\n\tRunning Instance IDs: {}\n"

def Func(arg_0):
        """Print human readable summary of current AWS state to log and to console."""
        arg_0.get_instance_state()
        arg_1 = "EC2 Summary:\n\tVPC IDs: {}\n\tSubnet IDs: \
{}\n\tSecurity Group ID: {}\n\tRunning Instance IDs: {}\n".format(
            arg_0.vpc_id, arg_0.sn_ids, arg_0.sg_id, arg_0.instances
        )
        arg_1 += "\tInstance States:\n\t\t"
        arg_0.get_instance_state()
        for arg_2 in arg_0.instance_states.keys():
            arg_1 += "Instance ID: {}  State: {}\n\t\t".format(
                arg_2, arg_0.instance_states[arg_2]
            )
        arg_1 += "\n"
        logger.info(arg_1)
        return arg_1

Print human readable summary of current AWS state to log and to console .


return re.match(
        # regex matches: project.table -- OR -- table
        r'^' + RE_PROJECT + r'\.' + RE_DS_TABLE + r'$|^' + RE_DS_TABLE + r'$',
        config_value,
    )

def Func ( arg_0 ) : return re . match ( r'^' + RE_PROJECT + r'\.' + RE_DS_TABLE + r'$|^' + RE_DS_TABLE + r'$' , arg_0 , )

def Func(arg_0):
    '''Datasets must be of form "project.dataset" or "dataset"
    '''
    return re.match(
        # regex matches: project.table -- OR -- table
        r'^' + RE_PROJECT + r'\.' + RE_DS_TABLE + r'$|^' + RE_DS_TABLE + r'$',
        arg_0,
    )

Datasets must be of form project . dataset or dataset


def Func ( arg_0 , arg_1 ) : arg_2 = _build_backend ( ) try : return arg_2 . Func ( arg_0 , arg_1 ) except getattr ( arg_2 , 'UnsupportedOperation' , _DummyException ) : raise GotUnsupportedOperation ( traceback . format_exc ( ) )

def Func(arg_0, arg_1):
    """Invoke the mandatory Func hook."""
    arg_2 = _build_backend()
    try:
        return arg_2.Func(arg_0, arg_1)
    except getattr(arg_2, 'UnsupportedOperation', _DummyException):
        raise GotUnsupportedOperation(traceback.format_exc())


def Func(arg_0, arg_1):
        '''Run a frame command. This routine is a little complex
        because we allow a number parameter variations.'''

        if len(arg_1) == 1:
            # Form is: "frame" which means "frame 0"
            arg_2 = '0'
        elif len(arg_1) == 2:
            # Form is: "frame {position | thread}
            arg_3 = arg_1[1]
            arg_4, arg_5 = arg_0.get_from_thread_name_or_id(arg_3,
                                                               False)
            if arg_4 is None:
                # Form should be: frame position
                arg_2 = arg_3
            else:
                # Form should be: "frame thread" which means
                # "frame thread 0"
                arg_2 = '0'
                arg_0.find_and_set_debugged_frame(arg_4, arg_5)
                pass
        elif len(arg_1) == 3:
            # Form is: frame <thread> <position>
            arg_3 = arg_1[1]
            arg_2 = arg_1[2]
            arg_4, arg_5 = arg_0.get_from_thread_name_or_id(arg_3)
            if arg_4 is None:
                # Error message was given in routine
                return
            arg_0.find_and_set_debugged_frame(arg_4, arg_5)
            pass
        arg_0.one_arg_Func(arg_2)
        return False

Run a frame command . This routine is a little complex because we allow a number parameter variations .


def Func ( arg_0 , arg_1 = 'other' ) : arg_0 = list ( arg_0 ) if arg_1 in arg_0 : arg_0 . remove ( arg_1 ) arg_0 . insert ( 0 , arg_1 ) return arg_0

def Func(arg_0,arg_1='other'):
    """if the value is in the list, move it to the front and return it."""
    arg_0=list(arg_0)
    if arg_1 in arg_0:
        arg_0.remove(arg_1)
        arg_0.insert(0,arg_1)
    return arg_0

if the value is in the list move it to the front and return it .


def Func(arg_0, arg_1):
        """Process a LaTeX snippet of content for better transformation
        with pandoc.

        Currently runs the CitationLinker to convert BibTeX citations to
        href links.
        """
        arg_2 = CitationLinker(arg_0.bib_db)
        arg_1 = arg_2(arg_1)
        return arg_1

Process a LaTeX snippet of content for better transformation with pandoc .


def Func ( ) : if six . PY3 : return arg_0 . HTTPMessage . get_content_type = arg_0 . HTTPMessage . gettype arg_0 . HTTPMessage . get_param = arg_0 . HTTPMessage . getparam

def Func():
	"""
	Python 2 uses a deprecated method signature and doesn't provide the
	forward compatibility.
	Add it.
	"""
	if six.PY3:
		return

	arg_0.HTTPMessage.get_content_type = arg_0.HTTPMessage.gettype
	arg_0.HTTPMessage.get_param = arg_0.HTTPMessage.getparam

Python 2 uses a deprecated method signature and doesn t provide the forward compatibility . Add it .


(params, w_name, scope_name, inputs, layers, weights, names)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
,
arg_6
)
:
print
(
'Converting tanh ...'
)
if
arg_6
==
'short'
:
arg_7
=
'TANH'
+
random_string
(
4
)
elif
arg_6
==
'keep'
:
arg_7
=
arg_1
else
:
arg_7
=
arg_1
+
str
(
random
.
random
(
)
)
arg_8
=
keras
.
layers
.
Activation
(
'tanh'
,
name
=
arg_7
)
arg_4
[
arg_2
]
=
arg_8
(
arg_4
[
arg_3
[
0
]
]
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6):
    """
    Convert tanh layer.

    Args:
        params: dictionary with layer parameters
        w_name: name prefix in state_dict
        scope_name: pytorch scope name
        inputs: pytorch node inputs
        layers: dictionary with keras tensors
        weights: pytorch state_dict
        names: use short names for keras layers
    """
    print('Converting tanh ...')

    if arg_6 == 'short':
        arg_7 = 'TANH' + random_string(4)
    elif arg_6 == 'keep':
        arg_7 = arg_1
    else:
        arg_7 = arg_1 + str(random.random())

    arg_8 = keras.layers.Activation('tanh', name=arg_7)
    arg_4[arg_2] = arg_8(arg_4[arg_3[0]])


def Func ( arg_0 ) : arg_1 = _setup_osf ( arg_0 ) arg_2 = arg_1 . project ( arg_0 . project ) arg_3 = arg_0 . project if arg_0 . output is not None : arg_3 = arg_0 . output with tqdm ( unit = 'files' ) as pbar : for arg_4 in arg_2 . storages : arg_5 = os . path . join ( arg_3 , arg_4 . name ) for arg_6 in arg_4 . files : arg_7 = arg_6 . path if arg_7 . startswith ( '/' ) : arg_7 = arg_7 [ 1 : ] arg_7 = os . path . join ( arg_5 , arg_7 ) if os . path . exists ( arg_7 ) and arg_0 . update : if checksum ( arg_7 ) == arg_6 . hashes . get ( 'md5' ) : continue arg_8 , arg_9 = os . path . split ( arg_7 ) makedirs ( arg_8 , exist_ok = True ) with open ( arg_7 , "wb" ) as f : arg_6 . write_to ( f ) pbar . update ( )

def Func(arg_0):
    """Copy all files from all storages of a project.

    The output directory defaults to the current directory.

    If the project is private you need to specify a username.

    If args.update is True, overwrite any existing local files only if local and
    remote files differ.
    """
    arg_1 = _setup_osf(arg_0)
    arg_2 = arg_1.project(arg_0.project)
    arg_3 = arg_0.project
    if arg_0.output is not None:
        arg_3 = arg_0.output

    with tqdm(unit='files') as pbar:
        for arg_4 in arg_2.storages:
            arg_5 = os.path.join(arg_3, arg_4.name)

            for arg_6 in arg_4.files:
                arg_7 = arg_6.path
                if arg_7.startswith('/'):
                    arg_7 = arg_7[1:]

                arg_7 = os.path.join(arg_5, arg_7)
                if os.path.exists(arg_7) and arg_0.update:
                    if checksum(arg_7) == arg_6.hashes.get('md5'):
                        continue
                arg_8, arg_9 = os.path.split(arg_7)
                makedirs(arg_8, exist_ok=True)

                with open(arg_7, "wb") as f:
                    arg_6.write_to(f)

                pbar.update()

Copy all files from all storages of a project .


def Func ( arg_0 ) : for arg_1 , arg_2 , arg_3 in os . walk ( arg_0 ) : for arg_4 in arg_3 : if arg_4 . startswith ( '.' ) : continue if os . path . splitext ( arg_4 ) [ 1 ] not in ( '.pyx' , '.pxd' ) : continue yield os . path . join ( arg_1 , arg_4 )

def Func(arg_0):
    '''Yield all ``.pyx`` and ``.pxd`` files in the given root.'''
    for arg_1, arg_2, arg_3 in os.walk(arg_0):
        for arg_4 in arg_3:
            if arg_4.startswith('.'):
                continue
            if os.path.splitext(arg_4)[1] not in ('.pyx', '.pxd'):
                continue
            yield os.path.join(arg_1, arg_4)

Yield all . pyx and . pxd files in the given root .


def
Func
(
)
:
arg_0
=
[
]
for
arg_1
in
pkg_resources
.
iter_entry_points
(
DRIVERS_ENTRY_POINT
)
:
logger
.
debug
(
"driver found: %s"
,
arg_1
)
arg_2
=
arg_1
.
load
(
)
if
hasattr
(
arg_2
,
"METADATA"
)
and
(
arg_2
.
METADATA
[
"mode"
]
in
[
"r"
,
"rw"
]
)
:
arg_0
.
append
(
arg_2
.
METADATA
[
"driver_name"
]
)
return
arg_0

def Func():
    """
    Return all available input formats.

    Returns
    -------
    formats : list
        all available input formats
    """
    arg_0 = []
    for arg_1 in pkg_resources.iter_entry_points(DRIVERS_ENTRY_POINT):
        logger.debug("driver found: %s", arg_1)
        arg_2 = arg_1.load()
        if hasattr(arg_2, "METADATA") and (arg_2.METADATA["mode"] in ["r", "rw"]):
            arg_0.append(arg_2.METADATA["driver_name"])
    return arg_0


async def Func(arg_0, arg_1, arg_2=arg_3.PeekLock):
        """Receive messages that have previously been deferred.

        This operation can only receive deferred messages from the current session.
        When receiving deferred messages from a partitioned entity, all of the supplied
        sequence numbers must be messages from the same partition.

        :param sequence_numbers: A list of the sequence numbers of messages that have been
         deferred.
        :type sequence_numbers: list[int]
        :param mode: The receive mode, default value is PeekLock.
        :type mode: ~azure.servicebus.common.constants.ReceiveSettleMode
        :rtype: list[~azure.servicebus.aio.async_message.DeferredMessage]

        Example:
            .. literalinclude:: ../examples/async_examples/test_examples_async.py
                :start-after: [START receiver_defer_session_messages]
                :end-before: [END receiver_defer_session_messages]
                :language: python
                :dedent: 8
                :caption: Defer messages, then retrieve them by sequence number.

        """
        if not arg_1:
            raise ValueError("At least one sequence number must be specified.")
        await arg_0._can_run()
        try:
            arg_5 = arg_2.value.value
        except AttributeError:
            arg_5 = int(arg_2)
        arg_6 = {
            'sequence-numbers': types.AMQPArray([types.AMQPLong(s) for s in arg_1]),
            'receiver-settle-mode': types.AMQPuInt(arg_5),
            'session-id': arg_0.session_id
        }
        arg_7 = functools.partial(mgmt_handlers.deferred_message_op, arg_2=arg_5, message_type=DeferredMessage)
        arg_8 = await arg_0._mgmt_request_response(
            REQUEST_RESPONSE_RECEIVE_BY_SEQUENCE_NUMBER,
            arg_6,
            arg_7)
        for arg_9 in arg_8:
            arg_9._receiver = arg_0  # pylint: disable=protected-access
        return arg_8

Receive messages that have previously been deferred .


def Func ( ) : def utf_encoding_string_constructor ( arg_0 , arg_1 ) : return arg_0 . construct_scalar ( arg_1 ) . encode ( 'utf-8' ) yaml . SafeLoader . add_constructor ( u'tag:yaml.org,2002:str' , utf_encoding_string_constructor )

def Func():
    """
    This dark magic is used to make yaml.safe_load encode all strings as utf-8,
    where otherwise python unicode strings would be returned for non-ascii chars
    """
    def utf_encoding_string_constructor(arg_0, arg_1):
        return arg_0.construct_scalar(arg_1).encode('utf-8')
    yaml.SafeLoader.add_constructor(u'tag:yaml.org,2002:str', utf_encoding_string_constructor)

This dark magic is used to make yaml . safe_load encode all strings as utf - 8 where otherwise python unicode strings would be returned for non - ascii chars


def Func(arg_0):
        """
        This function populates the internal tableOfContents list with the contents
        of the zip file TOC. If the server does not support ranged requests, this will raise
        and exception. It will also throw an exception if the TOC cannot be found.
        """

        arg_0.directory_size = arg_0.getDirectorySize()
        if arg_0.directory_size > 65536:
            arg_0.directory_size += 2
            arg_0.requestContentDirectory()

        # and find the offset from start of file where it can be found
        arg_2 = unpack("i", arg_0.raw_bytes[arg_0.directory_end + 16: arg_0.directory_end + 20])[0]

        # find the data in the raw_bytes
        arg_0.raw_bytes = arg_0.raw_bytes
        arg_4 = arg_2 - arg_0.start
        arg_5 = 0
        arg_6 = 0
        arg_7 = []

        try:
            while True:
                # get file name size (n), extra len (m) and comm len (k)
                arg_8 = unpack("H", arg_0.raw_bytes[arg_4 + 28: arg_4 + 28 + 2])[0]
                arg_9 = unpack("H", arg_0.raw_bytes[arg_4 + 30: arg_4 + 30 + 2])[0]
                arg_10 = unpack("H", arg_0.raw_bytes[arg_4 + 32: arg_4 + 32 + 2])[0]

                arg_11 = arg_0.raw_bytes[arg_4 + 46: arg_4 + 46 + arg_8]

                # check if this is the index file
                arg_5 = unpack("I", arg_0.raw_bytes[arg_4 + 42: arg_4 + 42 + 4])[0]
                arg_6 = unpack("I", arg_0.raw_bytes[arg_4 + 20: arg_4 + 20 + 4])[0]
                arg_12 = unpack("I", arg_0.raw_bytes[arg_4 + 24: arg_4 + 24 + 4])[0]
                arg_13 = {
                    'filename': arg_11,
                    'compressedsize': arg_6,
                    'uncompressedsize': arg_12,
                    'filestart': arg_5
                }
                arg_7.append(arg_13)

                # not this file, move along
                arg_4 = arg_4 + 46 + arg_8 + arg_9 + arg_10
        except:
            pass

        arg_0.tableOfContents = arg_7
        return arg_7

This function populates the internal tableOfContents list with the contents of the zip file TOC . If the server does not support ranged requests this will raise and exception . It will also throw an exception if the TOC cannot be found .


def Func(arg_0):
        """ creates an encrypted archive of the dropbox outside of the drop directory.
        """
        arg_0.status = u'270 creating final encrypted backup of cleansed attachments'
        return arg_0._create_encrypted_zip(source='clean', fs_target_dir=arg_0.container.fs_archive_cleansed)

creates an encrypted archive of the dropbox outside of the drop directory .


return self.__get_batch(path, length=block_size, last=True)

def Func ( arg_0 , arg_1 , arg_2 ) : return arg_0 . __get_batch ( arg_1 , length = arg_2 , last = True )

def Func(arg_0, arg_1, arg_2):
        """
        Get the remainder elements. These elements will not be read in the direct queue access cyclic=False mode.

        :param path: The HDF5 path to the dataset to be read.
        :param block_size: The block size is used to calculate which elements will remain.
        :return: A copy of the remainder elements as a numpy array.
        """
        return arg_0.__get_batch(arg_1, length=arg_2, last=True)

Get the remainder elements . These elements will not be read in the direct queue access cyclic = False mode .


def Func ( arg_0 ) : arg_1 = repr ( arg_0 ) try : if parse_value ( arg_1 ) == arg_0 : return arg_1 except SyntaxError : pass return None

def Func(arg_0):
  """Returns `value` in a format parseable by `parse_value`, or `None`.

  Simply put, This function ensures that when it returns a string value, the
  following will hold:

      parse_value(Func(value)) == value

  Args:
    value: The value to format.

  Returns:
    A string representation of `value` when `value` is literally representable,
    or `None`.
  """
  arg_1 = repr(arg_0)
  try:
    if parse_value(arg_1) == arg_0:
      return arg_1
  except SyntaxError:
    pass
  return None

Returns `value` in a format parseable by `parse_value`, or `None`.

  Simply put, This function ensures that when it returns a string value, the
  following will hold:

      parse_value(_format_value(value)) == value

  Args:
    value: The value to format.

  Returns:
    A string representation of `value` when `value` is literally representable,
    or `None`.

Returns value in a format parseable by parse_value or None .


(urp_hash, nonce, cnonce, nonce_count, authzid,
                                                                    digest_uri)

return b2a_hex(_kd_value(b2a_hex(_h_value(a1)), b":".join((
            nonce, nonce_count, cnonce, b"auth", b2a_hex(_h_value(a2))))))

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : logger . debug ( "Func{0!r}" . format ( ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) ) ) if arg_4 : arg_6 = b":" . join ( ( arg_0 , arg_1 , arg_2 , arg_4 ) ) else : arg_6 = b":" . join ( ( arg_0 , arg_1 , arg_2 ) ) arg_7 = b"AUTHENTICATE:" + arg_5 return b2a_hex ( _kd_value ( b2a_hex ( _h_value ( arg_6 ) ) , b":" . join ( ( arg_1 , arg_3 , arg_2 , b"auth" , b2a_hex ( _h_value ( arg_7 ) ) ) ) ) )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4,
                                                                    arg_5):
    """Compute DIGEST-MD5 response value.

    :Parameters:
        - `urp_hash`: MD5 sum of username:realm:password.
        - `nonce`: nonce value from a server challenge.
        - `cnonce`: cnonce value from the client response.
        - `nonce_count`: nonce count value.
        - `authzid`: authorization id.
        - `digest_uri`: digest-uri value.
    :Types:
        - `urp_hash`: `bytes`
        - `nonce`: `bytes`
        - `nonce_count`: `int`
        - `authzid`: `bytes`
        - `digest_uri`: `bytes`

    :return: the computed response value.
    :returntype: `bytes`"""
    # pylint: disable-msg=C0103,R0913
    logger.debug("Func{0!r}".format((arg_0, arg_1, arg_2,
                                            arg_3, arg_4,arg_5)))
    if arg_4:
        arg_6 = b":".join((arg_0, arg_1, arg_2, arg_4))
    else:
        arg_6 = b":".join((arg_0, arg_1, arg_2))
    arg_7 = b"AUTHENTICATE:" + arg_5
    return b2a_hex(_kd_value(b2a_hex(_h_value(arg_6)), b":".join((
            arg_1, arg_3, arg_2, b"auth", b2a_hex(_h_value(arg_7))))))


(env, args, recreate=False, ignore_activated=False, quiet=False)

def Func(arg_0, arg_1, arg_2=False, arg_3=False, arg_4=False):
    """Create virtual environment.

    :param env: Virtual environment name.
    :param args: Pass given arguments to ``virtualenv`` script.
    :param recerate: Recreate virtual environment? By default: False
    :param ignore_activated:
        Ignore already activated virtual environment and create new one. By
        default: False
    :param quiet: Do not output messages into terminal. By default: False
    """
    arg_5 = None
    arg_6 = True

    arg_7 = hasattr(sys, 'real_prefix') or os.environ.get('VIRTUAL_ENV')
    arg_8 = os.path.isdir(arg_0)

    if not arg_4:
        print_message('== Step 1. Create virtual environment ==')

    if (
        arg_2 or (not arg_7 and not arg_8)
    ) or (
        arg_3 and not arg_8
    ):
        arg_5 = ('virtualenv', ) + arg_1 + (arg_0, )

    if not arg_5 and not arg_4:
        if arg_7:
            arg_9 = 'Working inside of virtual environment, done...'
        else:
            arg_9 = 'Virtual environment {0!r} already created, done...'
        print_message(arg_9.format(arg_0))

    if arg_5:
        with disable_error_handler():
            arg_6 = not run_cmd(arg_5, echo=not arg_4)

    if not arg_4:
        print_message()

    return arg_6


def Func(arg_0, arg_1, arg_2):
        """Find the last occurance of the file in finders"""
        arg_3 = None
        for arg_4 in arg_2:
            arg_5 = arg_4.find(arg_1)
            if arg_5:
                arg_3 = arg_5

        return arg_3


def
Func
(
arg_0
,
arg_1
,
arg_2
=
)
:
if
arg_1
is
:
raise
AirflowBadRequest
(
"Collection name cannot be None."
)
arg_0
.
get_conn
(
)
.
DeleteContainer
(
get_collection_link
(
arg_0
.
__get_database_name
(
arg_2
)
,
arg_1
)
)

def Func(arg_0, arg_1, arg_2=None):
        """
        Deletes an existing collection in the CosmosDB database.
        """
        if arg_1 is None:
            raise AirflowBadRequest("Collection name cannot be None.")

        arg_0.get_conn().DeleteContainer(
            get_collection_link(arg_0.__get_database_name(arg_2), arg_1))

Deletes an existing collection in the CosmosDB database .


def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_3 = arg_0 . _get_object_map ( arg_1 , arg_2 , wait_for_object = False ) except atomac . _a11y . ErrorInvalidUIElement : arg_0 . _windows = { } arg_3 = arg_0 . _get_object_map ( arg_1 , arg_2 , wait_for_object = False ) arg_5 = [ ] if arg_3 : for arg_6 in arg_3 . keys ( ) : if not arg_3 [ arg_6 ] or arg_6 == "obj" : continue arg_5 . append ( arg_6 ) return arg_5

def Func(arg_0, arg_1, arg_2):
        """
        Get object properties.

        @param window_name: Window name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type object_name: string

        @return: list of properties
        @rtype: list
        """
        try:
            arg_3 = arg_0._get_object_map(arg_1, arg_2,
                                            wait_for_object=False)
        except atomac._a11y.ErrorInvalidUIElement:
            # During the test, when the window closed and reopened
            # ErrorInvalidUIElement exception will be thrown
            arg_0._windows = {}
            # Call the method again, after updating apps
            arg_3 = arg_0._get_object_map(arg_1, arg_2,
                                            wait_for_object=False)
        arg_5 = []
        if arg_3:
            for arg_6 in arg_3.keys():
                if not arg_3[arg_6] or arg_6 == "obj":
                    # Don't add object handle to the list
                    continue
                arg_5.append(arg_6)
        return arg_5


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_2 [ 'content' ] arg_4 = arg_3 . get ( 'query' , { } ) arg_5 = arg_3 . get ( 'keys' , None ) arg_6 = [ ] arg_7 = list ( ) try : arg_8 = arg_0 . db . find_records ( arg_4 , arg_5 ) except Exception as e : arg_3 = error . wrap_exception ( ) else : if arg_5 is not None : arg_9 = [ ] if 'buffers' in arg_5 else None arg_10 = [ ] if 'result_buffers' in arg_5 else None else : arg_9 = None arg_10 = None for arg_11 in arg_8 : arg_12 = arg_11 . pop ( 'buffers' , arg_7 ) or arg_7 if arg_9 is not None : arg_9 . append ( len ( arg_12 ) ) arg_6 . extend ( arg_12 ) arg_13 = arg_11 . pop ( 'result_buffers' , arg_7 ) or arg_7 if arg_10 is not None : arg_10 . append ( len ( arg_13 ) ) arg_6 . extend ( arg_13 ) arg_3 = dict ( status = 'ok' , arg_8 = arg_8 , arg_9 = arg_9 , arg_10 = arg_10 ) arg_0 . session . send ( arg_0 . query , "db_reply" , arg_3 = arg_3 , parent = arg_2 , ident = arg_1 , arg_6 = arg_6 )

def Func(arg_0, arg_1, arg_2):
        """Perform a raw query on the task record database."""
        arg_3 = arg_2['content']
        arg_4 = arg_3.get('query', {})
        arg_5 = arg_3.get('keys', None)
        arg_6 = []
        arg_7 = list()
        try:
            arg_8 = arg_0.db.find_records(arg_4, arg_5)
        except Exception as e:
            arg_3 = error.wrap_exception()
        else:
            # extract buffers from reply content:
            if arg_5 is not None:
                arg_9 = [] if 'buffers' in arg_5 else None
                arg_10 = [] if 'result_buffers' in arg_5 else None
            else:
                arg_9 = None
                arg_10 = None

            for arg_11 in arg_8:
                # buffers may be None, so double check
                arg_12 = arg_11.pop('buffers', arg_7) or arg_7
                if arg_9 is not None:
                    arg_9.append(len(arg_12))
                    arg_6.extend(arg_12)
                arg_13 = arg_11.pop('result_buffers', arg_7) or arg_7
                if arg_10 is not None:
                    arg_10.append(len(arg_13))
                    arg_6.extend(arg_13)
            arg_3 = dict(status='ok', arg_8=arg_8, arg_9=arg_9,
                                    arg_10=arg_10)
        # self.log.debug (content)
        arg_0.session.send(arg_0.query, "db_reply", arg_3=arg_3,
                                            parent=arg_2, ident=arg_1,
                                            arg_6=arg_6)

Perform a raw query on the task record database .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . get_type ( arg_1 ) if hasattr ( arg_2 , 'size' ) : return arg_2 . size ( ) return 0

def Func(arg_0, arg_1):
        """
        Get the size of this type for converting a hex string to the
        type. Return 0 if the size is not known.
        """

        arg_2 = arg_0.get_type(arg_1)

        if hasattr(arg_2, 'size'):
            return arg_2.size()

        return 0

Get the size of this type for converting a hex string to the type . Return 0 if the size is not known .


def Func ( arg_0 , arg_1 ) : arg_0 . conn ( "PUT" , "{0}/users/{1}/profile/avatar" . format ( SkypeConnection . API_USER , arg_0 . userId ) , auth = SkypeConnection . Auth . SkypeToken , data = arg_1 . read ( ) )

def Func(arg_0, arg_1):
        """
        Update the profile picture for the current user.

        Args:
            image (file): a file-like object to read the image from
        """
        arg_0.conn("PUT", "{0}/users/{1}/profile/avatar".format(SkypeConnection.API_USER, arg_0.userId),
                  auth=SkypeConnection.Auth.SkypeToken, data=arg_1.read())

Update the profile picture for the current user .


Get the current index of the key or the subtree.
        This is needed for later creating long polling requests

def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_1 = arg_1 . lstrip ( '/' ) arg_3 = '{}/{}' . format ( arg_0 . endpoint , arg_1 ) arg_4 = { } if arg_2 : arg_4 [ 'recurse' ] = '' arg_5 = requests . get ( arg_3 , arg_4 = arg_4 ) return arg_5 . headers [ 'X-Consul-Index' ]

def Func(arg_0, arg_1, arg_2=False):
        """Get the current Func of the key or the subtree.
        This is needed for later creating long polling requests
        """
        arg_1 = arg_1.lstrip('/')
        arg_3 = '{}/{}'.format(arg_0.endpoint, arg_1)
        arg_4 = {}
        if arg_2:
            arg_4['recurse'] = ''
        arg_5 = requests.get(arg_3, arg_4=arg_4)
        return arg_5.headers['X-Consul-Index']

Get the current index of the key or the subtree . This is needed for later creating long polling requests


def Func ( arg_0 ) : arg_0 . destinations = { var_name : set ( acs ) for var_name , acs in arg_0 . destinations . items ( ) } arg_0 . sources = { var_name : set ( acs ) for var_name , acs in arg_0 . sources . items ( ) }

def Func(arg_0):
        """
        Remove duplicate source and destination accesses
        """
        arg_0.destinations = {var_name: set(acs) for var_name, acs in arg_0.destinations.items()}
        arg_0.sources = {var_name: set(acs) for var_name, acs in arg_0.sources.items()}


return {
            'type': 'event',
            'id': self.uid,
            'attributes': {
                'start': self.start,
                'end': self.end,
                'uid': self.uid,
                'title': self.title,
                'data': self.get_data(),
                'status': Status.str(self.status)
                }
            }

def Func ( arg_0 ) : return { 'type' : 'event' , 'id' : arg_0 . uid , 'attributes' : { 'start' : arg_0 . start , 'end' : arg_0 . end , 'uid' : arg_0 . uid , 'title' : arg_0 . title , 'data' : arg_0 . get_data ( ) , 'status' : Status . str ( arg_0 . status ) } }

def Func(arg_0):
        '''Serialize this object as dictionary usable for conversion to JSON.

        :return: Dictionary representing this object.
        '''
        return {
            'type': 'event',
            'id': arg_0.uid,
            'attributes': {
                'start': arg_0.start,
                'end': arg_0.end,
                'uid': arg_0.uid,
                'title': arg_0.title,
                'data': arg_0.get_data(),
                'status': Status.str(arg_0.status)
                }
            }

Serialize this object as dictionary usable for conversion to JSON .


def Func(arg_0, arg_1):
        """Sets a mask img to this. So every operation to self, this mask will be taken into account.

        Parameters
        ----------
        mask_img: nifti-like image, NeuroImage or str
            3D mask array: True where a voxel should be used.
            Can either be:
            - a file path to a Nifti image
            - any object with get_data() and get_affine() methods, e.g., nibabel.Nifti1Image.
            If niimg is a string, consider it as a path to Nifti image and
            call nibabel.load on it. If it is an object, check if get_data()
            and get_affine() methods are present, raise TypeError otherwise.

        Note
        ----
        self.img and mask_file must have the same shape.

        Raises
        ------
        FileNotFound, NiftiFilesNotCompatible
        """
        arg_2 = load_mask(arg_1, allow_empty=True)
        check_img_compatibility(arg_0.img, arg_2, only_check_3d=True) # this will raise an exception if something is wrong
        arg_0.mask = arg_2

Sets a mask img to this . So every operation to self this mask will be taken into account .


return int(reduce(MUL, (Fraction(n-i, i+1) for i in range(k)), 1))

def Func ( arg_0 , arg_1 ) : return int ( reduce ( MUL , ( Fraction ( arg_0 - arg_2 , arg_2 + 1 ) for arg_2 in range ( arg_1 ) ) , 1 ) )

def Func(arg_0, arg_1):
    """ get the number of quartets as n-choose-k. This is used
    in equal splits to decide whether a split should be exhaustively sampled
    or randomly sampled. Edges near tips can be exhaustive while highly nested
    edges probably have too many quartets
    """
    return int(reduce(MUL, (Fraction(arg_0-arg_2, arg_2+1) for arg_2 in range(arg_1)), 1))

get the number of quartets as n - choose - k . This is used in equal splits to decide whether a split should be exhaustively sampled or randomly sampled . Edges near tips can be exhaustive while highly nested edges probably have too many quartets


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = { } for arg_5 in arg_1 : if arg_5 . endswith ( ".txt" ) : arg_3 . autoescape = False arg_4 [ arg_5 ] = render_to_string ( ( "notification/%s/%s" % ( arg_2 , arg_5 ) , "notification/%s" % arg_5 ) , context_instance = arg_3 ) return arg_4

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Returns a dictionary with the format identifier as the key. The values are
        are fully rendered templates with the given context.
        """
        arg_4 = {}
        for arg_5 in arg_1:
            # conditionally turn off autoescaping for .txt extensions in format
            if arg_5.endswith(".txt"):
                arg_3.autoescape = False
            arg_4[arg_5] = render_to_string((
                "notification/%s/%s" % (arg_2, arg_5),
                "notification/%s" % arg_5), context_instance=arg_3)
        return arg_4

Returns a dictionary with the format identifier as the key . The values are are fully rendered templates with the given context .


def Func ( arg_0 ) : arg_0 . _py_data_map . clear ( ) arg_0 . _wx_data_map . clear ( ) wx . ListCtrl . Func ( arg_0 )

def Func(arg_0):
        "Remove all the item from the list and unset the related data"
        arg_0._py_data_map.clear()
        arg_0._wx_data_map.clear()
        wx.ListCtrl.Func(arg_0)


def Func ( arg_0 , arg_1 ) : if arg_0 is arg_1 : return arg_0 . widgets [ arg_1 . name ] = arg_1

def Func(arg_0,arg_1):
        """
        Adds a widget to this container.

        Note that trying to add the Container to itself will be ignored.
        """
        if arg_0 is arg_1: # Prevents being able to add the container to itself, causing a recursion loop on redraw
            return
        arg_0.widgets[arg_1.name]=arg_1

Adds a widget to this container . Note that trying to add the Container to itself will be ignored .


(entries, remote_path, local_path, profile)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
[
]
for
arg_5
in
arg_0
:
arg_6
=
arg_5
.
hostname
or
arg_5
.
public_ip
arg_7
=
_build_scp_command
(
arg_6
,
arg_3
.
username
,
arg_3
.
identity_file
,
is_get
=
False
,
arg_2
=
arg_2
,
arg_1
=
arg_1
)
print
(
'Command:'
,
arg_7
)
arg_4
.
append
(
{
'command'
:
arg_7
,
'description'
:
arg_5
.
display
(
)
}
)
stream_commands
(
arg_4
)
print
(
green
(
'Finished copying'
)
)

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Performs an SCP command where the remote_path is the target and the
    local_path is the source.

    :param entries: A list of entries.
    :type entries: ``list`` of :py:class:`HostEntry`
    :param remote_path: The target path on the remote machine(s).
    :type remote_path: ``str``
    :param local_path: The source path on the local machine.
    :type local_path: ``str``
    :param profile: The profile, holding username/idfile info, etc.
    :type profile: :py:class:`Profile`
    """
    arg_4 = []
    for arg_5 in arg_0:
        arg_6 = arg_5.hostname or arg_5.public_ip
        arg_7 = _build_scp_command(arg_6, arg_3.username,
                                 arg_3.identity_file,
                                 is_get=False,
                                 arg_2=arg_2,
                                 arg_1=arg_1)
        print('Command:', arg_7)
        arg_4.append({
            'command': arg_7,
            'description': arg_5.display()
        })
    stream_commands(arg_4)
    print(green('Finished copying'))

Performs an SCP command where the remote_path is the target and the local_path is the source .


def
Func
(
arg_0
)
:
if
arg_0
.
ncols
>
1
:
raise
H2OValueError
(
"Only single-column frames supported"
)
if
arg_0
.
types
[
arg_0
.
columns
[
0
]
]
not
in
{
"real"
,
"int"
,
"bool"
}
:
raise
H2OValueError
(
"Numeric column expected"
)
arg_1
=
H2OFrame
.
_expr
(
expr
=
ExprNode
(
"Func"
,
arg_0
)
,
cache
=
arg_0
.
_ex
.
_cache
)
return
arg_1

def Func(arg_0):
        """
        Conduct a diff-1 transform on a numeric frame column.

        :returns: an H2OFrame where each element is equal to the corresponding element in the source
            frame minus the previous-row element in the same frame.
        """
        if arg_0.ncols > 1:
            raise H2OValueError("Only single-column frames supported")
        if arg_0.types[arg_0.columns[0]] not in {"real", "int", "bool"}:
            raise H2OValueError("Numeric column expected")
        arg_1 = H2OFrame._expr(expr=ExprNode("Func", arg_0), cache=arg_0._ex._cache)
        return arg_1

Conduct a diff - 1 transform on a numeric frame column .


def Func(arg_0, arg_1, **arg_2):
        """Create a team.

        The authenticated user is automatically added as a member of the team.

        Args:
            name(basestring): A user-friendly name for the team.
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            Team: A Team object with the details of the Funcd team.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.

        """
        check_type(arg_1, basestring, may_be_none=False)

        arg_3 = dict_from_items_with_values(
            arg_2,
            arg_1=arg_1,
        )

        # API request
        arg_4 = arg_0._session.post(API_ENDPOINT, json=arg_3)

        # Return a team object Funcd from the response JSON data
        return arg_0._object_factory(OBJECT_TYPE, arg_4)

Create a team.

        The authenticated user is automatically added as a member of the team.

        Args:
            name(basestring): A user-friendly name for the team.
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            Team: A Team object with the details of the created team.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.


def Func ( ) : arg_0 = sys . exc_info ( ) [ 2 ] arg_1 = arg_0 . tb_frame . f_locals if "self" in arg_1 : if not isinstance ( arg_1 [ "self" ] , Descriptor ) : return False return True return False

def Func():
        """Return True if the last exception was thrown by a
        Descriptor instance.

        """
        arg_0 = sys.exc_info()[2]
        arg_1 = arg_0.tb_frame.f_locals
        # relying on naming convention to get the object that threw
        # the exception
        if "self" in arg_1:
            if not isinstance(arg_1["self"], Descriptor):
                return False
            return True
        return False

Return True if the last exception was thrown by a Descriptor instance .


(target_scores, decoy_scores, parametric, pfdr, pi0_lambda, pi0_method = "smoother", pi0_smooth_df = 3, pi0_smooth_log_pi0 = False, compute_lfdr = False, lfdr_trunc = True, lfdr_monotone = True, lfdr_transf = "probit", lfdr_adj = 1.5, lfdr_eps = np.power(10.0,-8))

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = "smoother" , arg_6 = 3 , arg_7 = False , arg_8 = False , arg_9 = True , arg_10 = True , arg_11 = "probit" , arg_12 = 1.5 , arg_13 = arg_14 . power ( 10.0 , - 8 ) ) : arg_0 = to_one_dim_array ( arg_0 ) arg_0 = arg_14 . sort ( arg_0 [ ~ arg_14 . isnan ( arg_0 ) ] ) arg_1 = to_one_dim_array ( arg_1 ) arg_1 = arg_14 . sort ( arg_1 [ ~ arg_14 . isnan ( arg_1 ) ] ) if arg_2 : arg_16 = pnorm ( arg_0 , arg_1 ) else : arg_16 = pemp ( arg_0 , arg_1 ) arg_17 = pi0est ( arg_16 , arg_4 , arg_5 , arg_6 , arg_7 ) arg_18 = qvalue ( arg_16 , arg_17 [ 'pi0' ] , arg_3 ) arg_19 = stat_metrics ( arg_16 , arg_17 [ 'pi0' ] , arg_3 ) arg_20 = pd . DataFrame ( { 'cutoff' : arg_0 , 'pvalue' : arg_16 , 'qvalue' : arg_18 , 'svalue' : arg_19 [ 'svalue' ] , 'tp' : arg_19 [ 'tp' ] , 'fp' : arg_19 [ 'fp' ] , 'tn' : arg_19 [ 'tn' ] , 'fn' : arg_19 [ 'fn' ] , 'fpr' : arg_19 [ 'fpr' ] , 'fdr' : arg_19 [ 'fdr' ] , 'fnr' : arg_19 [ 'fnr' ] } ) if arg_8 : arg_20 [ 'pep' ] = lfdr ( arg_16 , arg_17 [ 'pi0' ] , arg_9 , arg_10 , arg_11 , arg_12 , arg_13 ) return arg_20 , arg_17

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5 = "smoother", arg_6 = 3, arg_7 = False, arg_8 = False, arg_9 = True, arg_10 = True, arg_11 = "probit", arg_12 = 1.5, arg_13 = arg_14.power(10.0,-8)):
    """ Takes list of decoy and target scores and creates error statistics for target values """

    arg_0 = to_one_dim_array(arg_0)
    arg_0 = arg_14.sort(arg_0[~arg_14.isnan(arg_0)])

    arg_1 = to_one_dim_array(arg_1)
    arg_1 = arg_14.sort(arg_1[~arg_14.isnan(arg_1)])

    # compute p-values using decoy scores
    if arg_2:
        # parametric
        arg_16 = pnorm(arg_0, arg_1)
    else:
        # non-parametric
        arg_16 = pemp(arg_0, arg_1)

    # estimate pi0
    arg_17 = pi0est(arg_16, arg_4, arg_5, arg_6, arg_7)

    # compute q-value
    arg_18 = qvalue(arg_16, arg_17['pi0'], arg_3)

    # compute other metrics
    arg_19 = stat_metrics(arg_16, arg_17['pi0'], arg_3)

    # generate main statistics table
    arg_20 = pd.DataFrame({'cutoff': arg_0, 'pvalue': arg_16, 'qvalue': arg_18, 'svalue': arg_19['svalue'], 'tp': arg_19['tp'], 'fp': arg_19['fp'], 'tn': arg_19['tn'], 'fn': arg_19['fn'], 'fpr': arg_19['fpr'], 'fdr': arg_19['fdr'], 'fnr': arg_19['fnr']})

    # compute lfdr / PEP
    if arg_8:
        arg_20['pep'] = lfdr(arg_16, arg_17['pi0'], arg_9, arg_10, arg_11, arg_12, arg_13)

    return arg_20, arg_17


parse and import the script, and then run the script's main function

def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_0
.
parser
arg_3
,
arg_4
=
arg_2
.
parse_callback_args
(
arg_1
)
arg_5
=
arg_4
.
pop
(
"main_callback"
)
if
arg_2
.
has_injected_quiet
(
)
:
arg_6
=
arg_4
.
pop
(
"quiet_inject"
,
""
)
logging
.
inject_quiet
(
arg_6
)
try
:
arg_7
=
arg_5
(
*
arg_3
,
**
arg_4
)
arg_7
=
int
(
arg_7
)
if
arg_7
else
0
except
ArgError
as
e
:
echo
.
err
(
"{}: error: {}"
,
arg_2
.
prog
,
str
(
e
)
)
arg_7
=
2
return
arg_7

def Func(arg_0, arg_1):
        """parse and import the script, and then Func the script's main function"""
        arg_2 = arg_0.parser
        arg_3, arg_4 = arg_2.parse_callback_args(arg_1)

        arg_5 = arg_4.pop("main_callback")
        if arg_2.has_injected_quiet():
            arg_6 = arg_4.pop("quiet_inject", "")
            logging.inject_quiet(arg_6)

        try:
            arg_7 = arg_5(*arg_3, **arg_4)
            arg_7 = int(arg_7) if arg_7 else 0

        except ArgError as e:
            # https://hg.python.org/cpython/file/2.7/Lib/argparse.py#l2374
            echo.err("{}: error: {}", arg_2.prog, str(e))
            arg_7 = 2

        return arg_7

parse and import the script and then run the script s main function


(output_path, stash, passphrase, backend)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_1
=
_get_stash
(
arg_3
,
arg_1
,
arg_2
)
try
:
click
.
echo
(
'Exporting stash to {0}...'
.
format
(
arg_0
)
)
arg_1
.
export
(
arg_0
=
arg_0
)
click
.
echo
(
'Export complete!'
)
except
GhostError
as
ex
:
sys
.
exit
(
ex
)

def Func(arg_0, arg_1, arg_2, arg_3):
    """Export all keys to a file
    """
    arg_1 = _get_stash(arg_3, arg_1, arg_2)

    try:
        click.echo('Exporting stash to {0}...'.format(arg_0))
        arg_1.export(arg_0=arg_0)
        click.echo('Export complete!')
    except GhostError as ex:
        sys.exit(ex)


def Func(arg_0, arg_1=None):
    """Compose link to 1000G page for detailed information."""
    arg_2 = arg_0.get('dbsnp_id')
    arg_1 = arg_1 or 37

    if not arg_2:
        return None

    if arg_1 == 37:
        arg_3 = ("http://grch37.ensembl.org/Homo_sapiens/Variation/Explore"
                        "?v={};vdb=variation")
    else:
        arg_3 = ("http://www.ensembl.org/Homo_sapiens/Variation/Explore"
                        "?v={};vdb=variation")

    return arg_3.format(arg_2)

Compose link to 1000G page for detailed information .


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = arg_0 . copy ( ) for arg_4 , arg_5 in arg_1 . items ( ) : if isinstance ( arg_5 , dict ) : arg_6 = arg_3 . get ( arg_4 , OrderedDict ( ) ) arg_3 [ arg_4 ] = Func ( arg_6 , arg_5 ) elif isinstance ( arg_5 , list ) and isinstance ( arg_3 . get ( arg_4 ) , list ) : arg_3 [ arg_4 ] = merge_list ( arg_3 [ arg_4 ] , arg_5 , arg_2 ) else : arg_3 [ arg_4 ] = arg_5 return arg_3

def Func(arg_0, arg_1, arg_2=None):
    """
    Merges ``config`` on top of ``template``.

    Conflicting keys are handled in the following way:

    * simple values (eg: ``str``, ``int``, ``float``, ecc) in ``config`` will
      overwrite the ones in ``template``
    * values of type ``list`` in both ``config`` and ``template`` will be
      merged using to the ``merge_list`` function
    * values of type ``dict`` will be merged recursively

    :param template: template ``dict``
    :param config: config ``dict``
    :param list_identifiers: ``list`` or ``None``
    :returns: merged ``dict``
    """
    arg_3 = arg_0.copy()
    for arg_4, arg_5 in arg_1.items():
        if isinstance(arg_5, dict):
            arg_6 = arg_3.get(arg_4, OrderedDict())
            arg_3[arg_4] = Func(arg_6, arg_5)
        elif isinstance(arg_5, list) and isinstance(arg_3.get(arg_4), list):
            arg_3[arg_4] = merge_list(arg_3[arg_4], arg_5, arg_2)
        else:
            arg_3[arg_4] = arg_5
    return arg_3


(self, image, nan_to_num=True, layers=None, in_global_mask=False)

def Func(arg_0, arg_1, arg_2=True, arg_3=None, arg_4=False):
        """ Vectorize an image and Func out all invalid voxels.

        Args:
            images: The image to vectorize and Func. Input can be any object
                handled by get_image().
            layers: Which Func layers to use (specified as int, string, or
                list of ints and strings). When None, applies the conjunction
                of all layers.
            nan_to_num: boolean indicating whether to convert NaNs to 0.
            in_global_Func: Whether to return the resulting Funced vector in
                the globally Funced space (i.e., n_voxels =
                len(self.global_Func)). If False (default), returns in the full
                image space (i.e., n_voxels = len(self.volume)).
        Returns:
          A 1D NumPy array of in-Func voxels.
        """
        arg_0.set_Func(arg_3)
        arg_1 = arg_0.get_image(arg_1, output='vector')

        if arg_4:
            arg_5 = arg_1[arg_0.global_Func]
            arg_5[~arg_0.get_Func(arg_4=True)] = 0
        else:
            arg_5 = arg_1[arg_0.current_Func]

        if arg_2:
            arg_5 = np.nan_to_num(arg_5)

        return arg_5

Vectorize an image and mask out all invalid voxels.

        Args:
            images: The image to vectorize and mask. Input can be any object
                handled by get_image().
            layers: Which mask layers to use (specified as int, string, or
                list of ints and strings). When None, applies the conjunction
                of all layers.
            nan_to_num: boolean indicating whether to convert NaNs to 0.
            in_global_mask: Whether to return the resulting masked vector in
                the globally masked space (i.e., n_voxels =
                len(self.global_mask)). If False (default), returns in the full
                image space (i.e., n_voxels = len(self.volume)).
        Returns:
          A 1D NumPy array of in-mask voxels.

Vectorize an image and mask out all invalid voxels .


(marcxml,
                        verbose=CFG_BIBRECORD_DEFAULT_VERBOSE_LEVEL,
                        correct=CFG_BIBRECORD_DEFAULT_CORRECT,
                        keep_singletons=CFG_BIBRECORD_KEEP_SINGLETONS)

def Func(arg_0,
                        arg_1=arg_2,
                        arg_3=arg_4,
                        arg_5=arg_6):
    """
    Create a record object using the LXML parser.

    If correct == 1, then perform DTD validation
    If correct == 0, then do not perform DTD validation

    If verbose == 0, the parser will not give warnings.
    If 1 <= verbose <= 3, the parser will not give errors, but will warn
        the user about possible mistakes (implement me!)
    If verbose > 3 then the parser will be strict and will stop in case of
        well-formedness errors or DTD errors.

    """
    arg_7 = etree.XMLParser(dtd_validation=arg_3,
                             recover=(arg_1 <= 3))
    if arg_3:
        arg_0 = '<?xml version="1.0" encoding="UTF-8"?>\n' \
                  '<collection>\n%s\n</collection>' % (arg_0,)
    try:
        arg_8 = etree.parse(StringIO(arg_0), arg_7)
        # parser errors are located in parser.error_log
        # if 1 <= verbose <=3 then show them to the user?
        # if verbose == 0 then continue
        # if verbose >3 then an exception will be thrown
    except Exception as e:
        raise InvenioBibRecordParserError(str(e))

    arg_9 = {}
    arg_10 = 0

    arg_11 = arg_8.iter(arg_13='{*}controlfield')
    for arg_12 in arg_11:
        arg_13 = arg_12.attrib.get('tag', '!').encode("UTF-8")
        arg_14 = ' '
        arg_15 = ' '
        arg_16 = arg_12.text
        if arg_16 is None:
            arg_16 = ''
        else:
            arg_16 = arg_16.encode("UTF-8")
        arg_17 = []
        if arg_16 or arg_5:
            arg_10 += 1
            arg_9.setdefault(arg_13, []).append((arg_17, arg_14, arg_15, arg_16,
                                               arg_10))

    arg_18 = arg_8.iter(arg_13='{*}datafield')
    for arg_19 in arg_18:
        arg_13 = arg_19.attrib.get('tag', '!').encode("UTF-8")
        arg_14 = arg_19.attrib.get('ind1', '!').encode("UTF-8")
        arg_15 = arg_19.attrib.get('ind2', '!').encode("UTF-8")
        if arg_14 in ('', '_'):
            arg_14 = ' '
        if arg_15 in ('', '_'):
            arg_15 = ' '
        arg_17 = []
        arg_20 = arg_19.iter(arg_13='{*}subfield')
        for arg_21 in arg_20:
            arg_22 = arg_21.attrib.get('code', '!').encode("UTF-8")
            arg_16 = arg_21.text
            if arg_16 is None:
                arg_16 = ''
            else:
                arg_16 = arg_16.encode("UTF-8")
            if arg_16 or arg_5:
                arg_17.append((arg_22, arg_16))
        if arg_17 or arg_5:
            arg_16 = ''
            arg_10 += 1
            arg_9.setdefault(arg_13, []).append((arg_17, arg_14, arg_15, arg_16,
                                               arg_10))

    return arg_9

Create a record object using the LXML parser .


def
Func
(
arg_0
,
arg_1
=
arg_2
.
pathsep
)
:
arg_3
=
{
}
for
arg_4
,
arg_5
in
arg_0
.
iteritems
(
)
:
if
isinstance
(
arg_5
,
list
)
:
arg_3
[
arg_4
]
=
arg_1
.
join
(
arg_5
)
elif
isinstance
(
arg_5
,
string_types
)
:
arg_3
[
arg_4
]
=
arg_5
else
:
raise
TypeError
(
'{} not a valid env var type'
.
format
(
type
(
arg_5
)
)
)
return
arg_3

def Func(arg_0, arg_1=arg_2.pathsep):
    '''
    Convert a python dict to a dict containing valid environment variable
    values.

    :param d: Dict to convert to an env dict
    :param pathsep: Path separator used to join lists(default os.pathsep)
    '''

    arg_3 = {}

    for arg_4, arg_5 in arg_0.iteritems():
        if isinstance(arg_5, list):
            arg_3[arg_4] = arg_1.join(arg_5)
        elif isinstance(arg_5, string_types):
            arg_3[arg_4] = arg_5
        else:
            raise TypeError('{} not a valid env var type'.format(type(arg_5)))

    return arg_3

Convert a python dict to a dict containing valid environment variable values .


def Func(arg_0, arg_1):
        """Reads out a row and returns a dictionary containing the row content.

        :param colnames: List of column names
        :param row:  A pytables table row
        :return: A dictionary with colnames as keys and content as values

        """
        arg_2 = {}
        for arg_3 in arg_0:
            arg_2[arg_3] = arg_1[arg_3]

        return arg_2

Reads out a row and returns a dictionary containing the row content .


def Func ( arg_0 , arg_1 ) : arg_2 = { 16 : 'CX' , 32 : 'ECX' , 64 : 'RCX' } [ arg_0 . address_bit_size ] arg_3 = arg_0 . write_register ( arg_2 , arg_0 . read_register ( arg_2 ) - 1 ) arg_0 . PC = Operators . ITEBV ( arg_0 . address_bit_size , arg_3 == 0 , ( arg_0 . PC + arg_1 . read ( ) ) & ( ( 1 << arg_1 . size ) - 1 ) , arg_0 . PC + arg_0 . instruction . size )

def Func(arg_0, arg_1):
        """
        Loops according to ECX counter.

        Performs a loop operation using the ECX or CX register as a counter.
        Each time the Func instruction is executed, the count register is decremented,
        then checked for 0. If the count is 0, the loop is terminated and program
        execution continues with the instruction following the Func instruction.
        If the count is not zero, a near jump is performed to the destination
        (target) operand, which is presumably the instruction at the beginning
        of the loop. If the address-size attribute is 32 bits, the ECX register
        is used as the count register; otherwise the CX register is used::

                IF address_bit_size  =  32
                THEN
                    Count is ECX;
                ELSE (* address_bit_size  =  16 *)
                    Count is CX;
                FI;
                Count  =  Count - 1;

                IF (Count  0)  =  1
                THEN
                    EIP  =  EIP + SignExtend(DEST);
                    IF OperandSize  =  16
                    THEN
                        EIP  =  EIP AND 0000FFFFH;
                    FI;
                ELSE
                    Terminate loop and continue program execution at EIP;
                FI;

        :param cpu: current CPU.
        :param dest: destination operand.
        """
        arg_2 = {16: 'CX', 32: 'ECX', 64: 'RCX'}[arg_0.address_bit_size]
        arg_3 = arg_0.write_register(arg_2, arg_0.read_register(arg_2) - 1)
        arg_0.PC = Operators.ITEBV(arg_0.address_bit_size, arg_3 == 0, (arg_0.PC + arg_1.read()) & ((1 << arg_1.size) - 1), arg_0.PC + arg_0.instruction.size)

Loops according to ECX counter.

        Performs a loop operation using the ECX or CX register as a counter.
        Each time the LOOP instruction is executed, the count register is decremented,
        then checked for 0. If the count is 0, the loop is terminated and program
        execution continues with the instruction following the LOOP instruction.
        If the count is not zero, a near jump is performed to the destination
        (target) operand, which is presumably the instruction at the beginning
        of the loop. If the address-size attribute is 32 bits, the ECX register
        is used as the count register; otherwise the CX register is used::

                IF address_bit_size  =  32
                THEN
                    Count is ECX;
                ELSE (* address_bit_size  =  16 *)
                    Count is CX;
                FI;
                Count  =  Count - 1;

                IF (Count  0)  =  1
                THEN
                    EIP  =  EIP + SignExtend(DEST);
                    IF OperandSize  =  16
                    THEN
                        EIP  =  EIP AND 0000FFFFH;
                    FI;
                ELSE
                    Terminate loop and continue program execution at EIP;
                FI;

        :param cpu: current CPU.
        :param dest: destination operand.


def Func ( arg_0 ) : if not arg_0 . _errors : try : arg_0 . _errors . append ( next ( arg_0 . _validator ) ) except StopIteration : pass return not arg_0 . _errors

def Func(arg_0):
        # type: () -> bool
        """
        Returns whether the bundle is valid.
        """
        if not arg_0._errors:
            try:
                # We only have to check for a single error to determine
                # if the bundle is valid or not.
                arg_0._errors.append(next(arg_0._validator))
            except StopIteration:
                pass

        return not arg_0._errors


def
Func
(
arg_0
)
:
with
chdir
(
arg_0
.
project_directory
)
:
arg_1
=
deepcopy
(
dict
(
os
.
environ
)
)
arg_1
[
arg_2
(
'DJANGO_SETTINGS_MODULE'
)
]
=
arg_2
(
'{0}.settings'
.
format
(
arg_0
.
project_name
)
)
arg_1
[
arg_2
(
'PYTHONPATH'
)
]
=
arg_2
(
os
.
pathsep
.
join
(
map
(
shlex_quote
,
sys
.
path
)
)
)
arg_3
=
[
]
arg_3
.
append
(
[
sys
.
executable
,
'-W'
,
'ignore'
,
'manage.py'
,
'migrate'
]
,
)
if
arg_0
.
verbose
:
sys
.
stdout
.
write
(
'Database setup commands: {0}\n'
.
format
(
', '
.
join
(
[
' '
.
join
(
arg_4
)
for
arg_4
in
arg_3
]
)
)
)
for
arg_5
in
arg_3
:
try
:
arg_6
=
subprocess
.
check_output
(
arg_5
,
arg_1
=
arg_1
,
stderr
=
subprocess
.
STDOUT
)
sys
.
stdout
.
write
(
arg_6
.
decode
(
'utf-8'
)
)
except
subprocess
.
CalledProcessError
as
e
:
if
arg_0
.
verbose
:
sys
.
stdout
.
write
(
e
.
output
.
decode
(
'utf-8'
)
)
raise
if
not
arg_0
.
no_user
:
sys
.
stdout
.
write
(
'Creating admin user\n'
)
if
arg_0
.
noinput
:
create_user
(
arg_0
)
else
:
subprocess
.
check_call
(
' '
.
join
(
[
sys
.
executable
,
'-W'
,
'ignore'
,
'manage.py'
,
'createsuperuser'
]
)
,
shell
=
True
,
stderr
=
subprocess
.
STDOUT
)

def Func(arg_0):
    """
    Run the migrate command to create the database schema

    :param config_data: configuration data
    """
    with chdir(arg_0.project_directory):
        arg_1 = deepcopy(dict(os.environ))
        arg_1[arg_2('DJANGO_SETTINGS_MODULE')] = arg_2('{0}.settings'.format(arg_0.project_name))
        arg_1[arg_2('PYTHONPATH')] = arg_2(os.pathsep.join(map(shlex_quote, sys.path)))
        arg_3 = []

        arg_3.append(
            [sys.executable, '-W', 'ignore', 'manage.py', 'migrate'],
        )

        if arg_0.verbose:
            sys.stdout.write(
                'Database setup commands: {0}\n'.format(
                    ', '.join([' '.join(arg_4) for arg_4 in arg_3])
                )
            )
        for arg_5 in arg_3:
            try:
                arg_6 = subprocess.check_output(
                    arg_5, arg_1=arg_1, stderr=subprocess.STDOUT
                )
                sys.stdout.write(arg_6.decode('utf-8'))
            except subprocess.CalledProcessError as e:  # pragma: no cover
                if arg_0.verbose:
                    sys.stdout.write(e.output.decode('utf-8'))
                raise

        if not arg_0.no_user:
            sys.stdout.write('Creating admin user\n')
            if arg_0.noinput:
                create_user(arg_0)
            else:
                subprocess.check_call(' '.join(
                    [sys.executable, '-W', 'ignore', 'manage.py', 'createsuperuser']
                ), shell=True, stderr=subprocess.STDOUT)


def Func ( arg_0 ) : arg_1 = time . time ( ) while len ( arg_0 . timer_tasks ) > 0 and ( arg_0 . timer_tasks [ 0 ] [ 0 ] - arg_1 <= 0 ) : arg_2 = heappop ( arg_0 . timer_tasks ) [ 1 ] arg_2 ( )

def Func(arg_0):
    """Triggers expired timers"""
    arg_1 = time.time()
    while len(arg_0.timer_tasks) > 0 and (arg_0.timer_tasks[0][0] - arg_1 <= 0):
      arg_2 = heappop(arg_0.timer_tasks)[1]
      arg_2()


return super(Bucket, self)._delete_key_internal(*args, **kwargs)

def Func ( arg_0 , * arg_1 , ** arg_2 ) : mimicdb . backend . srem ( tpl . bucket % arg_0 . name , arg_1 [ 0 ] ) mimicdb . backend . delete ( tpl . key % ( arg_0 . name , arg_1 [ 0 ] ) ) return super ( Bucket , arg_0 ) . Func ( * arg_1 , ** arg_2 )

def Func(arg_0, *arg_1, **arg_2):
        """Remove key name from bucket set.
        """
        mimicdb.backend.srem(tpl.bucket % arg_0.name, arg_1[0])
        mimicdb.backend.delete(tpl.key % (arg_0.name, arg_1[0]))

        return super(Bucket, arg_0).Func(*arg_1, **arg_2)


def Func ( arg_0 , arg_1 ) : arg_0 . wbtn_cancel = button . Button ( "btn_cancel" , arg_0 , arg_0 . window , arg_0 . peng , pos = lambda sw , sh , bw , bh : ( sw / 2 + 4 , sh / 2 - bh / 2 - bh * 2 ) , arg_3 = [ 0 , 0 ] , label = arg_1 , borderstyle = arg_0 . borderstyle ) arg_0 . wbtn_cancel . size = lambda sw , sh : ( arg_0 . wbtn_cancel . _label . font_size * 8 , arg_0 . wbtn_cancel . _label . font_size * 2 ) arg_0 . addWidget ( arg_0 . wbtn_cancel ) def f ( ) : arg_0 . doAction ( "cancel" ) arg_0 . exitDialog ( ) arg_0 . wbtn_cancel . addAction ( "click" , f )

def Func(arg_0,arg_1):
        """
        Adds a cancel button to let the user cancel whatever choice they were given.

        This widget can be triggered by setting the label ``label_cancel`` to a string.

        This widget will be positioned slightly below the main label and to the right
        of the confirm button.
        """
        # Cancel Button
        arg_0.wbtn_cancel = button.Button("btn_cancel",arg_0,arg_0.window,arg_0.peng,
                        pos=lambda sw,sh, bw,bh: (sw/2+4,sh/2-bh/2-bh*2),
                        arg_3=[0,0],
                        label=arg_1,
                        borderstyle=arg_0.borderstyle
                        )
        arg_0.wbtn_cancel.size = lambda sw,sh: (arg_0.wbtn_cancel._label.font_size*8,arg_0.wbtn_cancel._label.font_size*2)
        arg_0.addWidget(arg_0.wbtn_cancel)

        def f():
            arg_0.doAction("cancel")
            arg_0.exitDialog()
        arg_0.wbtn_cancel.addAction("click",f)

Adds a cancel button to let the user cancel whatever choice they were given . This widget can be triggered by setting the label label_cancel to a string . This widget will be positioned slightly below the main label and to the right of the confirm button .


def Func(arg_0, arg_1, arg_2):
        """Adds submission_objects to clinvar collection and update the coresponding submission object with their id

            Args:
                submission_id(str) : id of the submission to be updated
                submission_objects(tuple): a tuple of 2 elements coresponding to a list of variants and a list of case data objects to add to submission

            Returns:
                updated_submission(obj): an open clinvar submission object, updated
        """

        LOG.info("Adding new variants and case data to clinvar submission '%s'", arg_1)

        # Insert variant submission_objects into clinvar collection
        # Loop over the objects
        for arg_3 in arg_2[0]:
            try:
                arg_4 = arg_0.clinvar_collection.insert_one(arg_3)
                arg_0.clinvar_submission_collection.update_one({'_id':arg_1}, {'$push': { 'variant_data' : str(arg_4.inserted_id) }}, upsert=True)
            except pymongo.errors.DuplicateKeyError:
                LOG.error("Attepted to insert a clinvar variant which is already in DB!")

        # Insert casedata submission_objects into clinvar collection
        if arg_2[1]:
            # Loop over the objects
            for arg_5 in arg_2[1]:
                try:
                    arg_4 = arg_0.clinvar_collection.insert_one(arg_5)
                    arg_0.clinvar_submission_collection.update_one({'_id':arg_1}, {'$push': { 'case_data': str(arg_4.inserted_id)}}, upsert=True)
                except pymongo.errors.DuplicateKeyError:
                    LOG.error("One or more casedata object is already present in clinvar collection!")

        arg_6 = arg_0.clinvar_submission_collection.find_one_and_update( {'_id':arg_1}, { '$set' : {'updated_at': datetime.now()} }, return_document=pymongo.ReturnDocument.AFTER )
        return arg_6


def Func(arg_0, arg_1: arg_2[arg_3] = None) -> arg_3:
        """Get a default connection string.

        Wraps :func:`bio2bel.utils.get_connection` and passing this class's :data:`module_name` to it.
        """
        return get_connection(arg_0.module_name, arg_1=arg_1)


def Func ( arg_0 , arg_1 = 200 ) : arg_2 = { 'data' : ensurelist ( arg_0 ) } return make_response ( jsonify ( arg_2 ) , arg_1 )

def Func(arg_0, arg_1=200):
    ''' Return a response with a list of jsonapi data objects
    '''
    arg_2 = {'data': ensurelist(arg_0)}
    return make_response(jsonify(arg_2), arg_1)


return Npart, posoffset+4, veloffset+4, header

def Func(arg_0, arg_1=None):
	"""Read header data from Gadget data file 'filename' with Gadget file
	type 'gtype'. Returns offsets of positions and velocities."""
	arg_2 = '=I4sII'                                # struct formatting string
	arg_3 = '=I6I6dddii6iiiddddii6ii60xI'        # struct formatting string
	arg_4 = ('Npart', 'Massarr', 'Time', 'Redshift', 'FlagSfr', 'FlagFeedback', 'Nall', 'FlagCooling', 'NumFiles', 'BoxSize', 'Omega0', 'OmegaLambda', 'HubbleParam', 'FlagAge', 'FlagMetals', 'NallHW', 'flag_entr_ics', 'filename')
	arg_5 = open(arg_0, 'rb')

	"""Detects Gadget file type (type 1 or 2; resp. without or with the 16
	byte block headers)."""
	arg_6 = struct.unpack('I',arg_5.read(4))
	if arg_6[0] == 8:
		arg_7 = 2
	else:
		arg_7 = 1
	if arg_7 == 2:
		arg_5.seek(16)
	else:
	 	arg_5.seek(0)
	if arg_1 is not None:
		arg_5.seek(arg_1)
	arg_8 = struct.unpack(arg_3,arg_5.read(264))[1:-1]
	arg_9 = (arg_8[:6], arg_8[6:12]) + arg_8[12:16] + (arg_8[16:22],) + arg_8[22:30] + (arg_8[30:36], arg_8[36], arg_0)
	arg_10 = dict(list(zip(arg_4, arg_9)))
	arg_5.close()

	if arg_7 == 2:
		arg_11 = (2*16 + (8 + 256))
	else:
		arg_11 = (8 + 256)

	arg_12 = sum(arg_10['Npart'])
	if arg_7 == 2:
		arg_13 = 3*16 + (8 + 256) + (8 + 3*4*arg_12)
	else:
		arg_13= (8 + 256) + (8 + 3*4*arg_12)
	return arg_12, arg_11+4, arg_13+4, arg_10

Read header data from Gadget data file filename with Gadget file type gtype . Returns offsets of positions and velocities .


def Func ( ) : arg_0 = os . path . dirname ( sys . modules [ __name__ ] . __file__ ) arg_1 = os . path . join ( arg_0 , r'data/rao' ) arg_1 = os . path . abspath ( arg_1 ) return arg_1

def Func():
    """
    Calculate the default path in which thermochemical data is stored.

    :returns: Default path.
    """

    arg_0 = os.path.dirname(sys.modules[__name__].__file__)
    arg_1 = os.path.join(arg_0, r'data/rao')
    arg_1 = os.path.abspath(arg_1)
    return arg_1

Calculate the default path in which thermochemical data is stored .


(iterable, length=2, overlap=0, padding=True)

def Func ( arg_0 , arg_1 = 2 , arg_2 = 0 , arg_3 = True ) : arg_4 = iter ( arg_0 ) arg_5 = list ( itertools . islice ( arg_4 , arg_1 ) ) while len ( arg_5 ) == arg_1 : yield arg_5 arg_5 = arg_5 [ arg_1 - arg_2 : ] arg_5 . extend ( itertools . islice ( arg_4 , arg_1 - arg_2 ) ) if arg_3 and arg_5 : arg_5 . extend ( itertools . repeat ( None , arg_1 - len ( arg_5 ) ) ) yield arg_5

def Func(arg_0, arg_1=2, arg_2=0, arg_3=True):
    """ Code snippet from Python Cookbook, 2nd Edition by David Ascher,
    Alex Martelli and Anna Ravenscroft; O'Reilly 2005

    Problem: You have an iterable s and need to make another iterable whose
    items are sublists (i.e., sliding Func), each of the same given length,
    over s' items, with successive Func overlapping by a specified amount.

    """

    arg_4 = iter(arg_0)
    arg_5 = list(itertools.islice(arg_4, arg_1))
    while len(arg_5) == arg_1:
        yield arg_5
        arg_5 = arg_5[arg_1-arg_2:]
        arg_5.extend(itertools.islice(arg_4, arg_1-arg_2))
    if arg_3 and arg_5:
        arg_5.extend(itertools.repeat(None, arg_1-len(arg_5)))
        yield arg_5

Code snippet from Python Cookbook, 2nd Edition by David Ascher,
    Alex Martelli and Anna Ravenscroft; O'Reilly 2005

    Problem: You have an iterable s and need to make another iterable whose
    items are sublists (i.e., sliding windows), each of the same given length,
    over s' items, with successive windows overlapping by a specified amount.

Code snippet from Python Cookbook 2nd Edition by David Ascher Alex Martelli and Anna Ravenscroft ; O Reilly 2005


def Func ( arg_0 , Func ) : if isinstance ( Func , np . ndarray ) : Func = Func . ravel ( ) arg_0 . ode_body . setRotation ( tuple ( Func ) )

def Func(arg_0, Func):
        '''Set the rotation of this body using a rotation matrix.

        Parameters
        ----------
        rotation : sequence of 9 floats
            The desired rotation matrix for this body.
        '''
        if isinstance(Func, np.ndarray):
            Func = Func.ravel()
        arg_0.ode_body.setRotation(tuple(Func))

Set the rotation of this body using a rotation matrix .


def Func(arg_0, arg_1):
        """ Obtain account name from private key
        """
        arg_2 = arg_0.publickey_from_wif(arg_1)
        return arg_0.getAccountFromPublicKey(arg_2)


def Func ( arg_0 , arg_1 = 20 ) : arg_2 = arg_0 for arg_3 in xrange ( arg_1 ) : arg_4 = os . listdir ( arg_2 ) arg_5 , arg_6 = [ ] , [ ] for arg_7 in arg_4 : if os . path . isdir ( os . path . join ( arg_2 , arg_7 ) ) : arg_5 . append ( arg_7 ) else : arg_6 . append ( arg_7 ) yield arg_2 , arg_5 , arg_6 arg_8 = os . path . dirname ( arg_2 ) if arg_8 and not arg_8 == arg_2 : arg_2 = arg_8 else : break

def Func(arg_0, arg_1=20):
    '''
    Walk up a directory tree
    '''
    arg_2 = arg_0

    for arg_3 in xrange(arg_1):
        arg_4 = os.listdir(arg_2)
        arg_5, arg_6 = [], []
        for arg_7 in arg_4:
            if os.path.isdir(os.path.join(arg_2, arg_7)):
                arg_5.append(arg_7)
            else:
                arg_6.append(arg_7)

        yield arg_2, arg_5, arg_6

        arg_8 = os.path.dirname(arg_2)
        if arg_8 and not arg_8 == arg_2:
            arg_2 = arg_8
        else:
            break


def Func(arg_0):
        """
        Log of the marginal likelihood for arbitrary scale.

        Returns
        -------
        lml : float
            Log of the marginal likelihood.
        """
        arg_1 = arg_0.scale
        arg_2 = arg_0._D
        arg_3 = len(arg_0._y)
        arg_4 = -arg_0._df * log2pi - arg_3 * log(arg_1)
        arg_4 -= sum(npsum(log(arg_5)) for arg_5 in arg_2)
        arg_5 = (mTQ - yTQ for (mTQ, yTQ) in zip(arg_0._mTQ, arg_0._yTQ))
        arg_4 -= sum((arg_6 / arg_7) @ arg_6 for (arg_6, arg_7) in zip(arg_5, arg_2)) / arg_1

        return arg_4 / 2

Log of the marginal likelihood for arbitrary scale .


def Func(arg_0, *arg_1, **arg_2):
        """Handle CLI command"""
        try:
            while True:
                Channel(HEARTBEAT_CHANNEL).send({'time':time.time()})
                time.sleep(HEARTBEAT_FREQUENCY)
        except KeyboardInterrupt:
            print("Received keyboard interrupt, exiting...")


def
Func
(
arg_0
,
arg_1
)
:
if
arg_1
.
module
not
in
arg_0
.
_modules
:
if
arg_1
.
module
:
arg_0
.
writeln
(
"************* Module %s"
%
arg_1
.
module
)
arg_0
.
_modules
.
add
(
arg_1
.
module
)
else
:
arg_0
.
writeln
(
"************* "
)
arg_0
.
write_message
(
arg_1
)

def Func(arg_0, arg_1):
        """manage message of different type and in the context of path"""
        if arg_1.module not in arg_0._modules:
            if arg_1.module:
                arg_0.writeln("************* Module %s" % arg_1.module)
                arg_0._modules.add(arg_1.module)
            else:
                arg_0.writeln("************* ")
        arg_0.write_message(arg_1)


def Func(arg_0, arg_1=None, **arg_2):
        """List all licenses for a given organization.

        If no orgId is specified, the default is the organization of the
        authenticated user.

        Args:
            orgId(basestring): Specify the organization, by ID.
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            GeneratorContainer: A GeneratorContainer which, when iterated,
            yields the licenses returned by the Webex Teams query.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.

        """
        check_type(arg_1, basestring)

        arg_3 = dict_from_items_with_values(
            arg_2,
            arg_1=arg_1,
        )

        # API request - get items
        arg_4 = arg_0._session.get_items(API_ENDPOINT, arg_3=arg_3)

        # Yield license objects created from the returned JSON objects
        for arg_5 in arg_4:
            yield arg_0._object_factory(OBJECT_TYPE, arg_5)

List all licenses for a given organization .


def Func(arg_0, arg_1=arg_2):
    """
    Takes a string argument and returns value as a tuple.
    Needed for paramfile conversion from CLI to set_params args
    """

    if isinstance(arg_0, list):
        arg_0 = tuple(arg_0)

    if isinstance(arg_0, arg_2):
        arg_0 = arg_0.rstrip(")").strip("(")
        try:
            arg_0 = tuple([arg_1(i.strip()) for i in arg_0.split(",")])

        ## Type error is thrown by tuple if it's applied to a non-iterable.
        except TypeError:
            arg_0 = tuple(arg_1(arg_0))

        ## If dtype fails to cast any element of newvalue
        except ValueError:
            LOGGER.info("Assembly.tuplecheck() failed to cast to {} - {}"\
                        .format(arg_1, arg_0))
            raise

        except Exception as inst:
            LOGGER.info(inst)
            raise SystemExit(\
            "\nError: Param`{}` is not formatted correctly.\n({})\n"\
                 .format(arg_0, inst))

    return arg_0

Takes a string argument and returns value as a tuple . Needed for paramfile conversion from CLI to set_params args


(f_pass, f_stop, d_pass, d_stop, fs = 1.0, N_bump=5)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4 = 1.0, arg_5=5):
    """
    Design an FIR lowpass filter using remez with order
    determination. The filter order is determined based on
    f_pass Hz, fstop Hz, and the desired passband ripple
    d_pass dB and stopband attenuation d_stop dB all
    relative to a sampling rate of fs Hz.

    Mark Wickert October 2016, updated October 2018
    """
    arg_6, arg_7, arg_8, arg_9 = lowpass_order(arg_0, arg_1, arg_2, arg_3, fsamp=arg_4)
    # Bump up the order by N_bump to bring down the final d_pass & d_stop
    arg_10 = arg_6
    arg_10 += arg_5
    arg_11 = signal.remez(arg_10, arg_7, arg_8[0::2], arg_9,Hz=2)
    print('Remez filter taps = %d.' % arg_10)
    return arg_11

Design an FIR lowpass filter using remez with order determination . The filter order is determined based on f_pass Hz fstop Hz and the desired passband ripple d_pass dB and stopband attenuation d_stop dB all relative to a sampling rate of fs Hz . Mark Wickert October 2016 updated October 2018


def Func ( arg_0 , arg_1 ) : if isinstance ( arg_0 , Para ) : if arg_0 . next is not None : return arg_0 elif arg_0 . prev is not None : return arg_0 return Plain ( * arg_0 . content )

def Func(arg_0, arg_1):
    """Panflute filter function that converts content wrapped in a Para to
    Plain.

    Use this filter with pandoc as::

        pandoc [..] --filter=lsstprojectmeta-Func

    Only lone paragraphs are affected. Para elements with siblings (like a
    second Para) are left unaffected.

    This filter is useful for processing strings like titles or author names so
    that the output isn't wrapped in paragraph tags. For example, without
    this filter, pandoc converts a string ``"The title"`` to
    ``
The title
`` in HTML. These ``
`` tags aren't useful if you
    intend to put the title text in ``
`` tags using your own templating
    system.
    """
    if isinstance(arg_0, Para):
        # Check if siblings exist; don't process the paragraph in that case.
        if arg_0.next is not None:
            return arg_0
        elif arg_0.prev is not None:
            return arg_0

        # Remove the Para wrapper from the lone paragraph.
        # `Plain` is a container that isn't rendered as a paragraph.
        return Plain(*arg_0.content)

Panflute filter function that converts content wrapped in a Para to
    Plain.

    Use this filter with pandoc as::

        pandoc [..] --filter=lsstprojectmeta-deparagraph

    Only lone paragraphs are affected. Para elements with siblings (like a
    second Para) are left unaffected.

    This filter is useful for processing strings like titles or author names so
    that the output isn't wrapped in paragraph tags. For example, without
    this filter, pandoc converts a string ``"The title"`` to
    ``
The title
`` in HTML. These ``
`` tags aren't useful if you
    intend to put the title text in ``
`` tags using your own templating
    system.

Panflute filter function that converts content wrapped in a Para to Plain .


def
Func
(
arg_0
,
arg_1
)
:
try
:
arg_2
=
base64
.
b64decode
(
arg_1
.
encode
(
"ascii"
)
)
except
(
TypeError
,
binascii
.
Error
)
:
raise
MalformedDataError
(
"Unable to decode the key"
)
return
arg_2

def Func(arg_0, arg_1):
        """Decode base64 coded part of the key."""
        try:
            arg_2 = base64.b64decode(arg_1.encode("ascii"))
        except (TypeError, binascii.Error):
            raise MalformedDataError("Unable to decode the key")
        return arg_2


def Func ( arg_0 ) : arg_1 = { "plotData" : [ ] } arg_2 = { } arg_3 = { } for arg_4 in arg_0 . storage . values ( ) : arg_5 = re . match ( "(.*)_abr" , arg_4 [ "log_file" ] ) . groups ( ) [ 0 ] if arg_5 not in arg_2 : arg_2 [ arg_5 ] = { } arg_6 = arg_0 . _get_contig_id ( arg_4 [ "reference" ] ) arg_7 = arg_4 [ "database" ] if arg_7 not in arg_2 [ arg_5 ] : arg_2 [ arg_5 ] [ arg_7 ] = [ ] if arg_5 not in arg_3 : arg_3 [ arg_5 ] = arg_4 [ "infile" ] arg_2 [ arg_5 ] [ arg_7 ] . append ( { "contig" : arg_6 , "seqRange" : arg_4 [ "seq_range" ] , "gene" : arg_4 [ "gene" ] . replace ( "'" , "" ) , "accession" : arg_4 [ "accession" ] , "coverage" : arg_4 [ "coverage" ] , "identity" : arg_4 [ "identity" ] , } , ) for arg_8 , arg_9 in arg_2 . items ( ) : arg_1 [ "plotData" ] . append ( { "sample" : arg_8 , "data" : { "abricateXrange" : arg_9 } , "assemblyFile" : arg_3 [ arg_8 ] } ) return arg_1

def Func(arg_0):
        """ Generates the JSON report to plot the gene boxes

        Following the convention of the reports platform, this method returns
        a list of JSON/dict objects with the information about each entry in
        the abricate file. The information contained in this JSON is::

            {contig_id: <str>,
             seqRange: [<int>, <int>],
             gene: <str>,
             accession: <str>,
             coverage: <float>,
             identity: <float>
             }

        Note that the `seqRange` entry contains the position in the
        corresponding contig, not the absolute position in the whole assembly.

        Returns
        -------
        json_dic : list
            List of JSON/dict objects with the report data.
        """

        arg_1 = {"plotData": []}
        arg_2 = {}
        arg_3 = {}

        for arg_4 in arg_0.storage.values():

            arg_5 = re.match("(.*)_abr", arg_4["log_file"]).groups()[0]
            if arg_5 not in arg_2:
                arg_2[arg_5] = {}

            # Get contig ID using the same regex as in `assembly_report.py`
            # template
            arg_6 = arg_0._get_contig_id(arg_4["reference"])
            # Get database
            arg_7 = arg_4["database"]
            if arg_7 not in arg_2[arg_5]:
                arg_2[arg_5][arg_7] = []

            # Update the sample-assembly correspondence dict
            if arg_5 not in arg_3:
                arg_3[arg_5] = arg_4["infile"]

            arg_2[arg_5][arg_7].append(
                {"contig": arg_6,
                 "seqRange": arg_4["seq_range"],
                 "gene": arg_4["gene"].replace("'", ""),
                 "accession": arg_4["accession"],
                 "coverage": arg_4["coverage"],
                 "identity": arg_4["identity"],
                 },
            )

        for arg_8, arg_9 in arg_2.items():
            arg_1["plotData"].append(
                {
                    "sample": arg_8,
                    "data": {"abricateXrange": arg_9},
                    "assemblyFile": arg_3[arg_8]
                }
            )

        return arg_1


def Func ( arg_0 , arg_1 ) : arg_0 . record_once ( lambda s : s . app . url_default_functions . setdefault ( arg_0 . name , [ ] ) . append ( arg_1 ) ) return arg_1

def Func(arg_0, arg_1):
        """Callback function for URL defaults for this blueprint.  It's called
        with the endpoint and values and should update the values passed
        in place.
        """
        arg_0.record_once(lambda s: s.app.url_default_functions
            .setdefault(arg_0.name, []).append(arg_1))
        return arg_1

Callback function for URL defaults for this blueprint . It s called with the endpoint and values and should update the values passed in place .


def Func ( arg_0 ) : arg_1 = arg_0 . layout arg_2 = getattr ( arg_0 , 'LAYOUT_CLASS' , None ) if not arg_2 or isinstance ( arg_1 , arg_2 ) : return arg_3 = LAYOUT_WARNING % ( type ( arg_0 ) . __name__ , arg_2 . __name__ , type ( arg_1 ) . __name__ ) arg_4 = arg_1 . set arg_5 = None if arg_2 is strip . Strip : if isinstance ( arg_1 , matrix . Matrix ) : arg_6 = arg_1 . width def arg_5 ( arg_7 , arg_8 = None ) : arg_9 , arg_10 = divmod ( arg_7 , arg_6 ) arg_4 ( arg_10 , arg_9 , arg_8 or BLACK ) elif isinstance ( arg_1 , cube . Cube ) : arg_11 , arg_12 = arg_1 . x , arg_1 . y def arg_5 ( arg_7 , arg_8 = None ) : arg_13 , arg_10 = divmod ( arg_7 , arg_11 ) arg_14 , arg_9 = divmod ( arg_13 , arg_12 ) arg_4 ( arg_10 , arg_9 , arg_14 , arg_8 or BLACK ) elif isinstance ( arg_1 , circle . Circle ) : def arg_5 ( arg_7 , arg_8 = None ) : arg_1 . _set_base ( arg_7 , arg_8 or BLACK ) elif arg_2 is matrix . Matrix : if isinstance ( arg_1 , strip . Strip ) : arg_6 = arg_0 . width def arg_5 ( arg_10 , arg_9 , arg_8 = None ) : arg_4 ( arg_10 + arg_9 * arg_6 , arg_8 or BLACK ) if not arg_5 : raise ValueError ( arg_3 ) log . warning ( arg_3 ) arg_0 . layout . set = arg_5

def Func(arg_0):
    """
    Adapt the setter in an animation's layout so that Strip animations can run
    on on Matrix, Cube, or Circle layout, and Matrix or Cube animations can run
    on a Strip layout.
    """
    arg_1 = arg_0.layout
    arg_2 = getattr(arg_0, 'LAYOUT_CLASS', None)

    if not arg_2 or isinstance(arg_1, arg_2):
        return

    arg_3 = LAYOUT_WARNING % (
        type(arg_0).__name__, arg_2.__name__, type(arg_1).__name__)

    arg_4 = arg_1.set
    arg_5 = None

    if arg_2 is strip.Strip:
        if isinstance(arg_1, matrix.Matrix):
            arg_6 = arg_1.width

            def arg_5(arg_7, arg_8=None):
                arg_9, arg_10 = divmod(arg_7, arg_6)
                arg_4(arg_10, arg_9, arg_8 or BLACK)

        elif isinstance(arg_1, cube.Cube):
            arg_11, arg_12 = arg_1.x, arg_1.y

            def arg_5(arg_7, arg_8=None):
                arg_13, arg_10 = divmod(arg_7, arg_11)
                arg_14, arg_9 = divmod(arg_13, arg_12)
                arg_4(arg_10, arg_9, arg_14, arg_8 or BLACK)

        elif isinstance(arg_1, circle.Circle):

            def arg_5(arg_7, arg_8=None):
                arg_1._set_base(arg_7, arg_8 or BLACK)

    elif arg_2 is matrix.Matrix:
        if isinstance(arg_1, strip.Strip):
            arg_6 = arg_0.width

            def arg_5(arg_10, arg_9, arg_8=None):
                arg_4(arg_10 + arg_9 * arg_6, arg_8 or BLACK)

    if not arg_5:
        raise ValueError(arg_3)

    log.warning(arg_3)
    arg_0.layout.set = arg_5

Adapt the setter in an animation s layout so that Strip animations can run on on Matrix Cube or Circle layout and Matrix or Cube animations can run on a Strip layout .


def Func ( arg_0 = None ) : if arg_0 is None : arg_0 = sys . argv [ 1 : ] arg_1 = CommandLineTool ( ) return arg_1 . run ( arg_0 )

def Func(arg_0=None):
    """Main command line interface."""

    if arg_0 is None:
        arg_0 = sys.argv[1:]

    arg_1 = CommandLineTool()
    return arg_1.run(arg_0)