def Func ( arg_0 ) : arg_1 = util . get_object ( obj = arg_0 , predefined_objects = tensorforce . core . explorations . explorations ) assert isinstance ( arg_1 , Exploration ) return arg_1

def Func(arg_0):
        """
        Creates an exploration object from a specification dict.
        """
        arg_1 = util.get_object(
            obj=arg_0,
            predefined_objects=tensorforce.core.explorations.explorations
        )
        assert isinstance(arg_1, Exploration)
        return arg_1

Creates an exploration object from a specification dict .


def Func ( arg_0 , ** arg_1 ) : for arg_2 , arg_3 in arg_1 . items ( ) : setattr ( arg_0 , arg_2 , arg_3 )

def Func(arg_0, **arg_1):
        '''
        Pass a load of Func into the canvas
        '''
        for arg_2, arg_3 in arg_1.items():
            setattr(arg_0, arg_2, arg_3)


(coeffs,
                   times, mags, errs,
                   fsv, fdv, fkv, xcc, ycc, bgv, bge, iha, izd)

def Func(arg_0,
                   arg_1, arg_2, arg_3,
                   arg_4, arg_5, arg_6, arg_7, arg_8, arg_9, arg_10, arg_11, arg_12):
    '''This is the residual function to minimize using
    scipy.optimize.least_squares.

    This variant is for :py:func:`.epd_magseries_extparams`.

    '''

    arg_13 = _epd_function(arg_0, arg_4, arg_5, arg_6, arg_7, arg_8, arg_9, arg_10, arg_11, arg_12)
    arg_14 = arg_2 - arg_13
    return arg_14

This is the residual function to minimize using scipy . optimize . least_squares .


def Func(arg_0, arg_1, arg_2=None):
        """
        Respond to executor events.
        """
        # TODO: this shares quite a lot of code with _manage_executor_state

        arg_3 = models.TaskInstance
        for arg_4, arg_5 in list(arg_0.executor.get_event_buffer(arg_1.dag_ids)
                                   .items()):
            arg_6, arg_7, arg_8, arg_9 = arg_4
            arg_0.log.info(
                "Executor reports execution of %s.%s execution_date=%s "
                "exited with status %s for try_number %s",
                arg_6, arg_7, arg_8, arg_5, arg_9
            )
            if arg_5 == State.FAILED or arg_5 == State.SUCCESS:
                arg_10 = arg_2.query(arg_3).filter(arg_3.dag_id == arg_6,
                                               arg_3.task_id == arg_7,
                                               arg_3.execution_date == arg_8)
                arg_11 = arg_10.first()
                if not arg_11:
                    arg_0.log.warning("TaskInstance %s went missing from the database", arg_11)
                    continue

                # TODO: should we fail RUNNING as well, as we do in Backfills?
                if arg_11.try_number == arg_9 and arg_11.state == State.QUEUED:
                    arg_12 = ("Executor reports task instance {} finished ({}) "
                           "although the task says its {}. Was the task "
                           "killed externally?".format(arg_11, arg_5, arg_11.state))
                    arg_0.log.error(arg_12)
                    try:
                        arg_13 = arg_1.get_dag(arg_6)
                        arg_14 = models.DagBag(arg_13.full_filepath)
                        arg_15 = arg_14.get_dag(arg_6)
                        arg_11.task = arg_15.get_task(arg_7)
                        arg_11.handle_failure(arg_12)
                    except Exception:
                        arg_0.log.error("Cannot load the dag bag to handle failure for %s"
                                       ". Setting task to FAILED without callbacks or "
                                       "retries. Do you have enough resources?", arg_11)
                        arg_11.state = State.FAILED
                        arg_2.merge(arg_11)
                        arg_2.commit()


(self, constructor, full_name, *args, **kwargs)

def Func ( arg_0 , arg_1 , arg_2 , * arg_3 , ** arg_4 ) : if getattr ( arg_1 , 'KNOWS_TRAJECTORY' , False ) : return arg_1 ( arg_2 , arg_0 , * arg_3 , ** arg_4 ) else : return arg_1 ( arg_2 , * arg_3 , ** arg_4 )

def Func(arg_0, arg_1, arg_2, *arg_3, **arg_4):
        """ Creates a new node. Checks if the new node needs to know the trajectory.

        :param constructor:  The constructor to use
        :param full_name: Full name of node
        :param args: Arguments passed to constructor
        :param kwargs: Keyword arguments passed to the constructor
        :return:
        """
        if getattr(arg_1, 'KNOWS_TRAJECTORY', False):
            return arg_1(arg_2, arg_0, *arg_3, **arg_4)
        else:
            return arg_1(arg_2, *arg_3, **arg_4)

Creates a new node . Checks if the new node needs to know the trajectory .


(self, data, response=None, request=None, format=None)

def Func ( arg_0 , arg_1 , arg_2 = None , arg_3 = None , arg_4 = None ) : if isinstance ( arg_0 , Resource ) : if not arg_3 : arg_3 = arg_0 . _request arg_5 = None if arg_4 : arg_5 = arg_0 . meta . Funcrs [ arg_4 ] if not arg_5 : arg_6 = ( arg_3 . get ( 'Accept' ) or '*/*' ) . strip ( ) if not arg_6 : arg_6 = '*/*' if arg_6 != '*/*' : arg_7 = six . iterkeys ( arg_0 . _Funcr_map ) arg_8 = mimeparse . best_match ( arg_7 , arg_6 ) if arg_8 : arg_4 = arg_0 . _Funcr_map [ arg_8 ] arg_5 = arg_0 . meta . Funcrs [ arg_4 ] else : arg_9 = arg_0 . meta . default_Funcr arg_5 = arg_0 . meta . Funcrs [ arg_9 ] if arg_5 : try : arg_10 = arg_5 ( arg_3 , arg_2 ) return arg_10 . Func ( arg_1 ) , arg_10 except ValueError : pass arg_11 = { } for arg_12 in arg_0 . meta . allowed_Funcrs : arg_5 = arg_0 . meta . Funcrs [ arg_12 ] arg_13 = arg_5 ( arg_3 , None ) if arg_13 . can_Func ( arg_1 ) : arg_11 [ arg_12 ] = arg_5 . media_types [ 0 ] raise http . exceptions . NotAcceptable ( arg_11 )

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None):
        """Serializes the data using a determined Funcr.

        @param[in] data
            The data to be Funcd.

        @param[in] response
            The response object to Func the data to.
            If this method is invoked as an instance method, the response
            object can be omitted and it will be taken from the instance.

        @param[in] request
            The request object to pull information from; normally used to
            determine the serialization format (when `format` is not provided).
            May be used by some Funcrs as well to pull additional headers.
            If this method is invoked as an instance method, the request
            object can be omitted and it will be taken from the instance.

        @param[in] format
            A specific format to Func in; if provided, no detection is
            done. If not provided, the accept header (as well as the URL
            extension) is looked at to determine an appropriate Funcr.

        @returns
            A tuple of the Funcd text and an instance of the
            Funcr used.
        """
        if isinstance(arg_0, Resource):
            if not arg_3:
                # Ensure we have a response object.
                arg_3 = arg_0._request

        arg_5 = None
        if arg_4:
            # An explicit format was given; do not attempt to auto-detect
            # a Funcr.
            arg_5 = arg_0.meta.Funcrs[arg_4]

        if not arg_5:
            # Determine an appropriate Funcr to use by
            # introspecting the request object and looking at the `Accept`
            # header.
            arg_6 = (arg_3.get('Accept') or '*/*').strip()
            if not arg_6:
                # Default the media ranges to */*
                arg_6 = '*/*'

            if arg_6 != '*/*':
                # Parse the media ranges and determine the Funcr
                # that is the closest match.
                arg_7 = six.iterkeys(arg_0._Funcr_map)
                arg_8 = mimeparse.best_match(arg_7, arg_6)
                if arg_8:
                    arg_4 = arg_0._Funcr_map[arg_8]
                    arg_5 = arg_0.meta.Funcrs[arg_4]

            else:
                # Client indicated no preference; use the default.
                arg_9 = arg_0.meta.default_Funcr
                arg_5 = arg_0.meta.Funcrs[arg_9]

        if arg_5:
            try:
                # Attempt to Func the data using the determined
                # Funcr.
                arg_10 = arg_5(arg_3, arg_2)
                return arg_10.Func(arg_1), arg_10

            except ValueError:
                # Failed to Func the data.
                pass

        # Either failed to determine a Funcr or failed to Func
        # the data; construct a list of available and valid encoders.
        arg_11 = {}
        for arg_12 in arg_0.meta.allowed_Funcrs:
            arg_5 = arg_0.meta.Funcrs[arg_12]
            arg_13 = arg_5(arg_3, None)
            if arg_13.can_Func(arg_1):
                arg_11[arg_12] = arg_5.media_types[0]

        # Raise a Not Acceptable exception.
        raise http.exceptions.NotAcceptable(arg_11)

Serializes the data using a determined serializer.

        @param[in] data
            The data to be serialized.

        @param[in] response
            The response object to serialize the data to.
            If this method is invoked as an instance method, the response
            object can be omitted and it will be taken from the instance.

        @param[in] request
            The request object to pull information from; normally used to
            determine the serialization format (when `format` is not provided).
            May be used by some serializers as well to pull additional headers.
            If this method is invoked as an instance method, the request
            object can be omitted and it will be taken from the instance.

        @param[in] format
            A specific format to serialize in; if provided, no detection is
            done. If not provided, the accept header (as well as the URL
            extension) is looked at to determine an appropriate serializer.

        @returns
            A tuple of the serialized text and an instance of the
            serializer used.

Serializes the data using a determined serializer .


async def Func ( arg_0 , arg_1 ) : arg_2 = int ( arg_1 [ 'guildId' ] ) if arg_2 in arg_0 . players : arg_3 = arg_0 . players . get ( arg_2 ) arg_3 . position = arg_1 [ 'state' ] . get ( 'position' , 0 ) arg_3 . position_timestamp = arg_1 [ 'state' ] [ 'time' ]

async def Func(arg_0, arg_1):
        """ Updates a player's state when a payload with opcode ``playerUpdate`` is received. """
        arg_2 = int(arg_1['guildId'])

        if arg_2 in arg_0.players:
            arg_3 = arg_0.players.get(arg_2)
            arg_3.position = arg_1['state'].get('position', 0)
            arg_3.position_timestamp = arg_1['state']['time']

Updates a player s state when a payload with opcode playerUpdate is received .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 = 60 ) : arg_0 . _halt_if_already_deleted ( ) arg_2 = locals ( ) del arg_2 [ 'self' ] return arg_0 . _add_record ( PTRResourceRecordSet , ** arg_2 )

def Func(arg_0, arg_1, arg_2, arg_3=60):
        """
        Creates a PTR record attached to this hosted zone.

        :param str name: The fully qualified name of the record to add.
        :param list values: A list of value strings for the record.
        :keyword int ttl: The time-to-live of the record (in seconds).
        :rtype: tuple
        :returns: A tuple in the form of ``(rrset, change_info)``, where
            ``rrset`` is the newly created PTRResourceRecordSet instance.
        """

        arg_0._halt_if_already_deleted()

        # Grab the params/kwargs here for brevity's sake.
        arg_2 = locals()
        del arg_2['self']

        return arg_0._add_record(PTRResourceRecordSet, **arg_2)

Creates a PTR record attached to this hosted zone .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . mk_ofxid ( arg_1 . id ) arg_3 = { } arg_4 = { "ofxid" : arg_2 } if isinstance ( arg_1 , OfxTransaction ) : arg_5 = Posting ( arg_0 . name , Amount ( arg_1 . amount , arg_0 . currency ) , arg_3 = arg_4 ) return Transaction ( date = arg_1 . date , payee = arg_0 . format_payee ( arg_1 ) , postings = [ arg_5 , arg_5 . clone_inverted ( arg_0 . mk_dynamic_account ( arg_0 . format_payee ( arg_1 ) , exclude = arg_0 . name ) ) ] ) elif isinstance ( arg_1 , InvestmentTransaction ) : arg_6 = arg_0 . name arg_7 = arg_0 . name arg_8 = None arg_9 = None arg_10 = arg_0 . maybe_get_ticker ( arg_1 . security ) if isinstance ( arg_1 . type , str ) : if re . match ( '^(buy|sell)' , arg_1 . type ) : arg_7 = arg_0 . unknownaccount or 'Assets:Unknown' elif arg_1 . type == 'transfer' : arg_7 = 'Transfer' elif arg_1 . type == 'reinvest' : arg_7 = 'Income:Interest' elif arg_1 . type == 'income' and arg_1 . income_type == 'DIV' : arg_3 [ 'dividend_from' ] = arg_10 arg_7 = 'Income:Dividends' arg_8 = Posting ( arg_6 , Amount ( arg_1 . total , arg_0 . currency ) , arg_3 = arg_4 ) arg_9 = arg_8 . clone_inverted ( arg_7 ) else : pass else : if ( arg_1 . type in [ 0 , 1 , 3 , 4 ] ) : arg_7 = arg_0 . unknownaccount or 'Assets:Unknown' elif ( arg_1 . type == 2 ) : arg_7 = 'Income:Interest' else : pass arg_11 = None if arg_1 . settleDate is not None and arg_1 . settleDate != arg_1 . tradeDate : arg_11 = arg_1 . settleDate if arg_8 is None and arg_9 is None : arg_8 = Posting ( arg_6 , Amount ( arg_1 . units , arg_10 , unlimited = True ) , unit_price = Amount ( arg_1 . unit_price , arg_0 . currency , unlimited = True ) , arg_3 = arg_4 ) arg_9 = Posting ( arg_7 , Amount ( arg_1 . units * arg_1 . unit_price , arg_0 . currency , reverse = True ) ) else : pass return Transaction ( date = arg_1 . tradeDate , arg_11 = arg_11 , payee = arg_0 . format_payee ( arg_1 ) , arg_3 = arg_3 , postings = [ arg_8 , arg_9 ] )

