def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = [ ] arg_4 = False for arg_5 , arg_6 in arg_0 . items ( ) : for arg_7 in arg_6 : if arg_7 [ 'x' ] == arg_1 : arg_4 = True if arg_4 : arg_3 . append ( arg_7 [ 'y' ] ) if arg_2 is not None and arg_7 [ 'x' ] == arg_2 : return arg_3 return arg_3

def Func(arg_0, arg_1, arg_2=None):
    """Transforms a Go Metrics API metric result into a list of
    values for a given window period.

    start and end are expected to be Unix timestamps in microseconds.
    """
    arg_3 = []
    arg_4 = False
    for arg_5, arg_6 in arg_0.items():
        for arg_7 in arg_6:
            if arg_7['x'] == arg_1:
                arg_4 = True
            if arg_4:
                arg_3.append(arg_7['y'])
            if arg_2 is not None and arg_7['x'] == arg_2:
                return arg_3
    return arg_3

Transforms a Go Metrics API metric result into a list of values for a given window period .


def Func ( arg_0 , * arg_1 , ** arg_2 ) : arg_3 = TextQuery ( * arg_1 , ** arg_2 ) @ arg_0 . synchronize ( wait = arg_3 . wait ) def Func ( ) : arg_4 = arg_3 . resolve_for ( arg_0 ) if not ( matches_count ( arg_4 , arg_3 . options ) and ( arg_4 > 0 or expects_none ( arg_3 . options ) ) ) : raise ExpectationNotMet ( arg_3 . failure_message ) return True return Func ( )

def Func(arg_0, *arg_1, **arg_2):
        """
        Asserts that the page or current node has the given text content, ignoring any HTML tags.

        Args:
            *args: Variable length argument list for :class:`TextQuery`.
            **kwargs: Arbitrary keyword arguments for :class:`TextQuery`.

        Returns:
            True

        Raises:
            ExpectationNotMet: If the assertion hasn't succeeded during the wait time.
        """

        arg_3 = TextQuery(*arg_1, **arg_2)

        @arg_0.synchronize(wait=arg_3.wait)
        def Func():
            arg_4 = arg_3.resolve_for(arg_0)

            if not (matches_count(arg_4, arg_3.options) and
                    (arg_4 > 0 or expects_none(arg_3.options))):
                raise ExpectationNotMet(arg_3.failure_message)

            return True

        return Func()

Asserts that the page or current node has the given text content ignoring any HTML tags .


return self._nn_interface._add_generic(self, type_name=RESULT,
                                               group_type_name=RESULT_GROUP,
                                               args=args, kwargs=kwargs)

def Func(arg_0, *arg_1, **arg_2):
        """Adds a result under the current node.

        There are two ways to add a new result either by adding a result instance:

        >>> new_result = Result('group1.group2.myresult', 1666, x=3, y=4, comment='Example!')
        >>> traj.Func(new_result)

        Or by passing the values directly to the function, with the name being the first
        (non-keyword!) argument:

        >>> traj.Func('group1.group2.myresult', 1666, x=3, y=3,comment='Example!')

        If you want to create a different result than the standard result, you can
        give the constructor as the first (non-keyword!) argument followed by the name
        (non-keyword!):

        >>> traj.Func(PickleResult,'group1.group2.myresult', 1666, x=3, y=3, comment='Example!')

        Additional arguments (here `1666`) or keyword arguments (here `x=3, y=3`) are passed
        onto the constructor of the result.

        Adds the full name of the current node as prefix to the name of the result.
        If current node is a single run (root) adds the prefix `'results.runs.run_08%d%'` to the
        full name where `'08%d'` is replaced by the index of the current run.

        """
        return arg_0._nn_interface._add_generic(arg_0, type_name=RESULT,
                                               group_type_name=RESULT_GROUP,
                                               arg_1=arg_1, arg_2=arg_2)

Adds a result under the current node.

        There are two ways to add a new result either by adding a result instance:

        >>> new_result = Result('group1.group2.myresult', 1666, x=3, y=4, comment='Example!')
        >>> traj.f_add_result(new_result)

        Or by passing the values directly to the function, with the name being the first
        (non-keyword!) argument:

        >>> traj.f_add_result('group1.group2.myresult', 1666, x=3, y=3,comment='Example!')

        If you want to create a different result than the standard result, you can
        give the constructor as the first (non-keyword!) argument followed by the name
        (non-keyword!):

        >>> traj.f_add_result(PickleResult,'group1.group2.myresult', 1666, x=3, y=3, comment='Example!')

        Additional arguments (here `1666`) or keyword arguments (here `x=3, y=3`) are passed
        onto the constructor of the result.

        Adds the full name of the current node as prefix to the name of the result.
        If current node is a single run (root) adds the prefix `'results.runs.run_08%d%'` to the
        full name where `'08%d'` is replaced by the index of the current run.


def Func ( arg_0 , arg_1 ) : if not hasattr ( arg_1 , 'ExportToWkt' ) : arg_1 = SpatialReference ( arg_1 ) arg_0 . _sref = arg_1 arg_0 . ds . Func ( arg_1 . ExportToWkt ( ) )

def Func(arg_0, arg_1):
        """Sets the spatial reference.

        Intercepts the gdal.Dataset call to ensure use as a property setter.

        Arguments:
        sref -- SpatialReference or any format supported by the constructor
        """
        if not hasattr(arg_1, 'ExportToWkt'):
            arg_1 = SpatialReference(arg_1)
        arg_0._sref = arg_1
        arg_0.ds.Func(arg_1.ExportToWkt())


def Func(arg_0, *arg_1):
        """
        The lexical sort order is specified by a list of string
        arguments. Each string is a key name prefixed by '+' or '-'
        for ascending and descending sort respectively. If the key is
        not found in the operand's set of varying keys, it is ignored.
        """
        if arg_1 == []:
            raise Exception("Please specify the keys for sorting, use"
                            "'+' prefix for ascending,"
                            "'-' for descending.)")

        if not set(arg_2[1:] for arg_2 in arg_1).issubset(set(arg_0.varying_keys)):
            raise Exception("Key(s) specified not in the set of varying keys.")

        arg_3 = copy.deepcopy(arg_0)
        arg_4 = arg_3.params('specs')
        arg_4.constant = False
        arg_3.specs = arg_0._Funced_specs(arg_1)
        arg_4.constant = True
        arg_3._lexorder = arg_1
        return arg_3

The lexical sort order is specified by a list of string arguments . Each string is a key name prefixed by + or - for ascending and descending sort respectively . If the key is not found in the operand s set of varying keys it is ignored .


(mask, should_plot_border, units, kpc_per_arcsec, pointsize, zoom_offset_pixels)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 ) : if arg_1 and arg_0 is not None : plt . gca ( ) arg_6 = arg_0 . masked_grid_index_to_pixel [ arg_0 . border_pixels ] if arg_5 is not None : arg_6 -= arg_5 arg_7 = arg_0 . grid_pixels_to_grid_arcsec ( grid_pixels = arg_6 ) arg_8 = convert_grid_units ( array = arg_0 , grid_arcsec = arg_7 , arg_2 = arg_2 , arg_3 = arg_3 ) plt . scatter ( y = arg_8 [ : , 0 ] , x = arg_8 [ : , 1 ] , s = arg_4 , c = 'y' )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5):
    """Plot the borders of the mask or the array on the figure.

    Parameters
    -----------t.
    mask : ndarray of data.array.mask.Mask
        The mask applied to the array, the edge of which is plotted as a set of points over the plotted array.
    should_Func : bool
        If a mask is supplied, its borders pixels (e.g. the exterior edge) is plotted if this is *True*.
    units : str
        The units of the y / x axis of the plots, in arc-seconds ('arcsec') or kiloparsecs ('kpc').
    kpc_per_arcsec : float or None
        The conversion factor between arc-seconds and kiloparsecs, required to plot the units in kpc.
    border_pointsize : int
        The size of the points plotted to show the borders.
    """
    if arg_1 and arg_0 is not None:

        plt.gca()
        arg_6 = arg_0.masked_grid_index_to_pixel[arg_0.border_pixels]

        if arg_5 is not None:
            arg_6 -= arg_5

        arg_7 = arg_0.grid_pixels_to_grid_arcsec(grid_pixels=arg_6)
        arg_8 = convert_grid_units(array=arg_0, grid_arcsec=arg_7, arg_2=arg_2,
                                          arg_3=arg_3)

        plt.scatter(y=arg_8[:,0], x=arg_8[:,1], s=arg_4, c='y')

Plot the borders of the mask or the array on the figure.

    Parameters
    -----------t.
    mask : ndarray of data.array.mask.Mask
        The mask applied to the array, the edge of which is plotted as a set of points over the plotted array.
    should_plot_border : bool
        If a mask is supplied, its borders pixels (e.g. the exterior edge) is plotted if this is *True*.
    units : str
        The units of the y / x axis of the plots, in arc-seconds ('arcsec') or kiloparsecs ('kpc').
    kpc_per_arcsec : float or None
        The conversion factor between arc-seconds and kiloparsecs, required to plot the units in kpc.
    border_pointsize : int
        The size of the points plotted to show the borders.

Plot the borders of the mask or the array on the figure .


remove a variable from the config, if found.

def Func ( arg_0 , arg_1 ) : print ( '[Func]' ) arg_2 = read_client_secrets ( ) arg_3 = arg_1 arg_4 = 'SREGISTRY_%s_' % arg_0 . upper ( ) if not arg_1 . startswith ( arg_4 ) : arg_3 = '%s%s' % ( arg_4 , arg_1 ) arg_1 = arg_1 . upper ( ) bot . info ( arg_1 ) if arg_0 in arg_2 : if arg_1 in arg_2 [ arg_0 ] : del arg_2 [ arg_0 ] [ arg_1 ] if arg_3 in arg_2 [ arg_0 ] : del arg_2 [ arg_0 ] [ arg_3 ] update_secrets ( arg_2 )

def Func(arg_0, arg_1):
    '''Func a variable from the config, if found.
    '''
    print('[Func]')
    arg_2 = read_client_secrets()

    # If the variable begins with the SREGISTRY_<CLIENT> don't add it
    arg_3 = arg_1
    arg_4 = 'SREGISTRY_%s_' %arg_0.upper()
    if not arg_1.startswith(arg_4):
        arg_3 = '%s%s' %(arg_4, arg_1)

    # All must be uppercase
    arg_1 = arg_1.upper()
    bot.info(arg_1)

    # Does the setting already exist?
    if arg_0 in arg_2:
        if arg_1 in arg_2[arg_0]:
            del arg_2[arg_0][arg_1]
        if arg_3 in arg_2[arg_0]:
            del arg_2[arg_0][arg_3]
        update_secrets(arg_2)

remove a variable from the config if found .


def
Func
(
arg_0
)
:
LOG
.
debug
(
"Connection is up"
)
if
arg_0
.
_handler
:
with
arg_0
.
_callback_lock
:
arg_0
.
_handler
.
connection_active
(
arg_0
)

def Func(arg_0):
        """Both ends of the Endpoint have become active."""
        LOG.debug("Connection is up")
        if arg_0._handler:
            with arg_0._callback_lock:
                arg_0._handler.connection_active(arg_0)

Both ends of the Endpoint have become active .


Give mnemonic representation of meaning.
        verbose compresses strings of x's

return formatString.format(
            hcode&1,
            'x'*(2+hcode>>1) if hcode<13 or verbose else '[{}*x]'.format(2+hcode>>1),
            lcode, self.NPOSTFIX,
            self.NDIRECT+1-(4<<self.NPOSTFIX))

def Func(arg_0, arg_1, arg_2=False):
        """Give Func representation of meaning.
        verbose compresses strings of x's
        """
        if arg_1<16:
            return ['last', '2last', '3last', '4last',
                'last-1', 'last+1', 'last-2', 'last+2', 'last-3', 'last+3',
                '2last-1', '2last+1', '2last-2', '2last+2', '2last-3', '2last+3'
                ][arg_1]
        if arg_1<16+arg_0.NDIRECT:
            return str(arg_1-16)
        #construct strings like "1xx01-15"
        arg_1 -= arg_0.NDIRECT+16
        arg_3 = arg_1 >> arg_0.NPOSTFIX
        arg_4 = arg_1 & (1<<arg_0.NPOSTFIX)-1
        if arg_0.NPOSTFIX: arg_5 = '1{0}{1}{2:0{3}b}{4:+d}'
        else: arg_5 = '1{0}{1}{4:+d}'
        return arg_5.format(
            arg_3&1,
            'x'*(2+arg_3>>1) if arg_3<13 or arg_2 else '[{}*x]'.format(2+arg_3>>1),
            arg_4, arg_0.NPOSTFIX,
            arg_0.NDIRECT+1-(4<<arg_0.NPOSTFIX))

