def Func(arg_0, *arg_1, **arg_2):
    """
    This function is the decorator which is used to wrap a Sanic route with.
    In the simplest case, simply use the default parameters to allow all
    origins in what is the most permissive configuration. If this method
    modifies state or performs authentication which may be brute-forced, you
    should add some degree of protection, such as Cross Site Forgery
    Request protection.

    :param origins:
        The origin, or list of origins to allow requests from.
        The origin(s) may be regular expressions, case-sensitive strings,
        or else an asterisk

        Default : '*'
    :type origins: list, string or regex

    :param methods:
        The method or list of methods which the allowed origins are allowed to
        access for non-simple requests.

        Default : [GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE]
    :type methods: list or string

    :param expose_headers:
        The header or list which are safe to expose to the API of a CORS API
        specification.

        Default : None
    :type expose_headers: list or string

    :param allow_headers:
        The header or list of header field names which can be used when this
        resource is accessed by allowed origins. The header(s) may be regular
        expressions, case-sensitive strings, or else an asterisk.

        Default : '*', allow all headers
    :type allow_headers: list, string or regex

    :param supports_credentials:
        Allows users to make authenticated requests. If true, injects the
        `Access-Control-Allow-Credentials` header in responses. This allows
        cookies and credentials to be submitted across domains.

        :note: This option cannot be used in conjuction with a '*' origin

        Default : False
    :type supports_credentials: bool

    :param max_age:
        The maximum time for which this CORS request maybe cached. This value
        is set as the `Access-Control-Max-Age` header.

        Default : None
    :type max_age: timedelta, integer, string or None

    :param send_wildcard: If True, and the origins parameter is `*`, a wildcard
        `Access-Control-Allow-Origin` header is sent, rather than the
        request's `Origin` header.

        Default : False
    :type send_wildcard: bool

    :param vary_header:
        If True, the header Vary: Origin will be returned as per the W3
        implementation guidelines.

        Setting this header when the `Access-Control-Allow-Origin` is
        dynamically generated (e.g. when there is more than one allowed
        origin, and an Origin than '*' is returned) informs CDNs and other
        caches that the CORS headers are dynamic, and cannot be cached.

        If False, the Vary header will never be injected or altered.

        Default : True
    :type vary_header: bool

    :param automatic_options:
        Only applies to the `Func` decorator. If True, Sanic-CORS will
        override Sanic's default OPTIONS handling to return CORS headers for
        OPTIONS requests.

        Default : True
    :type automatic_options: bool

    """
    arg_3 = arg_2
    arg_4 = cors.decorate(arg_0, *arg_1, run_middleware=False, with_context=False, **arg_2)

    def wrapped_decorator(arg_5):
        arg_6 = SanicPluginsFramework(arg_0)  # get the singleton from the app
        try:
            arg_7 = arg_6.register_plugin(cors, skip_reg=True)
        except ValueError as e:
            # this is normal, if this plugin has been registered previously
            assert e.args and len(e.args) > 1
            arg_7 = e.args[1]
        arg_8 = cors.get_context_from_spf(arg_6)
        arg_9 = arg_8.log
        arg_9(logging.DEBUG, "Enabled {:s} for Func using options: {}".format(str(arg_5), str(arg_3)))
        return arg_4(arg_5)

    return wrapped_decorator

This function is the decorator which is used to wrap a Sanic route with.
    In the simplest case, simply use the default parameters to allow all
    origins in what is the most permissive configuration. If this method
    modifies state or performs authentication which may be brute-forced, you
    should add some degree of protection, such as Cross Site Forgery
    Request protection.

    :param origins:
        The origin, or list of origins to allow requests from.
        The origin(s) may be regular expressions, case-sensitive strings,
        or else an asterisk

        Default : '*'
    :type origins: list, string or regex

    :param methods:
        The method or list of methods which the allowed origins are allowed to
        access for non-simple requests.

        Default : [GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE]
    :type methods: list or string

    :param expose_headers:
        The header or list which are safe to expose to the API of a CORS API
        specification.

        Default : None
    :type expose_headers: list or string

    :param allow_headers:
        The header or list of header field names which can be used when this
        resource is accessed by allowed origins. The header(s) may be regular
        expressions, case-sensitive strings, or else an asterisk.

        Default : '*', allow all headers
    :type allow_headers: list, string or regex

    :param supports_credentials:
        Allows users to make authenticated requests. If true, injects the
        `Access-Control-Allow-Credentials` header in responses. This allows
        cookies and credentials to be submitted across domains.

        :note: This option cannot be used in conjuction with a '*' origin

        Default : False
    :type supports_credentials: bool

    :param max_age:
        The maximum time for which this CORS request maybe cached. This value
        is set as the `Access-Control-Max-Age` header.

        Default : None
    :type max_age: timedelta, integer, string or None

    :param send_wildcard: If True, and the origins parameter is `*`, a wildcard
        `Access-Control-Allow-Origin` header is sent, rather than the
        request's `Origin` header.

        Default : False
    :type send_wildcard: bool

    :param vary_header:
        If True, the header Vary: Origin will be returned as per the W3
        implementation guidelines.

        Setting this header when the `Access-Control-Allow-Origin` is
        dynamically generated (e.g. when there is more than one allowed
        origin, and an Origin than '*' is returned) informs CDNs and other
        caches that the CORS headers are dynamic, and cannot be cached.

        If False, the Vary header will never be injected or altered.

        Default : True
    :type vary_header: bool

    :param automatic_options:
        Only applies to the `cross_origin` decorator. If True, Sanic-CORS will
        override Sanic's default OPTIONS handling to return CORS headers for
        OPTIONS requests.

        Default : True
    :type automatic_options: bool

This function is the decorator which is used to wrap a Sanic route with . In the simplest case simply use the default parameters to allow all origins in what is the most permissive configuration . If this method modifies state or performs authentication which may be brute - forced you should add some degree of protection such as Cross Site Forgery Request protection .


def
Func
(
arg_0
)
:
arg_0
.
print_usage
(
)
print
(
''
)
print
(
'available functions:'
)
for
arg_1
in
sorted
(
FUNCTION
)
:
arg_2
=
FUNCTION
[
arg_1
]
.
__doc__
.
strip
(
)
.
splitlines
(
)
[
0
]
print
(
'    %-12s %s'
%
(
arg_1
+
':'
,
arg_2
)
)
return
0

def Func(arg_0):
    """Show usage and available curve functions."""
    arg_0.print_usage()
    print('')
    print('available functions:')
    for arg_1 in sorted(FUNCTION):
        arg_2 = FUNCTION[arg_1].__doc__.strip().splitlines()[0]
        print('    %-12s %s' % (arg_1 + ':', arg_2))

    return 0

Show usage and available curve functions .


(tokens, higher_oplevel=-1, ldelim="(", rdelim=")")

def Func ( arg_0 , arg_1 = - 1 , arg_2 = "(" , arg_3 = ")" ) : if isinstance ( arg_0 , str ) : return arg_0 if len ( arg_0 ) == 2 : return "" . join ( arg_0 ) arg_4 = _get_op_level ( arg_0 [ 1 ] ) arg_5 = "" for arg_6 , arg_7 in enumerate ( arg_0 ) : if arg_6 % 2 == 0 : arg_5 += Func ( arg_7 , arg_4 , arg_2 = arg_2 , arg_3 = arg_3 ) else : arg_5 += arg_7 if ( arg_4 < arg_1 ) or ( ( arg_4 == arg_1 ) and ( arg_4 in _OP_PREC_PAR ) ) : arg_5 = arg_2 + arg_5 + arg_3 return arg_5

def Func(arg_0, arg_1=-1, arg_2="(", arg_3=")"):
    """Build mathematical expression from hierarchical list."""
    # Numbers
    if isinstance(arg_0, str):
        return arg_0
    # Unary operators
    if len(arg_0) == 2:
        return "".join(arg_0)
    # Multi-term operators
    arg_4 = _get_op_level(arg_0[1])
    arg_5 = ""
    for arg_6, arg_7 in enumerate(arg_0):
        if arg_6 % 2 == 0:
            arg_5 += Func(arg_7, arg_4, arg_2=arg_2, arg_3=arg_3)
        else:
            arg_5 += arg_7
    if (arg_4 < arg_1) or (
        (arg_4 == arg_1) and (arg_4 in _OP_PREC_PAR)
    ):
        arg_5 = arg_2 + arg_5 + arg_3
    return arg_5

Build mathematical expression from hierarchical list .


def Func ( arg_0 , arg_1 = None ) : arg_2 = arg_0 . find_expired_nodes ( arg_1 ) if arg_2 : arg_0 . conn . client . hdel ( arg_0 . nodelist_key , * arg_2 )

def Func(arg_0, arg_1=None):
        """
        Removes all expired nodes from the nodelist.  If a set of node_ids is
        passed in, those ids are checked to ensure they haven't been refreshed
        prior to a lock being acquired.

        Should only be run with a lock.

        :param list node_ids: optional, a list of node_ids to remove.  They
            will be verified to ensure they haven't been refreshed.

        """
        arg_2 = arg_0.find_expired_nodes(arg_1)
        if arg_2:
            arg_0.conn.client.hdel(arg_0.nodelist_key, *arg_2)

Removes all expired nodes from the nodelist . If a set of node_ids is passed in those ids are checked to ensure they haven t been refreshed prior to a lock being acquired .


