def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 , arg_4 = arg_0 . get_coordinate_pointers ( arg_2 ) core . rt . Index_DeleteData ( arg_0 . handle , arg_1 , arg_3 , arg_4 , arg_0 . properties . dimension )

def Func(arg_0, arg_1, arg_2):
        """Deletes items from the index with the given ``'id'`` within the
        specified coordinates.

        :param id: long integer
            A long integer that is the identifier for this index entry.  IDs
            need not be unique to be inserted into the index, and it is up
            to the user to ensure they are unique if this is a requirement.

        :param coordinates: sequence or array
            Dimension * 2 coordinate pairs, representing the min
            and max coordinates in each dimension of the item to be
            Funcd from the index. Their ordering will depend on the
            index's :attr:`interleaved` data member.
            These are not the coordinates of a space containing the
            item, but those of the item itself. Together with the
            id parameter, they determine which item will be Funcd.
            This may be an object that satisfies the numpy array protocol.

        Example::

            >>> from rtree import index
            >>> idx = index.Index()
            >>> idx.Func(4321,
            ...            (34.3776829412, 26.7375853734, 49.3776829412,
            ...             41.7375853734))

        """
        arg_3, arg_4 = arg_0.get_coordinate_pointers(arg_2)
        core.rt.Index_DeleteData(
            arg_0.handle, arg_1, arg_3, arg_4, arg_0.properties.dimension)

Deletes items from the index with the given ``'id'`` within the
        specified coordinates.

        :param id: long integer
            A long integer that is the identifier for this index entry.  IDs
            need not be unique to be inserted into the index, and it is up
            to the user to ensure they are unique if this is a requirement.

        :param coordinates: sequence or array
            Dimension * 2 coordinate pairs, representing the min
            and max coordinates in each dimension of the item to be
            deleted from the index. Their ordering will depend on the
            index's :attr:`interleaved` data member.
            These are not the coordinates of a space containing the
            item, but those of the item itself. Together with the
            id parameter, they determine which item will be deleted.
            This may be an object that satisfies the numpy array protocol.

        Example::

            >>> from rtree import index
            >>> idx = index.Index()
            >>> idx.delete(4321,
            ...            (34.3776829412, 26.7375853734, 49.3776829412,
            ...             41.7375853734))

Deletes items from the index with the given id within the specified coordinates .


Return partial of original function call

return state_partial(self.data["func"], *ba.args[1:], **ba.kwargs)

def Func ( arg_0 ) : arg_1 = arg_0 . data [ "bound_args" ] return state_Func ( arg_0 . data [ "func" ] , * arg_1 . args [ 1 : ] , ** arg_1 . kwargs )

def Func(arg_0):
        """Return Func of original function call"""
        arg_1 = arg_0.data["bound_args"]
        return state_Func(arg_0.data["func"], *arg_1.args[1:], **arg_1.kwargs)


def Func(arg_0, arg_1=None, arg_2=None):
        """
        Read CSV text and generate a Legend.

        Args:
            string (str): The CSV string.

        In the first row, list the properties. Precede the properties of the
        component with 'comp ' or 'component '. For example:

        colour,  width, comp lithology, comp colour
        #FFFFFF, 0, ,
        #F7E9A6, 3, Sandstone, Grey
        #FF99CC, 2, Anhydrite,
        ... etc

        Note:
            To edit a legend, the easiest thing to do is probably this:

            - `legend.to_csv()`
            - Edit the legend, call it `new_legend`.
            - `legend = Legend.Func(text=new_legend)`
        """
        if (arg_1 is None) and (arg_2 is None):
            raise LegendError("You must provide a filename or CSV text.")

        if (arg_1 is not None):
            with open(arg_1, 'r') as arg_3:
                arg_2 = arg_3.read()

        try:
            arg_3 = StringIO(arg_2)  # Python 3
        except TypeError:
            arg_3 = StringIO(unicode(arg_2))  # Python 2

        arg_4 = csv.DictReader(arg_3, skipinitialspace=True)
        arg_5, arg_6 = [], []
        arg_7 = 'component'
        for arg_8 in arg_4:
            arg_9, arg_10 = {}, {}
            for (arg_11, arg_12) in arg_8.items():
                if (arg_11 in [None, '']):
                    continue
                if (arg_12 in [None, '']):
                    if arg_11.lower() not in ['color', 'colour']:
                        continue
                if arg_11[:4].lower() == 'comp':
                    arg_13 = ' '.join(arg_11.split()[1:])
                    if arg_12.lower() == 'true':
                        arg_10[arg_13] = True
                    elif arg_12.lower() == 'false':
                        arg_10[arg_13] = False
                    else:
                        try:
                            arg_10[arg_13] = float(arg_12)
                        except ValueError:
                            arg_10[arg_13] = arg_12.lower()

                elif arg_11[:5].lower() == 'curve':
                    arg_13 = ' '.join(arg_11.split()[1:])
                    arg_10[arg_13] = arg_12.lower()
                    arg_7 = 'curve'
                else:
                    try:
                        arg_9[arg_11] = float(arg_12)
                    except ValueError:
                        arg_9[arg_11] = arg_12.lower()

            arg_14 = Component(arg_10)
            arg_9[arg_7] = arg_14

            # Check for duplicates and warn.
            if arg_14 in arg_6:
                with warnings.catch_warnings():
                    warnings.simplefilter("always")
                    arg_15 = "This legend contains duplicate components."
                    warnings.warn(arg_15)
            arg_6.append(arg_14)

            # Append to the master list and continue.
            arg_5.append(Decor(arg_9))

        return arg_0(arg_5)

Read CSV text and generate a Legend.

        Args:
            string (str): The CSV string.

        In the first row, list the properties. Precede the properties of the
        component with 'comp ' or 'component '. For example:

        colour,  width, comp lithology, comp colour
        #FFFFFF, 0, ,
        #F7E9A6, 3, Sandstone, Grey
        #FF99CC, 2, Anhydrite,
        ... etc

        Note:
            To edit a legend, the easiest thing to do is probably this:

            - `legend.to_csv()`
            - Edit the legend, call it `new_legend`.
            - `legend = Legend.from_csv(text=new_legend)`


(self, folder_id='me/skydrive', limit=None, offset=None)

return self(self._api_url_join(folder_id, 'files'), dict(limit=limit, offset=offset))

def Func ( arg_0 , arg_1 = 'me/skydrive' , arg_2 = None , arg_3 = None ) : return arg_0 ( arg_0 . _api_url_join ( arg_1 , 'files' ) , dict ( arg_2 = arg_2 , arg_3 = arg_3 ) )

def Func(arg_0, arg_1='me/skydrive', arg_2=None, arg_3=None):
		'Get OneDrive object representing list of objects in a folder.'
		return arg_0(arg_0._api_url_join(arg_1, 'files'), dict(arg_2=arg_2, arg_3=arg_3))

Get OneDrive object representing list of objects in a folder .


def
Func
(
arg_0
)
:
while
1
:
try
:
arg_1
=
arg_0
.
__peek
(
)
except
DXParserNoTokens
:
if
arg_0
.
currentobject
and
arg_0
.
currentobject
not
in
arg_0
.
objects
:
arg_0
.
objects
.
append
(
arg_0
.
currentobject
)
return
if
arg_1
.
iscode
(
'COMMENT'
)
:
arg_0
.
set_parser
(
'comment'
)
elif
arg_1
.
iscode
(
'WORD'
)
and
arg_1
.
equals
(
'object'
)
:
arg_0
.
set_parser
(
'object'
)
elif
arg_0
.
__parser
is
arg_0
.
Func
:
raise
DXParseError
(
'Unknown level-1 construct at '
+
str
(
arg_1
)
)
arg_0
.
apply_parser
(
)

def Func(arg_0):
        """Level-0 parser and main loop.

        Look for a token that matches a level-1 parser and hand over control."""
        while 1:                            # main loop
            try:
                arg_1 = arg_0.__peek()         # only peek, apply_parser() will consume
            except DXParserNoTokens:
                # save previous DXInitObject
                # (kludge in here as the last level-2 parser usually does not return
                # via the object parser)
                if arg_0.currentobject and arg_0.currentobject not in arg_0.objects:
                    arg_0.objects.append(arg_0.currentobject)
                return                      # stop parsing and finish
            # decision branches for all level-1 parsers:
            # (the only way to get out of the lower level parsers!)
            if arg_1.iscode('COMMENT'):
                arg_0.set_parser('comment')  # switch the state
            elif arg_1.iscode('WORD') and arg_1.equals('object'):
                arg_0.set_parser('object')   # switch the state
            elif arg_0.__parser is arg_0.Func:
                # Either a level-2 parser screwed up or some level-1
                # construct is not implemented.  (Note: this elif can
                # be only reached at the beginning or after comments;
                # later we never formally switch back to Func
                # (would create inifinite loop)
                raise DXParseError('Unknown level-1 construct at '+str(arg_1))

            arg_0.apply_parser()


def Func ( arg_0 ) : if ( "file_to_test" in PyFunceble . INTERN and PyFunceble . INTERN [ "file_to_test" ] and PyFunceble . CONFIGURATION [ "unified" ] ) : arg_1 = ( arg_0 . output_parent_dir + PyFunceble . OUTPUTS [ "default_files" ] [ "results" ] ) if PyFunceble . CONFIGURATION [ "less" ] : if PyFunceble . HTTP_CODE [ "active" ] : arg_2 = [ arg_0 . tested , arg_0 . domain_status , PyFunceble . INTERN [ "http_code" ] , ] else : arg_2 = [ arg_0 . tested , arg_0 . domain_status , arg_0 . source ] Prints ( arg_2 , "Less" , arg_1 , True ) . data ( ) else : arg_2 = [ arg_0 . tested , arg_0 . domain_status , arg_0 . expiration_date , arg_0 . source , PyFunceble . INTERN [ "http_code" ] , PyFunceble . CURRENT_TIME , ] Prints ( arg_2 , "Generic_File" , arg_1 , True ) . data ( )

def Func(arg_0):
        """
        Generate unified file. Understand by that that we use an unified table
        instead of a separate table for each status which could result into a
        misunderstanding.
        """

        if (
            "file_to_test" in PyFunceble.INTERN
            and PyFunceble.INTERN["file_to_test"]
            and PyFunceble.CONFIGURATION["unified"]
        ):
            # * We are not testing as an imported module.
            # and
            # * The unified file generation is activated.

            # We construct the path of the unified file.
            arg_1 = (
                arg_0.output_parent_dir + PyFunceble.OUTPUTS["default_files"]["results"]
            )

            if PyFunceble.CONFIGURATION["less"]:
                # We have to print less information.

                if PyFunceble.HTTP_CODE["active"]:
                    # The http status code request is activated.

                    # We construct what we have to print.
                    arg_2 = [
                        arg_0.tested,
                        arg_0.domain_status,
                        PyFunceble.INTERN["http_code"],
                    ]
                else:
                    # The http status code request is not activated.

                    # We construct what we have to print.
                    arg_2 = [arg_0.tested, arg_0.domain_status, arg_0.source]

                # And we print the informations on file.
                Prints(arg_2, "Less", arg_1, True).data()
            else:
                # The unified file generation is not activated.

                # We construct what we have to print.
                arg_2 = [
                    arg_0.tested,
                    arg_0.domain_status,
                    arg_0.expiration_date,
                    arg_0.source,
                    PyFunceble.INTERN["http_code"],
                    PyFunceble.CURRENT_TIME,
                ]

                # And we print the information on file.
                Prints(arg_2, "Generic_File", arg_1, True).data()

Generate unified file . Understand by that that we use an unified table instead of a separate table for each status which could result into a misunderstanding .


The master function that is called that draws everything.