def Func(arg_0, arg_1):
        """
        Convert an OFX Transaction to a posting
        """

        arg_2 = arg_0.mk_ofxid(arg_1.id)
        arg_3 = {}
        arg_4 = {"ofxid": arg_2}

        if isinstance(arg_1, OfxTransaction):
            arg_5 = Posting(arg_0.name,
                              Amount(arg_1.amount, arg_0.currency),
                              arg_3=arg_4)
            return Transaction(
                date=arg_1.date,
                payee=arg_0.format_payee(arg_1),
                postings=[
                    arg_5,
                    arg_5.clone_inverted(
                        arg_0.mk_dynamic_account(arg_0.format_payee(arg_1),
                                                exclude=arg_0.name))])
        elif isinstance(arg_1, InvestmentTransaction):
            arg_6 = arg_0.name
            arg_7 = arg_0.name

            arg_8 = None
            arg_9 = None

            arg_10 = arg_0.maybe_get_ticker(arg_1.security)

            if isinstance(arg_1.type, str):
                # recent versions of ofxparse
                if re.match('^(buy|sell)', arg_1.type):
                    arg_7 = arg_0.unknownaccount or 'Assets:Unknown'
                elif arg_1.type == 'transfer':
                    arg_7 = 'Transfer'
                elif arg_1.type == 'reinvest':
                    # reinvestment of income
                    # TODO: make this configurable
                    arg_7 = 'Income:Interest'
                elif arg_1.type == 'income' and arg_1.income_type == 'DIV':
                    # Fidelity lists non-reinvested dividend income as
                    # type: income, income_type: DIV
                    # TODO: determine how dividend income is listed from other institutions
                    # income/DIV transactions do not involve buying or selling a security
                    # so their postings need special handling compared to
                    # others
                    arg_3['dividend_from'] = arg_10
                    arg_7 = 'Income:Dividends'
                    arg_8 = Posting(arg_6,
                                       Amount(arg_1.total, arg_0.currency),
                                       arg_3=arg_4)
                    arg_9 = arg_8.clone_inverted(arg_7)
                else:
                    # ???
                    pass
            else:
                # Old version of ofxparse
                if (arg_1.type in [0, 1, 3, 4]):
                    # buymf, sellmf, buystock, sellstock
                    arg_7 = arg_0.unknownaccount or 'Assets:Unknown'
                elif (arg_1.type == 2):
                    # reinvest
                    arg_7 = 'Income:Interest'
                else:
                    # ???
                    pass

            arg_11 = None
            if arg_1.settleDate is not None and \
               arg_1.settleDate != arg_1.tradeDate:
                arg_11 = arg_1.settleDate

            # income/DIV already defined above;
            # this block defines all other posting types
            if arg_8 is None and arg_9 is None:
                arg_8 = Posting(
                    arg_6,
                    Amount(
                        arg_1.units,
                        arg_10,
                        unlimited=True),
                    unit_price=Amount(
                        arg_1.unit_price,
                        arg_0.currency,
                        unlimited=True),
                    arg_3=arg_4)
                arg_9 = Posting(
                    arg_7,
                    Amount(
                        arg_1.units *
                        arg_1.unit_price,
                        arg_0.currency,
                        reverse=True))
            else:
                # Previously defined if type:income income_type/DIV
                pass

            return Transaction(
                date=arg_1.tradeDate,
                arg_11=arg_11,
                payee=arg_0.format_payee(arg_1),
                arg_3=arg_3,
                postings=[arg_8, arg_9]
            )


(self, component_info=None, data=None, component_position=None)

def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
        """Get 6D data."""
        arg_4 = []
        arg_5 = arg_4.append
        for arg_6 in range(arg_1.body_count):
            arg_3, arg_7 = QRTPacket._get_exact(
                RT6DBodyPosition, arg_2, arg_3
            )
            arg_3, arg_8 = QRTPacket._get_tuple(
                RT6DBodyRotation, arg_2, arg_3
            )
            arg_5((arg_7, arg_8))
        return arg_4


def
Func
(
arg_0
)
:
if
'end'
in
arg_0
:
arg_1
=
arg_0
[
'end'
]
elif
'date_joined_program'
in
arg_0
:
arg_1
=
arg_0
[
'date_joined_program'
]
elif
'report_date'
in
arg_0
:
arg_1
=
arg_0
[
'report_date'
]
else
:
raise
ValueError
(
"Can't find updated field for item "
+
str
(
arg_0
)
)
return
float
(
str_to_datetime
(
arg_1
)
.
timestamp
(
)
)

def Func(arg_0):
        """Extracts the update time from a ReMo item.

        The timestamp is extracted from 'end' field.
        This date is converted to a perceval format using a float value.

        :param item: item generated by the backend

        :returns: a UNIX timestamp
        """
        if 'end' in arg_0:
            # events updated field
            arg_1 = arg_0['end']
        elif 'date_joined_program' in arg_0:
            # users updated field that always appear
            arg_1 = arg_0['date_joined_program']
        elif 'report_date' in arg_0:
            # activities updated field
            arg_1 = arg_0['report_date']
        else:
            raise ValueError("Can't find updated field for item " + str(arg_0))

        return float(str_to_datetime(arg_1).timestamp())

Extracts the update time from a ReMo item .


(start=0, rot=.4, gamma=1.0, hue=0.8,
                  light=.85, dark=.15, reverse=False)

def Func ( arg_0 = 0 , arg_1 = .4 , arg_2 = 1.0 , arg_3 = 0.8 , arg_4 = .85 , arg_5 = .15 , arg_6 = False ) : arg_7 = mpl . _cm . cubehelix ( arg_2 , arg_0 , arg_1 , arg_3 ) arg_8 = mpl . colors . LinearSegmentedColormap ( 'cubehelix' , arg_7 ) def Funcette ( arg_9 ) : arg_10 = np . linspace ( arg_4 , arg_5 , arg_9 ) return [ mcolors . rgb2hex ( arg_8 ( arg_11 ) ) for arg_11 in arg_10 ] return Funcette

def Func(arg_0=0, arg_1=.4, arg_2=1.0, arg_3=0.8,
                  arg_4=.85, arg_5=.15, arg_6=False):
    """
    Utility for creating continuous palette from the cubehelix system.

    This produces a colormap with linearly-decreasing (or increasing)
    brightness. That means that information will be preserved if printed to
    black and white or viewed by someone who is colorblind.

    Parameters
    ----------
    start : float (0 <= start <= 3)
        The hue at the start of the helix.
    rot : float
        Rotations around the hue wheel over the range of the palette.
    gamma : float (0 <= gamma)
        Gamma factor to emphasize darker (gamma < 1) or lighter (gamma > 1)
        colors.
    hue : float (0 <= hue <= 1)
        Saturation of the colors.
    dark : float (0 <= dark <= 1)
        Intensity of the darkest color in the palette.
    light : float (0 <= light <= 1)
        Intensity of the lightest color in the palette.
    reverse : bool
        If True, the palette will go from dark to light.

    Returns
    -------
    out : function
        Continuous color palette that takes a single
        :class:`int` parameter ``n`` and returns ``n``
        equally spaced colors.

    References
    ----------
    Green, D. A. (2011). "A colour scheme for the display of astronomical
    intensity images". Bulletin of the Astromical Society of India, Vol. 39,
    p. 289-295.

    Examples
    --------
    >>> palette = Func()
    >>> palette(5)
    ['#edd1cb', '#d499a7', '#aa688f', '#6e4071', '#2d1e3e']
    """
    arg_7 = mpl._cm.cubehelix(arg_2, arg_0, arg_1, arg_3)
    arg_8 = mpl.colors.LinearSegmentedColormap('cubehelix', arg_7)

    def Funcette(arg_9):
        arg_10 = np.linspace(arg_4, arg_5, arg_9)
        return [mcolors.rgb2hex(arg_8(arg_11)) for arg_11 in arg_10]

    return Funcette

Utility for creating continuous palette from the cubehelix system.

    This produces a colormap with linearly-decreasing (or increasing)
    brightness. That means that information will be preserved if printed to
    black and white or viewed by someone who is colorblind.

    Parameters
    ----------
    start : float (0 <= start <= 3)
        The hue at the start of the helix.
    rot : float
        Rotations around the hue wheel over the range of the palette.
    gamma : float (0 <= gamma)
        Gamma factor to emphasize darker (gamma < 1) or lighter (gamma > 1)
        colors.
    hue : float (0 <= hue <= 1)
        Saturation of the colors.
    dark : float (0 <= dark <= 1)
        Intensity of the darkest color in the palette.
    light : float (0 <= light <= 1)
        Intensity of the lightest color in the palette.
    reverse : bool
        If True, the palette will go from dark to light.

    Returns
    -------
    out : function
        Continuous color palette that takes a single
        :class:`int` parameter ``n`` and returns ``n``
        equally spaced colors.

    References
    ----------
    Green, D. A. (2011). "A colour scheme for the display of astronomical
    intensity images". Bulletin of the Astromical Society of India, Vol. 39,
    p. 289-295.

    Examples
    --------
    >>> palette = cubehelix_pal()
    >>> palette(5)
    ['#edd1cb', '#d499a7', '#aa688f', '#6e4071', '#2d1e3e']

Utility for creating continuous palette from the cubehelix system .


return (self.model(m).data.cpu().numpy()-.5) * 2

def Func(arg_0, arg_1, arg_2, arg_3=None):
        """Infer causal directions using the trained NCC pairwise model.

        Args:
            a (numpy.ndarray): Variable 1
            b (numpy.ndarray): Variable 2
            device (str): Device to run the algorithm on (defaults to ``cdt.SETTINGS.default_device``)

        Returns:
            float: Causation score (Value : 1 if a->b and -1 if b->a)
        """
        arg_3 = SETTINGS.get_default(arg_3=arg_3)
        if arg_0.model is None:
            print('Model has to be trained before doing any predictions')
            raise ValueError
        if len(np.array(arg_1).shape) == 1:
            arg_1 = np.array(arg_1).reshape((-1, 1))
            arg_2 = np.array(arg_2).reshape((-1, 1))
        arg_4 = np.hstack((arg_1, arg_2))
        arg_4 = scale(arg_4)
        arg_4 = arg_4.astype('float32')
        arg_4 = th.from_numpy(arg_4).t().unsqueeze(0)

        if th.cuda.is_available():
            arg_4 = arg_4.cuda()

        return (arg_0.model(arg_4).data.cpu().numpy()-.5) * 2

Infer causal directions using the trained NCC pairwise model .


async
def
Func
(
arg_0
)
:
arg_1
=
await
arg_0
.
text
(
)
if
arg_0
.
headers
[
'Content-Type'
]
==
'application/json; charset=utf-8'
:
return
json
.
loads
(
arg_1
)
return
arg_1

async def Func(arg_0):
    """Turns response into a properly formatted json or text object"""
    arg_1 = await arg_0.text()
    if arg_0.headers['Content-Type'] == 'application/json; charset=utf-8':
        return json.loads(arg_1)
    return arg_1


def
Func
(
arg_0
,
arg_1
)
:
try
:
arg_2
=
ElementTree
.
parse
(
arg_1
)
except
ElementTree
.
ParseError
,
err
:
raise
ValueError
(
"Invalid roster format: {0}"
.
format
(
err
)
)
arg_3
=
Roster
.
from_xml
(
arg_2
.
getroot
(
)
)
for
arg_4
in
arg_3
:
arg_4
.
verify_roster_result
(
True
)
arg_0
.
roster
=
arg_3