def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : super ( RevocationReason , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_6 = BytearrayStream ( arg_1 . Func ( arg_0 . length ) ) arg_0 . revocation_code = RevocationReasonCode ( ) arg_0 . revocation_code . Func ( arg_6 , arg_2 = arg_2 ) if arg_0 . is_tag_next ( Tags . REVOCATION_MESSAGE , arg_6 ) : arg_0 . revocation_message = TextString ( ) arg_0 . revocation_message . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . is_oversized ( arg_6 ) arg_0 . validate ( )

def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Read the data encoding the RevocationReason object and decode it
        into its constituent parts.

        Args:
            istream (Stream): A data stream containing encoded object data,
                supporting a Func method; usually a BytearrayStream object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be decoded. Optional,
                defaults to KMIP 1.0.
        """
        super(RevocationReason, arg_0).Func(arg_1, arg_2=arg_2)
        arg_6 = BytearrayStream(arg_1.Func(arg_0.length))

        arg_0.revocation_code = RevocationReasonCode()
        arg_0.revocation_code.Func(arg_6, arg_2=arg_2)

        if arg_0.is_tag_next(Tags.REVOCATION_MESSAGE, arg_6):
            arg_0.revocation_message = TextString()
            arg_0.revocation_message.Func(arg_6, arg_2=arg_2)

        arg_0.is_oversized(arg_6)
        arg_0.validate()

Read the data encoding the RevocationReason object and decode it
        into its constituent parts.

        Args:
            istream (Stream): A data stream containing encoded object data,
                supporting a read method; usually a BytearrayStream object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be decoded. Optional,
                defaults to KMIP 1.0.

Read the data encoding the RevocationReason object and decode it into its constituent parts .


return round(max(src_len, tar_len) - lcss)

def Func(arg_0, arg_1, arg_2, arg_3=5):
        """Return the "simplest" Sift4 distance between two terms.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison
        max_offset : int
            The number of characters to search for matching letters

        Returns
        -------
        int
            The Sift4 distance according to the simplest formula

        Examples
        --------
        >>> cmp = Sift4Simplest()
        >>> cmp.Func('cat', 'hat')
        1
        >>> cmp.Func('Niall', 'Neil')
        2
        >>> cmp.Func('Colin', 'Cuilen')
        3
        >>> cmp.Func('ATCG', 'TAGC')
        2

        """
        if not arg_1:
            return len(arg_2)

        if not arg_2:
            return len(arg_1)

        arg_4 = len(arg_1)
        arg_5 = len(arg_2)

        arg_6 = 0
        arg_7 = 0
        arg_8 = 0
        arg_9 = 0

        while (arg_6 < arg_4) and (arg_7 < arg_5):
            if arg_1[arg_6] == arg_2[arg_7]:
                arg_9 += 1
            else:
                arg_8 += arg_9
                arg_9 = 0
                if arg_6 != arg_7:
                    arg_6 = arg_7 = max(arg_6, arg_7)
                for arg_10 in range(arg_3):
                    if not (
                        (arg_6 + arg_10 < arg_4) or (arg_7 + arg_10 < arg_5)
                    ):
                        break
                    if (arg_6 + arg_10 < arg_4) and (
                        arg_1[arg_6 + arg_10] == arg_2[arg_7]
                    ):
                        arg_6 += arg_10
                        arg_9 += 1
                        break
                    if (arg_7 + arg_10 < arg_5) and (
                        arg_1[arg_6] == arg_2[arg_7 + arg_10]
                    ):
                        arg_7 += arg_10
                        arg_9 += 1
                        break

            arg_6 += 1
            arg_7 += 1

        arg_8 += arg_9
        return round(max(arg_4, arg_5) - arg_8)

Return the "simplest" Sift4 distance between two terms.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison
        max_offset : int
            The number of characters to search for matching letters

        Returns
        -------
        int
            The Sift4 distance according to the simplest formula

        Examples
        --------
        >>> cmp = Sift4Simplest()
        >>> cmp.dist_abs('cat', 'hat')
        1
        >>> cmp.dist_abs('Niall', 'Neil')
        2
        >>> cmp.dist_abs('Colin', 'Cuilen')
        3
        >>> cmp.dist_abs('ATCG', 'TAGC')
        2

Return the simplest Sift4 distance between two terms .


(shape, context=None, axis=(0,), dtype=float64, npartitions=None)

return ConstructSpark._wrap(ones, shape, context, axis, dtype, npartitions)

def Func ( arg_0 , arg_1 = None , arg_2 = ( 0 , ) , arg_3 = arg_4 , arg_5 = None ) : from numpy import Func return ConstructSpark . _wrap ( Func , arg_0 , arg_1 , arg_2 , arg_3 , arg_5 )

def Func(arg_0, arg_1=None, arg_2=(0,), arg_3=arg_4, arg_5=None):
        """
        Create a spark bolt array of Func.

        Parameters
        ----------
        shape : tuple
            The desired shape of the array.

        context : SparkContext
            A context running Spark. (see pyspark)

        axis : tuple, optional, default=(0,)
            Which axes to distribute the array along. The resulting
            distributed object will use keys to represent these axes,
            with the remaining axes represented by values.

        dtype : data-type, optional, default=float64
            The desired data-type for the array. If None, will
            be determined from the data. (see numpy)

        npartitions : int
            Number of partitions for parallization.

        Returns
        -------
        BoltArraySpark
        """
        from numpy import Func
        return ConstructSpark._wrap(Func, arg_0, arg_1, arg_2, arg_3, arg_5)

Create a spark bolt array of ones.

        Parameters
        ----------
        shape : tuple
            The desired shape of the array.

        context : SparkContext
            A context running Spark. (see pyspark)

        axis : tuple, optional, default=(0,)
            Which axes to distribute the array along. The resulting
            distributed object will use keys to represent these axes,
            with the remaining axes represented by values.

        dtype : data-type, optional, default=float64
            The desired data-type for the array. If None, will
            be determined from the data. (see numpy)

        npartitions : int
            Number of partitions for parallization.

        Returns
        -------
        BoltArraySpark


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_0
.
command_client
.
run
(
"HOLD_WORKER;{}"
.
format
(
arg_1
)
)
logger
.
debug
(
"Sent hold request to worker: {}"
.
format
(
arg_1
)
)
return
arg_2

def Func(arg_0, arg_1):
        """Puts a worker on hold, preventing scheduling of additional tasks to it.

        This is called "hold" mostly because this only stops scheduling of tasks,
        and does not actually kill the worker.

        Parameters
        ----------

        worker_id : str
            Worker id to be put on hold
        """
        arg_2 = arg_0.command_client.run("HOLD_WORKER;{}".format(arg_1))
        logger.debug("Sent hold request to worker: {}".format(arg_1))
        return arg_2

Puts a worker on hold preventing scheduling of additional tasks to it .


return {'months': months, 'seconds': seconds}

def Func(arg_0):
  """
  Return the number of months and seconds from an aggregation dict that
  represents a date and time.

  Interval is a dict that contain one or more of the following keys: 'years',
  'months', 'weeks', 'days', 'hours', 'minutes', seconds', 'milliseconds',
  'microseconds'.

  For example:

  ::

    aggregationMicroseconds({'years': 1, 'hours': 4, 'microseconds':42}) ==
        {'months':12, 'seconds':14400.000042}

  :param interval: (dict) The aggregation interval representing a date and time
  :returns: (dict) number of months and seconds in the interval:
            ``{months': XX, 'seconds': XX}``. The seconds is
            a floating point that can represent resolutions down to a
            microsecond.

  """

  arg_1 = arg_0.get('microseconds', 0) * 0.000001
  arg_1 += arg_0.get('milliseconds', 0) * 0.001
  arg_1 += arg_0.get('seconds', 0)
  arg_1 += arg_0.get('minutes', 0) * 60
  arg_1 += arg_0.get('hours', 0) * 60 * 60
  arg_1 += arg_0.get('days', 0) * 24 * 60 * 60
  arg_1 += arg_0.get('weeks', 0) * 7 * 24 * 60 * 60

  arg_2 = arg_0.get('months', 0)
  arg_2 += 12 * arg_0.get('years', 0)

  return {'months': arg_2, 'seconds': arg_1}

Return the number of months and seconds from an aggregation dict that represents a date and time .


def
Func
(
arg_0
,
arg_1
)
:
if
not
isinstance
(
arg_1
,
int
)
:
raise
TypeError
(
"amount must be an integer"
)
arg_2
=
_lib
.
X509_get_notAfter
(
arg_0
.
_x509
)
_lib
.
X509_gmtime_adj
(
arg_2
,
arg_1
)

def Func(arg_0, arg_1):
        """
        Adjust the time stamp on which the certificate stops being valid.

        :param int amount: The number of seconds by which to adjust the
            timestamp.
        :return: ``None``
        """
        if not isinstance(arg_1, int):
            raise TypeError("amount must be an integer")

        arg_2 = _lib.X509_get_notAfter(arg_0._x509)
        _lib.X509_gmtime_adj(arg_2, arg_1)

Adjust the time stamp on which the certificate stops being valid .


def Func ( arg_0 ) : if isinstance ( arg_0 . gene_list , list ) : arg_1 = arg_0 . gene_list elif isinstance ( arg_0 . gene_list , pd . DataFrame ) : if arg_0 . gene_list . shape [ 1 ] >= 3 : arg_1 = arg_0 . gene_list . iloc [ : , : 3 ] . apply ( lambda x : "\t" . join ( [ str ( i ) for i in x ] ) , axis = 1 ) . tolist ( ) elif arg_0 . gene_list . shape [ 1 ] == 2 : arg_1 = arg_0 . gene_list . apply ( lambda x : "," . join ( [ str ( i ) for i in x ] ) , axis = 1 ) . tolist ( ) else : arg_1 = arg_0 . gene_list . squeeze ( ) . tolist ( ) elif isinstance ( arg_0 . gene_list , pd . Series ) : arg_1 = arg_0 . gene_list . squeeze ( ) . tolist ( ) else : arg_1 = [ ] with open ( arg_0 . gene_list ) as f : for arg_2 in f : arg_1 . append ( arg_2 . strip ( ) ) arg_0 . _isezid = all ( map ( arg_0 . _is_entrez_id , arg_1 ) ) if arg_0 . _isezid : arg_0 . _gls = set ( map ( int , arg_0 . _gls ) ) else : arg_0 . _gls = arg_1 return '\n' . join ( arg_1 )

def Func(arg_0):
        """parse gene list"""
        if isinstance(arg_0.gene_list, list):
            arg_1 = arg_0.gene_list
        elif isinstance(arg_0.gene_list, pd.DataFrame):
            # input type is bed file
            if arg_0.gene_list.shape[1] >=3:
                arg_1= arg_0.gene_list.iloc[:,:3].apply(lambda x: "\t".join([str(i) for i in x]), axis=1).tolist()
            # input type with weight values
            elif arg_0.gene_list.shape[1] == 2:
               arg_1= arg_0.gene_list.apply(lambda x: ",".join([str(i) for i in x]), axis=1).tolist()
            else:
               arg_1 = arg_0.gene_list.squeeze().tolist()
        elif isinstance(arg_0.gene_list, pd.Series):
            arg_1 = arg_0.gene_list.squeeze().tolist()
        else:
            # get gene lists or bed file, or gene list with weighted values.
            arg_1=[]
            with open(arg_0.gene_list) as f:
                for arg_2 in f:
                    arg_1.append(arg_2.strip())

        arg_0._isezid = all(map(arg_0._is_entrez_id, arg_1))
        if arg_0._isezid:
            arg_0._gls = set(map(int, arg_0._gls))
        else:
            arg_0._gls = arg_1

        return '\n'.join(arg_1)


(fn: TransitionOperator, args: Union[Tuple[Any], Any]
                  )

def Func ( arg_0 : arg_1 , arg_2 : arg_3 [ arg_4 [ arg_5 ] , arg_5 ] ) -> arg_4 [ tf . Tensor , TensorNest , TensorNest ] : with tf . GradientTape ( ) as tape : tape . watch ( arg_2 ) arg_6 , arg_7 = call_fn ( arg_0 , arg_2 ) arg_8 = tape . gradient ( arg_6 , arg_2 ) return arg_6 , arg_7 , arg_8

def Func(arg_0: arg_1, arg_2: arg_3[arg_4[arg_5], arg_5]
                  ) -> arg_4[tf.Tensor, TensorNest, TensorNest]:
  """Calls `fn` and returns the gradients with respect to `fn`'s first output.

  Args:
    fn: A `TransitionOperator`.
    args: Arguments to `fn`

  Returns:
    ret: First output of `fn`.
    extra: Second output of `fn`.
    grads: Gradients of `ret` with respect to `args`.
  """
  with tf.GradientTape() as tape:
    tape.watch(arg_2)
    arg_6, arg_7 = call_fn(arg_0, arg_2)
  arg_8 = tape.gradient(arg_6, arg_2)
  return arg_6, arg_7, arg_8

Calls fn and returns the gradients with respect to fn s first output .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
try
:
return
re
.
compile
(
arg_0
.
_create_intent_pattern
(
arg_1
,
arg_2
)
,
re
.
IGNORECASE
)
except
sre_constants
.
error
as
e
:
LOG
.
warning
(
'Failed to parse the line "{}" '
'for {}'
.
format
(
arg_1
,
arg_2
)
)
return

def Func(arg_0, arg_1, arg_2):
        """ Create regex and return. If error occurs returns None. """
        try:
            return re.compile(arg_0._create_intent_pattern(arg_1, arg_2),
                              re.IGNORECASE)
        except sre_constants.error as e:
            LOG.warning('Failed to parse the line "{}" '
                        'for {}'.format(arg_1, arg_2))
            return None

Create regex and return . If error occurs returns None .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
100
,
arg_4
=
125
,
arg_5
=
10
,
arg_6
=
0
,
arg_7
=
'src'
)
:
arg_8
=
int
(
np
.
round
(
arg_4
/
arg_2
)
)
print
(
'Ns = '
,
arg_8
)
print
(
'Rs = '
,
arg_4
/
float
(
arg_8
)
)
print
(
'EsN0 = '
,
arg_3
,
'dB'
)
print
(
'phase = '
,
arg_6
,
'degrees'
)
print
(
'pulse = '
,
arg_7
)
arg_9
,
arg_10
,
arg_11
=
QPSK_bb
(
arg_1
,
arg_8
,
arg_5
,
arg_7
)
arg_9
=
cpx_AWGN
(
arg_9
,
arg_3
,
arg_8
)
arg_12
=
np
.
arange
(
len
(
arg_9
)
)
arg_13
=
arg_9
*
np
.
exp
(
1j
*
2
*
np
.
pi
*
arg_0
/
float
(
arg_4
)
*
arg_12
)
*
np
.
exp
(
1j
*
arg_6
)
return
arg_13
,
arg_10
,
arg_11

def Func(arg_0,arg_1,arg_2,arg_3=100,arg_4=125,arg_5=10,arg_6=0,arg_7='src'):
    """
    This function generates
    """
    arg_8 = int(np.round(arg_4/arg_2))
    print('Ns = ', arg_8)
    print('Rs = ', arg_4/float(arg_8))
    print('EsN0 = ', arg_3, 'dB')
    print('phase = ', arg_6, 'degrees')
    print('pulse = ', arg_7)
    arg_9, arg_10, arg_11 = QPSK_bb(arg_1,arg_8,arg_5,arg_7)
    # Add AWGN to x
    arg_9 = cpx_AWGN(arg_9,arg_3,arg_8)
    arg_12 = np.arange(len(arg_9))
    arg_13 = arg_9*np.exp(1j*2*np.pi*arg_0/float(arg_4)*arg_12) * np.exp(1j*arg_6)
    return arg_13, arg_10, arg_11


(dataframe, mojo_zip_path, genmodel_jar_path=None, classpath=None, java_options=None, verbose=False)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
,
arg_3
=
,
arg_4
=
,
arg_5
=
False
)
:
arg_6
=
tempfile
.
mkdtemp
(
)
try
:
if
not
can_use_pandas
(
)
:
raise
RuntimeException
(
'Cannot import pandas'
)
import
pandas
assert_is_type
(
arg_0
,
pandas
.
DataFrame
)
arg_7
=
os
.
path
.
join
(
arg_6
,
'input.csv'
)
arg_8
=
os
.
path
.
join
(
arg_6
,
'prediction.csv'
)
arg_0
.
to_csv
(
arg_7
)
mojo_predict_csv
(
arg_7
=
arg_7
,
arg_1
=
arg_1
,
output_csv_path
=
arg_8
,
arg_2
=
arg_2
,
arg_3
=
arg_3
,
arg_4
=
arg_4
,
arg_5
=
arg_5
)
return
pandas
.
read_csv
(
arg_8
)
finally
:
shutil
.
rmtree
(
arg_6
)

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None, arg_5=False):
    """
    MOJO scoring function to take a Pandas frame and use MOJO model as zip file to score.

    :param dataframe: Pandas frame to score.
    :param mojo_zip_path: Path to MOJO zip downloaded from H2O.
    :param genmodel_jar_path: Optional, path to genmodel jar file. If None (default) then the h2o-genmodel.jar in the same
        folder as the MOJO zip will be used.
    :param classpath: Optional, specifies custom user defined classpath which will be used when scoring. If None
        (default) then the default classpath for this MOJO model will be used.
    :param java_options: Optional, custom user defined options for Java. By default ``-Xmx4g`` is used.
    :param verbose: Optional, if True, then additional debug information will be printed. False by default.
    :return: Pandas frame with predictions
    """
    arg_6 = tempfile.mkdtemp()
    try:
        if not can_use_pandas():
            raise RuntimeException('Cannot import pandas')
        import pandas
        assert_is_type(arg_0, pandas.DataFrame)
        arg_7 = os.path.join(arg_6, 'input.csv')
        arg_8 = os.path.join(arg_6, 'prediction.csv')
        arg_0.to_csv(arg_7)
        mojo_predict_csv(arg_7=arg_7, arg_1=arg_1,
                         output_csv_path=arg_8, arg_2=arg_2,
                         arg_3=arg_3, arg_4=arg_4, arg_5=arg_5)
        return pandas.read_csv(arg_8)
    finally:
        shutil.rmtree(arg_6)

MOJO scoring function to take a Pandas frame and use MOJO model as zip file to score .


return [itemParse(i) for i in rc.get('itemData', ())]

def
Func
(
arg_0
,
arg_1
=
False
)
:
arg_2
=
'GET'
arg_3
=
'club/consumables/development'
arg_4
=
arg_0
.
__request__
(
arg_2
,
arg_3
)
arg_5
=
[
arg_0
.
pin
.
event
(
'page_view'
,
'Hub - Club'
)
]
arg_0
.
pin
.
send
(
arg_5
,
arg_1
=
arg_1
)
arg_5
=
[
arg_0
.
pin
.
event
(
'page_view'
,
'Club - Consumables'
)
]
arg_0
.
pin
.
send
(
arg_5
,
arg_1
=
arg_1
)
arg_5
=
[
arg_0
.
pin
.
event
(
'page_view'
,
'Club - Consumables - List View'
)
]
arg_0
.
pin
.
send
(
arg_5
,
arg_1
=
arg_1
)
return
[
itemParse
(
arg_6
)
for
arg_6
in
arg_4
.
get
(
'itemData'
,
(
)
)
]

def Func(arg_0, arg_1=False):
        """Return all consumables from club."""
        arg_2 = 'GET'
        arg_3 = 'club/consumables/development'

        arg_4 = arg_0.__request__(arg_2, arg_3)

        arg_5 = [arg_0.pin.event('page_view', 'Hub - Club')]
        arg_0.pin.send(arg_5, arg_1=arg_1)
        arg_5 = [arg_0.pin.event('page_view', 'Club - Consumables')]
        arg_0.pin.send(arg_5, arg_1=arg_1)
        arg_5 = [arg_0.pin.event('page_view', 'Club - Consumables - List View')]
        arg_0.pin.send(arg_5, arg_1=arg_1)

        return [itemParse(arg_6) for arg_6 in arg_4.get('itemData', ())]


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ "" , "now" , "previous" , "difference" ] arg_3 += table_lines_from_stats ( arg_1 , arg_2 , ( "nb_duplicated_lines" , "percent_duplicated_lines" ) ) arg_0 . append ( Table ( children = arg_3 , cols = 4 , rheaders = 1 , cheaders = 1 ) )

def Func(arg_0, arg_1, arg_2):
    """make a layout with some stats about duplication"""
    arg_3 = ["", "now", "previous", "difference"]
    arg_3 += table_lines_from_stats(
        arg_1, arg_2, ("nb_duplicated_lines", "percent_duplicated_lines")
    )
    arg_0.append(Table(children=arg_3, cols=4, rheaders=1, cheaders=1))


def Func ( arg_0 , * arg_1 ) : def hostname_filter ( arg_2 , arg_3 ) : if isregex ( arg_2 ) : return arg_2 . match ( arg_3 . url . hostname ) return arg_3 . url . hostname == arg_2 for arg_2 in arg_1 : arg_0 . use_network_filter ( partial ( hostname_filter , arg_2 ) ) arg_0 . networking = True

def Func(arg_0, *arg_1):
        """
        Enables real networking mode, optionally passing one or multiple
        hostnames that would be used as filter.

        If at least one hostname matches with the outgoing traffic, the
        request will be executed via the real network.

        Arguments:
            *hostnames: optional list of host names to enable real network
                against them. hostname value can be a regular expression.
        """
        def hostname_filter(arg_2, arg_3):
            if isregex(arg_2):
                return arg_2.match(arg_3.url.hostname)
            return arg_3.url.hostname == arg_2

        for arg_2 in arg_1:
            arg_0.use_network_filter(partial(hostname_filter, arg_2))

        arg_0.networking = True

Enables real networking mode optionally passing one or multiple hostnames that would be used as filter .


def Func():
    """Comand line interface of picklemerge."""
    arg_0 = argparse.ArgumentParser(
        description='Recursively merges two or more pickle files. Only supports pickles consisting '
        'of a single dictionary object.')
    arg_0.add_argument('destination', type=argparse.FileType('r+b'),
                        help='File to write to and include in resulting pickle. (WILL BE CHANGED)')
    arg_0.add_argument('source', type=argparse.FileType('rb'), nargs='+',
                        help='File to include in resulting pickle.')

    arg_1 = arg_0.parse_args()

    arg_2 = pickle.load(arg_1.destination)
    assert isinstance(arg_2, collections.Mapping), "only Mapping types can be handled."

    for arg_3 in arg_1.source:
        arg_4 = pickle.load(arg_3)
        assert isinstance(arg_4, collections.Mapping), "only Mapping types can be handled."

        update(arg_2, arg_4)

    arg_1.destination.seek(0)
    arg_1.destination.truncate()
    pickle.dump(arg_2, arg_1.destination)


def Func ( arg_0 , arg_1 , arg_2 = arg_3 . stdout , arg_5 = "\n" ) : arg_6 = getattr ( arg_0 , "_progress_bar" , None ) if arg_6 is not None : arg_6 . write ( arg_1 , arg_2 = arg_2 , arg_5 = "\n" ) return print ( arg_1 , arg_2 = arg_2 , arg_5 = "\n" )

def Func(arg_0, arg_1, arg_2=arg_3.stdout, arg_5="\n"):
        """Output message.

        Parameters:
            s(str): message to output
            file(file-like): output to
            end(str): end mark of message

        Return:
            None

        """
        arg_6 = getattr(arg_0, "_progress_bar", None)
        if arg_6 is not None:
            arg_6.write(arg_1, arg_2=arg_2, arg_5="\n")
            return

        print(arg_1, arg_2=arg_2, arg_5="\n")


def Func(arg_0):
    """Main entry point"""

    arg_1 = cij.runner.trun_from_file(arg_0.trun_fpath)

    rehome(arg_1["conf"]["OUTPUT"], arg_0.output, arg_1)

    postprocess(arg_1)

    cij.emph("Func: reports are uses tmpl_fpath: %r" % arg_0.tmpl_fpath)
    cij.emph("Func: reports are here args.output: %r" % arg_0.output)

    arg_2 = os.sep.join([arg_0.output, "%s.html" % arg_0.tmpl_name])
    cij.emph("html_fpath: %r" % arg_2)
    try:                                    # Create and store HTML report
        with open(arg_2, 'w') as html_file:
            html_file.write(dset_to_html(arg_1, arg_0.tmpl_fpath))
    except (IOError, OSError, ValueError) as exc:
        import traceback
        traceback.print_exc()
        cij.err("rprtr:Func: exc: %s" % exc)
        return 1

    return 0


def Func(arg_0, arg_1):
        """take a list of module names which are pylint plugins and load
        and register them
        """
        for arg_2 in arg_1:
            if arg_2 in arg_0._dynamic_plugins:
                continue
            arg_0._dynamic_plugins.add(arg_2)
            arg_3 = modutils.load_module_from_name(arg_2)
            arg_3.register(arg_0)


(self, field_name, value_predicate,
                        code=VALUE_PREDICATE_FALSE,
                        message=MESSAGES[VALUE_PREDICATE_FALSE],
                        modulus=1)

def Func(arg_0, arg_1, arg_2,
                        arg_3=arg_4,
                        arg_5=arg_6[arg_4],
                        arg_7=1):
        """
        Add a value predicate function for the specified field.

        N.B., everything you can do with value predicates can also be done with
        value check functions, whether you use one or the other is a matter of
        style.

        Arguments
        ---------

        `field_name` - the name of the field to attach the value predicate
        function to

        `value_predicate` - a function that accepts a single argument (a value)
        and returns False if the value is not valid

        `code` - problem code to report if a value is not valid, defaults to
        `VALUE_PREDICATE_FALSE`

        `message` - problem message to report if a value is not valid

        `modulus` - apply the check to every nth record, defaults to 1 (check
        every record)

        """

        assert arg_1 in arg_0._field_names, 'unexpected field name: %s' % arg_1
        assert callable(arg_2), 'value predicate must be a callable function'

        arg_8 = arg_1, arg_2, arg_3, arg_5, arg_7
        arg_0._value_predicates.append(arg_8)

Add a value predicate function for the specified field .


def Func(arg_0, arg_1):
        """ method to subscribe a user to a service
        """
        arg_2 = arg_0.root_url + "Func"
        arg_3 = {}
        arg_3["username"] = arg_1
        return arg_0._query(arg_2, arg_3)


def Func ( arg_0 , arg_1 = 0 ) : if sys . version_info [ 0 ] >= 3 : arg_2 = 10 ** arg_1 return float ( math . floor ( ( arg_0 * arg_2 ) + math . copysign ( 0.5 , arg_0 ) ) ) / arg_2 else : return round ( arg_0 , arg_1 )

def Func(arg_0, arg_1=0):
    """Round half-way away from zero.

    Python2's round() method.
    """
    if sys.version_info[0] >= 3:
        arg_2 = 10**arg_1
        return float(math.floor((arg_0 * arg_2) + math.copysign(0.5, arg_0))) / arg_2
    else:
        return round(arg_0, arg_1)


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
.
get
(
'title'
)
or
''
arg_3
=
arg_1
.
get
(
'start'
)
if
arg_3
:
if
course_available_for_enrollment
(
arg_1
)
:
arg_2
+=
' ({starts}: {:%B %Y})'
.
format
(
parse_lms_api_datetime
(
arg_3
)
,
starts
=
_
(
'Starts'
)
)
else
:
arg_2
+=
' ({:%B %Y} - {enrollment_closed})'
.
format
(
parse_lms_api_datetime
(
arg_3
)
,
enrollment_closed
=
_
(
'Enrollment Closed'
)
)
arg_4
=
[
]
arg_5
=
transform_language_code
(
arg_1
.
get
(
'content_language'
,
''
)
)
for
arg_6
in
arg_0
.
enterprise_configuration
.
get_locales
(
default_locale
=
arg_5
)
:
arg_4
.
append
(
{
'locale'
:
arg_6
,
'value'
:
arg_2
}
)
return
arg_4

def Func(arg_0, arg_1):
        """
        Return the title of the courserun content item.
        """
        arg_2 = arg_1.get('title') or ''
        arg_3 = arg_1.get('start')

        if arg_3:
            if course_available_for_enrollment(arg_1):
                arg_2 += ' ({starts}: {:%B %Y})'.format(
                    parse_lms_api_datetime(arg_3),
                    starts=_('Starts')
                )
            else:
                arg_2 += ' ({:%B %Y} - {enrollment_closed})'.format(
                    parse_lms_api_datetime(arg_3),
                    enrollment_closed=_('Enrollment Closed')
                )

        arg_4 = []
        arg_5 = transform_language_code(arg_1.get('content_language', ''))
        for arg_6 in arg_0.enterprise_configuration.get_locales(default_locale=arg_5):
            arg_4.append({
                'locale': arg_6,
                'value': arg_2
            })

        return arg_4

Return the title of the courserun content item .


def Func ( arg_0 , arg_1 ) : if SparseParameter . _is_supported_matrix ( arg_1 ) : return True else : return super ( SparseResult , arg_0 ) . Func ( arg_1 )

def Func(arg_0, arg_1):
        """Supports everything of parent class and csr, csc, bsr, and dia sparse matrices."""
        if SparseParameter._is_supported_matrix(arg_1):
            return True
        else:
            return super(SparseResult, arg_0).Func(arg_1)

Supports everything of parent class and csr csc bsr and dia sparse matrices .


return redirect(request.referrer or link)

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 , arg_4 = institute_and_case ( store , arg_0 , arg_1 ) arg_5 = store . variant ( arg_2 ) arg_6 = store . user ( current_user . email ) arg_7 = request . form [ 'type' ] or None arg_8 = url_for ( 'variants.variant' , arg_0 = arg_0 , arg_1 = arg_1 , arg_2 = arg_2 ) store . validate ( arg_3 , arg_4 , arg_6 , arg_8 , arg_5 , arg_7 ) return redirect ( request . referrer or arg_8 )

def Func(arg_0, arg_1, arg_2):
    """Mark a variant as sanger validated."""
    arg_3, arg_4 = institute_and_case(store, arg_0, arg_1)
    arg_5 = store.variant(arg_2)
    arg_6 = store.user(current_user.email)
    arg_7 = request.form['type'] or None
    arg_8 = url_for('variants.variant', arg_0=arg_0, arg_1=arg_1,
                   arg_2=arg_2)
    store.validate(arg_3, arg_4, arg_6, arg_8, arg_5, arg_7)
    return redirect(request.referrer or arg_8)


def Func ( arg_0 , arg_1 ) : if arg_0 . within_logging_statement ( ) and arg_0 . within_logging_argument ( ) : if isinstance ( arg_1 . op , Mod ) : arg_0 . violations . append ( ( arg_1 , PERCENT_FORMAT_VIOLATION ) ) if isinstance ( arg_1 . op , Add ) : arg_0 . violations . append ( ( arg_1 , STRING_CONCAT_VIOLATION ) ) super ( LoggingVisitor , arg_0 ) . generic_visit ( arg_1 )

def Func(arg_0, arg_1):
        """
        Process binary operations while processing the first logging argument.

        """
        if arg_0.within_logging_statement() and arg_0.within_logging_argument():
            # handle percent format
            if isinstance(arg_1.op, Mod):
                arg_0.violations.append((arg_1, PERCENT_FORMAT_VIOLATION))
            # handle string concat
            if isinstance(arg_1.op, Add):
                arg_0.violations.append((arg_1, STRING_CONCAT_VIOLATION))
        super(LoggingVisitor, arg_0).generic_visit(arg_1)

Process binary operations while processing the first logging argument .


def Func(arg_0, arg_1, arg_2=True):
        """ return list with the repositories for a backend_section """
        arg_3 = []
        arg_4 = TaskProjects.get_projects()

        for arg_5 in arg_4:
            if arg_1 in arg_4[arg_5]:
                # if the projects.json doesn't contain the `unknown` project, add the repos in the bck section
                if arg_0.GLOBAL_PROJECT not in arg_4:
                    arg_3 += arg_4[arg_5][arg_1]
                else:
                    # if the projects.json contains the `unknown` project
                    # in the case of the collection phase
                    if arg_2:
                        # if the current project is not `unknown`
                        if arg_5 != arg_0.GLOBAL_PROJECT:
                            # if the bck section is not in the `unknown` project, add the repos in the bck section
                            if arg_1 not in arg_4[arg_0.GLOBAL_PROJECT]:
                                arg_3 += arg_4[arg_5][arg_1]
                            # if the backend section is in the `unknown` project,
                            # add the repo in the bck section under `unknown`
                            elif arg_1 in arg_4[arg_5] and arg_1 in arg_4[arg_0.GLOBAL_PROJECT]:
                                arg_3 += arg_4[arg_0.GLOBAL_PROJECT][arg_1]
                        # if the current project is `unknown`
                        else:
                            # if the backend section is only in the `unknown` project,
                            # add the repo in the bck section under `unknown`
                            arg_6 = [arg_4[arg_5] for arg_5 in arg_4 if arg_5 != arg_0.GLOBAL_PROJECT][0]
                            if arg_1 not in arg_6:
                                arg_3 += arg_4[arg_0.GLOBAL_PROJECT][arg_1]
                    # in the case of the enrichment phase
                    else:
                        # if the current project is not `unknown`
                        if arg_5 != arg_0.GLOBAL_PROJECT:
                            # if the bck section is not in the `unknown` project, add the repos in the bck section
                            if arg_1 not in arg_4[arg_0.GLOBAL_PROJECT]:
                                arg_3 += arg_4[arg_5][arg_1]
                            # if the backend section is in the `unknown` project, add the repos in the bck section
                            elif arg_1 in arg_4[arg_5] and arg_1 in arg_4[arg_0.GLOBAL_PROJECT]:
                                arg_3 += arg_4[arg_5][arg_1]
                        # if the current project is `unknown`
                        else:
                            # if the backend section is only in the `unknown` project,
                            # add the repo in the bck section under `unknown`
                            arg_7 = [arg_4[prj] for prj in arg_4 if prj != arg_0.GLOBAL_PROJECT]
                            arg_8 = list(set([section for prj in arg_7
                                                                for section in list(prj.keys())]))
                            if arg_1 not in arg_8:
                                arg_3 += arg_4[arg_5][arg_1]

        logger.debug("List of repos for %s: %s (raw=%s)", arg_1, arg_3, arg_2)

        # avoid duplicated repos
        arg_3 = list(set(arg_3))

        return arg_3


def Func ( arg_0 , arg_1 , arg_2 ) : return arg_1 [ arg_2 * arg_0 . chunklen [ 0 ] : ( arg_2 + 1 ) * arg_0 . chunklen [ 0 ] ]

def Func(arg_0, arg_1, arg_2):
        '''
        partition the data into chunks and retrieve the chunk at the given index
        '''
        return arg_1[arg_2*arg_0.chunklen[0]:(arg_2+1)*arg_0.chunklen[0]]


def Func ( arg_0 , arg_1 , arg_2 = None ) : glPushClientAttrib ( GL_CLIENT_VERTEX_ARRAY_BIT ) for arg_3 , arg_4 in arg_0 . buffer_attributes : arg_3 . bind ( ) for arg_5 in arg_4 : arg_5 . enable ( ) arg_5 . set_pointer ( arg_5 . buffer . ptr ) if vertexbuffer . _workaround_vbo_finish : glFinish ( ) if arg_2 is not None : glDrawArrays ( arg_1 , arg_2 . start , arg_2 . count ) else : arg_6 , arg_7 = arg_0 . allocator . get_allocated_regions ( ) arg_8 = len ( arg_6 ) if arg_8 == 0 : pass elif arg_8 == 1 : glDrawArrays ( arg_1 , arg_6 [ 0 ] , int ( arg_7 [ 0 ] ) ) elif gl_info . have_version ( 1 , 4 ) : arg_6 = ( GLint * arg_8 ) ( * arg_6 ) arg_7 = ( GLsizei * arg_8 ) ( * arg_7 ) glMultiDrawArrays ( arg_1 , arg_6 , arg_7 , arg_8 ) else : for arg_9 , arg_10 in zip ( arg_6 , arg_7 ) : glDrawArrays ( arg_1 , arg_9 , arg_10 ) for arg_3 , arg_11 in arg_0 . buffer_attributes : arg_3 . unbind ( ) glPopClientAttrib ( )

def Func(arg_0, arg_1, arg_2=None):
        '''Draw vertices in the domain.

        If `vertex_list` is not specified, all vertices in the domain are
        drawn.  This is the most efficient way to render primitives.

        If `vertex_list` specifies a `VertexList`, only primitives in that
        list will be drawn.

        :Parameters:
            `mode` : int
                OpenGL drawing mode, e.g. ``GL_POINTS``, ``GL_LINES``, etc.
            `vertex_list` : `VertexList`
                Vertex list to draw, or ``None`` for all lists in this domain.

        '''
        glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT)
        for arg_3, arg_4 in arg_0.buffer_attributes:
            arg_3.bind()
            for arg_5 in arg_4:
                arg_5.enable()
                arg_5.set_pointer(arg_5.buffer.ptr)
        if vertexbuffer._workaround_vbo_finish:
            glFinish()

        if arg_2 is not None:
            glDrawArrays(arg_1, arg_2.start, arg_2.count)
        else:
            arg_6, arg_7 = arg_0.allocator.get_allocated_regions()
            arg_8 = len(arg_6)
            if arg_8 == 0:
                pass
            elif arg_8 == 1:
                # Common case
                glDrawArrays(arg_1, arg_6[0], int(arg_7[0]))
            elif gl_info.have_version(1, 4):
                arg_6 = (GLint * arg_8)(*arg_6)
                arg_7 = (GLsizei * arg_8)(*arg_7)
                glMultiDrawArrays(arg_1, arg_6, arg_7, arg_8)
            else:
                for arg_9, arg_10 in zip(arg_6, arg_7):
                    glDrawArrays(arg_1, arg_9, arg_10)

        for arg_3, arg_11 in arg_0.buffer_attributes:
            arg_3.unbind()
        glPopClientAttrib()


def Func ( arg_0 ) : if arg_3 . CONFIGURATION [ "auto_continue" ] : arg_1 = { } arg_2 = arg_3 . INTERN [ "counter" ] [ "number" ] arg_1 [ arg_3 . INTERN [ "file_to_test" ] ] = { "tested" : arg_2 [ "tested" ] , "up" : arg_2 [ "up" ] , "down" : arg_2 [ "down" ] , "invalid" : arg_2 [ "invalid" ] , } arg_5 = { } arg_5 . update ( arg_0 . Func_content ) arg_5 . update ( arg_1 ) Dict ( arg_5 ) . to_json ( arg_0 . autocontinue_log_file )

def Func(arg_0):
        """
        Backup the current execution state.
        """

        if arg_3.CONFIGURATION["auto_continue"]:
            # The auto_continue subsystem is activated.

            # We initiate the location where we are going to save the data to Func.
            arg_1 = {}
            # We get the current counter states.
            arg_2 = arg_3.INTERN["counter"]["number"]

            # We initiate the data we have to Func.
            arg_1[arg_3.INTERN["file_to_test"]] = {
                # We Func the number of tested.
                "tested": arg_2["tested"],
                # We Func the number of up.
                "up": arg_2["up"],
                # We Func the number of down.
                "down": arg_2["down"],
                # We Func the number of invalid.
                "invalid": arg_2["invalid"],
            }

            # We initiate the final data we have to save.
            # We initiate this variable instead of updating Func_content because
            # we do not want to touch the Func_content.
            arg_5 = {}

            # We add the Func_content into to_save.
            arg_5.update(arg_0.Func_content)
            # And we overwrite with the newly data to Func.
            arg_5.update(arg_1)

            # Finaly, we save our informations into the log file.
            Dict(arg_5).to_json(arg_0.autocontinue_log_file)


(ctx: ReaderContext, allow_arbitrary_escapes: bool = False)

def
Func
(
arg_0
:
arg_1
,
arg_2
:
arg_3
=
False
)
->
str
:
arg_4
:
List
[
str
]
=
[
]
arg_5
=
arg_0
.
reader
while
True
:
arg_6
=
arg_5
.
next_token
(
)
if
arg_6
==
""
:
raise
SyntaxError
(
"Unexpected EOF in string"
)
if
arg_6
==
"\\"
:
arg_6
=
arg_5
.
next_token
(
)
arg_7
=
_STR_ESCAPE_CHARS
.
get
(
arg_6
,
)
if
arg_7
:
arg_4
.
append
(
arg_7
)
continue
if
arg_2
:
arg_4
.
append
(
"\\"
)
else
:
raise
SyntaxError
(
"Unknown escape sequence: \\{token}"
)
if
arg_6
==
'"'
:
arg_5
.
next_token
(
)
return
""
.
join
(
arg_4
)
arg_4
.
append
(
arg_6
)

def Func(arg_0: arg_1, arg_2: arg_3 = False) -> str:
    """Return a string from the input stream.

    If allow_arbitrary_escapes is True, do not throw a SyntaxError if an
    unknown escape sequence is encountered."""
    arg_4: List[str] = []
    arg_5 = arg_0.reader
    while True:
        arg_6 = arg_5.next_token()
        if arg_6 == "":
            raise SyntaxError("Unexpected EOF in string")
        if arg_6 == "\\":
            arg_6 = arg_5.next_token()
            arg_7 = _STR_ESCAPE_CHARS.get(arg_6, None)
            if arg_7:
                arg_4.append(arg_7)
                continue
            if arg_2:
                arg_4.append("\\")
            else:
                raise SyntaxError("Unknown escape sequence: \\{token}")
        if arg_6 == '"':
            arg_5.next_token()
            return "".join(arg_4)
        arg_4.append(arg_6)


def Func(arg_0, arg_1):
    """Postprocessing, sorts computed firing rates into a table

    :param traj:

        Container for results and parameters

    :param result_list:

        List of tuples, where first entry is the run index and second is the actual
        result of the corresponding run.

    :return:
    """

    # Let's create a pandas DataFrame to sort the computed firing rate according to the
    # parameters. We could have also used a 2D numpy array.
    # But a pandas DataFrame has the advantage that we can index into directly with
    # the parameter values without translating these into integer indices.
    arg_2 = arg_0.par.neuron.f_get('I').f_get_range()
    arg_3 = arg_0.par.neuron.f_get('tau_ref').f_get_range()

    arg_4 = sorted(set(arg_2))
    arg_5 = sorted(set(arg_3))
    arg_6 = pd.DataFrame(columns=arg_5, index=arg_4)
    # This frame is basically a two dimensional table that we can index with our
    # parameters

    # Now iterate over the results. The result list is a list of tuples, with the
    # run index at first position and our result at the second
    for arg_7 in arg_1:
        arg_8 = arg_7[0]
        arg_9 = arg_7[1]
        arg_10 = arg_2[arg_8]
        arg_11 = arg_3[arg_8]
        arg_6.loc[arg_10, arg_11] = arg_9 # Put the firing rate into the
        # data frame

    # Finally we going to store our new firing rate table into the trajectory
    arg_0.f_add_result('summary.firing_rates', arg_6=arg_6,
                      comment='Contains a pandas data frame with all firing rates.')

Postprocessing sorts computed firing rates into a table


async def Func(arg_0, arg_1, *, arg_2: arg_3):
        """ Searches and plays a song from a given query. """
        arg_4 = arg_0.bot.lavalink.players.get(arg_1.guild.id)

        arg_2 = arg_2.strip('<>')

        if not url_rx.match(arg_2):
            arg_2 = f'ytsearch:{query}'

        arg_5 = await arg_0.bot.lavalink.get_tracks(arg_2)

        if not arg_5:
            return await arg_1.send('Nothing found!')

        arg_6 = discord.Embed(color=discord.Color.blurple())

        if 'list' in arg_2 and 'ytsearch:' not in arg_2:
            for arg_7 in arg_5:
                arg_4.add(requester=arg_1.author.id, arg_7=arg_7)

            arg_6.title = 'Playlist enqueued!'
            arg_6.description = f'Imported {len(tracks)} tracks from the playlist!'
            await arg_1.send(arg_6=arg_6)
        else:
            arg_10 = arg_5[0]["info"]["title"]
            arg_11 = arg_5[0]["info"]["uri"]

            arg_6.title = "Track enqueued!"
            arg_6.description = f'[{track_title}]({track_uri})'
            arg_4.add(requester=arg_1.author.id, arg_7=arg_5[0])

        if not arg_4.isFuncing:
            await arg_4.play()

Searches and plays a song from a given query .


(self, reportid, r_title, r_cb, checker)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """register a report

        reportid is the unique identifier for the report
        r_title the report's title
        r_cb the method to call to make the report
        checker is the checker defining the report
        """
        arg_1 = arg_1.upper()
        arg_0._reports[arg_4].append((arg_1, arg_2, arg_3))


def Func ( arg_0 , arg_1 ) : if np . ndim ( arg_0 ) == 1 : arg_0 = [ arg_0 ] arg_2 = np . zeros ( arg_1 . size , dtype = bool ) for arg_3 , arg_4 in arg_0 : arg_2 [ ( arg_1 > arg_3 ) & ( arg_1 < arg_4 ) ] = True return arg_2

def Func(arg_0, arg_1):
    """
    Generate boolean array from list of limit tuples.

    Parameters
    ----------
    tuples : array_like
        [2, n] array of (start, end) values
    x : array_like
        x scale the tuples are mapped to

    Returns
    -------
    array_like
        boolean array, True where x is between each pair of tuples.
    """
    if np.ndim(arg_0) == 1:
        arg_0 = [arg_0]

    arg_2 = np.zeros(arg_1.size, dtype=bool)
    for arg_3, arg_4 in arg_0:
        arg_2[(arg_1 > arg_3) & (arg_1 < arg_4)] = True
    return arg_2

Generate boolean array from list of limit tuples .


(self, cat, ctr=None, nb_results=None, offset=None)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None ) : arg_5 = LIST_URL + "?c=3&cat={}" . format ( requests . utils . quote ( arg_1 ) ) if arg_2 is not None : arg_5 += "&ctr={}" . format ( requests . utils . quote ( arg_2 ) ) if arg_3 is not None : arg_5 += "&n={}" . format ( requests . utils . quote ( str ( arg_3 ) ) ) if arg_4 is not None : arg_5 += "&o={}" . format ( requests . utils . quote ( str ( arg_4 ) ) ) arg_6 = arg_0 . executeRequestApi2 ( arg_5 ) arg_7 = [ ] arg_8 = [ ] if arg_2 is None : for arg_9 in arg_6 . preFetch : for arg_10 in arg_9 . response . payload . FuncResponse . doc : arg_7 . extend ( arg_10 . child ) return [ arg_11 . docid for arg_11 in arg_7 ] else : arg_12 = [ ] for arg_13 in arg_6 . payload . FuncResponse . doc : for arg_11 in arg_13 . child : for arg_14 in arg_11 . child : arg_12 . append ( utils . parseProtobufObj ( arg_14 ) ) return arg_12

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None):
        """List all possible subcategories for a specific category. If
        also a subcategory is provided, Func apps from this category.

        Args:
            cat (str): category id
            ctr (str): subcategory id
            nb_results (int): if a subcategory is specified, limit number
                of results to this number
            offset (int): if a subcategory is specified, start counting from this
                result
        Returns:
            A Func of categories. If subcategory is specified, a Func of apps in this
            category.
        """
        arg_5 = LIST_URL + "?c=3&cat={}".format(requests.utils.quote(arg_1))
        if arg_2 is not None:
            arg_5 += "&ctr={}".format(requests.utils.quote(arg_2))
        if arg_3 is not None:
            arg_5 += "&n={}".format(requests.utils.quote(str(arg_3)))
        if arg_4 is not None:
            arg_5 += "&o={}".format(requests.utils.quote(str(arg_4)))
        arg_6 = arg_0.executeRequestApi2(arg_5)
        arg_7 = []
        arg_8 = []
        if arg_2 is None:
            # Func subcategories
            for arg_9 in arg_6.preFetch:
                for arg_10 in arg_9.response.payload.FuncResponse.doc:
                    arg_7.extend(arg_10.child)
            return [arg_11.docid for arg_11 in arg_7]
        else:
            arg_12 = []
            for arg_13 in arg_6.payload.FuncResponse.doc: # categories
                for arg_11 in arg_13.child: # sub-category
                    for arg_14 in arg_11.child: # app
                        arg_12.append(utils.parseProtobufObj(arg_14))
            return arg_12

List all possible subcategories for a specific category. If
        also a subcategory is provided, list apps from this category.

        Args:
            cat (str): category id
            ctr (str): subcategory id
            nb_results (int): if a subcategory is specified, limit number
                of results to this number
            offset (int): if a subcategory is specified, start counting from this
                result
        Returns:
            A list of categories. If subcategory is specified, a list of apps in this
            category.

List all possible subcategories for a specific category . If also a subcategory is provided list apps from this category .


def Func ( arg_0 , arg_1 ) : if tensorshape_util . rank ( arg_1 . shape ) is not None : if tensorshape_util . rank ( arg_1 . shape ) == 1 : arg_1 = arg_1 [ tf . newaxis , : ] return arg_1 arg_2 = tf . shape ( input = arg_1 ) arg_3 = tf . concat ( [ arg_2 [ : - 1 ] , distribution_util . pick_vector ( tf . equal ( tf . rank ( arg_1 ) , 1 ) , [ 1 ] , np . array ( [ ] , dtype = np . int32 ) ) , arg_2 [ - 1 : ] , ] , 0 ) return tf . reshape ( arg_1 , arg_3 )

def Func(arg_0, arg_1):
    """Ensures non-scalar input has at least one column.

    Example:
      If `x = [1, 2, 3]` then the output is `[[1], [2], [3]]`.

      If `x = [[1, 2, 3], [4, 5, 6]]` then the output is unchanged.

      If `x = 1` then the output is unchanged.

    Args:
      x: `Tensor`.

    Returns:
      columnar_x: `Tensor` with at least two dimensions.
    """
    if tensorshape_util.rank(arg_1.shape) is not None:
      if tensorshape_util.rank(arg_1.shape) == 1:
        arg_1 = arg_1[tf.newaxis, :]
      return arg_1
    arg_2 = tf.shape(input=arg_1)
    arg_3 = tf.concat([
        arg_2[:-1],
        distribution_util.pick_vector(
            tf.equal(tf.rank(arg_1), 1), [1], np.array([], dtype=np.int32)),
        arg_2[-1:],
    ], 0)
    return tf.reshape(arg_1, arg_3)

Ensures non - scalar input has at least one column .


def Func ( arg_0 ) : arg_1 = [ ] arg_2 = object ( ) while local_ps . value : arg_3 = optional ( arg_0 , arg_2 ) if arg_3 == arg_2 : break arg_1 . append ( arg_3 ) return arg_1

def Func(arg_0):
    """Applies the parser to input zero or more times.

    Returns a list of parser results.
    """
    arg_1 = []
    arg_2 = object()
    while local_ps.value:
        arg_3 = optional(arg_0, arg_2)
        if arg_3 == arg_2:
            break
        arg_1.append(arg_3)
    return arg_1

Applies the parser to input zero or more times . Returns a list of parser results .


return sorted(specs, key=lambda s: s[key])

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = os . path . join ( arg_2 , arg_3 ) arg_5 = arg_0 . _expand_pattern ( arg_4 ) arg_6 = [ ] for ( arg_7 , arg_8 ) in arg_5 : arg_9 = [ os . path . join ( arg_7 , f ) for f in os . listdir ( arg_7 ) ] if os . path . isdir ( arg_7 ) else [ arg_7 ] for arg_10 in arg_9 : arg_6 . append ( dict ( arg_8 , ** { arg_1 : os . path . abspath ( arg_10 ) } ) ) return sorted ( arg_6 , arg_1 = lambda s : s [ arg_1 ] )

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Loads the files that match the given pattern.
        """
        arg_4 = os.path.join(arg_2, arg_3)
        arg_5 = arg_0._expand_pattern(arg_4)

        arg_6=[]
        for (arg_7, arg_8) in arg_5:
            arg_9 = [os.path.join(arg_7,f) for f in os.listdir(arg_7)] if os.path.isdir(arg_7) else [arg_7]
            for arg_10 in arg_9:
                arg_6.append(dict(arg_8,**{arg_1:os.path.abspath(arg_10)}))

        return sorted(arg_6, arg_1=lambda s: s[arg_1])

Loads the files that match the given pattern .


(filename, offset=-1, length=-1, escape_data=False)

def Func ( arg_0 , arg_1 = - 1 , arg_2 = - 1 , arg_3 = False ) : try : arg_2 = int ( arg_2 ) arg_1 = int ( arg_1 ) except ValueError : return { } if not os . path . isfile ( arg_0 ) : return { } try : arg_4 = os . stat ( arg_0 ) except Exception : return { } if arg_1 == - 1 : arg_1 = arg_4 . st_size if arg_2 == - 1 : arg_2 = arg_4 . st_size - arg_1 with open ( arg_0 , "r" ) as fp : fp . seek ( arg_1 ) try : arg_5 = fp . read ( arg_2 ) except IOError : return { } if arg_5 : arg_5 = _escape_data ( arg_5 ) if arg_3 else arg_5 return dict ( arg_1 = arg_1 , arg_2 = len ( arg_5 ) , arg_5 = arg_5 ) return dict ( arg_1 = arg_1 , arg_2 = 0 )

def Func(arg_0, arg_1=-1, arg_2=-1, arg_3=False):
  """
  Read a chunk of a file from an offset upto the length.
  """
  try:
    arg_2 = int(arg_2)
    arg_1 = int(arg_1)
  except ValueError:
    return {}

  if not os.path.isfile(arg_0):
    return {}

  try:
    arg_4 = os.stat(arg_0)
  except Exception:
    return {}

  if arg_1 == -1:
    arg_1 = arg_4.st_size

  if arg_2 == -1:
    arg_2 = arg_4.st_size - arg_1

  with open(arg_0, "r") as fp:
    fp.seek(arg_1)
    try:
      arg_5 = fp.read(arg_2)
    except IOError:
      return {}

  if arg_5:
    arg_5 = _escape_data(arg_5) if arg_3 else arg_5
    return dict(arg_1=arg_1, arg_2=len(arg_5), arg_5=arg_5)

  return dict(arg_1=arg_1, arg_2=0)

Read a chunk of a file from an offset upto the length .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . _oldvars . get ( arg_1 . name ) if arg_2 is not None : if isinstance ( arg_2 , Variable ) : if arg_2 . compliesTo ( arg_1 ) : arg_1 . value = arg_2 . value else : arg_1 . value = arg_1 . sanitize ( arg_2 ) else : for arg_4 in VarListener . listeners : arg_4 . var_added ( arg_1 ) arg_0 . _vars [ arg_1 . name ] = arg_1 arg_0 . _namespace [ arg_1 . name ] = arg_1 . value arg_0 . _oldvars [ arg_1 . name ] = arg_1 return arg_1

def Func(arg_0, arg_1):
        ''' Sets a new accessible variable.

        :param v: Variable.
        '''
        arg_2 = arg_0._oldvars.get(arg_1.name)
        if arg_2 is not None:
            if isinstance(arg_2, Variable):
                if arg_2.compliesTo(arg_1):
                    arg_1.value = arg_2.value
            else:
                # Set from commandline
                arg_1.value = arg_1.sanitize(arg_2)
        else:
            for arg_4 in VarListener.listeners:
                arg_4.var_added(arg_1)
        arg_0._vars[arg_1.name] = arg_1
        arg_0._namespace[arg_1.name] = arg_1.value
        arg_0._oldvars[arg_1.name] = arg_1
        return arg_1


(pem=None, cert=None, key=None, aad=False)

def Func(arg_0=None, arg_1=None, arg_2=None, arg_3=False):
    """Set certificate usage paths"""

    if any([arg_1, arg_2]) and arg_0:
        raise ValueError('Cannot specify both pem and cert or key')

    if any([arg_1, arg_2]) and not all([arg_1, arg_2]):
        raise ValueError('Must specify both cert and key')

    if arg_0:
        set_config_value('security', 'pem')
        set_config_value('pem_path', arg_0)
    elif arg_1 or arg_2:
        set_config_value('security', 'cert')
        set_config_value('cert_path', arg_1)
        set_config_value('key_path', arg_2)
    elif arg_3:
        set_config_value('security', 'aad')
    else:
        set_config_value('security', 'none')


(self, newname, subsamples=None, infile=None)

def Func(arg_0, arg_1, arg_2=None, arg_3=None):
        """
        Returns a copy of the Assembly object. Does not allow Assembly
        object names to be replicated in namespace or path.
        """
        ## subsample by removal or keeping.
        arg_4 = 0

        ## is there a better way to ask if it already exists?
        if (arg_1 == arg_0.name or os.path.exists(
                                    os.path.join(arg_0.paramsdict["project_dir"],
                                    arg_1+".assembly"))):
            print("{}Assembly object named {} already exists"\
                  .format(arg_0._spacer, arg_1))

        else:
            ## Make sure the new name doesn't have any wacky characters
            arg_0._check_name(arg_1)

            ## Bozo-check. Carve off 'params-' if it's in the new name.
            if arg_1.startswith("params-"):
                arg_1 = arg_1.split("params-")[1]

            ## create a copy of the Assembly obj
            arg_5 = copy.deepcopy(arg_0)
            arg_5.name = arg_1
            arg_5.paramsdict["assembly_name"] = arg_1

            if arg_2 and arg_3:
                print(BRANCH_NAMES_AND_INPUT)

            if arg_3:
                if arg_3[0] == "-":
                    arg_4 = 1
                    arg_3 = arg_3[1:]
                if os.path.exists(arg_3):
                    arg_2 = _read_sample_names(arg_3)

            ## if remove then swap the samples
            if arg_4:
                arg_2 = list(set(arg_0.samples.keys()) - set(arg_2))

            ## create copies of each subsampled Sample obj
            if arg_2:
                for arg_8 in arg_2:
                    if arg_8 in arg_0.samples:
                        arg_5.samples[arg_8] = copy.deepcopy(arg_0.samples[arg_8])
                    else:
                        print("Sample name not found: {}".format(arg_8))

                ## reload sample dict w/o non subsamples
                arg_5.samples = {arg_6:arg_10 for arg_6, arg_10 in \
                           arg_5.samples.items() if arg_6 in arg_2}

            ## create copies of each subsampled Sample obj
            else:
                for arg_10 in arg_0.samples:
                    arg_5.samples[arg_10] = copy.deepcopy(arg_0.samples[arg_10])

            ## save json of new obj and return object
            arg_5.save()
            return arg_5

Returns a copy of the Assembly object . Does not allow Assembly object names to be replicated in namespace or path .


(self, start_time_ut=None, end_time_ut=None, route_type=None)

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
        """
        Obtain a list of events that take place during a time interval.
        Each event needs to be only partially overlap the given time interval.
        Does not include walking events.

        Parameters
        ----------
        start_time_ut : int
            start of the time interval in unix time (seconds)
        end_time_ut: int
            end of the time interval in unix time (seconds)
        route_type: int
            consider only events for this route_type

        Returns
        -------
        events: pandas.DataFrame
            with the following columns and types
                dep_time_ut: int
                arr_time_ut: int
                from_stop_I: int
                to_stop_I: int
                trip_I : int
                shape_id : int
                route_type : int

        See also
        --------
        Func_in_time_span : an older version of the same thing
        """
        arg_4 = arg_0._get_day_trips_table_name()
        arg_5 = "SELECT stop_I, seq, trip_I, route_I, routes.route_id AS route_id, routes.type AS route_type, " \
                      "shape_id, day_start_ut+dep_time_ds AS dep_time_ut, day_start_ut+arr_time_ds AS arr_time_ut " \
                      "FROM " + arg_4 + " " \
                                             "JOIN trips USING(trip_I) " \
                                             "JOIN routes USING(route_I) " \
                                             "JOIN stop_times USING(trip_I)"

        arg_6 = []
        if arg_2:
            arg_6.append(arg_4 + ".start_time_ut< {end_time_ut}".format(arg_2=arg_2))
            arg_6.append("dep_time_ut  <={end_time_ut}".format(arg_2=arg_2))
        if arg_1:
            arg_6.append(arg_4 + ".end_time_ut  > {start_time_ut}".format(arg_1=arg_1))
            arg_6.append("arr_time_ut  >={start_time_ut}".format(arg_1=arg_1))
        if arg_3 is not None:
            assert arg_3 in ALL_ROUTE_TYPES
            arg_6.append("routes.type={route_type}".format(arg_3=arg_3))
        if len(arg_6) > 0:
            arg_5 += " WHERE "
            for arg_7, arg_8 in enumerate(arg_6):
                if arg_7 is not 0:
                    arg_5 += " AND "
                arg_5 += arg_8
        # ordering is required for later stages
        arg_5 += " ORDER BY trip_I, day_start_ut+dep_time_ds;"
        arg_9 = pd.read_sql_query(arg_5, arg_0.conn)
        # 'filter' results so that only real "events" are taken into account
        arg_10 = numpy.nonzero(
            (arg_9['trip_I'][:-1].values == arg_9['trip_I'][1:].values) *
            (arg_9['seq'][:-1].values < arg_9['seq'][1:].values)
        )[0]
        arg_11 = arg_10 + 1
        # these should have same trip_ids
        assert (arg_9['trip_I'][arg_10].values == arg_9['trip_I'][arg_11].values).all()
        arg_12 = arg_9['trip_I'][arg_10]
        arg_13 = arg_9['stop_I'][arg_10]
        arg_14 = arg_9['stop_I'][arg_11]
        arg_15 = arg_9['shape_id'][arg_10]
        arg_16 = arg_9['dep_time_ut'][arg_10]
        arg_17 = arg_9['arr_time_ut'][arg_11]
        arg_18 = arg_9['route_type'][arg_10]
        arg_19 = arg_9['route_id'][arg_10]
        arg_20 = arg_9['route_I'][arg_10]
        arg_21 = arg_17.values - arg_16.values
        assert (arg_21 >= 0).all()
        arg_22 = arg_9['seq'][arg_10]
        arg_23 = arg_9['seq'][arg_11]
        arg_24 = zip(arg_13, arg_14, arg_16, arg_17,
                          arg_15, arg_18, arg_19, arg_12,
                          arg_21, arg_22, arg_23, arg_20)
        arg_25 = ["from_stop_I", "to_stop_I", "dep_time_ut", "arr_time_ut",
                   "shape_id", "route_type", "route_id", "trip_I",
                   "duration", "from_seq", "to_seq", "route_I"]
        arg_26 = pd.DataFrame.from_records(arg_24, arg_25=arg_25)
        return arg_26

Obtain a list of events that take place during a time interval.
        Each event needs to be only partially overlap the given time interval.
        Does not include walking events.

        Parameters
        ----------
        start_time_ut : int
            start of the time interval in unix time (seconds)
        end_time_ut: int
            end of the time interval in unix time (seconds)
        route_type: int
            consider only events for this route_type

        Returns
        -------
        events: pandas.DataFrame
            with the following columns and types
                dep_time_ut: int
                arr_time_ut: int
                from_stop_I: int
                to_stop_I: int
                trip_I : int
                shape_id : int
                route_type : int

        See also
        --------
        get_transit_events_in_time_span : an older version of the same thing

Obtain a list of events that take place during a time interval . Each event needs to be only partially overlap the given time interval . Does not include walking events .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . pc = Operators . ITEBV ( 256 , arg_2 != 0 , arg_1 , arg_0 . pc + arg_0 . instruction . size ) arg_0 . _set_check_jmpdest ( arg_2 != 0 )

def Func(arg_0, arg_1, arg_2):
        """Conditionally alter the program counter"""
        arg_0.pc = Operators.ITEBV(256, arg_2 != 0, arg_1, arg_0.pc + arg_0.instruction.size)
        #This set ups a check for JMPDEST in the next instruction if cond != 0
        arg_0._set_check_jmpdest(arg_2 != 0)


def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Creates container for segments of file with `path`
    """
    arg_4 = arg_0.copy()
    arg_4.input_ = None
    arg_4.headers = None
    arg_4.query = None
    arg_8 = arg_1.split('/', 1)[0] + '_segments'
    cli_put_container(arg_4, arg_8)
    arg_9 = arg_8 + '/' + arg_1.split('/', 1)[1]
    arg_9 = '%s/%s/%s/' % (arg_9, arg_2, arg_3)

    return arg_9

Creates container for segments of file with path


def Func(arg_0, arg_1):
        """
        This method filter only merged PR and fetch missing required
        attributes for pull requests. Using merged date is more correct
        than closed date.

        :param list(dict) pull_requests: Pre-filtered pull requests.
        :rtype: list(dict)
        :return:
        """

        if arg_0.options.verbose:
            print("Fetching merge date for pull requests...")
        arg_2 = arg_0.fetcher.fetch_closed_pull_requests()

        if not arg_1:
            return []
        arg_3 = copy.deepcopy(arg_1)
        for arg_4 in arg_3:
            arg_5 = None
            for arg_6 in arg_2:
                if arg_6['number'] == arg_4['number']:
                    arg_5 = arg_6
            if arg_5:
                arg_4['merged_at'] = arg_5['merged_at']
                arg_2.remove(arg_5)

        for arg_4 in arg_3:
            if not arg_4.get('merged_at'):
                arg_3.remove(arg_4)
        return arg_3

This method filter only merged PR and fetch missing required attributes for pull requests . Using merged date is more correct than closed date .


Property to display a useful excerpt representing the matches within the results

def Func ( arg_0 ) : if "content" not in arg_0 . _results_fields : return None arg_1 = [ arg_0 . _match_phrase ] if six . PY2 : arg_2 = [ phrase . decode ( 'utf-8' ) for phrase in shlex . split ( arg_0 . _match_phrase . encode ( 'utf-8' ) ) ] else : arg_2 = [ phrase for phrase in shlex . split ( arg_0 . _match_phrase ) ] if len ( arg_2 ) > 1 : arg_1 . extend ( arg_2 ) else : arg_1 = arg_2 arg_3 = SearchResultProcessor . find_matches ( SearchResultProcessor . strings_in_dictionary ( arg_0 . _results_fields [ "content" ] ) , arg_1 , DESIRED_EXCERPT_LENGTH ) arg_4 = ELLIPSIS . join ( arg_3 ) for arg_5 in arg_1 : arg_4 = SearchResultProcessor . decorate_matches ( arg_4 , arg_5 ) return arg_4

def Func(arg_0):
        """
        Property to display a useful Func representing the matches within the results
        """
        if "content" not in arg_0._results_fields:
            return None

        arg_1 = [arg_0._match_phrase]
        if six.PY2:
            arg_2 = [
                phrase.decode('utf-8')
                for phrase in shlex.split(arg_0._match_phrase.encode('utf-8'))
            ]
        else:
            arg_2 = [
                phrase
                for phrase in shlex.split(arg_0._match_phrase)
            ]
        if len(arg_2) > 1:
            arg_1.extend(arg_2)
        else:
            arg_1 = arg_2

        arg_3 = SearchResultProcessor.find_matches(
            SearchResultProcessor.strings_in_dictionary(arg_0._results_fields["content"]),
            arg_1,
            DESIRED_EXCERPT_LENGTH
        )
        arg_4 = ELLIPSIS.join(arg_3)

        for arg_5 in arg_1:
            arg_4 = SearchResultProcessor.decorate_matches(arg_4, arg_5)

        return arg_4


def Func ( arg_0 , arg_1 , arg_2 = None ) : assert_is_type ( arg_1 , FunctionType , GeneratorType , MethodType ) if isinstance ( arg_1 , GeneratorType ) : arg_1 = ( lambda g : lambda : next ( g ) ) ( arg_1 ) arg_0 . _next_poll_time = 0 arg_0 . _t0 = time . time ( ) arg_0 . _x0 = 0 arg_0 . _v0 = 0.01 arg_0 . _ve = 0.01 arg_8 = 0 arg_9 = None try : while True : arg_10 = time . time ( ) if arg_0 . _next_poll_time <= arg_10 : arg_11 = arg_1 ( ) assert_is_type ( arg_11 , ( numeric , numeric ) , numeric ) if not isinstance ( arg_11 , tuple ) : arg_11 = ( arg_11 , - 1 ) arg_10 = time . time ( ) arg_0 . _store_model_progress ( arg_11 , arg_10 ) arg_0 . _recalculate_model_parameters ( arg_10 ) arg_8 = min ( arg_0 . _compute_progress_at_time ( arg_10 ) [ 0 ] , 1 ) if arg_8 == 1 and arg_0 . _get_real_progress ( ) >= 1 : break arg_12 = arg_0 . _widget . render ( arg_8 ) assert_is_type ( arg_12 , RenderResult ) arg_13 = arg_12 . next_time arg_14 = arg_0 . _get_time_at_progress ( arg_12 . next_progress ) arg_15 = min ( arg_13 , arg_14 ) arg_0 . _draw ( arg_12 . rendered ) arg_16 = min ( arg_15 , arg_0 . _next_poll_time ) - arg_10 if arg_16 > 0 : time . sleep ( arg_16 ) if arg_2 is not None : arg_2 ( arg_8 ) except KeyboardInterrupt : arg_9 = "cancelled" except StopIteration as e : arg_9 = str ( e ) arg_12 = arg_0 . _widget . render ( arg_8 = arg_8 , arg_9 = arg_9 ) arg_0 . _draw ( arg_12 . rendered , final = True ) if arg_9 == "cancelled" : raise StopIteration ( arg_9 )

def Func(arg_0, arg_1, arg_2=None):
        """
        Start the progress bar, and return only when the progress reaches 100%.

        :param progress_fn: the executor function (or a generator). This function should take no arguments
            and return either a single number -- the current progress level, or a tuple (progress level, delay),
            where delay is the time interval for when the progress should be checked again. This function may at
            any point raise the ``StopIteration(message)`` exception, which will interrupt the progress bar,
            display the ``message`` in red font, and then re-raise the exception.
        :raises StopIteration: if the job is interrupted. The reason for interruption is provided in the exception's
            message. The message will say "cancelled" if the job was interrupted by the user by pressing Ctrl+C.
        """
        assert_is_type(arg_1, FunctionType, GeneratorType, MethodType)
        if isinstance(arg_1, GeneratorType):
            # Convert generator to a regular function
            arg_1 = (lambda g: lambda: next(g))(arg_1)

        # Initialize the execution context
        arg_0._next_poll_time = 0
        arg_0._t0 = time.time()
        arg_0._x0 = 0
        arg_0._v0 = 0.01  # corresponds to 100s completion time
        arg_0._ve = 0.01

        arg_8 = 0
        arg_9 = None  # Status message in case the job gets interrupted.
        try:
            while True:
                # We attempt to synchronize all helper functions, ensuring that each of them has the same idea
                # for what the current time moment is. Otherwise we could have some corner cases when one method
                # says that something must happen right now, while the other already sees that moment in the past.
                arg_10 = time.time()

                # Query the progress level, but only if it's time already
                if arg_0._next_poll_time <= arg_10:
                    arg_11 = arg_1()  # may raise StopIteration
                    assert_is_type(arg_11, (numeric, numeric), numeric)
                    if not isinstance(arg_11, tuple):
                        arg_11 = (arg_11, -1)
                    # Progress querying could have taken some time, so update the current time moment
                    arg_10 = time.time()
                    arg_0._store_model_progress(arg_11, arg_10)
                    arg_0._recalculate_model_parameters(arg_10)

                # Render the widget regardless of whether it's too early or not
                arg_8 = min(arg_0._compute_progress_at_time(arg_10)[0], 1)
                if arg_8 == 1 and arg_0._get_real_progress() >= 1:
                    # Do not exit until both the model and the actual progress reach 100% mark.
                    break
                arg_12 = arg_0._widget.render(arg_8)
                assert_is_type(arg_12, RenderResult)
                arg_13 = arg_12.next_time
                arg_14 = arg_0._get_time_at_progress(arg_12.next_progress)
                arg_15 = min(arg_13, arg_14)
                arg_0._draw(arg_12.rendered)

                # Wait until the next rendering/querying cycle
                arg_16 = min(arg_15, arg_0._next_poll_time) - arg_10
                if arg_16 > 0:
                    time.sleep(arg_16)
                    if arg_2 is not None:
                        arg_2(arg_8)
        except KeyboardInterrupt:
            # If the user presses Ctrl+C, we interrupt the progress bar.
            arg_9 = "cancelled"
        except StopIteration as e:
            # If the generator raises StopIteration before reaching 100%, then the progress display will
            # reamin incomplete.
            arg_9 = str(e)

        # Do one final rendering before we exit
        arg_12 = arg_0._widget.render(arg_8=arg_8, arg_9=arg_9)
        arg_0._draw(arg_12.rendered, final=True)

        if arg_9 == "cancelled":
            # Re-raise the exception, to inform the upstream caller that something unexpected happened.
            raise StopIteration(arg_9)

Start the progress bar and return only when the progress reaches 100% .


return dict([strip_prefix(i) for i in items if i[0].startswith(prefix)])

def Func ( arg_0 , arg_1 = 'hive_' ) : arg_2 = arg_0 . config . items ( ) arg_1 = arg_1 . upper ( ) def strip_prefix ( arg_3 ) : return ( arg_3 [ 0 ] . replace ( arg_1 , '' ) , arg_3 [ 1 ] ) return dict ( [ strip_prefix ( arg_4 ) for arg_4 in arg_2 if arg_4 [ 0 ] . startswith ( arg_1 ) ] )

def Func(arg_0, arg_1='hive_'):
    """Conveniently get the security configuration for the specified
    application without the annoying 'SECURITY_' prefix.

    :param app: The application to inspect
    """
    arg_2 = arg_0.config.items()
    arg_1 = arg_1.upper()

    def strip_prefix(arg_3):
        return (arg_3[0].replace(arg_1, ''), arg_3[1])

    return dict([strip_prefix(arg_4) for arg_4 in arg_2 if arg_4[0].startswith(arg_1)])

Conveniently get the security configuration for the specified application without the annoying SECURITY_ prefix .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
arg_1
.
split_contents
(
)
if
len
(
arg_2
)
>
1
:
raise
TemplateSyntaxError
(
"'%s' takes no arguments"
%
arg_2
[
0
]
)
return
UserVoiceNode
(
)

def Func(arg_0, arg_1):
    """
    UserVoice tracking template tag.

    Renders Javascript code to track page visits.  You must supply
    your UserVoice Widget Key in the ``USERVOICE_WIDGET_KEY``
    setting or the ``Func_widget_key`` template context variable.
    """
    arg_2 = arg_1.split_contents()
    if len(arg_2) > 1:
        raise TemplateSyntaxError("'%s' takes no arguments" % arg_2[0])
    return UserVoiceNode()

UserVoice tracking template tag.

    Renders Javascript code to track page visits.  You must supply
    your UserVoice Widget Key in the ``USERVOICE_WIDGET_KEY``
    setting or the ``uservoice_widget_key`` template context variable.


def
Func
(
arg_0
)
:
if
not
arg_0
:
return
if
hasattr
(
arg_0
[
0
]
,
'_fields'
)
:
arg_1
=
arg_0
[
0
]
.
_fields
else
:
arg_1
=
[
"col{}"
.
format
(
arg_4
)
for
arg_4
in
range
(
len
(
arg_0
[
0
]
)
)
]
arg_2
=
[
len
(
arg_11
)
for
arg_11
in
arg_1
]
for
arg_3
in
arg_0
:
for
arg_4
in
range
(
len
(
arg_0
[
0
]
)
)
:
arg_5
=
len
(
"{}"
.
format
(
arg_3
[
arg_4
]
)
)
if
arg_5
>
arg_2
[
arg_4
]
:
arg_2
[
arg_4
]
=
arg_5
arg_6
=
[
]
arg_7
=
[
]
for
arg_4
in
range
(
len
(
arg_0
[
0
]
)
)
:
if
isinstance
(
arg_0
[
0
]
[
arg_4
]
,
int
)
:
arg_6
.
append
(
"%%%dd"
%
arg_2
[
arg_4
]
)
else
:
arg_6
.
append
(
"%%-%ds"
%
arg_2
[
arg_4
]
)
arg_7
.
append
(
"%%-%ds"
%
arg_2
[
arg_4
]
)
arg_8
=
" | "
.
join
(
arg_6
)
arg_9
=
" | "
.
join
(
arg_7
)
arg_10
=
"-+-"
.
join
(
[
'-'
*
n
for
n
in
arg_2
]
)
arg_11
=
""
arg_11
+=
arg_10
+
'\n'
arg_11
+=
(
arg_9
%
tuple
(
arg_1
)
)
+
'\n'
arg_11
+=
arg_10
+
'\n'
def
f
(
arg_12
)
:
return
"{}"
.
format
(
arg_12
)
if
isinstance
(
arg_12
,
basestring
)
else
arg_12
for
arg_13
in
arg_0
:
arg_11
+=
arg_8
%
tuple
(
f
(
arg_12
)
for
arg_12
in
arg_13
)
+
'\n'
arg_11
+=
arg_10
+
'\n'
return
arg_11

def Func(arg_0):
    """Returns a pretty ascii table from tuples

    If namedtuple are used, the table will have headers
    """
    if not arg_0:
        return
    if hasattr(arg_0[0], '_fields'):  # if namedtuple
        arg_1 = arg_0[0]._fields
    else:
        arg_1 = ["col{}".format(arg_4) for arg_4 in range(len(arg_0[0]))]
    arg_2 = [len(arg_11) for arg_11 in arg_1]

    for arg_3 in arg_0:
        for arg_4 in range(len(arg_0[0])):
            arg_5 = len("{}".format(arg_3[arg_4]))
            if arg_5 > arg_2[arg_4]:
                arg_2[arg_4] = arg_5
    arg_6 = []
    arg_7 = []
    for arg_4 in range(len(arg_0[0])):
        if isinstance(arg_0[0][arg_4], int):
            arg_6.append("%%%dd" % arg_2[arg_4])
        else:
            arg_6.append("%%-%ds" % arg_2[arg_4])
        arg_7.append("%%-%ds" % arg_2[arg_4])
    arg_8 = " | ".join(arg_6)
    arg_9 = " | ".join(arg_7)
    arg_10 = "-+-".join(['-' * n for n in arg_2])
    arg_11 = ""
    arg_11 += arg_10 + '\n'
    arg_11 += (arg_9 % tuple(arg_1)) + '\n'
    arg_11 += arg_10 + '\n'

    def f(arg_12):
        return "{}".format(arg_12) if isinstance(arg_12, basestring) else arg_12

    for arg_13 in arg_0:
        arg_11 += arg_8 % tuple(f(arg_12) for arg_12 in arg_13) + '\n'
    arg_11 += arg_10 + '\n'
    return arg_11


(cpu, coprocessor, opcode1, dest, coprocessor_reg_n, coprocessor_reg_m, opcode2)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6):
        """
        Func moves to ARM register from coprocessor.

        :param Armv7Operand coprocessor: The name of the coprocessor; immediate
        :param Armv7Operand opcode1: coprocessor specific opcode; 3-bit immediate
        :param Armv7Operand dest: the destination operand: register
        :param Armv7Operand coprocessor_reg_n: the coprocessor register; immediate
        :param Armv7Operand coprocessor_reg_m: the coprocessor register; immediate
        :param Armv7Operand opcode2: coprocessor specific opcode; 3-bit immediate
        """
        assert arg_1.type == 'coprocessor'
        assert arg_2.type == 'immediate'
        assert arg_6.type == 'immediate'
        assert arg_3.type == 'register'
        arg_7 = arg_1.read()
        arg_8 = arg_2.read()
        arg_9 = arg_6.read()
        arg_10 = arg_4.read()
        arg_11 = arg_5.read()

        if 15 == arg_7:  # MMU
            if 0 == arg_8:
                if 13 == arg_10:
                    if 3 == arg_9:
                        arg_3.write(arg_0.regfile.read('P15_C13'))
                        return
        raise NotImplementedError("Func: unimplemented combination of coprocessor, opcode, and coprocessor register")

MRC moves to ARM register from coprocessor.

        :param Armv7Operand coprocessor: The name of the coprocessor; immediate
        :param Armv7Operand opcode1: coprocessor specific opcode; 3-bit immediate
        :param Armv7Operand dest: the destination operand: register
        :param Armv7Operand coprocessor_reg_n: the coprocessor register; immediate
        :param Armv7Operand coprocessor_reg_m: the coprocessor register; immediate
        :param Armv7Operand opcode2: coprocessor specific opcode; 3-bit immediate

MRC moves to ARM register from coprocessor .


(self, waitTime: float = OPERATION_WAIT_TIME)

def Func ( arg_0 , arg_1 : arg_2 = arg_3 ) -> bool : if arg_0 . IsTopLevel ( ) : arg_4 = arg_0 . NativeWindowHandle if IsIconic ( arg_4 ) : arg_5 = ShowWindow ( arg_4 , SW . Restore ) elif not IsWindowVisible ( arg_4 ) : arg_5 = ShowWindow ( arg_4 , SW . Show ) arg_5 = SetForegroundWindow ( arg_4 ) time . sleep ( arg_1 ) return arg_5 return False

def Func(arg_0, arg_1: arg_2 = arg_3) -> bool:
        """Set top level window active."""
        if arg_0.IsTopLevel():
            arg_4 = arg_0.NativeWindowHandle
            if IsIconic(arg_4):
                arg_5 = ShowWindow(arg_4, SW.Restore)
            elif not IsWindowVisible(arg_4):
                arg_5 = ShowWindow(arg_4, SW.Show)
            arg_5 = SetForegroundWindow(arg_4)  # may fail if foreground windows's process is not python
            time.sleep(arg_1)
            return arg_5
        return False


def Func ( ) : arg_0 , arg_1 = random_describer ( ) if arg_1 == 'prefix' : return ( arg_0 , random_species ( ) ) elif arg_1 == 'suffix' : return ( random_species ( ) , arg_0 )

def Func():
    """Return an ordered 2-tuple containing a species and a describer."""
    arg_0, arg_1 = random_describer()
    if arg_1 == 'prefix':
        return (arg_0, random_species())
    elif arg_1 == 'suffix':
        return (random_species(), arg_0)

Return an ordered 2 - tuple containing a species and a describer .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
LOGGER
.
info
(
"inside Func of %s"
,
arg_0
)
arg_3
=
[
(
i
,
arg_1
[
i
]
)
for
i
in
arg_1
if
i
.
split
(
"-"
,
2
)
[
0
]
==
arg_0
]
arg_4
=
time
.
time
(
)
while
1
:
arg_5
=
[
i
[
1
]
.
ready
(
)
for
i
in
arg_3
]
arg_6
=
datetime
.
timedelta
(
seconds
=
int
(
time
.
time
(
)
arg_4
)
)
arg_7
=
" {}    | {} | s3 |"
.
format
(
PRINTSTR
[
arg_0
]
,
arg_6
)
progressbar
(
len
(
arg_5
)
,
sum
(
arg_5
)
,
arg_7
,
arg_2
=
arg_2
)
time
.
sleep
(
0.1
)
if
len
(
arg_5
)
==
sum
(
arg_5
)
:
print
(
""
)
break
arg_8
=
[
]
arg_9
=
[
]
for
arg_10
in
arg_3
:
if
not
arg_10
[
1
]
.
successful
(
)
:
arg_8
.
append
(
arg_10
[
0
]
)
arg_9
.
append
(
arg_10
[
1
]
.
result
(
)
)
return
arg_0
,
arg_8
,
arg_9

def Func(arg_0, arg_1, arg_2):
    """
    Blocks and prints progress for just the func being requested from a list
    of submitted engine jobs. Returns whether any of the jobs failed.

    func = str
    results = dict of asyncs
    """

    ## TODO: try to insert a better way to break on KBD here.
    LOGGER.info("inside Func of %s", arg_0)

    ## get just the jobs from results that are relevant to this func
    arg_3 = [(i, arg_1[i]) for i in arg_1 if i.split("-", 2)[0] == arg_0]

    ## progress bar
    arg_4 = time.time()
    while 1:
        ## how many of this func have finished so far
        arg_5 = [i[1].ready() for i in arg_3]
        arg_6 = datetime.timedelta(seconds=int(time.time()-arg_4))
        arg_7 = " {}    | {} | s3 |".format(PRINTSTR[arg_0], arg_6)
        progressbar(len(arg_5), sum(arg_5), arg_7, arg_2=arg_2)
        time.sleep(0.1)
        if len(arg_5) == sum(arg_5):
            print("")
            break

    arg_8 = []
    arg_9 = []
    for arg_10 in arg_3:
        if not arg_10[1].successful():
            arg_8.append(arg_10[0])
            arg_9.append(arg_10[1].result())

    return arg_0, arg_8, arg_9

Blocks and prints progress for just the func being requested from a list of submitted engine jobs . Returns whether any of the jobs failed .


def Func ( arg_0 , arg_1 = False ) : return arg_0 . __find_incongruities ( op = operator . gt , arg_1 = arg_1 )

def Func(arg_0, arg_1=False):
        """
        Find overlaps in a striplog.

        Args:
            index (bool): If True, returns indices of intervals with
            gaps after them.

        Returns:
            Striplog: A striplog of all the overlaps as intervals.
        """
        return arg_0.__find_incongruities(op=operator.gt, arg_1=arg_1)


(self, text=None, width=60, fmtfunc=str)

def Func(arg_0, arg_1=None, arg_2=60, arg_3=arg_4):
        """ Format block by wrapping on spaces. """
        if arg_2 < 1:
            arg_2 = 1
        arg_5 = ''
        arg_1 = (arg_0.text if arg_1 is None else arg_1) or ''
        for arg_6 in arg_1.split():
            arg_7 = ' '.join((arg_5, arg_6)) if arg_5 else arg_6
            # Ignore escape codes.
            arg_8 = sum(len(s) for s in get_codes(arg_7))
            arg_9 = len(arg_7) - arg_8
            if arg_9 > arg_2:
                # This word would exceed the limit, start a new line with
                # it.
                yield arg_3(arg_5)
                arg_5 = arg_6
            else:
                arg_5 = arg_7
        # yield the last line.
        if arg_5:
            yield arg_3(arg_5)


\
        Register the worker with the boss

def
Func
(
arg_0
)
:
gevent
.
sleep
(
10
)
while
not
arg_0
.
registered
.
is_set
(
)
:
arg_0
.
respond
(
'!register {%s}'
%
platform
.
node
(
)
,
nick
=
arg_0
.
boss
)
gevent
.
sleep
(
30
)

def Func(arg_0):
        """\
        Register the worker with the boss
        """
        gevent.sleep(10) # wait for things to connect, etc

        while not arg_0.registered.is_set():
            arg_0.respond('!register {%s}' % platform.node(), nick=arg_0.boss)
            gevent.sleep(30)

\
        Register the worker with the boss


def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in arg_0 . _registered_bundles : arg_3 = arg_2 [ 'path' ] for arg_4 in arg_2 [ 'blueprints' ] : arg_5 = arg_4 [ 'path' ] for arg_6 in arg_4 [ 'routes' ] : arg_1 . append ( ( arg_6 [ 'endpoint' ] , arg_3 + arg_5 + arg_6 [ 'path' ] , arg_6 [ 'methods' ] ) ) return arg_1

def Func(arg_0):
        """Returns simple info about registered blueprints

        :return: Tuple containing endpoint, path and allowed methods for each route
        """

        arg_1 = []

        for arg_2 in arg_0._registered_bundles:
            arg_3 = arg_2['path']
            for arg_4 in arg_2['blueprints']:
                arg_5 = arg_4['path']
                for arg_6 in arg_4['routes']:
                    arg_1.append(
                        (
                            arg_6['endpoint'],
                            arg_3 + arg_5 + arg_6['path'],
                            arg_6['methods']
                        )
                    )

        return arg_1


def Func(arg_0, arg_1=None):
    """Converts events stream into lXML tree"""

    arg_2 = None
    arg_3 = None
    arg_4 = []
    for arg_5 in arg_0:

        if arg_5['type'] == ENTER:
            arg_6 = _obj2elt(arg_5, arg_1=arg_1)
            if arg_4:
                arg_4[-1].append(arg_6)
            elif arg_2 is not None:
                raise RuntimeError('Event stream tried to create second XML tree')
            else:
                arg_2 = arg_6
            arg_4.append(arg_6)
            arg_3 = None

        elif arg_5['type'] == EXIT:
            arg_3 = arg_4.pop()

        elif arg_5['type'] == COMMENT:
            arg_6 = et.Comment(arg_5['text'])
            arg_4[-1].append(arg_6)

        elif arg_5['type'] == PI:
            arg_6 = et.PI(arg_5['target'])
            if arg_5.get('text'):
                arg_6.text = arg_5['text']
            arg_4[-1].append(arg_6)

        elif arg_5['type'] == TEXT:
            arg_7 = arg_5['text']
            if arg_7:
                if arg_3 is None:
                    arg_4[-1].text = (arg_4[-1].text or '') + arg_7
                else:
                    arg_3.tail = (arg_3.tail or '') + arg_7
        else:
            assert False, arg_5

    if arg_2 is None:
        raise RuntimeError('Empty XML event stream')

    return arg_2


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_0 . _getAnomalyClassifier ( ) . getSelf ( ) . addLabel ( arg_1 , arg_2 , arg_3 )

def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Add labels from the anomaly classifier within this model.

    :param start: (int) index to start label
    :param end: (int) index to end label
    :param labelName: (string) name of label
    """
    arg_0._getAnomalyClassifier().getSelf().addLabel(arg_1, arg_2, arg_3)

Add labels from the anomaly classifier within this model .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_0
.
list_id
=
arg_1
if
'url'
not
in
arg_2
:
raise
KeyError
(
'The list webhook must have a url'
)
check_url
(
arg_2
[
'url'
]
)
arg_3
=
arg_0
.
_mc_client
.
_post
(
url
=
arg_0
.
_build_path
(
arg_1
,
'webhooks'
)
,
arg_2
=
arg_2
)
if
arg_3
is
not
:
arg_0
.
webhook_id
=
arg_3
[
'id'
]
else
:
arg_0
.
webhook_id
=
return
arg_3

def Func(arg_0, arg_1, arg_2):
        """
        Create a new webhook for a specific list.

        The documentation does not include any required request body
        parameters but the url parameter is being listed here as a required
        parameter in documentation and error-checking based on the description
        of the method

        :param list_id: The unique id for the list.
        :type list_id: :py:class:`str`
        :param data: The request body parameters
        :type data: :py:class:`dict`
        data = {
            "url": string*
        }
        """
        arg_0.list_id = arg_1
        if 'url' not in arg_2:
            raise KeyError('The list webhook must have a url')
        check_url(arg_2['url'])
        arg_3 = arg_0._mc_client._post(url=arg_0._build_path(arg_1, 'webhooks'), arg_2=arg_2)
        if arg_3 is not None:
            arg_0.webhook_id = arg_3['id']
        else:
            arg_0.webhook_id = None
        return arg_3

Create a new webhook for a specific list .


def
Func
(
arg_0
,
arg_1
=
False
,
arg_2
=
False
)
:
try
:
if
arg_2
:
arg_3
=
long
(
arg_0
,
0
)
else
:
arg_3
=
int
(
arg_0
,
0
)
except
ValueError
:
raise
ValueError
(
'Couldn\'t parse integer: %s'
%
arg_0
)
arg_4
=
_INTEGER_CHECKERS
[
2
*
int
(
arg_2
)
+
int
(
arg_1
)
]
arg_4
.
CheckValue
(
arg_3
)
return
arg_3

def Func(arg_0, arg_1=False, arg_2=False):
  """Parses an integer.

  Args:
    text: The text to parse.
    is_signed: True if a signed integer must be parsed.
    is_long: True if a long integer must be parsed.

  Returns:
    The integer value.

  Raises:
    ValueError: Thrown Iff the text is not a valid integer.
  """
  # Do the actual parsing. Exception handling is propagated to caller.
  try:
    # We force 32-bit values to int and 64-bit values to long to make
    # alternate implementations where the distinction is more significant
    # (e.g. the C++ implementation) simpler.
    if arg_2:
      arg_3 = long(arg_0, 0)
    else:
      arg_3 = int(arg_0, 0)
  except ValueError:
    raise ValueError('Couldn\'t parse integer: %s' % arg_0)

  # Check if the integer is sane. Exceptions handled by callers.
  arg_4 = _INTEGER_CHECKERS[2 * int(arg_2) + int(arg_1)]
  arg_4.CheckValue(arg_3)
  return arg_3


def Func ( arg_0 , arg_1 , arg_2 ) : arg_0 . assert_package_exists ( ) if validations . validate_lics_from_file ( arg_2 ) : arg_1 . package . licenses_from_files . append ( arg_2 ) return True else : raise SPDXValueError ( 'Package::LicensesFromFile' )

def Func(arg_0, arg_1, arg_2):
        """Adds a license from a file to the package.
        Raises SPDXValueError if data malformed.
        Raises OrderError if no package previously defined.
        """
        arg_0.assert_package_exists()
        if validations.validate_lics_from_file(arg_2):
            arg_1.package.licenses_from_files.append(arg_2)
            return True
        else:
            raise SPDXValueError('Package::LicensesFromFile')

Adds a license from a file to the package . Raises SPDXValueError if data malformed . Raises OrderError if no package previously defined .


def Func(arg_0):
    """Parses unique key-value parameters from urlencoded content.

    Args:
        content: string, URL-encoded key-value pairs.

    Returns:
        dict, The key-value pairs from ``content``.

    Raises:
        ValueError: if one of the keys is repeated.
    """
    arg_1 = urllib.parse.parse_qs(arg_0)
    arg_2 = {}
    for arg_3, arg_4 in six.iteritems(arg_1):
        if len(arg_4) != 1:
            arg_5 = ('URL-encoded content contains a repeated value:'
                   '%s -> %s' % (arg_3, ', '.join(arg_4)))
            raise ValueError(arg_5)
        arg_2[arg_3] = arg_4[0]
    return arg_2

Parses unique key - value parameters from urlencoded content .


return os.path.join(*[
            self.path,
            str(tile.zoom),
            str(tile.row),
            str(tile.col) + self.file_extension
        ])

def Func ( arg_0 , arg_1 ) : return os . path . join ( * [ arg_0 . path , str ( arg_1 . zoom ) , str ( arg_1 . row ) , str ( arg_1 . col ) + arg_0 . file_extension ] )

def Func(arg_0, arg_1):
        """
        Determine target file path.

        Parameters
        ----------
        tile : ``BufferedTile``
            must be member of output ``TilePyramid``

        Returns
        -------
        path : string
        """
        return os.path.join(*[
            arg_0.path,
            str(arg_1.zoom),
            str(arg_1.row),
            str(arg_1.col) + arg_0.file_extension
        ])


def Func ( arg_0 , arg_1 ) : return SSHKey . get_object ( api_token = arg_0 . token , arg_1 = arg_1 )

def Func(arg_0, arg_1):
        """
            Return a SSHKey object by its ID.
        """
        return SSHKey.get_object(api_token=arg_0.token, arg_1=arg_1)