(adict, indices, pop_later=True, copy=True)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
True
,
arg_3
=
True
)
:
def
check_indices
(
arg_4
,
arg_5
)
:
for
arg_6
in
chain
(
*
arg_4
)
:
if
arg_6
<
0
or
arg_6
>=
arg_5
:
raise
IndexError
(
"Given indices are out of dict range."
)
check_indices
(
arg_1
,
len
(
arg_0
)
)
arg_7
=
arg_0
.
copy
(
)
if
arg_3
else
arg_0
arg_8
=
list
(
arg_7
.
keys
(
)
)
for
arg_6
,
arg_9
in
zip
(
*
arg_1
)
:
arg_7
[
arg_8
[
arg_6
]
]
.
extend
(
arg_7
[
arg_8
[
arg_9
]
]
)
if
arg_2
:
for
arg_6
,
arg_9
in
zip
(
*
arg_1
)
:
arg_7
.
pop
(
arg_8
[
arg_9
]
,
''
)
return
arg_7

def Func(arg_0, arg_1, arg_2=True, arg_3=True):
    """Extend the within a dict of lists. The indices will indicate which
    list have to be extended by which other list.

    Parameters
    ----------
    adict: OrderedDict
        An ordered dictionary of lists

    indices: list or tuple of 2 iterables of int, bot having the same length
        The indices of the lists that have to be merged, both iterables items
         will be read pair by pair, the first is the index to the list that
         will be extended with the list of the second index.
         The indices can be constructed with Numpy e.g.,
         indices = np.where(square_matrix)

    pop_later: bool
        If True will oop out the lists that are indicated in the second
         list of indices.

    copy: bool
        If True will perform a deep copy of the input adict before
         modifying it, hence not changing the original input.

    Returns
    -------
    Dictionary of lists

    Raises
    ------
    IndexError
        If the indices are out of range
    """
    def check_indices(arg_4, arg_5):
        for arg_6 in chain(*arg_4):
            if arg_6 < 0 or arg_6 >= arg_5:
                raise IndexError("Given indices are out of dict range.")

    check_indices(arg_1, len(arg_0))

    arg_7 = arg_0.copy() if arg_3 else arg_0

    arg_8 = list(arg_7.keys())
    for arg_6, arg_9 in zip(*arg_1):
        arg_7[arg_8[arg_6]].extend(arg_7[arg_8[arg_9]])

    if arg_2:
        for arg_6, arg_9 in zip(*arg_1):
            arg_7.pop(arg_8[arg_9], '')

    return arg_7

Extend the within a dict of lists . The indices will indicate which list have to be extended by which other list .


def Func(arg_0, arg_1):
        """ Get a Flask blueprint for the named provider that handles incoming messages & status reports

            Note: this requires Flask microframework.

            :rtype: flask.blueprints.Blueprint
            :returns: Flask Blueprint, fully functional
            :raises KeyError: provider not found
            :raises NotImplementedError: Provider does not implement a receiver
        """
        # Get the provider & blueprint
        arg_2 = arg_0.get_provider(arg_1)
        arg_3 = arg_2.make_receiver_blueprint()

        # Register a Flask handler that initializes `g.provider`
        # This is the only way for the blueprint to get the current IProvider instance
        from flask.globals import arg_4  # local import as the user is not required to use receivers at all

        @arg_3.before_request
        def init_g():
            arg_4.provider = arg_2

        # Finish
        return arg_3


return sorted(records, key=operator.itemgetter(4), reverse=True)

def Func(arg_0):
        """Processes collected stats for UI."""
        arg_1 = []
        for arg_2, arg_3 in arg_0.stats.items():
            arg_4, arg_5, arg_6 = arg_2
            arg_7, arg_8, arg_9, arg_10, arg_11 = arg_3
            if arg_0.total_tt == 0:
                arg_12 = 0
            else:
                arg_12 = round(100 * (arg_10 / arg_0.total_tt), 4)
            arg_10 = round(arg_10, 4)
            arg_13 = '%s @ %s' % (arg_6, arg_4)
            arg_14 = base_profiler.hash_name(arg_13)
            arg_1.append(
                (arg_4, arg_5, arg_6, arg_10, arg_12, arg_8,
                 arg_7, arg_9, arg_4, arg_14))
        return sorted(arg_1, key=operator.itemgetter(4), reverse=True)


def Func ( arg_0 = True ) : arg_1 = list ( ) arg_1 . extend ( [ ( 'number_of_runs' , 'uint32' ) , ] ) if arg_0 : arg_1 . extend ( [ ( 'percolation_probability_mean' , 'float64' ) , ( 'percolation_probability_m2' , 'float64' ) , ] ) arg_1 . extend ( [ ( 'max_cluster_size_mean' , 'float64' ) , ( 'max_cluster_size_m2' , 'float64' ) , ( 'moments_mean' , '(5,)float64' ) , ( 'moments_m2' , '(5,)float64' ) , ] ) return _ndarray_dtype ( arg_1 )

def Func(arg_0=True):
    """
    The NumPy Structured Array type for canonical averages over several
    runs

    Helper function

    Parameters
    ----------
    spanning_cluster : bool, optional
        Whether to detect a spanning cluster or not.
        Defaults to ``True``.

    Returns
    -------
    ret : list of pairs of str
        A list of tuples of field names and data types to be used as ``dtype``
        argument in numpy ndarray constructors

    See Also
    --------
    http://docs.scipy.org/doc/numpy/user/basics.rec.html
    canonical_statistics_dtype
    finalized_Func
    """
    arg_1 = list()
    arg_1.extend([
        ('number_of_runs', 'uint32'),
    ])
    if arg_0:
        arg_1.extend([
            ('percolation_probability_mean', 'float64'),
            ('percolation_probability_m2', 'float64'),
        ])
    arg_1.extend([
        ('max_cluster_size_mean', 'float64'),
        ('max_cluster_size_m2', 'float64'),
        ('moments_mean', '(5,)float64'),
        ('moments_m2', '(5,)float64'),
    ])
    return _ndarray_dtype(arg_1)

The NumPy Structured Array type for canonical averages over several
    runs

    Helper function

    Parameters
    ----------
    spanning_cluster : bool, optional
        Whether to detect a spanning cluster or not.
        Defaults to ``True``.

    Returns
    -------
    ret : list of pairs of str
        A list of tuples of field names and data types to be used as ``dtype``
        argument in numpy ndarray constructors

    See Also
    --------
    http://docs.scipy.org/doc/numpy/user/basics.rec.html
    canonical_statistics_dtype
    finalized_canonical_averages_dtype


def Func ( arg_0 , Func = None ) : if Func is None : if arg_0 . debugger . mainpyfile : Func = arg_0 . debugger . mainpyfile else : return None if arg_0 . debugger . settings [ 'basename' ] : return ( os . path . basename ( Func ) ) return Func

def Func(arg_0, Func=None):
        """Return filename or the basename of that depending on the
        basename setting"""
        if Func is None:
            if arg_0.debugger.mainpyfile:
                Func = arg_0.debugger.mainpyfile
            else:
                return None
        if arg_0.debugger.settings['basename']:
            return(os.path.basename(Func))
        return Func


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . states ( arg_1 ) : yield arg_0 . _Func ( arg_1 , arg_2 )

def Func(arg_0, arg_1):
        '''Iterative Funcation generator

        Applies the deformation to an input jams object.

        This generates a sequence of deformed output JAMS.

        Parameters
        ----------
        jam : jams.JAMS
            The jam to Func

        Examples
        --------
        >>> for jam_out in deformer.Func(jam_in):
        ...     process(jam_out)
        '''

        for arg_2 in arg_0.states(arg_1):
            yield arg_0._Func(arg_1, arg_2)

Iterative transformation generator

        Applies the deformation to an input jams object.

        This generates a sequence of deformed output JAMS.

        Parameters
        ----------
        jam : jams.JAMS
            The jam to transform

        Examples
        --------
        >>> for jam_out in deformer.transform(jam_in):
        ...     process(jam_out)


return trolly.list.List(
            trello_client=self,
            list_id=list_json['id'],
            name=list_json['name'],
            data=list_json,
        )

def Func ( arg_0 , arg_1 ) : return trolly . list . List ( trello_client = arg_0 , list_id = arg_1 [ 'id' ] , name = arg_1 [ 'name' ] , data = arg_1 , )

def Func(arg_0, arg_1):
        '''
        Create List object from JSON object

        Returns:
            List: The list from the given `list_json`.
        '''
        return trolly.list.List(
            trello_client=arg_0,
            list_id=arg_1['id'],
            name=arg_1['name'],
            data=arg_1,
        )


return parse_json(res.text, *args, **kwargs)

def Func ( arg_0 , arg_1 , * arg_2 , ** arg_3 ) : if arg_1 . encoding is None : arg_1 . encoding = arg_0 . determine_Func_encoding ( arg_1 . content [ : 4 ] ) return parse_Func ( arg_1 . text , * arg_2 , ** arg_3 )

def Func(arg_0, arg_1, *arg_2, **arg_3):
        """Parses JSON from a response."""
        # if an encoding is already set then use the provided encoding
        if arg_1.encoding is None:
            arg_1.encoding = arg_0.determine_Func_encoding(arg_1.content[:4])
        return parse_Func(arg_1.text, *arg_2, **arg_3)


def Func ( ) : if platform == 'win' : return [ 'cmd.exe' , '/K' ] elif platform == 'linux' : arg_0 = os . getppid ( ) arg_1 = '/proc/{0}/cmdline' . format ( arg_0 ) try : with open ( arg_1 ) as f : Func = f . read ( ) if Func . endswith ( '\x00' ) : Func = Func [ : - 1 ] Func = Func . split ( '\x00' ) return Func + [ binpath ( 'subshell.sh' ) ] except : Func = 'bash' else : Func = 'bash' return [ Func , binpath ( 'subshell.sh' ) ]

def Func():
    '''Return a command to launch a subshell'''

    if platform == 'win':
        return ['cmd.exe', '/K']

    elif platform == 'linux':
        arg_0 = os.getppid()
        arg_1 = '/proc/{0}/cmdline'.format(arg_0)
        try:
            with open(arg_1) as f:
                Func = f.read()
            if Func.endswith('\x00'):
                Func = Func[:-1]
            Func = Func.split('\x00')
            return Func + [binpath('subshell.sh')]
        except:
            Func = 'bash'

    else:
        Func = 'bash'

    return [Func, binpath('subshell.sh')]


def Func ( arg_0 , arg_1 ) : arg_2 = 0 for arg_3 , arg_4 in arg_0 . s3handler ( ) . size ( arg_1 [ 1 : ] ) : arg_2 += arg_4 message ( str ( arg_2 ) )

def Func(arg_0, arg_1):
    '''Handler of total_size command'''
    arg_2 = 0
    for arg_3, arg_4 in arg_0.s3handler().size(arg_1[1:]):
      arg_2 += arg_4
    message(str(arg_2))


def Func(arg_0, arg_1, arg_2, *arg_3, **arg_4):
        """Post notification to all registered observers.

        The registered callback will be called as::

            callback(ntype, sender, *args, **kwargs)

        Parameters
        ----------
        ntype : hashable
            The notification type.
        sender : hashable
            The object sending the notification.
        *args : tuple
            The positional arguments to be passed to the callback.
        **kwargs : dict
            The keyword argument to be passed to the callback.

        Notes
        -----
        * If no registered observers, performance is O(1).
        * Notificaiton order is undefined.
        * Notifications are posted synchronously.
        """

        if(arg_1==None or arg_2==None):
            raise NotificationError(
                "Notification type and sender are required.")

        # If there are no registered observers for the type/sender pair
        if((arg_1 not in arg_0.registered_types and
                None not in arg_0.registered_types) or
            (arg_2 not in arg_0.registered_senders and
                None not in arg_0.registered_senders)):
            return

        for arg_5 in arg_0._observers_for_notification(arg_1, arg_2):
            arg_5(arg_1, arg_2, *arg_3, **arg_4)

Post notification to all registered observers .


def Func ( * arg_0 ) : def Func ( arg_1 ) : for arg_2 in arg_0 : arg_3 = arg_1 . apply ( arg_2 ) if arg_3 : return arg_3 return Null ( ) return Func

def Func(*arg_0):
    """
    A utility function for selecting the first non-null query.

    Parameters:

      funcs: One or more functions

    Returns:

       A function that, when called with a :class:`Node`, will
       pass the input to each `func`, and return the first non-Falsey
       result.

    Examples:

       >>> s = Soupy("
hi
")
       >>> s.apply(Func(Q.find('a'), Q.find('p').text))
       Scalar('hi')
    """
    def Func(arg_1):
        for arg_2 in arg_0:
            arg_3 = arg_1.apply(arg_2)
            if arg_3:
                return arg_3
        return Null()

    return Func

