(Tm=None, Tb=None, Tc=None, Zc=None, omega=None,
               CASRN='', AvailableMethods=False, Method=None)

def
Func
(
arg_0
=
,
arg_1
=
,
arg_2
=
,
arg_3
=
,
arg_4
=
,
arg_5
=
''
,
arg_6
=
False
,
arg_7
=
)
:
def
list_methods
(
)
:
arg_8
=
[
]
if
arg_5
in
MagalhaesLJ_data
.
index
:
arg_8
.
append
(
MAGALHAES
)
if
arg_2
and
arg_4
:
arg_8
.
append
(
TEEGOTOSTEWARD2
)
if
arg_2
:
arg_8
.
append
(
FLYNN
)
arg_8
.
append
(
BSLC
)
arg_8
.
append
(
TEEGOTOSTEWARD1
)
if
arg_1
:
arg_8
.
append
(
BSLB
)
if
arg_0
:
arg_8
.
append
(
BSLM
)
if
arg_2
and
arg_3
:
arg_8
.
append
(
STIELTHODOS
)
arg_8
.
append
(
)
return
arg_8
if
arg_6
:
return
list_methods
(
)
if
not
arg_7
:
arg_7
=
list_methods
(
)
[
0
]
if
arg_7
==
FLYNN
:
arg_9
=
epsilon_Flynn
(
arg_2
)
elif
arg_7
==
BSLC
:
arg_9
=
epsilon_Bird_Stewart_Lightfoot_critical
(
arg_2
)
elif
arg_7
==
BSLB
:
arg_9
=
epsilon_Bird_Stewart_Lightfoot_boiling
(
arg_1
)
elif
arg_7
==
BSLM
:
arg_9
=
epsilon_Bird_Stewart_Lightfoot_melting
(
arg_0
)
elif
arg_7
==
STIELTHODOS
:
arg_9
=
epsilon_Stiel_Thodos
(
arg_2
,
arg_3
)
elif
arg_7
==
TEEGOTOSTEWARD1
:
arg_9
=
epsilon_Tee_Gotoh_Steward_1
(
arg_2
)
elif
arg_7
==
TEEGOTOSTEWARD2
:
arg_9
=
epsilon_Tee_Gotoh_Steward_2
(
arg_2
,
arg_4
)
elif
arg_7
==
MAGALHAES
:
arg_9
=
float
(
MagalhaesLJ_data
.
at
[
arg_5
,
"epsilon"
]
)
elif
arg_7
==
:
arg_9
=
else
:
raise
Exception
(
'Failure in in function'
)
return
arg_9

def Func(arg_0=None, arg_1=None, arg_2=None, arg_3=None, arg_4=None,
               arg_5='', arg_6=False, arg_7=None):
    r'''This function handles the retrieval or calculation a chemical's
    Func parameter. Values are available from one source with lookup
    based on CASRNs, or can be estimated from 7 CSP methods.
    Will automatically select a data source to use if no Method is provided;
    returns None if the data is not available.

    Prefered sources are 'Magalhães, Lito, Da Silva, and Silva (2013)' for
    common chemicals which had valies listed in that source, and the CSP method
    `Tee, Gotoh, and Stewart CSP with Tc, omega (1966)` for chemicals which
    don't.

    Examples
    --------
    >>> Func(CASRN='64-17-5')
    1291.41

    Parameters
    ----------
    Tm : float, optional
        Melting temperature of fluid [K]
    Tb : float, optional
        Boiling temperature of fluid [K]
    Tc : float, optional
        Critical temperature, [K]
    Zc : float, optional
        Critical compressibility, [-]
    omega : float, optional
        Acentric factor of compound, [-]
    CASRN : string, optional
        CASRN [-]

    Returns
    -------
    epsilon_k : float
        Lennard-Jones depth of potential-energy minimum over k, [K]
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain epsilon with the given
        inputs

    Other Parameters
    ----------------
    Method : string, optional
        A string for the method name to use, as defined by constants in
        Func_methods
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        epsilon for the desired chemical, and will return methods instead of
        epsilon

    Notes
    -----
    These values are somewhat rough, as they attempt to pigeonhole a chemical
    into L-J behavior.

    The tabulated data is from [2]_, for 322 chemicals.

    References
    ----------
    .. [1] Bird, R. Byron, Warren E. Stewart, and Edwin N. Lightfoot.
       Transport Phenomena, Revised 2nd Edition. New York:
       John Wiley & Sons, Inc., 2006
    .. [2] Magalhães, Ana L., Patrícia F. Lito, Francisco A. Da Silva, and
       Carlos M. Silva. "Simple and Accurate Correlations for Diffusion
       Coefficients of Solutes in Liquids and Supercritical Fluids over Wide
       Ranges of Temperature and Density." The Journal of Supercritical Fluids
       76 (April 2013): 94-114. doi:10.1016/j.supflu.2013.02.002.
    '''
    def list_methods():
        arg_8 = []
        if arg_5 in MagalhaesLJ_data.index:
            arg_8.append(MAGALHAES)
        if arg_2 and arg_4:
            arg_8.append(TEEGOTOSTEWARD2)
        if arg_2:
            arg_8.append(FLYNN)
            arg_8.append(BSLC)
            arg_8.append(TEEGOTOSTEWARD1)
        if arg_1:
            arg_8.append(BSLB)
        if arg_0:
            arg_8.append(BSLM)
        if arg_2 and arg_3:
            arg_8.append(STIELTHODOS)
        arg_8.append(NONE)
        return arg_8
    if arg_6:
        return list_methods()
    if not arg_7:
        arg_7 = list_methods()[0]

    if arg_7 == FLYNN:
        arg_9 = epsilon_Flynn(arg_2)
    elif arg_7 == BSLC:
        arg_9 = epsilon_Bird_Stewart_Lightfoot_critical(arg_2)
    elif arg_7 == BSLB:
        arg_9 = epsilon_Bird_Stewart_Lightfoot_boiling(arg_1)
    elif arg_7 == BSLM:
        arg_9 = epsilon_Bird_Stewart_Lightfoot_melting(arg_0)
    elif arg_7 == STIELTHODOS:
        arg_9 = epsilon_Stiel_Thodos(arg_2, arg_3)
    elif arg_7 == TEEGOTOSTEWARD1:
        arg_9 = epsilon_Tee_Gotoh_Steward_1(arg_2)
    elif arg_7 == TEEGOTOSTEWARD2:
        arg_9 = epsilon_Tee_Gotoh_Steward_2(arg_2, arg_4)

    elif arg_7 == MAGALHAES:
        arg_9 = float(MagalhaesLJ_data.at[arg_5, "epsilon"])
    elif arg_7 == NONE:
        arg_9 = None
    else:
        raise Exception('Failure in in function')
    return arg_9