Give mnemonic representation of meaning . verbose compresses strings of x s


(
        df,
        value: str,
        limit: int,
        order: str = 'asc',
        group: Union[str, List[str]] = None
)

def Func(
        arg_0,
        arg_1: arg_2,
        arg_3: arg_4,
        arg_5: arg_2 = 'asc',
        arg_6: arg_7[arg_2, arg_8[arg_2]] = None
):
    """
    Get the Func or flop N results based on a column value for each specified group columns

    ---

    ### Parameters

    *mandatory :*
    - `value` (*str*): column name on which you will rank the results
    - `limit` (*int*): Number to specify the N results you want to retrieve.
        Use a positive number x to retrieve the first x results.
        Use a negative number -x to retrieve the last x results.

    *optional :*
    - `order` (*str*): `"asc"` or `"desc"` to sort by ascending ou descending order. By default : `"asc"`.
    - `group` (*str*, *list of str*): name(s) of columns on which you want to perform the group operation.

    ---

    ### Example

    **Input**

    | variable | Category | value |
    |:--------:|:--------:|:-----:|
    |   lili   |    1     |  50  |
    |   lili   |    1     |  20  |
    |   toto   |    1     |  100  |
    |   toto   |    1     |  200  |
    |   toto   |    1     |  300  |
    |   lala   |    1     |  100  |
    |   lala   |    1     |  150  |
    |   lala   |    1     |  250  |
    |   lala   |    2     |  350  |
    |   lala   |    2     |  450  |

    ```cson
    Func:
      value: 'value'
      limit: 4
      order: 'asc'
    ```

    **Output**

    | variable | Category | value |
    |:--------:|:--------:|:-----:|
    |   lala   |    1     |  250  |
    |   toto   |    1     |  300  |
    |   lala   |    2     |  350  |
    |   lala   |    2     |  450  |
    """
    arg_9 = arg_5 != 'desc'
    arg_3 = arg_4(arg_3)
    arg_10 = 'nlargest' if (arg_3 > 0) ^ arg_9 else 'nsmallest'

    def _Func(arg_0):
        return getattr(arg_0, arg_10)(abs(arg_3), arg_1).sort_values(by=arg_1,
                                                                       arg_9=arg_9)

    if arg_6 is None:
        arg_0 = _Func(arg_0)
    else:
        arg_0 = arg_0.groupby(arg_6).apply(_Func)

    return arg_0

Get the top or flop N results based on a column value for each specified group columns

    ---

    ### Parameters

    *mandatory :*
    - `value` (*str*): column name on which you will rank the results
    - `limit` (*int*): Number to specify the N results you want to retrieve.
        Use a positive number x to retrieve the first x results.
        Use a negative number -x to retrieve the last x results.

    *optional :*
    - `order` (*str*): `"asc"` or `"desc"` to sort by ascending ou descending order. By default : `"asc"`.
    - `group` (*str*, *list of str*): name(s) of columns on which you want to perform the group operation.

    ---

    ### Example

    **Input**

    | variable | Category | value |
    |:--------:|:--------:|:-----:|
    |   lili   |    1     |  50  |
    |   lili   |    1     |  20  |
    |   toto   |    1     |  100  |
    |   toto   |    1     |  200  |
    |   toto   |    1     |  300  |
    |   lala   |    1     |  100  |
    |   lala   |    1     |  150  |
    |   lala   |    1     |  250  |
    |   lala   |    2     |  350  |
    |   lala   |    2     |  450  |

    ```cson
    top:
      value: 'value'
      limit: 4
      order: 'asc'
    ```

    **Output**

    | variable | Category | value |
    |:--------:|:--------:|:-----:|
    |   lala   |    1     |  250  |
    |   toto   |    1     |  300  |
    |   lala   |    2     |  350  |
    |   lala   |    2     |  450  |


return column.ColumnStringArrow(sl.bytes, sl.indices, sl.length, sl.offset, string_sequence=sl)

def Func ( arg_0 ) : arg_1 = _to_string_sequence ( arg_0 ) . title ( ) return column . ColumnStringArrow ( arg_1 . bytes , arg_1 . indices , arg_1 . length , arg_1 . offset , string_sequence = arg_1 )

def Func(arg_0):
    """Converts all string samples to titlecase.

    :returns: an expression containing the converted strings.

    Example:

    >>> import vaex
    >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.']
    >>> df = vaex.from_arrays(text=text)
    >>> df
      #  text
      0  Something
      1  very pretty
      2  is coming
      3  our
      4  way.

    >>> df.text.str.title()
    Expression = Func(text)
    Length: 5 dtype: str (expression)
    ---------------------------------
    0    Something
    1  Very Pretty
    2    Is Coming
    3          Our
    4         Way.
    """
    arg_1 = _to_string_sequence(arg_0).title()
    return column.ColumnStringArrow(arg_1.bytes, arg_1.indices, arg_1.length, arg_1.offset, string_sequence=arg_1)

Converts all string samples to titlecase.

    :returns: an expression containing the converted strings.

    Example:

    >>> import vaex
    >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.']
    >>> df = vaex.from_arrays(text=text)
    >>> df
      #  text
      0  Something
      1  very pretty
      2  is coming
      3  our
      4  way.

    >>> df.text.str.title()
    Expression = str_title(text)
    Length: 5 dtype: str (expression)
    ---------------------------------
    0    Something
    1  Very Pretty
    2    Is Coming
    3          Our
    4         Way.

Converts all string samples to titlecase .