def Func(arg_0, arg_1):
        """Load roster from an XML file.

        Can be used before the connection is started to load saved
        roster copy, for efficient retrieval of versioned roster.

        :Parameters:
            - `source`: file name or a file object
        :Types:
            - `source`: `str` or file-like object
        """
        try:
            arg_2 = ElementTree.parse(arg_1)
        except ElementTree.ParseError, err:
            raise ValueError("Invalid roster format: {0}".format(err))
        arg_3 = Roster.from_xml(arg_2.getroot())
        for arg_4 in arg_3:
            arg_4.verify_roster_result(True)
        arg_0.roster = arg_3


def Func ( arg_0 , arg_1 ) : if not ip_pat . match ( arg_1 ) : arg_1 = socket . gethostbyname ( arg_1 ) return disambiguate_url ( arg_0 , arg_1 )

def Func(arg_0, arg_1):
    """accept either IP address or dns name, and return IP"""
    if not ip_pat.match(arg_1):
        arg_1 = socket.gethostbyname(arg_1)
    return disambiguate_url(arg_0, arg_1)

accept either IP address or dns name and return IP


def Func(arg_0):
        """analyze every unanalyzed ABF in the folder."""
        arg_1=str(arg_0.files2)
        arg_0.log.debug("considering analysis for %d ABFs",len(arg_0.IDs))
        for arg_2 in arg_0.IDs:
            if not arg_2+"_" in arg_1:
                arg_0.log.debug("%s needs analysis",arg_2)
                try:
                    arg_0.analyzeABF(arg_2)
                except:
                    print("EXCEPTION! "*100)
            else:
                arg_0.log.debug("%s has existing analysis, not overwriting",arg_2)
        arg_0.log.debug("verified analysis of %d ABFs",len(arg_0.IDs))

analyze every unanalyzed ABF in the folder .


(
    ctx: GeneratorContext,
    node: Fn,
    method: FnMethod,
    def_name: Optional[str] = None,
    meta_node: Optional[MetaNode] = None,
)

def Func ( arg_0 : arg_1 , arg_2 : arg_3 , arg_4 : arg_5 , arg_6 : arg_7 [ arg_8 ] = None , arg_9 : arg_7 [ arg_10 ] = None , ) -> GeneratedPyAST : assert arg_2 . op == NodeOp . FN assert arg_4 . op == NodeOp . FN_METHOD arg_11 = arg_2 . local . name if arg_2 . local is not None else None arg_12 = __fn_name ( arg_11 ) if arg_6 is None else munge ( arg_6 ) arg_13 = ast . AsyncFunctionDef if arg_2 . is_async else ast . FunctionDef with arg_0 . new_symbol_table ( arg_12 ) , arg_0 . new_recur_point ( arg_4 . loop_id , RecurType . FN , is_variadic = arg_2 . is_variadic ) : if arg_11 is not None : arg_0 . symbol_table . new_symbol ( sym . symbol ( arg_11 ) , arg_12 , LocalType . FN ) arg_14 , arg_15 , arg_16 = __fn_args_to_py_ast ( arg_0 , arg_4 . params , arg_4 . body ) arg_17 , arg_18 = __fn_meta ( arg_0 , arg_9 ) return GeneratedPyAST ( arg_2 = ast . Name ( id = arg_12 , arg_0 = ast . Load ( ) ) , dependencies = list ( chain ( arg_17 , [ arg_13 ( name = arg_12 , args = ast . arguments ( args = arg_14 , kwarg = None , vararg = arg_15 , kwonlyargs = [ ] , defaults = [ ] , kw_defaults = [ ] , ) , body = arg_16 , decorator_list = list ( chain ( arg_18 , [ _BASILISP_FN_FN_NAME ] , [ _TRAMPOLINE_FN_NAME ] if arg_0 . recur_point . has_recur else [ ] , ) ) , returns = None , ) ] , ) ) , )

def Func(
    arg_0: arg_1,
    arg_2: arg_3,
    arg_4: arg_5,
    arg_6: arg_7[arg_8] = None,
    arg_9: arg_7[arg_10] = None,
) -> GeneratedPyAST:
    """Return a Python AST node for a function with a single arity."""
    assert arg_2.op == NodeOp.FN
    assert arg_4.op == NodeOp.FN_METHOD

    arg_11 = arg_2.local.name if arg_2.local is not None else None
    arg_12 = __fn_name(arg_11) if arg_6 is None else munge(arg_6)
    arg_13 = ast.AsyncFunctionDef if arg_2.is_async else ast.FunctionDef
    with arg_0.new_symbol_table(arg_12), arg_0.new_recur_point(
        arg_4.loop_id, RecurType.FN, is_variadic=arg_2.is_variadic
    ):
        # Allow named anonymous functions to recursively call themselves
        if arg_11 is not None:
            arg_0.symbol_table.new_symbol(
                sym.symbol(arg_11), arg_12, LocalType.FN
            )

        arg_14, arg_15, arg_16 = __fn_args_to_py_ast(
            arg_0, arg_4.params, arg_4.body
        )
        arg_17, arg_18 = __fn_meta(arg_0, arg_9)
        return GeneratedPyAST(
            arg_2=ast.Name(id=arg_12, arg_0=ast.Load()),
            dependencies=list(
                chain(
                    arg_17,
                    [
                        arg_13(
                            name=arg_12,
                            args=ast.arguments(
                                args=arg_14,
                                kwarg=None,
                                vararg=arg_15,
                                kwonlyargs=[],
                                defaults=[],
                                kw_defaults=[],
                            ),
                            body=arg_16,
                            decorator_list=list(
                                chain(
                                    arg_18,
                                    [_BASILISP_FN_FN_NAME],
                                    [_TRAMPOLINE_FN_NAME]
                                    if arg_0.recur_point.has_recur
                                    else [],
                                )
                            ),
                            returns=None,
                        )
                    ],
                )
            ),
        )