r'''This function handles the retrieval or calculation a chemical's
    Stockmayer parameter. Values are available from one source with lookup
    based on CASRNs, or can be estimated from 7 CSP methods.
    Will automatically select a data source to use if no Method is provided;
    returns None if the data is not available.

    Prefered sources are 'Magalhães, Lito, Da Silva, and Silva (2013)' for
    common chemicals which had valies listed in that source, and the CSP method
    `Tee, Gotoh, and Stewart CSP with Tc, omega (1966)` for chemicals which
    don't.

    Examples
    --------
    >>> Stockmayer(CASRN='64-17-5')
    1291.41

    Parameters
    ----------
    Tm : float, optional
        Melting temperature of fluid [K]
    Tb : float, optional
        Boiling temperature of fluid [K]
    Tc : float, optional
        Critical temperature, [K]
    Zc : float, optional
        Critical compressibility, [-]
    omega : float, optional
        Acentric factor of compound, [-]
    CASRN : string, optional
        CASRN [-]

    Returns
    -------
    epsilon_k : float
        Lennard-Jones depth of potential-energy minimum over k, [K]
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain epsilon with the given
        inputs

    Other Parameters
    ----------------
    Method : string, optional
        A string for the method name to use, as defined by constants in
        Stockmayer_methods
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        epsilon for the desired chemical, and will return methods instead of
        epsilon

    Notes
    -----
    These values are somewhat rough, as they attempt to pigeonhole a chemical
    into L-J behavior.

    The tabulated data is from [2]_, for 322 chemicals.

    References
    ----------
    .. [1] Bird, R. Byron, Warren E. Stewart, and Edwin N. Lightfoot.
       Transport Phenomena, Revised 2nd Edition. New York:
       John Wiley & Sons, Inc., 2006
    .. [2] Magalhães, Ana L., Patrícia F. Lito, Francisco A. Da Silva, and
       Carlos M. Silva. "Simple and Accurate Correlations for Diffusion
       Coefficients of Solutes in Liquids and Supercritical Fluids over Wide
       Ranges of Temperature and Density." The Journal of Supercritical Fluids
       76 (April 2013): 94-114. doi:10.1016/j.supflu.2013.02.002.

r This function handles the retrieval or calculation a chemical s Stockmayer parameter . Values are available from one source with lookup based on CASRNs or can be estimated from 7 CSP methods . Will automatically select a data source to use if no Method is provided ; returns None if the data is not available .


def Func(arg_0, arg_1, arg_2, **arg_3):  # pylint: disable=unused-argument
        """
        Render the specified fragment to HTML for a standalone page.
        """
        arg_4 = get_template(STANDALONE_TEMPLATE_NAME)
        arg_5 = {
            'head_html': arg_2.head_html(),
            'body_html': arg_2.body_html(),
            'foot_html': arg_2.foot_html(),
        }
        return arg_4.render(arg_5)

Render the specified fragment to HTML for a standalone page .


def Func(arg_0, arg_1):
    """ Set multiple custom properties and persist them to the custom
    configuration store.

    Parameters:
    ----------------------------------------------------------------
    properties: a dict of property name/value pairs to set
    """
    _getLogger().info("Setting custom configuration properties=%r; caller=%r",
                      arg_1, traceback.format_stack())

    _CustomConfigurationFileWrapper.edit(arg_1)

    for arg_2, arg_3 in arg_1.iteritems():
      arg_0.set(arg_2, arg_3)

Set multiple custom properties and persist them to the custom configuration store .


def Func ( arg_0 ) : arg_0 . verifyToken ( arg_0 . Auth . SkypeToken ) arg_1 , arg_2 , arg_3 , arg_4 = SkypeRegistrationTokenProvider ( arg_0 ) . auth ( arg_0 . tokens [ "skype" ] ) arg_0 . tokens [ "reg" ] = arg_1 arg_0 . tokenExpiry [ "reg" ] = arg_2 arg_0 . msgsHost = arg_3 if arg_4 : arg_4 . config ( ) arg_0 . endpoints [ "main" ] = arg_4 arg_0 . syncEndpoints ( ) if arg_0 . tokenFile : arg_0 . writeToken ( )

def Func(arg_0):
        """
        Acquire a new registration token.

        Once successful, all tokens and expiry times are written to the token file (if specified on initialisation).
        """
        arg_0.verifyToken(arg_0.Auth.SkypeToken)
        arg_1, arg_2, arg_3, arg_4 = SkypeRegistrationTokenProvider(arg_0).auth(arg_0.tokens["skype"])
        arg_0.tokens["reg"] = arg_1
        arg_0.tokenExpiry["reg"] = arg_2
        arg_0.msgsHost = arg_3
        if arg_4:
            arg_4.config()
            arg_0.endpoints["main"] = arg_4
        arg_0.syncEndpoints()
        if arg_0.tokenFile:
            arg_0.writeToken()


(self, topic_name, subscription_name,
                                     peek_lock=True, timeout=60)

return self.read_delete_subscription_message(topic_name,
                                                     subscription_name,
                                                     timeout)

def Func(arg_0, arg_1, arg_2,
                                     arg_3=True, arg_4=60):
        '''
        Receive a message from a subscription for processing.

        topic_name:
            Name of the topic.
        subscription_name:
            Name of the subscription.
        peek_lock:
            Optional. True to retrieve and lock the message. False to read and
            delete the message. Default is True (lock).
        timeout:
            Optional. The timeout parameter is expressed in seconds.
        '''
        if arg_3:
            return arg_0.peek_lock_subscription_message(arg_1,
                                                       arg_2,
                                                       arg_4)
        return arg_0.read_delete_subscription_message(arg_1,
                                                     arg_2,
                                                     arg_4)

Receive a message from a subscription for processing .


def Func ( arg_0 , arg_1 ) -> Session : if '_' not in arg_1 : arg_1 = f'{session}_normal_0_0' arg_2 = Intervals ( arg_0 = arg_0 ) arg_3 = arg_1 . split ( '_' ) return getattr ( arg_2 , f'market_{ss_info.pop(1)}' ) ( * arg_3 )

def Func(arg_0, arg_1) -> Session:
    """
    Get interval from defined session

    Args:
        ticker: ticker
        session: session

    Returns:
        Session of start_time and end_time

    Examples:
        >>> Func('005490 KS Equity', 'day_open_30')
        Session(start_time='09:00', end_time='09:30')
        >>> Func('005490 KS Equity', 'day_normal_30_20')
        Session(start_time='09:31', end_time='15:00')
        >>> Func('005490 KS Equity', 'day_close_20')
        Session(start_time='15:01', end_time='15:20')
        >>> Func('700 HK Equity', 'am_open_30')
        Session(start_time='09:30', end_time='10:00')
        >>> Func('700 HK Equity', 'am_normal_30_30')
        Session(start_time='10:01', end_time='11:30')
        >>> Func('700 HK Equity', 'am_close_30')
        Session(start_time='11:31', end_time='12:00')
        >>> Func('ES1 Index', 'day_exact_2130_2230')
        Session(start_time=None, end_time=None)
        >>> Func('ES1 Index', 'allday_exact_2130_2230')
        Session(start_time='21:30', end_time='22:30')
        >>> Func('ES1 Index', 'allday_exact_2130_0230')
        Session(start_time='21:30', end_time='02:30')
        >>> Func('AMLP US', 'day_open_30')
        Session(start_time=None, end_time=None)
        >>> Func('7974 JP Equity', 'day_normal_180_300') is SessNA
        True
        >>> Func('Z 1 Index', 'allday_normal_30_30')
        Session(start_time='01:31', end_time='20:30')
        >>> Func('GBP Curncy', 'day')
        Session(start_time='17:02', end_time='17:00')
    """
    if '_' not in arg_1:
        arg_1 = f'{session}_normal_0_0'
    arg_2 = Intervals(arg_0=arg_0)
    arg_3 = arg_1.split('_')
    return getattr(arg_2, f'market_{ss_info.pop(1)}')(*arg_3)

Get interval from defined session

    Args:
        ticker: ticker
        session: session

    Returns:
        Session of start_time and end_time

    Examples:
        >>> get_interval('005490 KS Equity', 'day_open_30')
        Session(start_time='09:00', end_time='09:30')
        >>> get_interval('005490 KS Equity', 'day_normal_30_20')
        Session(start_time='09:31', end_time='15:00')
        >>> get_interval('005490 KS Equity', 'day_close_20')
        Session(start_time='15:01', end_time='15:20')
        >>> get_interval('700 HK Equity', 'am_open_30')
        Session(start_time='09:30', end_time='10:00')
        >>> get_interval('700 HK Equity', 'am_normal_30_30')
        Session(start_time='10:01', end_time='11:30')
        >>> get_interval('700 HK Equity', 'am_close_30')
        Session(start_time='11:31', end_time='12:00')
        >>> get_interval('ES1 Index', 'day_exact_2130_2230')
        Session(start_time=None, end_time=None)
        >>> get_interval('ES1 Index', 'allday_exact_2130_2230')
        Session(start_time='21:30', end_time='22:30')
        >>> get_interval('ES1 Index', 'allday_exact_2130_0230')
        Session(start_time='21:30', end_time='02:30')
        >>> get_interval('AMLP US', 'day_open_30')
        Session(start_time=None, end_time=None)
        >>> get_interval('7974 JP Equity', 'day_normal_180_300') is SessNA
        True
        >>> get_interval('Z 1 Index', 'allday_normal_30_30')
        Session(start_time='01:31', end_time='20:30')
        >>> get_interval('GBP Curncy', 'day')
        Session(start_time='17:02', end_time='17:00')


def Func ( arg_0 ) : arg_1 = np . power ( euclidean_distances ( arg_0 , arg_0 ) , 2 ) return np . exp ( - arg_1 / ( 2.0 ) )

def Func(arg_0):
    """Compute the gaussian kernel on a 1D vector."""
    arg_1 = np.power(euclidean_distances(arg_0, arg_0), 2)
    return np.exp(-arg_1 / (2.0))

Compute the gaussian kernel on a 1D vector .


returns the device which owns the given stream

return Device(self.db,
                      splitted_path[0] + "/" + splitted_path[1])

def Func ( arg_0 ) : arg_1 = arg_0 . path . split ( "/" ) return Device ( arg_0 . db , arg_1 [ 0 ] + "/" + arg_1 [ 1 ] )

def Func(arg_0):
        """returns the Func which owns the given stream"""
        arg_1 = arg_0.path.split("/")

        return Device(arg_0.db,
                      arg_1[0] + "/" + arg_1[1])


def
Func
(
)
:
arg_0
=
os
.
getcwd
(
)
arg_1
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
)
,
os
.
pardir
)
os
.
chdir
(
arg_1
)
arg_2
=
validate_version
(
)
if
not
arg_2
:
os
.
chdir
(
arg_0
)
return
print
(
'Generating changelog for version {}'
.
format
(
arg_2
)
)
arg_3
=
[
'--user'
,
'arve0'
,
'--project'
,
'leicacam'
,
'-v'
,
'--with-unreleased'
,
'--future-release'
,
arg_2
]
arg_4
=
ChangelogGenerator
(
arg_3
)
arg_4
.
run
(
)
os
.
chdir
(
arg_0
)

def Func():
    """Generate changelog."""
    arg_0 = os.getcwd()
    arg_1 = os.path.join(os.path.dirname(__file__), os.pardir)
    os.chdir(arg_1)
    arg_2 = validate_version()
    if not arg_2:
        os.chdir(arg_0)
        return
    print('Generating changelog for version {}'.format(arg_2))
    arg_3 = [
        '--user', 'arve0', '--project', 'leicacam', '-v', '--with-unreleased',
        '--future-release', arg_2]
    arg_4 = ChangelogGenerator(arg_3)
    arg_4.run()
    os.chdir(arg_0)


def Func ( arg_0 , arg_1 , arg_2 = arg_3 . KMIPVersion . KMIP_1_0 ) : arg_6 = BytearrayStream ( ) arg_0 . hashing_algorithm . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . digest_value . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . key_format_type . Func ( arg_6 , arg_2 = arg_2 ) arg_0 . length = arg_6 . length ( ) super ( Digest , 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 Digest 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.hashing_algorithm.Func(arg_6, arg_2=arg_2)
        arg_0.digest_value.Func(arg_6, arg_2=arg_2)
        arg_0.key_format_type.Func(arg_6, arg_2=arg_2)

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

Write the data encoding the Digest 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 Digest object to a stream .


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = H2OFrame . _expr ( expr = ExprNode ( "Func" , arg_0 , arg_1 , arg_2 ) ) arg_3 . _ex . _cache . nrows = arg_0 . nrow arg_3 . _ex . _cache . ncol = arg_0 . ncol return arg_3

def Func(arg_0, arg_1, arg_2=None):
        """
        For each string, return a new string that is a Func of the original string.

        If end_index is not specified, then the Func extends to the end of the original string. If the start_index
        is longer than the length of the string, or is greater than or equal to the end_index, an empty string is
        returned. Negative start_index is coerced to 0.

        :param int start_index: The index of the original string at which to start the Func, inclusive.
        :param int end_index: The index of the original string at which to end the Func, exclusive.
        :returns: An H2OFrame containing the specified Funcs.
        """
        arg_3 = H2OFrame._expr(expr=ExprNode("Func", arg_0, arg_1, arg_2))
        arg_3._ex._cache.nrows = arg_0.nrow
        arg_3._ex._cache.ncol = arg_0.ncol
        return arg_3

For each string, return a new string that is a substring of the original string.

        If end_index is not specified, then the substring extends to the end of the original string. If the start_index
        is longer than the length of the string, or is greater than or equal to the end_index, an empty string is
        returned. Negative start_index is coerced to 0.

        :param int start_index: The index of the original string at which to start the substring, inclusive.
        :param int end_index: The index of the original string at which to end the substring, exclusive.
        :returns: An H2OFrame containing the specified substrings.

For each string return a new string that is a substring of the original string .


(bucket_name, path_prefix, source_dir,
               upload_dir_redirect_objects=True,
               surrogate_key=None,
               surrogate_control=None, cache_control=None,
               acl=None,
               aws_access_key_id=None, aws_secret_access_key=None,
               aws_profile=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
True
,
arg_4
=
,
arg_5
=
,
arg_6
=
,
arg_7
=
,
arg_8
=
,
arg_9
=
,
arg_10
=
)
:
arg_11
=
logging
.
getLogger
(
__name__
)
arg_11
.
debug
(
's3upload.upload({0}, {1}, {2})'
.
format
(
arg_0
,
arg_1
,
arg_2
)
)
arg_12
=
boto3
.
session
.
Session
(
profile_name
=
arg_10
,
arg_8
=
arg_8
,
arg_9
=
arg_9
)
arg_13
=
arg_12
.
resource
(
's3'
)
arg_14
=
arg_13
.
Bucket
(
arg_0
)
arg_15
=
{
}
if
arg_4
is
not
:
arg_15
[
'surrogate-key'
]
=
arg_4
if
arg_5
is
not
:
arg_15
[
'surrogate-control'
]
=
arg_5
arg_16
=
ObjectManager
(
arg_12
,
arg_0
,
arg_1
)
for
(
arg_17
,
arg_18
,
arg_19
)
in
os
.
walk
(
arg_2
)
:
arg_20
=
os
.
path
.
relpath
(
arg_17
,
start
=
arg_2
)
if
arg_20
in
(
'.'
,
'/'
)
:
arg_20
=
''
arg_21
=
arg_16
.
list_dirnames_in_directory
(
arg_20
)
for
arg_22
in
arg_21
:
if
arg_22
not
in
arg_18
:
arg_11
.
debug
(
(
'Deleting bucket directory {0}'
.
format
(
arg_22
)
)
)
arg_16
.
delete_directory
(
arg_22
)
arg_23
=
arg_16
.
list_filenames_in_directory
(
arg_20
)
for
arg_24
in
arg_23
:
if
arg_24
not
in
arg_19
:
arg_24
=
os
.
path
.
join
(
arg_20
,
arg_24
)
arg_11
.
debug
(
'Deleting bucket file {0}'
.
format
(
arg_24
)
)
arg_16
.
delete_file
(
arg_24
)
for
arg_25
in
arg_19
:
arg_26
=
os
.
path
.
join
(
arg_17
,
arg_25
)
arg_27
=
os
.
path
.
join
(
arg_1
,
arg_20
,
arg_25
)
arg_11
.
debug
(
'Uploading to {0}'
.
format
(
arg_27
)
)
upload_file
(
arg_26
,
arg_27
,
arg_14
,
arg_15
=
arg_15
,
arg_7
=
arg_7
,
arg_6
=
arg_6
)
if
arg_3
is
True
:
arg_28
=
os
.
path
.
join
(
arg_1
,
arg_20
)
create_dir_redirect_object
(
arg_28
,
arg_14
,
arg_15
=
arg_15
,
arg_7
=
arg_7
,
arg_6
=
arg_6
)

def Func(arg_0, arg_1, arg_2,
               arg_3=True,
               arg_4=None,
               arg_5=None, arg_6=None,
               arg_7=None,
               arg_8=None, arg_9=None,
               arg_10=None):
    """Upload a directory of files to S3.

    This function places the contents of the Sphinx HTML build directory
    into the ``/path_prefix/`` directory of an *existing* S3 bucket.
    Existing files on S3 are overwritten; files that no longer exist in the
    ``source_dir`` are deleted from S3.

    Parameters
    ----------
    bucket_name : `str`
        Name of the S3 bucket where documentation is uploaded.
    path_prefix : `str`
        The root directory in the bucket where documentation is stored.
    source_dir : `str`
        Path of the Sphinx HTML build directory on the local file system.
        The contents of this directory are uploaded into the ``/path_prefix/``
        directory of the S3 bucket.
    Func_redirect_objects : `bool`, optional
        A feature flag to enable uploading objects to S3 for every directory.
        These objects contain ``x-amz-meta-dir-redirect=true`` HTTP headers
        that tell Fastly to issue a 301 redirect from the directory object to
        the `index.html`` in that directory.
    surrogate_key : `str`, optional
        The surrogate key to insert in the header of all objects
        in the ``x-amz-meta-surrogate-key`` field. This key is used to purge
        builds from the Fastly CDN when Editions change.
        If `None` then no header will be set.
    cache_control : `str`, optional
        This sets the ``Cache-Control`` header on the uploaded
        files. The ``Cache-Control`` header specifically dictates how content
        is cached by the browser (if ``surrogate_control`` is also set).
    surrogate_control : `str`, optional
        This sets the ``x-amz-meta-surrogate-control`` header
        on the uploaded files. The ``Surrogate-Control``
        or ``x-amz-meta-surrogate-control`` header is used in priority by
        Fastly to givern it's caching. This caching policy is *not* passed
        to the browser.
    acl : `str`, optional
        The pre-canned AWS access control list to apply to this upload.
        Can be ``'public-read'``, which allow files to be downloaded
        over HTTP by the public. See
        https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
        for an overview of S3's pre-canned ACL lists. Note that ACL settings
        are not validated locally. Default is `None`, meaning that no ACL
        is applied to an individual object. In this case, use ACLs applied
        to the bucket itself.
    aws_access_key_id : `str`, optional
        The access key for your AWS account. Also set
        ``aws_secret_access_key``.
    aws_secret_access_key : `str`, optional
        The secret key for your AWS account.
    aws_profile : `str`, optional
        Name of AWS profile in :file:`~/.aws/credentials`. Use this instead
        of ``aws_access_key_id`` and ``aws_secret_access_key`` for file-based
        credentials.

    Notes
    -----
    ``cache_control`` and  ``surrogate_control`` can be used together.
    ``surrogate_control`` takes priority in setting Fastly's POP caching,
    while ``cache_control`` then sets the browser's caching. For example:

    - ``cache_control='no-cache'``
    - ``surrogate_control='max-age=31536000'``

    together will ensure that the browser always does an ETAG server query,
    but that Fastly will cache the content for one year (or until purged).
    This configuration is good for files that are frequently changed in place.

    For immutable uploads simply using ``cache_control`` is more efficient
    since it allows the browser to also locally cache content.

    .. seelso:

       - `Fastly: Cache control tutorial
         <https://docs.fastly.com/guides/tutorials/cache-control-tutorial>`_.
       - `Google: HTTP caching <http://ls.st/39v>`_.
    """
    arg_11 = logging.getLogger(__name__)

    arg_11.debug('s3upload.upload({0}, {1}, {2})'.format(
        arg_0, arg_1, arg_2))

    arg_12 = boto3.session.Session(
        profile_name=arg_10,
        arg_8=arg_8,
        arg_9=arg_9)
    arg_13 = arg_12.resource('s3')
    arg_14 = arg_13.Bucket(arg_0)

    arg_15 = {}
    if arg_4 is not None:
        arg_15['surrogate-key'] = arg_4
    if arg_5 is not None:
        arg_15['surrogate-control'] = arg_5

    arg_16 = ObjectManager(arg_12, arg_0, arg_1)

    for (arg_17, arg_18, arg_19) in os.walk(arg_2):
        # name of root directory on S3 bucket
        arg_20 = os.path.relpath(arg_17, start=arg_2)
        if arg_20 in ('.', '/'):
            arg_20 = ''

        # Delete bucket directories that no longer exist in source
        arg_21 = arg_16.list_dirnames_in_directory(arg_20)
        for arg_22 in arg_21:
            if arg_22 not in arg_18:
                arg_11.debug(('Deleting bucket directory {0}'.format(
                    arg_22)))
                arg_16.delete_directory(arg_22)

        # Delete files that no longer exist in source
        arg_23 = arg_16.list_filenames_in_directory(arg_20)
        for arg_24 in arg_23:
            if arg_24 not in arg_19:
                arg_24 = os.path.join(arg_20, arg_24)
                arg_11.debug(
                    'Deleting bucket file {0}'.format(arg_24))
                arg_16.delete_file(arg_24)

        # Upload files in directory
        for arg_25 in arg_19:
            arg_26 = os.path.join(arg_17, arg_25)
            arg_27 = os.path.join(arg_1, arg_20, arg_25)
            arg_11.debug('Uploading to {0}'.format(arg_27))
            upload_file(arg_26, arg_27, arg_14,
                        arg_15=arg_15, arg_7=arg_7,
                        arg_6=arg_6)

        # Upload a directory redirect object
        if arg_3 is True:
            arg_28 = os.path.join(arg_1, arg_20)
            create_dir_redirect_object(
                arg_28,
                arg_14,
                arg_15=arg_15,
                arg_7=arg_7,
                arg_6=arg_6)

Upload a directory of files to S3.

    This function places the contents of the Sphinx HTML build directory
    into the ``/path_prefix/`` directory of an *existing* S3 bucket.
    Existing files on S3 are overwritten; files that no longer exist in the
    ``source_dir`` are deleted from S3.

    Parameters
    ----------
    bucket_name : `str`
        Name of the S3 bucket where documentation is uploaded.
    path_prefix : `str`
        The root directory in the bucket where documentation is stored.
    source_dir : `str`
        Path of the Sphinx HTML build directory on the local file system.
        The contents of this directory are uploaded into the ``/path_prefix/``
        directory of the S3 bucket.
    upload_dir_redirect_objects : `bool`, optional
        A feature flag to enable uploading objects to S3 for every directory.
        These objects contain ``x-amz-meta-dir-redirect=true`` HTTP headers
        that tell Fastly to issue a 301 redirect from the directory object to
        the `index.html`` in that directory.
    surrogate_key : `str`, optional
        The surrogate key to insert in the header of all objects
        in the ``x-amz-meta-surrogate-key`` field. This key is used to purge
        builds from the Fastly CDN when Editions change.
        If `None` then no header will be set.
    cache_control : `str`, optional
        This sets the ``Cache-Control`` header on the uploaded
        files. The ``Cache-Control`` header specifically dictates how content
        is cached by the browser (if ``surrogate_control`` is also set).
    surrogate_control : `str`, optional
        This sets the ``x-amz-meta-surrogate-control`` header
        on the uploaded files. The ``Surrogate-Control``
        or ``x-amz-meta-surrogate-control`` header is used in priority by
        Fastly to givern it's caching. This caching policy is *not* passed
        to the browser.
    acl : `str`, optional
        The pre-canned AWS access control list to apply to this upload.
        Can be ``'public-read'``, which allow files to be downloaded
        over HTTP by the public. See
        https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl
        for an overview of S3's pre-canned ACL lists. Note that ACL settings
        are not validated locally. Default is `None`, meaning that no ACL
        is applied to an individual object. In this case, use ACLs applied
        to the bucket itself.
    aws_access_key_id : `str`, optional
        The access key for your AWS account. Also set
        ``aws_secret_access_key``.
    aws_secret_access_key : `str`, optional
        The secret key for your AWS account.
    aws_profile : `str`, optional
        Name of AWS profile in :file:`~/.aws/credentials`. Use this instead
        of ``aws_access_key_id`` and ``aws_secret_access_key`` for file-based
        credentials.

    Notes
    -----
    ``cache_control`` and  ``surrogate_control`` can be used together.
    ``surrogate_control`` takes priority in setting Fastly's POP caching,
    while ``cache_control`` then sets the browser's caching. For example:

    - ``cache_control='no-cache'``
    - ``surrogate_control='max-age=31536000'``

    together will ensure that the browser always does an ETAG server query,
    but that Fastly will cache the content for one year (or until purged).
    This configuration is good for files that are frequently changed in place.

    For immutable uploads simply using ``cache_control`` is more efficient
    since it allows the browser to also locally cache content.

    .. seelso:

       - `Fastly: Cache control tutorial
         <https://docs.fastly.com/guides/tutorials/cache-control-tutorial>`_.
       - `Google: HTTP caching <http://ls.st/39v>`_.


def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_0 . gates [ arg_1 . name ] = { } arg_5 = arg_0 . gates [ arg_1 . name ] arg_5 [ "print" ] = True arg_5 [ "opaque" ] = arg_2 arg_5 [ "n_args" ] = arg_1 . n_args ( ) arg_5 [ "n_bits" ] = arg_1 . n_bits ( ) if arg_1 . n_args ( ) > 0 : arg_5 [ "args" ] = [ element . name for element in arg_1 . arguments . children ] else : arg_5 [ "args" ] = [ ] arg_5 [ "bits" ] = [ c . name for c in arg_1 . bitlist . children ] if arg_2 : arg_5 [ "body" ] = None else : arg_5 [ "body" ] = arg_1 . body

def Func(arg_0, arg_1, arg_2=False):
        """Process a gate node.

        If opaque is True, process the node as an opaque gate node.
        """
        arg_0.gates[arg_1.name] = {}
        arg_5 = arg_0.gates[arg_1.name]
        arg_5["print"] = True  # default
        arg_5["opaque"] = arg_2
        arg_5["n_args"] = arg_1.n_args()
        arg_5["n_bits"] = arg_1.n_bits()
        if arg_1.n_args() > 0:
            arg_5["args"] = [element.name for element in arg_1.arguments.children]
        else:
            arg_5["args"] = []
        arg_5["bits"] = [c.name for c in arg_1.bitlist.children]
        if arg_2:
            arg_5["body"] = None
        else:
            arg_5["body"] = arg_1.body


return render(request, "registrasion/invoice_mailout.html", data)

def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
GET
.
getlist
(
"category"
,
[
]
)
arg_2
=
arg_0
.
GET
.
getlist
(
"product"
,
[
]
)
arg_3
=
arg_0
.
GET
.
get
(
"status"
)
arg_4
=
forms
.
InvoiceEmailForm
(
arg_0
.
POST
or
,
arg_1
=
arg_1
,
arg_2
=
arg_2
,
arg_3
=
arg_3
,
)
arg_5
=
[
]
if
arg_4
.
is_valid
(
)
:
arg_5
=
[
]
for
arg_6
in
arg_4
.
cleaned_data
[
"invoice"
]
:
arg_7
=
arg_4
.
cleaned_data
[
"from_email"
]
arg_8
=
arg_4
.
cleaned_data
[
"subject"
]
arg_9
=
Template
(
arg_4
.
cleaned_data
[
"body"
]
)
.
render
(
Context
(
{
"invoice"
:
arg_6
,
"user"
:
arg_6
.
user
,
}
)
)
arg_10
=
[
arg_6
.
user
.
email
]
arg_5
.
append
(
Email
(
arg_8
,
arg_9
,
arg_7
,
arg_10
)
)
if
arg_4
.
cleaned_data
[
"action"
]
==
forms
.
InvoiceEmailForm
.
ACTION_SEND
:
send_mass_mail
(
arg_5
)
messages
.
info
(
arg_0
,
"The e-mails have been sent."
)
arg_11
=
{
"form"
:
arg_4
,
"emails"
:
arg_5
,
}
return
render
(
arg_0
,
"registrasion/Func.html"
,
arg_11
)

def Func(arg_0):
    ''' Allows staff to send emails to users based on their invoice status. '''

    arg_1 = arg_0.GET.getlist("category", [])
    arg_2 = arg_0.GET.getlist("product", [])
    arg_3 = arg_0.GET.get("status")

    arg_4 = forms.InvoiceEmailForm(
        arg_0.POST or None,
        arg_1=arg_1,
        arg_2=arg_2,
        arg_3=arg_3,
    )

    arg_5 = []

    if arg_4.is_valid():
        arg_5 = []
        for arg_6 in arg_4.cleaned_data["invoice"]:
            # datatuple = (subject, message, from_email, recipient_list)
            arg_7 = arg_4.cleaned_data["from_email"]
            arg_8 = arg_4.cleaned_data["subject"]
            arg_9 = Template(arg_4.cleaned_data["body"]).render(
                Context({
                    "invoice": arg_6,
                    "user": arg_6.user,
                })
            )
            arg_10 = [arg_6.user.email]
            arg_5.append(Email(arg_8, arg_9, arg_7, arg_10))

        if arg_4.cleaned_data["action"] == forms.InvoiceEmailForm.ACTION_SEND:
            # Send e-mails *ONLY* if we're sending.
            send_mass_mail(arg_5)
            messages.info(arg_0, "The e-mails have been sent.")

    arg_11 = {
        "form": arg_4,
        "emails": arg_5,
    }

    return render(arg_0, "registrasion/Func.html", arg_11)

Allows staff to send emails to users based on their invoice status .


(self, modelID, jobID, modelParams, modelParamsHash,
               jobsDAO, modelCheckpointGUID)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4,
               arg_5, arg_6):
    """Run the given model.

    This runs the model described by 'modelParams'. Periodically, it updates
    the results seen on the model to the model database using the databaseAO
    (database Access Object) methods.

    Parameters:
    -------------------------------------------------------------------------
    modelID:             ID of this model in models table

    jobID:               ID for this hypersearch job in the jobs table

    modelParams:         parameters of this specific model
                         modelParams is a dictionary containing the name/value
                         pairs of each variable we are permuting over. Note that
                         variables within an encoder spec have their name
                         structure as:
                           <encoderName>.<encodrVarName>

    modelParamsHash:     hash of modelParamValues

    jobsDAO              jobs data access object - the interface to the jobs
                          database where model information is stored

    modelCheckpointGUID: A persistent, globally-unique identifier for
                          constructing the model checkpoint key
    """

    # We're going to make an assumption that if we're not using streams, that
    #  we also don't need checkpoints saved. For now, this assumption is OK
    #  (if there are no streams, we're typically running on a single machine
    #  and just save models to files) but we may want to break this out as
    #  a separate controllable parameter in the future
    if not arg_0._createCheckpoints:
      arg_6 = None

    # Register this model in our database
    arg_0._resultsDB.update(arg_1=arg_1,
                           arg_3=arg_3,
                           arg_4=arg_4,
                           metricResult = None,
                           completed = False,
                           completionReason = None,
                           matured = False,
                           numRecords = 0)

    # Get the structured params, which we pass to the base description
    arg_7 = arg_3['structuredParams']

    if arg_0.logger.getEffectiveLevel() <= logging.DEBUG:
      arg_0.logger.debug("Running Model. \nmodelParams: %s, \nmodelID=%s, " % \
                        (pprint.pformat(arg_3, indent=4), arg_1))

    # Record time.clock() so that we can report on cpu time
    arg_8 = time.clock()

    # Run the experiment. This will report the results back to the models
    #  database for us as well.
    arg_9 = arg_0.logger.getEffectiveLevel()
    try:
      if arg_0._dummyModel is None or arg_0._dummyModel is False:
        (arg_10, arg_11) = FuncGivenBaseAndParams(
                    arg_1=arg_1,
                    arg_2=arg_2,
                    baseDescription=arg_0._baseDescription,
                    params=arg_7,
                    predictedField=arg_0._predictedField,
                    reportKeys=arg_0._reportKeys,
                    optimizeKey=arg_0._optimizeKey,
                    arg_5=arg_5,
                    arg_6=arg_6,
                    arg_9=arg_9,
                    predictionCacheMaxRecords=arg_0._predictionCacheMaxRecords)
      else:
        arg_12 = dict(arg_0._dummyModel)
        arg_12['permutationParams'] = arg_7
        if arg_0._dummyModelParamsFunc is not None:
          arg_13 = dict(arg_7)
          arg_13 ['generation'] = arg_3['particleState']['genIdx']
          arg_12.update(arg_0._dummyModelParamsFunc(arg_13))

        (arg_10, arg_11) = runDummyModel(
                      arg_1=arg_1,
                      arg_2=arg_2,
                      params=arg_12,
                      predictedField=arg_0._predictedField,
                      reportKeys=arg_0._reportKeys,
                      optimizeKey=arg_0._optimizeKey,
                      arg_5=arg_5,
                      arg_6=arg_6,
                      arg_9=arg_9,
                      predictionCacheMaxRecords=arg_0._predictionCacheMaxRecords)

      # Write out the completion reason and message
      arg_5.modelSetCompleted(arg_1,
                            completionReason = arg_10,
                            completionMsg = arg_11,
                            cpuTime = time.clock() - arg_8)

    except InvalidConnectionException, e:
      arg_0.logger.warn("%s", e)


def Func(arg_0, arg_1, arg_2=arg_3.KMIPVersion.KMIP_1_0):
        """
        Read the data encoding the Sign response payload and decode it.

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

        Raises:
            ValueError: Raised if the unique_identifier or signature attributes
                are missing from the encoded payload.
        """

        super(SignResponsePayload, arg_0).Func(
            arg_1,
            arg_2=arg_2
        )
        arg_6 = utils.BytearrayStream(arg_1.Func(arg_0.length))

        if arg_0.is_tag_next(arg_3.Tags.UNIQUE_IDENTIFIER, arg_6):
            arg_0._unique_identifier = primitives.TextString(
                tag=arg_3.Tags.UNIQUE_IDENTIFIER
            )
            arg_0._unique_identifier.Func(
                arg_6,
                arg_2=arg_2
            )
        else:
            raise ValueError(
                "invalid payload missing the unique identifier attribute"
            )

        if arg_0.is_tag_next(arg_3.Tags.SIGNATURE_DATA, arg_6):
            arg_0._signature_data = primitives.ByteString(
                tag=arg_3.Tags.SIGNATURE_DATA
            )
            arg_0._signature_data.Func(arg_6, arg_2=arg_2)
        else:
            raise ValueError(
                "invalid payload missing the signature data attribute"
            )

Read the data encoding the Sign response payload and decode it.

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

        Raises:
            ValueError: Raised if the unique_identifier or signature attributes
                are missing from the encoded payload.

Read the data encoding the Sign response payload and decode it .


def Func ( arg_0 ) : arg_1 = [ block . distance_start for block in arg_0 . _profile_blocks if block . distance_start < float ( 'inf' ) ] arg_2 = [ block . distance_end for block in arg_0 . _profile_blocks if block . distance_end < float ( 'inf' ) ] arg_3 = arg_1 + arg_2 if len ( arg_3 ) > 0 : return max ( arg_3 ) else : return None

def Func(arg_0):
        """
        Compute the maximum temporal distance.

        Returns
        -------
        max_temporal_distance : float
        """
        arg_1 = [block.distance_start for block in arg_0._profile_blocks if
                                 block.distance_start < float('inf')]
        arg_2 = [block.distance_end for block in arg_0._profile_blocks if
                               block.distance_end < float('inf')]
        arg_3 = arg_1 + arg_2
        if len(arg_3) > 0:
            return max(arg_3)
        else:
            return None


def Func ( arg_0 , arg_1 , arg_2 = True ) : arg_3 = np . argsort ( arg_1 [ : , 0 ] ) arg_4 = np . argsort ( arg_1 [ : , 1 ] ) arg_5 = arg_1 [ arg_3 , 0 ] arg_6 = arg_1 [ arg_4 , 1 ] arg_7 = np . searchsorted ( arg_5 , arg_0 [ : , 1 ] , side = 'right' ) arg_8 = np . searchsorted ( arg_6 , arg_0 [ : , 0 ] , side = 'left' ) arg_9 = np . empty ( len ( arg_0 ) , dtype = numba . uint32 ) for arg_10 in range ( len ( arg_0 ) ) : arg_11 = arg_0 [ arg_10 ] arg_12 = arg_7 [ arg_10 ] arg_13 = arg_8 [ arg_10 ] arg_14 = set ( arg_3 [ : arg_12 ] ) & set ( arg_4 [ arg_13 : ] ) if len ( arg_14 ) > 0 : arg_9 [ arg_10 ] = __match_interval_overlaps ( arg_11 , arg_1 , arg_14 ) elif arg_2 : raise ParameterError else : arg_15 = np . inf arg_16 = np . inf if arg_8 [ arg_10 ] > 0 : arg_15 = arg_11 [ 0 ] - arg_6 [ arg_8 [ arg_10 ] - 1 ] if arg_7 [ arg_10 ] + 1 < len ( arg_1 ) : arg_16 = arg_5 [ arg_7 [ arg_10 ] + 1 ] - arg_11 [ 1 ] if arg_15 < arg_16 : arg_9 [ arg_10 ] = arg_4 [ arg_8 [ arg_10 ] - 1 ] else : arg_9 [ arg_10 ] = arg_3 [ arg_7 [ arg_10 ] + 1 ] return arg_9

def Func(arg_0, arg_1, arg_2=True):  # pragma: no cover
    '''Numba-accelerated interval matching algorithm.

    '''
    # sort index of the interval starts
    arg_3 = np.argsort(arg_1[:, 0])

    # sort index of the interval ends
    arg_4 = np.argsort(arg_1[:, 1])

    # and sorted values of starts
    arg_5 = arg_1[arg_3, 0]
    # and ends
    arg_6 = arg_1[arg_4, 1]

    arg_7 = np.searchsorted(arg_5, arg_0[:, 1], side='right')
    arg_8 = np.searchsorted(arg_6, arg_0[:, 0], side='left')

    arg_9 = np.empty(len(arg_0), dtype=numba.uint32)
    for arg_10 in range(len(arg_0)):
        arg_11 = arg_0[arg_10]

        # Find the intervals that start after our query ends
        arg_12 = arg_7[arg_10]
        # And the intervals that end after our query begins
        arg_13 = arg_8[arg_10]

        # Candidates for overlapping have to (end after we start) and (begin before we end)
        arg_14 = set(arg_3[:arg_12]) & set(arg_4[arg_13:])

        # Proceed as before
        if len(arg_14) > 0:
            arg_9[arg_10] = __match_interval_overlaps(arg_11, arg_1, arg_14)
        elif arg_2:
            # Numba only lets us use compile-time constants in exception messages
            raise ParameterError
        else:
            # Find the closest interval
            # (start_index[after_query] - query[1]) is the distance to the next interval
            # (query[0] - end_index[before_query])
            arg_15 = np.inf
            arg_16 = np.inf
            if arg_8[arg_10] > 0:
                arg_15 = arg_11[0] - arg_6[arg_8[arg_10]-1]
            if arg_7[arg_10] + 1 < len(arg_1):
                arg_16 = arg_5[arg_7[arg_10]+1] - arg_11[1]
            if arg_15 < arg_16:
                arg_9[arg_10] = arg_4[arg_8[arg_10]-1]
            else:
                arg_9[arg_10] = arg_3[arg_7[arg_10]+1]
    return arg_9

Numba - accelerated interval matching algorithm .


def Func(arg_0):
    '''Converts entry element to topic

    The xml format for topic:
<entry xmlns='http://www.w3.org/2005/Atom'>
    <content type='application/xml'>
    <TopicDescription
        xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect">
        <DefaultMessageTimeToLive>P10675199DT2H48M5.4775807S</DefaultMessageTimeToLive>
        <MaxSizeInMegabytes>1024</MaxSizeInMegabytes>
        <RequiresDuplicateDetection>false</RequiresDuplicateDetection>
        <DuplicateDetectionHistoryTimeWindow>P7D</DuplicateDetectionHistoryTimeWindow>
        <DeadLetteringOnFilterEvaluationExceptions>true</DeadLetteringOnFilterEvaluationExceptions>
    </TopicDescription>
    </content>
</entry>
    '''
    arg_1 = Topic()

    arg_2 = True

    arg_3 = arg_0.find('./atom:content/sb:TopicDescription', _etree_sb_feed_namespaces)
    if arg_3 is not None:
        arg_4 = [
            ('DefaultMessageTimeToLive', 'default_message_time_to_live', None),
            ('MaxSizeInMegabytes', 'max_size_in_megabytes', int),
            ('RequiresDuplicateDetection', 'requires_duplicate_detection', _parse_bool),
            ('DuplicateDetectionHistoryTimeWindow', 'duplicate_detection_history_time_window', None),
            ('EnableBatchedOperations', 'enable_batched_operations', _parse_bool),
            ('SizeInBytes', 'size_in_bytes', int),
        ]

        for arg_5 in arg_4:
            if _read_etree_element(arg_3, arg_5[0], arg_1, arg_5[1], arg_5[2]):
                arg_2 = False

    if arg_2:
        raise AzureServiceBusResourceNotFound(_ERROR_TOPIC_NOT_FOUND)

    # extract id, updated and name value from feed entry and set them of topic.
    for arg_6, arg_7 in _ETreeXmlToObject.get_entry_properties_from_element(
            arg_0, True).items():
        setattr(arg_1, arg_6, arg_7)

    return arg_1


def Func ( arg_0 , arg_1 : arg_2 , arg_3 : arg_2 ) -> arg_2 : arg_4 = deepcopy ( arg_0 . response_template ) arg_4 [ 'sessionAttributes' ] [ 'sessionId' ] = arg_3 [ 'session' ] [ 'sessionId' ] for arg_5 , arg_6 in arg_4 . items ( ) : if arg_5 not in arg_1 . keys ( ) : arg_1 [ arg_5 ] = arg_6 return arg_1

def Func(arg_0, arg_1: arg_2, arg_3: arg_2) -> arg_2:
        """Populates generated response with additional data conforming Alexa response specification.

        Args:
            response: Raw user input extracted from Alexa request.
            request: Alexa request.
        Returns:
            response: Response conforming Alexa response specification.
        """
        arg_4 = deepcopy(arg_0.response_template)
        arg_4['sessionAttributes']['sessionId'] = arg_3['session']['sessionId']

        for arg_5, arg_6 in arg_4.items():
            if arg_5 not in arg_1.keys():
                arg_1[arg_5] = arg_6

        return arg_1

Populates generated response with additional data conforming Alexa response specification .


def Func(arg_0, arg_1, arg_2, arg_3):
    """
    Handles the Airflow + Databricks lifecycle logic for a Databricks operator

    :param operator: Databricks operator being handled
    :param context: Airflow context
    """
    if arg_0.do_xcom_push:
        arg_3['ti'].xcom_push(key=XCOM_RUN_ID_KEY, value=arg_0.run_id)
    arg_2.info('Run submitted with run_id: %s', arg_0.run_id)
    arg_4 = arg_1.get_run_page_url(arg_0.run_id)
    if arg_0.do_xcom_push:
        arg_3['ti'].xcom_push(key=XCOM_RUN_PAGE_URL_KEY, value=arg_4)

    arg_2.info('View run status, Spark UI, and logs at %s', arg_4)
    while True:
        arg_5 = arg_1.get_run_state(arg_0.run_id)
        if arg_5.is_terminal:
            if arg_5.is_successful:
                arg_2.info('%s completed successfully.', arg_0.task_id)
                arg_2.info('View run status, Spark UI, and logs at %s', arg_4)
                return
            else:
                arg_6 = '{t} failed with terminal state: {s}'.format(
                    t=arg_0.task_id,
                    s=arg_5)
                raise AirflowException(arg_6)
        else:
            arg_2.info('%s in run state: %s', arg_0.task_id, arg_5)
            arg_2.info('View run status, Spark UI, and logs at %s', arg_4)
            arg_2.info('Sleeping for %s seconds.', arg_0.polling_period_seconds)
            time.sleep(arg_0.polling_period_seconds)


def Func(arg_0, **arg_1):
    '''Output fractional linear and circular polarizations for a
    rawspec cross polarization .fil file. NOT STANDARD USE'''

    arg_2,arg_3,arg_4,arg_5,arg_6=get_stokes(arg_0, **arg_1)
    return arg_6/arg_2,arg_5/arg_2

Output fractional linear and circular polarizations for a rawspec cross polarization . fil file . NOT STANDARD USE


def
Func
(
arg_0
,
arg_1
)
:
if
not
isinstance
(
arg_1
,
int
)
:
raise
TypeError
(
"version must be an integer"
)
_lib
.
X509_Func
(
arg_0
.
_x509
,
arg_1
)

def Func(arg_0, arg_1):
        """
        Set the version number of the certificate. Note that the
        version value is zero-based, eg. a value of 0 is V1.

        :param version: The version number of the certificate.
        :type version: :py:class:`int`

        :return: ``None``
        """
        if not isinstance(arg_1, int):
            raise TypeError("version must be an integer")

        _lib.X509_Func(arg_0._x509, arg_1)

Set the version number of the certificate . Note that the version value is zero - based eg . a value of 0 is V1 .


def Func(arg_0):
        """
        Execute the logic behind the merging.
        """

        if "PYFUNCEBLE_AUTO_CONFIGURATION" not in PyFunceble.environ:
            # The auto configuration environment variable is not set.

            while True:
                # We infinitly loop until we get a reponse which is `y|Y` or `n|N`.

                # We ask the user if we should install and load the default configuration.
                arg_1 = input(
                    PyFunceble.Style.BRIGHT
                    + PyFunceble.Fore.RED
                    + "A configuration key is missing.\n"
                    + PyFunceble.Fore.RESET
                    + "Try to merge upstream configuration file into %s ? [y/n] "
                    % (
                        PyFunceble.Style.BRIGHT
                        + arg_0.path_to_config
                        + PyFunceble.Style.RESET_ALL
                    )
                )

                if isinstance(arg_1, str):
                    # The response is a string

                    if arg_1.lower() == "y":
                        # The response is a `y` or `Y`.

                        # We merge the old values inside the new one.
                        arg_0._merge_values()

                        # And we save.
                        arg_0._save()

                        print(
                            PyFunceble.Style.BRIGHT + PyFunceble.Fore.GREEN + "Done!\n"
                            "Please try again, if it happens again,"
                            " please fill a new issue."
                        )

                        # And we break the loop as we got a satisfied response.
                        break

                    elif arg_1.lower() == "n":
                        # The response is a `n` or `N`.

                        # We inform the user that something went wrong.
                        raise Exception("Configuration key still missing.")
        else:
            # The auto configuration environment variable is set.

            # We merge the old values inside the new one.
            arg_0._merge_values()

            # And we save.
            arg_0._save()


def Func ( arg_0 , arg_1 ) : if isinstance ( arg_1 , list ) : arg_2 = arg_1 else : arg_2 = arg_1 . get ( 'contents' , [ ] ) if isinstance ( arg_2 , six . string_types ) : arg_2 = arg_2 , for arg_3 in arg_2 : if isinstance ( arg_3 , dict ) : arg_3 = arg_0 . _create_bundle ( arg_3 ) yield arg_3

def Func(arg_0, arg_1):
        """Yield bundle contents from the given dict.

        Each item yielded will be either a string representing a file path
        or a bundle."""
        if isinstance(arg_1, list):
            arg_2 = arg_1
        else:
            arg_2 = arg_1.get('contents', [])
            if isinstance(arg_2, six.string_types):
                arg_2 = arg_2,
        for arg_3 in arg_2:
            if isinstance(arg_3, dict):
                arg_3 = arg_0._create_bundle(arg_3)
            yield arg_3

Yield bundle contents from the given dict .


(song, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False)

def Func(arg_0, arg_1=None, arg_2=None, arg_3=False, arg_4=False):
	"""Check a song metadata dict against a set of metadata filters."""

	arg_5 = True

	if arg_1:
		if arg_3:
			if not all(arg_6 in arg_0 and _check_field_value(arg_0[arg_6], arg_7) for arg_6, arg_7 in arg_1):
				arg_5 = False
		else:
			if not any(arg_6 in arg_0 and _check_field_value(arg_0[arg_6], arg_7) for arg_6, arg_7 in arg_1):
				arg_5 = False

	if arg_2:
		if arg_4:
			if all(arg_6 in arg_0 and _check_field_value(arg_0[arg_6], arg_7) for arg_6, arg_7 in arg_2):
				arg_5 = False
		else:
			if any(arg_6 in arg_0 and _check_field_value(arg_0[arg_6], arg_7) for arg_6, arg_7 in arg_2):
				arg_5 = False

	return arg_5

Check a song metadata dict against a set of metadata filters .


def Func(arg_0, arg_1=arg_2):
    """
    Retrieve the Haystack Func
    """
    arg_3 = get_tz_map(arg_1=arg_1)
    try:
        arg_4 = arg_3[arg_0]
    except KeyError:
        raise ValueError('%s is not a recognised Func on this host' \
                % arg_0)
    return pytz.Func(arg_4)


return min(max(v, epsilon.tiny), 1 - epsilon.tiny)

def Func ( arg_0 ) : arg_1 = float ( arg_0 . _logistic . value ) if arg_1 > 0.0 : arg_1 = 1 / ( 1 + exp ( - arg_1 ) ) else : arg_1 = exp ( arg_1 ) arg_1 = arg_1 / ( arg_1 + 1.0 ) return min ( max ( arg_1 , epsilon . tiny ) , 1 - epsilon . tiny )

def Func(arg_0):
        """
        Variance ratio between ``K`` and ``I``.
        """

        arg_1 = float(arg_0._logistic.value)

        if arg_1 > 0.0:
            arg_1 = 1 / (1 + exp(-arg_1))
        else:
            arg_1 = exp(arg_1)
            arg_1 = arg_1 / (arg_1 + 1.0)

        return min(max(arg_1, epsilon.tiny), 1 - epsilon.tiny)


def Func(arg_0, arg_1):
        """Process stream error element received.

        :Parameters:
            - `error`: error received

        :Types:
            - `error`: `StreamErrorElement`
        """
        # pylint: disable-msg=R0201
        logger.debug("Unhandled stream error: condition: {0} {1!r}"
                            .format(arg_1.condition_name, arg_1.serialize()))


def Func ( arg_0 , arg_1 ) : arg_0 . jid = arg_1 . me arg_0 . stream = arg_1 for arg_3 in arg_0 . rooms . values ( ) : arg_3 . Func ( arg_1 )

def Func(arg_0,arg_1):
        """
        Change the stream assigned to `self`.

        :Parameters:
            - `stream`: the new stream to be assigned to `self`.
        :Types:
            - `stream`: `pyxmpp.stream.Stream`
        """
        arg_0.jid=arg_1.me
        arg_0.stream=arg_1
        for arg_3 in arg_0.rooms.values():
            arg_3.Func(arg_1)


def
Func
(
arg_0
)
:
arg_1
=
os
.
path
.
join
(
dirname
(
abspath
(
__file__
)
)
,
'templates/controller.py'
)
arg_2
=
os
.
path
.
join
(
dirname
(
abspath
(
__file__
)
)
,
'templates/unittest.py'
)
arg_3
=
arg_0
.
get
(
'<controller>'
)
arg_4
=
os
.
getcwd
(
)
logger
.
info
(
'Start generating controller.'
)
if
not
arg_3
:
logger
.
warning
(
'Controller name cannot be empty.'
)
return
with
open
(
arg_1
,
'r'
)
as
template_file
:
arg_5
=
os
.
path
.
join
(
arg_4
,
'application/controllers'
,
arg_3
+
'.py'
)
with
open
(
arg_5
,
'w+'
)
as
controller_file
:
for
arg_6
in
template_file
:
arg_7
=
arg_6
.
replace
(
'#{controller}'
,
arg_3
)
controller_file
.
write
(
arg_7
)
logger
.
info
(
"New: %s"
%
_relative_path
(
arg_5
)
)
with
open
(
arg_2
,
'r'
)
as
template_file
:
arg_8
=
os
.
path
.
join
(
arg_4
,
'tests'
,
'test_%s.py'
%
arg_3
)
with
open
(
arg_8
,
'w+'
)
as
test_file
:
for
arg_6
in
template_file
:
arg_7
=
arg_6
.
replace
(
'#{controller}'
,
arg_3
)
.
replace
(
'#{controller|title}'
,
arg_3
.
title
(
)
)
test_file
.
write
(
arg_7
)
logger
.
info
(
"New: %s"
%
_relative_path
(
arg_8
)
)
arg_9
=
os
.
path
.
join
(
arg_4
,
'application/pages/%s'
%
arg_3
)
_mkdir_p
(
arg_9
)
_generate_form
(
arg_3
)
logger
.
info
(
'Finish generating controller.'
)

def Func(arg_0):
    """Generate controller, include the controller file, template & css & js directories."""
    arg_1 = os.path.join(dirname(abspath(__file__)), 'templates/controller.py')
    arg_2 = os.path.join(dirname(abspath(__file__)), 'templates/unittest.py')
    arg_3 = arg_0.get('<controller>')
    arg_4 = os.getcwd()

    logger.info('Start generating controller.')

    if not arg_3:
        logger.warning('Controller name cannot be empty.')
        return

    # controller file
    with open(arg_1, 'r') as template_file:
        arg_5 = os.path.join(arg_4, 'application/controllers',
                                            arg_3 + '.py')
        with open(arg_5, 'w+') as controller_file:
            for arg_6 in template_file:
                arg_7 = arg_6.replace('#{controller}', arg_3)
                controller_file.write(arg_7)
    logger.info("New: %s" % _relative_path(arg_5))

    # test file
    with open(arg_2, 'r') as template_file:
        arg_8 = os.path.join(arg_4, 'tests',
                                      'test_%s.py' % arg_3)
        with open(arg_8, 'w+') as test_file:
            for arg_6 in template_file:
                arg_7 = arg_6.replace('#{controller}', arg_3) \
                    .replace('#{controller|title}', arg_3.title())
                test_file.write(arg_7)
    logger.info("New: %s" % _relative_path(arg_8))

    # assets dir
    arg_9 = os.path.join(arg_4, 'application/pages/%s' % arg_3)
    _mkdir_p(arg_9)

    # form file
    _generate_form(arg_3)

    logger.info('Finish generating controller.')

Generate controller include the controller file template & css & js directories .


def Func ( arg_0 , arg_1 , arg_2 ) : def fget ( arg_3 ) : return getattr ( getattr ( arg_3 , arg_0 ) , arg_1 ) def fset ( arg_3 , arg_4 ) : setattr ( getattr ( arg_3 , arg_0 ) , arg_1 , arg_4 ) def fdel ( arg_3 ) : delattr ( getattr ( arg_3 , arg_0 ) , arg_1 ) return property ( fget , fset , fdel , arg_2 )

def Func(arg_0, arg_1, arg_2):
    """Create a property that proxies attribute ``proxied_attr`` through
    the local attribute ``local_attr``.
    """
    def fget(arg_3):
        return getattr(getattr(arg_3, arg_0), arg_1)
    def fset(arg_3, arg_4):
        setattr(getattr(arg_3, arg_0), arg_1, arg_4)
    def fdel(arg_3):
        delattr(getattr(arg_3, arg_0), arg_1)
    return property(fget, fset, fdel, arg_2)

Create a property that proxies attribute proxied_attr through the local attribute local_attr .


def Func ( arg_0 ) : super ( LayeredWidget , arg_0 ) . Func ( ) for arg_1 , arg_2 in arg_0 . layers : arg_1 . _Func ( )

def Func(arg_0):
        """
        Draws all layers of this LayeredWidget.

        This should normally be unneccessary, since it is recommended that layers use Vertex Lists instead of OpenGL Immediate Mode.
        """
        super(LayeredWidget,arg_0).Func()
        for arg_1,arg_2 in arg_0.layers:
            arg_1._Func()

Draws all layers of this LayeredWidget . This should normally be unneccessary since it is recommended that layers use Vertex Lists instead of OpenGL Immediate Mode .


return self.__class__(name=self.name, valueType=self.valueType, defaultValue=self.defaultValue, hashIndex=self.hashIndex)

def Func ( arg_0 ) : return arg_0 . __class__ ( name = arg_0 . name , valueType = arg_0 . valueType , defaultValue = arg_0 . defaultValue , hashIndex = arg_0 . hashIndex )

def Func(arg_0):
		'''
			Func - Create a Func of this IRField.

			  Each subclass should implement this, as you'll need to pass in the args to constructor.

			@return <IRField (or subclass)> - Another IRField that has all the same values as this one.
		'''
		return arg_0.__class__(name=arg_0.name, valueType=arg_0.valueType, defaultValue=arg_0.defaultValue, hashIndex=arg_0.hashIndex)

copy - Create a copy of this IRField.

			  Each subclass should implement this, as you'll need to pass in the args to constructor.

			@return <IRField (or subclass)> - Another IRField that has all the same values as this one.


Call pdb.set_trace in the calling frame, first restoring
    sys.stdout to the real output stream. Note that sys.stdout is NOT
    reset to whatever it was before the call once pdb is done!

def Func ( ) : import pdb import arg_1 arg_0 = arg_1 . stdout arg_1 . stdout = arg_1 . __stdout__ pdb . Pdb ( ) . Func ( arg_1 . _getframe ( ) . f_back )

def Func():
    """Call pdb.Func in the calling frame, first restoring
    sys.stdout to the real output stream. Note that sys.stdout is NOT
    reset to whatever it was before the call once pdb is done!
    """
    import pdb
    import arg_1
    arg_0 = arg_1.stdout
    arg_1.stdout = arg_1.__stdout__
    pdb.Pdb().Func(arg_1._getframe().f_back)

Call pdb . set_trace in the calling frame first restoring sys . stdout to the real output stream . Note that sys . stdout is NOT reset to whatever it was before the call once pdb is done!


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_3
,
arg_4
=
hr_diagram_color_helper
(
[
]
)
arg_5
=
{
'x'
:
list
(
arg_0
[
'temperature'
]
)
,
'y'
:
list
(
arg_0
[
'luminosity'
]
)
,
'color'
:
list
(
arg_0
[
'color'
]
)
}
arg_6
=
ColumnDataSource
(
arg_0
=
arg_5
)
arg_7
=
figure
(
y_axis_type
=
'log'
,
arg_1
=
arg_1
,
arg_2
=
arg_2
)
_diagram
(
arg_6
=
arg_6
,
plot_figure
=
arg_7
,
color
=
{
'field'
:
'color'
,
'transform'
:
arg_4
}
,
xaxis_label
=
'Temperature (Kelvin)'
,
yaxis_label
=
'Luminosity (solar units)'
)
show_with_bokeh_server
(
arg_7
)

def Func(arg_0, arg_1, arg_2):
    """
    Given a numpy array create a Bokeh plot figure creating an
    H-R diagram.
    """
    arg_3, arg_4 = hr_diagram_color_helper([])
    arg_5 = {
        'x': list(arg_0['temperature']),
        'y': list(arg_0['luminosity']),
        'color': list(arg_0['color'])
    }
    arg_6 = ColumnDataSource(arg_0=arg_5)
    arg_7 = figure(y_axis_type='log', arg_1=arg_1, arg_2=arg_2)
    _diagram(arg_6=arg_6, plot_figure=arg_7,
             color={'field': 'color', 'transform': arg_4},
             xaxis_label='Temperature (Kelvin)',
             yaxis_label='Luminosity (solar units)')
    show_with_bokeh_server(arg_7)

Given a numpy array create a Bokeh plot figure creating an H - R diagram .


def Func(arg_0, arg_1):
        """
        Split a description into parts, each of which can be turned into
        a single component.
        """
        # Protect some special sequences.
        arg_2 = re.sub(r'(\d) ?in\. ', r'\1 inch ', arg_1)  # Protect.
        arg_2 = re.sub(r'(\d) ?ft\. ', r'\1 feet ', arg_2)  # Protect.

        # Transform all part delimiters to first splitter.
        arg_3 = getattr(arg_0, 'splitters')
        try:
            arg_4 = arg_3[0].strip()
        except:
            arg_4 = 'with'
        arg_2 = re.sub(r'\,?\;?\.? ?((under)?(less than)? \d+%) (?=\w)', r' '+arg_4+' \1 ', arg_2)

        # Split.
        arg_5 = re.IGNORECASE
        arg_6 = re.compile(r'(?:' + r'|'.join(arg_3) + r')', flags=arg_5)
        arg_7 = filter(None, arg_6.split(arg_2))

        return [arg_8.strip() for arg_8 in arg_7]

Split a description into parts each of which can be turned into a single component .


return [field_item(field) for field in field_dictionary]

def Func ( arg_0 ) : def field_item ( arg_1 ) : return { "match" : { arg_1 : arg_0 [ arg_1 ] } } return [ field_item ( arg_1 ) for arg_1 in arg_0 ]

def Func(arg_0):
    """
    We have a field_dictionary - we want to match the values for an elasticsearch "match" query
    This is only potentially useful when trying to tune certain search operations
    """
    def field_item(arg_1):
        """ format field match as "match" item for elasticsearch query """
        return {
            "match": {
                arg_1: arg_0[arg_1]
            }
        }

    return [field_item(arg_1) for arg_1 in arg_0]

We have a field_dictionary - we want to match the values for an elasticsearch match query This is only potentially useful when trying to tune certain search operations


(s, pos, brackets_are_chars=True, environments=True, **parse_flags)

return LatexWalker(s, **parse_flags).get_token(pos=pos,
                                                   brackets_are_chars=brackets_are_chars,
                                                   environments=environments)

def Func ( arg_0 , arg_1 , arg_2 = True , arg_3 = True , ** arg_4 ) : return LatexWalker ( arg_0 , ** arg_4 ) . Func ( arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 )

def Func(arg_0, arg_1, arg_2=True, arg_3=True, **arg_4):
    """
    Parse the next token in the stream.

    Returns a `LatexToken`. Raises `LatexWalkerEndOfStream` if end of stream reached.

    .. deprecated:: 1.0
       Please use :py:meth:`LatexWalker.Func()` instead.
    """
    return LatexWalker(arg_0, **arg_4).Func(arg_1=arg_1,
                                                   arg_2=arg_2,
                                                   arg_3=arg_3)

Parse the next token in the stream.

    Returns a `LatexToken`. Raises `LatexWalkerEndOfStream` if end of stream reached.

    .. deprecated:: 1.0
       Please use :py:meth:`LatexWalker.get_token()` instead.


def Func ( arg_0 , arg_1 = True , arg_2 = None ) : arg_0 . wx_obj . Show ( arg_1 ) if arg_2 : arg_3 = wx . WindowDisabler ( arg_0 . wx_obj ) arg_4 = wx . EventLoop ( ) def on_close_modal ( arg_5 ) : arg_5 . Skip ( ) arg_4 . Exit ( ) arg_0 . wx_obj . Bind ( wx . EVT_CLOSE , on_close_modal ) arg_4 . Run ( ) del arg_3

def Func(arg_0, arg_1=True, arg_2=None):
        "Display or hide the window, optionally disabling all other windows"
        arg_0.wx_obj.Show(arg_1)
        if arg_2:
            # disable all top level windows of this application (MakeModal)
            arg_3 = wx.WindowDisabler(arg_0.wx_obj)
            # create an event loop to stop execution
            arg_4 = wx.EventLoop()
            def on_close_modal(arg_5):
                arg_5.Skip()
                arg_4.Exit()
            arg_0.wx_obj.Bind(wx.EVT_CLOSE, on_close_modal)
            # start the event loop to wait user interaction
            arg_4.Run()
            # reenable the windows disabled and return control to the caller
            del arg_3

Display or hide the window optionally disabling all other windows


def
Func
(
arg_0
)
:
if
arg_0
is
or
is_datetime
(
arg_0
)
:
return
arg_0
if
is_time
(
arg_0
)
:
return
datetime
.
combine
(
epoch
.
date
(
)
,
arg_0
)
if
is_date
(
arg_0
)
:
return
datetime
.
combine
(
arg_0
,
time
(
0
)
)
raise
TypeError
(
"unable to convert {} to datetime"
.
format
(
arg_0
.
__class__
.
__name__
)
)

def Func(arg_0):
    """
    Convert a date or time to a datetime. If when is a date then it sets the time to midnight. If
    when is a time it sets the date to the epoch. If when is None or a datetime it returns when.
    Otherwise a TypeError is raised. Returned datetimes have tzinfo set to None unless when is a
    datetime with tzinfo set in which case it remains the same.
    """
    if arg_0 is None or is_datetime(arg_0):
        return arg_0
    if is_time(arg_0):
        return datetime.combine(epoch.date(), arg_0)
    if is_date(arg_0):
        return datetime.combine(arg_0, time(0))
    raise TypeError("unable to convert {} to datetime".format(arg_0.__class__.__name__))

Convert a date or time to a datetime . If when is a date then it sets the time to midnight . If when is a time it sets the date to the epoch . If when is None or a datetime it returns when . Otherwise a TypeError is raised . Returned datetimes have tzinfo set to None unless when is a datetime with tzinfo set in which case it remains the same .


def Func(arg_0, arg_1, arg_2=False):
    """Decode pblite to Protocol Buffer message.

    This method is permissive of decoding errors and will log them as warnings
    and continue decoding where possible.

    The first element of the outer pblite list must often be ignored using the
    ignore_first_item parameter because it contains an abbreviation of the name
    of the protobuf message (eg.  cscmrp for ClientSendChatMessageResponseP)
    that's not part of the protobuf.

    Args:
        message: protocol buffer message instance to Func into.
        pblite: list representing a pblite-serialized message.
        ignore_first_item: If True, ignore the item at index 0 in the pblite
            list, making the item at index 1 correspond to field 1 in the
            message.
    """
    if not isinstance(arg_1, list):
        logger.warning('Ignoring invalid message: expected list, got %r',
                       type(arg_1))
        return
    if arg_2:
        arg_1 = arg_1[1:]
    # If the last item of the list is a dict, use it as additional field/value
    # mappings. This seems to be an optimization added for dealing with really
    # high field numbers.
    if arg_1 and isinstance(arg_1[-1], dict):
        arg_3 = {int(arg_5): arg_6 for arg_5, arg_6
                        in arg_1[-1].items()}
        arg_1 = arg_1[:-1]
    else:
        arg_3 = {}
    arg_4 = itertools.chain(enumerate(arg_1, start=1),
                                    arg_3.items())
    for arg_5, arg_6 in arg_4:
        if arg_6 is None:
            continue
        try:
            arg_7 = arg_0.DESCRIPTOR.fields_by_number[arg_5]
        except KeyError:
            # If the tag number is unknown and the value is non-trivial, log a
            # message to aid reverse-engineering the missing field in the
            # message.
            if arg_6 not in [[], '', 0]:
                logger.debug('Message %r contains unknown field %s with value '
                             '%r', arg_0.__class__.__name__, arg_5,
                             arg_6)
            continue
        if arg_7.label == FieldDescriptor.LABEL_REPEATED:
            _Func_repeated_field(arg_0, arg_7, arg_6)
        else:
            _Func_field(arg_0, arg_7, arg_6)

Decode pblite to Protocol Buffer message.

    This method is permissive of decoding errors and will log them as warnings
    and continue decoding where possible.

    The first element of the outer pblite list must often be ignored using the
    ignore_first_item parameter because it contains an abbreviation of the name
    of the protobuf message (eg.  cscmrp for ClientSendChatMessageResponseP)
    that's not part of the protobuf.

    Args:
        message: protocol buffer message instance to decode into.
        pblite: list representing a pblite-serialized message.
        ignore_first_item: If True, ignore the item at index 0 in the pblite
            list, making the item at index 1 correspond to field 1 in the
            message.

Decode pblite to Protocol Buffer message .


def Func ( arg_0 , arg_1 , arg_2 ) : try : arg_0 . _subscribers [ arg_1 ] . remove ( arg_0 . _Subscription ( arg_1 , arg_2 ) ) except KeyError : return False return True

def Func(arg_0, arg_1, arg_2):
        """ Unsubscribe the specific callback to the event.

        Args
            event (String): The event to Func
            callback (callable): The callback that won't be executed anymore

        Returns
            True: if we have successfully Funcd to the event
            False: if there's no callback previously registered
        """

        try:
            arg_0._subscribers[arg_1].remove(arg_0._Subscription(arg_1, arg_2))
        except KeyError:
            return False

        return True

Unsubscribe the specific callback to the event.

        Args
            event (String): The event to unsubscribe
            callback (callable): The callback that won't be executed anymore

        Returns
            True: if we have successfully unsubscribed to the event
            False: if there's no callback previously registered

Unsubscribe the specific callback to the event .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
=
True
)
:
if
arg_0
.
tier_type
!=
'IntervalTier'
:
raise
Exception
(
'Tiertype must be IntervalTier'
)
if
arg_4
:
if
any
(
arg_5
for
arg_5
in
arg_0
.
intervals
if
arg_1
<
arg_5
[
1
]
and
arg_2
>
arg_5
[
0
]
)
:
raise
Exception
(
'No overlap is allowed'
)
if
arg_1
>
arg_2
:
raise
Exception
(
'Begin must be smaller then end'
)
arg_0
.
intervals
.
append
(
(
arg_1
,
arg_2
,
arg_3
)
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4=True):
        """Add an interval to the IntervalTier.

        :param float begin: Start time of the interval.
        :param float end: End time of the interval.
        :param str value: Text of the interval.
        :param bool check: Flag to check for overlap.
        :raises Exception: If overlap, begin > end or wrong tiertype.
        """
        if arg_0.tier_type != 'IntervalTier':
            raise Exception('Tiertype must be IntervalTier')
        if arg_4:
            if any(arg_5 for arg_5 in arg_0.intervals if arg_1 < arg_5[1] and arg_2 > arg_5[0]):
                raise Exception('No overlap is allowed')
            if arg_1 > arg_2:
                raise Exception('Begin must be smaller then end')
        arg_0.intervals.append((arg_1, arg_2, arg_3))


(singular, plural, range_text, min_val, max_val)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : if arg_3 is None and arg_4 is None : return None if arg_3 == arg_4 or arg_3 is None or arg_4 is None : return ungettext ( arg_0 , arg_1 , arg_3 or arg_4 ) . format ( arg_3 or arg_4 ) return arg_2 . format ( arg_3 , arg_4 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """
    Return grammatically correct, translated text based off of a minimum and maximum value.

    Example:
        min = 1, max = 1, singular = '{} hour required for this course', plural = '{} hours required for this course'
        output = '1 hour required for this course'

        min = 2, max = 2, singular = '{} hour required for this course', plural = '{} hours required for this course'
        output = '2 hours required for this course'

        min = 2, max = 4, range_text = '{}-{} hours required for this course'
        output = '2-4 hours required for this course'

        min = None, max = 2, plural = '{} hours required for this course'
        output = '2 hours required for this course'

    Expects ``range_text`` to already have a translation function called on it.

    Returns:
        ``None`` if both of the input values are ``None``.
        ``singular`` formatted if both are equal or one of the inputs, but not both, are ``None``, and the value is 1.
        ``plural`` formatted if both are equal or one of its inputs, but not both, are ``None``, and the value is > 1.
        ``range_text`` formatted if min != max and both are valid values.
    """
    if arg_3 is None and arg_4 is None:
        return None
    if arg_3 == arg_4 or arg_3 is None or arg_4 is None:
        # pylint: disable=translation-of-non-string
        return ungettext(arg_0, arg_1, arg_3 or arg_4).format(arg_3 or arg_4)
    return arg_2.format(arg_3, arg_4)

Return grammatically correct translated text based off of a minimum and maximum value .


(rlist , separator_size=2 , displaywidth=80)

return {'columns_numbers' : ncols,
            'optimal_separator_width':(displaywidth - sumlength)/(ncols-1) if (ncols -1) else 0,
            'rows_numbers' : nrow,
            'columns_width' : chk
           }

def Func(arg_0 , arg_1=2 , arg_2=80):
    """Calculate optimal info to columnize a list of string"""
    for arg_3 in range(1, len(arg_0)+1) :
        arg_4 = map(max,_chunks(arg_0, arg_3))
        arg_5 = sum(arg_4)
        arg_6 = len(arg_4)
        if arg_5+arg_1*(arg_6-1) <= arg_2 :
            break;
    return {'columns_numbers' : arg_6,
            'optimal_separator_width':(arg_2 - arg_5)/(arg_6-1) if (arg_6 -1) else 0,
            'rows_numbers' : arg_3,
            'columns_width' : arg_4
           }


Combine finder_image_urls and extender_image_urls,
        remove duplicate but keep order

def Func(arg_0):
        """
        Combine finder_Func and extender_Func,
        remove duplicate but keep order
        """

        arg_1 = arg_0.finder_Func[:]
        for arg_2 in arg_0.extender_Func:
            if arg_2 not in arg_1:
                arg_1.append(arg_2)

        return arg_1

Combine finder_image_urls and extender_image_urls remove duplicate but keep order


def Func ( arg_0 ) : arg_1 = [ ] for arg_2 in arg_0 : if isinstance ( arg_2 , Assignment ) : try : if not isinstance ( arg_2 . src , RtlSignalBase ) : raise DoesNotContainsTernary ( ) arg_3 = arg_2 . src . singleDriver ( ) if not isinstance ( arg_3 , Operator ) or arg_3 . operator != AllOps . TERNARY : raise DoesNotContainsTernary ( ) else : arg_4 = arg_3 . operands arg_5 = IfContainer ( arg_4 [ 0 ] , [ Assignment ( arg_4 [ 1 ] , arg_2 . dst ) ] , [ Assignment ( arg_4 [ 2 ] , arg_2 . dst ) ] ) arg_1 . append ( arg_5 ) continue except ( MultipleDriversErr , DoesNotContainsTernary ) : pass except NoDriverErr : assert ( hasattr ( arg_2 . src , "_interface" ) and arg_2 . src . _interface is not None ) or arg_2 . src . defVal . vldMask , arg_2 . src arg_1 . append ( arg_2 ) return arg_1

def Func(arg_0):
    """Convert all ternary operators to IfContainers"""
    arg_1 = []

    for arg_2 in arg_0:
        if isinstance(arg_2, Assignment):
            try:
                if not isinstance(arg_2.src, RtlSignalBase):
                    raise DoesNotContainsTernary()
                arg_3 = arg_2.src.singleDriver()
                if not isinstance(arg_3, Operator) or arg_3.operator != AllOps.TERNARY:
                    raise DoesNotContainsTernary()
                else:
                    arg_4 = arg_3.operands
                    arg_5 = IfContainer(arg_4[0],
                                      [Assignment(arg_4[1], arg_2.dst)],
                                      [Assignment(arg_4[2], arg_2.dst)]
                                      )
                    arg_1.append(arg_5)
                    continue

            except (MultipleDriversErr, DoesNotContainsTernary):
                pass
            except NoDriverErr:
                assert (hasattr(arg_2.src, "_interface")
                        and arg_2.src._interface is not None)\
                    or arg_2.src.defVal.vldMask, arg_2.src

        arg_1.append(arg_2)
    return arg_1


return os.path.join(cache_dir, "wheels", *parts)

def Func ( arg_0 , arg_1 ) : arg_2 = [ arg_1 . url_without_fragment ] if arg_1 . hash_name is not None and arg_1 . hash is not None : arg_2 . append ( "=" . join ( [ arg_1 . hash_name , arg_1 . hash ] ) ) arg_3 = "#" . join ( arg_2 ) arg_4 = hashlib . sha224 ( arg_3 . encode ( ) ) . hexdigest ( ) arg_5 = [ arg_4 [ : 2 ] , arg_4 [ 2 : 4 ] , arg_4 [ 4 : 6 ] , arg_4 [ 6 : ] ] return os . path . join ( arg_0 , "wheels" , * arg_5 )

def Func(arg_0, arg_1):
    """
    Return a directory to store cached wheels in for link.

    Because there are M wheels for any one sdist, we provide a directory
    to cache them in, and then consult that directory when looking up
    cache hits.

    We only insert things into the cache if they have plausible version
    numbers, so that we don't contaminate the cache with things that were not
    unique. E.g. ./package might have dozens of installs done for it and build
    a version of 0.0...and if we built and cached a wheel, we'd end up using
    the same wheel even if the source has been edited.

    :param cache_dir: The cache_dir being used by pip.
    :param link: The link of the sdist for which this will cache wheels.
    """

    # We want to generate an url to use as our cache key, we don't want to just
    # re-use the URL because it might have other items in the fragment and we
    # don't care about those.
    arg_2 = [arg_1.url_without_fragment]
    if arg_1.hash_name is not None and arg_1.hash is not None:
        arg_2.append("=".join([arg_1.hash_name, arg_1.hash]))
    arg_3 = "#".join(arg_2)

    # Encode our key url with sha224, we'll use this because it has similar
    # security properties to sha256, but with a shorter total output (and thus
    # less secure). However the differences don't make a lot of difference for
    # our use case here.
    arg_4 = hashlib.sha224(arg_3.encode()).hexdigest()

    # We want to nest the directories some to prevent having a ton of top level
    # directories where we might run out of sub directories on some FS.
    arg_5 = [arg_4[:2], arg_4[2:4], arg_4[4:6], arg_4[6:]]

    # Inside of the base location for cached wheels, expand our parts and join
    # them all together.
    return os.path.join(arg_0, "wheels", *arg_5)

Return a directory to store cached wheels in for link .


(embeddings, reverse_dictionary, plot_only=500, second=5, saveable=False, name='tsne', fig_idx=9862)

def Func(arg_0, arg_1, arg_2=500, arg_3=5, arg_4=False, arg_5='tsne', arg_6=9862):
    """Visualize the embeddings by using t-SNE.

    Parameters
    ----------
    embeddings : numpy.array
        The embedding matrix.
    reverse_dictionary : dictionary
        id_to_word, mapping id to unique word.
    plot_only : int
        The number of examples to plot, choice the most common words.
    second : int
        The display second(s) for the image(s), if saveable is False.
    saveable : boolean
        Save or plot the figure.
    name : str
        A name to save the image, if saveable is True.
    fig_idx : int
        matplotlib figure index.

    Examples
    --------
    >>> see 'tutorial_word2vec_basic.py'
    >>> final_embeddings = normalized_embeddings.eval()
    >>> tl.visualize.Func(final_embeddings, labels, reverse_dictionary,
    ...                   plot_only=500, second=5, saveable=False, name='tsne')

    """
    import matplotlib.pyplot as plt

    def plot_with_labels(arg_7, arg_8, arg_9=(18, 18), arg_3=5, arg_4=True, arg_5='tsne', arg_6=9862):

        if arg_7.shape[0] < len(arg_8):
            raise AssertionError("More labels than embeddings")

        if arg_4 is False:
            plt.ion()
            plt.figure(arg_6)

        plt.figure(arg_9=arg_9)  # in inches

        for arg_10, arg_11 in enumerate(arg_8):
            arg_12, arg_13 = arg_7[arg_10, :]
            plt.scatter(arg_12, arg_13)
            plt.annotate(arg_11, xy=(arg_12, arg_13), xytext=(5, 2), textcoords='offset points', ha='right', va='bottom')

        if arg_4:
            plt.savefig(arg_5 + '.pdf', format='pdf')
        else:
            plt.draw()
            plt.pause(arg_3)

    try:
        from sklearn.manifold import TSNE
        from six.moves import xrange

        arg_14 = TSNE(perplexity=30, n_components=2, init='pca', n_iter=5000)
        # plot_only = 500
        arg_7 = arg_14.fit_transform(arg_0[:arg_2, :])
        arg_8 = [arg_1[arg_10] for arg_10 in xrange(arg_2)]
        plot_with_labels(arg_7, arg_8, arg_3=arg_3, arg_4=arg_4, arg_5=arg_5, arg_6=arg_6)

    except ImportError:
        arg_15 = "Please install sklearn and matplotlib to visualize embeddings."
        tl.logging.error(arg_15)
        raise ImportError(arg_15)

Visualize the embeddings by using t-SNE.

    Parameters
    ----------
    embeddings : numpy.array
        The embedding matrix.
    reverse_dictionary : dictionary
        id_to_word, mapping id to unique word.
    plot_only : int
        The number of examples to plot, choice the most common words.
    second : int
        The display second(s) for the image(s), if saveable is False.
    saveable : boolean
        Save or plot the figure.
    name : str
        A name to save the image, if saveable is True.
    fig_idx : int
        matplotlib figure index.

    Examples
    --------
    >>> see 'tutorial_word2vec_basic.py'
    >>> final_embeddings = normalized_embeddings.eval()
    >>> tl.visualize.tsne_embedding(final_embeddings, labels, reverse_dictionary,
    ...                   plot_only=500, second=5, saveable=False, name='tsne')

Visualize the embeddings by using t - SNE .


def Func(arg_0):
        """ Yield CPU.
            This will choose another process from the running list and change
            current running process. May give the same cpu if only one running
            process.
        """
        if len(arg_0.procs) > 1:
            logger.debug("SCHED:")
            logger.debug(f"\tProcess: {self.procs!r}")
            logger.debug(f"\tRunning: {self.running!r}")
            logger.debug(f"\tRWait: {self.rwait!r}")
            logger.debug(f"\tTWait: {self.twait!r}")
            logger.debug(f"\tTimers: {self.timers!r}")
            logger.debug(f"\tCurrent clock: {self.clocks}")
            logger.debug(f"\tCurrent cpu: {self._current}")

        if len(arg_0.running) == 0:
            logger.debug("None running checking if there is some process waiting for a timeout")
            if all([arg_1 is None for arg_1 in arg_0.timers]):
                raise Deadlock()
            arg_0.clocks = min(arg_1 for arg_1 in arg_0.timers if arg_1 is not None) + 1
            arg_0.check_timers()
            assert len(arg_0.running) != 0, "DEADLOCK!"
            arg_0._current = arg_0.running[0]
            return
        arg_4 = (arg_0.running.index(arg_0._current) + 1) % len(arg_0.running)
        arg_5 = arg_0.running[arg_4]
        if len(arg_0.procs) > 1:
            logger.debug(f"\tTransfer control from process {self._current} to {next_running_idx}")
        arg_0._current = arg_5

Yield CPU . This will choose another process from the running list and change current running process . May give the same cpu if only one running process .


def Func ( arg_0 , arg_1 ) : arg_2 = pprint . pformat ( arg_1 ) open ( arg_0 , "w" ) . write ( arg_2 )

def Func(arg_0, arg_1):
    "Save the resource to the source file"
    arg_2 = pprint.pformat(arg_1)
    ## s = s.encode("utf8")
    open(arg_0, "w").write(arg_2)


(iloc, pnames, snppad, edg, aseqs, asnps, smask, samplecov, locuscov, start)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
,
arg_6
,
arg_7
,
arg_8
,
arg_9
)
:
arg_10
=
arg_4
[
arg_0
,
:
,
arg_3
[
0
]
:
arg_3
[
1
]
+
1
]
arg_11
=
arg_5
[
arg_0
,
arg_3
[
0
]
:
arg_3
[
1
]
+
1
,
]
arg_12
=
np
.
all
(
arg_10
==
"N"
,
axis
=
1
)
arg_13
=
arg_12
+
arg_6
arg_7
=
arg_7
+
np
.
invert
(
arg_13
)
.
astype
(
np
.
int32
)
arg_14
=
np
.
sum
(
np
.
invert
(
arg_13
)
.
astype
(
np
.
int32
)
)
arg_8
[
arg_14
]
+=
1
arg_10
=
arg_10
[
~
arg_13
,
]
arg_15
=
arg_1
[
~
arg_13
]
arg_16
=
"\n"
.
join
(
[
name
+
s
.
tostring
(
)
for
name
,
s
in
zip
(
arg_15
,
arg_10
)
]
)
arg_17
=
[
"-"
if
arg_11
[
i
,
0
]
else
"*"
if
arg_11
[
i
,
1
]
else
" "
for
i
in
range
(
len
(
arg_11
)
)
]
arg_16
+=
"\n"
+
arg_2
+
""
.
join
(
arg_17
)
+
"|{}|"
.
format
(
arg_0
+
arg_9
)
return
arg_16
,
arg_7
,
arg_8

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, arg_7, arg_8, arg_9):
    """ enter funcs for SE or merged data """

    ## grab all seqs between edges
    arg_10 = arg_4[arg_0, :, arg_3[0]:arg_3[1]+1]
    ## snps was created using only the selected samples, and is edge masked.
    ## The mask is for counting snps quickly, but trimming is still needed here
    ## to make the snps line up with the seqs in the snp string.
    arg_11 = arg_5[arg_0, arg_3[0]:arg_3[1]+1, ]

    ## remove rows with all Ns, seq has only selected samples
    arg_12 = np.all(arg_10 == "N", axis=1)

    ## make mask of removed rows and excluded samples. Use the inverse
    ## of this to save the coverage for samples
    arg_13 = arg_12 + arg_6
    arg_7 = arg_7 + np.invert(arg_13).astype(np.int32)
    arg_14 = np.sum(np.invert(arg_13).astype(np.int32))
    arg_8[arg_14] += 1

    ## select the remaining names in order
    arg_10 = arg_10[~arg_13, ]
    arg_15 = arg_1[~arg_13]

    ## save string for printing, excluding names not in samples
    arg_16 = "\n".join(\
        [name + s.tostring() for name, s in zip(arg_15, arg_10)])

    ## get snp string and add to store
    arg_17 = ["-" if arg_11[i, 0] else \
                 "*" if arg_11[i, 1] else \
                 " " for i in range(len(arg_11))]
    arg_16 += "\n" + arg_2 + "".join(arg_17) + "|{}|".format(arg_0+arg_9)
    #LOGGER.info("outstr %s", outstr)
    return arg_16, arg_7, arg_8


def Func(arg_0, arg_1):
        """adds elements with id's not already in the model"""
        arg_2 = arg_0._dict
        arg_3 = arg_0.append
        for arg_4 in arg_1:
            if arg_4.id not in arg_2:
                arg_3(arg_4)

adds elements with id s not already in the model


def Func(arg_0, arg_1):
        """
        Create a new MailChimp campaign.

        The ValueError raised by an invalid type in data does not mention
        'absplit' as a potential value because the documentation indicates
        that the absplit type has been deprecated.

        :param data: The request body parameters
        :type data: :py:class:`dict`
        data = {
            "recipients": object*
            {
                "list_id": string*
            },
            "settings": object*
            {
                "subject_line": string*,
                "from_name": string*,
                "reply_to": string*
            },
            "variate_settings": object* (Required if type is "variate")
            {
                "winner_criteria": string* (Must be one of "opens", "clicks", "total_revenue", or "manual")
            },
            "rss_opts": object* (Required if type is "rss")
            {
                "feed_url": string*,
                "frequency": string* (Must be one of "daily", "weekly", or "monthly")
            },
            "type": string* (Must be one of "regular", "plaintext", "rss", "variate", or "absplit")
        }
        """
        if 'recipients' not in arg_1:
            raise KeyError('The campaign must have recipients')
        if 'list_id' not in arg_1['recipients']:
            raise KeyError('The campaign recipients must have a list_id')
        if 'settings' not in arg_1:
            raise KeyError('The campaign must have settings')
        if 'subject_line' not in arg_1['settings']:
            raise KeyError('The campaign settings must have a subject_line')
        if 'from_name' not in arg_1['settings']:
            raise KeyError('The campaign settings must have a from_name')
        if 'reply_to' not in arg_1['settings']:
            raise KeyError('The campaign settings must have a reply_to')
        check_email(arg_1['settings']['reply_to'])
        if 'type' not in arg_1:
            raise KeyError('The campaign must have a type')
        if not arg_1['type'] in ['regular', 'plaintext', 'rss', 'variate', 'abspilt']:
            raise ValueError('The campaign type must be one of "regular", "plaintext", "rss", or "variate"')
        if arg_1['type'] == 'variate':
            if 'variate_settings' not in arg_1:
                raise KeyError('The variate campaign must have variate_settings')
            if 'winner_criteria' not in arg_1['variate_settings']:
                raise KeyError('The campaign variate_settings must have a winner_criteria')
            if arg_1['variate_settings']['winner_criteria'] not in ['opens', 'clicks', 'total_revenue', 'manual']:
                raise ValueError('The campaign variate_settings '
                                 'winner_criteria must be one of "opens", "clicks", "total_revenue", or "manual"')
        if arg_1['type'] == 'rss':
            if 'rss_opts' not in arg_1:
                raise KeyError('The rss campaign must have rss_opts')
            if 'feed_url' not in arg_1['rss_opts']:
                raise KeyError('The campaign rss_opts must have a feed_url')
            if not arg_1['rss_opts']['frequency'] in ['daily', 'weekly', 'monthly']:
                raise ValueError('The rss_opts frequency must be one of "daily", "weekly", or "monthly"')
        arg_2 = arg_0._mc_client._post(url=arg_0._build_path(), arg_1=arg_1)
        if arg_2 is not None:
            arg_0.campaign_id = arg_2['id']
        else:
            arg_0.campaign_id = None
        return arg_2


Try to load cookies from all supported browsers and return combined cookiejar
    Optionally pass in a domain name to only load cookies from the specified domain

def Func ( arg_0 = "" ) : arg_1 = http . cookiejar . CookieJar ( ) for arg_2 in [ chrome , firefox ] : try : for arg_3 in arg_2 ( arg_0 = arg_0 ) : arg_1 . set_cookie ( arg_3 ) except BrowserCookieError : pass return arg_1

def Func(arg_0=""):
    """Try to Func cookies from all supported browsers and return combined cookiejar
    Optionally pass in a domain name to only Func cookies from the specified domain
    """
    arg_1 = http.cookiejar.CookieJar()
    for arg_2 in [chrome, firefox]:
        try:
            for arg_3 in arg_2(arg_0=arg_0):
                arg_1.set_cookie(arg_3)
        except BrowserCookieError:
            pass
    return arg_1


return pd.concat([record.series for record in collection], axis=1).T

def Func ( arg_0 ) : return pd . concat ( [ arg_1 . series for arg_1 in arg_0 ] , axis = 1 ) . T

def Func(arg_0):
    '''
    Converts a collection back into a pandas DataFrame

    parameters
    ----------
    collection : list
        list of Record objects where each Record represents one row from a dataframe

    Returns
    -------
    df : pandas.DataFrame
        DataFrame of length=len(collection) where each row represents one Record

    '''

    return pd.concat([arg_1.series for arg_1 in arg_0], axis=1).T


def Func(arg_0, arg_1=-80.0):     # pylint: disable=invalid-name
    '''Compute the A-weighting of a set of frequencies.

    Parameters
    ----------
    frequencies : scalar or np.ndarray [shape=(n,)]
        One or more frequencies (in Hz)

    min_db : float [scalar] or None
        Clip weights below this threshold.
        If `None`, no clipping is performed.

    Returns
    -------
    Func : scalar or np.ndarray [shape=(n,)]
        `Func[i]` is the A-weighting of `frequencies[i]`

    See Also
    --------
    perceptual_weighting

    Examples
    --------

    Get the A-weighting for CQT frequencies

    >>> import matplotlib.pyplot as plt
    >>> freqs = librosa.cqt_frequencies(108, librosa.note_to_hz('C1'))
    >>> aw = librosa.Func(freqs)
    >>> plt.plot(freqs, aw)
    >>> plt.xlabel('Frequency (Hz)')
    >>> plt.ylabel('Weighting (log10)')
    >>> plt.title('A-Weighting of CQT frequencies')

    '''

    # Vectorize to make our lives easier
    arg_0 = np.asanyarray(arg_0)

    # Pre-compute squared frequency
    arg_2 = arg_0**2.0

    arg_3 = np.array([12200, 20.6, 107.7, 737.9])**2.0

    arg_4 = 2.0 + 20.0 * (np.log10(arg_3[0]) + 4 * np.log10(arg_0)
                            - np.log10(arg_2 + arg_3[0])
                            - np.log10(arg_2 + arg_3[1])
                            - 0.5 * np.log10(arg_2 + arg_3[2])
                            - 0.5 * np.log10(arg_2 + arg_3[3]))

    if arg_1 is not None:
        arg_4 = np.maximum(arg_1, arg_4)

    return arg_4

Compute the A-weighting of a set of frequencies.

    Parameters
    ----------
    frequencies : scalar or np.ndarray [shape=(n,)]
        One or more frequencies (in Hz)

    min_db : float [scalar] or None
        Clip weights below this threshold.
        If `None`, no clipping is performed.

    Returns
    -------
    A_weighting : scalar or np.ndarray [shape=(n,)]
        `A_weighting[i]` is the A-weighting of `frequencies[i]`

    See Also
    --------
    perceptual_weighting

    Examples
    --------

    Get the A-weighting for CQT frequencies

    >>> import matplotlib.pyplot as plt
    >>> freqs = librosa.cqt_frequencies(108, librosa.note_to_hz('C1'))
    >>> aw = librosa.A_weighting(freqs)
    >>> plt.plot(freqs, aw)
    >>> plt.xlabel('Frequency (Hz)')
    >>> plt.ylabel('Weighting (log10)')
    >>> plt.title('A-Weighting of CQT frequencies')

Compute the A - weighting of a set of frequencies .


def Func ( arg_0 , arg_1 = 8 , arg_2 = 0 ) : for arg_3 in range ( arg_0 . shape [ arg_2 ] ) : if arg_2 == 1 : arg_0 [ : , arg_3 ] = filters . Func ( arg_0 [ : , arg_3 ] , sigma = arg_1 / 2. ) elif arg_2 == 0 : arg_0 [ arg_3 , : ] = filters . Func ( arg_0 [ arg_3 , : ] , sigma = arg_1 / 2. ) return arg_0

def Func(arg_0, arg_1=8, arg_2=0):
    """Gaussian filter along the first axis of the feature matrix X."""
    for arg_3 in range(arg_0.shape[arg_2]):
        if arg_2 == 1:
            arg_0[:, arg_3] = filters.Func(arg_0[:, arg_3], sigma=arg_1 / 2.)
        elif arg_2 == 0:
            arg_0[arg_3, :] = filters.Func(arg_0[arg_3, :], sigma=arg_1 / 2.)
    return arg_0

Gaussian filter along the first axis of the feature matrix X .