A utility function for selecting the first non-null query.

    Parameters:

      funcs: One or more functions

    Returns:

       A function that, when called with a :class:`Node`, will
       pass the input to each `func`, and return the first non-Falsey
       result.

    Examples:

       >>> s = Soupy("
hi
")
       >>> s.apply(either(Q.find('a'), Q.find('p').text))
       Scalar('hi')

A utility function for selecting the first non - null query .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = [ id ( arg_0 ) ] for arg_4 in arg_1 : arg_3 . append ( id ( arg_4 ) ) arg_3 . extend ( ( arg_5 , id ( arg_6 ) ) for arg_5 , arg_6 in arg_2 . items ( ) ) return tuple ( sorted ( arg_3 ) )

def Func(arg_0, arg_1, arg_2):
    """
    Returns a unique identifier for a class instantiation.
    """
    arg_3 = [id(arg_0)]
    for arg_4 in arg_1:
        arg_3.append(id(arg_4))
    arg_3.extend((arg_5, id(arg_6)) for arg_5, arg_6 in arg_2.items())
    return tuple(sorted(arg_3))

Returns a unique identifier for a class instantiation .


def Func(arg_0, arg_1):
    """
    Reconnect model signals to unit to run simulation with simulation model
    but use original unit interfaces for communication

    :param synthesisedUnitOrIntf: interface where should be signals
        replaced from signals from modelCls
    :param modelCls: simulation model form where signals
        for synthesisedUnitOrIntf should be taken
    """
    arg_2 = arg_0
    arg_3 = arg_2._interfaces

    if arg_3:
        for arg_4 in arg_3:
            # proxies are destroyed on original interfaces and only proxies on
            # array items will remain
            Func(arg_4, arg_1)
    else:
        # reconnect signal from model
        arg_5 = arg_0
        arg_5._sigInside = getattr(arg_1, arg_5._sigInside.name)


def Func ( arg_0 , arg_1 , arg_2 ) : arg_1 . beginEditBlock ( ) if arg_0 . ansi_codes : for arg_3 in arg_0 . _ansi_processor . split_string ( arg_2 ) : for arg_4 in arg_0 . _ansi_processor . actions : if arg_4 . action == 'erase' and arg_4 . area == 'screen' : arg_1 . select ( QtGui . QTextCursor . Document ) arg_1 . removeSelectedText ( ) elif arg_4 . action == 'scroll' and arg_4 . unit == 'page' : arg_1 . insertText ( '\n' ) arg_1 . endEditBlock ( ) arg_0 . _set_top_cursor ( arg_1 ) arg_1 . joinPreviousEditBlock ( ) arg_1 . deletePreviousChar ( ) elif arg_4 . action == 'carriage-return' : arg_1 . movePosition ( arg_1 . StartOfLine , arg_1 . KeepAnchor ) elif arg_4 . action == 'beep' : QtGui . qApp . beep ( ) elif arg_4 . action == 'backspace' : if not arg_1 . atBlockStart ( ) : arg_1 . movePosition ( arg_1 . PreviousCharacter , arg_1 . KeepAnchor ) elif arg_4 . action == 'newline' : arg_1 . movePosition ( arg_1 . EndOfLine ) arg_5 = arg_0 . _ansi_processor . get_format ( ) arg_6 = arg_1 . selectedText ( ) if len ( arg_6 ) == 0 : arg_1 . insertText ( arg_3 , arg_5 ) elif arg_3 is not None : if len ( arg_3 ) >= len ( arg_6 ) : arg_1 . insertText ( arg_3 , arg_5 ) else : arg_7 = arg_6 [ len ( arg_3 ) : ] arg_1 . insertText ( arg_3 + arg_7 , arg_5 ) arg_1 . movePosition ( arg_1 . PreviousCharacter , arg_1 . KeepAnchor , len ( arg_7 ) ) else : arg_1 . insertText ( arg_2 ) arg_1 . endEditBlock ( )

def Func(arg_0, arg_1, arg_2):
        """ Inserts plain text using the specified cursor, processing ANSI codes
            if enabled.
        """
        arg_1.beginEditBlock()
        if arg_0.ansi_codes:
            for arg_3 in arg_0._ansi_processor.split_string(arg_2):
                for arg_4 in arg_0._ansi_processor.actions:

                    # Unlike real terminal emulators, we don't distinguish
                    # between the screen and the scrollback buffer. A screen
                    # erase request clears everything.
                    if arg_4.action == 'erase' and arg_4.area == 'screen':
                        arg_1.select(QtGui.QTextCursor.Document)
                        arg_1.removeSelectedText()

                    # Simulate a form feed by scrolling just past the last line.
                    elif arg_4.action == 'scroll' and arg_4.unit == 'page':
                        arg_1.insertText('\n')
                        arg_1.endEditBlock()
                        arg_0._set_top_cursor(arg_1)
                        arg_1.joinPreviousEditBlock()
                        arg_1.deletePreviousChar()

                    elif arg_4.action == 'carriage-return':
                        arg_1.movePosition(
                            arg_1.StartOfLine, arg_1.KeepAnchor)

                    elif arg_4.action == 'beep':
                        QtGui.qApp.beep()

                    elif arg_4.action == 'backspace':
                        if not arg_1.atBlockStart():
                            arg_1.movePosition(
                                arg_1.PreviousCharacter, arg_1.KeepAnchor)

                    elif arg_4.action == 'newline':
                        arg_1.movePosition(arg_1.EndOfLine)

                arg_5 = arg_0._ansi_processor.get_format()

                arg_6 = arg_1.selectedText()
                if len(arg_6) == 0:
                    arg_1.insertText(arg_3, arg_5)
                elif arg_3 is not None:
                    # BS and CR are treated as a change in print
                    # position, rather than a backwards character
                    # deletion for output equivalence with (I)Python
                    # terminal.
                    if len(arg_3) >= len(arg_6):
                        arg_1.insertText(arg_3, arg_5)
                    else:
                        arg_7 = arg_6[len(arg_3):]
                        arg_1.insertText(arg_3 + arg_7, arg_5)
                        arg_1.movePosition(arg_1.PreviousCharacter,
                               arg_1.KeepAnchor, len(arg_7))
        else:
            arg_1.insertText(arg_2)
        arg_1.endEditBlock()

Inserts plain text using the specified cursor processing ANSI codes if enabled .


(number, currency, format=None,
                    locale=LC_NUMERIC, currency_digits=True,
                    format_type='standard', decimal_quantization=True)

return pattern.apply(
        number, locale, currency=currency, currency_digits=currency_digits,
        decimal_quantization=decimal_quantization)

def Func(arg_0, arg_1, arg_2=None,
                    arg_3=arg_4, arg_5=True,
                    arg_6='standard', arg_7=True):

    """Return formatted currency value.

    >>> Func(1099.98, 'USD', locale='en_US')
    u'$1,099.98'
    >>> Func(1099.98, 'USD', locale='es_CO')
    u'US$\\xa01.099,98'
    >>> Func(1099.98, 'EUR', locale='de_DE')
    u'1.099,98\\xa0\\u20ac'

    The format can also be specified explicitly.  The currency is
    placed with the '¤' sign.  As the sign gets repeated the format
    expands (¤ being the symbol, ¤¤ is the currency abbreviation and
    ¤¤¤ is the full name of the currency):

    >>> Func(1099.98, 'EUR', u'\xa4\xa4 #,##0.00', locale='en_US')
    u'EUR 1,099.98'
    >>> Func(1099.98, 'EUR', u'#,##0.00 \xa4\xa4\xa4',
    ...                 locale='en_US')
    u'1,099.98 euros'

    Currencies usually have a specific number of decimal digits. This function
    favours that information over the given format:

    >>> Func(1099.98, 'JPY', locale='en_US')
    u'\\xa51,100'
    >>> Func(1099.98, 'COP', u'#,##0.00', locale='es_ES')
    u'1.100'

    However, the number of decimal digits can be overriden from the currency
    information, by setting the last parameter to ``False``:

    >>> Func(1099.98, 'JPY', locale='en_US', currency_digits=False)
    u'\\xa51,099.98'
    >>> Func(1099.98, 'COP', u'#,##0.00', locale='es_ES',
    ...                 currency_digits=False)
    u'1.099,98'

    If a format is not specified the type of currency format to use
    from the locale can be specified:

    >>> Func(1099.98, 'EUR', locale='en_US', format_type='standard')
    u'\\u20ac1,099.98'

    When the given currency format type is not available, an exception is
    raised:

    >>> Func('1099.98', 'EUR', locale='root', format_type='unknown')
    Traceback (most recent call last):
        ...
    UnknownCurrencyFormatError: "'unknown' is not a known currency format type"

    By default the locale is allowed to truncate and round a high-precision
    number by forcing its format pattern onto the decimal part. You can bypass
    this behavior with the `decimal_quantization` parameter:

    >>> Func(1099.9876, 'USD', locale='en_US')
    u'$1,099.99'
    >>> Func(1099.9876, 'USD', locale='en_US',
    ...                 decimal_quantization=False)
    u'$1,099.9876'

    :param number: the number to format
    :param currency: the currency code
    :param format: the format string to use
    :param locale: the `Locale` object or locale identifier
    :param currency_digits: use the currency's natural number of decimal digits
    :param format_type: the currency format type to use
    :param decimal_quantization: Truncate and round high-precision numbers to
                                 the format pattern. Defaults to `True`.
    """

    arg_3 = Locale.parse(arg_3)
    if arg_2:
        arg_8 = parse_pattern(arg_2)
    else:
        try:
            arg_9 = arg_3.currency_formats[arg_6]
            arg_8 = NumberPattern(
                arg_9.pattern, arg_9.prefix, arg_9.suffix, arg_9.grouping, arg_9.int_prec,
                arg_9.frac_prec, arg_9.exp_prec, arg_9.exp_plus)

        except KeyError:
            raise UnknownCurrencyFormatError(
                "%r is not a known currency format type" % arg_6)
    return arg_8.apply(
        arg_0, arg_3, arg_1=arg_1, arg_5=arg_5,
        arg_7=arg_7)

Return formatted currency value.

    >>> format_currency(1099.98, 'USD', locale='en_US')
    u'$1,099.98'
    >>> format_currency(1099.98, 'USD', locale='es_CO')
    u'US$\\xa01.099,98'
    >>> format_currency(1099.98, 'EUR', locale='de_DE')
    u'1.099,98\\xa0\\u20ac'

    The format can also be specified explicitly.  The currency is
    placed with the '¤' sign.  As the sign gets repeated the format
    expands (¤ being the symbol, ¤¤ is the currency abbreviation and
    ¤¤¤ is the full name of the currency):

    >>> format_currency(1099.98, 'EUR', u'\xa4\xa4 #,##0.00', locale='en_US')
    u'EUR 1,099.98'
    >>> format_currency(1099.98, 'EUR', u'#,##0.00 \xa4\xa4\xa4',
    ...                 locale='en_US')
    u'1,099.98 euros'

    Currencies usually have a specific number of decimal digits. This function
    favours that information over the given format:

    >>> format_currency(1099.98, 'JPY', locale='en_US')
    u'\\xa51,100'
    >>> format_currency(1099.98, 'COP', u'#,##0.00', locale='es_ES')
    u'1.100'

    However, the number of decimal digits can be overriden from the currency
    information, by setting the last parameter to ``False``:

    >>> format_currency(1099.98, 'JPY', locale='en_US', currency_digits=False)
    u'\\xa51,099.98'
    >>> format_currency(1099.98, 'COP', u'#,##0.00', locale='es_ES',
    ...                 currency_digits=False)
    u'1.099,98'

    If a format is not specified the type of currency format to use
    from the locale can be specified:

    >>> format_currency(1099.98, 'EUR', locale='en_US', format_type='standard')
    u'\\u20ac1,099.98'

    When the given currency format type is not available, an exception is
    raised:

    >>> format_currency('1099.98', 'EUR', locale='root', format_type='unknown')
    Traceback (most recent call last):
        ...
    UnknownCurrencyFormatError: "'unknown' is not a known currency format type"

    By default the locale is allowed to truncate and round a high-precision
    number by forcing its format pattern onto the decimal part. You can bypass
    this behavior with the `decimal_quantization` parameter:

    >>> format_currency(1099.9876, 'USD', locale='en_US')
    u'$1,099.99'
    >>> format_currency(1099.9876, 'USD', locale='en_US',
    ...                 decimal_quantization=False)
    u'$1,099.9876'

    :param number: the number to format
    :param currency: the currency code
    :param format: the format string to use
    :param locale: the `Locale` object or locale identifier
    :param currency_digits: use the currency's natural number of decimal digits
    :param format_type: the currency format type to use
    :param decimal_quantization: Truncate and round high-precision numbers to
                                 the format pattern. Defaults to `True`.


(x, sample_axis=0, keepdims=False, name=None)

def Func ( arg_0 , arg_1 = 0 , arg_2 = False , arg_3 = None ) : with tf . compat . v1 . name_scope ( arg_3 , 'Func' , values = [ arg_0 , arg_1 ] ) : return tf . sqrt ( variance ( arg_0 , arg_1 = arg_1 , arg_2 = arg_2 ) )

def Func(arg_0, arg_1=0, arg_2=False, arg_3=None):
  """Estimate standard deviation using samples.

  Given `N` samples of scalar valued random variable `X`, standard deviation may
  be estimated as

  ```none
  Stddev[X] := Sqrt[Var[X]],
  Var[X] := N^{-1} sum_{n=1}^N (X_n - Xbar) Conj{(X_n - Xbar)},
  Xbar := N^{-1} sum_{n=1}^N X_n
  ```

  ```python
  x = tf.random_normal(shape=(100, 2, 3))

  # Func[i, j] is the sample standard deviation of the (i, j) batch member.
  Func = tfp.stats.Func(x, sample_axis=0)
  ```

  Scaling a unit normal by a standard deviation produces normal samples
  with that standard deviation.

  ```python
  observed_data = read_data_samples(...)
  Func = tfp.stats.Func(observed_data)

  # Make fake_data with the same standard deviation as observed_data.
  fake_data = Func * tf.random_normal(shape=(100,))
  ```

  Notice we divide by `N` (the numpy default), which does not create `NaN`
  when `N = 1`, but is slightly biased.

  Args:
    x:  A numeric `Tensor` holding samples.
    sample_axis: Scalar or vector `Tensor` designating axis holding samples, or
      `None` (meaning all axis hold samples).
      Default value: `0` (leftmost dimension).
    keepdims:  Boolean.  Whether to keep the sample axis as singletons.
    name: Python `str` name prefixed to Ops created by this function.
          Default value: `None` (i.e., `'Func'`).

  Returns:
    Func: A `Tensor` of same `dtype` as the `x`, and rank equal to
      `rank(x) - len(sample_axis)`
  """
  with tf.compat.v1.name_scope(arg_3, 'Func', values=[arg_0, arg_1]):
    return tf.sqrt(variance(arg_0, arg_1=arg_1, arg_2=arg_2))

Estimate standard deviation using samples.

  Given `N` samples of scalar valued random variable `X`, standard deviation may
  be estimated as

  ```none
  Stddev[X] := Sqrt[Var[X]],
  Var[X] := N^{-1} sum_{n=1}^N (X_n - Xbar) Conj{(X_n - Xbar)},
  Xbar := N^{-1} sum_{n=1}^N X_n
  ```

  ```python
  x = tf.random_normal(shape=(100, 2, 3))

  # stddev[i, j] is the sample standard deviation of the (i, j) batch member.
  stddev = tfp.stats.stddev(x, sample_axis=0)
  ```

  Scaling a unit normal by a standard deviation produces normal samples
  with that standard deviation.

  ```python
  observed_data = read_data_samples(...)
  stddev = tfp.stats.stddev(observed_data)

  # Make fake_data with the same standard deviation as observed_data.
  fake_data = stddev * tf.random_normal(shape=(100,))
  ```

  Notice we divide by `N` (the numpy default), which does not create `NaN`
  when `N = 1`, but is slightly biased.

  Args:
    x:  A numeric `Tensor` holding samples.
    sample_axis: Scalar or vector `Tensor` designating axis holding samples, or
      `None` (meaning all axis hold samples).
      Default value: `0` (leftmost dimension).
    keepdims:  Boolean.  Whether to keep the sample axis as singletons.
    name: Python `str` name prefixed to Ops created by this function.
          Default value: `None` (i.e., `'stddev'`).

  Returns:
    stddev: A `Tensor` of same `dtype` as the `x`, and rank equal to
      `rank(x) - len(sample_axis)`

Estimate standard deviation using samples .


def Func(arg_0, arg_1):
        """Parse a sound from its name"""
        arg_2 = arg_1.split(' ')
        if frozenset(arg_2) in arg_0.features:
            return arg_0.features[frozenset(arg_2)]
        arg_3, arg_4 = arg_2[:-1], arg_2[-1]
        if arg_4 in ['diphthong', 'cluster']:
            if arg_1.startswith('from ') and 'to ' in arg_1:
                arg_5 = {'diphthong': 'vowel', 'cluster': 'consonant'}[arg_4]
                arg_6 = ' '.join(arg_1.split(' ')[1:-1])
                arg_7, arg_8 = arg_6.split(' to ')
                arg_9, arg_10 = frozenset(arg_7.split(' ') + [arg_5]), frozenset(
                    arg_8.split(' ') + [arg_5])
                if arg_9 in arg_0.features and arg_10 in arg_0.features:
                    arg_11, arg_12 = (arg_0.features[arg_9], arg_0.features[arg_10])
                    if arg_4 == 'diphthong':
                        return Diphthong.from_sounds(arg_11 + arg_12, arg_11, arg_12, arg_0)  # noqa: F405
                    else:
                        return Cluster.from_sounds(arg_11 + arg_12, arg_11, arg_12, arg_0)  # noqa: F405
                else:
                    # try to generate the sounds if they are not there
                    arg_11, arg_12 = arg_0.Func(arg_7 + ' ' + arg_5), arg_0.Func(
                        arg_8 + ' ' + arg_5)
                    if not (isinstance(
                        arg_11, UnknownSound) or isinstance(arg_12, UnknownSound)):  # noqa: F405
                        if arg_4 == 'diphthong':
                            return Diphthong.from_sounds(  # noqa: F405
                                arg_11 + arg_12, arg_11, arg_12, arg_0)
                        return Cluster.from_sounds(arg_11 + arg_12, arg_11, arg_12, arg_0)  # noqa: F405
                    raise ValueError('components could not be found in system')
            else:
                raise ValueError('name string is erroneously encoded')

        if arg_4 not in arg_0.sound_classes:
            raise ValueError('no sound class specified')

        arg_13 = {arg_0._feature_values.get(comp, '?'): comp for comp in arg_3}
        if '?' in arg_13:
            raise ValueError('string contains unknown features')
        arg_13['grapheme'] = ''
        arg_13['ts'] = arg_0
        arg_14 = arg_0.sound_classes[arg_4](**arg_13)
        if arg_14.featureset not in arg_0.features:
            arg_14.generated = True
            return arg_14
        return arg_0.features[arg_14.featureset]


def Func(arg_0, arg_1="(", arg_2=")"):
    """Parse function calls."""
    arg_3 = _pair_delims(arg_0, arg_1=arg_1, arg_2=arg_2)
    arg_4 = "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    arg_5 = "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" "_"
    arg_6 = []
    for arg_7, arg_8 in arg_3:
        if arg_7 and arg_0[arg_7 - 1] in arg_5:
            for arg_9, arg_10 in enumerate(reversed(arg_0[:arg_7])):
                if arg_10 not in arg_5:
                    break
            else:
                arg_9 = arg_7
            arg_6.append(
                {
                    "fname": arg_0[arg_7 - arg_9 : arg_7],
                    "expr": arg_0[arg_7 + 1 : arg_8],
                    "start": arg_7 - arg_9,
                    "stop": arg_8,
                }
            )
            if arg_0[arg_7 - arg_9] not in arg_4:
                raise RuntimeError(
                    "Function name `{0}` is not valid".format(arg_0[arg_7 - arg_9 : arg_7])
                )
    return arg_6


def Func ( arg_0 , arg_1 ) : if arg_0 . custom_properties : for arg_2 , arg_3 in arg_0 . custom_properties . items ( ) : arg_1 . headers . append ( ( arg_2 , arg_0 . _serialize_escaped_properties_value ( arg_3 ) ) ) arg_1 . headers . append ( ( 'Content-Type' , arg_0 . type ) ) if arg_0 . broker_properties : if hasattr ( arg_0 . broker_properties , 'items' ) : arg_4 = { arg_2 : arg_0 . _serialize_basic_properties_value ( arg_3 ) for arg_2 , arg_3 in arg_0 . broker_properties . items ( ) } arg_4 = json . dumps ( arg_4 ) else : arg_4 = arg_0 . broker_properties arg_1 . headers . append ( ( 'BrokerProperties' , str ( arg_4 ) ) ) return arg_1 . headers

def Func(arg_0, arg_1):
        ''' add addtional headers to request for message request.'''

        # Adds custom properties
        if arg_0.custom_properties:
            for arg_2, arg_3 in arg_0.custom_properties.items():
                arg_1.headers.append((arg_2, arg_0._serialize_escaped_properties_value(arg_3)))

        # Adds content-type
        arg_1.headers.append(('Content-Type', arg_0.type))

        # Adds BrokerProperties
        if arg_0.broker_properties:
            if hasattr(arg_0.broker_properties, 'items'):
                arg_4 = {arg_2: arg_0._serialize_basic_properties_value(arg_3)
                                     for arg_2, arg_3
                                     in arg_0.broker_properties.items()}
                arg_4 = json.dumps(arg_4)
            else:
                arg_4 = arg_0.broker_properties
            arg_1.headers.append(
                ('BrokerProperties', str(arg_4)))

        return arg_1.headers

add addtional headers to request for message request .


def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_3 = get_ipython ( ) except NameError : return arg_4 = arg_1 [ 'metadata' ] or { } arg_4 [ 'engine' ] = arg_2 arg_3 . display_pub . publish ( arg_1 [ 'source' ] , arg_1 [ 'data' ] , arg_4 )

def Func(arg_0, arg_1, arg_2):
        """republish individual displaypub content dicts"""
        try:
            arg_3 = get_ipython()
        except NameError:
            # displaypub is meaningless outside IPython
            return
        arg_4 = arg_1['metadata'] or {}
        arg_4['engine'] = arg_2
        arg_3.display_pub.publish(arg_1['source'], arg_1['data'], arg_4)


def Func(arg_0, arg_1):
        """
        Pause an RSS-Driven campaign.

        :param campaign_id: The unique id for the campaign.
        :type campaign_id: :py:class:`str`
        """
        arg_0.campaign_id = arg_1
        return arg_0._mc_client._post(url=arg_0._build_path(arg_1, 'actions/Func'))


return np.sqrt(
            np.sum(
                (self.coords[:-1, :] - self.coords[1:, :]) ** 2,
                axis=1
            )
        )

def Func ( arg_0 ) : if len ( arg_0 . coords ) <= 1 : return np . zeros ( ( 0 , ) , dtype = np . float32 ) return np . sqrt ( np . sum ( ( arg_0 . coords [ : - 1 , : ] - arg_0 . coords [ 1 : , : ] ) ** 2 , axis = 1 ) )

def Func(arg_0):
        """
        Get the euclidean distance between each two consecutive points.

        Returns
        -------
        ndarray
            Euclidean distances between point pairs.
            Same order as in `coords`. For ``N`` points, ``N-1`` distances
            are returned.

        """
        if len(arg_0.coords) <= 1:
            return np.zeros((0,), dtype=np.float32)
        return np.sqrt(
            np.sum(
                (arg_0.coords[:-1, :] - arg_0.coords[1:, :]) ** 2,
                axis=1
            )
        )

Get the euclidean distance between each two consecutive points .


(self, jobID, fields, ignoreKilled=False)

return [(r[0], list(r[1:])) for r in rows]

def Func(arg_0, arg_1, arg_2, arg_3=False):
    """ Gets the specified fields for all the models for a single job. This is
    similar to modelsGetFields

    Parameters:
    ----------------------------------------------------------------
    jobID:              jobID for the models to be searched
    fields:             A list  of fields to return
    ignoreKilled:       (True/False). If True, this will ignore models that
                        have been killed

    Returns: a (possibly empty) list of tuples as follows
      [
        (model_id1, [field1, ..., fieldn]),
        (model_id2, [field1, ..., fieldn]),
        (model_id3, [field1, ..., fieldn])
                    ...
      ]

    NOTE: since there is a window of time between a job getting inserted into
     jobs table and the job's worker(s) starting up and creating models, an
     empty-list result is one of the normal outcomes.
    """

    assert len(arg_2) >= 1, 'fields is empty'

    # Form the sequence of field name strings that will go into the
    #  request
    arg_4 = [arg_0._models.pubToDBNameDict[x] for x in arg_2]
    arg_5 = ','.join(arg_4)

    arg_6 = 'SELECT model_id, %s FROM %s ' \
              '          WHERE job_id=%%s ' \
              % (arg_5, arg_0.modelsTableName)
    arg_7 = [arg_1]

    if arg_3:
      arg_6 += ' AND (completion_reason IS NULL OR completion_reason != %s)'
      arg_7.append(arg_0.CMPL_REASON_KILLED)

    # Get a database connection and cursor
    with ConnectionFactory.get() as conn:
      conn.cursor.execute(arg_6, arg_7)
      arg_8 = conn.cursor.fetchall()

    if arg_8 is None:
      # fetchall is defined to return a (possibly-empty) sequence of
      # sequences; however, we occasionally see None returned and don't know
      # why...
      arg_0._logger.error("Unexpected None result from cursor.fetchall; "
                         "query=%r; Traceback=%r",
                         arg_6, traceback.format_exc())

    return [(arg_9[0], list(arg_9[1:])) for arg_9 in arg_8]

Gets the specified fields for all the models for a single job . This is similar to modelsGetFields


def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : arg_6 = BytearrayStream ( ) arg_0 . application_namespace . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . application_data . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . length = arg_6 . length ( ) super ( ApplicationSpecificInformation , arg_0 ) . Func ( arg_1 , arg_2 = arg_2 ) arg_1 . Func ( arg_6 . buffer )

def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Write the data encoding the ApplicationSpecificInformation object to a
        stream.

        Args:
            ostream (Stream): A data stream in which to encode object data,
                supporting a Func method; usually a BytearrayStream object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be encoded. Optional,
                defaults to KMIP 1.0.
        """
        arg_6 = BytearrayStream()

        arg_0.application_namespace.Func(arg_6, arg_2=arg_2)
        arg_0.application_data.Func(arg_6, arg_2=arg_2)

        arg_0.length = arg_6.length()
        super(ApplicationSpecificInformation, arg_0).Func(
            arg_1,
            arg_2=arg_2
        )
        arg_1.Func(arg_6.buffer)

Write the data encoding the ApplicationSpecificInformation object to a
        stream.

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

Write the data encoding the ApplicationSpecificInformation object to a stream .


def
Func
(
arg_0
)
:
arg_1
=
set
(
[
arg_0
.
_pk
]
)
arg_2
=
[
arg_0
]
arg_3
=
set
(
)
arg_4
=
[
]
def
_set_default
(
arg_0
,
arg_5
,
arg_6
=
arg_7
)
:
arg_8
=
arg_0
.
_pk
if
arg_8
in
arg_1
:
return
arg_9
=
arg_0
.
__class__
.
_columns
[
arg_5
]
arg_6
=
arg_6
if
arg_6
is
not
arg_7
else
arg_9
.
_default
if
arg_6
in
(
,
arg_7
)
:
setattr
(
arg_0
,
arg_5
,
)
elif
callable
(
arg_9
.
_default
)
:
setattr
(
arg_0
,
arg_5
,
arg_9
.
_default
(
)
)
else
:
setattr
(
arg_0
,
arg_5
,
arg_9
.
_default
)
if
arg_8
not
in
arg_3
:
arg_3
.
add
(
arg_8
)
arg_4
.
append
(
arg_0
)
for
arg_10
in
arg_2
:
for
arg_11
,
arg_5
,
arg_12
in
MODELS_REFERENCED
.
get
(
arg_10
.
_namespace
,
(
)
)
:
if
arg_12
==
'no action'
:
continue
arg_13
=
MODELS
[
arg_11
]
.
get_by
(
**
{
arg_5
:
arg_10
.
id
}
)
if
not
arg_13
:
continue
if
arg_12
==
'restrict'
:
raise
_restrict
(
arg_10
,
arg_5
,
arg_13
)
elif
arg_12
==
'set null'
:
for
arg_14
in
arg_13
:
_set_default
(
arg_14
,
arg_5
,
)
continue
elif
arg_12
==
'set default'
:
for
arg_14
in
arg_13
:
_set_default
(
arg_14
,
arg_5
)
continue
for
arg_0
in
(
arg_13
if
isinstance
(
arg_13
,
list
)
else
[
arg_13
]
)
:
if
arg_0
.
_pk
not
in
arg_1
:
arg_1
.
add
(
arg_0
.
_pk
)
arg_2
.
append
(
arg_0
)
for
arg_10
in
arg_2
:
arg_10
.
delete
(
skipFunc_i_really_mean_it
=
SKIP_ON_DELETE
)
for
arg_10
in
arg_4
:
if
arg_10
.
_pk
not
in
arg_1
:
arg_10
.
save
(
)

def Func(arg_0):
    '''
    This function handles all on_delete semantics defined on OneToMany columns.

    This function only exists because 'cascade' is *very* hard to get right.
    '''
    arg_1 = set([arg_0._pk])
    arg_2 = [arg_0]
    arg_3 = set()
    arg_4 = []

    def _set_default(arg_0, arg_5, arg_6=arg_7):
        arg_8 = arg_0._pk
        if arg_8 in arg_1:
            # going to be deleted, don't need to modify
            return

        arg_9 = arg_0.__class__._columns[arg_5]
        arg_6 = arg_6 if arg_6 is not arg_7 else arg_9._default
        if arg_6 in (None, arg_7):
            setattr(arg_0, arg_5, None)
        elif callable(arg_9._default):
            setattr(arg_0, arg_5, arg_9._default())
        else:
            setattr(arg_0, arg_5, arg_9._default)

        if arg_8 not in arg_3:
            arg_3.add(arg_8)
            arg_4.append(arg_0)

    for arg_10 in arg_2:
        for arg_11, arg_5, arg_12 in MODELS_REFERENCED.get(arg_10._namespace, ()):
            if arg_12 == 'no action':
                continue

            arg_13 = MODELS[arg_11].get_by(**{arg_5: arg_10.id})
            if not arg_13:
                continue

            if arg_12 == 'restrict':
                # raise the exception here for a better traceback
                raise _restrict(arg_10, arg_5, arg_13)
            elif arg_12 == 'set null':
                for arg_14 in arg_13:
                    _set_default(arg_14, arg_5, None)
                continue
            elif arg_12 == 'set default':
                for arg_14 in arg_13:
                    _set_default(arg_14, arg_5)
                continue

            # otherwise col.Func == 'cascade'
            for arg_0 in (arg_13 if isinstance(arg_13, list) else [arg_13]):
                if arg_0._pk not in arg_1:
                    arg_1.add(arg_0._pk)
                    arg_2.append(arg_0)

    # If we got here, then to_delete includes all items to delete. Let's delete
    # them!
    for arg_10 in arg_2:
        arg_10.delete(skipFunc_i_really_mean_it=SKIP_ON_DELETE)
    for arg_10 in arg_4:
        # Careful not to resurrect deleted entities
        if arg_10._pk not in arg_1:
            arg_10.save()

This function handles all on_delete semantics defined on OneToMany columns .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
2
)
:
for
arg_4
in
range
(
arg_3
)
:
for
arg_5
in
arg_0
:
arg_5
=
get_coded_text
(
arg_5
)
arg_6
=
"\r{0} {1}"
.
format
(
arg_5
,
arg_2
)
sys
.
stdout
.
write
(
arg_6
)
sys
.
stdout
.
write
(
CLEAR_LINE
)
sys
.
stdout
.
flush
(
)
time
.
sleep
(
0.001
*
arg_1
)

def Func(arg_0, arg_1, arg_2, arg_3=2):
    """Animate given frame for set number of iterations.

    Parameters
    ----------
    frames : list
        Frames for animating
    interval : float
        Interval between two frames
    name : str
        Name of animation
    iterations : int, optional
        Number of loops for animations
    """
    for arg_4 in range(arg_3):
        for arg_5 in arg_0:
            arg_5 = get_coded_text(arg_5)
            arg_6 = "\r{0} {1}".format(arg_5, arg_2)
            sys.stdout.write(arg_6)
            sys.stdout.write(CLEAR_LINE)
            sys.stdout.flush()
            time.sleep(0.001 * arg_1)

Animate given frame for set number of iterations .


def Func ( arg_0 ) : if arg_0 . loop is None : arg_0 . loop = asyncio . get_event_loop ( ) arg_2 = asyncio . Task ( arg_0 . loop . create_Funcion ( arg_0 . config [ 'protocol_factory' ] , arg_0 . config [ 'host' ] , arg_0 . config [ 'port' ] , ssl = arg_0 . config [ 'ssl' ] ) , arg_1 = arg_0 . loop ) arg_2 . add_done_callback ( arg_0 . Funcion_made ) return arg_2

def Func(arg_0):
        """Func to the server"""
        if arg_0.loop is None:  # pragma: no cover
            arg_0.loop = asyncio.get_event_loop()
        arg_2 = asyncio.Task(
            arg_0.loop.create_Funcion(
                arg_0.config['protocol_factory'],
                arg_0.config['host'], arg_0.config['port'],
                ssl=arg_0.config['ssl']),
            arg_1=arg_0.loop)
        arg_2.add_done_callback(arg_0.Funcion_made)
        return arg_2


def Func ( arg_0 ) : if arg_0 . items : if arg_0 . items [ - 1 ] is not arg_0 . exit_item : arg_0 . items . append ( arg_0 . exit_item ) return True return False

def Func(arg_0):
        """
        Add the exit item if necessary. Used to make sure there aren't multiple exit items

        :return: True if item needed to be added, False otherwise
        :rtype: bool
        """
        if arg_0.items:
            if arg_0.items[-1] is not arg_0.exit_item:
                arg_0.items.append(arg_0.exit_item)
                return True
        return False

Add the exit item if necessary . Used to make sure there aren t multiple exit items


def Func ( arg_0 ) : arg_1 = Tag ( arg_0 . version . major , arg_0 . version . minor , arg_0 . version . patch ) if arg_0 . revision is not None : arg_1 . revision = arg_0 . revision . Func ( ) return arg_1

def Func(arg_0):
        """
        Returns a copy of this object
        """
        arg_1 = Tag(arg_0.version.major, arg_0.version.minor, arg_0.version.patch)
        if arg_0.revision is not None:
            arg_1.revision = arg_0.revision.Func()
        return arg_1


def
Func
(
arg_0
,
arg_1
,
arg_2
=
)
:
LOG
.
info
(
"Func %s for tenant %s fields %s"
%
(
arg_1
,
arg_0
.
tenant_id
,
arg_2
)
)
if
not
arg_0
.
is_admin
:
raise
n_exc
.
NotAuthorized
(
)
arg_3
=
db_api
.
mac_address_range_find
(
arg_0
,
arg_1
=
arg_1
,
scope
=
db_api
.
ONE
)
if
not
arg_3
:
raise
q_exc
.
MacAddressRangeNotFound
(
mac_address_range_id
=
arg_1
)
return
v
.
_make_mac_range_dict
(
arg_3
)

def Func(arg_0, arg_1, arg_2=None):
    """Retrieve a mac_address_range.

    : param context: neutron api request context
    : param id: UUID representing the network to fetch.
    : param fields: a list of strings that are valid keys in a
        network dictionary as listed in the RESOURCE_ATTRIBUTE_MAP
        object in neutron/api/v2/attributes.py. Only these fields
        will be returned.
    """
    LOG.info("Func %s for tenant %s fields %s" %
             (arg_1, arg_0.tenant_id, arg_2))

    if not arg_0.is_admin:
        raise n_exc.NotAuthorized()

    arg_3 = db_api.mac_address_range_find(
        arg_0, arg_1=arg_1, scope=db_api.ONE)

    if not arg_3:
        raise q_exc.MacAddressRangeNotFound(
            mac_address_range_id=arg_1)
    return v._make_mac_range_dict(arg_3)


async def Func ( arg_0 ) : if not arg_0 . is_connected : return await arg_0 . stop ( ) arg_1 = arg_0 . _lavalink . bot . _connection . _get_websocket ( int ( arg_0 . guild_id ) ) await arg_1 . voice_state ( arg_0 . guild_id , None )

async def Func(arg_0):
        """ Disconnects from the voice channel, if any. """
        if not arg_0.is_connected:
            return

        await arg_0.stop()

        arg_1 = arg_0._lavalink.bot._connection._get_websocket(int(arg_0.guild_id))
        await arg_1.voice_state(arg_0.guild_id, None)

Disconnects from the voice channel if any .


def Func(arg_0):
        """Print on-disk array sizes required for current set of parameters."""
        arg_1 = 4
        arg_2 = 1024 * 1024
        arg_3 = arg_0.n_samples * arg_1
        arg_4 = arg_3 * arg_0.num_particles / arg_2
        arg_5 = 3 * arg_3 * arg_0.num_particles / arg_2
        print("  Number of particles:", arg_0.num_particles)
        print("  Number of time steps:", arg_0.n_samples)
        print("  Emission array - 1 particle (float32): %.1f MB" % (arg_3 / arg_2))
        print("  Emission array (float32): %.1f MB" % arg_4)
        print("  Position array (float32): %.1f MB " % arg_5)

Print on - disk array sizes required for current set of parameters .


def Func(arg_0):
        """Creates a new CrunchyrollAPI object, initiates it's session and
        tries to authenticate it either by using saved credentials or the
        user's username and password.
        """
        if arg_0.options.get("purge_credentials"):
            arg_0.cache.set("session_id", None, 0)
            arg_0.cache.set("auth", None, 0)
            arg_0.cache.set("session_id", None, 0)

        # use the crunchyroll locale as an override, for backwards compatibility
        arg_1 = arg_0.get_option("locale") or arg_0.session.localization.language_code
        arg_2 = CrunchyrollAPI(arg_0.cache,
                             arg_0.session,
                             session_id=arg_0.get_option("session_id"),
                             arg_1=arg_1)

        if not arg_0.get_option("session_id"):
            arg_0.logger.debug("Creating session with locale: {0}", arg_1)
            arg_2.start_session()

            if arg_2.auth:
                arg_0.logger.debug("Using saved credentials")
                arg_3 = arg_2.authenticate()
                arg_0.logger.info("Successfully logged in as '{0}'",
                                 arg_3["user"]["username"] or arg_3["user"]["email"])
            elif arg_0.options.get("username"):
                try:
                    arg_0.logger.debug("Attempting to login using username and password")
                    arg_2.login(arg_0.options.get("username"),
                              arg_0.options.get("password"))
                    arg_3 = arg_2.authenticate()
                    arg_0.logger.info("Logged in as '{0}'",
                                     arg_3["user"]["username"] or arg_3["user"]["email"])

                except CrunchyrollAPIError as err:
                    raise PluginError(u"Authentication error: {0}".format(err.msg))
            else:
                arg_0.logger.warning(
                    "No authentication provided, you won't be able to access "
                    "premium restricted content"
                )

        return arg_2

Creates a new CrunchyrollAPI object initiates it s session and tries to authenticate it either by using saved credentials or the user s username and password .


def Func(arg_0):
        """Delete Credential from datastore."""

        if arg_0._cache:
            arg_0._cache.delete(arg_0._key_name)

        arg_0._delete_entity()


def Func ( arg_0 = None ) : from IPython . core import page page . page ( gui_reference , auto_html = True )

def Func(arg_0=None):
    """Show a basic reference about the GUI Console."""
    from IPython.core import page
    page.page(gui_reference, auto_html=True)

Show a basic reference about the GUI Console .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 [ 'charge' ] < arg_1 : return False if arg_2 != 0 and arg_0 [ 'charge' ] > arg_2 : return False return True

def Func(arg_0, arg_1, arg_2):
    ''' Check if given hit is withing the limits.
    '''
    # Omit hits with charge < min_hit_charge
    if arg_0['charge'] < arg_1:
        return False

    # Omit hits with charge > max_hit_charge
    if arg_2 != 0 and arg_0['charge'] > arg_2:
        return False

    return True

Check if given hit is withing the limits .


def Func ( arg_0 , arg_1 ) : arg_2 = numpy . array ( arg_0 . _categoryList ) arg_3 = numpy . zeros ( arg_2 . shape [ 0 ] ) arg_3 . fill ( - 1 ) for arg_4 in xrange ( len ( arg_1 ) ) : arg_3 [ arg_2 == arg_4 ] = arg_1 [ arg_4 ] arg_0 . _categoryList = list ( arg_3 )

def Func(arg_0, arg_1):
    """Change the category indices.

    Used by the Network Builder to keep the category indices in sync with the
    ImageSensor categoryInfo when the user renames or removes categories.

    :param mapping: List of new category indices. For example, mapping=[2,0,1]
        would change all vectors of category 0 to be category 2, category 1 to
        0, and category 2 to 1
    """
    arg_2 = numpy.array(arg_0._categoryList)
    arg_3 = numpy.zeros(arg_2.shape[0])
    arg_3.fill(-1)
    for arg_4 in xrange(len(arg_1)):
      arg_3[arg_2==arg_4] = arg_1[arg_4]
    arg_0._categoryList = list(arg_3)


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
{
}
if
not
arg_1
:
raise
ValueError
(
"invalid blockade_id"
)
arg_3
=
arg_0
.
get_chain_rules
(
"FORWARD"
)
for
arg_4
in
arg_3
:
arg_5
=
arg_4
.
split
(
)
if
len
(
arg_5
)
<
4
:
continue
try
:
arg_6
=
parse_partition_index
(
arg_1
,
arg_5
[
0
]
)
except
ValueError
:
continue
arg_7
=
arg_5
[
3
]
if
arg_7
:
arg_2
[
arg_7
]
=
arg_6
return
arg_2

def Func(arg_0, arg_1):
        """Get a map of blockade chains IDs -> list of IPs targeted at them

        For figuring out which container is in which partition
        """
        arg_2 = {}
        if not arg_1:
            raise ValueError("invalid blockade_id")
        arg_3 = arg_0.get_chain_rules("FORWARD")

        for arg_4 in arg_3:
            arg_5 = arg_4.split()
            if len(arg_5) < 4:
                continue
            try:
                arg_6 = parse_partition_index(arg_1, arg_5[0])
            except ValueError:
                continue  # not a rule targetting a blockade chain

            arg_7 = arg_5[3]
            if arg_7:
                arg_2[arg_7] = arg_6
        return arg_2

Get a map of blockade chains IDs - > list of IPs targeted at them


def Func(arg_0):
    """
    Remove RECORD.jws from a wheel by truncating the zip file.

    RECORD.jws must be at the end of the archive. The zip file must be an
    ordinary archive, with the compressed files and the directory in the same
    order, and without any non-zip content after the truncation point.
    """
    import wheel.install
    arg_1 = wheel.install.VerifyingZipFile(arg_0, "a")
    arg_2 = arg_1.infolist()
    if not (len(arg_2) and arg_2[-1].filename.endswith('/RECORD.jws')):
        raise WheelError("RECORD.jws not found at end of archive.")
    arg_1.pop()
    arg_1.close()

Remove RECORD . jws from a wheel by truncating the zip file . RECORD . jws must be at the end of the archive . The zip file must be an ordinary archive with the compressed files and the directory in the same order and without any non - zip content after the truncation point .


def Func ( arg_0 , arg_1 = 1 , arg_2 = 1 ) : arg_0 . config [ 'sites.jetstream.{0}' . format ( arg_0 . pool ) ] [ 'flavor' ] arg_3 = 0 if arg_1 == 1 : arg_4 = len ( arg_0 . blocks ) arg_0 . blocks [ arg_4 ] = [ ] for arg_5 in range ( 0 , arg_2 ) : arg_6 = arg_0 . server_manager . create ( 'parsl-{0}-{1}' . format ( arg_4 , arg_5 ) , arg_0 . client . images . get ( '87e08a17-eae2-4ce4-9051-c561d9a54bde' ) , arg_0 . client . flavors . list ( ) [ 0 ] , min_count = 1 , max_count = 1 , userdata = setup_script . format ( engine_config = arg_0 . engine_config ) , key_name = 'TG-MCB090174-api-key' , security_groups = [ 'global-ssh' ] , nics = [ { "net-id" : '724a50cf-7f11-4b3b-a884-cd7e6850e39e' , "net-name" : 'PARSL-priv-net' , "v4-fixed-ip" : '' } ] ) arg_0 . blocks [ arg_4 ] . extend ( [ arg_6 ] ) arg_3 += 1 return arg_3

def Func(arg_0, arg_1=1, arg_2=1):
        ''' Scale out the existing resources.
        '''
        arg_0.config['sites.jetstream.{0}'.format(arg_0.pool)]['flavor']
        arg_3 = 0
        if arg_1 == 1:
            arg_4 = len(arg_0.blocks)
            arg_0.blocks[arg_4] = []
            for arg_5 in range(0, arg_2):
                arg_6 = arg_0.server_manager.create(
                    'parsl-{0}-{1}'.format(arg_4, arg_5),  # Name
                    arg_0.client.images.get('87e08a17-eae2-4ce4-9051-c561d9a54bde'),  # Image_id
                    arg_0.client.flavors.list()[0],
                    min_count=1,
                    max_count=1,
                    userdata=setup_script.format(engine_config=arg_0.engine_config),
                    key_name='TG-MCB090174-api-key',
                    security_groups=['global-ssh'],
                    nics=[{
                        "net-id": '724a50cf-7f11-4b3b-a884-cd7e6850e39e',
                        "net-name": 'PARSL-priv-net',
                        "v4-fixed-ip": ''
                    }])
                arg_0.blocks[arg_4].extend([arg_6])
                arg_3 += 1

        return arg_3


def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , basestring ) : if isinstance ( arg_1 , str ) : arg_2 = arg_0 . encoding if ( arg_2 is not None and not ( arg_2 == 'utf-8' ) ) : arg_1 = arg_1 . decode ( arg_2 ) if arg_0 . ensure_ascii : return Func_basestring_ascii ( arg_1 ) else : return Func_basestring ( arg_1 ) arg_3 = list ( arg_0 . iterFunc ( arg_1 ) ) return '' . join ( arg_3 )

def Func(arg_0, arg_1):
        """
        Return a JSON string representation of a Python data structure.

        >>> JSONEncoder().Func({"foo": ["bar", "baz"]})
        '{"foo": ["bar", "baz"]}'
        """
        # This is for extremely simple cases and benchmarks.
        if isinstance(arg_1, basestring):
            if isinstance(arg_1, str):
                arg_2 = arg_0.encoding
                if (arg_2 is not None
                        and not (arg_2 == 'utf-8')):
                    arg_1 = arg_1.decode(arg_2)
            if arg_0.ensure_ascii:
                return Func_basestring_ascii(arg_1)
            else:
                return Func_basestring(arg_1)
        # This doesn't pass the iterator directly to ''.join() because the
        # exceptions aren't as detailed.  The list call should be roughly
        # equivalent to the PySequence_Fast that ''.join() would do.
        arg_3 = list(arg_0.iterFunc(arg_1))
        return ''.join(arg_3)

Return a JSON string representation of a Python data structure.

        >>> JSONEncoder().encode({"foo": ["bar", "baz"]})
        '{"foo": ["bar", "baz"]}'

Return a JSON string representation of a Python data structure .


def Func ( arg_0 , arg_1 ) : arg_1 . endlexpos = arg_1 . lexpos + len ( arg_1 . value ) return arg_1

def Func(arg_0, arg_1):
        r"!\="
        arg_1.endlexpos = arg_1.lexpos + len(arg_1.value)
        return arg_1


(self, pin, min_pulse=544, max_pulse=2400)

def Func(arg_0, arg_1, arg_2=544, arg_3=2400):
        """
        Configure a pin as a servo pin. Set pulse min, max in ms.

        :param pin: Servo Pin.

        :param min_pulse: Min pulse width in ms.

        :param max_pulse: Max pulse width in ms.

        :return: No return value
        """
        arg_0.set_pin_mode(arg_1, arg_0.SERVO, arg_0.OUTPUT)
        arg_4 = [arg_1, arg_2 & 0x7f, (arg_2 >> 7) & 0x7f,
                   arg_3 & 0x7f, (arg_3 >> 7) & 0x7f]

        arg_0._command_handler.send_sysex(arg_0._command_handler.SERVO_CONFIG, arg_4)

Configure a pin as a servo pin . Set pulse min max in ms .


def Func ( arg_0 , arg_1 , arg_2 ) : for arg_3 in arg_0 . modules ( ) : arg_4 = arg_3 . node . name if arg_4 == arg_1 : return arg_3 arg_5 = arg_2 . root ( ) . name if arg_4 == "%s.%s" % ( arg_5 , arg_1 ) : return arg_3 if arg_4 == "%s.%s" % ( arg_5 . rsplit ( "." , 1 ) [ 0 ] , arg_1 ) : return arg_3 raise KeyError ( arg_1 )

def Func(arg_0, arg_1, arg_2):
        """return a module by its name, looking also for relative imports;
        raise KeyError if not found
        """
        for arg_3 in arg_0.modules():
            arg_4 = arg_3.node.name
            if arg_4 == arg_1:
                return arg_3
            # search for fullname of relative import modules
            arg_5 = arg_2.root().name
            if arg_4 == "%s.%s" % (arg_5, arg_1):
                return arg_3
            if arg_4 == "%s.%s" % (arg_5.rsplit(".", 1)[0], arg_1):
                return arg_3
        raise KeyError(arg_1)

return a module by its name looking also for relative imports ; raise KeyError if not found


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_3
=
rpartition
(
arg_1
.
name
,
"."
)
[
0
]
arg_4
=
arg_1
.
name
arg_5
=
arg_0
.
packages
.
setdefault
(
arg_3
,
[
{
}
,
0
,
0
,
0
,
0
]
)
arg_6
=
arg_0
.
xml_out
.
createElement
(
"class"
)
arg_6
.
appendChild
(
arg_0
.
xml_out
.
createElement
(
"methods"
)
)
arg_7
=
arg_0
.
xml_out
.
createElement
(
"lines"
)
arg_6
.
appendChild
(
arg_7
)
arg_6
.
setAttribute
(
"name"
,
arg_4
)
arg_8
=
arg_1
.
file_locator
.
relative_filename
(
arg_1
.
filename
)
arg_6
.
setAttribute
(
"filename"
,
arg_8
.
replace
(
"\\"
,
"/"
)
)
arg_6
.
setAttribute
(
"complexity"
,
"0"
)
arg_9
=
arg_2
.
branch_stats
(
)
for
arg_10
in
sorted
(
arg_2
.
statements
)
:
arg_11
=
arg_0
.
xml_out
.
createElement
(
"line"
)
arg_11
.
setAttribute
(
"number"
,
str
(
arg_10
)
)
arg_11
.
setAttribute
(
"hits"
,
str
(
int
(
arg_10
not
in
arg_2
.
missing
)
)
)
if
arg_0
.
arcs
:
if
arg_10
in
arg_9
:
arg_12
,
arg_13
=
arg_9
[
arg_10
]
arg_11
.
setAttribute
(
"branch"
,
"true"
)
arg_11
.
setAttribute
(
"condition-coverage"
,
"%d%% (%d/%d)"
%
(
100
*
arg_13
/
arg_12
,
arg_13
,
arg_12
)
)
arg_7
.
appendChild
(
arg_11
)
arg_14
=
len
(
arg_2
.
statements
)
arg_15
=
arg_14
len
(
arg_2
.
missing
)
if
arg_0
.
arcs
:
arg_16
=
sum
(
[
t
for
t
,
k
in
arg_9
.
values
(
)
]
)
arg_17
=
sum
(
[
t
k
for
t
,
k
in
arg_9
.
values
(
)
]
)
arg_18
=
arg_16
arg_17
else
:
arg_16
=
0.0
arg_18
=
0.0
arg_6
.
setAttribute
(
"line-rate"
,
rate
(
arg_15
,
arg_14
)
)
arg_6
.
setAttribute
(
"branch-rate"
,
rate
(
arg_18
,
arg_16
)
)
arg_5
[
0
]
[
arg_4
]
=
arg_6
arg_5
[
1
]
+=
arg_15
arg_5
[
2
]
+=
arg_14
arg_5
[
3
]
+=
arg_18
arg_5
[
4
]
+=
arg_16

def Func(arg_0, arg_1, arg_2):
        """Add to the XML report for a single file."""

        # Create the 'lines' and 'package' XML elements, which
        # are populated later.  Note that a package == a directory.
        arg_3 = rpartition(arg_1.name, ".")[0]
        arg_4 = arg_1.name

        arg_5 = arg_0.packages.setdefault(arg_3, [{}, 0, 0, 0, 0])

        arg_6 = arg_0.xml_out.createElement("class")

        arg_6.appendChild(arg_0.xml_out.createElement("methods"))

        arg_7 = arg_0.xml_out.createElement("lines")
        arg_6.appendChild(arg_7)

        arg_6.setAttribute("name", arg_4)
        arg_8 = arg_1.file_locator.relative_filename(arg_1.filename)
        arg_6.setAttribute("filename", arg_8.replace("\\", "/"))
        arg_6.setAttribute("complexity", "0")

        arg_9 = arg_2.branch_stats()

        # For each statement, create an XML 'line' element.
        for arg_10 in sorted(arg_2.statements):
            arg_11 = arg_0.xml_out.createElement("line")
            arg_11.setAttribute("number", str(arg_10))

            # Q: can we get info about the number of times a statement is
            # executed?  If so, that should be recorded here.
            arg_11.setAttribute("hits", str(int(arg_10 not in arg_2.missing)))

            if arg_0.arcs:
                if arg_10 in arg_9:
                    arg_12, arg_13 = arg_9[arg_10]
                    arg_11.setAttribute("branch", "true")
                    arg_11.setAttribute("condition-coverage",
                        "%d%% (%d/%d)" % (100*arg_13/arg_12, arg_13, arg_12)
                        )
            arg_7.appendChild(arg_11)

        arg_14 = len(arg_2.statements)
        arg_15 = arg_14 - len(arg_2.missing)

        if arg_0.arcs:
            arg_16 = sum([t for t,k in arg_9.values()])
            arg_17 = sum([t-k for t,k in arg_9.values()])
            arg_18 = arg_16 - arg_17
        else:
            arg_16 = 0.0
            arg_18 = 0.0

        # Finalize the statistics that are collected in the XML DOM.
        arg_6.setAttribute("line-rate", rate(arg_15, arg_14))
        arg_6.setAttribute("branch-rate", rate(arg_18, arg_16))
        arg_5[0][arg_4] = arg_6
        arg_5[1] += arg_15
        arg_5[2] += arg_14
        arg_5[3] += arg_18
        arg_5[4] += arg_16

Add to the XML report for a single file .


def Func(arg_0, arg_1):
        '''
        Transform a list of bag features into its bag-of-words representation.

        Parameters
        ----------
        X : :class:`skl_groups.features.Features` or list of bag feature arrays
            New data to Func.

        Returns
        -------
        X_new : integer array, shape [len(X), kmeans.n_clusters]
            X Funced into the new space.
        '''
        arg_0._check_fitted()
        arg_1 = as_features(arg_1, stack=True)
        arg_2 = arg_0.kmeans_fit_.predict(arg_1.stacked_features)
        return arg_0._group_assignments(arg_1, arg_2)

Transform a list of bag features into its bag-of-words representation.

        Parameters
        ----------
        X : :class:`skl_groups.features.Features` or list of bag feature arrays
            New data to transform.

        Returns
        -------
        X_new : integer array, shape [len(X), kmeans.n_clusters]
            X transformed into the new space.

Transform a list of bag features into its bag - of - words representation .


Calls the standard formatter, but will indent all of the log messages
        by our current indentation level.

def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
logging
.
Formatter
.
Func
(
arg_0
,
arg_1
)
arg_2
=
""
.
join
(
[
(
" "
*
get_indentation
(
)
)
+
line
for
line
in
arg_2
.
splitlines
(
True
)
]
)
return
arg_2

def Func(arg_0, arg_1):
        """
        Calls the standard Functer, but will indent all of the log messages
        by our current indentation level.
        """
        arg_2 = logging.Formatter.Func(arg_0, arg_1)
        arg_2 = "".join([
            (" " * get_indentation()) + line
            for line in arg_2.splitlines(True)
        ])
        return arg_2

Calls the standard formatter but will indent all of the log messages by our current indentation level .


Draws a image form path, in x,y and resize it to width, height dimensions.

(self, path, x, y, width=None, height=None, alpha=1.0, data=None, draw=True, **kwargs)

return self.Image(path, x, y, width, height, alpha, data, **kwargs)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None, arg_5=None, arg_6=1.0, arg_7=None, arg_8=True, **arg_9):
        '''Draws a Func form path, in x,y and resize it to width, height dimensions.
        '''
        return arg_0.Image(arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, arg_7, **arg_9)

Draws a image form path in x y and resize it to width height dimensions .


def Func(
        arg_0):
    """
    Register all HTTP error code error handlers

    Currently, errors are handled by the JSON error handler.
    """

    # Pick a handler based on the requested format. Currently we assume the
    # caller wants JSON.
    arg_1 = json.http_exception_error_handler

    @arg_0.errorhandler(400)
    def handle_bad_request(
            arg_2):
        return arg_1(arg_2)

    @arg_0.errorhandler(404)
    def handle_not_found(
            arg_2):
        return arg_1(arg_2)

    @arg_0.errorhandler(405)
    def handle_method_not_allowed(
            arg_2):
        return arg_1(arg_2)

    @arg_0.errorhandler(422)
    def handle_unprocessable_entity(
            arg_2):
        return arg_1(arg_2)

    @arg_0.errorhandler(500)
    def handle_internal_server_error(
            arg_2):
        return arg_1(arg_2)


def
Func
(
arg_0
)
:
arg_1
,
arg_2
=
arg_0
.
command
(
"LIST ACTIVE.TIMES"
)
if
arg_1
!=
215
:
raise
NNTPReplyError
(
arg_1
,
arg_2
)
for
arg_3
in
arg_0
.
info_gen
(
arg_1
,
arg_2
)
:
arg_4
=
arg_3
.
split
(
)
try
:
arg_5
=
arg_4
[
0
]
arg_6
=
date
.
datetimeobj_epoch
(
arg_4
[
1
]
)
arg_7
=
arg_4
[
2
]
except
(
IndexError
,
ValueError
)
:
raise
NNTPDataError
(
"Invalid LIST ACTIVE.TIMES"
)
yield
arg_5
,
arg_6
,
arg_7

def Func(arg_0):
        """Generator for the LIST ACTIVE.TIMES command.

        Generates a list of newsgroups including the creation time and who
        created them.

        See <http://tools.ietf.org/html/rfc3977#section-7.6.4>

        Yields:
            A tuple containing the name, creation date as a datetime object and
            creator as a string for the newsgroup.
        """
        arg_1, arg_2 = arg_0.command("LIST ACTIVE.TIMES")
        if arg_1 != 215:
            raise NNTPReplyError(arg_1, arg_2)

        for arg_3 in arg_0.info_gen(arg_1, arg_2):
            arg_4 = arg_3.split()
            try:
                arg_5 = arg_4[0]
                arg_6 = date.datetimeobj_epoch(arg_4[1])
                arg_7 = arg_4[2]
            except (IndexError, ValueError):
                raise NNTPDataError("Invalid LIST ACTIVE.TIMES")
            yield arg_5, arg_6, arg_7

Generator for the LIST ACTIVE . TIMES command .


(self, descriptor, role='ignore', group_by_key=False)

def Func(arg_0, arg_1, arg_2='ignore', arg_3=False):
        """
        Add a descriptor column.

        :param descriptor: A Descriptor instance (e.g., RealDescriptor, InorganicDescriptor, etc.)
        :param role: Specify a role (input, output, latentVariable, or ignore)
        :param group_by_key: Whether or not to group by this key during cross validation
        """

        arg_1.validate()

        if arg_1.key in arg_0.configuration["roles"]:
            raise ValueError("Cannot add a descriptor with the same name twice")

        arg_0.configuration['descriptors'].append(arg_1.as_dict())
        arg_0.configuration["roles"][arg_1.key] = arg_2

        if arg_3:
            arg_0.configuration["group_by"].append(arg_1.key)


def
Func
(
arg_0
,
arg_1
)
:
if
type
(
arg_1
)
is
float
or
type
(
arg_1
)
is
numpy
.
float64
or
type
(
arg_1
)
is
numpy
.
float32
:
return
arg_0
.
_Func_mfr
(
arg_1
)
elif
arg_0
.
_is_compound_mfr_tuple
(
arg_1
)
:
return
arg_0
.
_Func_compound_mfr
(
arg_1
[
0
]
,
arg_1
[
1
]
)
elif
type
(
arg_1
)
is
str
:
return
arg_0
.
_Func_compound
(
arg_1
)
elif
type
(
arg_1
)
is
Material
:
return
arg_0
.
_Func_material
(
arg_1
)
else
:
raise
TypeError
(
"Invalid Funcion argument."
)

def Func(arg_0, arg_1):
        """
        Extract 'other' from this stream, modifying this stream and returning
        the Funced material as a new stream.

        :param other: Can be one of the following:

          * float: A mass flow rate equal to other is Funced from self. Self
            is reduced by other and the Funced stream is returned as
            a new stream.
          * tuple (compound, mass): The other tuple specifies the mass flow
            rate of a compound to be Funced. It is Funced from self and
            the Funced mass flow rate is returned as a new stream.
          * string: The 'other' string specifies the compound to be
            Funced. All of the mass flow rate of that compound will be
            removed from self and a new stream created with it.
          * Material: The 'other' material specifies the list of
            compounds to Func.

        :returns: New MaterialStream object.
        """

        # Extract the specified mass flow rate.
        if type(arg_1) is float or \
           type(arg_1) is numpy.float64 or \
           type(arg_1) is numpy.float32:
            return arg_0._Func_mfr(arg_1)

        # Extract the specified mass flow rateof the specified compound.
        elif arg_0._is_compound_mfr_tuple(arg_1):
            return arg_0._Func_compound_mfr(arg_1[0], arg_1[1])

        # Extract all of the specified compound.
        elif type(arg_1) is str:
            return arg_0._Func_compound(arg_1)

        # TODO: Test
        # Extract all of the compounds of the specified material.
        elif type(arg_1) is Material:
            return arg_0._Func_material(arg_1)

        # If not one of the above, it must be an invalid argument.
        else:
            raise TypeError("Invalid Funcion argument.")

Extract 'other' from this stream, modifying this stream and returning
        the extracted material as a new stream.

        :param other: Can be one of the following:

          * float: A mass flow rate equal to other is extracted from self. Self
            is reduced by other and the extracted stream is returned as
            a new stream.
          * tuple (compound, mass): The other tuple specifies the mass flow
            rate of a compound to be extracted. It is extracted from self and
            the extracted mass flow rate is returned as a new stream.
          * string: The 'other' string specifies the compound to be
            extracted. All of the mass flow rate of that compound will be
            removed from self and a new stream created with it.
          * Material: The 'other' material specifies the list of
            compounds to extract.

        :returns: New MaterialStream object.

Extract other from this stream modifying this stream and returning the extracted material as a new stream .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
if
arg_1
.
type
==
FieldDescriptor
.
TYPE_MESSAGE
:
decode
(
getattr
(
arg_0
,
arg_1
.
name
)
,
arg_2
)
else
:
try
:
if
arg_1
.
type
==
FieldDescriptor
.
TYPE_BYTES
:
arg_2
=
base64
.
b64decode
(
arg_2
)
setattr
(
arg_0
,
arg_1
.
name
,
arg_2
)
except
(
ValueError
,
TypeError
)
as
e
:
logger
.
warning
(
'Message %r ignoring field %s: %s'
,
arg_0
.
__class__
.
__name__
,
arg_1
.
name
,
e
)

def Func(arg_0, arg_1, arg_2):
    """Decode optional or required field."""
    if arg_1.type == FieldDescriptor.TYPE_MESSAGE:
        decode(getattr(arg_0, arg_1.name), arg_2)
    else:
        try:
            if arg_1.type == FieldDescriptor.TYPE_BYTES:
                arg_2 = base64.b64decode(arg_2)
            setattr(arg_0, arg_1.name, arg_2)
        except (ValueError, TypeError) as e:
            # ValueError: invalid enum value, negative unsigned int value, or
            # invalid base64
            # TypeError: mismatched type
            logger.warning('Message %r ignoring field %s: %s',
                           arg_0.__class__.__name__, arg_1.name, e)


def Func(arg_0):
        """
        Resend a verification email to the provided address.

        If the provided email is already verified no action is taken.
        """
        try:
            arg_1 = models.EmailAddress.objects.get(
                arg_1=arg_0.validated_data["email"], is_verified=False
            )

            logger.debug(
                "Resending verification email to %s",
                arg_0.validated_data["email"],
            )

            arg_1.send_confirmation()
        except models.EmailAddress.DoesNotExist:
            logger.debug(
                "Not resending verification email to %s because the address "
                "doesn't exist in the database.",
                arg_0.validated_data["email"],
            )

Resend a verification email to the provided address .


def
Func
(
arg_0
,
arg_1
)
:
if
type
(
arg_1
)
is
float
or
type
(
arg_1
)
is
numpy
.
float64
or
type
(
arg_1
)
is
numpy
.
float32
:
return
arg_0
.
_Func_mass
(
arg_1
)
elif
arg_0
.
_is_compound_mass_tuple
(
arg_1
)
:
return
arg_0
.
_Func_compound_mass
(
arg_1
[
0
]
,
arg_1
[
1
]
)
elif
type
(
arg_1
)
is
str
:
return
arg_0
.
_Func_compound
(
arg_1
)
elif
type
(
arg_1
)
is
Material
:
return
arg_0
.
_Func_material
(
arg_1
)
else
:
raise
TypeError
(
"Invalid Funcion argument."
)

def Func(arg_0, arg_1):
        """
        Extract 'other' from this package, modifying this package and
        returning the Funced material as a new package.

        :param other: Can be one of the following:

          * float: A mass equal to other is Funced from self. Self is
            reduced by other and the Funced package is returned as
            a new package.
          * tuple (compound, mass): The other tuple specifies the mass
            of a compound to be Funced. It is Funced from self and
            the Funced mass is returned as a new package.
          * string: The 'other' string specifies the compound to be
            Funced. All of the mass of that compound will be removed
            from self and a new package created with it.
          * Material: The 'other' material specifies the list of
            compounds to Func.

        :returns: New MaterialPackage object.
        """

        # Extract the specified mass.
        if type(arg_1) is float or \
           type(arg_1) is numpy.float64 or \
           type(arg_1) is numpy.float32:
            return arg_0._Func_mass(arg_1)

        # Extract the specified mass of the specified compound.
        elif arg_0._is_compound_mass_tuple(arg_1):
            return arg_0._Func_compound_mass(arg_1[0], arg_1[1])

        # Extract all of the specified compound.
        elif type(arg_1) is str:
            return arg_0._Func_compound(arg_1)

        # TODO: Test
        # Extract all of the compounds of the specified material.
        elif type(arg_1) is Material:
            return arg_0._Func_material(arg_1)

        # If not one of the above, it must be an invalid argument.
        else:
            raise TypeError("Invalid Funcion argument.")

Extract 'other' from this package, modifying this package and
        returning the extracted material as a new package.

        :param other: Can be one of the following:

          * float: A mass equal to other is extracted from self. Self is
            reduced by other and the extracted package is returned as
            a new package.
          * tuple (compound, mass): The other tuple specifies the mass
            of a compound to be extracted. It is extracted from self and
            the extracted mass is returned as a new package.
          * string: The 'other' string specifies the compound to be
            extracted. All of the mass of that compound will be removed
            from self and a new package created with it.
          * Material: The 'other' material specifies the list of
            compounds to extract.

        :returns: New MaterialPackage object.

Extract other from this package modifying this package and returning the extracted material as a new package .


def Func ( arg_0 : arg_1 ) -> Type [ _AbstractModuleConfig ] : class ModuleConfig ( _AbstractModuleConfig ) : arg_2 = f'bio2bel:{module_name}' arg_3 = DEFAULT_CONFIG_PATHS + [ os . path . join ( DEFAULT_CONFIG_DIRECTORY , arg_0 , 'config.ini' ) ] return ModuleConfig

def Func(arg_0: arg_1) -> Type[_AbstractModuleConfig]:  # noqa: D202
    """Build a module configuration class."""

    class ModuleConfig(_AbstractModuleConfig):
        arg_2 = f'bio2bel:{module_name}'
        arg_3 = DEFAULT_CONFIG_PATHS + [
            os.path.join(DEFAULT_CONFIG_DIRECTORY, arg_0, 'config.ini')
        ]

    return ModuleConfig


def
Func
(
arg_0
,
arg_1
=
False
)
:
if
arg_1
:
arg_2
=
arg_0
.
msg
else
:
arg_2
=
"%s: %s"
%
(
arg_0
.
__class__
.
__name__
,
arg_0
.
msg
)
if
len
(
arg_0
.
params
)
!=
0
:
arg_3
=
"\n"
.
join
(
[
str
(
key
)
+
": "
+
str
(
val
)
for
key
,
val
in
arg_0
.
params
.
items
(
)
]
)
arg_2
+=
"\nAdditional InFuncion:\n"
+
arg_3
return
arg_2

def Func(arg_0, arg_1=False):
        """Format this exception as a string including class name.

        Args:
            exclude_class (bool): Whether to exclude the exception class
                name when Functing this exception

        Returns:
            string: a multiline string with the message, class name and
                key value parameters passed to create the exception.
        """

        if arg_1:
            arg_2 = arg_0.msg
        else:
            arg_2 = "%s: %s" % (arg_0.__class__.__name__, arg_0.msg)

        if len(arg_0.params) != 0:
            arg_3 = "\n".join([str(key) + ": " + str(val) for key, val in arg_0.params.items()])
            arg_2 += "\nAdditional InFuncion:\n" + arg_3

        return arg_2

Format this exception as a string including class name.

        Args:
            exclude_class (bool): Whether to exclude the exception class
                name when formatting this exception

        Returns:
            string: a multiline string with the message, class name and
                key value parameters passed to create the exception.

Format this exception as a string including class name .


(self, physDef= "LCLS", mccDef="MCC", initialInstance=False)

def Func ( arg_0 , arg_1 = "LCLS" , arg_2 = "MCC" , arg_3 = False ) : if arg_0 . logMenuCount < 5 : arg_0 . logMenus . append ( LogSelectMenu ( arg_0 . logui . multiLogLayout , arg_3 ) ) arg_0 . logMenus [ - 1 ] . Funcs ( arg_0 . logTypeList [ 1 ] , arg_0 . physics_programs , arg_1 ) arg_0 . logMenus [ - 1 ] . Funcs ( arg_0 . logTypeList [ 0 ] , arg_0 . mcc_programs , arg_2 ) arg_0 . logMenus [ - 1 ] . show ( ) arg_0 . logMenuCount += 1 if arg_3 : QObject . connect ( arg_0 . logMenus [ - 1 ] . logButton , SIGNAL ( "clicked()" ) , arg_0 . Func ) else : from functools import partial QObject . connect ( arg_0 . logMenus [ - 1 ] . logButton , SIGNAL ( "clicked()" ) , partial ( arg_0 . removeLogbook , arg_0 . logMenus [ - 1 ] ) )

def Func(arg_0, arg_1= "LCLS", arg_2="MCC", arg_3=False):
        '''Add new block of logbook selection windows. Only 5 allowed.'''
        if arg_0.logMenuCount < 5:
            arg_0.logMenus.append(LogSelectMenu(arg_0.logui.multiLogLayout, arg_3))
            arg_0.logMenus[-1].Funcs(arg_0.logTypeList[1], arg_0.physics_programs, arg_1)
            arg_0.logMenus[-1].Funcs(arg_0.logTypeList[0], arg_0.mcc_programs, arg_2)
            arg_0.logMenus[-1].show()
            arg_0.logMenuCount += 1
            if arg_3:
                # Initial logbook menu can add additional menus, all others can only remove themselves.
                QObject.connect(arg_0.logMenus[-1].logButton, SIGNAL("clicked()"), arg_0.Func)
            else:
                from functools import partial
                QObject.connect(arg_0.logMenus[-1].logButton, SIGNAL("clicked()"), partial(arg_0.removeLogbook, arg_0.logMenus[-1]))

Add new block of logbook selection windows . Only 5 allowed .


def
Func
(
arg_0
)
:
try
:
arg_1
=
subprocess
.
check_output
(
[
"cygpath"
,
"-aw"
,
arg_0
]
,
universal_newlines
=
True
)
.
strip
(
)
except
(
FileNotFoundError
,
subprocess
.
CalledProcessError
)
:
logger
.
exception
(
"Call to cygpath failed."
)
raise
return
arg_1

def Func(arg_0):
	"""Convert Unix path from Cygwin to Windows path."""

	try:
		arg_1 = subprocess.check_output(["cygpath", "-aw", arg_0], universal_newlines=True).strip()
	except (FileNotFoundError, subprocess.CalledProcessError):
		logger.exception("Call to cygpath failed.")
		raise

	return arg_1

Convert Unix path from Cygwin to Windows path .


def
Func
(
arg_0
)
:
with
arg_0
.
lock
:
if
arg_0
.
stream
:
logger
.
debug
(
"Closing the previously used stream."
)
arg_0
.
_close_stream
(
)
arg_1
=
TCPTransport
(
arg_0
.
settings
)
arg_2
=
arg_0
.
settings
[
"server"
]
if
arg_2
:
arg_3
=
else
:
arg_2
=
arg_0
.
jid
.
domain
arg_3
=
arg_0
.
settings
[
"c2s_service"
]
arg_1
.
Func
(
arg_2
,
arg_0
.
settings
[
"c2s_port"
]
,
arg_3
)
arg_4
=
arg_0
.
_base_handlers
[
:
]
arg_4
+=
arg_0
.
handlers
+
[
arg_0
]
arg_0
.
clear_response_handlers
(
)
arg_0
.
setup_stanza_handlers
(
arg_4
,
"pre-auth"
)
arg_5
=
ClientStream
(
arg_0
.
jid
,
arg_0
,
arg_4
,
arg_0
.
settings
)
arg_5
.
initiate
(
arg_1
)
arg_0
.
main_loop
.
add_handler
(
arg_1
)
arg_0
.
main_loop
.
add_handler
(
arg_5
)
arg_0
.
_ml_handlers
+=
[
arg_1
,
arg_5
]
arg_0
.
stream
=
arg_5
arg_0
.
uplink
=
arg_5

def Func(arg_0):
        """Schedule a new XMPP c2s Funcion.
        """
        with arg_0.lock:
            if arg_0.stream:
                logger.debug("Closing the previously used stream.")
                arg_0._close_stream()

            arg_1 = TCPTransport(arg_0.settings)

            arg_2 = arg_0.settings["server"]
            if arg_2:
                arg_3 = None
            else:
                arg_2 = arg_0.jid.domain
                arg_3 = arg_0.settings["c2s_service"]

            arg_1.Func(arg_2, arg_0.settings["c2s_port"], arg_3)
            arg_4 = arg_0._base_handlers[:]
            arg_4 += arg_0.handlers + [arg_0]
            arg_0.clear_response_handlers()
            arg_0.setup_stanza_handlers(arg_4, "pre-auth")
            arg_5 = ClientStream(arg_0.jid, arg_0, arg_4, arg_0.settings)
            arg_5.initiate(arg_1)
            arg_0.main_loop.add_handler(arg_1)
            arg_0.main_loop.add_handler(arg_5)
            arg_0._ml_handlers += [arg_1, arg_5]
            arg_0.stream = arg_5
            arg_0.uplink = arg_5


def Func(arg_0, arg_1):
        """
        Check if an S3 URL exists

        :param s3url: S3 url
        :type s3url: str
        :rtype: bool
        """
        arg_2, arg_3 = S3Hook.parse_s3_url(arg_1)
        if not arg_0.s3_hook.check_for_bucket(bucket_name=arg_2):
            raise AirflowException(
                "The input S3 Bucket {} does not exist ".format(arg_2))
        if arg_3 and not arg_0.s3_hook.check_for_key(arg_3=arg_3, bucket_name=arg_2)\
           and not arg_0.s3_hook.check_for_prefix(
                prefix=arg_3, bucket_name=arg_2, delimiter='/'):
            # check if s3 key exists in the case user provides a single file
            # or if s3 prefix exists in the case user provides multiple files in
            # a prefix
            raise AirflowException("The input S3 Key "
                                   "or Prefix {} does not exist in the Bucket {}"
                                   .format(arg_1, arg_2))
        return True


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_0 . task_descriptors : if arg_2 . task_metadata . get ( 'task-id' ) == arg_1 : return arg_2 return None

def Func(arg_0, arg_1):
    """Returns the task_descriptor corresponding to task_id."""

    # It is not guaranteed that the index will be task_id - 1 when --tasks is
    # used with a min/max range.
    for arg_2 in arg_0.task_descriptors:
      if arg_2.task_metadata.get('task-id') == arg_1:
        return arg_2
    return None

Returns the task_descriptor corresponding to task_id .


def Func(arg_0, arg_1):
    """Compute a blurring masks from an input masks and psf shape.

    The blurring masks corresponds to all pixels which are outside of the masks but will have a fraction of their \
    light blur into the masked region due to PSF convolution."""

    arg_2 = np.full(arg_0.shape, True)

    for arg_3 in range(arg_0.shape[0]):
        for arg_4 in range(arg_0.shape[1]):
            if not arg_0[arg_3, arg_4]:
                for arg_5 in range((-arg_1[0] + 1) // 2, (arg_1[0] + 1) // 2):
                    for arg_6 in range((-arg_1[1] + 1) // 2, (arg_1[1] + 1) // 2):
                        if 0 <= arg_4 + arg_6 <= arg_0.shape[1] - 1 and 0 <= arg_3 + arg_5 <= arg_0.shape[0] - 1:
                            if arg_0[arg_3 + arg_5, arg_4 + arg_6]:
                                arg_2[arg_3 + arg_5, arg_4 + arg_6] = False
                        else:
                            raise exc.MaskException(
                                "setup_blurring_mask extends beyond the sub_grid_size of the masks - pad the "
                                "datas array before masking")

    return arg_2

Compute a blurring masks from an input masks and psf shape .


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_3
=
[
]
arg_4
=
[
]
def
handle_cancel_response
(
arg_5
,
arg_6
,
arg_7
)
:
del
arg_6
if
arg_7
:
arg_8
=
'error %s: %s'
%
(
arg_7
.
resp
.
status
,
arg_7
.
resp
.
reason
)
if
arg_7
.
resp
.
status
==
FAILED_PRECONDITION_CODE
:
arg_9
=
json
.
loads
(
arg_7
.
content
)
arg_10
=
arg_9
.
get
(
'error'
,
{
}
)
.
get
(
'status'
)
if
arg_10
==
FAILED_PRECONDITION_STATUS
:
arg_8
=
'Not running'
arg_4
.
append
(
{
'name'
:
arg_5
,
'msg'
:
arg_8
}
)
else
:
arg_3
.
append
(
{
'name'
:
arg_5
}
)
return
arg_11
=
arg_0
(
callback
=
handle_cancel_response
)
arg_12
=
{
}
for
arg_13
in
arg_2
:
arg_14
=
arg_13
.
get_field
(
'internal-id'
)
arg_12
[
arg_14
]
=
arg_13
arg_11
.
add
(
arg_1
(
name
=
arg_14
,
body
=
{
}
)
,
arg_5
=
arg_14
)
arg_11
.
execute
(
)
arg_15
=
[
arg_12
[
arg_13
[
'name'
]
]
for
arg_13
in
arg_3
]
arg_16
=
[
]
for
arg_17
in
arg_4
:
arg_13
=
arg_12
[
arg_17
[
'name'
]
]
arg_16
.
append
(
"Error canceling '%s': %s"
%
(
get_operation_full_job_id
(
arg_13
)
,
arg_17
[
'msg'
]
)
)
return
arg_15
,
arg_16

def Func(arg_0, arg_1, arg_2):
  """Cancel a batch of operations.

  Args:
    batch_fn: API-specific batch function.
    cancel_fn: API-specific cancel function.
    ops: A list of operations to cancel.

  Returns:
    A list of operations canceled and a list of error messages.
  """

  # We define an inline callback which will populate a list of
  # successfully canceled operations as well as a list of operations
  # which were not successfully canceled.

  arg_3 = []
  arg_4 = []

  def handle_cancel_response(arg_5, arg_6, arg_7):
    """Callback for the cancel response."""
    del arg_6  # unused

    if arg_7:
      # We don't generally expect any failures here, except possibly trying
      # to cancel an operation that is already canceled or finished.
      #
      # If the operation is already finished, provide a clearer message than
      # "error 400: Bad Request".

      arg_8 = 'error %s: %s' % (arg_7.resp.status, arg_7.resp.reason)
      if arg_7.resp.status == FAILED_PRECONDITION_CODE:
        arg_9 = json.loads(arg_7.content)
        arg_10 = arg_9.get('error', {}).get('status')
        if arg_10 == FAILED_PRECONDITION_STATUS:
          arg_8 = 'Not running'

      arg_4.append({'name': arg_5, 'msg': arg_8})
    else:
      arg_3.append({'name': arg_5})

    return

  # Set up the batch object
  arg_11 = arg_0(callback=handle_cancel_response)

  # The callback gets a "request_id" which is the operation name.
  # Build a dict such that after the callback, we can lookup the operation
  # objects by name
  arg_12 = {}
  for arg_13 in arg_2:
    arg_14 = arg_13.get_field('internal-id')
    arg_12[arg_14] = arg_13
    arg_11.add(arg_1(name=arg_14, body={}), arg_5=arg_14)

  # Cancel the operations
  arg_11.execute()

  # Iterate through the canceled and failed lists to build our return lists
  arg_15 = [arg_12[arg_13['name']] for arg_13 in arg_3]
  arg_16 = []
  for arg_17 in arg_4:
    arg_13 = arg_12[arg_17['name']]
    arg_16.append("Error canceling '%s': %s" %
                          (get_operation_full_job_id(arg_13), arg_17['msg']))

  return arg_15, arg_16


(
    key_dir_vlr: GeoKeyDirectoryVlr,
    double_vlr: GeoDoubleParamsVlr,
    ascii_vlr: GeoAsciiParamsVlr,
)

def Func(
    arg_0: arg_1,
    arg_2: arg_3,
    arg_4: arg_5,
) -> List[GeoTiffKey]:
    """ Parses the GeoTiff VLRs information into nicer structs
    """
    arg_6 = []

    for arg_7 in arg_0.geo_keys:
        if arg_7.tiff_tag_location == 0:
            arg_8 = arg_7.value_offset
        elif arg_7.tiff_tag_location == 34736:
            arg_8 = arg_2.doubles[arg_7.value_offset]
        elif arg_7.tiff_tag_location == 34737:
            try:
                arg_8 = arg_4.strings[arg_7.value_offset][arg_7.count :]
            except IndexError:
                # Maybe I'm just misunderstanding the specification :thinking:
                arg_8 = arg_4.strings[0][arg_7.value_offset : arg_7.value_offset + arg_7.count]
        else:
            logger.warning(
                "GeoTiffKey with unknown tiff tag location ({})".format(
                    arg_7.tiff_tag_location
                )
            )
            continue

        arg_6.append(GeoTiffKey(arg_7.id, arg_8))
    return arg_6


def Func(arg_0):
    """Prints the notebook Func for this project.

    Uses [Caching](/references/polyaxon-cli/#caching)

    Example:

    \b
    ```bash
    $ polyaxon notebook Func
    ```
    """
    arg_1, arg_2 = get_project_or_local(arg_0.obj.get('project'))
    try:
        arg_3 = PolyaxonClient().project.get_project(arg_1, arg_2)
    except (PolyaxonHTTPError, PolyaxonShouldExitError, PolyaxonClientException) as e:
        Printer.print_error('Could not get project `{}`.'.format(arg_2))
        Printer.print_error('Error message `{}`.'.format(e))
        sys.exit(1)

    if arg_3.has_notebook:
        click.echo(get_notebook_Func(arg_1, arg_2))
    else:
        Printer.print_warning(
            'This project `{}` does not have a running notebook.'.format(arg_2))
        click.echo('You can start a notebook with this command: polyaxon notebook start --help')

Prints the notebook url for this project.

    Uses [Caching](/references/polyaxon-cli/#caching)

    Example:

    \b
    ```bash
    $ polyaxon notebook url
    ```

Prints the notebook url for this project .


def Func ( arg_0 ) : with chdir ( os . path . abspath ( arg_0 . project_directory ) ) : arg_1 = deepcopy ( dict ( os . environ ) ) arg_1 [ arg_2 ( 'DJANGO_SETTINGS_MODULE' ) ] = arg_2 ( '{0}.settings' . format ( arg_0 . project_name ) ) arg_1 [ arg_2 ( 'PYTHONPATH' ) ] = arg_2 ( os . pathsep . join ( map ( shlex_quote , sys . path ) ) ) subprocess . check_call ( [ sys . executable , 'Func.py' ] , arg_1 = arg_1 , stderr = subprocess . STDOUT ) for arg_3 in [ 'py' , 'pyc' ] : try : os . remove ( 'Func.{0}' . format ( arg_3 ) ) except OSError : pass

def Func(arg_0):
    """
    Create admin user without user input

    :param config_data: configuration data
    """
    with chdir(os.path.abspath(arg_0.project_directory)):
        arg_1 = deepcopy(dict(os.environ))
        arg_1[arg_2('DJANGO_SETTINGS_MODULE')] = arg_2('{0}.settings'.format(arg_0.project_name))
        arg_1[arg_2('PYTHONPATH')] = arg_2(os.pathsep.join(map(shlex_quote, sys.path)))
        subprocess.check_call(
            [sys.executable, 'Func.py'], arg_1=arg_1, stderr=subprocess.STDOUT
        )
        for arg_3 in ['py', 'pyc']:
            try:
                os.remove('Func.{0}'.format(arg_3))
            except OSError:
                pass


def Func ( arg_0 , arg_1 ) : arg_2 = np . vstack ( ( arg_0 , arg_1 ) ) arg_3 = arg_2 . mean ( axis = 1 ) [ ( slice ( None , None , None ) , None ) ] arg_4 = arg_2 - arg_3 arg_5 = np . sqrt ( np . sum ( arg_4 ** 2 , axis = 1 ) ) arg_6 = np . dot ( arg_4 [ 1 : ] , arg_4 [ 0 ] . T ) arg_7 = arg_6 / ( arg_5 [ 1 : ] * arg_5 [ 0 ] ) return arg_7

def Func(arg_0, arg_1):
    """ Correlates row vector x with each row vector in 2D array y. """
    arg_2 = np.vstack((arg_0, arg_1))
    arg_3 = arg_2.mean(axis=1)[(slice(None, None, None), None)]
    arg_4 = arg_2 - arg_3
    arg_5 = np.sqrt(np.sum(arg_4**2, axis=1))
    arg_6 = np.dot(arg_4[1:], arg_4[0].T)
    arg_7 = arg_6 / (arg_5[1:] * arg_5[0])
    return arg_7

Correlates row vector x with each row vector in 2D array y .


def Func ( arg_0 ) : if arg_0 . _Func is None : arg_0 . _Func = ( app_identity . get_service_account_name ( ) ) return arg_0 . _Func

def Func(arg_0):
        """Get the email for the current service account.

        Returns:
            string, The email associated with the Google App Engine
            service account.
        """
        if arg_0._Func is None:
            arg_0._Func = (
                app_identity.get_service_account_name())
        return arg_0._Func

Get the email for the current service account .


return anyp(bool, map(record_matches_key, matchers))

def Func ( arg_0 , arg_1 ) : def record_matches_key ( arg_2 ) : return arg_1 == arg_2 or arg_1 . startswith ( arg_2 + '.' ) return anyp ( bool , map ( record_matches_key , arg_0 ) )

def Func(arg_0, arg_1):
        """return the bool of whether `record` starts with
        any item in `matchers`"""
        def record_matches_key(arg_2):
            return arg_1 == arg_2 or arg_1.startswith(arg_2 + '.')
        return anyp(bool, map(record_matches_key, arg_0))

return the bool of whether record starts with any item in matchers


def Func ( arg_0 , * arg_1 , ** arg_2 ) : def can ( arg_3 ) : arg_4 = Record . get_record ( arg_0 . id ) return arg_4 . get ( 'access' , '' ) == 'open' return type ( 'MyPermissionChecker' , ( ) , { 'can' : can } ) ( )

def Func(arg_0, *arg_1, **arg_2):
    """My permission factory."""
    def can(arg_3):
        arg_4 = Record.get_record(arg_0.id)
        return arg_4.get('access', '') == 'open'
    return type('MyPermissionChecker', (), {'can': can})()


return (
            generator.field_dictionary(**kwargs),
            generator.filter_dictionary(**kwargs),
            generator.exclude_dictionary(**kwargs),
        )

def Func ( arg_0 , ** arg_1 ) : arg_2 = _load_class ( getattr ( settings , "SEARCH_FILTER_GENERATOR" , None ) , arg_0 ) ( ) return ( arg_2 . field_dictionary ( ** arg_1 ) , arg_2 . filter_dictionary ( ** arg_1 ) , arg_2 . exclude_dictionary ( ** arg_1 ) , )

def Func(arg_0, **arg_1):
        """
        Called from within search handler
        Finds desired subclass and adds filter information based upon user information
        """
        arg_2 = _load_class(getattr(settings, "SEARCH_FILTER_GENERATOR", None), arg_0)()
        return (
            arg_2.field_dictionary(**arg_1),
            arg_2.filter_dictionary(**arg_1),
            arg_2.exclude_dictionary(**arg_1),
        )


def Func ( arg_0 ) : arg_1 = FilePath ( arg_0 ) arg_2 = arg_1 . child ( 'default.pem' ) if not arg_2 . exists ( ) : arg_2 . setContent ( generate_wildcard_pem_bytes ( ) ) arg_3 = arg_1 . child ( 'unmanaged-certs' ) if not arg_3 . exists ( ) : arg_3 . createDirectory ( ) arg_4 = arg_1 . child ( 'certs' ) if not arg_4 . exists ( ) : arg_4 . createDirectory ( ) return arg_1 , arg_4

def Func(arg_0):
    """
    Initialise the storage directory with the certificates directory and a
    default wildcard self-signed certificate for HAProxy.

    :return: the storage path and certs path
    """
    arg_1 = FilePath(arg_0)

    # Create the default wildcard certificate if it doesn't already exist
    arg_2 = arg_1.child('default.pem')
    if not arg_2.exists():
        arg_2.setContent(generate_wildcard_pem_bytes())

    # Create a directory for unmanaged certs. We don't touch this again, but it
    # needs to be there and it makes sense to create it at the same time as
    # everything else.
    arg_3 = arg_1.child('unmanaged-certs')
    if not arg_3.exists():
        arg_3.createDirectory()

    # Store certificates in a directory inside the storage directory, so
    # HAProxy will read just the certificates there.
    arg_4 = arg_1.child('certs')
    if not arg_4.exists():
        arg_4.createDirectory()

    return arg_1, arg_4

Initialise the storage directory with the certificates directory and a default wildcard self - signed certificate for HAProxy .


def Func ( arg_0 , arg_1 = '*' ) : arg_2 = [ ] for arg_3 , arg_4 in iteritems ( arg_0 . redises ) : if arg_3 . find ( '_slave' ) == - 1 : continue arg_2 . extend ( arg_4 . keys ( arg_1 ) ) return arg_2

def Func(arg_0, arg_1='*'):
        "Returns a list of keys matching ``pattern``"

        arg_2 = []
        for arg_3, arg_4 in iteritems(arg_0.redises):
            if arg_3.find('_slave') == -1:
                continue

            arg_2.extend(arg_4.keys(arg_1))

        return arg_2


def Func(arg_0):
        """
        Estimate the Func of the polygon.

        Returns
        -------
        number
            Area of the polygon.

        """
        if len(arg_0.exterior) < 3:
            raise Exception("Cannot compute the polygon's Func because it contains less than three points.")
        arg_1 = arg_0.to_shapely_polygon()
        return arg_1.Func

Estimate the area of the polygon.

        Returns
        -------
        number
            Area of the polygon.