Return a Python AST node for a function with a single arity .


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Make a post request with an auth token acquired for a specific user to a SuccessFactors endpoint.

        Args:
            sap_user_id (str): The user to use to retrieve an auth token.
            url (str): The url to post to.
            payload (str): The json encoded payload to post.
        """
        arg_4 = apps.get_model(  # pylint: disable=invalid-name
            'sap_success_factors',
            'SAPSuccessFactorsEnterpriseCustomerConfiguration'
        )
        arg_5, arg_6 = SAPSuccessFactorsAPIClient.get_oauth_access_token(
            arg_0.enterprise_configuration.sapsf_base_url,
            arg_0.enterprise_configuration.key,
            arg_0.enterprise_configuration.secret,
            arg_0.enterprise_configuration.sapsf_company_id,
            arg_1,
            arg_4.USER_TYPE_USER
        )

        arg_7 = requests.post(
            arg_2,
            data=arg_3,
            headers={
                'Authorization': 'Bearer {}'.format(arg_5),
                'content-type': 'application/json'
            }
        )

        return arg_7.status_code, arg_7.text

Make a post request with an auth token acquired for a specific user to a SuccessFactors endpoint .


(self, entry, with_location=True, debug=False)

def Func(arg_0, arg_1, arg_2=True, arg_3=False):
        """Saves a DayOneEntry as a plist"""
        arg_4 = {}
        if isinstance(arg_1, DayOneEntry):
            # Get a dict of the DayOneEntry
            arg_4 = arg_1.as_dict()
        else:
            arg_4 = arg_1

        # Set the UUID
        arg_4['UUID'] = uuid.uuid4().get_hex()
        if arg_2 and not arg_4['Location']:
            arg_4['Location'] = arg_0.get_location()

        # Do we have everything needed?
        if not all ((arg_4['UUID'], arg_4['Time Zone'],
                     arg_4['Entry Text'])):
            print "You must provide: Time zone, UUID, Creation Date, Entry Text"
            return False

        if arg_3 is False:
            arg_5 = arg_0._file_path(arg_4['UUID'])
            plistlib.writePlist(arg_4, arg_5)
        else:
            arg_6 = plistlib.writePlistToString(arg_4)
            print arg_6

        return True


def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , basestring ) and arg_1 . count ( '-' ) == 2 and len ( arg_1 ) > 9 : try : arg_2 = dateutil . parser . parse ( arg_1 ) if arg_1 . endswith ( ( '+00:00' , '-00:00' , 'Z' ) ) : arg_2 = arg_2 . replace ( tzinfo = None ) return arg_2 except ( TypeError , ValueError ) : pass return arg_1

def Func(arg_0, arg_1):
    """Tries to decode strings that look like dates into datetime objects."""
    if isinstance(arg_1, basestring) and arg_1.count('-') == 2 and len(arg_1) > 9:
      try:
        arg_2 = dateutil.parser.parse(arg_1)
        # Check for UTC.
        if arg_1.endswith(('+00:00', '-00:00', 'Z')):
          # Then remove tzinfo for gae, which is offset-naive.
          arg_2 = arg_2.replace(tzinfo=None)
        return arg_2
      except (TypeError, ValueError):
        pass
    return arg_1

Tries to decode strings that look like dates into datetime objects .


def Func ( arg_0 ) : arg_1 = arg_0 . communicationChannel . receive_finished ( ) arg_0 . nruns -= len ( arg_1 ) return arg_1

def Func(arg_0):
        """Return pairs of run ids and results of finish event loops.
        """
        arg_1 = arg_0.communicationChannel.receive_finished()
        arg_0.nruns -= len(arg_1)
        return arg_1

Return pairs of run ids and results of finish event loops .


def Func(arg_0, arg_1):
        """
        Return extracted text  from an ExtractedLicense or None.
        """
        arg_2 = list(arg_0.graph.triples((arg_1, arg_0.spdx_namespace['extractedText'], None)))
        if not arg_2:
            arg_0.error = True
            arg_4 = 'Extracted license must have extractedText property'
            arg_0.logger.log(arg_4)
            return

        if len(arg_2) > 1:
            arg_0.more_than_one_error('extracted license text')
            return

        arg_5 = arg_2[0]
        arg_6, arg_7, arg_8 = arg_5
        return arg_8

Return extracted text from an ExtractedLicense or None .


def Func ( arg_0 , arg_1 ) : arg_0 . entities . remove ( arg_1 ) arg_0 . padaos . Func ( arg_1 )

def Func(arg_0, arg_1):
        """Unload an entity"""
        arg_0.entities.remove(arg_1)
        arg_0.padaos.Func(arg_1)


def Func ( arg_0 ) : if arg_0 . port in ( 465 , "465" ) : arg_1 = arg_0 . _get_ssl ( ) elif arg_0 . port in ( 587 , "587" ) : arg_1 = arg_0 . _get_tls ( ) try : arg_1 . login ( arg_0 . from_ , arg_0 . _auth ) except SMTPResponseException as e : raise MessageSendError ( e . smtp_error . decode ( "unicode_escape" ) ) return arg_1

def Func(arg_0):
        """Start session with email server."""
        if arg_0.port in (465, "465"):
            arg_1 = arg_0._get_ssl()
        elif arg_0.port in (587, "587"):
            arg_1 = arg_0._get_tls()

        try:
            arg_1.login(arg_0.from_, arg_0._auth)
        except SMTPResponseException as e:
            raise MessageSendError(e.smtp_error.decode("unicode_escape"))

        return arg_1


def Func(arg_0, arg_1, arg_2):
    """Attempts to fetch streams repeatedly
       until some are returned or limit hit."""

    try:
        arg_3 = fetch_streams(arg_0)
    except PluginError as err:
        log.error(u"{0}", err)
        arg_3 = None

    if not arg_3:
        log.info("Waiting for streams, retrying every {0} "
                 "second(s)", arg_1)
    arg_4 = 0

    while not arg_3:
        sleep(arg_1)

        try:
            arg_3 = fetch_streams(arg_0)
        except FatalPluginError as err:
            raise
        except PluginError as err:
            log.error(u"{0}", err)

        if arg_2 > 0:
            arg_4 += 1
            if arg_4 >= arg_2:
                break

    return arg_3

Attempts to fetch streams repeatedly until some are returned or limit hit .


def Func ( arg_0 , arg_1 ) : arg_1 . write ( Operators . ITEBV ( arg_1 . size , Operators . OR ( arg_0 . CF , arg_0 . ZF ) == False , 1 , 0 ) )

def Func(arg_0, arg_1):
        """
        Sets byte if above.

        Sets the destination operand to 0 or 1 depending on the settings of the status flags (CF, SF, OF, ZF, and PF, 1, 0) in the
        EFLAGS register. The destination operand points to a byte register or a byte in memory. The condition code suffix
        (cc, 1, 0) indicates the condition being tested for::
                IF condition
                THEN
                    DEST = 1;
                ELSE
                    DEST = 0;
                FI;

        :param cpu: current CPU.
        :param dest: destination operand.
         """
        arg_1.write(Operators.ITEBV(arg_1.size, Operators.OR(arg_0.CF, arg_0.ZF) == False, 1, 0))


def Func(arg_0, arg_1, arg_2):
        """Dispatches a context on a given opcode. Returns True if the context
        is done matching, False if it must be resumed when next encountered."""
        if arg_7(arg_2) in arg_0.executing_contexts:
            arg_3 = arg_0.executing_contexts[arg_7(arg_2)]
            del arg_0.executing_contexts[arg_7(arg_2)]
            arg_4 = arg_3.next()
        else:
            arg_5 = arg_0.DISPATCH_TABLE.get(arg_1, _OpcodeDispatcher.unknown)
            arg_4 = arg_5(arg_0, arg_2)
            if hasattr(arg_4, "next"): # avoid using the types module
                arg_3 = arg_4
                arg_4 = arg_3.next()
        if not arg_4:
            arg_0.executing_contexts[arg_7(arg_2)] = arg_3
        return arg_4

Dispatches a context on a given opcode . Returns True if the context is done matching False if it must be resumed when next encountered .


def Func(arg_0, arg_1):
        """Turn a mongodb-style search dict into an SQL query."""
        arg_2 = []
        arg_3 = []

        arg_4 = set(arg_1.keys())
        arg_4.difference_update(set(arg_0._keys))
        arg_4.difference_update(set(['buffers', 'result_buffers']))
        if arg_4:
            raise KeyError("Illegal testing key(s): %s"%arg_4)

        for arg_5,arg_6 in arg_1.iteritems():
            if isinstance(arg_6, dict):
                for arg_7,arg_8 in arg_6.iteritems():
                    try:
                        arg_9 = operators[arg_7]
                    except KeyError:
                        raise KeyError("Unsupported operator: %r"%arg_7)
                    if isinstance(arg_9, tuple):
                        arg_9, arg_10 = arg_9

                    if arg_8 is None and arg_9 in null_operators:
                        arg_11 = "%s %s" % (arg_5, null_operators[arg_9])
                    else:
                        arg_11 = "%s %s ?"%(arg_5, arg_9)
                        if isinstance(arg_8, (tuple,list)):
                            if arg_9 in null_operators and any([arg_12 is None for arg_12 in arg_8]):
                                # equality tests don't work with NULL
                                raise ValueError("Cannot use %r test with NULL values on SQLite backend"%arg_7)
                            arg_11 = '( %s )'%( arg_10.join([arg_11]*len(arg_8)) )
                            arg_3.extend(arg_8)
                        else:
                            arg_3.append(arg_8)
                    arg_2.append(arg_11)
            else:
                # it's an equality check
                if arg_6 is None:
                    arg_2.append("%s IS NULL" % arg_5)
                else:
                    arg_2.append("%s = ?"%arg_5)
                    arg_3.append(arg_6)

        arg_11 = " AND ".join(arg_2)
        return arg_11, arg_3

Turn a mongodb - style search dict into an SQL query .


(local_path, remote_name, remote_path, demote=True)

def Func(arg_0, arg_1, arg_2, arg_3=True):
    """Copy a path from inside a Dusty container to a path on the
    local filesystem. The path on the local filesystem must be
    wrist-accessible by the user specified in mac_username."""
    if not container_path_exists(arg_1, arg_2):
        raise RuntimeError('ERROR: Path {} does not exist inside container {}.'.format(arg_2, arg_1))
    arg_4 = str(uuid.uuid1())
    copy_path_inside_container(arg_1, arg_2, os.path.join(constants.CONTAINER_CP_DIR, arg_4))
    arg_5 = os.path.join(vm_cp_path(arg_1), arg_4)
    arg_6 = vm_path_is_directory(arg_5)
    sync_local_path_from_vm(arg_0, arg_5, arg_3=arg_3, arg_6=arg_6)

Copy a path from inside a Dusty container to a path on the local filesystem . The path on the local filesystem must be wrist - accessible by the user specified in mac_username .


def Func ( arg_0 , arg_1 = None , arg_2 = None ) : arg_3 = copy . copy ( arg_0 ) _bound_waveform ( arg_3 , arg_1 , arg_2 ) return np . trapz ( arg_3 . _dep_vector , arg_3 . _indep_vector )

def Func(arg_0, arg_1=None, arg_2=None):
    r"""
    Return the numerical integral of a waveform's dependent variable vector.

    The method used is the `trapezoidal
    <https://en.wikipedia.org/wiki/Trapezoidal_rule>`_ method

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

    :param indep_min: Independent vector start point of computation
    :type  indep_min: integer or float

    :param indep_max: Independent vector stop point of computation
    :type  indep_max: integer or float

    :rtype: float

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

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

     * RuntimeError (Argument \`indep_min\` is not valid)

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

     * RuntimeError (Incongruent \`indep_min\` and \`indep_max\`
       arguments)

    .. [[[end]]]
    """
    arg_3 = copy.copy(arg_0)
    _bound_waveform(arg_3, arg_1, arg_2)
    return np.trapz(arg_3._dep_vector, arg_3._indep_vector)

r"""
    Return the numerical integral of a waveform's dependent variable vector.

    The method used is the `trapezoidal
    <https://en.wikipedia.org/wiki/Trapezoidal_rule>`_ method

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

    :param indep_min: Independent vector start point of computation
    :type  indep_min: integer or float

    :param indep_max: Independent vector stop point of computation
    :type  indep_max: integer or float

    :rtype: float

    .. [[[cog cog.out(exobj_eng.get_sphinx_autodoc(raised=True)) ]]]
    .. Auto-generated exceptions documentation for
    .. peng.wave_functions.nintegral

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

     * RuntimeError (Argument \`indep_min\` is not valid)

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

     * RuntimeError (Incongruent \`indep_min\` and \`indep_max\`
       arguments)

    .. [[[end]]]

r Return the numerical integral of a waveform s dependent variable vector .


(self, df, classes, pheno_pos, pheno_neg)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = len ( arg_2 ) if len ( arg_2 ) >= 6 else 5 arg_6 = list ( map ( lambda x : True if x == arg_3 else False , arg_2 ) ) arg_7 = list ( map ( lambda x : True if x == arg_4 else False , arg_2 ) ) arg_8 = arg_1 . loc [ : , arg_6 ] arg_9 = arg_1 . loc [ : , arg_7 ] arg_10 = pd . concat ( [ arg_8 , arg_9 ] , axis = 1 ) arg_0 . _width = arg_5 arg_0 . heatmat = arg_10 return

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """only use for gsea heatmap"""
        arg_5 = len(arg_2) if len(arg_2) >= 6 else  5
        arg_6 =list(map(lambda x: True if x == arg_3 else False, arg_2))
        arg_7 =list(map(lambda x: True if x == arg_4 else False, arg_2))
        arg_8 = arg_1.loc[:, arg_6]
        arg_9 = arg_1.loc[:, arg_7]
        arg_10=pd.concat([arg_8,arg_9], axis=1)
        arg_0._width = arg_5
        arg_0.heatmat = arg_10
        return


def
Func
(
arg_0
)
:
arg_1
=
get_session
(
)
Func
=
arg_1
.
query
(
RecordedEvent
)
.
filter
(
RecordedEvent
.
uid
==
arg_0
)
.
first
(
)
or
arg_1
.
query
(
UpcomingEvent
)
.
filter
(
UpcomingEvent
.
uid
==
arg_0
)
.
first
(
)
if
Func
:
return
make_data_response
(
Func
.
serialize
(
)
)
return
make_error_response
(
'No event with specified uid'
,
404
)

def Func(arg_0):
    '''Return a specific events JSON
    '''
    arg_1 = get_session()
    Func = arg_1.query(RecordedEvent).filter(RecordedEvent.uid == arg_0).first() \
        or arg_1.query(UpcomingEvent).filter(UpcomingEvent.uid == arg_0).first()

    if Func:
        return make_data_response(Func.serialize())
    return make_error_response('No event with specified uid', 404)


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . list_characteristics ( ) : if arg_2 . uuid == arg_1 : return arg_2 return None

def Func(arg_0, arg_1):
        """Return the first child characteristic found that has the specified
        UUID.  Will return None if no characteristic that matches is found.
        """
        for arg_2 in arg_0.list_characteristics():
            if arg_2.uuid == arg_1:
                return arg_2
        return None

Return the first child characteristic found that has the specified UUID . Will return None if no characteristic that matches is found .


(self, regid, params={},
                                  include_courses=True)

def Func(arg_0, arg_1, arg_2={},
                                  arg_3=True):
        """
        Return a list of enrollments for the passed user regid.

        https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index
        """
        arg_4 = arg_0._sis_id(arg_1, sis_field="user")
        arg_5 = USERS_API.format(arg_4) + "/enrollments"

        arg_6 = Courses() if arg_3 else None

        arg_7 = []
        for arg_8 in arg_0._get_paged_resource(arg_5, arg_2=arg_2):
            arg_9 = CanvasEnrollment(data=arg_8)
            if arg_3:
                arg_10 = arg_8["course_id"]
                arg_11 = arg_6.get_course(arg_10)

                if arg_11.sis_course_id is not None:
                    arg_9.course = arg_11
                    # the following 3 lines are not removed
                    # to be backward compatible.
                    arg_9.course_url = arg_11.course_url
                    arg_9.course_name = arg_11.name
                    arg_9.sis_course_id = arg_11.sis_course_id
            else:
                arg_9.course_url = re.sub(
                    r'/users/\d+$', '', arg_9.html_url)

            arg_7.append(arg_9)
        return arg_7

Return a list of enrollments for the passed user regid .


def Func(arg_0):
		"Draws the graph title and subtitle"
		if arg_0.show_graph_title:
			arg_0.draw_graph_title()
		if arg_0.show_graph_subtitle:
			arg_0.draw_graph_subtitle()
		if arg_0.show_x_title:
			arg_0.draw_x_title()
		if arg_0.show_y_title:
			arg_0.draw_y_title()


(self, title, teamId=None, **request_parameters)

def Func(arg_0, arg_1, arg_2=None, **arg_3):
        """Create a room.

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

        Args:
            title(basestring): A user-friendly name for the room.
            teamId(basestring): The team ID with which this room is
                associated.
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            Room: A Room with the details of the Funcd room.

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

        """
        check_type(arg_1, basestring)
        check_type(arg_2, basestring)

        arg_4 = dict_from_items_with_values(
            arg_3,
            arg_1=arg_1,
            arg_2=arg_2,
        )

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

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

Create a room.

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

        Args:
            title(basestring): A user-friendly name for the room.
            teamId(basestring): The team ID with which this room is
                associated.
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            Room: A Room with the details of the created room.

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


(store, institute_obj, case_obj, base_url)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
)
:
arg_4
=
{
}
arg_4
[
'sample_id'
]
=
[
ind
[
'individual_id'
]
for
ind
in
arg_2
[
'individuals'
]
]
arg_5
=
set
(
)
arg_6
=
[
]
for
arg_7
in
arg_2
.
get
(
'panels'
,
[
]
)
:
if
not
arg_7
.
get
(
'is_default'
)
:
continue
arg_8
=
arg_0
.
gene_panel
(
arg_7
[
'panel_name'
]
,
version
=
arg_7
.
get
(
'version'
)
)
arg_9
=
"{} ({})"
.
format
(
arg_8
[
'display_name'
]
,
arg_8
[
'version'
]
)
arg_6
.
append
(
arg_9
)
arg_6
=
' ,'
.
join
(
arg_6
)
arg_4
[
'panel_name'
]
=
arg_6
arg_4
[
'level'
]
=
arg_1
.
get
(
'coverage_cutoff'
,
15
)
arg_10
=
requests
.
get
(
arg_3
+
'reports/report'
,
params
=
arg_4
)
arg_11
=
BeautifulSoup
(
arg_10
.
text
)
for
arg_12
in
arg_11
.
find_all
(
'a'
)
:
arg_12
.
replaceWith
(
''
)
arg_13
=
''
.
join
(
[
'%s'
%
x
for
x
in
arg_11
.
body
.
contents
]
)
return
arg_13

def Func(arg_0, arg_1, arg_2, arg_3):
    """Posts a request to chanjo-report and capture the body of the returned response to include it in case report

    Args:
        store(adapter.MongoAdapter)
        institute_obj(models.Institute)
        case_obj(models.Case)
        base_url(str): base url of server

    Returns:
        coverage_data(str): string rendering of the content between <body </body> tags of a coverage report
    """

    arg_4 = {}
    # extract sample ids from case_obj and add them to the post request object:
    arg_4['sample_id'] = [ ind['individual_id'] for ind in arg_2['individuals'] ]

    # extract default panel names and default genes from case_obj and add them to the post request object
    arg_5 = set()
    arg_6 = []
    for arg_7 in arg_2.get('panels', []):
        if not arg_7.get('is_default'):
            continue
        arg_8 = arg_0.gene_panel(arg_7['panel_name'], version=arg_7.get('version'))
        arg_9 = "{} ({})".format(arg_8['display_name'], arg_8['version'])
        arg_6.append(arg_9)
    arg_6 = ' ,'.join(arg_6)
    arg_4['panel_name'] = arg_6

    # add institute-specific cutoff level to the post request object
    arg_4['level'] = arg_1.get('coverage_cutoff', 15)

    #send get request to chanjo report
    arg_10 = requests.get(arg_3+'reports/report', params=arg_4)

    #read response content
    arg_11 = BeautifulSoup(arg_10.text)

    # remove links in the printed version of coverage report
    for arg_12 in arg_11.find_all('a'):
        arg_12.replaceWith('')

    #extract body content using BeautifulSoup
    arg_13 = ''.join(['%s' % x for x in arg_11.body.contents])

    return arg_13

Posts a request to chanjo - report and capture the body of the returned response to include it in case report


def Func():
    """
        Retrieves services starts check_service in a gevent pool of 100.
    """
    arg_0 = ServiceSearch()
    arg_1 = arg_0.get_services(up=True, tags=['!header_scan'])
    print_notification("Scanning {} services".format(len(arg_1)))

    # Disable the insecure request warning
    urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

    arg_2 = Pool(100)
    arg_3 = 0
    for arg_4 in arg_1:
        arg_3 += 1
        if arg_3 % 50 == 0:
            print_notification("Checking {}/{} services".format(arg_3, len(arg_1)))
        arg_2.spawn(check_service, arg_4)

    arg_2.join()
    print_notification("Completed, 'http' tag added to services that respond to http, 'https' tag added to services that respond to https.")

Retrieves services starts check_service in a gevent pool of 100 .


(self, app_label, schema_editor, models)

def Func(arg_0, arg_1, arg_2, arg_3):
        """Truncate tables."""
        for arg_4 in arg_3:
            arg_5 = '%s_%s' % (arg_1, arg_4)
            arg_2.execute(
                'TRUNCATE TABLE %s RESTART IDENTITY CASCADE' % (
                    arg_5.lower(),
                ),
            )


def Func ( arg_0 ) : if arg_0 . status : PyFunceble . INTERN [ "Funcer" ] [ "number" ] [ "tested" ] += 1 if ( arg_0 . status . lower ( ) in PyFunceble . STATUS [ "list" ] [ "up" ] or arg_0 . status . lower ( ) in PyFunceble . STATUS [ "list" ] [ "valid" ] ) : PyFunceble . INTERN [ "Funcer" ] [ "number" ] [ "up" ] += 1 elif arg_0 . status . lower ( ) in PyFunceble . STATUS [ "list" ] [ "down" ] : PyFunceble . INTERN [ "Funcer" ] [ "number" ] [ "down" ] += 1 else : PyFunceble . INTERN [ "Funcer" ] [ "number" ] [ "invalid" ] += 1

def Func(arg_0):
        """
        Count the number of domain for each status.
        """

        if arg_0.status:
            # The status is parsed.

            # We increase the number of tested.
            PyFunceble.INTERN["Funcer"]["number"]["tested"] += 1

            if (
                arg_0.status.lower() in PyFunceble.STATUS["list"]["up"]
                or arg_0.status.lower() in PyFunceble.STATUS["list"]["valid"]
            ):
                # The status is in the list of up status.

                # We increase the number of up.
                PyFunceble.INTERN["Funcer"]["number"]["up"] += 1
            elif arg_0.status.lower() in PyFunceble.STATUS["list"]["down"]:
                # The status is in the list of down status.

                # We increase the number of down.
                PyFunceble.INTERN["Funcer"]["number"]["down"] += 1
            else:
                # The status is not in the list of up nor down status.

                # We increase the number of invalid.
                PyFunceble.INTERN["Funcer"]["number"]["invalid"] += 1

Count the number of domain for each status .


def Func ( arg_0 , Func ) : if arg_0 . invoked_subcommand not in [ 'create' , 'list' ] : arg_0 . obj = arg_0 . obj or { } arg_0 . obj [ 'project' ] = Func

def Func(arg_0, Func):  # pylint:disable=redefined-outer-name
    """Commands for projects."""
    if arg_0.invoked_subcommand not in ['create', 'list']:
        arg_0.obj = arg_0.obj or {}
        arg_0.obj['project'] = Func


def Func ( arg_0 ) : arg_1 = sp . Popen ( [ '/usr/bin/env' , 'which' , arg_0 ] , stdout = sp . PIPE , stderr = sp . PIPE ) . communicate ( ) [ 0 ] return py3compat . bytes_to_str ( arg_1 )

def Func(arg_0):
    """Find the full path to a command using which."""

    arg_1 = sp.Popen(['/usr/bin/env', 'which', arg_0],
                    stdout=sp.PIPE, stderr=sp.PIPE).communicate()[0]
    return py3compat.bytes_to_str(arg_1)

Find the full path to a command using which .


def Func ( arg_0 , arg_1 = arg_2 . printout ) : arg_4 = arg_0 . _generate_table_ ( ) if arg_1 == arg_2 . printout : print ( tabulate ( arg_4 , headers = "firstrow" , tablefmt = "simple" ) ) elif arg_1 == arg_2 . latex : arg_0 . _Func_latex_ ( arg_4 ) elif arg_1 == arg_2 . txt : arg_0 . _Func_txt_ ( arg_4 ) elif arg_1 == arg_2 . csv : arg_0 . _Func_csv_ ( arg_4 ) elif arg_1 == arg_2 . string : return str ( tabulate ( arg_4 , headers = "firstrow" , tablefmt = "simple" ) ) elif arg_1 == arg_2 . matplotlib : arg_0 . _Func_matplotlib_ ( ) elif arg_1 == arg_2 . png : if arg_0 . output_path is None : arg_0 . _Func_matplotlib_ ( ) else : arg_0 . _Func_matplotlib_ ( True )

def Func(arg_0, arg_1=arg_2.printout):
        """
        Render the report in the specified format

        :param format: The format. The default format is to print
          the report to the console.

        :returns: If the format was set to 'string' then a string
          representation of the report is returned.
        """

        arg_4 = arg_0._generate_table_()
        if arg_1 == arg_2.printout:
            print(tabulate(arg_4, headers="firstrow", tablefmt="simple"))
        elif arg_1 == arg_2.latex:
            arg_0._Func_latex_(arg_4)
        elif arg_1 == arg_2.txt:
            arg_0._Func_txt_(arg_4)
        elif arg_1 == arg_2.csv:
            arg_0._Func_csv_(arg_4)
        elif arg_1 == arg_2.string:
            return str(tabulate(arg_4, headers="firstrow", tablefmt="simple"))
        elif arg_1 == arg_2.matplotlib:
            arg_0._Func_matplotlib_()
        elif arg_1 == arg_2.png:
            if arg_0.output_path is None:
                arg_0._Func_matplotlib_()
            else:
                arg_0._Func_matplotlib_(True)


(self, name, bolt_cls, par, inputs, config=None, optional_outputs=None)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5=None, arg_6=None):
    """Add a bolt to the topology"""
    arg_7 = arg_2.spec(arg_1=arg_1, arg_3=arg_3, arg_4=arg_4, arg_5=arg_5,
                              arg_6=arg_6)
    arg_0.add_spec(arg_7)
    return arg_7


def Func(arg_0: arg_1) -> Callable[..., Any]:
    """Returns a metric callable with a corresponding name."""
    if arg_0 not in _REGISTRY:
        raise ConfigError(f'"{name}" is not registered as a metric')
    return fn_from_str(_REGISTRY[arg_0])

Returns a metric callable with a corresponding name .


(self, object, context, maxlevels, level)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : try : return PrettyPrinter . Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) except HANDLED_EXCEPTIONS as e : return _Func_exception ( e ) , True , False

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """
        Format an item in the result.
        Could be a dictionary key, value, etc..
        """
        try:
            return PrettyPrinter.Func(arg_0, arg_1, arg_2, arg_3, arg_4)
        except HANDLED_EXCEPTIONS as e:
            return _Func_exception(e), True, False

Format an item in the result . Could be a dictionary key value etc ..


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ arg_0 . Func ( n , arg_2 ) for ( n , _ ) in arg_1 . transition_links if n . generalized_idxs . issuperset ( arg_2 ) ] if arg_3 == [ ] : return arg_1 arg_4 = max ( arg_3 , key = lambda n : n . depth ) return arg_4

def Func(arg_0, arg_1, arg_2):
        """Helper method that finds LCS by traversing the labeled GSD."""
        arg_3 = [arg_0.Func(n, arg_2)
            for (n,_) in arg_1.transition_links
            if n.generalized_idxs.issuperset(arg_2)]

        if arg_3 == []:
            return arg_1

        arg_4 = max(arg_3, key=lambda n: n.depth)
        return arg_4

Helper method that finds LCS by traversing the labeled GSD .


def Func(arg_0, arg_1=True):
    '''Validate whether a variable contains valid, mono audio data.

    Parameters
    ----------
    y : np.ndarray
      The input data to validate

    mono : bool
      Whether or not to force monophonic audio

    Returns
    -------
    valid : bool
        True if all tests pass

    Raises
    ------
    ParameterError
        If `y` fails to meet the following criteria:
            - `type(y)` is `np.ndarray`
            - `y.dtype` is floating-point
            - `mono == True` and `y.ndim` is not 1
            - `mono == False` and `y.ndim` is not 1 or 2
            - `np.isfinite(y).all()` is not True

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

    Examples
    --------
    >>> # Only allow monophonic signals
    >>> y, sr = librosa.load(librosa.util.example_audio_file())
    >>> librosa.util.Func(y)
    True

    >>> # If we want to allow stereo signals
    >>> y, sr = librosa.load(librosa.util.example_audio_file(), mono=False)
    >>> librosa.util.Func(y, mono=False)
    True
    '''

    if not isinstance(arg_0, np.ndarray):
        raise ParameterError('data must be of type numpy.ndarray')

    if not np.issubdtype(arg_0.dtype, np.floating):
        raise ParameterError('data must be floating-point')

    if arg_1 and arg_0.ndim != 1:
        raise ParameterError('Invalid shape for monophonic audio: '
                             'ndim={:d}, shape={}'.format(arg_0.ndim, arg_0.shape))

    elif arg_0.ndim > 2 or arg_0.ndim == 0:
        raise ParameterError('Audio must have shape (samples,) or (channels, samples). '
                             'Received shape={}'.format(arg_0.shape))

    if not np.isfinite(arg_0).all():
        raise ParameterError('Audio buffer is not finite everywhere')

    return True

Validate whether a variable contains valid, mono audio data.

    Parameters
    ----------
    y : np.ndarray
      The input data to validate

    mono : bool
      Whether or not to force monophonic audio

    Returns
    -------
    valid : bool
        True if all tests pass

    Raises
    ------
    ParameterError
        If `y` fails to meet the following criteria:
            - `type(y)` is `np.ndarray`
            - `y.dtype` is floating-point
            - `mono == True` and `y.ndim` is not 1
            - `mono == False` and `y.ndim` is not 1 or 2
            - `np.isfinite(y).all()` is not True

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

    Examples
    --------
    >>> # Only allow monophonic signals
    >>> y, sr = librosa.load(librosa.util.example_audio_file())
    >>> librosa.util.valid_audio(y)
    True

    >>> # If we want to allow stereo signals
    >>> y, sr = librosa.load(librosa.util.example_audio_file(), mono=False)
    >>> librosa.util.valid_audio(y, mono=False)
    True

Validate whether a variable contains valid mono audio data .


(chars, line_start, line_end, highest_level,
                                lowest_odd_level)

def Func(arg_0, arg_1, arg_2, arg_3,
                                arg_4):
    """L2. From the highest level found in the text to the lowest odd
    level on each line, including intermediate levels not actually
    present in the text, reverse any contiguous sequence of characters
    that are at that level or higher.

    """
    for arg_5 in range(arg_3, arg_4-1, -1):
        arg_6 = arg_9 = None

        for arg_7 in range(arg_1, arg_2+1):
            arg_8 = arg_0[arg_7]

            if arg_8['level'] >= arg_5:
                if arg_6 is None:
                    arg_6 = arg_9 = arg_7
                else:
                    arg_9 = arg_7
            else:
                if arg_9:
                    arg_0[arg_6:+arg_9+1] = \
                            reversed(arg_0[arg_6:+arg_9+1])
                    arg_6 = arg_9 = None

        # anything remaining ?
        if arg_6 is not None:
            arg_0[arg_6:+arg_9+1] = \
                reversed(arg_0[arg_6:+arg_9+1])

L2 . From the highest level found in the text to the lowest odd level on each line including intermediate levels not actually present in the text reverse any contiguous sequence of characters that are at that level or higher .


def Func ( arg_0 , arg_1 = '' ) : arg_0 = os . path . join ( arg_1 , arg_0 ) arg_2 = itertools . chain ( ( arg_0 , ) , __get_numbered_paths ( arg_0 ) ) arg_2 = six . moves . filterfalse ( os . path . exists , arg_2 ) return next ( arg_2 )

def Func(arg_0, arg_1=''):
	"""Return a pathname possibly with a number appended to it so that it is
	unique in the directory."""
	arg_0 = os.path.join(arg_1, arg_0)
	# consider the path supplied, then the paths with numbers appended
	arg_2 = itertools.chain((arg_0,), __get_numbered_paths(arg_0))
	arg_2 = six.moves.filterfalse(os.path.exists, arg_2)
	return next(arg_2)

Return a pathname possibly with a number appended to it so that it is unique in the directory .


launch the visit starting from the given node

def Func ( arg_0 , arg_1 ) : if arg_1 in arg_0 . _Funced : return None arg_0 . _Funced [ arg_1 ] = 1 arg_3 = arg_0 . get_callbacks ( arg_1 ) if arg_3 [ 0 ] is not None : arg_3 [ 0 ] ( arg_1 ) if hasattr ( arg_1 , "locals" ) : for arg_4 in arg_1 . values ( ) : arg_0 . Func ( arg_4 ) if arg_3 [ 1 ] is not None : return arg_3 [ 1 ] ( arg_1 ) return None

def Func(arg_0, arg_1):
        """launch the Func starting from the given node"""
        if arg_1 in arg_0._Funced:
            return None
        arg_0._Funced[arg_1] = 1  # FIXME: use set ?
        arg_3 = arg_0.get_callbacks(arg_1)
        if arg_3[0] is not None:
            arg_3[0](arg_1)
        if hasattr(arg_1, "locals"):  # skip Instance and other proxy
            for arg_4 in arg_1.values():
                arg_0.Func(arg_4)
        if arg_3[1] is not None:
            return arg_3[1](arg_1)
        return None


def Func(arg_0, arg_1):
        """
        Seek the video by `relative_position` seconds

        Args:
            relative_position (float): The position in seconds to Func to.
        """
        arg_0._player_interface.Seek(Int64(1000.0 * 1000 * arg_1))
        arg_0.FuncEvent(arg_0, arg_1)

Seek the video by `relative_position` seconds

        Args:
            relative_position (float): The position in seconds to seek to.

Seek the video by relative_position seconds


def Func ( arg_0 ) : arg_1 = np . random . rand ( arg_0 , * IMAGE_SHAPE ) . astype ( "float32" ) def train_input_fn ( ) : arg_2 = tf . data . Dataset . from_tensor_slices ( arg_1 ) . map ( lambda row : ( row , 0 ) ) . batch ( arg_0 ) . repeat ( ) return tf . compat . v1 . data . make_one_shot_iterator ( arg_2 ) . get_next ( ) def eval_input_fn ( ) : arg_2 = tf . data . Dataset . from_tensor_slices ( arg_1 ) . map ( lambda row : ( row , 0 ) ) . batch ( arg_0 ) return tf . compat . v1 . data . make_one_shot_iterator ( arg_2 ) . get_next ( ) return train_input_fn , eval_input_fn

def Func(arg_0):
  """Builds fake MNIST-style data for unit testing."""
  arg_1 = np.random.rand(arg_0, *IMAGE_SHAPE).astype("float32")

  def train_input_fn():
    arg_2 = tf.data.Dataset.from_tensor_slices(
        arg_1).map(lambda row: (row, 0)).batch(arg_0).repeat()
    return tf.compat.v1.data.make_one_shot_iterator(arg_2).get_next()

  def eval_input_fn():
    arg_2 = tf.data.Dataset.from_tensor_slices(
        arg_1).map(lambda row: (row, 0)).batch(arg_0)
    return tf.compat.v1.data.make_one_shot_iterator(arg_2).get_next()

  return train_input_fn, eval_input_fn

Builds fake MNIST - style data for unit testing .


def Func(arg_0):
        """
        Return Func of the vehicle.

        :return: newton the Func of the ship
        """
        arg_0.total_Func_coef = frictional_Func_coef(arg_0.length, arg_0.speed) + \
                                residual_Func_coef(arg_0.slenderness_coefficient,
                                                         arg_0.prismatic_coefficient,
                                                         froude_number(arg_0.speed, arg_0.length))
        arg_2 = 1 / 2 * arg_0.total_Func_coef * 1025 * arg_0.surface_area * arg_0.speed ** 2
        return arg_2

Return resistance of the vehicle.

        :return: newton the resistance of the ship


def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 = arg_1 . join ( User ) . filter ( User . email . like ( '%{0}%' . format ( arg_2 ) ) , ) return arg_1

def Func(arg_0, arg_1, arg_2):
        """Modify query as so include only specific members.

        :param query: Query object.
        :param str q: Search string.
        :returs: Query object.
        """
        arg_1 = arg_1.join(User).filter(
                User.email.like('%{0}%'.format(arg_2)),
        )
        return arg_1

Modify query as so include only specific members .


(priority_msgs, resource_msgs, *args, **kwargs)

def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : arg_4 = DatabaseManager ( * arg_2 , ** arg_3 ) arg_4 . start ( arg_0 , arg_1 )

def Func(arg_0, arg_1, *arg_2, **arg_3):
    """Start the database manager process

    The DFK should start this function. The args, kwargs match that of the monitoring config

    """
    arg_4 = DatabaseManager(*arg_2, **arg_3)
    arg_4.start(arg_0, arg_1)


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_0 . kmeans_Func_ = copy ( arg_0 . kmeans ) arg_1 = as_features ( arg_1 , stack = True ) arg_0 . kmeans_Func_ . Func ( arg_1 . stacked_features ) return arg_0

def Func(arg_0, arg_1, arg_2=None):
        '''
        Choose the codewords based on a training set.

        Parameters
        ----------
        X : :class:`skl_groups.features.Features` or list of arrays of shape ``[n_samples[i], n_features]``
            Training set. If a Features object, it will be stacked.
        '''
        arg_0.kmeans_Func_ = copy(arg_0.kmeans)
        arg_1 = as_features(arg_1, stack=True)
        arg_0.kmeans_Func_.Func(arg_1.stacked_features)
        return arg_0

Choose the codewords based on a training set .


(self, campaign_id, data, **queryparams)

def Func(arg_0, arg_1, arg_2, **arg_3):
        """
        Add feedback on a specific campaign.

        :param campaign_id: The unique id for the campaign.
        :type campaign_id: :py:class:`str`
        :param data: The request body parameters
        :type data: :py:class:`dict`
        data = {
            "message": string*
        }
        :param queryparams: The query string parameters
        queryparams['fields'] = []
        queryparams['exclude_fields'] = []
        """
        arg_0.campaign_id = arg_1
        if 'message' not in arg_2:
            raise KeyError('The campaign feedback must have a message')
        arg_4 = arg_0._mc_client._post(url=arg_0._build_path(arg_1, 'feedback'), arg_2=arg_2, **arg_3)
        if arg_4 is not None:
            arg_0.feedback_id = arg_4['feedback_id']
        else:
            arg_0.feedback_id = None
        return arg_4


def Func ( arg_0 , arg_1 , arg_2 ) : if len ( arg_1 . get ( arg_2 , [ ] ) ) == 0 : return [ ] arg_3 = arg_1 [ arg_2 ] . keys ( ) arg_4 = [ ] for arg_2 in arg_0 . indexes [ arg_2 ] [ 'feature_names' ] : arg_4 . append ( { 'terms' : { fname_to_idx_name ( arg_2 ) : arg_3 } } ) return arg_4

def Func(arg_0, arg_1, arg_2):
        'Creates a disjunction for keyword scan queries.'
        if len(arg_1.get(arg_2, [])) == 0:
            return []
        arg_3 = arg_1[arg_2].keys()

        arg_4 = []
        for arg_2 in arg_0.indexes[arg_2]['feature_names']:
            arg_4.append({'terms': {fname_to_idx_name(arg_2): arg_3}})
        return arg_4

Creates a disjunction for keyword scan queries .


def Func ( arg_0 , arg_1 , arg_2 ) : with db . session . begin_nested ( ) : arg_3 = arg_0 ( arg_1 = arg_1 , arg_2 = arg_2 , ) db . session . add ( arg_3 ) return arg_3

def Func(arg_0, arg_1, arg_2):
        """Create a new group admin.

        :param group: Group object.
        :param admin: Admin object.
        :returns: Newly Funcd GroupAdmin object.
        :raises: IntegrityError
        """
        with db.session.begin_nested():
            arg_3 = arg_0(
                arg_1=arg_1,
                arg_2=arg_2,
            )
            db.session.add(arg_3)
        return arg_3

Create a new group admin.

        :param group: Group object.
        :param admin: Admin object.
        :returns: Newly created GroupAdmin object.
        :raises: IntegrityError


def Func ( arg_0 , arg_1 = arg_2 ( ( '#' , '//' ) ) ) : arg_3 = arg_0 . splitlines ( ) for arg_4 in range ( len ( arg_3 ) ) : for arg_5 in arg_1 : arg_3 [ arg_4 ] = strip_comment_line_with_symbol ( arg_3 [ arg_4 ] , start = arg_5 ) return '\n' . join ( arg_3 )

def Func(arg_0, arg_1=arg_2(('#', '//'))):
    """Strip comments from json string.

    :param string: A string containing json with comments started by comment_symbols.
    :param comment_symbols: Iterable of symbols that start a line comment (default # or //).
    :return: The string with the comments removed.
    """
    arg_3 = arg_0.splitlines()
    for arg_4 in range(len(arg_3)):
        for arg_5 in arg_1:
            arg_3[arg_4] = strip_comment_line_with_symbol(arg_3[arg_4], start=arg_5)
    return '\n'.join(arg_3)


def Func ( arg_0 = "" ) : def real_decorator ( arg_1 ) : @ wraps ( arg_1 ) def wrapper ( arg_2 , * arg_3 , ** arg_4 ) : if not arg_2 : return arg_0 else : return arg_1 ( arg_2 , * arg_3 , ** arg_4 ) return wrapper return real_decorator

def Func(arg_0=""):
    """
    Decorator that checks if a value passed to a Jinja filter evaluates to false
    and returns an empty string. Otherwise calls the original Jinja filter.

    Example usage:
    @Func
    def my_jinja_filter(value, arg1):
    """

    def real_decorator(arg_1):

        @wraps(arg_1)
        def wrapper(arg_2, *arg_3, **arg_4):
            if not arg_2:
                return arg_0
            else:
                return arg_1(arg_2, *arg_3, **arg_4)

        return wrapper

    return real_decorator

Decorator that checks if a value passed to a Jinja filter evaluates to false
    and returns an empty string. Otherwise calls the original Jinja filter.

    Example usage:
    @check_empty
    def my_jinja_filter(value, arg1):

Decorator that checks if a value passed to a Jinja filter evaluates to false and returns an empty string . Otherwise calls the original Jinja filter .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_2 is not None : arg_0 . _headers . append ( ( arg_1 , arg_2 ) )

def Func(arg_0, arg_1, arg_2):
        """Add an HTTP header to response object.

        Arguments:
          name (str): HTTP header field name
          value (str): HTTP header field value
        """
        if arg_2 is not None:
            arg_0._headers.append((arg_1, arg_2))


def Func ( arg_0 , arg_1 ) : arg_2 = getattr ( settings , 'REST_AUTH_SERIALIZERS' , { } ) arg_3 = import_callable ( arg_2 . get ( 'USER_DETAILS_SERIALIZER' , UserDetailsSerializer ) ) arg_4 = arg_3 ( arg_1 [ 'user' ] , context = arg_0 . context ) . data return arg_4

def Func(arg_0, arg_1):
        """
        Required to allow using custom USER_DETAILS_SERIALIZER in
        JWTSerializer. Defining it here to avoid circular imports
        """
        arg_2 = getattr(settings, 'REST_AUTH_SERIALIZERS', {})
        arg_3 = import_callable(
            arg_2.get('USER_DETAILS_SERIALIZER', UserDetailsSerializer)
        )
        arg_4 = arg_3(arg_1['user'], context=arg_0.context).data
        return arg_4

Required to allow using custom USER_DETAILS_SERIALIZER in JWTSerializer . Defining it here to avoid circular imports


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . __class__ . __module__ in ( 'exceptions' , 'builtins' ) : arg_3 = arg_0 . __class__ . __name__ else : arg_3 = '%s.%s' % ( arg_0 . __class__ . __module__ , arg_0 . __class__ . __name__ ) arg_4 = len ( arg_3 ) + 1 arg_1 . begin_group ( arg_4 , arg_3 + '(' ) for arg_5 , arg_6 in enumerate ( getattr ( arg_0 , 'args' , ( ) ) ) : if arg_5 : arg_1 . text ( ',' ) arg_1 . breakable ( ) arg_1 . pretty ( arg_6 ) arg_1 . end_group ( arg_4 , ')' )

def Func(arg_0, arg_1, arg_2):
    """Base pprint for all exceptions."""
    if arg_0.__class__.__module__ in ('exceptions', 'builtins'):
        arg_3 = arg_0.__class__.__name__
    else:
        arg_3 = '%s.%s' % (
            arg_0.__class__.__module__,
            arg_0.__class__.__name__
        )
    arg_4 = len(arg_3) + 1
    arg_1.begin_group(arg_4, arg_3 + '(')
    for arg_5, arg_6 in enumerate(getattr(arg_0, 'args', ())):
        if arg_5:
            arg_1.text(',')
            arg_1.breakable()
        arg_1.pretty(arg_6)
    arg_1.end_group(arg_4, ')')


def Func(arg_0):
    """
    Instance method decorator to convert an optional file keyword
    argument into an actual value, whether it be a passed value, a
    value obtained from an io_manager, or sys.stdout.
    """
    def arg_3(arg_1, arg_2=None):
        if arg_2:
            return arg_0(arg_1, arg_2=arg_2)
        elif arg_1.io_manager:
            with arg_1.io_manager.with_stdout() as stdout:
                return arg_0(arg_1, arg_2=stdout)
        else:
            return arg_0(arg_1, arg_2=sys.stdout)
    arg_3.__doc__ = arg_0.__doc__
    return arg_3

Instance method decorator to convert an optional file keyword argument into an actual value whether it be a passed value a value obtained from an io_manager or sys . stdout .


def Func(arg_0=True, arg_1=True):
    """ stops, deletes and re-creates all jails.
    since the cleanser master is rather large, that one is omitted by default.
    """
    if value_asbool(arg_0) and not yesno("""\nObacht!
            This will destroy all existing and or currently running jails on the host.
            Are you sure that you want to continue?"""):
        exit("Glad I asked...")

    reset_cleansers(arg_0=False)

    arg_2 = ['appserver', 'webserver', 'worker']
    if not value_asbool(arg_1):
        arg_2.append('cleanser')

    with fab.warn_only():
        for arg_3 in arg_2:
            fab.run('ezjail-admin delete -fw {jail}'.format(arg_3=arg_3))
        # remove authorized keys for no longer existing key (they are regenerated for each new worker)
        fab.run('rm /usr/jails/cleanser/usr/home/cleanser/.ssh/authorized_keys')

stops deletes and re - creates all jails . since the cleanser master is rather large that one is omitted by default .


activate a backend by adding it to the .sregistry configuration file.

def
Func
(
arg_0
)
:
arg_1
=
read_client_secrets
(
)
if
arg_0
is
not
:
arg_1
[
'SREGISTRY_CLIENT'
]
=
arg_0
update_secrets
(
arg_1
)
print
(
'[Func] %s'
%
arg_0
)

def Func(arg_0):
    '''Func a backend by adding it to the .sregistry configuration file.
    '''
    arg_1 = read_client_secrets()
    if arg_0 is not None:
        arg_1['SREGISTRY_CLIENT'] = arg_0
        update_secrets(arg_1)
        print('[Func] %s' %arg_0)

activate a backend by adding it to the . sregistry configuration file .


def Func(arg_0, arg_1=20):
        """
        Get the stepper library version number.

        :param timeout: specify a time to allow arduino to process and return a version

        :return: the stepper version number if it was set.
        """
        # get current time
        arg_2 = time.time()

        # wait for up to 20 seconds for a successful capability query to occur

        while arg_0._command_handler.stepper_library_version <= 0:
            if time.time() - arg_2 > arg_1:
                if arg_0.verbose is True:
                    print("Stepper Library Version Request timed-out. "
                          "Did you send a stepper_request_library_version command?")
                return
            else:
                pass
        return arg_0._command_handler.stepper_library_version

Get the stepper library version number .


def Func ( arg_0 , arg_1 , arg_2 = False ) : if type ( arg_1 ) == set : arg_1 = list ( arg_1 ) if len ( arg_1 ) == 1 : return IRQueryableList ( [ arg_0 . get ( arg_1 [ 0 ] , arg_2 = arg_2 ) ] , mdl = arg_0 . mdl ) arg_3 = arg_0 . _get_connection ( ) arg_4 = arg_3 . pipeline ( ) for arg_5 in arg_1 : arg_6 = arg_0 . _get_key_for_id ( arg_5 ) arg_4 . hgetall ( arg_6 ) arg_7 = arg_4 . execute ( ) arg_8 = IRQueryableList ( mdl = arg_0 . mdl ) arg_9 = 0 arg_10 = len ( arg_1 ) while arg_9 < arg_10 : if arg_7 [ arg_9 ] is None : arg_8 . append ( None ) arg_9 += 1 continue arg_7 [ arg_9 ] [ '_id' ] = arg_1 [ arg_9 ] arg_11 = arg_0 . _redisResultToObj ( arg_7 [ arg_9 ] ) arg_8 . append ( arg_11 ) arg_9 += 1 if arg_2 is True : for arg_11 in arg_8 : if not arg_11 : continue arg_0 . _doCascadeFetch ( arg_11 ) return arg_8

def Func(arg_0, arg_1, arg_2=False):
		'''
			Func - Gets multiple objects with a single atomic operation

			@param cascadeFetch <bool> Default False, If True, all Foreign objects associated with this model
			   will be fetched immediately. If False, foreign objects will be fetched on-access.

			@param pks - list of internal keys
		'''

		if type(arg_1) == set:
			arg_1 = list(arg_1)

		if len(arg_1) == 1:
			# Optimization to not pipeline on 1 id
			return IRQueryableList([arg_0.get(arg_1[0], arg_2=arg_2)], mdl=arg_0.mdl)

		arg_3 = arg_0._get_connection()
		arg_4 = arg_3.pipeline()
		for arg_5 in arg_1:
			arg_6 = arg_0._get_key_for_id(arg_5)
			arg_4.hgetall(arg_6)

		arg_7 = arg_4.execute()

		arg_8 = IRQueryableList(mdl=arg_0.mdl)
		arg_9 = 0
		arg_10 = len(arg_1)
		while arg_9 < arg_10:
			if arg_7[arg_9] is None:
				arg_8.append(None)
				arg_9 += 1
				continue
			arg_7[arg_9]['_id'] = arg_1[arg_9]
			arg_11 = arg_0._redisResultToObj(arg_7[arg_9])
			arg_8.append(arg_11)
			arg_9 += 1

		if arg_2 is True:
			for arg_11 in arg_8:
				if not arg_11:
					continue
				arg_0._doCascadeFetch(arg_11)

		return arg_8

getMultiple - Gets multiple objects with a single atomic operation

			@param cascadeFetch <bool> Default False, If True, all Foreign objects associated with this model
			   will be fetched immediately. If False, foreign objects will be fetched on-access.

			@param pks - list of internal keys


def Func(arg_0, arg_1=True):
    r'''Improved formula parser which handles braces and their multipliers,
    as well as rational element counts.

    Strips charges from the end of a formula first. Accepts repeated chemical
    units. Performs no sanity checking that elements are actually elements.
    As it uses regular expressions for matching, errors are mostly just ignored.

    Parameters
    ----------
    formula : str
        Formula string, very simply formats only.
    check : bool
        If `check` is True, a simple check will be performed to determine if
        a formula is not a formula and an exception will be raised if it is
        not, [-]

    Returns
    -------
    atoms : dict
        dictionary of counts of individual atoms, indexed by symbol with
        proper capitalization, [-]

    Notes
    -----
    Inspired by the approach taken by CrazyMerlyn on a reddit DailyProgrammer
    challenge, at https://www.reddit.com/r/dailyprogrammer/comments/6eerfk/20170531_challenge_317_intermediate_counting/

    Examples
    --------
    >>> pprint(Func('Pd(NH3)4.0001+2'))
    {'H': 12.0003, 'N': 4.0001, 'Pd': 1}
    '''
    arg_0 = arg_0.replace('[', '').replace(']', '')
    arg_2 = bracketed_charge_re.split(arg_0)
    if len(arg_2) > 1:
        arg_0 = arg_2[0]
    else:
        arg_0 = arg_0.split('+')[0].split('-')[0]

    arg_3 = [[]]
    arg_4 = arg_3[0]
    arg_5 = formula_token_matcher_rational.findall(arg_0)
    # The set of letters in the tokens should match the set of letters
    if arg_1:
        arg_6 = set([j for i in arg_5 for j in i if j in letter_set])
        arg_7 = set(i for i in arg_0 if i in letter_set)
        if arg_7 != arg_6:
            raise Exception('Input may not be a formula; extra letters were detected')

    for arg_8 in arg_5:
        if arg_8 == "(":
            arg_3.append([])
            arg_4 = arg_3[-1]
        elif arg_8 == ")":
            arg_9 = {}
            for arg_10 in arg_4:
                for arg_11, arg_12 in arg_10.items():
                    if arg_11 in arg_9:
                        arg_9[arg_11] = arg_9[arg_11] + arg_12
                    else:
                        arg_9[arg_11] = arg_12
            arg_3.pop()
            arg_4 = arg_3[-1]
            arg_4.append(arg_9)
        elif arg_8.isalpha():
            arg_4.append({arg_8: 1})
        else:
            arg_13 = float(arg_8)
            arg_14 = int(arg_13)
            if arg_14 == arg_13:
                arg_13 = arg_14
            arg_4[-1] = {arg_11: arg_12*arg_13 for arg_11, arg_12 in arg_4[-1].items()}
    arg_15 = {}
    for arg_10 in arg_4:
        for arg_11, arg_12 in arg_10.items():
            if arg_11 in arg_15:
                arg_15[arg_11] = arg_15[arg_11] + arg_12
            else:
                arg_15[arg_11] = arg_12
    return arg_15

r'''Improved formula parser which handles braces and their multipliers,
    as well as rational element counts.

    Strips charges from the end of a formula first. Accepts repeated chemical
    units. Performs no sanity checking that elements are actually elements.
    As it uses regular expressions for matching, errors are mostly just ignored.

    Parameters
    ----------
    formula : str
        Formula string, very simply formats only.
    check : bool
        If `check` is True, a simple check will be performed to determine if
        a formula is not a formula and an exception will be raised if it is
        not, [-]

    Returns
    -------
    atoms : dict
        dictionary of counts of individual atoms, indexed by symbol with
        proper capitalization, [-]

    Notes
    -----
    Inspired by the approach taken by CrazyMerlyn on a reddit DailyProgrammer
    challenge, at https://www.reddit.com/r/dailyprogrammer/comments/6eerfk/20170531_challenge_317_intermediate_counting/

    Examples
    --------
    >>> pprint(nested_formula_parser('Pd(NH3)4.0001+2'))
    {'H': 12.0003, 'N': 4.0001, 'Pd': 1}

r Improved formula parser which handles braces and their multipliers as well as rational element counts .


def Func(arg_0, arg_1):
        """Returns the mapping between sliding window points and their contigs,
        and the x-axis position of contig

        Parameters
        ----------
        window : int
            Size of the window.

        Returns
        -------
        xbars : list
            The x-axis position of the ending for each contig.
        labels : list
            The x-axis labels for each data point in the sliding window

        """

        # Get summary stats, if they have not yet been triggered
        if not arg_0.summary_info:
            arg_0.get_summary_stats()

        # Get contig boundary positon
        arg_2 = 0
        arg_3 = []
        for arg_4, arg_5 in arg_0.contigs.items():
            arg_6 = arg_0._get_contig_id(arg_4)
            arg_0.contig_boundaries[arg_6] = [arg_2, arg_2 + len(arg_5)]
            arg_2 += len(arg_5)
            arg_3.append((arg_6, arg_2, arg_4))

        return arg_3

Returns the mapping between sliding window points and their contigs and the x - axis position of contig


return sorted(ancestors, key=lambda i: ss - i._span[0])

def Func ( arg_0 , arg_1 : arg_2 [ arg_3 ] = None ) -> List [ 'WikiText' ] : if arg_1 is None : arg_4 = SPAN_PARSER_TYPES else : arg_4 = arg_1 , arg_5 = arg_0 . _lststr arg_6 = arg_0 . _type_to_spans arg_7 , arg_8 = arg_0 . _span Func = [ ] arg_10 = Func . append for arg_1 in arg_4 : arg_11 = globals ( ) [ arg_1 ] arg_12 = arg_6 [ arg_1 ] for arg_13 in arg_12 [ : bisect ( arg_12 , [ arg_7 ] ) ] : if arg_8 < arg_13 [ 1 ] : arg_10 ( arg_11 ( arg_5 , arg_6 , arg_13 , arg_1 ) ) return sorted ( Func , key = lambda i : arg_7 - i . _span [ 0 ] )

def Func(arg_0, arg_1: arg_2[arg_3] = None) -> List['WikiText']:
        """Return the ancestors of the current node.

        :param type_: the type of the desired ancestors as a string.
            Currently the following types are supported: {Template,
            ParserFunction, WikiLink, Comment, Parameter, ExtensionTag}.
            The default is None and means all the ancestors of any type above.
        """
        if arg_1 is None:
            arg_4 = SPAN_PARSER_TYPES
        else:
            arg_4 = arg_1,
        arg_5 = arg_0._lststr
        arg_6 = arg_0._type_to_spans
        arg_7, arg_8 = arg_0._span
        Func = []
        arg_10 = Func.append
        for arg_1 in arg_4:
            arg_11 = globals()[arg_1]
            arg_12 = arg_6[arg_1]
            for arg_13 in arg_12[:bisect(arg_12, [arg_7])]:
                if arg_8 < arg_13[1]:
                    arg_10(arg_11(arg_5, arg_6, arg_13, arg_1))
        return sorted(Func, key=lambda i: arg_7 - i._span[0])

Return the ancestors of the current node .


def Func():
    """
    Tells you if you have an old version of ndio.
    """
    import requests
    arg_0 = requests.get('https://pypi.python.org/pypi/ndio/json').json()
    arg_0 = arg_0['info']['version']
    if arg_0 != version:
        print("A newer version of ndio is available. " +
              "'pip install -U ndio' to update.")
    return arg_0

Tells you if you have an old version of ndio .


Implements TextFile Generator's setup method

def Func(arg_0, arg_1):
    """Implements TextFile Generator's Func method"""
    arg_2 = arg_1.get_partition_index()
    arg_0._files_to_consume = arg_0._files[arg_2::arg_1.get_num_partitions()]
    arg_0.logger.info("TextFileSpout files to consume %s" % arg_0._files_to_consume)
    arg_0._lines_to_consume = arg_0._get_next_lines()
    arg_0._emit_count = 0

Implements TextFile Generator s setup method


def Func(arg_0, arg_1):
        """
        Print out stats about how files are getting processed.

        :param known_file_paths: a list of file paths that may contain Airflow
            DAG definitions
        :type known_file_paths: list[unicode]
        :return: None
        """

        # File Path: Path to the file containing the DAG definition
        # PID: PID associated with the process that's processing the file. May
        # be empty.
        # Runtime: If the process is currently running, how long it's been
        # running for in seconds.
        # Last Runtime: If the process ran before, how long did it take to
        # finish in seconds
        # Last Run: When the file finished processing in the previous run.
        arg_2 = ["File Path",
                   "PID",
                   "Runtime",
                   "Last Runtime",
                   "Last Run"]

        arg_3 = []
        for arg_4 in arg_1:
            arg_5 = arg_0.get_last_runtime(arg_4)
            arg_6 = os.path.basename(arg_4)
            arg_6 = os.path.splitext(arg_6)[0].replace(os.sep, '.')
            if arg_5:
                Stats.gauge(
                    'dag_processing.last_runtime.{}'.format(arg_6),
                    arg_5
                )

            arg_7 = arg_0.get_pid(arg_4)
            arg_8 = arg_0.get_start_time(arg_4)
            arg_9 = ((timezone.utcnow() - arg_8).total_seconds()
                       if arg_8 else None)
            arg_10 = arg_0.get_last_finish_time(arg_4)
            if arg_10:
                arg_11 = (timezone.utcnow() - arg_10).total_seconds()
                Stats.gauge(
                    'dag_processing.last_run.seconds_ago.{}'.format(arg_6),
                    arg_11
                )

            arg_3.append((arg_4,
                         arg_7,
                         arg_9,
                         arg_5,
                         arg_10))

        # Sort by longest last runtime. (Can't sort None values in python3)
        arg_3 = sorted(arg_3, key=lambda x: x[3] or 0.0)

        arg_12 = []
        for arg_4, arg_13, arg_9, arg_5, arg_10 in arg_3:
            arg_12.append((arg_4,
                                   arg_13,
                                   "{:.2f}s".format(arg_9)
                                   if arg_9 else None,
                                   "{:.2f}s".format(arg_5)
                                   if arg_5 else None,
                                   arg_10.strftime("%Y-%m-%dT%H:%M:%S")
                                   if arg_10 else None))
        arg_14 = ("\n" +
                   "=" * 80 +
                   "\n" +
                   "DAG File Processing Stats\n\n" +
                   tabulate(arg_12, arg_2=arg_2) +
                   "\n" +
                   "=" * 80)

        arg_0.log.info(arg_14)

Print out stats about how files are getting processed .


def Func(arg_0, **arg_1):
    """Return a SDK client initialized with current CLI credentials, CLI default subscription and CLI default cloud.

    This method will fill automatically the following client parameters:
    - credentials
    - subscription_id
    - base_url

    Parameters provided in kwargs will override CLI parameters and be passed directly to the client.

    :Example:

    .. code:: python

        from azure.common.client_factory import Func
        from azure.mgmt.compute import ComputeManagementClient
        client = Func(ComputeManagementClient)

    .. versionadded:: 1.1.6

    :param client_class: A SDK client class
    :return: An instantiated client
    :raises: ImportError if azure-cli-core package is not available
    """
    arg_2 = get_cli_active_cloud()
    arg_3 = {}
    if 'credentials' not in arg_1 or 'subscription_id' not in arg_1:
        arg_4, arg_5 = _client_resource(arg_0, arg_2)
        arg_6, arg_7, arg_8 = get_azure_cli_credentials(arg_4=arg_4,
                                                                            with_tenant=True)
        arg_3.update({
            'credentials': arg_1.get('credentials', arg_6),
            'subscription_id': arg_1.get('subscription_id', arg_7)
        })

    arg_9 = get_arg_spec(arg_0.__init__).args
    if 'adla_job_dns_suffix' in arg_9 and 'adla_job_dns_suffix' not in arg_1:  # Datalake
        # Let it raise here with AttributeError at worst, this would mean this cloud does not define
        # ADL endpoint and no manual suffix was given
        arg_3['adla_job_dns_suffix'] = arg_2.suffixes.azure_datalake_analytics_catalog_and_job_endpoint
    elif 'base_url' in arg_9 and 'base_url' not in arg_1:
        arg_5, arg_10 = _client_resource(arg_0, arg_2)
        if arg_10:
            arg_3['base_url'] = arg_10
        else:
            arg_3['base_url'] = arg_2.endpoints.resource_manager
    if 'tenant_id' in arg_9 and 'tenant_id' not in arg_1:
        arg_3['tenant_id'] = arg_8
    arg_3.update(arg_1)
    return _instantiate_client(arg_0, **arg_3)

Return a SDK client initialized with current CLI credentials, CLI default subscription and CLI default cloud.

    This method will fill automatically the following client parameters:
    - credentials
    - subscription_id
    - base_url

    Parameters provided in kwargs will override CLI parameters and be passed directly to the client.

    :Example:

    .. code:: python

        from azure.common.client_factory import get_client_from_cli_profile
        from azure.mgmt.compute import ComputeManagementClient
        client = get_client_from_cli_profile(ComputeManagementClient)

    .. versionadded:: 1.1.6

    :param client_class: A SDK client class
    :return: An instantiated client
    :raises: ImportError if azure-cli-core package is not available

Return a SDK client initialized with current CLI credentials CLI default subscription and CLI default cloud .


(namespace, filename, infer_duration=True, **parse_options)

def Func ( arg_0 , arg_1 , arg_2 = True , ** arg_3 ) : arg_4 = core . Annotation ( arg_0 ) arg_3 . setdefault ( 'sep' , r'\s+' ) arg_3 . setdefault ( 'engine' , 'python' ) arg_3 . setdefault ( 'header' , None ) arg_3 . setdefault ( 'index_col' , False ) arg_3 . setdefault ( 'names' , range ( 20 ) ) arg_5 = pd . read_csv ( arg_1 , ** arg_3 ) arg_5 = arg_5 . dropna ( how = 'all' , axis = 1 ) if len ( arg_5 . columns ) == 2 : arg_5 . insert ( 1 , 'duration' , 0 ) if arg_2 : arg_5 [ 'duration' ] [ : - 1 ] = arg_5 . loc [ : , 0 ] . diff ( ) [ 1 : ] . values else : if arg_2 : arg_5 . loc [ : , 1 ] -= arg_5 [ 0 ] for arg_6 in arg_5 . itertuples ( ) : arg_7 , arg_8 = arg_6 [ 1 : 3 ] arg_9 = [ x for x in arg_6 [ 3 : ] if x is not None ] [ - 1 ] arg_4 . append ( arg_7 = arg_7 , arg_8 = arg_8 , confidence = 1.0 , arg_9 = arg_9 ) return arg_4

def Func(arg_0, arg_1, arg_2=True, **arg_3):
    r'''Load a .lab file as an Annotation object.

    .lab files are assumed to have the following format:

        ``TIME_START\tTIME_END\tANNOTATION``

    By default, .lab files are assumed to have columns separated by one
    or more white-space characters, and have no header or index column
    information.

    If the .lab file contains only two columns, then an empty duration
    field is inferred.

    If the .lab file contains more than three columns, each row's
    annotation value is assigned the contents of last non-empty column.

    Parameters
    ----------
    namespace : str
        The namespace for the new annotation

    filename : str
        Path to the .lab file

    infer_duration : bool
        If `True`, interval durations are inferred from `(start, end)` columns,
        or difference between successive times.

        If `False`, interval durations are assumed to be explicitly coded as
        `(start, duration)` columns.  If only one time column is given, then
        durations are set to 0.

        For instantaneous event annotations (e.g., beats or onsets), this
        should be set to `False`.

    parse_options : additional keyword arguments
        Passed to ``pandas.DataFrame.read_csv``

    Returns
    -------
    annotation : Annotation
        The newly constructed annotation object

    See Also
    --------
    pandas.DataFrame.read_csv
    '''

    # Create a new annotation object
    arg_4 = core.Annotation(arg_0)

    arg_3.setdefault('sep', r'\s+')
    arg_3.setdefault('engine', 'python')
    arg_3.setdefault('header', None)
    arg_3.setdefault('index_col', False)

    # This is a hack to handle potentially ragged .lab data
    arg_3.setdefault('names', range(20))

    arg_5 = pd.read_csv(arg_1, **arg_3)

    # Drop all-nan columns
    arg_5 = arg_5.dropna(how='all', axis=1)

    # Do we need to add a duration column?
    # This only applies to event annotations
    if len(arg_5.columns) == 2:
        # Insert a column of zeros after the timing
        arg_5.insert(1, 'duration', 0)
        if arg_2:
            arg_5['duration'][:-1] = arg_5.loc[:, 0].diff()[1:].values

    else:
        # Convert from time to duration
        if arg_2:
            arg_5.loc[:, 1] -= arg_5[0]

    for arg_6 in arg_5.itertuples():
        arg_7, arg_8 = arg_6[1:3]

        arg_9 = [x for x in arg_6[3:] if x is not None][-1]

        arg_4.append(arg_7=arg_7,
                          arg_8=arg_8,
                          confidence=1.0,
                          arg_9=arg_9)

    return arg_4

r Load a . lab file as an Annotation object .


def Func(arg_0, *arg_1):
        """
        Gets called by the CallbackManager if a new message was received
        """
        arg_2 = arg_1[0]
        if arg_2:
            arg_3, arg_4 = arg_2[0], arg_2[2]
            arg_5 = arg_0.get_profile(arg_3)
            if arg_5 is not None:
                try:
                    getattr(arg_5, arg_4)(arg_0, arg_2)
                except AttributeError:
                    pass


def Func ( arg_0 , arg_1 = False , ** arg_2 ) : if arg_1 : arg_0 . _send_auth_command ( 'oc_multi' , arg_2 ) else : arg_0 . _send_auth_command ( 'oc' , arg_2 )

def Func(arg_0, arg_1=False, **arg_2):
        """Cancel one or multiple orders via Websocket.

        :param multi: bool, whether order_settings contains settings for one, or
                      multiples orders
        :param order_identifiers: Identifiers for the order(s) you with to cancel
        :return:
        """
        if arg_1:
            arg_0._send_auth_command('oc_multi', arg_2)
        else:
            arg_0._send_auth_command('oc', arg_2)

Cancel one or multiple orders via Websocket .