def Func ( arg_0 ) : arg_0 . ax . set_xlim ( - arg_0 . plot_radius ( ) , arg_0 . plot_radius ( ) ) arg_0 . ax . set_ylim ( - arg_0 . plot_radius ( ) , arg_0 . plot_radius ( ) ) arg_0 . add_axes_and_nodes ( ) arg_0 . add_edges ( ) arg_0 . ax . axis ( 'off' )

def Func(arg_0):
        """
        The master function that is called that Funcs everything.
        """
        arg_0.ax.set_xlim(-arg_0.plot_radius(), arg_0.plot_radius())
        arg_0.ax.set_ylim(-arg_0.plot_radius(), arg_0.plot_radius())

        arg_0.add_axes_and_nodes()
        arg_0.add_edges()

        arg_0.ax.axis('off')

The master function that is called that draws everything .


def Func ( arg_0 , arg_1 = arg_2 . LEN ) : return super ( Seed , arg_0 ) . Func ( arg_1 )

def Func(arg_0, arg_1=arg_2.LEN):
        """
        Generates a Func seed using a CSPRNG.

        :param length:
            Length of seed, in trytes.

            For maximum security, this should always be set to 81, but
            you can change it if you're 110% sure you know what you're
            doing.

            See https://iota.stackexchange.com/q/249 for more info.
        """
        return super(Seed, arg_0).Func(arg_1)

Generates a random seed using a CSPRNG.

        :param length:
            Length of seed, in trytes.

            For maximum security, this should always be set to 81, but
            you can change it if you're 110% sure you know what you're
            doing.

            See https://iota.stackexchange.com/q/249 for more info.

Generates a random seed using a CSPRNG .


def
Func
(
arg_0
)
:
pexdoc
.
exh
.
addex
(
TypeError
,
"Cannot convert complex to integer"
,
arg_0
.
_dep_vector
.
dtype
.
name
.
startswith
(
"complex"
)
,
)
arg_1
=
copy
.
copy
(
arg_0
)
arg_1
.
_dep_vector
=
arg_1
.
_dep_vector
.
astype
(
np
.
int
)
return
arg_1

def Func(arg_0):
    r"""
    Convert a waveform's dependent variable vector to integer.

    :param wave: Waveform
    :type  wave: :py:class:`peng.eng.Waveform`

    :rtype: :py:class:`peng.eng.Waveform`

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

    :raises:
     * RuntimeError (Argument \`wave\` is not valid)

     * TypeError (Cannot convert complex to integer)

    .. [[[end]]]
    """
    pexdoc.exh.addex(
        TypeError,
        "Cannot convert complex to integer",
        arg_0._dep_vector.dtype.name.startswith("complex"),
    )
    arg_1 = copy.copy(arg_0)
    arg_1._dep_vector = arg_1._dep_vector.astype(np.int)
    return arg_1