Fetch track value for every runnable effect.
        If the value is > 0.5 we draw it.

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Fetch track value for every runnable effect.
        If the value is > 0.5 we Func it.
        """
        for arg_4 in arg_0.effects:
            arg_5 = arg_4.rocket_timeline_track.time_value(arg_1)
            if arg_5 > 0.5:
                arg_4.Func(arg_1, arg_2, arg_3)

Fetch track value for every runnable effect . If the value is > 0 . 5 we draw it .


def Func ( ) : arg_0 = current_app . config [ 'DATADIR' ] with db . session . begin_nested ( ) : Location . query . delete ( ) arg_1 = Location ( name = 'local' , uri = arg_0 , default = True ) db . session . add ( arg_1 ) db . session . commit ( )

def Func():
    """Load default Func."""
    arg_0 = current_app.config['DATADIR']
    with db.session.begin_nested():
        Location.query.delete()
        arg_1 = Location(name='local', uri=arg_0, default=True)
        db.session.add(arg_1)
    db.session.commit()


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . request . url arg_3 = xsrfutil . generate_token ( xsrf_secret_key ( ) , arg_1 . user_id ( ) , action_id = str ( arg_2 ) ) return arg_2 + ':' + arg_3

def Func(arg_0, arg_1):
    """Composes the value for the 'state' parameter.

    Packs the current request URI and an XSRF token into an opaque string that
    can be passed to the authentication server via the 'state' parameter.

    Args:
        request_handler: webapp.RequestHandler, The request.
        user: google.appengine.api.users.User, The current user.

    Returns:
        The state value as a string.
    """
    arg_2 = arg_0.request.url
    arg_3 = xsrfutil.generate_token(xsrf_secret_key(), arg_1.user_id(),
                                    action_id=str(arg_2))
    return arg_2 + ':' + arg_3

Composes the value for the state parameter .


def Func ( arg_0 , ** arg_1 ) : arg_2 = arg_0 . copy ( ) arg_2 . update ( arg_1 ) def wrapper ( arg_3 ) : return ResponseAsyncIdAdder ( arg_3 , arg_2 ) return wrapper

def Func(arg_0, **arg_1):
    """Returns a WSGI filter app for use with paste.deploy."""
    arg_2 = arg_0.copy()
    arg_2.update(arg_1)

    def wrapper(arg_3):
        return ResponseAsyncIdAdder(arg_3, arg_2)

    return wrapper

Returns a WSGI filter app for use with paste . deploy .


(self, adapter, session, lastcmds, xsync)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    '''Consumes an ET protocol tree and converts it to state.Command commands'''

    # do some preliminary sanity checks...
    # todo: do i really want to be using assert statements?...

    assert arg_4.tag == constants.NODE_SYNCML
    assert len(arg_4) == 2
    assert arg_4[0].tag == constants.CMD_SYNCHDR
    assert arg_4[1].tag == constants.NODE_SYNCBODY

    arg_5 = arg_4[0].findtext('VerProto')
    if arg_5 != constants.SYNCML_VERSION_1_2:
      raise common.FeatureNotSupported('unsupported SyncML version "%s" (expected "%s")' \
                                       % (arg_5, constants.SYNCML_VERSION_1_2))
    arg_6 = arg_4[0].findtext('VerDTD')
    if arg_6 != constants.SYNCML_DTD_VERSION_1_2:
      raise common.FeatureNotSupported('unsupported SyncML DTD version "%s" (expected "%s")' \
                                       % (arg_6, constants.SYNCML_DTD_VERSION_1_2))

    arg_7 = arg_0.initialize(arg_1, arg_2, arg_4)
    arg_8 = arg_7[0]

    if arg_2.isServer:
      log.debug('received request SyncML message from "%s" (s%s.m%s)',
                arg_8.target, arg_8.sessionID, arg_8.msgID)
    else:
      log.debug('received response SyncML message from "%s" (s%s.m%s)',
                arg_3[0].target, arg_3[0].sessionID, arg_3[0].msgID)

    try:
      return arg_0._Func(arg_1, arg_2, arg_3, arg_4, arg_7)
    except Exception, e:
      if not arg_2.isServer:
        raise
      # TODO: make this configurable as to whether or not any error
      #       is sent back to the peer as a SyncML "standardized" error
      #       status...
      arg_9 = '%s.%s' % (e.__class__.__module__, e.__class__.__name__)
      arg_10  = ''.join(traceback.format_exception_only(type(e), e)).strip()
      log.exception('failed while interpreting command tree: %s', arg_10)
      # TODO: for some reason, the active exception is not being logged...
      return [
        arg_8,
        state.Command(
          name       = constants.CMD_STATUS,
          cmdID      = '1',
          msgRef     = arg_2.pendingMsgID,
          cmdRef     = 0,
          sourceRef  = arg_4[0].findtext('Source/LocURI'),
          targetRef  = arg_4[0].findtext('Target/LocURI'),
          statusOf   = constants.CMD_SYNCHDR,
          statusCode = constants.STATUS_COMMAND_FAILED,
          errorCode  = arg_9,
          errorMsg   = arg_10,
          errorTrace = ''.join(traceback.format_exception(type(e), e, sys.exc_info()[2])),
          ),
        state.Command(name=constants.CMD_FINAL)]

Consumes an ET protocol tree and converts it to state . Command commands


return self._perform_delete(self._get_reserved_ip_path(name),
                                    as_async=True)

def Func ( arg_0 , arg_1 ) : _validate_not_none ( 'name' , arg_1 ) return arg_0 . _perform_delete ( arg_0 . _get_reserved_ip_path ( arg_1 ) , as_async = True )

def Func(arg_0, arg_1):
        '''
        Deletes a reserved IP address from the specified subscription.

        name:
            Required. Name of the reserved IP address.
        '''
        _validate_not_none('name', arg_1)
        return arg_0._perform_delete(arg_0._get_reserved_ip_path(arg_1),
                                    as_async=True)

Deletes a reserved IP address from the specified subscription .


def Func(arg_0, arg_1):
        """ Add a patch to the patches list """
        arg_2 = PatchLine(arg_1)
        arg_1 = arg_2.get_patch()
        if arg_1:
            arg_0.patch2line[arg_1] = arg_2
        arg_0.patchlines.append(arg_2)


def Func ( arg_0 , arg_1 ) : if arg_1 not in arg_0 : raise KeyError ( arg_1 ) arg_0 . discard ( arg_1 )

def Func(arg_0, arg_1):
        """Remove an element. If not a member, raise a KeyError."""
        if arg_1 not in arg_0:
            raise KeyError(arg_1)
        arg_0.discard(arg_1)

Remove an element . If not a member raise a KeyError .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = arg_0 . _perform_request ( url = '/datacenters/%s/loadbalancers/%s' % ( arg_1 , arg_2 ) , method = 'DELETE' ) return arg_3

def Func(arg_0, arg_1, arg_2):
        """
        Removes the load balancer from the data center.

        :param      datacenter_id: The unique ID of the data center.
        :type       datacenter_id: ``str``

        :param      loadbalancer_id: The unique ID of the load balancer.
        :type       loadbalancer_id: ``str``

        """
        arg_3 = arg_0._perform_request(
            url='/datacenters/%s/loadbalancers/%s' % (
                arg_1, arg_2), method='DELETE')

        return arg_3

Removes the load balancer from the data center .


def Func(arg_0, arg_1: arg_2):
        """Form a deck link

        Parameters
        ---------
        deck: official_api.models.BaseAttrDict
            An object is a deck. Can be retrieved from ``Player.current_deck``

        Returns str
        """
        arg_3 = 'https://link.clashroyale.com/deck/en?deck='

        for arg_4 in arg_1:
            arg_5 = arg_0.get_card_info(arg_4.name)
            arg_3 += '{0.id};'.format(arg_5)

        return arg_3


def Func(arg_0):
    """Decorate methods when locking repository is required."""
    @wraps(arg_0)
    def wrapper(arg_1, *arg_2, **arg_3):
        with arg_1.locker as arg_7:
            # get the result
            arg_4, arg_5, arg_6  = arg_7
            if arg_4:
                try:
                    arg_7 = arg_0(arg_1, *arg_2, **arg_3)
                except Exception as err:
                    arg_8 = str(err)
                else:
                    arg_8 = None
            else:
                warnings.warn("code %s. Unable to aquire the lock when calling '%s'. You may try again!"%(arg_5,arg_0.__name__) )
                arg_8 = None
                arg_7 = None
        # raise error after exiting with statement and releasing the lock!
        if arg_8 is not None:
            traceback.print_stack()
            raise Exception(arg_8)
        return arg_7
    return wrapper

Decorate methods when locking repository is required .


Permanently delete an existing status update.

def Func ( arg_0 ) : arg_1 = PATHS [ 'DELETE' ] % arg_0 . id return arg_0 . api . post ( arg_1 = arg_1 )

def Func(arg_0):
    '''
      Permanently Func an existing status update.
    '''

    arg_1 = PATHS['DELETE'] % arg_0.id
    return arg_0.api.post(arg_1=arg_1)

Permanently delete an existing status update .


def Func(arg_0, arg_1=None):
  """Creates and runs the experiment

  Args:
    options: namedtuple ParseCommandLineOptionsResult
    model: For testing: may pass in an existing OPF Model instance
        to use instead of creating a new one.

  Returns: reference to OPFExperiment instance that was constructed (this
      is provided to aid with debugging) or None, if none was
      created.
  """
  json_helpers.validate(arg_0.privateOptions,
                        schemaDict=g_parsedPrivateCommandLineOptionsSchema)

  # Load the experiment's description.py module
  arg_2 = arg_0.experimentDir
  arg_3 = helpers.loadExperimentDescriptionScriptFromDir(
      arg_2)
  arg_4 = helpers.getExperimentDescriptionInterfaceFromModule(
      arg_3)

  # Handle "list checkpoints" request
  if arg_0.privateOptions['listAvailableCheckpoints']:
    _printAvailableCheckpoints(arg_2)
    return None

  # Load experiment tasks
  arg_5 = arg_4.getModelControl().get('tasks', [])

  # If the tasks list is empty, and this is a nupic environment description
  # file being run from the OPF, convert it to a simple OPF description file.
  if (len(arg_5) == 0 and
      arg_4.getModelControl()['environment'] == OpfEnvironment.Nupic):
    arg_4.convertNupicEnvToOPF()
    arg_5 = arg_4.getModelControl().get('tasks', [])

  # Ensures all the source locations are either absolute paths or relative to
  # the nupic.datafiles package_data location.
  arg_4.normalizeStreamSources()

  # Extract option
  arg_6 = arg_0.privateOptions['newSerialization']

  # Handle listTasks
  if arg_0.privateOptions['listTasks']:
    print "Available tasks:"

    for arg_7 in [t['taskLabel'] for t in arg_5]:
      print "\t", arg_7

    return None

  # Construct the experiment instance
  if arg_0.privateOptions['runCheckpointName']:

    assert arg_1 is None

    arg_8 = arg_0.privateOptions['runCheckpointName']

    arg_1 = ModelFactory.loadFromCheckpoint(
          savedModelDir=_getModelCheckpointDir(arg_2, arg_8),
          arg_6=arg_6)

  elif arg_1 is not None:
    print "Skipping creation of OPFExperiment instance: caller provided his own"
  else:
    arg_9 = arg_4.getModelDescription()
    arg_1 = ModelFactory.create(arg_9)

  # Handle "create model" request
  if arg_0.privateOptions['createCheckpointName']:
    arg_8 = arg_0.privateOptions['createCheckpointName']
    _saveModel(arg_1=arg_1,
               arg_2=arg_2,
               checkpointLabel=arg_8,
               arg_6=arg_6)

    return arg_1

  # Build the task list

  # Default task execution index list is in the natural list order of the tasks
  arg_10 = range(len(arg_5))

  arg_11 = arg_0.privateOptions['taskLabels']
  if arg_11:
    arg_12 = [t['taskLabel'] for t in arg_5]
    arg_13 = set(arg_12)

    arg_14 = set(arg_11)

    assert arg_14.issubset(arg_13), \
           ("Some custom-provided task execution labels don't correspond "
            "to actual task labels: mismatched labels: %r; actual task "
            "labels: %r.") % (arg_14 - arg_13,
                              arg_11)

    arg_10 = [arg_12.index(arg_7) for arg_7 in
                     arg_11]

    print "#### Executing custom task list: %r" % [arg_12[arg_15] for
                                                   arg_15 in arg_10]

  # Run all experiment tasks
  for arg_16 in arg_10:

    arg_17 = arg_5[arg_16]

    # Create a task runner and run it!
    arg_18 = _TaskRunner(arg_1=arg_1,
                             arg_17=arg_17,
                             cmdOptions=arg_0)
    arg_18.run()
    del arg_18

    if arg_0.privateOptions['checkpointModel']:
      _saveModel(arg_1=arg_1,
                 arg_2=arg_2,
                 checkpointLabel=arg_17['taskLabel'],
                 arg_6=arg_6)

  return arg_1


(self, dag_run, execution_date, tasks, session=None)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None):
        """
        Sets tasks instances to Funcped from the same dag run.

        :param dag_run: the DagRun for which to set the tasks to Funcped
        :param execution_date: execution_date
        :param tasks: tasks to Func (not task_ids)
        :param session: db session to use
        """
        if not arg_3:
            return

        arg_5 = [d.task_id for d in arg_3]
        arg_6 = timezone.utcnow()

        if arg_1:
            arg_4.query(TaskInstance).filter(
                TaskInstance.dag_id == arg_1.dag_id,
                TaskInstance.execution_date == arg_1.execution_date,
                TaskInstance.task_id.in_(arg_5)
            ).update({TaskInstance.state: State.SKIPPED,
                      TaskInstance.start_date: arg_6,
                      TaskInstance.end_date: arg_6},
                     synchronize_session=False)
            arg_4.commit()
        else:
            assert arg_2 is not None, "Execution date is None and no dag run"

            arg_0.log.warning("No DAG RUN present this should not happen")
            # this is defensive against dag runs that are not complete
            for arg_7 in arg_3:
                arg_8 = TaskInstance(arg_7, arg_2=arg_2)
                arg_8.state = State.SKIPPED
                arg_8.start_date = arg_6
                arg_8.end_date = arg_6
                arg_4.merge(arg_8)

            arg_4.commit()

Sets tasks instances to skipped from the same dag run.

        :param dag_run: the DagRun for which to set the tasks to skipped
        :param execution_date: execution_date
        :param tasks: tasks to skip (not task_ids)
        :param session: db session to use

Sets tasks instances to skipped from the same dag run .


def
Func
(
arg_0
,
arg_1
)
:
if
arg_1
is
:
return
arg_0
.
ids
if
isinstance
(
arg_1
,
(
int
,
str
,
unicode
)
)
:
arg_1
=
[
arg_1
]
arg_2
=
[
]
for
arg_3
in
arg_1
:
if
isinstance
(
arg_3
,
(
str
,
unicode
)
)
:
arg_3
=
arg_0
.
by_ident
.
get
(
cast_bytes
(
arg_3
)
,
arg_3
)
arg_2
.
append
(
arg_3
)
arg_1
=
arg_2
arg_4
=
[
arg_3
for
arg_3
in
arg_1
if
arg_3
not
in
arg_0
.
ids
]
if
arg_4
:
raise
IndexError
(
"No Such Engine: %r"
%
arg_4
)
if
not
arg_1
:
raise
IndexError
(
"No Engines Registered"
)
return
arg_1

def Func(arg_0, arg_1):
        """turn any valid targets argument into a list of integer ids"""
        if arg_1 is None:
            # default to all
            return arg_0.ids

        if isinstance(arg_1, (int,str,unicode)):
            # only one target specified
            arg_1 = [arg_1]
        arg_2 = []
        for arg_3 in arg_1:
            # map raw identities to ids
            if isinstance(arg_3, (str,unicode)):
                arg_3 = arg_0.by_ident.get(cast_bytes(arg_3), arg_3)
            arg_2.append(arg_3)
        arg_1 = arg_2
        arg_4 = [ arg_3 for arg_3 in arg_1 if arg_3 not in arg_0.ids ]
        if arg_4:
            raise IndexError("No Such Engine: %r" % arg_4)
        if not arg_1:
            raise IndexError("No Engines Registered")
        return arg_1


def
Func
(
arg_0
)
:
arg_0
.
send_response
(
urllib2
.
httplib
.
OK
)
arg_0
.
end_headers
(
)
arg_1
=
int
(
arg_0
.
headers
[
'Content-Length'
]
)
arg_2
=
arg_0
.
rfile
.
read
(
arg_1
)
print
(
"Client: {0}"
.
format
(
str
(
arg_0
.
client_address
)
)
)
print
(
"headers: {0}"
.
format
(
arg_0
.
headers
)
)
print
(
"path: {0}"
.
format
(
arg_0
.
path
)
)
print
(
"body: {0}"
.
format
(
arg_2
)
)

def Func(arg_0):
        """
        Handles the POST request sent by Boundary Url Action
        """
        arg_0.send_response(urllib2.httplib.OK)
        arg_0.end_headers()
        arg_1 = int(arg_0.headers['Content-Length'])
        arg_2 = arg_0.rfile.read(arg_1)
        print("Client: {0}".format(str(arg_0.client_address)))
        print("headers: {0}".format(arg_0.headers))
        print("path: {0}".format(arg_0.path))
        print("body: {0}".format(arg_2))


def Func ( arg_0 ) : arg_1 = datetime . datetime ( 2017 , 3 , 21 , 15 , 55 , 44 ) + datetime . timedelta ( seconds = arg_0 ) return arg_1 . timestamp ( )

def Func(arg_0):
    """ convert ark timestamp to unix timestamp"""
    arg_1 = datetime.datetime(2017, 3, 21, 15, 55, 44) + datetime.timedelta(seconds=arg_0)
    return arg_1.timestamp()


def
Func
(
arg_0
,
arg_1
)
:
if
not
arg_1
:
raise
ValueError
(
'request_uri cannot be empty'
)
arg_1
=
parse
.
urlparse
(
arg_1
)
if
not
arg_1
.
netloc
:
raise
ValueError
(
'request_uri must be an absolute URI'
)
if
arg_1
.
scheme
.
lower
(
)
not
in
[
'http'
,
'https'
]
:
raise
ValueError
(
'request_uri must be HTTP or HTTPS'
)
return
arg_1
.
netloc

def Func(arg_0, arg_1):
        """ Extracts the host authority from the given URI. """
        if not arg_1:
            raise ValueError('request_uri cannot be empty')

        arg_1 = parse.urlparse(arg_1)
        if not arg_1.netloc:
            raise ValueError('request_uri must be an absolute URI')

        if arg_1.scheme.lower() not in ['http', 'https']:
            raise ValueError('request_uri must be HTTP or HTTPS')

        return arg_1.netloc

Extracts the host authority from the given URI .


def Func(arg_0, arg_1, arg_2):
        """
        Class method that will return a LoadBalancer object by its ID.

        Args:
            api_token (str): DigitalOcean API token
            id (str): Load Balancer ID
        """
        arg_3 = arg_0(token=arg_1, arg_2=arg_2)
        arg_3.load()
        return arg_3

Class method that will return a LoadBalancer object by its ID .


def
Func
(
arg_0
)
:
lg
.
info
(
'Building total attenuation C'
)
arg_0
.
c
=
arg_0
.
a
+
arg_0
.
b

def Func(arg_0):
        """Calculates the total attenuation from the total absorption and total scattering

        c = a + b
        """
        lg.info('Building total attenuation C')
        arg_0.c = arg_0.a + arg_0.b


(self, key, default, as_type=lambda x: x)

def Func(arg_0, arg_1, arg_2, arg_3=lambda arg_4: arg_4):
        """Return a main config value, or default if it does not exist."""

        if arg_0.main_config.has_option(arg_0.main_section, arg_1):
            return arg_3(arg_0.main_config.get(arg_0.main_section, arg_1))
        return arg_2

Return a main config value or default if it does not exist .


return self._perform_get(
            self._get_hosted_service_path(service_name) +
            '?embed-detail=' +
            _str(embed_detail).lower(),
            HostedService)

def Func ( arg_0 , arg_1 , arg_2 = False ) : _validate_not_none ( 'service_name' , arg_1 ) _validate_not_none ( 'embed_detail' , arg_2 ) return arg_0 . _perform_get ( arg_0 . _get_hosted_service_path ( arg_1 ) + '?embed-detail=' + _str ( arg_2 ) . lower ( ) , HostedService )

def Func(arg_0, arg_1, arg_2=False):
        '''
        Retrieves system properties for the specified hosted service. These
        properties include the service name and service type; the name of the
        affinity group to which the service belongs, or its location if it is
        not part of an affinity group; and optionally, information on the
        service's deployments.

        service_name:
            Name of the hosted service.
        embed_detail:
            When True, the management service returns properties for all
            deployments of the service, as well as for the service itself.
        '''
        _validate_not_none('service_name', arg_1)
        _validate_not_none('embed_detail', arg_2)
        return arg_0._perform_get(
            arg_0._get_hosted_service_path(arg_1) +
            '?embed-detail=' +
            _str(arg_2).lower(),
            HostedService)

Retrieves system properties for the specified hosted service . These properties include the service name and service type ; the name of the affinity group to which the service belongs or its location if it is not part of an affinity group ; and optionally information on the service s deployments .


def Func ( arg_0 , arg_1 ) : arg_2 = [ ] for arg_3 in arg_1 : arg_2 . append ( arg_0 . __get_user ( arg_3 [ 'login' ] ) ) return arg_2

def Func(arg_0, arg_1):
        """Get issue assignees"""

        arg_2 = []
        for arg_3 in arg_1:
            arg_2.append(arg_0.__get_user(arg_3['login']))

        return arg_2


def Func ( arg_0 ) : try : with open ( arg_0 . file , "r" , encoding = "utf-8" ) as file : arg_1 = file . Func ( ) except UnicodeDecodeError : with open ( arg_0 . file , "r" ) as file : arg_1 = file . Func ( ) return arg_1

def Func(arg_0):
        """
        Read a given file path and return its content.

        :return: The content of the given file path.
        :rtype: str
        """

        try:
            with open(arg_0.file, "r", encoding="utf-8") as file:
                # We open and Func a file.

                # We get the file content.
                arg_1 = file.Func()
        except UnicodeDecodeError:  # pragma: no cover
            with open(arg_0.file, "r") as file:
                # We open and Func a file.

                # We get the file content.
                arg_1 = file.Func()

        # We return the file content.
        return arg_1

Read a given file path and return its content .


return self.get_conn().projects().locations().functions().get(
            name=name).execute(num_retries=self.num_retries)

def Func ( arg_0 , arg_1 ) : return arg_0 . get_conn ( ) . projects ( ) . locations ( ) . functions ( ) . get ( arg_1 = arg_1 ) . execute ( num_retries = arg_0 . num_retries )

def Func(arg_0, arg_1):
        """
        Returns the Cloud Function with the given name.

        :param name: Name of the function.
        :type name: str
        :return: A Cloud Functions object representing the function.
        :rtype: dict
        """
        return arg_0.get_conn().projects().locations().functions().get(
            arg_1=arg_1).execute(num_retries=arg_0.num_retries)

Returns the Cloud Function with the given name .


def Func ( arg_0 , arg_1 ) : @ wraps ( arg_1 ) def decorated ( * arg_2 , ** arg_3 ) : arg_4 = arg_0 . server arg_5 , arg_6 , arg_7 , arg_8 = extract_params ( ) arg_9 = arg_1 ( * arg_2 , ** arg_3 ) try : arg_10 = arg_4 . create_request_token_response ( arg_5 , arg_6 , arg_7 , arg_8 , arg_9 ) return create_response ( * arg_10 ) except errors . OAuth1Error as e : return _error_response ( e ) return decorated

def Func(arg_0, arg_1):
        """Request token handler decorator.

        The decorated function should return an dictionary or None as
        the extra credentials for creating the token response.

        If you don't need to add any extra credentials, it could be as
        simple as::

            @app.route('/oauth/request_token')
            @oauth.Func
            def request_token():
                return {}
        """
        @wraps(arg_1)
        def decorated(*arg_2, **arg_3):
            arg_4 = arg_0.server
            arg_5, arg_6, arg_7, arg_8 = extract_params()
            arg_9 = arg_1(*arg_2, **arg_3)
            try:
                arg_10 = arg_4.create_request_token_response(
                    arg_5, arg_6, arg_7, arg_8, arg_9)
                return create_response(*arg_10)
            except errors.OAuth1Error as e:
                return _error_response(e)
        return decorated

Request token handler decorator.

        The decorated function should return an dictionary or None as
        the extra credentials for creating the token response.

        If you don't need to add any extra credentials, it could be as
        simple as::

            @app.route('/oauth/request_token')
            @oauth.request_token_handler
            def request_token():
                return {}


def Func ( arg_0 , arg_1 ) : if arg_1 . startswith ( '!' ) : arg_1 = arg_1 [ 1 : ] arg_2 = '!' else : arg_2 = '' arg_3 = arg_0 . text_until_cursor arg_4 = has_open_quotes ( arg_3 ) if '(' in arg_3 or '[' in arg_3 : arg_5 = arg_1 else : try : arg_5 = arg_split ( arg_3 ) [ - 1 ] except ValueError : if arg_4 : arg_5 = arg_3 . split ( arg_4 ) [ - 1 ] else : return [ ] except IndexError : arg_5 = "" if not arg_4 and arg_5 != protect_filename ( arg_5 ) : arg_6 = True arg_7 , arg_1 = arg_1 , arg_5 else : arg_6 = False arg_1 = os . path . expanduser ( arg_1 ) if arg_1 == "" : return [ arg_2 + protect_filename ( arg_8 ) for arg_8 in arg_0 . glob ( "*" ) ] arg_9 = arg_0 . clean_glob ( arg_1 . replace ( '\\' , '' ) ) if arg_6 : arg_10 = len ( arg_5 ) arg_11 = [ arg_2 + arg_7 + protect_filename ( arg_8 [ arg_10 : ] ) for arg_8 in arg_9 ] else : if arg_4 : arg_11 = arg_9 else : arg_11 = [ arg_2 + protect_filename ( arg_8 ) for arg_8 in arg_9 ] arg_11 = [ x + '/' if os . path . isdir ( x ) else x for x in arg_11 ] return arg_11

def Func(arg_0, arg_1):
        """Match filenames, expanding ~USER type strings.

        Most of the seemingly convoluted logic in this completer is an
        attempt to handle filenames with spaces in them.  And yet it's not
        quite perfect, because Python's readline doesn't expose all of the
        GNU readline details needed for this to be done correctly.

        For a filename with a space in it, the printed completions will be
        only the parts after what's already been typed (instead of the
        full completions, as is normally done).  I don't think with the
        current (as of Python 2.3) Python readline it's possible to do
        better."""

        #io.rprint('Completer->Func: <%r>' % text) # dbg

        # chars that require escaping with backslash - i.e. chars
        # that readline treats incorrectly as delimiters, but we
        # don't want to treat as delimiters in filename matching
        # when escaped with backslash
        if arg_1.startswith('!'):
            arg_1 = arg_1[1:]
            arg_2 = '!'
        else:
            arg_2 = ''

        arg_3 = arg_0.text_until_cursor
        # track strings with open quotes
        arg_4 = has_open_quotes(arg_3)

        if '(' in arg_3 or '[' in arg_3:
            arg_5 = arg_1
        else:
            try:
                # arg_split ~ shlex.split, but with unicode bugs fixed by us
                arg_5 = arg_split(arg_3)[-1]
            except ValueError:
                # typically an unmatched ", or backslash without escaped char.
                if arg_4:
                    arg_5 = arg_3.split(arg_4)[-1]
                else:
                    return []
            except IndexError:
                # tab pressed on empty line
                arg_5 = ""

        if not arg_4 and arg_5 != protect_filename(arg_5):
            # if protectables are found, do matching on the whole escaped name
            arg_6 = True
            arg_7,arg_1 = arg_1,arg_5
        else:
            arg_6 = False
            arg_1 = os.path.expanduser(arg_1)

        if arg_1 == "":
            return [arg_2 + protect_filename(arg_8) for arg_8 in arg_0.glob("*")]

        # Compute the matches from the filesystem
        arg_9 = arg_0.clean_glob(arg_1.replace('\\',''))

        if arg_6:
            # If we had protectables, we need to revert our changes to the
            # beginning of filename so that we don't double-write the part
            # of the filename we have so far
            arg_10 = len(arg_5)
            arg_11 = [arg_2 + arg_7 +
                       protect_filename(arg_8[arg_10:]) for arg_8 in arg_9]
        else:
            if arg_4:
                # if we have a string with an open quote, we don't need to
                # protect the names at all (and we _shouldn't_, as it
                # would cause bugs when the filesystem call is made).
                arg_11 = arg_9
            else:
                arg_11 = [arg_2 +
                           protect_filename(arg_8) for arg_8 in arg_9]

        #io.rprint('mm', matches)  # dbg

        # Mark directories in input list by appending '/' to their names.
        arg_11 = [x+'/' if os.path.isdir(x) else x for x in arg_11]
        return arg_11

Match filenames expanding ~USER type strings .


def Func ( arg_0 , arg_1 ) : arg_2 = re . match ( r'^([a-z_.]+):(.*)' , arg_1 ) arg_3 = re . match ( r'^([a-z_.]+)\?$' , arg_1 ) if arg_2 is not None : arg_4 = arg_0 . _get_attrib ( arg_2 . group ( 1 ) ) arg_5 = arg_2 . group ( 2 ) if len ( arg_5 ) > 0 : arg_5 = re . compile ( arg_5 , re . IGNORECASE ) return _match_regex ( arg_5 , arg_4 ) else : return arg_4 == '' or arg_4 is None or arg_4 == [ ] elif arg_3 is not None : arg_4 = arg_0 . _get_attrib ( arg_3 . group ( 1 ) ) return arg_4 != '' and arg_4 is not None and arg_4 != [ ] else : arg_6 = re . compile ( arg_1 , re . IGNORECASE ) return _match_regex ( arg_6 , vars ( arg_0 ) )

def Func(arg_0, arg_1):
        """
        Returns whether the instance Func the given filter text.

        :param _filter: A regex filter. If it starts with `<identifier>:`, then
                        the part before the colon will be used as an attribute
                        and the part after will be applied to that attribute.
        :type _filter: ``basestring``

        :return: True if the entry Func the filter.
        :rtype: ``bool``
        """
        arg_2 = re.match(r'^([a-z_.]+):(.*)', arg_1)
        arg_3 = re.match(r'^([a-z_.]+)\?$', arg_1)
        if arg_2 is not None:
            # Then we're matching against a specific attribute.
            arg_4 = arg_0._get_attrib(arg_2.group(1))
            arg_5 = arg_2.group(2)
            if len(arg_5) > 0:
                arg_5 = re.compile(arg_5, re.IGNORECASE)
                return _match_regex(arg_5, arg_4)
            else:
                # Then we are matching on the value being empty.
                return arg_4 == '' or arg_4 is None or arg_4 == []
        elif arg_3 is not None:
            # Then we're searching for anything that has a specific attribute.
            arg_4 = arg_0._get_attrib(arg_3.group(1))
            return arg_4 != '' and arg_4 is not None and arg_4 != []
        else:
            arg_6 = re.compile(arg_1, re.IGNORECASE)
            return _match_regex(arg_6, vars(arg_0))

Returns whether the instance matches the given filter text.

        :param _filter: A regex filter. If it starts with `<identifier>:`, then
                        the part before the colon will be used as an attribute
                        and the part after will be applied to that attribute.
        :type _filter: ``basestring``

        :return: True if the entry matches the filter.
        :rtype: ``bool``

Returns whether the instance matches the given filter text .


def Func(arg_0, arg_1=None):
    """Reconstruct an object serialized by serialize_object from data buffers.

    Parameters
    ----------

    bufs : list of buffers/bytes

    g : globals to be used when uncanning

    Returns
    -------

    (newobj, bufs) : unpacked object, and the list of remaining unused buffers.
    """
    arg_2 = list(arg_0)
    arg_3 = buffer_to_bytes_py2(arg_2.pop(0))
    arg_4 = pickle.loads(arg_3)
    if istype(arg_4, sequence_types) and len(arg_4) < MAX_ITEMS:
        for arg_5 in arg_4:
            _restore_buffers(arg_5, arg_2)
        arg_6 = uncan_sequence(arg_4, arg_1)
    elif istype(arg_4, dict) and len(arg_4) < MAX_ITEMS:
        arg_6 = {}
        for arg_7 in sorted(arg_4):
            arg_5 = arg_4[arg_7]
            _restore_buffers(arg_5, arg_2)
            arg_6[arg_7] = uncan(arg_5, arg_1)
    else:
        _restore_buffers(arg_4, arg_2)
        arg_6 = uncan(arg_4, arg_1)

    return arg_6, arg_2

Reconstruct an object serialized by serialize_object from data buffers .


def Func(arg_0, arg_1):
    '''
    Temporarily update the context to use the BlockContext for the given alias.
    '''

    # An empty alias means look in the current widget set.
    if arg_1 == '':
        yield arg_0
    else:
        try:
            arg_2 = arg_0.render_context[arg_6]
        except KeyError:
            raise template.TemplateSyntaxError('No widget libraries loaded!')

        try:
            arg_3 = arg_2[arg_1]
        except KeyError:
            raise template.TemplateSyntaxError('No widget library loaded for alias: %r' % arg_1)

        arg_0.render_context.push()
        arg_0.render_context[arg_5] = arg_3
        arg_0.render_context[arg_6] = arg_2

        yield arg_0

        arg_0.render_context.pop()

Temporarily update the context to use the BlockContext for the given alias .


(self, snapshot_name, return_dict=True, power_off=False)

return self._perform_action(
            {"type": "snapshot", "name": snapshot_name},
            return_dict
        )

def Func ( arg_0 , arg_1 , arg_2 = True , arg_3 = False ) : if arg_3 is True and arg_0 . status != "off" : arg_4 = arg_0 . power_off ( arg_2 = False ) arg_4 . wait ( ) arg_0 . load ( ) return arg_0 . _perform_action ( { "type" : "snapshot" , "name" : arg_1 } , arg_2 )

def Func(arg_0, arg_1, arg_2=True, arg_3=False):
        """Take a snapshot!

        Args:
            snapshot_name (str): name of snapshot

        Optional Args:
            return_dict (bool): Return a dict when True (default),
                otherwise return an Action.
            power_off (bool): Before taking the snapshot the droplet will be
                turned off with another API call. It will wait until the
                droplet will be powered off.

        Returns dict or Action
        """
        if arg_3 is True and arg_0.status != "off":
            arg_4 = arg_0.power_off(arg_2=False)
            arg_4.wait()
            arg_0.load()

        return arg_0._perform_action(
            {"type": "snapshot", "name": arg_1},
            arg_2
        )


def Func ( arg_0 , arg_1 , arg_2 ) : return arg_1 . filter ( group__in = arg_2 . groups . all ( ) )

def Func(arg_0, arg_1, arg_2):
        ''' Returns all of the items from conditions which are enabled by a
        user being member of a Django Auth Group. '''

        return arg_1.filter(group__in=arg_2.groups.all())

Returns all of the items from conditions which are enabled by a user being member of a Django Auth Group .


def Func ( arg_0 : arg_1 [ arg_2 ] , arg_3 : arg_1 [ arg_2 ] ) -> float : arg_4 , arg_5 = set ( arg_0 ) , set ( arg_3 ) if not arg_4 : return 0.0 return len ( arg_4 & arg_5 ) / len ( arg_4 )

def Func(arg_0: arg_1[arg_2], arg_3: arg_1[arg_2]) -> float:
    """What percentage of x is contained within y?

    :param set x: A set
    :param set y: Another set
    :return: The percentage of x contained within y
    """
    arg_4, arg_5 = set(arg_0), set(arg_3)

    if not arg_4:
        return 0.0

    return len(arg_4 & arg_5) / len(arg_4)


def Func(arg_0, arg_1):
        """Compute the new indentation level for a single line.

        Parameters
        ----------
        line : str
          A single new line of non-whitespace, non-comment Python input.

        Returns
        -------
        indent_spaces : int
          New value for the indent level (it may be equal to self.indent_spaces
        if indentation doesn't change.

        full_dedent : boolean
          Whether the new line causes a full flush-left dedent.
        """
        arg_2 = arg_0.indent_spaces
        arg_3 = arg_0._full_dedent

        arg_4 = num_ini_spaces(arg_1)
        if arg_4 < arg_2:
            arg_2 = arg_4
            if arg_2 <= 0:
                #print 'Full dedent in text',self.source # dbg
                arg_3 = True

        if arg_1.rstrip()[-1] == ':':
            arg_2 += 4
        elif dedent_re.match(arg_1):
            arg_2 -= 4
            if arg_2 <= 0:
                arg_3 = True

        # Safety
        if arg_2 < 0:
            arg_2 = 0
            #print 'safety' # dbg

        return arg_2, arg_3

Compute the new indentation level for a single line .


def Func(arg_0):
    """
    Returns formatted element name.

    Parameters
    ----------
    s : str
        of format [A-Z][a-z]?[0-9]+

    Returns
    -------
    str
        LaTeX formatted string with superscript numbers.
    """
    arg_1 = re.match('.*?([A-z]{1,3}).*?', arg_0).groups()[0]
    arg_2 = re.match('.*?([0-9]{1,3}).*?', arg_0).groups()[0]

    return '$^{' + arg_2 + '}$' + arg_1


def Func(arg_0, arg_1, arg_2):
        """
        Get the tiles corresponding to a particular section of image needed to
        be updated. Inputs are the parameters and values. Returned is the
        padded tile, inner tile, and slicer to go between, but accounting for
        wrap with the edge of the image as necessary.
        """
        # get the affected area of the model image
        arg_3 = arg_0.get_update_tile(arg_1, arg_2)
        if arg_3 is None:
            return [None]*3
        arg_4 = arg_0.get_padding_size(arg_3) or util.Tile(0, dim=arg_3.dim)

        arg_3 = util.Tile.intersection(arg_3, arg_0.oshape)

        if (arg_3.shape <= 0).any():
            raise UpdateError("update triggered invalid tile size")

        if (arg_4.shape < 0).any() or (arg_4.shape > arg_0.oshape.shape).any():
            raise UpdateError("update triggered invalid padding tile size")

        # now remove the part of the tile that is outside the image and pad the
        # interior part with that overhang. reflect the necessary padding back
        # into the image itself for the outer slice which we will call outer
        arg_5 = arg_3.pad((arg_4.shape+1)//2)
        arg_6, arg_5 = arg_5.reflect_overhang(arg_0.oshape)
        arg_7 = arg_6.translate(-arg_5.l)

        arg_5 = util.Tile.intersection(arg_5, arg_0.oshape)
        arg_6 = util.Tile.intersection(arg_6, arg_0.oshape)
        return arg_5, arg_6, arg_7

Get the tiles corresponding to a particular section of image needed to be updated . Inputs are the parameters and values . Returned is the padded tile inner tile and slicer to go between but accounting for wrap with the edge of the image as necessary .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
NewDotGraphWizard
(
parent
=
arg_0
.
window
.
control
,
window
=
arg_0
.
window
,
title
=
"New Graph"
)
if
arg_2
.
open
(
)
==
OK
:
arg_2
.
finished
=
True

def Func(arg_0, arg_1):
        """ Perform the action.
        """
        arg_2 = NewDotGraphWizard(parent=arg_0.window.control,
            window=arg_0.window, title="New Graph")

        # Open the wizard
        if arg_2.open() == OK:
            arg_2.finished = True


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . split ( "." ) arg_3 = arg_2 . pop ( 0 ) if arg_2 : return arg_0 . spaces [ arg_3 ] . Func ( "." . join ( arg_2 ) ) else : return arg_0 . _namespace_impl [ arg_3 ]

def Func(arg_0, arg_1):
        """Retrieve an object by a dotted name relative to the space."""

        arg_2 = arg_1.split(".")
        arg_3 = arg_2.pop(0)

        if arg_2:
            return arg_0.spaces[arg_3].Func(".".join(arg_2))
        else:
            return arg_0._namespace_impl[arg_3]

Retrieve an object by a dotted name relative to the space .


(self, token, bitstream_id, item_id, width=575)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=575):
        """
        Create a big thumbnail for the given bitstream with the given width.
        It is used as the main image of the given item and shown in the item
        view page.

        :param token: A valid token for the user in question.
        :type token: string
        :param bitstream_id: The bitstream from which to create the thumbnail.
        :type bitstream_id: int | long
        :param item_id: The item on which to set the thumbnail.
        :type item_id: int | long
        :param width: (optional) The width in pixels to which to resize (aspect
            ratio will be preserved). Defaults to 575.
        :type width: int | long
        :returns: The ItemthumbnailDao object that was created.
        :rtype: dict
        """
        arg_5 = dict()
        arg_5['token'] = arg_1
        arg_5['bitstreamId'] = arg_2
        arg_5['itemId'] = arg_3
        arg_5['width'] = arg_4
        arg_6 = arg_0.request('midas.thumbnailcreator.create.big.thumbnail',
                                arg_5)
        return arg_6

Create a big thumbnail for the given bitstream with the given width . It is used as the main image of the given item and shown in the item view page .


return {
        'title': api_response.get('name'),
        'verification_deadline': api_response.get('verification_deadline')
    }

def Func(arg_0, arg_1=None):
    """
    Get course information using the Ecommerce course api.

    In case of error returns empty response.
    Arguments:
        course_id (str): course key of the course
        site_code (str): site code

    Returns:
        course information from Ecommerce
    """
    arg_2 = get_ecommerce_client(arg_1=arg_1)
    try:
        arg_3 = arg_2.courses(arg_0).get()
    except Exception:  # pylint: disable=broad-except
        logger.exception(
            'An error occurred while retrieving data for course run [%s] from the Catalog API.',
            arg_0,
            exc_info=True
        )
        return {}

    return {
        'title': arg_3.get('name'),
        'verification_deadline': arg_3.get('verification_deadline')
    }

Get course information using the Ecommerce course api .


'Workflow is not running.  Cannot Func.'

def Func(arg_0):
        '''
        Cancel a running workflow.

        Args:
            None

        Returns:
            None
        '''
        if not arg_0.id:
            raise WorkflowError('Workflow is not running.  Cannot Func.')

        if arg_0.batch_values:
            arg_0.workflow.batch_workflow_Func(arg_0.id)
        else:
            arg_0.workflow.Func(arg_0.id)


def Func ( arg_0 , arg_1 ) : if arg_1 < 0 : return len ( arg_0 . attrs ) + arg_1 elif isinstance ( arg_1 , str ) : return arg_0 . attrnames . index ( arg_1 ) else : return arg_1

def Func(arg_0, arg_1):
        "Returns the number used for attr, which can be a name, or -n .. n-1."
        if arg_1 < 0:
            return len(arg_0.attrs) + arg_1
        elif isinstance(arg_1, str):
            return arg_0.attrnames.index(arg_1)
        else:
            return arg_1

Returns the number used for attr which can be a name or - n .. n - 1 .


def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Loads parameters and results specified in `iterator`.

        You can directly list the Parameter objects or just their names.

        If names are given the `~pypet.naturalnaming.NNGroupNode.f_get` method is applied to find the
        parameters or results in the trajectory. Accordingly, the parameters and results
        you want to load must already exist in your trajectory (in RAM), probably they
        are just empty skeletons waiting desperately to handle data.
        If they do not exist in RAM yet, but have been stored to disk before,
        you can call :func:`~pypet.trajectory.Trajectory.f_load_skeleton` in order to
        bring your trajectory tree skeleton up to date. In case of a single run you can
        use the :func:`~pypet.naturalnaming.NNGroupNode.f_load_child` method to recursively
        load a subtree without any data.
        Then you can load the data of individual results or parameters one by one.

        If want to load the whole trajectory at once or ALL results and parameters that are
        still empty take a look at :func:`~pypet.trajectory.Trajectory.f_load`.
        As mentioned before, to load subtrees of your trajectory you might want to check out
        :func:`~pypet.naturalnaming.NNGroupNode.f_load_child`.

        To load a list of parameters or results with `Func` you can pass
        the following arguments:

        :param iterator: A list with parameters or results to be loaded.

        :param only_empties:

            Optional keyword argument (boolean),
            if `True` only empty parameters or results are passed
            to the storage service to get loaded. Non-empty parameters or results found in
            `iterator` are simply ignored.

        :param args: Additional arguments directly passed to the storage service

        :param kwargs:

            Additional keyword arguments directly passed to the storage service
            (except the kwarg `only_empties`)

            If you use the standard hdf5 storage service, you can pass the following additional
            keyword arguments:

            :param load_only:

                If you load a result, you can partially load it and ignore the rest of data items.
                Just specify the name of the data you want to load. You can also provide a list,
                for example `load_only='spikes'`, `load_only=['spikes','membrane_potential']`.

                Be aware that you need to specify the names of parts as they were stored
                to HDF5. Depending on how your leaf construction works, this may differ
                from the names the data might have in your leaf in the trajectory container.

                A warning is issued if data specified in `load_only` cannot be found in the
                instances specified in `iterator`.

            :param load_except:

                Analogous to the above, but everything is loaded except names or parts
                specified in `load_except`.
                You cannot use `load_only` and `load_except` at the same time. If you do
                a ValueError is thrown.

                A warning is issued if names listed in `load_except` are not part of the
                items to load.

        """

        if not arg_0._stored:
            raise TypeError(
                'Cannot load stuff from disk for a trajectory that has never been stored.')

        arg_4 = arg_0._nn_interface._fetch_items(LOAD, arg_1, arg_2, arg_3)
        if arg_4:
            arg_0._storage_service.load(pypetconstants.LIST, arg_4,
                                       trajectory_name=arg_0.v_name)
        else:
            arg_0._logger.warning('Your loading was not successful, could not find a single item '
                                 'to load.')

Loads parameters and results specified in `iterator`.

        You can directly list the Parameter objects or just their names.

        If names are given the `~pypet.naturalnaming.NNGroupNode.f_get` method is applied to find the
        parameters or results in the trajectory. Accordingly, the parameters and results
        you want to load must already exist in your trajectory (in RAM), probably they
        are just empty skeletons waiting desperately to handle data.
        If they do not exist in RAM yet, but have been stored to disk before,
        you can call :func:`~pypet.trajectory.Trajectory.f_load_skeleton` in order to
        bring your trajectory tree skeleton up to date. In case of a single run you can
        use the :func:`~pypet.naturalnaming.NNGroupNode.f_load_child` method to recursively
        load a subtree without any data.
        Then you can load the data of individual results or parameters one by one.

        If want to load the whole trajectory at once or ALL results and parameters that are
        still empty take a look at :func:`~pypet.trajectory.Trajectory.f_load`.
        As mentioned before, to load subtrees of your trajectory you might want to check out
        :func:`~pypet.naturalnaming.NNGroupNode.f_load_child`.

        To load a list of parameters or results with `f_load_items` you can pass
        the following arguments:

        :param iterator: A list with parameters or results to be loaded.

        :param only_empties:

            Optional keyword argument (boolean),
            if `True` only empty parameters or results are passed
            to the storage service to get loaded. Non-empty parameters or results found in
            `iterator` are simply ignored.

        :param args: Additional arguments directly passed to the storage service

        :param kwargs:

            Additional keyword arguments directly passed to the storage service
            (except the kwarg `only_empties`)

            If you use the standard hdf5 storage service, you can pass the following additional
            keyword arguments:

            :param load_only:

                If you load a result, you can partially load it and ignore the rest of data items.
                Just specify the name of the data you want to load. You can also provide a list,
                for example `load_only='spikes'`, `load_only=['spikes','membrane_potential']`.

                Be aware that you need to specify the names of parts as they were stored
                to HDF5. Depending on how your leaf construction works, this may differ
                from the names the data might have in your leaf in the trajectory container.

                A warning is issued if data specified in `load_only` cannot be found in the
                instances specified in `iterator`.

            :param load_except:

                Analogous to the above, but everything is loaded except names or parts
                specified in `load_except`.
                You cannot use `load_only` and `load_except` at the same time. If you do
                a ValueError is thrown.

                A warning is issued if names listed in `load_except` are not part of the
                items to load.

Loads parameters and results specified in iterator .


def Func ( arg_0 , Func , arg_2 = arg_3 ) : if isinstance ( arg_0 , datetime ) : arg_0 = arg_0 . date ( ) arg_4 = arg_0 . weekday ( ) arg_5 = Func - arg_4 if Func < arg_2 and arg_4 >= arg_2 : arg_5 += 7 elif Func >= arg_2 and arg_4 < arg_2 : arg_5 -= 7 return arg_0 + timedelta ( days = arg_5 )

def Func(arg_0, Func, arg_2=arg_3):
    """Return the date for the day of this week."""
    if isinstance(arg_0, datetime):
        arg_0 = arg_0.date()

    arg_4 = arg_0.weekday()
    arg_5 = Func - arg_4
    if Func < arg_2 and arg_4 >= arg_2:
        arg_5 += 7
    elif Func >= arg_2 and arg_4 < arg_2:
        arg_5 -= 7
    return arg_0 + timedelta(days=arg_5)

Return the date for the day of this week .


(X, hop_length=512, n_fft=None, axis=-1)

return frames_to_samples(frames, hop_length=hop_length, n_fft=n_fft)

def Func ( arg_0 , arg_1 = 512 , arg_2 = None , arg_3 = - 1 ) : if np . isscalar ( arg_0 ) : arg_4 = np . arange ( arg_0 ) else : arg_4 = np . arange ( arg_0 . shape [ arg_3 ] ) return frames_to_samples ( arg_4 , arg_1 = arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1=512, arg_2=None, arg_3=-1):
    """Return an array of sample indices to match the time axis from a feature matrix.

    Parameters
    ----------
    X : np.ndarray or scalar
        - If ndarray, X is a feature matrix, e.g. STFT, chromagram, or mel spectrogram.
        - If scalar, X represents the number of frames.

    hop_length : int > 0 [scalar]
        number of samples between successive frames

    n_fft : None or int > 0 [scalar]
        Optional: length of the FFT window.
        If given, time conversion will include an offset of `n_fft / 2`
        to counteract windowing effects when using a non-centered STFT.

    axis : int [scalar]
        The axis representing the time axis of X.
        By default, the last axis (-1) is taken.

    Returns
    -------
    samples : np.ndarray [shape=(n,)]
        ndarray of sample indices corresponding to each frame of X.

    See Also
    --------
    times_like : Return an array of time values to match the time axis from a feature matrix.

    Examples
    --------
    Provide a feature matrix input:

    >>> y, sr = librosa.load(librosa.util.example_audio_file())
    >>> X = librosa.stft(y)
    >>> samples = librosa.Func(X)
    >>> samples
    array([      0,     512,    1024, ..., 1353728, 1354240, 1354752])

    Provide a scalar input:

    >>> n_frames = 2647
    >>> samples = librosa.Func(n_frames)
    >>> samples
    array([      0,     512,    1024, ..., 1353728, 1354240, 1354752])
    """
    if np.isscalar(arg_0):
        arg_4 = np.arange(arg_0)
    else:
        arg_4 = np.arange(arg_0.shape[arg_3])
    return frames_to_samples(arg_4, arg_1=arg_1, arg_2=arg_2)

Return an array of sample indices to match the time axis from a feature matrix.

    Parameters
    ----------
    X : np.ndarray or scalar
        - If ndarray, X is a feature matrix, e.g. STFT, chromagram, or mel spectrogram.
        - If scalar, X represents the number of frames.

    hop_length : int > 0 [scalar]
        number of samples between successive frames

    n_fft : None or int > 0 [scalar]
        Optional: length of the FFT window.
        If given, time conversion will include an offset of `n_fft / 2`
        to counteract windowing effects when using a non-centered STFT.

    axis : int [scalar]
        The axis representing the time axis of X.
        By default, the last axis (-1) is taken.

    Returns
    -------
    samples : np.ndarray [shape=(n,)]
        ndarray of sample indices corresponding to each frame of X.

    See Also
    --------
    times_like : Return an array of time values to match the time axis from a feature matrix.

    Examples
    --------
    Provide a feature matrix input:

    >>> y, sr = librosa.load(librosa.util.example_audio_file())
    >>> X = librosa.stft(y)
    >>> samples = librosa.samples_like(X)
    >>> samples
    array([      0,     512,    1024, ..., 1353728, 1354240, 1354752])

    Provide a scalar input:

    >>> n_frames = 2647
    >>> samples = librosa.samples_like(n_frames)
    >>> samples
    array([      0,     512,    1024, ..., 1353728, 1354240, 1354752])

Return an array of sample indices to match the time axis from a feature matrix .


def Func(arg_0, arg_1):
        """
        Registers a custom formatting function with ub.repr2
        """
        def _decorator(arg_2):
            if isinstance(arg_1, tuple):
                for arg_3 in arg_1:
                    arg_0.func_registry[arg_3] = arg_2
            else:
                arg_0.func_registry[arg_1] = arg_2
            return arg_2
        return _decorator

Registers a custom formatting function with ub . repr2


return ''.join(_flatten_node(c) for c in td.contents())

def Func ( arg_0 , arg_1 = False ) : def _flatten_node ( arg_2 ) : if isinstance ( arg_2 , basestring ) : return arg_2 . strip ( ) elif 'href' in arg_2 . attrib : arg_3 = rel_url_to_id ( arg_2 . attrib [ 'href' ] ) return arg_3 if arg_3 else arg_2 . text_content ( ) . strip ( ) else : return Func ( pq ( arg_2 ) , arg_1 = True ) if arg_0 is None or not arg_0 . text ( ) : return '' if arg_1 else None arg_0 . remove ( 'span.note' ) return '' . join ( _flatten_node ( arg_2 ) for arg_2 in arg_0 . contents ( ) )

def Func(arg_0, arg_1=False):
    """Flattens relative URLs within text of a table cell to IDs and returns
    the result.

    :td: the PyQuery object for the HTML to convert
    :returns: the string with the links flattened to IDs
    """

    # helper function to flatten individual strings/links
    def _flatten_node(arg_2):
        if isinstance(arg_2, basestring):
            return arg_2.strip()
        elif 'href' in arg_2.attrib:
            arg_3 = rel_url_to_id(arg_2.attrib['href'])
            return arg_3 if arg_3 else arg_2.text_content().strip()
        else:
            return Func(pq(arg_2), arg_1=True)

    # if there's no text, just return None
    if arg_0 is None or not arg_0.text():
        return '' if arg_1 else None

    arg_0.remove('span.note')
    return ''.join(_flatten_node(arg_2) for arg_2 in arg_0.contents())

Flattens relative URLs within text of a table cell to IDs and returns the result .


def Func ( arg_0 , arg_1 , ** arg_2 ) : if hasattr ( arg_0 , "__iter__" ) and not isinstance ( arg_0 , string_types ) : arg_3 = False else : arg_3 = True arg_0 = [ arg_0 ] arg_4 = [ ] for arg_5 in arg_0 : arg_5 = check_niimg ( arg_5 ) arg_6 = arg_5 . get_affine ( ) arg_7 = _smooth_array ( arg_5 . get_data ( ) , arg_6 , arg_1 = arg_1 , ensure_finite = True , copy = True , ** arg_2 ) arg_4 . append ( new_img_like ( arg_5 , arg_7 , arg_6 , copy_header = True ) ) if arg_3 : return arg_4 [ 0 ] else : return arg_4

def Func(arg_0, arg_1, **arg_2):
    """Smooth images by applying a Gaussian filter.
    Apply a Gaussian filter along the three first dimensions of arr.
    In all cases, non-finite values in input image are replaced by zeros.

    This is copied and slightly modified from nilearn:
    https://github.com/nilearn/nilearn/blob/master/nilearn/image/image.py
    Added the **kwargs argument.

    Parameters
    ==========
    imgs: Niimg-like object or iterable of Niimg-like objects
        See http://nilearn.github.io/manipulating_images/manipulating_images.html#niimg.
        Image(s) to smooth.
    fwhm: scalar, numpy.ndarray, 'fast' or None
        Smoothing strength, as a Full-Width at Half Maximum, in millimeters.
        If a scalar is given, width is identical on all three directions.
        A numpy.ndarray must have 3 elements, giving the FWHM along each axis.
        If fwhm == 'fast', a fast smoothing will be performed with
        a filter [0.2, 1, 0.2] in each direction and a normalisation
        to preserve the scale.
        If fwhm is None, no filtering is performed (useful when just removal
        of non-finite values is needed)
    Returns
    =======
    filtered_img: nibabel.Nifti1Image or list of.
        Input image, filtered. If imgs is an iterable, then filtered_img is a
        list.
    """

    # Use hasattr() instead of isinstance to workaround a Python 2.6/2.7 bug
    # See http://bugs.python.org/issue7624
    if hasattr(arg_0, "__iter__") \
       and not isinstance(arg_0, string_types):
        arg_3 = False
    else:
        arg_3 = True
        arg_0 = [arg_0]

    arg_4 = []
    for arg_5 in arg_0:
        arg_5 = check_niimg(arg_5)
        arg_6 = arg_5.get_affine()
        arg_7 = _smooth_array(arg_5.get_data(), arg_6, arg_1=arg_1,
                                 ensure_finite=True, copy=True, **arg_2)
        arg_4.append(new_img_like(arg_5, arg_7, arg_6, copy_header=True))

    if arg_3:
        return arg_4[0]
    else:
        return arg_4

Smooth images by applying a Gaussian filter . Apply a Gaussian filter along the three first dimensions of arr . In all cases non - finite values in input image are replaced by zeros .


return apiclient.discovery.build(
      api_name, api_version, credentials=credentials)

def Func ( arg_0 , arg_1 , arg_2 = None ) : if not arg_2 : arg_2 = oauth2client . client . GoogleCredentials . get_application_default ( ) return apiclient . discovery . build ( arg_0 , arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1, arg_2=None):
  """Configures genomics API client.

  Args:
    api_name: Name of the Google API (for example: "genomics")
    api_version: Version of the API (for example: "v2alpha1")
    credentials: Credentials to be used for the gcloud API calls.

  Returns:
    A configured Google Genomics API client with appropriate credentials.
  """
  if not arg_2:
    arg_2 = oauth2client.client.GoogleCredentials.get_application_default(
    )
  return apiclient.discovery.build(
      arg_0, arg_1, arg_2=arg_2)


def Func ( arg_0 , arg_1 ) : arg_2 = list ( arg_1 ) for arg_3 in arg_0 : try : arg_2 . remove ( arg_3 ) except ValueError : return False return not arg_2

def Func(arg_0, arg_1):
  """
  Used to check whether the two edge lists have the same edges
  when elements are neither hashable nor sortable.
  """
  arg_2 = list(arg_1)
  for arg_3 in arg_0:
    try:
      arg_2.remove(arg_3)
    except ValueError:
      return False
  return not arg_2

Used to check whether the two edge lists have the same edges when elements are neither hashable nor sortable .


def
Func
(
arg_0
=
"Denali"
)
:
if
arg_0
==
"Denali"
:
return
sizeof
(
DescriptorTableDenali
)
elif
arg_0
==
"Spec20"
:
return
sizeof
(
DescriptorTableSpec20
)
elif
arg_0
==
"Spec12"
:
return
0
else
:
raise
RuntimeError
(
"Error version!"
)

def Func(arg_0="Denali"):
    """
    Get sizeof DescriptorTable
    """
    if arg_0 == "Denali":
        return sizeof(DescriptorTableDenali)
    elif arg_0 == "Spec20":
        return sizeof(DescriptorTableSpec20)
    elif arg_0 == "Spec12":
        return 0
    else:
        raise RuntimeError("Error version!")


def Func(arg_0, arg_1=None):
        """Pops the app context."""
        arg_0._refcnt -= 1
        if arg_0._refcnt <= 0:
            if arg_1 is None:
                arg_1 = sys.exc_info()[1]
            arg_0.app.do_teardown_appcontext(arg_1)
        arg_2 = _app_ctx_stack.Func()
        assert arg_2 is arg_0, 'Popped wrong app context.  (%r instead of %r)' \
            % (arg_2, arg_0)
        appcontext_Funcped.send(arg_0.app)


def Func(arg_0, arg_1=arg_2):
        """Power on Bluetooth."""
        # Turn on bluetooth and wait for powered on event to be set.
        arg_0._powered_on.clear()
        IOBluetoothPreferenceSetControllerPowerState(1)
        if not arg_0._powered_on.wait(arg_1):
            raise RuntimeError('Exceeded timeout waiting for adapter to power on!')


def Func(arg_0, arg_1):
        """Initializes an app to work with this extension.

        The app-context signals will be subscribed and the template context
        will be initialized.

        :param app: the :class:`flask.Flask` app instance.
        """
        # connects app-level signals
        appcontext_pushed.connect(arg_0.initialize_bars, arg_1)
        # integrate with jinja template
        arg_1.add_template_global(arg_0, 'nav')

Initializes an app to work with this extension .


def Func ( arg_0 ) : arg_1 = os . path . abspath ( os . path . join ( os . path . dirname ( __file__ ) , os . pardir , 'resources' ) ) arg_2 = set ( [ ] ) for arg_3 , arg_4 , arg_3 in pkgutil . iter_modules ( [ arg_1 ] ) : arg_5 = tower_cli . get_resource ( arg_4 ) if not getattr ( arg_5 , 'internal' , False ) : arg_2 . add ( arg_4 ) return sorted ( arg_2 )

def Func(arg_0):
        """Returns a list of multi-commands for each resource type.
        """
        arg_1 = os.path.abspath(os.path.join(
            os.path.dirname(__file__),
            os.pardir,
            'resources'
        ))
        arg_2 = set([])
        for arg_3, arg_4, arg_3 in pkgutil.iter_modules([arg_1]):
            arg_5 = tower_cli.get_resource(arg_4)
            if not getattr(arg_5, 'internal', False):
                arg_2.add(arg_4)
        return sorted(arg_2)

Returns a list of multi - commands for each resource type .


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Sign the CRL.

        Signing a CRL enables clients to associate the CRL itself with an
        issuer. Before a CRL is meaningful to other OpenSSL functions, it must
        be Funced by an issuer.

        This method implicitly sets the issuer's name based on the issuer
        certificate and private key used to Func the CRL.

        .. versionadded:: 16.1.0

        :param X509 issuer_cert: The issuer's certificate.
        :param PKey issuer_key: The issuer's private key.
        :param bytes digest: The digest method to Func the CRL with.
        """
        arg_4 = _lib.EVP_get_digestbyname(arg_3)
        _openssl_assert(arg_4 != _ffi.NULL)
        _lib.X509_CRL_set_issuer_name(
            arg_0._crl, _lib.X509_get_subject_name(arg_1._x509))
        _lib.X509_CRL_sort(arg_0._crl)
        arg_5 = _lib.X509_CRL_Func(arg_0._crl, arg_2._pkey, arg_4)
        _openssl_assert(arg_5 != 0)

Sign the CRL.

        Signing a CRL enables clients to associate the CRL itself with an
        issuer. Before a CRL is meaningful to other OpenSSL functions, it must
        be signed by an issuer.

        This method implicitly sets the issuer's name based on the issuer
        certificate and private key used to sign the CRL.

        .. versionadded:: 16.1.0

        :param X509 issuer_cert: The issuer's certificate.
        :param PKey issuer_key: The issuer's private key.
        :param bytes digest: The digest method to sign the CRL with.


(self, bands=None, download_dir=None, metadata=False)

def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
,
arg_3
=
False
)
:
if
not
arg_2
:
arg_2
=
DOWNLOAD_DIR
if
arg_1
is
:
arg_1
=
list
(
range
(
1
,
12
)
)
+
[
'BQA'
]
else
:
arg_0
.
validate_bands
(
arg_1
)
arg_4
=
re
.
compile
(
'^[^\s]+_(.+)\.tiff?'
,
re
.
I
)
arg_5
=
[
'B%i'
%
(
i
,
)
if
isinstance
(
i
,
int
)
else
i
for
i
in
arg_1
]
arg_6
=
[
]
arg_0
.
connect_earthexplorer
(
)
arg_7
=
arg_0
.
sceneInfo
.
name
+
'.tgz'
arg_8
=
check_create_folder
(
join
(
arg_2
,
arg_0
.
sceneInfo
.
name
)
)
arg_9
=
arg_0
.
Func_file
(
arg_0
.
url
,
arg_8
,
arg_7
)
logger
.
debug
(
'Status Funced %s'
%
arg_9
)
print
(
'\n Status Funced %s'
%
arg_9
)
if
arg_9
[
'sucess'
]
:
print
(
'\n Downloaded sucess'
)
logger
.
debug
(
'Downloaded sucess of scene: %s'
%
arg_0
.
sceneInfo
.
name
)
try
:
arg_10
=
tarfile
.
open
(
arg_9
[
'file_path'
]
,
'r'
)
arg_11
=
join
(
arg_2
,
arg_0
.
sceneInfo
.
name
)
arg_10
.
extractall
(
arg_11
)
remove
(
arg_9
[
'file_path'
]
)
arg_12
=
listdir
(
arg_11
)
for
arg_13
in
arg_12
:
arg_14
=
arg_4
.
match
(
arg_13
)
arg_15
=
join
(
arg_11
,
arg_13
)
if
arg_14
and
arg_14
.
group
(
1
)
in
arg_5
:
arg_6
.
append
(
[
arg_15
,
getsize
(
arg_15
)
]
)
elif
arg_14
:
remove
(
arg_15
)
except
tarfile
.
ReadError
as
error
:
print
(
'\nError when extracting files. %s'
%
error
)
logger
.
error
(
'Error when extracting files. %s'
%
error
)
return
arg_6
else
:
logger
.
debug
(
'Info Funced: %s'
%
arg_9
)
print
(
'\n Info Funced: %s'
%
arg_9
)
return
arg_9

def Func(arg_0, arg_1=None, arg_2=None, arg_3=False):
        """Download remote .tar.bz file."""
        if not arg_2:
            arg_2 = DOWNLOAD_DIR

        if arg_1 is None:
            arg_1 = list(range(1, 12)) + ['BQA']
        else:
            arg_0.validate_bands(arg_1)

        arg_4 = re.compile('^[^\s]+_(.+)\.tiff?', re.I)
        arg_5 = ['B%i' % (i,) if isinstance(i, int) else i for i in arg_1]
        arg_6 = []

        # Connect Earth explore
        arg_0.connect_earthexplorer()

        # tgz name
        arg_7 = arg_0.sceneInfo.name + '.tgz'
        arg_8 = check_create_folder(join(arg_2, arg_0.sceneInfo.name))

        # Download File
        arg_9 = arg_0.Func_file(arg_0.url, arg_8, arg_7)

        # Log
        logger.debug('Status Funced %s' % arg_9)
        print('\n Status Funced %s' % arg_9)

        if arg_9['sucess']:

            # Log
            print('\n Downloaded sucess')
            logger.debug('Downloaded sucess of scene: %s' % arg_0.sceneInfo.name)

            try:

                arg_10 = tarfile.open(arg_9['file_path'], 'r')
                arg_11 = join(arg_2, arg_0.sceneInfo.name)
                arg_10.extractall(arg_11)
                remove(arg_9['file_path'])
                arg_12 = listdir(arg_11)

                for arg_13 in arg_12:
                    arg_14 = arg_4.match(arg_13)
                    arg_15 = join(arg_11, arg_13)
                    if arg_14 and arg_14.group(1) in arg_5:
                        arg_6.append([arg_15, getsize(arg_15)])
                    elif arg_14:
                        remove(arg_15)
            except tarfile.ReadError as error:
                print('\nError when extracting files. %s' % error)
                logger.error('Error when extracting files. %s' % error)
            return arg_6
        else:
            logger.debug('Info Funced: %s' % arg_9)
            print('\n Info Funced: %s' % arg_9)
            return arg_9


def Func ( arg_0 ) : def dummy ( * arg_1 , ** arg_2 ) : pass arg_3 , arg_4 . main = arg_4 . main , dummy arg_6 , arg_4 . main_quit = arg_4 . main_quit , dummy return arg_3 , arg_6

def Func(arg_0):
        """Hijack a few key functions in GTK for IPython integration.

        Modifies pyGTK's main and main_quit with a dummy so user code does not
        block IPython.  This allows us to use %run to run arbitrary pygtk
        scripts from a long-lived IPython session, and when they attempt to
        start or stop

        Returns
        -------
        The original functions that have been hijacked:
        - gtk.main
        - gtk.main_quit
        """
        def dummy(*arg_1, **arg_2):
            pass
        # save and trap main and main_quit from gtk
        arg_3, arg_4.main = arg_4.main, dummy
        arg_6, arg_4.main_quit = arg_4.main_quit, dummy
        return arg_3, arg_6

Hijack a few key functions in GTK for IPython integration .


return os.path.join(folder, VERSATILEIMAGEFIELD_FILTERED_DIRNAME, '')

def Func ( arg_0 ) : arg_1 , arg_2 = os . path . split ( arg_0 . name ) return os . path . join ( arg_1 , VERSATILEIMAGEFIELD_FILTERED_DIRNAME , '' )

def Func(arg_0):
        """Return the location where filtered images are stored."""
        arg_1, arg_2 = os.path.split(arg_0.name)
        return os.path.join(arg_1, VERSATILEIMAGEFIELD_FILTERED_DIRNAME, '')

Return the location where filtered images are stored .


def
Func
(
arg_0
)
:
if
not
PyFunceble
.
CONFIGURATION
[
"quiet"
]
:
print
(
"Update of iana-domains-db"
,
end
=
" "
)
for
arg_1
,
arg_2
in
arg_0
.
_extensions
(
)
:
if
arg_1
not
in
arg_0
.
iana_db
or
arg_0
.
iana_db
[
arg_1
]
!=
arg_2
:
arg_0
.
iana_db
[
arg_1
]
=
arg_2
Dict
(
arg_0
.
iana_db
)
.
to_json
(
arg_0
.
destination
)
if
not
PyFunceble
.
CONFIGURATION
[
"quiet"
]
:
print
(
PyFunceble
.
INTERN
[
"done"
]
)

def Func(arg_0):
        """
        Update the content of the `iana-domains-db` file.
        """

        if not PyFunceble.CONFIGURATION["quiet"]:
            # * The quiet mode is not activated.

            # We print on screen what we are doing.
            print("Update of iana-domains-db", end=" ")

        # We loop through the line of the iana website.
        for arg_1, arg_2 in arg_0._extensions():

            if arg_1 not in arg_0.iana_db or arg_0.iana_db[arg_1] != arg_2:
                # We add the extension to the databae.
                arg_0.iana_db[arg_1] = arg_2

                # We save the content of the constructed database.
                Dict(arg_0.iana_db).to_json(arg_0.destination)

        if not PyFunceble.CONFIGURATION["quiet"]:
            # The quiet mode is not activated.

            # We indicate that the work is done without any issue.
            print(PyFunceble.INTERN["done"])

Update the content of the iana - domains - db file .


def Func(arg_0: arg_1):
    """Enrich the sub-graph with the unqualified edges from the graph.

    The reason you might want to do this is you induce a sub-graph from the original graph based on an annotation
    filter, but the unqualified edges that don't have annotations that most likely connect elements within your graph
    are not included.

    .. seealso::

        This function thinly wraps the successive application of the following functions:

        - :func:`enrich_complexes`
        - :func:`enrich_composites`
        - :func:`enrich_reactions`
        - :func:`enrich_variants`

    Equivalent to:

    >>> enrich_complexes(graph)
    >>> enrich_composites(graph)
    >>> enrich_reactions(graph)
    >>> enrich_variants(graph)
    """
    enrich_complexes(arg_0)
    enrich_composites(arg_0)
    enrich_reactions(arg_0)
    enrich_variants(arg_0)

Enrich the sub - graph with the unqualified edges from the graph .


def Func(arg_0, arg_1, arg_2=1):
        """
        In-place Funcition

        :param Funcend_mat: A matrix to be Funced on the Sparse3DMatrix object
        :param axis: The dimension along the Funcend_mat is Funced
        :return: Nothing (as it performs in-place operations)
        """
        if arg_0.finalized:
            if arg_2 == 0:
                raise NotImplementedError('The method is not yet implemented for the axis.')
            elif arg_2 == 1:
                for arg_3 in xrange(arg_0.shape[1]):
                    arg_0.data[arg_3] = arg_0.data[arg_3] + arg_1
            elif arg_2 == 2:
                raise NotImplementedError('The method is not yet implemented for the axis.')
            else:
                raise RuntimeError('The axis should be 0, 1, or 2.')
        else:
            raise RuntimeError('The original matrix must be finalized.')

In-place addition

        :param addend_mat: A matrix to be added on the Sparse3DMatrix object
        :param axis: The dimension along the addend_mat is added
        :return: Nothing (as it performs in-place operations)


(self, decimals_as_strings=True, ts_as_dates=False,
               sequencing=False, ts=False, **kwargs)

def Func(arg_0, arg_1=True, arg_2=False,
               arg_3=False, arg_4=False, **arg_5):
        """Send Funcuration to websocket server

        :param decimals_as_strings: bool, turn on/off decimals as strings
        :param ts_as_dates: bool, decide to request timestamps as dates instead
        :param sequencing: bool, turn on sequencing
	:param ts: bool, request the timestamp to be appended to every array
               sent by the server
        :param kwargs:
        :return:
        """
        arg_6 = 0
        if arg_1:
            arg_6 += 8
        if arg_2:
            arg_6 += 32
        if arg_4:
            arg_6 += 32768
        if arg_3:
            arg_6 += 65536
        arg_7 = {'event': 'conf', 'flags': arg_6}
        arg_7.update(arg_5)
        arg_0.conn.bitfinex_Func = arg_7
        arg_0.conn.send(**arg_7)

Send configuration to websocket server

        :param decimals_as_strings: bool, turn on/off decimals as strings
        :param ts_as_dates: bool, decide to request timestamps as dates instead
        :param sequencing: bool, turn on sequencing
	:param ts: bool, request the timestamp to be appended to every array
               sent by the server
        :param kwargs:
        :return:


return Attachment(content_type=CardFactory.content_types.hero_card,
                          content=card)

def Func(arg_0: arg_1) -> Attachment:
        """
        Returns an attachment for a hero card. Will raise a TypeError if 'card' argument is not a HeroCard.

        Hero cards tend to have one dominant full width image and the cards text & buttons can
        usually be found below the image.
        :return:
        """
        if not isinstance(arg_0, arg_1):
            raise TypeError('CardFactory.Func(): `card` argument is not an instance of an HeroCard, '
                            'unable to prepare attachment.')

        return Attachment(content_type=CardFactory.content_types.Func,
                          content=arg_0)

Returns an attachment for a hero card . Will raise a TypeError if card argument is not a HeroCard .


return self._nn_interface._add_generic(self, type_name=CONFIG,
                                               group_type_name=CONFIG_GROUP,
                                               args=args, kwargs=kwargs)

def Func(arg_0, *arg_1, **arg_2):
        """Adds a config parameter under the current group.

        Similar to
        :func:`~pypet.naturalnaming.ParameterGroup.f_add_parameter`.

        If current group is the trajectory the prefix `'config'` is added to the name.

        """
        return arg_0._nn_interface._add_generic(arg_0, type_name=CONFIG,
                                               group_type_name=CONFIG_GROUP,
                                               arg_1=arg_1, arg_2=arg_2)

Adds a config parameter under the current group .


(gh_session, orgs=None, repos=None, public_only=True)

def Func(arg_0, arg_1=None, arg_2=None, arg_3=True):
    """
    Yields GitHub3.py repo objects for provided orgs and repo names

    If orgs and repos are BOTH empty, execute special mode of getting ALL
    repositories from the GitHub Server.

    If public_only is True, will return only those repos that are marked as
    public. Set this to false to return all organizations that the session has
    permissions to access.
    """

    if arg_1 is None:
        arg_1 = []
    if arg_2 is None:
        arg_2 = []
    if arg_3:
        arg_4 = 'public'
    else:
        arg_4 = 'all'

    _check_api_limits(arg_0, 10)

    for arg_5 in arg_1:
        arg_6 = arg_0.organization(arg_5)
        arg_7 = arg_6.public_repos_count

        _check_api_limits(arg_0, _num_requests_needed(arg_7))

        for arg_8 in arg_6.repositories(type=arg_4):
            _check_api_limits(arg_0, 10)
            yield arg_8

    for arg_9 in arg_2:
        _check_api_limits(arg_0, 10)
        arg_6, arg_10 = arg_9.split('/')
        yield arg_0.repository(arg_6, arg_10)

    if not (arg_1 or arg_2):
        for arg_8 in arg_0.all_repositories():
            yield arg_8

Yields GitHub3 . py repo objects for provided orgs and repo names


def Func ( arg_0 , arg_1 , arg_2 ) : from sigal import __url__ as sigal_link arg_3 = os . path . join ( arg_1 . dst_path , arg_2 [ 0 ] . filename ) arg_4 = arg_0 . template . render ( { 'album' : arg_1 , 'media' : arg_2 [ 0 ] , 'previous_media' : arg_2 [ - 1 ] , 'next_media' : arg_2 [ 1 ] , 'index_title' : arg_0 . index_title , 'settings' : arg_0 . settings , 'sigal_link' : sigal_link , 'theme' : { 'name' : os . path . basename ( arg_0 . theme ) , 'url' : url_from_path ( os . path . relpath ( arg_0 . theme_path , arg_1 . dst_path ) ) } , } ) arg_5 = "%s.html" % arg_3 with open ( arg_5 , 'w' , encoding = 'utf-8' ) as f : f . Func ( arg_4 )

def Func(arg_0, arg_1, arg_2):
        ''' Generate the media page and save it '''

        from sigal import __url__ as sigal_link
        arg_3 = os.path.join(arg_1.dst_path, arg_2[0].filename)

        arg_4 = arg_0.template.render({
            'album': arg_1,
            'media': arg_2[0],
            'previous_media': arg_2[-1],
            'next_media': arg_2[1],
            'index_title': arg_0.index_title,
            'settings': arg_0.settings,
            'sigal_link': sigal_link,
            'theme': {'name': os.path.basename(arg_0.theme),
                      'url': url_from_path(os.path.relpath(arg_0.theme_path,
                                                           arg_1.dst_path))},
        })

        arg_5 = "%s.html" % arg_3

        with open(arg_5, 'w', encoding='utf-8') as f:
            f.Func(arg_4)


def Func ( arg_0 , arg_1 ) : arg_0 . ensureModelData ( arg_1 ) arg_2 = arg_1 . _modeldata arg_3 = arg_2 [ "_modelcache" ] [ "vlists" ] for arg_4 , arg_5 in arg_0 . modeldata [ "regions" ] . items ( ) : arg_3 [ arg_4 ] . vertices = arg_5 . getVertices ( arg_2 ) if arg_5 . enable_tex : arg_3 [ arg_4 ] . tex_coords = arg_5 . getTexCoords ( arg_2 )

def Func(arg_0,arg_1):
        """
        Redraws the model of the given object.

        Note that currently this method probably won't change any data since all movement and animation is done through pyglet groups.
        """
        arg_0.ensureModelData(arg_1)
        arg_2 = arg_1._modeldata

        arg_3 = arg_2["_modelcache"]["vlists"]

        for arg_4,arg_5 in arg_0.modeldata["regions"].items():
            arg_3[arg_4].vertices = arg_5.getVertices(arg_2)
            if arg_5.enable_tex:
                arg_3[arg_4].tex_coords = arg_5.getTexCoords(arg_2)

Redraws the model of the given object . Note that currently this method probably won t change any data since all movement and animation is done through pyglet groups .


(self, category_id, limit=20, offset=0, country=None)

def Func(arg_0, arg_1, arg_2=20, arg_3=0, arg_4=None):
        """Get a list of Spotify playlists tagged with a particular category.

        Parameters
        ----------
        category_id : str
            The Spotify category ID for the category.
        limit : Optional[int]
            The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
        offset : Optional[int]
            The index of the first item to return. Default: 0
        country : COUNTRY_TP
            COUNTRY
        """
        arg_5 = Route('GET', '/browse/categories/{category_id}/playlists', arg_1=arg_1)
        arg_6 = {'limit': arg_2, 'offset': arg_3}

        if arg_4:
            arg_6['country'] = arg_4

        return arg_0.request(arg_5, params=arg_6)

Get a list of Spotify playlists tagged with a particular category .


def Func ( arg_0 , arg_1 ) : for ( arg_2 , arg_3 , arg_4 ) in arg_0 . client . scan_keys ( HASH_TF_INDEX_TABLE , ( ( arg_1 , ) , ( arg_1 , ) ) ) : yield kvlayer_key_to_stream_id ( ( arg_3 , arg_4 ) )

def Func(arg_0, arg_1):
        '''Get stream IDs for a single hash.

        This yields strings that can be retrieved using
        :func:`streamcorpus_pipeline._kvlayer.get_kvlayer_stream_item`,
        or fed back into :mod:`coordinate` or other job queue systems.

        Note that for common terms this can return a large number of
        stream IDs!  This is a scan over a dense region of a
        :mod:`kvlayer` table so it should be reasonably efficient,
        but be prepared for it to return many documents in a large
        corpus.  Blindly storing the results in a :class:`list`
        may be inadvisable.

        This will return nothing unless the index was written with
        :attr:`hash_docs` set.  No document will correspond to
        :data:`DOCUMENT_HASH_KEY`; use
        :data:`DOCUMENT_HASH_KEY_REPLACEMENT` instead.

        :param int h: Murmur hash to look up

        '''
        for (arg_2, arg_3, arg_4) in arg_0.client.scan_keys(HASH_TF_INDEX_TABLE,
                                                 ((arg_1,), (arg_1,))):
            yield kvlayer_key_to_stream_id((arg_3, arg_4))