r"""
    Convert a waveform's dependent variable vector to integer.

    :param wave: Waveform
    :type  wave: :py:class:`peng.eng.Waveform`

    :rtype: :py:class:`peng.eng.Waveform`

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

    :raises:
     * RuntimeError (Argument \`wave\` is not valid)

     * TypeError (Cannot convert complex to integer)

    .. [[[end]]]

r Convert a waveform s dependent variable vector to integer .


(etype, value, tb, limit=None, file=None)

def Func(arg_0, arg_1, arg_2, arg_3=None, arg_4=None):
    """Print exception up to 'limit' stack trace entries from 'tb' to 'file'.

    This differs from print_tb() in the following ways: (1) if
    traceback is not None, it prints a header "Traceback (most recent
    call last):"; (2) it prints the exception type and value after the
    stack trace; (3) if type is SyntaxError and value has the
    appropriate format, it prints the line where the syntax error
    occurred with a caret on the next line indicating the approximate
    position of the error.
    """
    if arg_4 is None:
        # TODO: Use sys.stderr when that's implemented.
        arg_4 = open('/dev/stderr', 'w')
        #file = sys.stderr
    if arg_2:
        _print(arg_4, 'Traceback (most recent call last):')
        print_tb(arg_2, arg_3, arg_4)
    arg_5 = format_exception_only(arg_0, arg_1)
    for arg_6 in arg_5:
        _print(arg_4, arg_6, '')

Print exception up to limit stack trace entries from tb to file .


def Func(arg_0, arg_1):
        """Parse text blocks from a file."""
        if isinstance(arg_1, basestring):
            arg_1 = open(arg_1)
        arg_2 = 0
        arg_3 = None
        arg_4 = arg_0.untagged
        for arg_5 in arg_1:
            arg_2 += 1
            arg_5 = arg_5.rstrip('\n')
            if arg_0.tabsize > 0:
                arg_5 = arg_5.replace('\t', ' ' * arg_0.tabsize)
            if arg_0.decommenter:
                arg_5 = arg_0.decommenter.decomment(arg_5)
                if arg_5 is None:
                    continue
            arg_6 = arg_5.split(':', 1)[0].strip()
            # Still in the same block?
            if arg_6 not in arg_0.names:
                if arg_4 is None:
                    if arg_5 and not arg_5.isspace():
                        raise ParseError(arg_1.name, arg_5, "garbage before first block: %r" % arg_5)
                    continue
                arg_4.addline(arg_5)
                continue
            # Open a new block.
            arg_7 = arg_0.names[arg_6]
            arg_3 = arg_5.split(':',1)[1].strip()
            if arg_7 in arg_0.labelled_classes:
                if not arg_3:
                    raise ParseError(arg_1.name, arg_5, "missing label for %r block" % arg_7)
                arg_4 = arg_0.blocks[arg_7].setdefault(arg_3, arg_0.labelled_classes[arg_7]())
            else:
                if arg_3:
                    arg_8 = "label %r present for unlabelled block %r" % (arg_3, arg_7)
                    raise ParseError(arg_1.name, arg_2, arg_8)
                arg_4 = arg_0.blocks[arg_7]
            arg_4.startblock()


return render_template(
		template, context['request'], {'list': list, 'publications': publications})

def Func ( arg_0 , arg_1 , arg_2 = 'publications/publications.html' ) : arg_1 = List . objects . filter ( list__iexact = arg_1 ) if not arg_1 : return '' arg_1 = arg_1 [ 0 ] arg_3 = arg_1 . publication_set . all ( ) arg_3 = arg_3 . order_by ( '-year' , '-month' , '-id' ) if not arg_3 : return '' populate ( arg_3 ) return render_template ( arg_2 , arg_0 [ 'request' ] , { 'list' : arg_1 , 'publications' : arg_3 } )

def Func(arg_0, arg_1, arg_2='publications/publications.html'):
	"""
	Get a publication list.
	"""

	arg_1 = List.objects.filter(list__iexact=arg_1)

	if not arg_1:
		return ''

	arg_1 = arg_1[0]
	arg_3 = arg_1.publication_set.all()
	arg_3 = arg_3.order_by('-year', '-month', '-id')

	if not arg_3:
		return ''

	# load custom links and files
	populate(arg_3)

	return render_template(
		arg_2, arg_0['request'], {'list': arg_1, 'publications': arg_3})


def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . modelobjcache : return arg_0 . modelobjcache [ arg_1 ] return arg_0 . loadModel ( arg_1 )

def Func(arg_0,arg_1):
        """
        Gets the model object by the given name.

        If it was loaded previously, a cached version will be returned.
        If it was not loaded, it will be loaded and inserted into the cache.
        """
        if arg_1 in arg_0.modelobjcache:
            return arg_0.modelobjcache[arg_1]
        return arg_0.loadModel(arg_1)

Gets the model object by the given name . If it was loaded previously a cached version will be returned . If it was not loaded it will be loaded and inserted into the cache .


def Func ( arg_0 ) : if arg_0 . relay : arg_0 . relay . terminate ( ) if arg_0 . responder : arg_0 . responder . terminate ( )

def Func(arg_0):
        """
            Terminate the processes.
        """
        if arg_0.relay:
            arg_0.relay.terminate()
        if arg_0.responder:
            arg_0.responder.terminate()


def Func(arg_0, arg_1, arg_2):
        """
        Pyglet specific callback for window resize events.
        """
        arg_0.width, arg_0.height = arg_1, arg_2
        arg_0.buffer_width, arg_0.buffer_height = arg_1, arg_2
        arg_0.resize(arg_1, arg_2)

Pyglet specific callback for window resize events .


(self, time_marginal=False, clock_rate=None, **kwargs)

def Func(arg_0, arg_1=False, arg_2=None, **arg_3):
        '''
        Use the date constraints to calculate the most likely positions of
        unconstrained nodes.

        Parameters
        ----------

         time_marginal : bool
            If true, use marginal reconstruction for node positions

         **kwargs
            Key word arguments to initialize dates constraints

        '''
        arg_0.logger("ClockTree: Maximum likelihood tree optimization with temporal constraints",1)

        arg_0.init_date_constraints(arg_2=arg_2, **arg_3)

        if arg_1:
            arg_0._ml_t_marginal(assign_dates = arg_1=="assign")
        else:
            arg_0._ml_t_joint()

        arg_0.convert_dates()

Use the date constraints to calculate the most likely positions of unconstrained nodes .


def Func ( arg_0 , arg_1 = None ) : arg_2 , arg_3 = arg_0 . read_next_data_block ( ) arg_3 = arg_3 . view ( 'float32' ) plt . figure ( "Histogram" ) plt . hist ( arg_3 . flatten ( ) , 65 , facecolor = '#cc0000' ) if arg_1 : plt . savefig ( arg_1 ) plt . show ( )

def Func(arg_0, arg_1=None):
        """ Plot a histogram of data values """
        arg_2, arg_3 = arg_0.read_next_data_block()
        arg_3 = arg_3.view('float32')

        plt.figure("Histogram")
        plt.hist(arg_3.flatten(), 65, facecolor='#cc0000')
        if arg_1:
            plt.savefig(arg_1)
        plt.show()


return _MinidomXmlToObject.convert_response_to_feeds(
            response,
            _ServiceBusManagementXmlSerializer.xml_to_namespace)

def Func(arg_0):
        '''
        List the service bus namespaces defined on the account.
        '''
        arg_1 = arg_0._perform_get(
            arg_0._get_path('services/serviceBus/Namespaces/', None),
            None)

        return _MinidomXmlToObject.convert_response_to_feeds(
            arg_1,
            _ServiceBusManagementXmlSerializer.xml_to_namespace)

List the service bus namespaces defined on the account .


(self, app_label, schema_editor, from_state, to_state)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """Use schema_editor to apply any reverse changes."""
        arg_0.truncate(arg_1, arg_2, arg_0.truncate_backwards)

Use schema_editor to apply any reverse changes .


return (
            len(src) / len(tar) if len(src) < len(tar) else len(tar) / len(src)
        )

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 == arg_2 : return 1.0 if not arg_1 or not arg_2 : return 0.0 return ( len ( arg_1 ) / len ( arg_2 ) if len ( arg_1 ) < len ( arg_2 ) else len ( arg_2 ) / len ( arg_1 ) )

def Func(arg_0, arg_1, arg_2):
        """Return the length Funcilarity of two strings.

        Length Funcilarity is the ratio of the length of the shorter string to
        the longer.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison

        Returns
        -------
        float
            Length Funcilarity

        Examples
        --------
        >>> cmp = Length()
        >>> cmp.Func('cat', 'hat')
        1.0
        >>> cmp.Func('Niall', 'Neil')
        0.8
        >>> cmp.Func('aluminum', 'Catalan')
        0.875
        >>> cmp.Func('ATCG', 'TAGC')
        1.0

        """
        if arg_1 == arg_2:
            return 1.0
        if not arg_1 or not arg_2:
            return 0.0
        return (
            len(arg_1) / len(arg_2) if len(arg_1) < len(arg_2) else len(arg_2) / len(arg_1)
        )

Return the length similarity of two strings.

        Length similarity is the ratio of the length of the shorter string to
        the longer.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison

        Returns
        -------
        float
            Length similarity

        Examples
        --------
        >>> cmp = Length()
        >>> cmp.sim('cat', 'hat')
        1.0
        >>> cmp.sim('Niall', 'Neil')
        0.8
        >>> cmp.sim('aluminum', 'Catalan')
        0.875
        >>> cmp.sim('ATCG', 'TAGC')
        1.0

Return the length similarity of two strings .


def Func(arg_0, arg_1):
    '''Converts HTML and a sequence of char offsets to xpath offsets.

    Returns a generator of :class:`streamcorpus.XpathRange` objects
    in correspondences with the sequence of ``char_offsets`` given.
    Namely, each ``XpathRange`` should address precisely the same text
    as that ``char_offsets`` (sans the HTML).

    Depending on how ``char_offsets`` was tokenized, it's possible that
    some tokens cannot have their xpaths generated reliably. In this
    case, a ``None`` value is yielded instead of a ``XpathRange``.

    ``char_offsets`` must be a sorted and non-overlapping sequence of
    character ranges. They do not have to be contiguous.
    '''
    arg_0 = uni(arg_0)
    arg_2 = XpathTextCollector()
    arg_3 = 0
    arg_4 = True
    for arg_5, arg_6 in arg_1:
        if arg_5 == arg_6:
            # Zero length tokens shall have no quarter!
            # Note that this is a special case. If we let zero-length tokens
            # be handled normally, then it will be recorded as if the parser
            # did not make any progress. But of course, there is no progress
            # to be had!
            yield None
            continue
        # If we didn't make any progress on the previous token, then we'll
        # need to try and make progress before we can start tracking offsets
        # again. Otherwise the parser will report incorrect offset info.
        #
        # (The parser can fail to make progress when tokens are split at
        # weird boundaries, e.g., `&amp` followed by `;`. The parser won't
        # make progress after `&amp` but will once `;` is given.)
        #
        # Here, we feed the parser one character at a time between where the
        # last token ended and where the next token will start. In most cases,
        # this will be enough to nudge the parser along. Once done, we can pick
        # up where we left off and start handing out offsets again.
        #
        # If this still doesn't let us make progress, then we'll have to skip
        # this token too.
        if not arg_4:
            for arg_7 in xrange(arg_3, arg_5):
                arg_2.feed(arg_0[arg_7])
                arg_3 += 1
                if arg_2.made_progress:
                    break
            if not arg_2.made_progress:
                yield None
                continue
        # Hand the parser everything from the end of the last token to the
        # start of this one. Then ask for the Xpath, which should be at the
        # start of `char_offsets`.
        if arg_3 < arg_5:
            arg_2.feed(arg_0[arg_3:arg_5])
            if not arg_2.made_progress:
                arg_2.feed(arg_0[arg_5:arg_6])
                arg_4 = arg_2.made_progress
                arg_3 = arg_6
                yield None
                continue
        arg_8 = arg_2.xpath_offset()
        # print('START', xstart)
        # Hand it the actual token and ask for the ending offset.
        arg_2.feed(arg_0[arg_5:arg_6])
        arg_9 = arg_2.xpath_offset()
        # print('END', xend)
        arg_3 = arg_6

        # If we couldn't make progress then the xpaths generated are probably
        # incorrect. (If the parser doesn't make progress, then we can't rely
        # on the callbacks to have been called, which means we may not have
        # captured all state correctly.)
        #
        # Therefore, we simply give up and claim this token is not addressable.
        if not arg_2.made_progress:
            arg_4 = False
            yield None
        else:
            arg_4 = True
            yield XpathRange(arg_8[0], arg_8[1], arg_9[0], arg_9[1])
    arg_2.feed(arg_0[arg_3:])
    arg_2.close()

Converts HTML and a sequence of char offsets to xpath offsets .


def Func ( ) : try : return reverse ( home_namespace ) except Exception : arg_0 = home_namespace try : arg_1 = URLValidator ( ) if '://' not in arg_0 : arg_0 = 'http://' + arg_0 arg_1 ( arg_0 ) return ( arg_0 ) except ValidationError : return None

def Func():
    """Get project's home URL based on settings.PROJECT_HOME_NAMESPACE.

    Returns None if PROJECT_HOME_NAMESPACE is not defined in settings.
    """
    try:
        return reverse(home_namespace)
    except Exception:
        arg_0 = home_namespace
        try:
            arg_1 = URLValidator()
            if '://' not in arg_0:
                arg_0 = 'http://' + arg_0
            arg_1(arg_0)
            return(arg_0)
        except ValidationError:
            return None

Get project s home URL based on settings . PROJECT_HOME_NAMESPACE .


def Func ( arg_0 ) : if len ( arg_0 ) <= 16 : arg_1 = unsigned_hex_to_signed_int ( arg_0 ) return struct . pack ( '>q' , arg_1 ) else : arg_2 = unsigned_hex_to_signed_int ( arg_0 [ : - 16 ] ) arg_3 = struct . pack ( '>q' , arg_2 ) arg_4 = unsigned_hex_to_signed_int ( arg_0 [ - 16 : ] ) arg_5 = struct . pack ( '>q' , arg_4 ) return arg_3 + arg_5

def Func(arg_0):
    """Encodes to hexadecimal ids to big-endian binary.

    :param hex_id: hexadecimal id to encode.
    :type hex_id: str
    :return: binary representation.
    :type: bytes
    """
    if len(arg_0) <= 16:
        arg_1 = unsigned_hex_to_signed_int(arg_0)
        return struct.pack('>q', arg_1)
    else:
        # There's no 16-bytes encoding in Python's struct. So we convert the
        # id as 2 64 bit ids and then concatenate the result.

        # NOTE: we count 16 chars from the right (:-16) rather than the left so
        # that ids with less than 32 chars will be correctly pre-padded with 0s.
        arg_2 = unsigned_hex_to_signed_int(arg_0[:-16])
        arg_3 = struct.pack('>q', arg_2)

        arg_4 = unsigned_hex_to_signed_int(arg_0[-16:])
        arg_5 = struct.pack('>q', arg_4)

        return arg_3 + arg_5

Encodes to hexadecimal ids to big - endian binary .


return _sign(private_key, data, hash_algorithm)

def Func(arg_0, arg_1, arg_2):
    """
    Generates a DSA signature

    :param private_key:
        The PrivateKey to generate the signature with

    :param data:
        A byte string of the data the signature is for

    :param hash_algorithm:
        A unicode string of "md5", "sha1", "sha256", "sha384" or "sha512"

    :raises:
        ValueError - when any of the parameters contain an invalid value
        TypeError - when any of the parameters are of the wrong type
        OSError - when an error is returned by the OS crypto library

    :return:
        A byte string of the signature
    """

    if arg_0.algorithm != 'dsa':
        raise ValueError('The key specified is not a DSA private key')

    return _sign(arg_0, arg_1, arg_2)


def Func(arg_0, arg_1, arg_2):
    '''
    Subscribes `callable` to listen to events of `name` type. The
    parameters passed to `callable` are dependent on the specific
    event being triggered.
    '''
    if arg_1 not in arg_0._hooks:
      arg_0._hooks[arg_1] = []
    arg_0._hooks[arg_1].append(arg_2)

Subscribes callable to listen to events of name type . The parameters passed to callable are dependent on the specific event being triggered .


return np.linspace(0, (12.0 * n) / bins_per_octave, num=n+1, endpoint=True)

def Func ( arg_0 , arg_1 = 12 , ** arg_2 ) : return np . linspace ( 0 , ( 12.0 * arg_0 ) / arg_1 , num = arg_0 + 1 , endpoint = True )

def Func(arg_0, arg_1=12, **arg_2):
    '''Get chroma bin numbers'''
    return np.linspace(0, (12.0 * arg_0) / arg_1, num=arg_0+1, endpoint=True)


def Func ( arg_0 ) : arg_1 = Search ( using = arg_0 . client , index = arg_0 . event_index ) [ 0 : 1 ] . sort ( { 'timestamp' : { 'order' : 'asc' } } ) arg_2 = arg_1 . execute ( ) if len ( arg_2 ) == 0 : return None return parser . parse ( arg_2 [ 0 ] [ 'timestamp' ] )

def Func(arg_0):
        """Search for the oldest event timestamp."""
        # Retrieve the oldest event in order to start aggregation
        # from there
        arg_1 = Search(
            using=arg_0.client,
            index=arg_0.event_index
        )[0:1].sort(
            {'timestamp': {'order': 'asc'}}
        )
        arg_2 = arg_1.execute()
        # There might not be any events yet if the first event have been
        # indexed but the indices have not been refreshed yet.
        if len(arg_2) == 0:
            return None
        return parser.parse(arg_2[0]['timestamp'])


def Func ( arg_0 , arg_1 = False , arg_2 = False ) : arg_3 = getAllRunningPids ( ) arg_4 = [ scanProcessForMapping ( pid , arg_0 , arg_1 , arg_2 ) for pid in arg_3 ] arg_5 = { } for arg_6 in range ( len ( arg_3 ) ) : if arg_4 [ arg_6 ] is not None : arg_5 [ arg_3 [ arg_6 ] ] = arg_4 [ arg_6 ] return arg_5

def Func(arg_0, arg_1=False, arg_2=False):
    '''
        Func - Scans all processes on the system for a given search pattern.

            @param searchPortion <str> - A mapping for which to search, example: libc or python or libz.so.1. Give empty string to return all mappings.
            @param isExactMatch <bool> Default False - If match should be exact, otherwise a partial match is performed.
            @param ignoreCase <bool> Default False - If True, search will be performed case-insensitively

        @return - <dict> - A dictionary of pid -> mappingResults for each pid that matched the search pattern. For format of "mappingResults", @see scanProcessForMapping
    '''
    arg_3 = getAllRunningPids()

    # Since processes could disappear, we run the scan as fast as possible here with a list comprehension, then assemble the return dictionary later.
    arg_4 = [scanProcessForMapping(pid, arg_0, arg_1, arg_2) for pid in arg_3]
    arg_5 = {}
    for arg_6 in range(len(arg_3)):
        if arg_4[arg_6] is not None:
            arg_5[arg_3[arg_6]] = arg_4[arg_6]

    return arg_5

scanAllProcessesForMapping - Scans all processes on the system for a given search pattern.

            @param searchPortion <str> - A mapping for which to search, example: libc or python or libz.so.1. Give empty string to return all mappings.
            @param isExactMatch <bool> Default False - If match should be exact, otherwise a partial match is performed.
            @param ignoreCase <bool> Default False - If True, search will be performed case-insensitively

        @return - <dict> - A dictionary of pid -> mappingResults for each pid that matched the search pattern. For format of "mappingResults", @see scanProcessForMapping

scanAllProcessesForMapping - Scans all processes on the system for a given search pattern .


(self, server_name, name, new_database_name=None,
                        service_objective_id=None, edition=None,
                        max_size_bytes=None)

return self._perform_put(
            self._get_databases_path(server_name, name),
            _SqlManagementXmlSerializer.update_database_to_xml(
                new_database_name, service_objective_id, edition,
                max_size_bytes
            )
        )

def Func(arg_0, arg_1, arg_2, arg_3=None,
                        arg_4=None, arg_5=None,
                        arg_6=None):
        '''
        Updates existing database details.

        server_name:
            Name of the server to contain the new database.
        name:
            Required. The name for the new database. See Naming Requirements
            in Azure SQL Database General Guidelines and Limitations and
            Database Identifiers for more information.
        new_database_name:
            Optional. The new name for the new database.
        service_objective_id:
            Optional. The new service level to apply to the database. For more
            information about service levels, see Azure SQL Database Service
            Tiers and Performance Levels. Use List Service Level Objectives to
            get the correct ID for the desired service objective.
        edition:
            Optional. The new edition for the new database.
        max_size_bytes:
            Optional. The new size of the database in bytes. For information on
            available sizes for each edition, see Azure SQL Database Service
            Tiers (Editions).
        '''
        _validate_not_none('server_name', arg_1)
        _validate_not_none('name', arg_2)
        return arg_0._perform_put(
            arg_0._get_databases_path(arg_1, arg_2),
            _SqlManagementXmlSerializer.Func_to_xml(
                arg_3, arg_4, arg_5,
                arg_6
            )
        )


def Func ( arg_0 , arg_1 ) : arg_2 = os . path . splitext ( arg_0 ) [ 0 ] arg_2 = arg_2 . replace ( os . path . sep , '__' ) if arg_1 is not None : arg_2 = '___' . join ( [ arg_2 , arg_1 ] ) arg_2 = re . sub ( '[^0-9a-zA-Z_]+' , '_' , arg_2 ) arg_2 = arg_2 . lower ( ) return arg_2

def Func(arg_0, arg_1):
    """Convert resource's path and name to storage's table name.

    Args:
        path (str): resource path
        name (str): resource name

    Returns:
        str: table name

    """
    arg_2 = os.path.splitext(arg_0)[0]
    arg_2 = arg_2.replace(os.path.sep, '__')
    if arg_1 is not None:
        arg_2 = '___'.join([arg_2, arg_1])
    arg_2 = re.sub('[^0-9a-zA-Z_]+', '_', arg_2)
    arg_2 = arg_2.lower()
    return arg_2

Convert resource s path and name to storage s table name .


def Func(arg_0, arg_1):
        """Calculate the minimum length of initial substrings of uid1 and uid2
        for them to be different.

        :param uid1: first uid to compare
        :type uid1: str
        :param uid2: second uid to compare
        :type uid2: str
        :returns: the length of the shortes unequal initial substrings
        :rtype: int
        """
        arg_2 = 0
        for arg_3, arg_4 in zip(arg_0, arg_1):
            if arg_3 == arg_4:
                arg_2 += 1
            else:
                break
        return arg_2

Calculate the minimum length of initial substrings of uid1 and uid2 for them to be different .


def
Func
(
arg_0
)
:
def
arg_6
(
arg_1
=
False
,
**
arg_2
)
:
arg_3
=
len
(
inline_stack
.
names
)
arg_4
=
arg_0
(
**
arg_2
)
if
len
(
arg_4
)
>
LINE_LEN_LIMIT
:
arg_5
=
inline_stack
.
require
(
'LONG'
)
inline_stack
.
names
.
pop
(
)
inline_stack
.
names
.
insert
(
arg_3
,
arg_5
)
arg_4
=
'def %s(var=var):\n    return %s\n'
%
(
arg_5
,
arg_4
)
inline_stack
.
define
(
arg_5
,
arg_4
)
return
arg_5
+
'()'
else
:
return
arg_4
arg_6
.
__dict__
[
'standard'
]
=
arg_0
return
arg_6

def Func(arg_0):
    '''Decorator limiting resulting line length in order to avoid python parser stack overflow -
      If expression longer than LINE_LEN_LIMIT characters then it will be moved to upper line
     USE ONLY ON EXPRESSIONS!!! '''

    def arg_6(arg_1=False, **arg_2):
        arg_3 = len(
            inline_stack.names
        )  # in case line is longer than limit we will have to insert the lval at current position
        # this is because calling func will change inline_stack.
        # we cant use inline_stack.require here because we dont know whether line overflows yet
        arg_4 = arg_0(**arg_2)
        if len(arg_4) > LINE_LEN_LIMIT:
            arg_5 = inline_stack.require('LONG')
            inline_stack.names.pop()
            inline_stack.names.insert(arg_3, arg_5)
            arg_4 = 'def %s(var=var):\n    return %s\n' % (arg_5, arg_4)
            inline_stack.define(arg_5, arg_4)
            return arg_5 + '()'
        else:
            return arg_4

    arg_6.__dict__['standard'] = arg_0
    return arg_6


return render_template('alignviewers/pileup.html', alignments=alignments,
                           position=position, vcf_file=vcf_file,
                           genome=genome, exons=exons)

def Func():
    """Visualize BAM alignments."""
    arg_0 = request.args.get('vcf')
    arg_1 = request.args.getlist('bam')
    arg_2 = request.args.getlist('bai')
    arg_3 = request.args.getlist('sample')
    arg_4 = [{'bam': bam, 'bai': bai, 'sample': sample}
                  for bam, bai, sample in zip(arg_1, arg_2, arg_3)]

    arg_5 = {
        'contig': request.args['contig'],
        'start': request.args['start'],
        'stop': request.args['stop']
    }

    arg_6 = current_app.config.get('PILEUP_GENOME')
    if arg_6:
        if not os.path.isfile(arg_6):
            flash("The pilup genome path ({}) provided does not exist".format(arg_6))
            arg_6 = None
    LOG.debug("Use Func genome %s", arg_6)

    arg_7 = current_app.config.get('PILEUP_EXONS')
    if arg_7:
        if not os.path.isfile(arg_7):
            flash("The pilup exons path ({}) provided does not exist".format(arg_7))
            arg_6 = None
    LOG.debug("Use Func exons %s", arg_7)

    LOG.debug("View alignment for positions Chrom:{0}, Start:{1}, End: {2}".format(
              arg_5['contig'], arg_5['start'], arg_5['stop']))
    LOG.debug("Use alignment files {}".format(arg_4))

    return render_template('alignviewers/Func.html', arg_4=arg_4,
                           arg_5=arg_5, arg_0=arg_0,
                           arg_6=arg_6, arg_7=arg_7)


(engine, user_id, old_crypto, new_crypto, logger)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """
    Re-encrypt all files and checkpoints for a single user.
    """
    # Use FallbackCrypto so that we're re-entrant if we halt partway through.
    arg_5 = FallbackCrypto([arg_3, arg_2])

    reencrypt_user_content(
        arg_0=arg_0,
        arg_1=arg_1,
        old_decrypt_func=arg_5.decrypt,
        new_encrypt_func=arg_5.encrypt,
        arg_4=arg_4,
    )

Re - encrypt all files and checkpoints for a single user .


(self, name, tier_type='IntervalTier', number=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
'IntervalTier'
,
arg_3
=
)
:
if
arg_3
is
:
arg_3
=
1
if
not
arg_0
.
tiers
else
len
(
arg_0
.
tiers
)
+
1
elif
arg_3
<
1
or
arg_3
>
len
(
arg_0
.
tiers
)
:
raise
ValueError
(
'Number not in [1..{}]'
.
format
(
len
(
arg_0
.
tiers
)
)
)
elif
arg_2
not
in
Tier
.
P_TIERS
:
raise
ValueError
(
'tier_type has to be in {}'
.
format
(
arg_0
.
P_TIERS
)
)
arg_0
.
tiers
.
insert
(
arg_3
1
,
Tier
(
arg_0
.
xmin
,
arg_0
.
xmax
,
arg_1
,
arg_2
)
)
return
arg_0
.
tiers
[
arg_3
1
]

def Func(arg_0, arg_1, arg_2='IntervalTier', arg_3=None):
        """Add an IntervalTier or a TextTier on the specified location.

        :param str name: Name of the tier, duplicate names is allowed.
        :param str tier_type: Type of the tier.
        :param int number: Place to insert the tier, when ``None`` the number
            is generated and the tier will be placed on the bottom.
        :returns: The created tier.
        :raises ValueError: If the number is out of bounds.
        """
        if arg_3 is None:
            arg_3 = 1 if not arg_0.tiers else len(arg_0.tiers)+1
        elif arg_3 < 1 or arg_3 > len(arg_0.tiers):
            raise ValueError('Number not in [1..{}]'.format(len(arg_0.tiers)))
        elif arg_2 not in Tier.P_TIERS:
            raise ValueError('tier_type has to be in {}'.format(arg_0.P_TIERS))
        arg_0.tiers.insert(arg_3-1,
                          Tier(arg_0.xmin, arg_0.xmax, arg_1, arg_2))
        return arg_0.tiers[arg_3-1]

Add an IntervalTier or a TextTier on the specified location .


def Func(arg_0, arg_1):
    """Remove a contact from the addressbook.

    :param selected_vcard: the contact to delete
    :type selected_vcard: carddav_object.CarddavObject
    :param force: delete without confirmation
    :type force: bool
    :returns: None
    :rtype: None

    """
    if not arg_1:
        while True:
            arg_2 = input(
                "Deleting contact %s from address book %s. Are you sure? "
                "(y/n): " % (arg_0, arg_0.address_book))
            if arg_2.lower() in ["", "n", "q"]:
                print("Canceled")
                sys.exit(0)
            if arg_2.lower() == "y":
                break
    arg_0.delete_vcard_file()
    print("Contact %s deleted successfully" % arg_0.get_full_name())


def Func ( arg_0 , arg_1 = None ) : if not arg_1 : arg_1 = arg_0 . file if arg_1 : with open ( arg_1 , 'w' ) as handle : arg_0 . config . write ( handle )

def Func(arg_0, arg_1=None):
        """        Flush current stat to file        """
        if not arg_1:
            arg_1 = arg_0.file

        if arg_1:
            with open(arg_1, 'w') as handle:
                arg_0.config.write(handle)


(*args: Union[ANSIColors, ANSIStyles], **kwargs: Union[ANSIColors, ANSIStyles])

def Func ( * arg_0 : arg_1 [ arg_2 , arg_3 ] , ** arg_4 : arg_1 [ arg_2 , arg_3 ] ) -> tuple : arg_5 : tuple = tuple ( ) arg_6 : tuple = tuple ( ) for arg_7 in arg_0 : arg_5 += arg_7 . _fields arg_6 += arg_7 for arg_8 , arg_7 in arg_4 . items ( ) : arg_5 += tuple ( map ( lambda x : '_' . join ( [ arg_8 , x ] ) , arg_7 . _fields ) ) arg_6 += arg_7 return namedtuple ( 'ANSISequences' , arg_5 ) ( * arg_6 )

def Func(*arg_0: arg_1[arg_2, arg_3], **arg_4: arg_1[arg_2, arg_3]) -> tuple:
    '''generate single escape sequence mapping.'''
    arg_5: tuple = tuple()
    arg_6: tuple = tuple()
    for arg_7 in arg_0:
        arg_5 += arg_7._fields
        arg_6 += arg_7
    for arg_8, arg_7 in arg_4.items():
        arg_5 += tuple(map(lambda x: '_'.join([arg_8, x]), arg_7._fields))
        arg_6 += arg_7
    return namedtuple('ANSISequences', arg_5)(*arg_6)

generate single escape sequence mapping .


def Func ( ) : arg_0 = { } arg_1 = "{}." . format ( components . __name__ ) for arg_2 , arg_3 , arg_4 in pkgutil . iter_modules ( components . __path__ , arg_1 ) : arg_5 = arg_2 . find_module ( arg_3 ) . load_module ( arg_3 ) arg_6 = [ arg_7 for arg_7 in arg_5 . __dict__ . values ( ) if isinstance ( arg_7 , type ) and arg_7 . __name__ != "Process" ] for arg_7 in arg_6 : arg_0 [ arg_8 ( arg_7 . __name__ ) ] = arg_7 return arg_0

def Func():
    """Collects Process classes and return dict mapping templates to classes

    This function crawls through the components module and retrieves all
    classes that inherit from the Process class. Then, it converts the name
    of the classes (which should be CamelCase) to snake_case, which is used
    as the template name.

    Returns
    -------
    dict
        Dictionary mapping the template name (snake_case) to the corresponding
        process class.
    """

    arg_0 = {}

    arg_1 = "{}.".format(components.__name__)
    for arg_2, arg_3, arg_4 in pkgutil.iter_modules(components.__path__,
                                                     arg_1):

        arg_5 = arg_2.find_module(arg_3).load_module(arg_3)

        arg_6 = [
            arg_7 for arg_7 in arg_5.__dict__.values() if
            isinstance(arg_7, type) and arg_7.__name__ != "Process"
        ]

        for arg_7 in arg_6:
            arg_0[arg_8(arg_7.__name__)] = arg_7

    return arg_0


def Func ( arg_0 ) : arg_1 = sys . getfilesystemencoding ( ) if isinstance ( arg_0 , decoded_string ) : return arg_0 for arg_2 in ( arg_1 , "utf-8" ) : try : return arg_0 . decode ( arg_2 ) except UnicodeDecodeError : continue

def Func(arg_0):
    """
    Ensure that the given path is decoded,
    NONE when no expected encoding works
    """

    arg_1 = sys.getfilesystemencoding()
    if isinstance(arg_0, decoded_string):
        return arg_0

    for arg_2 in (arg_1, "utf-8"):
        try:
            return arg_0.decode(arg_2)
        except UnicodeDecodeError:
            continue

Ensure that the given path is decoded NONE when no expected encoding works


def Func ( arg_0 , arg_1 = None ) : if arg_1 is None : arg_1 = [ ] elif isinstance ( arg_1 , basestring ) : arg_1 = [ s . strip ( ) for s in arg_1 . split ( ',' ) if s . strip ( ) ] arg_2 = arg_0 . get_xml ( "{}/workspaces.xml" . format ( arg_0 . service_url ) ) arg_3 = [ ] arg_3 . extend ( [ workspace_from_index ( arg_0 , arg_4 ) for arg_4 in arg_2 . findall ( "workspace" ) ] ) if arg_3 and arg_1 : return ( [ arg_5 for arg_5 in arg_3 if arg_5 . name in arg_1 ] ) return arg_3

def Func(arg_0, arg_1=None):
        '''
          Returns a list of workspaces in the catalog.
          If names is specified, will only return workspaces that match.
          names can either be a comma delimited string or an array.
          Will return an empty list if no workspaces are found.
        '''
        if arg_1 is None:
            arg_1 = []
        elif isinstance(arg_1, basestring):
            arg_1 = [s.strip() for s in arg_1.split(',') if s.strip()]

        arg_2 = arg_0.get_xml("{}/workspaces.xml".format(arg_0.service_url))
        arg_3 = []
        arg_3.extend([workspace_from_index(arg_0, arg_4) for arg_4 in arg_2.findall("workspace")])

        if arg_3 and arg_1:
            return ([arg_5 for arg_5 in arg_3 if arg_5.name in arg_1])

        return arg_3

Returns a list of workspaces in the catalog . If names is specified will only return workspaces that match . names can either be a comma delimited string or an array . Will return an empty list if no workspaces are found .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . samples . keys ( ) arg_2 . sort ( ) arg_3 = pd . DataFrame ( [ arg_0 . samples [ i ] . stats_dfs [ arg_1 ] for i in arg_2 ] , index = arg_2 ) . dropna ( axis = 1 , how = 'all' ) return arg_3

def Func(arg_0, arg_1):
        """ Returns a data frame with Sample stats for each step """
        arg_2 = arg_0.samples.keys()
        arg_2.sort()
        arg_3 = pd.DataFrame([arg_0.samples[i].stats_dfs[arg_1] \
                               for i in arg_2], index=arg_2)\
                               .dropna(axis=1, how='all')
        return arg_3


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_2 . read ( ) arg_4 = Operators . EXTRACT ( arg_3 , 0 , 1 ) == 1 arg_5 = 0 for arg_6 in range ( 1 , arg_2 . size ) : arg_5 = Operators . ITEBV ( arg_1 . size , arg_4 , arg_5 , arg_6 ) arg_4 = Operators . OR ( arg_4 , Operators . EXTRACT ( arg_3 , arg_6 , 1 ) == 1 ) arg_0 . ZF = arg_3 == 0 arg_1 . write ( Operators . ITEBV ( arg_1 . size , arg_0 . ZF , arg_1 . read ( ) , arg_5 ) )

def Func(arg_0, arg_1, arg_2):
        """
        Bit scan forward.

        Searches the source operand (second operand) for the least significant
        set bit (1 bit). If a least significant 1 bit is found, its bit index
        is stored in the destination operand (first operand). The source operand
        can be a register or a memory location; the destination operand is a register.
        The bit index is an unsigned offset from bit 0 of the source operand.
        If the contents source operand are 0, the contents of the destination
        operand is undefined::

                    IF SRC  =  0
                    THEN
                        ZF  =  1;
                        DEST is undefined;
                    ELSE
                        ZF  =  0;
                        temp  =  0;
                        WHILE Bit(SRC, temp)  =  0
                        DO
                            temp  =  temp + 1;
                            DEST  =  temp;
                        OD;
                    FI;

        :param cpu: current CPU.
        :param dest: destination operand.
        :param src: source operand.
        """
        arg_3 = arg_2.read()
        arg_4 = Operators.EXTRACT(arg_3, 0, 1) == 1
        arg_5 = 0
        for arg_6 in range(1, arg_2.size):
            arg_5 = Operators.ITEBV(arg_1.size, arg_4, arg_5, arg_6)
            arg_4 = Operators.OR(arg_4, Operators.EXTRACT(arg_3, arg_6, 1) == 1)

        arg_0.ZF = arg_3 == 0
        arg_1.write(Operators.ITEBV(arg_1.size, arg_0.ZF, arg_1.read(), arg_5))


def Func ( arg_0 ) : arg_1 = Iq ( to_jid = arg_0 . room_jid . bare ( ) , stanza_type = "get" ) arg_1 . new_query ( MUC_OWNER_NS , "query" ) arg_0 . manager . stream . set_response_handlers ( arg_1 , arg_0 . process_configuration_form_success , arg_0 . process_configuration_form_error ) arg_0 . manager . stream . send ( arg_1 ) return arg_1 . get_id ( )

def Func(arg_0):
        """
        Request a configuration form for the room.

        When the form is received `self.handler.configuration_form_received` will be called.
        When an error response is received then `self.handler.error` will be called.

        :return: id of the request stanza.
        :returntype: `unicode`
        """
        arg_1 = Iq(to_jid = arg_0.room_jid.bare(), stanza_type = "get")
        arg_1.new_query(MUC_OWNER_NS, "query")
        arg_0.manager.stream.set_response_handlers(
                arg_1, arg_0.process_configuration_form_success, arg_0.process_configuration_form_error)
        arg_0.manager.stream.send(arg_1)
        return arg_1.get_id()

Request a configuration form for the room .


def Func(arg_0, arg_1, arg_2):
    """invoke task hooks for every time bolt processes a tuple

    :type heron_tuple: HeronTuple
    :param heron_tuple: tuple that is executed
    :type execute_latency_ns: float
    :param execute_latency_ns: execute latency in nano seconds
    """
    if len(arg_0.task_hooks) > 0:
      arg_3 = \
        BoltExecuteInfo(arg_1=arg_1,
                        executing_task_id=arg_0.get_task_id(),
                        execute_latency_ms=arg_2 * system_constants.NS_TO_MS)
      for arg_4 in arg_0.task_hooks:
        arg_4.bolt_execute(arg_3)


def Func(arg_0, arg_1=None, arg_2=None, arg_3=()):
        """
        This method is Capybara's primary defense against asynchronicity problems. It works by
        attempting to run a given decorated function until it succeeds. The exact behavior of this
        method depends on a number of factors. Basically there are certain exceptions which, when
        raised from the decorated function, instead of bubbling up, are caught, and the function is
        re-run.

        Certain drivers have no support for asynchronous processes. These drivers run the function,
        and any error raised bubbles up immediately. This allows faster turn around in the case
        where an expectation fails.

        Only exceptions that are :exc:`ElementNotFound` or any subclass thereof cause the block to
        be rerun. Drivers may specify additional exceptions which also cause reruns. This usually
        occurs when a node is manipulated which no longer exists on the page. For example, the
        Selenium driver specifies ``selenium.common.exceptions.StateElementReferenceException``.

        As long as any of these exceptions are thrown, the function is re-run, until a certain
        amount of time passes. The amount of time defaults to :data:`capybara.default_max_wait_time`
        and can be overridden through the ``wait`` argument. This time is compared with the system
        time to see how much time has passed. If the return value of ``time.time()`` is stubbed
        out, Capybara will raise :exc:`FrozenInTime`.

        Args:
            func (Callable, optional): The function to decorate.
            wait (int, optional): Number of seconds to retry this function.
            errors (Tuple[Type[Exception]], optional): Exception types that cause the function to be
                rerun. Defaults to ``driver.invalid_element_errors`` + :exc:`ElementNotFound`.

        Returns:
            Callable: The decorated function, or a decorator function.

        Raises:
            FrozenInTime: If the return value of ``time.time()`` appears stuck.
        """

        def decorator(arg_1):
            @wraps(arg_1)
            def outer(*arg_4, **arg_5):
                arg_6 = arg_2 if arg_2 is not None else capybara.default_max_wait_time

                def inner():
                    return arg_1(*arg_4, **arg_5)

                if arg_0.session.Funcd:
                    return inner()
                else:
                    arg_7 = Timer(arg_6)
                    arg_0.session.Funcd = True
                    try:
                        while True:
                            try:
                                return inner()
                            except Exception as e:
                                arg_0.session.raise_server_error()

                                if not arg_0._should_catch_error(e, arg_3):
                                    raise
                                if arg_7.expired:
                                    raise

                                sleep(0.05)

                                if arg_7.stalled:
                                    raise FrozenInTime(
                                        "time appears to be frozen, Capybara does not work with "
                                        "libraries which freeze time, consider using time "
                                        "traveling instead")
                                if capybara.automatic_reload:
                                    arg_0.reload()
                    finally:
                        arg_0.session.Funcd = False

            return outer

        if arg_1:
            return decorator(arg_1)
        else:
            return decorator

This method is Capybara s primary defense against asynchronicity problems . It works by attempting to run a given decorated function until it succeeds . The exact behavior of this method depends on a number of factors . Basically there are certain exceptions which when raised from the decorated function instead of bubbling up are caught and the function is re - run .


def Func ( arg_0 ) : if arg_0 . connection . has_changed ( ) : arg_1 = arg_0 . connection . download_image ( ) arg_2 = Image . open ( arg_1 ) arg_0 . text_cache = pytesseract . image_to_string ( arg_2 ) arg_2 . close ( ) return arg_0 . text_cache

def Func(arg_0):
        """
        Returns the text from an image at a given url.
        """

        # Only download the image if it has changed
        if arg_0.connection.has_changed():
            arg_1 = arg_0.connection.download_image()
            arg_2 = Image.open(arg_1)
            arg_0.text_cache = pytesseract.image_to_string(arg_2)
            arg_2.close()

        return arg_0.text_cache

Returns the text from an image at a given url .


def Func(arg_0, arg_1):
        """Fetch the number of members in a conversation, which is a supertype for public and
        private ones, DM and group DM.

        :param conversation: the ID of the conversation
        """
        arg_2 = 0

        arg_3 = arg_0.RCONVERSATION_INFO

        arg_4 = {
            arg_0.PCHANNEL: arg_1,
        }

        arg_5 = arg_0._fetch(arg_3, arg_4)
        arg_6 = json.loads(arg_5)

        arg_2 += len(arg_6["members"])
        while 'next_cursor' in arg_6['response_metadata'] and arg_6['response_metadata']['next_cursor']:
            arg_4['cursor'] = arg_6['response_metadata']['next_cursor']
            arg_5 = arg_0._fetch(arg_3, arg_4)
            arg_6 = json.loads(arg_5)
            arg_2 += len(arg_6["members"])

        return arg_2

Fetch the number of members in a conversation which is a supertype for public and private ones DM and group DM .


def Func ( arg_0 , arg_1 ) : arg_2 = '%s.doentry' % ( arg_1 ) return os . path . join ( arg_0 . dayone_journal_path , arg_2 )

def Func(arg_0, arg_1):
        """Create and return full file path for DayOne entry"""
        arg_2 = '%s.doentry' % (arg_1)
        return os.path.join(arg_0.dayone_journal_path, arg_2)


def Func(arg_0):
        """
        Export all dockerhub tags associated with each component given by
        the -t flag.
        """

        # dict to store the already parsed components (useful when forks are
        # given to the pipeline string via -t flag
        arg_1 = {}

        # fetches terminal width and subtracts 3 because we always add a
        # new line character and we want a space at the beggining and at the end
        # of each line
        arg_2 = shutil.get_terminal_size().columns - 3

        # first header
        arg_3 = " Selected container tags "

        # starts a list with the headers
        arg_4 = [
            [
                "=" * int(arg_2 / 4),
                "{0}{1}{0}".format(
                    "=" * int(((arg_2/2 - len(arg_3)) / 2)),
                    arg_3)
                ,
                "{}\n".format("=" * int(arg_2 / 4))
            ],
            ["component", "container", "tags"],
            [
                "=" * int(arg_2 / 4),
                "=" * int(arg_2 / 2),
                "=" * int(arg_2 / 4)
            ]
        ]

        # Skip first init process and iterate through the others
        for arg_5 in arg_0.processes[1:]:
            arg_6 = arg_5.template
            # if component has already been printed then skip and don't print
            # again
            if arg_6 in arg_1:
                continue

            # starts a list of  containers for the current process in
            # dict_of_parsed, in which each containers will be added to this
            # list once it gets parsed
            arg_1[arg_6] = {
                "container": []
            }

            # fetch repo name from directives of each component.
            for arg_7 in arg_5.directives.values():
                try:
                    arg_8 = arg_7["container"]
                    arg_9 = arg_7["version"]
                except KeyError:
                    # adds the default container if container key isn't present
                    # this happens for instance in integrity_coverage
                    arg_8 = "flowcraft/flowcraft_base"
                    arg_9 = "1.0.0-1"
                # checks if repo_version already exists in list of the
                # containers for the current component being queried
                arg_10 = arg_8 + arg_9
                if arg_10 not in arg_1[arg_6]["container"]:
                    # make the request to docker hub
                    arg_11 = requests.get(
                        "https://hub.docker.com/v2/repositories/{}/tags/"
                        .format(arg_8)
                    )
                    # checks the status code of the request, if it is 200 then
                    # parses docker hub entry, otherwise retrieve no tags but
                    # alerts the user
                    if arg_11.status_code != 404:
                        # parse response content to dict and fetch results key
                        arg_12 = json.loads(arg_11.content)["results"]
                        for arg_13 in arg_12:
                            arg_14 = (arg_13["name"] + "*") \
                                if arg_13["name"] == arg_9 \
                                else arg_13["name"]
                            arg_4.append([arg_6, arg_8, arg_14])
                    else:
                        arg_4.append([arg_6, arg_8, "No DockerHub tags"])

                arg_1[arg_6]["container"].append(arg_10)

        # iterate through each entry in tags_list and print the list of tags
        # for each component. Each entry (excluding the headers) contains
        # 3 elements (component name, container and tag version)
        for arg_15, arg_16 in enumerate(arg_4):
            # adds different color to the header in the first list and
            # if row is pair add one color and if is even add another (different
            # background)
            arg_17 = "blue_bold" if arg_15 < 3 else \
                ("white" if arg_15 % 2 != 0 else "0;37;40m")
            # generates a small list with the terminal width for each column,
            # this will be given to string formatting as the 3, 4 and 5 element
            arg_18 = [
                int(arg_2/4),
                int(arg_2/2),
                int(arg_2/4)
            ]
            # writes the string to the stdout
            sys.stdout.write(
                colored_print("\n {0: <{3}} {1: ^{4}} {2: >{5}}".format(
                    *arg_16, *arg_18), arg_17)
            )
        # assures that the entire line gets the same color
        sys.stdout.write("\n{0: >{1}}\n".format("(* = default)",
                                                arg_2 + 3))

Export all dockerhub tags associated with each component given by the - t flag .


def Func ( arg_0 , arg_1 ) : with open ( arg_1 , 'w' ) as fp : json . dump ( arg_0 , fp , indent = 4 , sort_keys = True , ensure_ascii = False ) return True return False

def Func(arg_0, arg_1):
    """Write json data into a file
    """
    with open(arg_1, 'w') as fp:
        json.dump(arg_0, fp, indent=4, sort_keys=True, ensure_ascii=False)
        return True
    return False


def Func(arg_0, arg_1, arg_2):
        '''Verify and remove signature'''

        if arg_2['signature_algorithm_id'] not in arg_0.signature_algorithms:
            raise Exception('Unknown signature algorithm id: %d'
                            % arg_2['signature_algorithm_id'])

        arg_3 = \
            arg_0.signature_algorithms[arg_2['signature_algorithm_id']]

        arg_4 = arg_0._get_algorithm_info(arg_3)

        arg_5 = ''
        if arg_4['salt_size']:
            arg_5 = arg_1[-arg_4['salt_size']:]
            arg_1 = arg_1[:-arg_4['salt_size']]

        arg_6 = arg_0._generate_key(arg_2['signature_passphrase_id'],
                            arg_0.signature_passphrases, arg_5, arg_4)

        arg_1 = arg_0._decode(arg_1, arg_4, arg_6)

        return arg_1


return cond_true if pred_ else cond_false

def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = tf . get_static_value ( tf . convert_to_tensor ( value = arg_0 ) ) if arg_3 is None : return tf . where ( arg_0 , arg_1 , arg_2 ) return arg_1 if arg_3 else arg_2

def Func(arg_0, arg_1, arg_2):
  """Convenience function which chooses the condition based on the predicate."""
  # Note: This function is only valid if all of pred, cond_true, and cond_false
  # are scalars. This means its semantics are arguably more like tf.cond than
  # tf.where even though we use tf.where to implement it.
  arg_3 = tf.get_static_value(tf.convert_to_tensor(value=arg_0))
  if arg_3 is None:
    return tf.where(arg_0, arg_1, arg_2)
  return arg_1 if arg_3 else arg_2

Convenience function which chooses the condition based on the predicate .


def Func(arg_0, arg_1, arg_2):
        """
        Pad sequences to given length in the left or right side.
        """
        if arg_0._train_set:
            arg_0._train_set = pad_dataset(arg_0._train_set, arg_1, arg_2)
        if arg_0._valid_set:
            arg_0._valid_set = pad_dataset(arg_0._valid_set, arg_1, arg_2)
        if arg_0._test_set:
            arg_0._test_set = pad_dataset(arg_0._test_set, arg_1, arg_2)

Pad sequences to given length in the left or right side .


def Func(arg_0, arg_1=None):
        '''
        Add a checklist to this card. Returns a Checklist object.
        '''
        arg_2 = arg_0.fetch_json(
            uri_path=arg_0.base_uri + '/checklists',
            http_method='POST',
            arg_1=arg_1 or {}
        )

        return arg_0.create_checklist(arg_2)

Add a checklist to this card . Returns a Checklist object .


(lcc_server,
                  file_to_upload,
                  xmatch_dist_arcsec=3.0,
                  result_visibility='unlisted',
                  email_when_done=False,
                  collections=None,
                  columns=None,
                  filters=None,
                  sortspec=None,
                  limitspec=None,
                  samplespec=None,
                  download_data=True,
                  outdir=None,
                  maxtimeout=300.0,
                  refresh=15.0)

def Func(arg_0,
                  arg_1,
                  arg_2=3.0,
                  arg_3='unlisted',
                  arg_4=False,
                  arg_5=None,
                  arg_6=None,
                  arg_7=None,
                  arg_8=None,
                  arg_9=None,
                  arg_10=None,
                  arg_11=True,
                  arg_12=None,
                  arg_13=300.0,
                  arg_14=15.0):

    '''This runs a cross-match search query.

    Parameters
    ----------

    lcc_server : str
        This is the base URL of the LCC-Server to talk to.  (e.g. for HAT, use:
        https://data.hatsurveys.org)

    file_to_upload : str
        This is the path to a text file containing objectid, RA, declination
        rows for the objects to cross-match against the LCC-Server
        collections. This should follow the format of the following example::

            # example object and coordinate list
            # objectid ra dec
            aaa 289.99698 44.99839
            bbb 293.358 -23.206
            ccc 294.197 +23.181
            ddd 19 25 27.9129 +42 47 03.693
            eee 19:25:27 -42:47:03.21
            # .
            # .
            # .
            # etc. lines starting with '#' will be ignored
            # (max 5000 objects)

    xmatch_dist_arcsec : float
        This is the maximum distance in arcseconds to consider when
        cross-matching objects in the uploaded file to the LCC-Server's
        collections. The maximum allowed distance is 30 arcseconds. Multiple
        matches to an uploaded object are possible and will be returned in order
        of increasing distance grouped by input `objectid`.

    result_visibility : {'private', 'unlisted', 'public'}
        This sets the visibility of the dataset produced from the search
        result::

               'private' -> the dataset and its products are not visible or
                            accessible by any user other than the one that
                            created the dataset.

               'unlisted' -> the dataset and its products are not visible in the
                             list of public datasets, but can be accessed if the
                             dataset URL is known

               'public' -> the dataset and its products are visible in the list
                           of public datasets and can be accessed by anyone.

    email_when_done : bool
        If True, the LCC-Server will email you when the search is complete. This
        will also set `download_data` to False. Using this requires an
        LCC-Server account and an API key tied to that account.

    collections : list of str or None
        This is a list of LC collections to search in. If this is None, all
        collections will be searched.

    columns : list of str or None
        This is a list of columns to return in the results. Matching objects'
        object IDs, RAs, DECs, and links to light curve files will always be
        returned so there is no need to specify these columns. If None, only
        these columns will be returned: 'objectid', 'ra', 'decl', 'lcfname'

    filters : str or None
        This is an SQL-like string to use to filter on database columns in the
        LCC-Server's collections. To see the columns available for a search,
        visit the Collections tab in the LCC-Server's browser UI. The filter
        operators allowed are::

            lt      -> less than
            gt      -> greater than
            ge      -> greater than or equal to
            le      -> less than or equal to
            eq      -> equal to
            ne      -> not equal to
            ct      -> contains text
            isnull  -> column value is null
            notnull -> column value is not null

        You may use the `and` and `or` operators between filter specifications
        to chain them together logically.

        Example filter strings::

            "(propermotion gt 200.0) and (sdssr lt 11.0)"
            "(dered_jmag_kmag gt 2.0) and (aep_000_stetsonj gt 10.0)"
            "(gaia_status ct 'ok') and (propermotion gt 300.0)"
            "(simbad_best_objtype ct 'RR') and (dered_sdssu_sdssg lt 0.5)"

    sortspec : tuple of two strs or None
        If not None, this should be a tuple of two items::

            ('column to sort by', 'asc|desc')

        This sets the column to sort the results by. For cone_search, the
        default column and sort order are 'dist_arcsec' and 'asc', meaning the
        distance from the search center in ascending order.

    samplespec : int or None
        If this is an int, will indicate how many rows from the initial search
        result will be uniformly random sampled and returned.

    limitspec : int or None
        If this is an int, will indicate how many rows from the initial search
        result to return in total.

        `sortspec`, `samplespec`, and `limitspec` are applied in this order:

            sample -> sort -> limit

    download_data : bool
        This sets if the accompanying data from the search results will be
        downloaded automatically. This includes the data table CSV, the dataset
        pickle file, and a light curve ZIP file. Note that if the search service
        indicates that your query is still in progress, this function will block
        until the light curve ZIP file becomes available. The maximum wait time
        in seconds is set by maxtimeout and the refresh interval is set by
        refresh.

        To avoid the wait block, set download_data to False and the function
        will write a pickle file to `~/.astrobase/lccs/query-[setid].pkl`
        containing all the information necessary to retrieve these data files
        later when the query is done. To do so, call the
        `retrieve_dataset_files` with the path to this pickle file (it will be
        returned).

    outdir : str or None
        If this is provided, sets the output directory of the downloaded dataset
        files. If None, they will be downloaded to the current directory.

    maxtimeout : float
        The maximum time in seconds to wait for the LCC-Server to respond with a
        result before timing out. You can use the `retrieve_dataset_files`
        function to get results later as needed.

    refresh : float
        The time to wait in seconds before pinging the LCC-Server to see if a
        search query has completed and dataset result files can be downloaded.

    Returns
    -------

    tuple
        Returns a tuple with the following elements::

            (search result status dict,
             search result CSV file path,
             search result LC ZIP path)

    '''

    with open(arg_1) as infd:
        arg_15 = infd.read()

    # check the number of lines in the input
    arg_16 = len(arg_15.split('\n')[:-1])

    if arg_16 > 5000:

        LOGERROR('you have more than 5000 lines in the file to upload: %s' %
                 arg_1)
        return None, None, None

    # turn the input into a param dict
    arg_17 = {'xmq':arg_15,
              'xmd':arg_2}

    if arg_5:
        arg_17['collections'] = arg_5
    if arg_6:
        arg_17['columns'] = arg_6
    if arg_7:
        arg_17['filters'] = arg_7

    if arg_8:
        arg_17['sortspec'] = json.dumps([arg_8])
    if arg_10:
        arg_17['samplespec'] = int(arg_10)
    if arg_9:
        arg_17['limitspec'] = int(arg_9)

    arg_17['visibility'] = arg_3
    arg_17['emailwhendone'] = arg_4

    # we won't wait for the LC ZIP to complete if email_when_done = True
    if arg_4:
        arg_11 = False

    # check if we have an API key already
    arg_18, arg_19, arg_20 = check_existing_apikey(arg_0)

    # if not, get a new one
    if not arg_18:
        arg_19, arg_20 = get_new_apikey(arg_0)

    # hit the server
    arg_21 = '%s/api/xmatch' % arg_0

    arg_22 = submit_post_searchquery(arg_21, arg_17, arg_19)

    # check the status of the search
    arg_23 = arg_22[0]

    # now we'll check if we want to download the data
    if arg_11:

        if arg_23 == 'ok':

            LOGINFO('query complete, downloading associated data...')
            arg_24, arg_25, arg_26 = retrieve_dataset_files(arg_22,
                                                     arg_12=arg_12,
                                                     arg_19=arg_19)

            if arg_26:
                return arg_22[1], arg_24, arg_25, arg_26
            else:
                return arg_22[1], arg_24, arg_25

        elif arg_23 == 'background':

            LOGINFO('query is not yet complete, '
                    'waiting up to %.1f minutes, '
                    'updates every %s seconds (hit Ctrl+C to cancel)...' %
                    (arg_13/60.0, arg_14))

            arg_27 = 0.0

            while arg_27 < arg_13:

                try:

                    time.sleep(arg_14)
                    arg_24, arg_25, arg_26 = retrieve_dataset_files(arg_22,
                                                             arg_12=arg_12,
                                                             arg_19=arg_19)

                    if (arg_24 and os.path.exists(arg_24) and
                        arg_25 and os.path.exists(arg_25)):

                        LOGINFO('all dataset products collected')
                        return arg_22[1], arg_24, arg_25

                    arg_27 = arg_27 + arg_14

                except KeyboardInterrupt:

                    LOGWARNING('abandoned wait for downloading data')
                    return arg_22[1], None, None

            LOGERROR('wait timed out.')
            return arg_22[1], None, None

        else:

            LOGERROR('could not download the data for this query result')
            return arg_22[1], None, None

    else:

        return arg_22[1], None, None

This runs a cross - match search query .


def Func ( arg_0 , arg_1 ) : arg_2 = { } arg_2 [ 'sigma' ] = np . arange ( 10.0 * arg_1 , 10.0 * ( arg_1 + 1 ) , 1.0 ) . tolist ( ) arg_0 . f_explore ( arg_2 )

def Func(arg_0, arg_1):
    """Chooses exploration according to `batch`"""
    arg_2 = {}
    arg_2['sigma'] = np.arange(10.0 * arg_1, 10.0*(arg_1+1), 1.0).tolist()
    # for batch = 0 explores sigma in [0.0, 1.0, 2.0, ..., 9.0],
    # for batch = 1 explores sigma in [10.0, 11.0, 12.0, ..., 19.0]
    # and so on
    arg_0.f_explore(arg_2)


(cls, configurations, variables, vartype, name=None)

return cls(func, configurations, variables, vartype, name)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 = None ) : def func ( * arg_5 ) : return arg_5 in arg_1 return arg_0 ( func , arg_1 , arg_2 , arg_3 , arg_4 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None):
        """Construct a constraint from valid configurations.

        Args:
            configurations (iterable[tuple]):
                Valid configurations of the variables. Each configuration is a tuple of variable
                assignments ordered by :attr:`~Constraint.variables`.

            variables (iterable):
                Iterable of variable labels.

            vartype (:class:`~dimod.Vartype`/str/set):
                Variable type for the constraint. Accepted input values:

                * :attr:`~dimod.Vartype.SPIN`, ``'SPIN'``, ``{-1, 1}``
                * :attr:`~dimod.Vartype.BINARY`, ``'BINARY'``, ``{0, 1}``

            name (string, optional, default='Constraint'):
                Name for the constraint.

        Examples:

            This example creates a constraint that variables `a` and `b` are not equal.

            >>> import dwavebinarycsp
            >>> const = dwavebinarycsp.Constraint.Func([(0, 1), (1, 0)],
            ...                   ['a', 'b'], dwavebinarycsp.BINARY)
            >>> print(const.name)
            Constraint
            >>> (0, 0) in const.configurations   # Order matches variables: a,b
            False

            This example creates a constraint based on specified valid configurations
            that represents an OR gate for spin variables.

            >>> import dwavebinarycsp
            >>> const = dwavebinarycsp.Constraint.Func(
            ...           [(-1, -1, -1), (1, -1, 1), (1, 1, -1), (1, 1, 1)],
            ...           ['y', 'x1', 'x2'],
            ...           dwavebinarycsp.SPIN, name='or_spin')
            >>> print(const.name)
            or_spin
            >>> (1, 1, -1) in const.configurations   # Order matches variables: y,x1,x2
            True

        """
        def func(*arg_5): return arg_5 in arg_1

        return arg_0(func, arg_1, arg_2, arg_3, arg_4)

Construct a constraint from valid configurations.

        Args:
            configurations (iterable[tuple]):
                Valid configurations of the variables. Each configuration is a tuple of variable
                assignments ordered by :attr:`~Constraint.variables`.

            variables (iterable):
                Iterable of variable labels.

            vartype (:class:`~dimod.Vartype`/str/set):
                Variable type for the constraint. Accepted input values:

                * :attr:`~dimod.Vartype.SPIN`, ``'SPIN'``, ``{-1, 1}``
                * :attr:`~dimod.Vartype.BINARY`, ``'BINARY'``, ``{0, 1}``

            name (string, optional, default='Constraint'):
                Name for the constraint.

        Examples:

            This example creates a constraint that variables `a` and `b` are not equal.

            >>> import dwavebinarycsp
            >>> const = dwavebinarycsp.Constraint.from_configurations([(0, 1), (1, 0)],
            ...                   ['a', 'b'], dwavebinarycsp.BINARY)
            >>> print(const.name)
            Constraint
            >>> (0, 0) in const.configurations   # Order matches variables: a,b
            False

            This example creates a constraint based on specified valid configurations
            that represents an OR gate for spin variables.

            >>> import dwavebinarycsp
            >>> const = dwavebinarycsp.Constraint.from_configurations(
            ...           [(-1, -1, -1), (1, -1, 1), (1, 1, -1), (1, 1, 1)],
            ...           ['y', 'x1', 'x2'],
            ...           dwavebinarycsp.SPIN, name='or_spin')
            >>> print(const.name)
            or_spin
            >>> (1, 1, -1) in const.configurations   # Order matches variables: y,x1,x2
            True

Construct a constraint from valid configurations .


(key_name,
             stash,
             passphrase,
             backend)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_1
=
_get_stash
(
arg_3
,
arg_1
,
arg_2
)
try
:
click
.
echo
(
'Locking key...'
)
arg_1
.
lock
(
arg_0
=
arg_0
)
click
.
echo
(
'Key locked successfully'
)
except
GhostError
as
ex
:
sys
.
exit
(
ex
)

def Func(arg_0,
             arg_1,
             arg_2,
             arg_3):
    """Lock a key to prevent it from being deleted, purged or modified

    `KEY_NAME` is the name of the key to lock
    """
    arg_1 = _get_stash(arg_3, arg_1, arg_2)

    try:
        click.echo('Locking key...')
        arg_1.lock(arg_0=arg_0)
        click.echo('Key locked successfully')
    except GhostError as ex:
        sys.exit(ex)

Lock a key to prevent it from being deleted purged or modified


def Func(arg_0, arg_1):
        """
        Returns a new Fragment from a dictionary representation.
        """
        arg_2 = arg_0()
        arg_2.content = arg_1['content']
        arg_2._resources = [FragmentResource(**d) for d in arg_1['resources']]  # pylint: disable=protected-access
        arg_2.js_init_fn = arg_1['js_init_fn']
        arg_2.js_init_version = arg_1['js_init_version']
        arg_2.json_init_args = arg_1['json_init_args']
        return arg_2

Returns a new Fragment from a dictionary representation .


(self, response: aiohttp.client_reqrep.ClientResponse, await_final_result: bool)

async def Func(arg_0, arg_1: arg_2.client_reqrep.ClientResponse, arg_5: arg_6) -> dict:
        """
        Handles the response returned from the CloudStack API. Some CloudStack API are implemented asynchronous, which
        means that the API call returns just a job id. The actually expected API response is postponed and a specific
        asyncJobResults API has to be polled using the job id to get the final result once the API call has been
        processed.

        :param response: The response returned by the aiohttp call.
        :type response: aiohttp.client_reqrep.ClientResponse
        :param await_final_result: Specifier that indicates whether the function should poll the asyncJobResult API
                                   until the asynchronous API call has been processed
        :type await_final_result: bool
        :return: Dictionary containing the JSON response of the API call
        :rtype: dict
        """
        try:
            arg_7 = await arg_1.json()
        except arg_2.client_exceptions.ContentTypeError:
            arg_8 = await arg_1.text()
            logging.debug('Content returned by server not of type "application/json"\n Content: {}'.format(arg_8))
            raise CloudStackClientException(message="Could not decode content. Server did not return json content!")
        else:
            arg_7 = arg_0._transform_data(arg_7)
            if arg_1.status != 200:
                raise CloudStackClientException(message="Async CloudStack call failed!",
                                                error_code=arg_7.get("errorcode", arg_1.status),
                                                error_text=arg_7.get("errortext"),
                                                arg_1=arg_7)

        while arg_5 and ('jobid' in arg_7):
            await asyncio.sleep(arg_0.async_poll_latency)
            arg_7 = await arg_0.queryAsyncJobResult(jobid=arg_7['jobid'])
            if arg_7['jobstatus']:  # jobstatus is 0 for pending async CloudStack calls
                if not arg_7['jobresultcode']:  # exit code is zero
                    try:
                        return arg_7['jobresult']
                    except KeyError:
                        pass
                logging.debug("Async CloudStack call returned {}".format(str(arg_7)))
                raise CloudStackClientException(message="Async CloudStack call failed!",
                                                error_code=arg_7.get("errorcode"),
                                                error_text=arg_7.get("errortext"),
                                                arg_1=arg_7)

        return arg_7

Handles the response returned from the CloudStack API . Some CloudStack API are implemented asynchronous which means that the API call returns just a job id . The actually expected API response is postponed and a specific asyncJobResults API has to be polled using the job id to get the final result once the API call has been processed .


def Func ( arg_0 ) : arg_1 = { las . header . point_format_id for las in arg_0 } return len ( arg_1 ) == 1

def Func(arg_0):
    """ Returns true if all the files have the same points format id
    """
    arg_1 = {las.header.point_format_id for las in arg_0}
    return len(arg_1) == 1


(q, start=1, count=10, wait=10, asynchronous=False, cached=False)

return YahooSearch(q, start, count, service, None, wait, asynchronous, cached)

def Func(arg_0, arg_1=1, arg_2=10, arg_3=10, arg_4=False, arg_5=False):

    """ Returns a Yahoo news query formatted as a YahooSearch list object.
    """

    arg_6 = YAHOO_NEWS
    return YahooSearch(arg_0, arg_1, arg_2, arg_6, None, arg_3, arg_4, arg_5)

Returns a Yahoo news query formatted as a YahooSearch list object .


def Func ( arg_0 , arg_1 ) : if isinstance ( arg_0 , IAssociative ) : return arg_0 . Func ( arg_1 ) return arg_1 in arg_0

def Func(arg_0, arg_1):
    """Return true if o Func the key k."""
    if isinstance(arg_0, IAssociative):
        return arg_0.Func(arg_1)
    return arg_1 in arg_0


def
Func
(
arg_0
,
**
arg_1
)
:
arg_1
=
arg_1
.
copy
(
)
arg_1
.
setdefault
(
'warn'
,
False
)
arg_2
=
arg_1
.
pop
(
'report_error'
,
True
)
arg_3
=
arg_1
.
pop
(
'Funcner'
,
invoke_Func
)
try
:
return
arg_3
(
arg_0
,
**
arg_1
)
except
exceptions
.
Failure
as
exc
:
sys
.
stdout
.
flush
(
)
sys
.
stderr
.
flush
(
)
if
arg_2
:
notify
.
error
(
"Command `{}` failed with RC={}!"
.
format
(
arg_0
,
exc
.
result
.
return_code
,
)
)
raise
finally
:
sys
.
stdout
.
flush
(
)
sys
.
stderr
.
flush
(
)

def Func(arg_0, **arg_1):
    """Run a command and flush its output."""
    arg_1 = arg_1.copy()
    arg_1.setdefault('warn', False)  # make extra sure errors don't get silenced

    arg_2 = arg_1.pop('report_error', True)
    arg_3 = arg_1.pop('Funcner', invoke_Func)

    try:
        return arg_3(arg_0, **arg_1)
    except exceptions.Failure as exc:
        sys.stdout.flush()
        sys.stderr.flush()
        if arg_2:
            notify.error("Command `{}` failed with RC={}!".format(arg_0, exc.result.return_code,))
        raise
    finally:
        sys.stdout.flush()
        sys.stderr.flush()


return tf.math.expm1(-(tf.math.log(t) + tf.math.log(x)) / t)

def Func ( arg_0 , arg_1 ) : arg_1 = tf . cast ( arg_1 , arg_0 . power . dtype ) arg_2 = arg_0 . power - 1. return tf . math . expm1 ( - ( tf . math . log ( arg_2 ) + tf . math . log ( arg_1 ) ) / arg_2 )

def Func(arg_0, arg_1):
    """Inverse function of _hat_integral."""
    arg_1 = tf.cast(arg_1, arg_0.power.dtype)
    arg_2 = arg_0.power - 1.
    return tf.math.expm1(-(tf.math.log(arg_2) + tf.math.log(arg_1)) / arg_2)


def
Func
(
arg_0
,
arg_1
)
:
for
arg_2
,
arg_3
in
enumerate
(
arg_0
)
:
if
arg_3
==
arg_1
:
return
arg_2
else
:
raise
ValueError
(
'sequence.index(x): x not in sequence'
)

def Func(arg_0, arg_1):
    "Return the first index of b in a."
    for arg_2, arg_3 in enumerate(arg_0):
        if arg_3 == arg_1:
            return arg_2
    else:
        raise ValueError('sequence.index(x): x not in sequence')


def Func ( arg_0 , arg_1 , arg_2 = None , ** arg_3 ) : if arg_2 is None : arg_2 = arg_1 . name if arg_2 != arg_1 . name or arg_3 : arg_1 = copy . copy ( arg_1 ) arg_1 . name = arg_2 vars ( arg_1 ) . update ( arg_3 ) if not hasattr ( arg_1 , 'clients' ) : arg_1 . clients = cached_clients arg_0 . remote_apps [ arg_2 ] = arg_1 return arg_1

def Func(arg_0, arg_1, arg_2=None, **arg_3):
        """Adds remote application and applies custom attributes on it.

        If the application instance's name is different from the argument
        provided name, or the keyword arguments is not empty, then the
        application instance will not be modified but be copied as a
        prototype.

        :param remote_app: the remote application instance.
        :type remote_app: the subclasses of :class:`BaseApplication`
        :params kwargs: the overriding attributes for the application instance.
        """
        if arg_2 is None:
            arg_2 = arg_1.name
        if arg_2 != arg_1.name or arg_3:
            arg_1 = copy.copy(arg_1)
            arg_1.name = arg_2
            vars(arg_1).update(arg_3)
        if not hasattr(arg_1, 'clients'):
            arg_1.clients = cached_clients
        arg_0.remote_apps[arg_2] = arg_1
        return arg_1

Adds remote application and applies custom attributes on it .


def Func(arg_0, arg_1, arg_2=1):
        """
        Augment batches from a generator.

        Parameters
        ----------
        batches : generator of imgaug.augmentables.batches.Batch
            The batches to augment, provided as a generator. Each call to the generator should yield exactly one
            batch.

        chunksize : None or int, optional
            Rough indicator of how many tasks should be sent to each worker. Increasing this number can improve
            performance.

        Yields
        ------
        imgaug.augmentables.batches.Batch
            Augmented batch.

        """
        assert ia.is_generator(arg_1), ("Expected to get a generator as 'batches', got type %s. "
                                          + "Call map_batches() if you use lists.") % (type(arg_1),)
        # TODO change this to 'yield from' once switched to 3.3+
        arg_3 = arg_0.pool.imap(_Pool_starworker, arg_0._handle_batch_ids_gen(arg_1), arg_2=arg_2)
        for arg_4 in arg_3:
            yield arg_4


def Func ( arg_0 ) : with open ( arg_0 , 'r' ) as f : arg_1 = f . read ( ) return shlex . split ( arg_1 )

def Func(arg_0):
    '''Get environment path from redirect file'''

    with open(arg_0, 'r') as f:
        arg_1 = f.read()

    return shlex.split(arg_1)


(
        self,
        query_results: [QueryResult],
        turn_context: TurnContext,
        telemetry_properties: Dict[str,str] = None,
        telemetry_metrics: Dict[str,float] = None
    )

def Func(
        arg_0,
        arg_1: [arg_2],
        arg_3: arg_4,
        arg_5: arg_6[arg_7,arg_7] = None,
        arg_8: arg_6[arg_7,arg_9] = None
    ) -> EventData:
        """
        Fills the event properties and metrics for the QnaMessage event for telemetry.

        :return: A tuple of event data properties and metrics that will be sent to the BotTelemetryClient.track_event() method for the QnAMessage event. The properties and metrics returned the standard properties logged with any properties passed from the get_answers() method.

        :rtype: EventData
        """

        arg_10: arg_6[arg_7,arg_7] = dict()
        arg_11: arg_6[arg_7, arg_9] = dict()

        arg_10[arg_12.knowledge_base_id_property] = arg_0._endpoint.knowledge_base_id

        arg_14: arg_7 = arg_3.activity.text
        arg_15: arg_7 = arg_3.activity.from_property.name

        # Use the LogPersonalInformation flag to toggle logging PII data; text and username are common examples.
        if arg_0.log_personal_information:
            if arg_14:
                arg_10[arg_12.question_property] = arg_14

            if arg_15:
                arg_10[arg_12.username_property] = arg_15

        # Fill in Qna Results (found or not).
        if len(arg_1) > 0:
            arg_18 = arg_1[0]

            arg_19 = {
                arg_12.matched_question_property: json.dumps(arg_18.questions),
                arg_12.question_id_property: arg_7(arg_18.id),
                arg_12.answer_property: arg_18.answer,
                arg_12.score_metric: arg_18.score,
                arg_12.article_found_property: 'true'
            }

            arg_10.update(arg_19)
        else:
            arg_20 = {
                arg_12.matched_question_property : 'No Qna Question matched',
                arg_12.question_id_property : 'No Qna Question Id matched',
                arg_12.answer_property : 'No Qna Answer matched',
                arg_12.article_found_property : 'false'
            }

            arg_10.update(arg_20)

        # Additional Properties can override "stock" properties.
        if arg_5:
            arg_10.update(arg_5)

        # Additional Metrics can override "stock" metrics.
        if arg_8:
            arg_11.update(arg_8)

        return EventData(arg_10=arg_10, arg_11=arg_11)

Fills the event properties and metrics for the QnaMessage event for telemetry .


def
Func
(
arg_0
,
arg_1
=
False
)
:
if
arg_0
.
_has_content
(
)
:
arg_2
=
h2o
.
api
(
"GET /3/Frames/%s"
%
arg_0
.
frame_id
,
data
=
{
"row_count"
:
10
}
)
[
"frames"
]
[
0
]
arg_0
.
_ex
.
_cache
.
_fill_data
(
arg_2
)
print
(
"Rows:{}"
.
format
(
arg_0
.
nrow
)
)
print
(
"Cols:{}"
.
format
(
arg_0
.
ncol
)
)
if
arg_1
:
arg_2
[
"chunk_summary"
]
.
show
(
)
arg_2
[
"distribution_summary"
]
.
show
(
)
print
(
"\n"
)
arg_0
.
summary
(
)

def Func(arg_0, arg_1=False):
        """
        Generate an in-depth description of this H2OFrame.

        This will print to the console the dimensions of the frame; names/types/summary statistics for each column;
        and finally first ten rows of the frame.

        :param bool chunk_summary: Retrieve the chunk summary along with the distribution summary
        """
        if arg_0._has_content():
            arg_2 = h2o.api("GET /3/Frames/%s" % arg_0.frame_id, data={"row_count": 10})["frames"][0]
            arg_0._ex._cache._fill_data(arg_2)

            print("Rows:{}".format(arg_0.nrow))
            print("Cols:{}".format(arg_0.ncol))

            #The chunk & distribution summaries are not cached, so must be pulled if chunk_summary=True.
            if arg_1:
                arg_2["chunk_summary"].show()
                arg_2["distribution_summary"].show()
            print("\n")
        arg_0.summary()

Generate an in - depth description of this H2OFrame .


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

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

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

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

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

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


(self, path="", get_genmodel_jar=False, genmodel_name="")

return h2o.download_pojo(self, path, get_jar=get_genmodel_jar, jar_name=genmodel_name)

def Func ( arg_0 , arg_1 = "" , arg_2 = False , arg_3 = "" ) : assert_is_type ( arg_1 , str ) assert_is_type ( arg_2 , bool ) arg_1 = arg_1 . rstrip ( "/" ) return h2o . Func ( arg_0 , arg_1 , get_jar = arg_2 , jar_name = arg_3 )

def Func(arg_0, arg_1="", arg_2=False, arg_3=""):
        """
        Download the POJO for this model to the directory specified by path.

        If path is an empty string, then dump the output to screen.

        :param path:  An absolute path to the directory where POJO should be saved.
        :param get_genmodel_jar: if True, then also download h2o-genmodel.jar and store it in folder ``path``.
        :param genmodel_name Custom name of genmodel jar
        :returns: name of the POJO file written.
        """
        assert_is_type(arg_1, str)
        assert_is_type(arg_2, bool)
        arg_1 = arg_1.rstrip("/")
        return h2o.Func(arg_0, arg_1, get_jar=arg_2, jar_name=arg_3)

Download the POJO for this model to the directory specified by path .