def Func(arg_0, arg_1='boto', arg_2=None):
    """
    Parses a config file for s3 credentials. Can currently
    parse boto, s3cmd.conf and AWS SDK config formats

    :param config_file_name: path to the config file
    :type config_file_name: str
    :param config_format: config type. One of "boto", "s3cmd" or "aws".
        Defaults to "boto"
    :type config_format: str
    :param profile: profile name in AWS type config file
    :type profile: str
    """
    arg_3 = configparser.ConfigParser()
    if arg_3.read(arg_0):  # pragma: no cover
        arg_4 = arg_3.sections()
    else:
        raise AirflowException("Couldn't read {0}".format(arg_0))
    # Setting option names depending on file format
    if arg_1 is None:
        arg_1 = 'boto'
    arg_5 = arg_1.lower()
    if arg_5 == 'boto':  # pragma: no cover
        if arg_2 is not None and 'profile ' + arg_2 in arg_4:
            arg_6 = 'profile ' + arg_2
        else:
            arg_6 = 'Credentials'
    elif arg_5 == 'aws' and arg_2 is not None:
        arg_6 = arg_2
    else:
        arg_6 = 'default'
    # Option names
    if arg_5 in ('boto', 'aws'):  # pragma: no cover
        arg_7 = 'aws_access_key_id'
        arg_8 = 'aws_secret_access_key'
        # security_token_option = 'aws_security_token'
    else:
        arg_7 = 'access_key'
        arg_8 = 'secret_key'
    # Actual Parsing
    if arg_6 not in arg_4:
        raise AirflowException("This config file format is not recognized")
    else:
        try:
            arg_9 = arg_3.get(arg_6, arg_7)
            arg_10 = arg_3.get(arg_6, arg_8)
        except Exception:
            logging.warning("Option Error in parsing s3 config file")
            raise
        return arg_9, arg_10

Parses a config file for s3 credentials . Can currently parse boto s3cmd . conf and AWS SDK config formats


def Func ( arg_0 , arg_1 = None ) : with tf . compat . v1 . name_scope ( arg_1 , 'find_best_interval_idx' , [ arg_0 ] ) : arg_2 = tf . shape ( input = arg_0 ) [ 0 ] arg_3 = arg_0 . dtype . base_dtype arg_4 = tf . range ( 2 * arg_2 , arg_2 , - 1 , arg_3 = arg_3 ) [ : , tf . newaxis ] arg_5 = tf . range ( arg_2 , arg_3 = arg_3 ) [ : , tf . newaxis ] arg_6 = tf . argmax ( input = arg_4 * arg_0 + arg_5 , axis = 0 , output_type = arg_3 ) return arg_6

def Func(arg_0, arg_1=None):
  """Finds the index of the optimal set of bounds for each chain.

  For each chain, finds the smallest set of bounds for which both edges lie
  outside the slice. This is equivalent to the point at which a for loop
  implementation (P715 of Neal (2003)) of the algorithm would terminate.

  Performs the following calculation, where i is the number of doublings that
  have been performed and k is the max number of doublings:

  (2 * k - i) * flag + i

  The argmax of the above returns the earliest index where the bounds were
  outside the slice and if there is no such point, the widest bounds.

  Args:
    x: A tensor of shape (max_doublings+1, batch_shape). Type int32, with value
      0 or 1. Indicates if this set of bounds is outside the slice.
    name: Python `str` name prefixed to Ops created by this function.
      Default value: `None` (i.e., 'find_slice_bounds').

  Returns:
    indices: A tensor of shape batch_shape. Type int32, with the index of the
      first set of bounds outside the slice and if there are none, the index of
      the widest set.
  """
  with tf.compat.v1.name_scope(arg_1, 'find_best_interval_idx', [arg_0]):
    # Returns max_doublings + 1. Positive int32.
    arg_2 = tf.shape(input=arg_0)[0]
    arg_3 = arg_0.dtype.base_dtype
    # Factors by which to multiply the flag. Corresponds to (2 * k - i) above.
    arg_4 = tf.range(2 * arg_2, arg_2, -1, arg_3=arg_3)[:, tf.newaxis]
    # Factors by which to shift the flag. Corresponds to i above. Ensures the
    # widest bounds are selected if there are no bounds outside the slice.
    arg_5 = tf.range(arg_2, arg_3=arg_3)[:, tf.newaxis]
    arg_6 = tf.argmax(input=arg_4 * arg_0 + arg_5, axis=0, output_type=arg_3)
    return arg_6

Finds the index of the optimal set of bounds for each chain .


def Func ( arg_0 , arg_1 : arg_2 = True ) : arg_0 . _metadata . Func ( arg_0 . engine , checkfirst = arg_1 ) arg_0 . _store_drop ( )

def Func(arg_0, arg_1: arg_2 = True):
        """Drop all tables from the database.

        :param bool check_first: Defaults to True, only issue DROPs for tables confirmed to be
          present in the target database. Defers to :meth:`sqlalchemy.sql.schema.MetaData.Func`
        """
        arg_0._metadata.Func(arg_0.engine, checkfirst=arg_1)
        arg_0._store_drop()

Drop all tables from the database.

        :param bool check_first: Defaults to True, only issue DROPs for tables confirmed to be
          present in the target database. Defers to :meth:`sqlalchemy.sql.schema.MetaData.drop_all`


Get info an stats about the the current index, including the number of documents, memory consumption, etc

def Func ( arg_0 ) : arg_1 = arg_0 . redis . execute_command ( 'FT.INFO' , arg_0 . index_name ) arg_2 = six . moves . map ( to_string , arg_1 ) return dict ( six . moves . zip ( arg_2 , arg_2 ) )

def Func(arg_0):
        """
        Get Func an stats about the the current index, including the number of documents, memory consumption, etc
        """

        arg_1 = arg_0.redis.execute_command('FT.INFO', arg_0.index_name)
        arg_2 = six.moves.map(to_string, arg_1)
        return dict(six.moves.zip(arg_2, arg_2))

Get info an stats about the the current index including the number of documents memory consumption etc


def Func(arg_0):
    '''return a transfer client for the user'''

    if arg_0._tokens_need_update():
        arg_0._update_tokens()

    arg_1 = arg_0.transfer['access_token']

    # Createe Refresh Token Authorizer

    arg_2 = globus_sdk.RefreshTokenAuthorizer(
                                 arg_0.transfer['refresh_token'],
                                 arg_0._client,
                                 arg_1=arg_0.transfer['access_token'],
                                 expires_at=arg_0.transfer['expires_at_seconds'])

    arg_0.transfer_client = globus_sdk.TransferClient(arg_2=arg_2)


(self,
                        algorithm,
                        length,
                        operation_policy_name=None,
                        public_name=None,
                        public_usage_mask=None,
                        private_name=None,
                        private_usage_mask=None)

def Func(arg_0,
                        arg_1,
                        arg_2,
                        arg_3=None,
                        arg_4=None,
                        arg_5=None,
                        arg_6=None,
                        arg_7=None):
        """
        Create an asymmetric key pair on a KMIP appliance.

        Args:
            algorithm (CryptographicAlgorithm): An enumeration defining the
                algorithm to use to generate the key pair.
            length (int): The length in bits for the key pair.
            operation_policy_name (string): The name of the operation policy
                to use for the new key pair. Optional, defaults to None.
            public_name (string): The name to give the public key. Optional,
                defaults to None.
            public_usage_mask (list): A list of CryptographicUsageMask
                enumerations indicating how the public key should be used.
                Optional, defaults to None.
            private_name (string): The name to give the public key. Optional,
                defaults to None.
            private_usage_mask (list): A list of CryptographicUsageMask
                enumerations indicating how the private key should be used.
                Optional, defaults to None.

        Returns:
            string: The uid of the newly created public key.
            string: The uid of the newly created private key.

        Raises:
            ClientConnectionNotOpen: if the client connection is unusable
            KmipOperationFailure: if the operation result is a failure
            TypeError: if the input arguments are invalid
        """
        # Check inputs
        if not isinstance(arg_1, enums.CryptographicAlgorithm):
            raise TypeError(
                "algorithm must be a CryptographicAlgorithm enumeration")
        elif not isinstance(arg_2, six.integer_types) or arg_2 <= 0:
            raise TypeError("length must be a positive integer")

        # Create the common attributes that are shared
        arg_8 = arg_0._build_common_attributes(
            arg_3
        )

        arg_9 = arg_0.attribute_factory.create_attribute(
            enums.AttributeType.CRYPTOGRAPHIC_ALGORITHM,
            arg_1
        )
        arg_10 = arg_0.attribute_factory.create_attribute(
            enums.AttributeType.CRYPTOGRAPHIC_LENGTH,
            arg_2
        )

        arg_8.extend([arg_9, arg_10])
        arg_11 = cobjects.TemplateAttribute(
            attributes=arg_8,
            tag=enums.Tags.COMMON_TEMPLATE_ATTRIBUTE
        )

        # Create public / private specific attributes
        arg_12 = None
        arg_13 = None
        if arg_4:
            arg_13 = arg_0._build_name_attribute(name=arg_4)
        arg_14 = []
        if arg_5:
            arg_14 = [
                arg_0.attribute_factory.create_attribute(
                    enums.AttributeType.CRYPTOGRAPHIC_USAGE_MASK,
                    arg_5
                )
            ]
        if arg_13 or arg_14:
            arg_12 = cobjects.TemplateAttribute(
                arg_13=arg_13,
                attributes=arg_14,
                tag=enums.Tags.PUBLIC_KEY_TEMPLATE_ATTRIBUTE
            )

        arg_15 = None
        arg_13 = None
        if arg_6:
            arg_13 = arg_0._build_name_attribute(name=arg_6)
        arg_14 = []
        if arg_7:
            arg_14 = [
                arg_0.attribute_factory.create_attribute(
                    enums.AttributeType.CRYPTOGRAPHIC_USAGE_MASK,
                    arg_7
                )
            ]
        if arg_13 or arg_14:
            arg_15 = cobjects.TemplateAttribute(
                arg_13=arg_13,
                attributes=arg_14,
                tag=enums.Tags.PRIVATE_KEY_TEMPLATE_ATTRIBUTE
            )

        # Create the asymmetric key pair and handle the results
        arg_16 = arg_0.proxy.Func(
            common_template_attribute=arg_11,
            private_key_template_attribute=arg_15,
            public_key_template_attribute=arg_12)

        arg_17 = arg_16.result_status.value
        if arg_17 == enums.ResultStatus.SUCCESS:
            arg_18 = arg_16.public_key_uuid
            arg_19 = arg_16.private_key_uuid
            return arg_18, arg_19
        else:
            arg_20 = arg_16.result_reason.value
            arg_21 = arg_16.result_message.value
            raise exceptions.KmipOperationFailure(arg_17, arg_20, arg_21)

Create an asymmetric key pair on a KMIP appliance .


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { } arg_4 = { } for arg_5 in arg_2 : try : arg_6 = float ( arg_5 [ "cpus" ] ) * 100 arg_7 = float ( arg_5 [ "%cpu" ] . replace ( "," , "." ) . replace ( "%" , "" ) ) if arg_6 * 0.9 > arg_7 > arg_6 * 1.10 : arg_3 [ arg_5 [ "tag" ] ] = { "expected" : arg_6 , "value" : arg_7 } except ( ValueError , KeyError ) : pass try : arg_8 = arg_0 . _size_coverter ( arg_5 [ "rss" ] ) arg_9 = arg_0 . _size_coverter ( arg_5 [ "memory" ] ) if arg_8 > arg_9 * 1.10 : arg_4 [ arg_5 [ "tag" ] ] = { "expected" : arg_9 , "value" : arg_8 } except ( ValueError , KeyError ) : pass return arg_3 , arg_4

def Func(arg_0, arg_1, arg_2):
        """Assess whether the cpu load or memory usage is above the allocation

        Parameters
        ----------
        process : str
            Process name
        vals : vals
            List of trace information for each tag of that process

        Returns
        -------
        cpu_warnings : dict
            Keys are tags and values are the excessive cpu load
        mem_warnings : dict
            Keys are tags and values are the excessive rss
        """

        arg_3 = {}
        arg_4 = {}

        for arg_5 in arg_2:
            try:
                arg_6 = float(arg_5["cpus"]) * 100
                arg_7 = float(arg_5["%cpu"].replace(",", ".").replace("%", ""))

                if arg_6 * 0.9 > arg_7 > arg_6 * 1.10:
                    arg_3[arg_5["tag"]] = {
                        "expected":  arg_6,
                        "value": arg_7
                    }
            except (ValueError, KeyError):
                pass

            try:
                arg_8 = arg_0._size_coverter(arg_5["rss"])
                arg_9 = arg_0._size_coverter(arg_5["memory"])

                if arg_8 > arg_9 * 1.10:
                    arg_4[arg_5["tag"]] = {
                        "expected": arg_9,
                        "value": arg_8
                    }
            except (ValueError, KeyError):
                pass

        return arg_3, arg_4


def Func(arg_0, arg_1):
        """
        Process all data with given function.
        The scheme of function should be x,y -> x,y.
        """
        if arg_0._train_set:
            arg_0._train_set = Func(arg_1, arg_0._train_set)
        if arg_0._valid_set:
            arg_0._valid_set = Func(arg_1, arg_0._valid_set)
        if arg_0._test_set:
            arg_0._test_set = Func(arg_1, arg_0._test_set)

Process all data with given function . The scheme of function should be x y - > x y .


def Func(arg_0, arg_1):
        """Validates a value as a proper Flow object.

        Args:
            value: A value to be set on the property.

        Raises:
            TypeError if the value is not an instance of Flow.
        """
        _LOGGER.info('validate: Got type %s', type(arg_1))
        if arg_1 is not None and not isinstance(arg_1, client.Flow):
            raise TypeError(
                'Property {0} must be convertible to a flow '
                'instance; received: {1}.'.format(arg_0._name, arg_1))

Validates a value as a proper Flow object .


def Func ( arg_0 , arg_1 , arg_2 , ** arg_3 ) : arg_4 = binascii . hexlify ( arg_2 . encode ( 'utf-8' ) ) . decode ( 'utf-8' ) arg_5 = arg_0 . _call ( JSONRPCMethods . GET_STORAGE . value , params = [ arg_1 , arg_4 , ] , ** arg_3 ) try : assert arg_5 arg_6 = bytearray ( binascii . unhexlify ( arg_5 . encode ( 'utf-8' ) ) ) except AssertionError : arg_6 = arg_5 return arg_6

def Func(arg_0, arg_1, arg_2, **arg_3):
        """ Returns the value stored in the storage of a contract script hash for a given key.

        :param script_hash: contract script hash
        :param key: key to look up in the storage
        :type script_hash: str
        :type key: str
        :return: value associated with the storage key
        :rtype: bytearray

        """
        arg_4 = binascii.hexlify(arg_2.encode('utf-8')).decode('utf-8')
        arg_5 = arg_0._call(
            JSONRPCMethods.GET_STORAGE.value, params=[arg_1, arg_4, ], **arg_3)
        try:
            assert arg_5
            arg_6 = bytearray(binascii.unhexlify(arg_5.encode('utf-8')))
        except AssertionError:
            arg_6 = arg_5
        return arg_6

Returns the value stored in the storage of a contract script hash for a given key .


def Func ( arg_0 , arg_1 ) : arg_2 = re . compile ( arg_1 , re . IGNORECASE | re . DOTALL ) for arg_3 in arg_0 . contacts . values ( ) : if arg_2 . search ( arg_3 . get_full_name ( ) ) is not None : yield arg_3

def Func(arg_0, arg_1):
        """Search in the name filed for contacts matching query.

        :param query: the query to search for
        :type query: str
        :yields: all found contacts
        :rtype: generator(carddav_object.CarddavObject)

        """
        arg_2 = re.compile(arg_1, re.IGNORECASE | re.DOTALL)
        for arg_3 in arg_0.contacts.values():
            # only search in contact name
            if arg_2.search(arg_3.get_full_name()) is not None:
                yield arg_3

Search in the name filed for contacts matching query .


def Func(arg_0):
    """Generate the time in seconds in which DHCPDISCOVER wil be retransmited.

    [:rfc:`2131#section-3.1`]::

        might retransmit the
        DHCPREQUEST message four times, for a total delay of 60 seconds

    [:rfc:`2131#section-4.1`]::

        For example, in a 10Mb/sec Ethernet
        internetwork, the delay before the first retransmission SHOULD be 4
        seconds randomized by the value of a uniform random number chosen
        from the range -1 to +1.  Clients with clocks that provide resolution
        granularity of less than one second may choose a non-integer
        randomization value.  The delay before the next retransmission SHOULD
        be 8 seconds randomized by the value of a uniform number chosen from
        the range -1 to +1.  The retransmission delay SHOULD be doubled with
        subsequent retransmissions up to a maximum of 64 seconds.

    """
    arg_1 = 2 ** (arg_0 + 1) + random.uniform(-1, +1)
    logger.debug('next timeout resending will happen on %s',
                 future_dt_str(nowutc(), arg_1))
    return arg_1

Generate the time in seconds in which DHCPDISCOVER wil be retransmited .


def Func(arg_0, arg_1, arg_2, arg_3):
    """Show all Func in the database"""
    LOG.info("Running scout view Func")
    arg_4 = arg_0.obj['adapter']

    if not arg_3:
        click.echo("Chromosome\tstart\tend\ttranscript_id\thgnc_id\trefseq\tis_primary")
    for arg_5 in arg_4.Func(arg_1=arg_1, arg_2=arg_2):
        if arg_3:
            pp(arg_5)
            continue
        click.echo("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}".format(
            arg_5['chrom'],
            arg_5['start'],
            arg_5['end'],
            arg_5['ensembl_transcript_id'],
            arg_5['hgnc_id'],
            arg_5.get('refseq_id', ''),
            arg_5.get('is_primary') or '',
        ))


def
Func
(
arg_0
)
:
print
(
' - Merging D and A timestamps'
,
flush
=
True
)
arg_1
,
arg_2
=
arg_0
.
S
.
get_timestamps_part
(
arg_0
.
name_timestamps_d
)
arg_3
,
arg_4
=
arg_0
.
S
.
get_timestamps_part
(
arg_0
.
name_timestamps_a
)
arg_5
,
arg_6
,
arg_7
=
Func
(
arg_1
,
arg_2
,
arg_3
,
arg_4
)
assert
arg_6
.
sum
(
)
==
arg_3
.
shape
[
0
]
assert
(
~
arg_6
)
.
sum
(
)
==
arg_1
.
shape
[
0
]
assert
arg_6
.
size
==
arg_3
.
shape
[
0
]
+
arg_1
.
shape
[
0
]
arg_0
.
ts
,
arg_0
.
a_ch
,
arg_0
.
part
=
arg_5
,
arg_6
,
arg_7
arg_0
.
clk_p
=
arg_1
.
attrs
[
'clk_p'
]

def Func(arg_0):
        """Merge donor and acceptor timestamps, computes `ts`, `a_ch`, `part`.
        """
        print(' - Merging D and A timestamps', flush=True)
        arg_1, arg_2 = arg_0.S.get_timestamps_part(arg_0.name_timestamps_d)
        arg_3, arg_4 = arg_0.S.get_timestamps_part(arg_0.name_timestamps_a)
        arg_5, arg_6, arg_7 = Func(arg_1, arg_2, arg_3, arg_4)
        assert arg_6.sum() == arg_3.shape[0]
        assert (~arg_6).sum() == arg_1.shape[0]
        assert arg_6.size == arg_3.shape[0] + arg_1.shape[0]
        arg_0.ts, arg_0.a_ch, arg_0.part = arg_5, arg_6, arg_7
        arg_0.clk_p = arg_1.attrs['clk_p']

Merge donor and acceptor timestamps computes ts a_ch part .


return self.get_object(
            dn=self.full_user_search_dn,
            filter=ldap_filter,
            attributes=self.config.get("LDAP_GET_USER_ATTRIBUTES"),
            _connection=_connection,
        )

def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = '(&({0}={1}){2})' . format ( arg_0 . config . get ( 'LDAP_USER_LOGIN_ATTR' ) , arg_1 , arg_0 . config . get ( 'LDAP_USER_OBJECT_FILTER' ) ) return arg_0 . get_object ( dn = arg_0 . full_user_search_dn , filter = arg_3 , attributes = arg_0 . config . get ( "LDAP_GET_USER_ATTRIBUTES" ) , arg_2 = arg_2 , )

def Func(arg_0, arg_1, arg_2=None):
        """
        Gets info about a user at a specified username by searching the
        Users DN. Username attribute is the same as specified as
        LDAP_USER_LOGIN_ATTR.

        Args:
            username (str): Username of the user to search for.
            _connection (ldap3.Connection): A connection object to use when
                searching. If not given, a temporary connection will be
                created, and destroyed after use.
        Returns:
            dict: A dictionary of the user info from LDAP
        """
        arg_3 = '(&({0}={1}){2})'.format(
            arg_0.config.get('LDAP_USER_LOGIN_ATTR'),
            arg_1,
            arg_0.config.get('LDAP_USER_OBJECT_FILTER')
        )

        return arg_0.get_object(
            dn=arg_0.full_user_search_dn,
            filter=arg_3,
            attributes=arg_0.config.get("LDAP_GET_USER_ATTRIBUTES"),
            arg_2=arg_2,
        )

Gets info about a user at a specified username by searching the Users DN . Username attribute is the same as specified as LDAP_USER_LOGIN_ATTR .


async
def
Func
(
arg_0
,
*
arg_1
,
**
arg_2
)
:
logger
.
debug
(
'Fired {}'
.
format
(
arg_0
)
)
for
arg_3
in
arg_0
.
_observers
:
arg_4
=
arg_3
(
*
arg_1
,
**
arg_2
)
if
asyncio
.
iscoroutinefunction
(
arg_3
)
:
await
arg_4

async def Func(arg_0, *arg_1, **arg_2):
        """Fire this event, calling all observers with the same arguments."""
        logger.debug('Fired {}'.format(arg_0))
        for arg_3 in arg_0._observers:
            arg_4 = arg_3(*arg_1, **arg_2)
            if asyncio.iscoroutinefunction(arg_3):
                await arg_4

Fire this event calling all observers with the same arguments .


(self, topic_name, subscription_name, rule_name)

def Func(arg_0, arg_1, arg_2, arg_3):
        '''
        Retrieves the description for the specified rule.

        topic_name:
            Name of the topic.
        subscription_name:
            Name of the subscription.
        rule_name:
            Name of the rule.
        '''
        _validate_not_none('topic_name', arg_1)
        _validate_not_none('subscription_name', arg_2)
        _validate_not_none('rule_name', arg_3)
        arg_4 = HTTPRequest()
        arg_4.method = 'GET'
        arg_4.host = arg_0._get_host()
        arg_4.path = '/' + _str(arg_1) + '/subscriptions/' + \
            _str(arg_2) + \
            '/rules/' + _str(arg_3) + ''
        arg_4.path, arg_4.query = arg_0._httpclient._update_request_uri_query(arg_4)  # pylint: disable=protected-access
        arg_4.headers = arg_0._update_service_bus_header(arg_4)
        arg_10 = arg_0._perform_request(arg_4)

        return _convert_response_to_rule(arg_10)

Retrieves the description for the specified rule .


(fmt, headers, rows, colwidths, colaligns)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 ) : arg_5 = [ ] arg_6 = arg_0 . with_header_hide if arg_1 else arg_0 . without_header_hide arg_7 = arg_0 . padding arg_8 = arg_0 . headerrow if arg_0 . headerrow else arg_0 . datarow if arg_0 . lineabove and "lineabove" not in arg_6 : arg_5 . append ( _build_line ( arg_3 , arg_7 , * arg_0 . lineabove ) ) if arg_1 : arg_5 . append ( _build_row ( arg_1 , arg_7 , * arg_8 ) ) if arg_0 . linebelowheader and "linebelowheader" not in arg_6 : arg_9 , arg_10 , arg_11 , arg_12 = arg_0 . linebelowheader if arg_0 . usecolons : arg_13 = [ _line_segment_with_colons ( arg_0 . linebelowheader , a , w + 2 * arg_7 ) for w , a in zip ( arg_3 , arg_4 ) ] arg_5 . append ( _build_row ( arg_13 , 0 , arg_9 , arg_11 , arg_12 ) ) else : arg_5 . append ( _build_line ( arg_3 , arg_7 , * arg_0 . linebelowheader ) ) if arg_2 and arg_0 . linebetweenrows and "linebetweenrows" not in arg_6 : for arg_14 in arg_2 [ : - 1 ] : arg_5 . append ( _build_row ( arg_14 , arg_7 , * arg_0 . datarow ) ) arg_5 . append ( _build_line ( arg_3 , arg_7 , * arg_0 . linebetweenrows ) ) arg_5 . append ( _build_row ( arg_2 [ - 1 ] , arg_7 , * arg_0 . datarow ) ) else : for arg_14 in arg_2 : arg_5 . append ( _build_row ( arg_14 , arg_7 , * arg_0 . datarow ) ) if arg_0 . linebelow and "linebelow" not in arg_6 : arg_5 . append ( _build_line ( arg_3 , arg_7 , * arg_0 . linebelow ) ) return "\n" . join ( arg_5 )

def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """Produce a plain-text representation of the table."""
    arg_5 = []
    arg_6 = arg_0.with_header_hide if arg_1 else arg_0.without_header_hide
    arg_7 = arg_0.padding
    arg_8 = arg_0.headerrow if arg_0.headerrow else arg_0.datarow

    if arg_0.lineabove and "lineabove" not in arg_6:
        arg_5.append(_build_line(arg_3, arg_7, *arg_0.lineabove))

    if arg_1:
        arg_5.append(_build_row(arg_1, arg_7, *arg_8))

    if arg_0.linebelowheader and "linebelowheader" not in arg_6:
        arg_9, arg_10, arg_11, arg_12 = arg_0.linebelowheader
        if arg_0.usecolons:
            arg_13 = [
                _line_segment_with_colons(arg_0.linebelowheader, a, w + 2 * arg_7)
                for w, a in zip(arg_3, arg_4)]
            arg_5.append(_build_row(arg_13, 0, arg_9, arg_11, arg_12))
        else:
            arg_5.append(_build_line(arg_3, arg_7, *arg_0.linebelowheader))

    if arg_2 and arg_0.linebetweenrows and "linebetweenrows" not in arg_6:
        # initial rows with a line below
        for arg_14 in arg_2[:-1]:
            arg_5.append(_build_row(arg_14, arg_7, *arg_0.datarow))
            arg_5.append(_build_line(arg_3, arg_7, *arg_0.linebetweenrows))
        # the last row without a line below
        arg_5.append(_build_row(arg_2[-1], arg_7, *arg_0.datarow))
    else:
        for arg_14 in arg_2:
            arg_5.append(_build_row(arg_14, arg_7, *arg_0.datarow))

    if arg_0.linebelow and "linebelow" not in arg_6:
        arg_5.append(_build_line(arg_3, arg_7, *arg_0.linebelow))

    return "\n".join(arg_5)

Produce a plain - text representation of the table .


(self, name, expression_or_value, write=True)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = True ) : arg_0 . variables [ arg_1 ] = arg_2

def Func(arg_0, arg_1, arg_2, arg_3=True):
        """Set the variable to an expression or value defined by expression_or_value.

        Example

        >>> df.Func("a", 2.)
        >>> df.Func("b", "a**2")
        >>> df.get_variable("b")
        'a**2'
        >>> df.evaluate_variable("b")
        4.0

        :param name: Name of the variable
        :param write: write variable to meta file
        :param expression: value or expression
        """
        arg_0.variables[arg_1] = arg_2

Set the variable to an expression or value defined by expression_or_value.

        Example

        >>> df.set_variable("a", 2.)
        >>> df.set_variable("b", "a**2")
        >>> df.get_variable("b")
        'a**2'
        >>> df.evaluate_variable("b")
        4.0

        :param name: Name of the variable
        :param write: write variable to meta file
        :param expression: value or expression

Set the variable to an expression or value defined by expression_or_value .


return format(bip38.decrypt(wif, self.masterkey), "wif")

def Func ( arg_0 , arg_1 ) : if not arg_0 . unlocked ( ) : raise WalletLocked return format ( bip38 . Func ( arg_1 , arg_0 . masterkey ) , "wif" )

def Func(arg_0, arg_1):
        """ Decrypt the content according to BIP38

            :param str wif: Encrypted key
        """
        if not arg_0.unlocked():
            raise WalletLocked
        return format(bip38.Func(arg_1, arg_0.masterkey), "wif")


return response, max_response_size, header.protocol_version

def Func(arg_0, arg_1, arg_2=None):
        """
        Process a KMIP request message.

        This routine is the main driver of the KmipEngine. It breaks apart and
        processes the request header, handles any message errors that may
        result, and then passes the set of request batch items on for
        processing. This routine is thread-safe, allowing multiple client
        connections to use the same KmipEngine.

        Args:
            request (RequestMessage): The request message containing the batch
                items to be processed.
            credential (string): Identifying information about the client
                obtained from the client certificate. Optional, defaults to
                None.

        Returns:
            ResponseMessage: The response containing all of the results from
                the request batch items.
        """
        arg_0._client_identity = [None, None]
        arg_4 = arg_1.request_header

        # Process the protocol version
        arg_0._set_protocol_version(arg_4.protocol_version)

        # Process the maximum response size
        arg_5 = None
        if arg_4.maximum_response_size:
            arg_5 = arg_4.maximum_response_size.value

        # Process the time stamp
        arg_6 = int(time.time())
        if arg_4.time_stamp:
            arg_7 = arg_4.time_stamp.value

            if (arg_6 >= arg_7) and ((arg_6 - arg_7) < 60):
                arg_0._logger.info("Received request at time: {0}".format(
                    time.strftime(
                        "%Y-%m-%d %H:%M:%S",
                        time.gmtime(arg_7)
                    )
                ))
            else:
                if arg_6 < arg_7:
                    arg_0._logger.warning(
                        "Received request with future timestamp. Received "
                        "timestamp: {0}, Current timestamp: {1}".format(
                            arg_7,
                            arg_6
                        )
                    )

                    raise exceptions.InvalidMessage(
                        "Future request rejected by server."
                    )
                else:
                    arg_0._logger.warning(
                        "Received request with old timestamp. Possible "
                        "replay attack. Received timestamp: {0}, Current "
                        "timestamp: {1}".format(arg_7, arg_6)
                    )

                    raise exceptions.InvalidMessage(
                        "Stale request rejected by server."
                    )
        else:
            arg_0._logger.info("Received request at time: {0}".format(
                time.strftime(
                    "%Y-%m-%d %H:%M:%S",
                    time.gmtime(arg_6)
                )
            ))

        # Process the asynchronous indicator
        arg_0.is_asynchronous = False
        if arg_4.asynchronous_indicator is not None:
            arg_0.is_asynchronous = arg_4.asynchronous_indicator.value

        if arg_0.is_asynchronous:
            raise exceptions.InvalidMessage(
                "Asynchronous operations are not supported."
            )

        # Process the authentication credentials
        if arg_4.authentication:
            if arg_4.authentication.credentials:
                arg_9 = arg_4.authentication.credentials[0]
            else:
                arg_9 = None
        else:
            arg_9 = None

        arg_0._verify_credential(arg_9, arg_2)

        # Process the batch error continuation option
        arg_10 = enums.BatchErrorContinuationOption.STOP
        if arg_4.batch_error_cont_option is not None:
            arg_10 = arg_4.batch_error_cont_option.value

        if arg_10 == enums.BatchErrorContinuationOption.UNDO:
            raise exceptions.InvalidMessage(
                "Undo option for batch handling is not supported."
            )

        # Process the batch order option
        arg_11 = False
        if arg_4.batch_order_option:
            arg_11 = arg_4.batch_order_option.value

        arg_12 = arg_0._process_batch(
            arg_1.batch_items,
            arg_10,
            arg_11
        )
        arg_13 = arg_0._build_response(
            arg_4.protocol_version,
            arg_12
        )

        return arg_13, arg_5, arg_4.protocol_version


def Func ( arg_0 ) : arg_1 = dict ( ) arg_1 [ 'sequence' ] = arg_0 . sequence if hasattr ( arg_0 , 'frequency' ) : arg_1 [ 'frequency' ] = arg_0 . frequency return arg_1

def Func(arg_0):
        """Return Allele data as dict object."""
        arg_1 = dict()
        arg_1['sequence'] = arg_0.sequence
        if hasattr(arg_0, 'frequency'):
            arg_1['frequency'] = arg_0.frequency
        return arg_1


def Func(arg_0, arg_1):
    '''iterate through all tokens looking for matches of cleansed tokens
    or token regexes, skipping tokens left empty by cleansing and
    coping with Token objects that produce multiple space-separated
    strings when cleansed.  Yields tokens that match.

    '''
    ## this ensures that all cleansed tokens are non-zero length
    arg_2 = []
    for arg_3 in arg_0.mentions:
        arg_4 = []
        arg_5 = arg_3.decode('utf8').split(' ')
        for arg_6 in arg_5:
            if arg_6.startswith('ur"^') and arg_6.endswith('$"'): # is not regex
                ## chop out the meat of the regex so we can reconstitute it below
                arg_6 = arg_6[4:-2]
            else:
                arg_6 = cleanse(arg_6)
            if arg_6:
                ## make a unicode raw string
                ## https://docs.python.org/2/reference/lexical_analysis.html#string-literals
                arg_6 = ur'^%s$' % arg_6
                logger.debug('Func compiling regex: %s', arg_6)
                arg_4.append(re.compile(arg_6, re.UNICODE | re.IGNORECASE))

        if not arg_4:
            logger.warn('got empty cleansed mention: %r\nrating=%r' % (arg_3, arg_0))

        arg_2.append(arg_4)

    ## now that we have all_mregexes, go through all the tokens
    for arg_7 in range(len(arg_1)):
        for arg_4 in arg_2:
            if arg_4[0].match(arg_1[arg_7][0][0]):
                ## found the start of a possible match, so iterate
                ## through the tuples of cleansed strings for each
                ## Token while stepping through the cleansed strings
                ## for this mention.
                arg_8 = 1
                arg_9 = 0
                arg_10 = 0
                arg_11 = True
                while arg_8 < len(arg_4):
                    arg_9 += 1
                    if arg_9 == len(arg_1[arg_7 + arg_10][0]):
                        arg_9 = 0
                        arg_10 += 1
                        if arg_7 + arg_10 == len(arg_1):
                            arg_11 = False
                            break
                    arg_12 = arg_1[arg_7 + arg_10][0][arg_9]
                    ## this next line is the actual string comparison
                    if arg_4[arg_8].match(arg_12):
                        arg_8 += 1
                    elif arg_12 == '':
                        continue
                    else:
                        arg_11 = False
                        break
                if arg_11:
                    ## yield each matched token only once
                    arg_13 = set()
                    for arg_14 in xrange(arg_10 + 1):
                        arg_13.add(arg_1[arg_7 + arg_14][1])
                    for arg_15 in arg_13:
                        yield arg_15

iterate through all tokens looking for matches of cleansed tokens or token regexes skipping tokens left empty by cleansing and coping with Token objects that produce multiple space - separated strings when cleansed . Yields tokens that match .


def
Func
(
arg_0
)
:
if
(
os
.
path
.
isfile
(
NGRAM_PATH
)
)
:
arg_1
=
pickle
.
load
(
open
(
NGRAM_PATH
,
'rb'
)
)
elif
os
.
path
.
isfile
(
ESSAY_CORPUS_PATH
)
:
arg_2
=
open
(
ESSAY_CORPUS_PATH
)
.
read
(
)
arg_2
=
util_functions
.
sub_chars
(
arg_2
)
arg_1
=
util_functions
.
regenerate_good_tokens
(
arg_2
)
pickle
.
dump
(
arg_1
,
open
(
NGRAM_PATH
,
'wb'
)
)
else
:
arg_1
=
[
'NN PRP'
,
'NN PRP .'
,
'NN PRP . DT'
,
'PRP .'
,
'PRP . DT'
,
'PRP . DT NNP'
,
'. DT'
,
'. DT NNP'
,
'. DT NNP NNP'
,
'DT NNP'
,
'DT NNP NNP'
,
'DT NNP NNP NNP'
,
'NNP NNP'
,
'NNP NNP NNP'
,
'NNP NNP NNP NNP'
,
'NNP NNP NNP .'
,
'NNP NNP .'
,
'NNP NNP . TO'
,
'NNP .'
,
'NNP . TO'
,
'NNP . TO NNP'
,
'. TO'
,
'. TO NNP'
,
'. TO NNP NNP'
,
'TO NNP'
,
'TO NNP NNP'
]
return
set
(
arg_1
)

def Func(arg_0):
        """
        Gets a set of gramatically correct part of speech sequences from an input file called essaycorpus.txt
        Returns the set and caches the file
        """
        if(os.path.isfile(NGRAM_PATH)):
            arg_1 = pickle.load(open(NGRAM_PATH, 'rb'))
        elif os.path.isfile(ESSAY_CORPUS_PATH):
            arg_2 = open(ESSAY_CORPUS_PATH).read()
            arg_2 = util_functions.sub_chars(arg_2)
            arg_1 = util_functions.regenerate_good_tokens(arg_2)
            pickle.dump(arg_1, open(NGRAM_PATH, 'wb'))
        else:
            #Hard coded list in case the needed files cannot be found
            arg_1=['NN PRP', 'NN PRP .', 'NN PRP . DT', 'PRP .', 'PRP . DT', 'PRP . DT NNP', '. DT',
             '. DT NNP', '. DT NNP NNP', 'DT NNP', 'DT NNP NNP', 'DT NNP NNP NNP', 'NNP NNP',
             'NNP NNP NNP', 'NNP NNP NNP NNP', 'NNP NNP NNP .', 'NNP NNP .', 'NNP NNP . TO',
             'NNP .', 'NNP . TO', 'NNP . TO NNP', '. TO', '. TO NNP', '. TO NNP NNP',
             'TO NNP', 'TO NNP NNP']

        return set(arg_1)

Gets a set of gramatically correct part of speech sequences from an input file called essaycorpus . txt Returns the set and caches the file


def Func ( arg_0 , arg_1 , arg_2 = False ) : arg_0 . network . Func ( arg_1 , arg_2 = arg_2 ) arg_0 . best_params = arg_0 . copy_params ( ) if arg_0 . network . train_logger . progress ( ) > 0 or arg_0 . network . train_logger . epoch ( ) > 0 : arg_0 . skip ( arg_0 . network . train_logger . progress ( ) , arg_0 . network . train_logger . epoch ( ) - 1 )

def Func(arg_0, arg_1, arg_2=False):
        """
        Load parameters for the training.
        This method can load free parameters and resume the training progress.
        """
        arg_0.network.Func(arg_1, arg_2=arg_2)
        arg_0.best_params = arg_0.copy_params()
        # Resume the progress
        if arg_0.network.train_logger.progress() > 0 or arg_0.network.train_logger.epoch() > 0:
            arg_0.skip(arg_0.network.train_logger.progress(), arg_0.network.train_logger.epoch() - 1)

Load parameters for the training . This method can load free parameters and resume the training progress .


def Func(arg_0):
        """Start the app for the stop subcommand."""
        try:
            arg_1 = arg_0.get_pid_from_file()
        except PIDFileError:
            arg_0.log.critical(
                'Could not read pid file, cluster is probably not running.'
            )
            # Here I exit with a unusual exit status that other processes
            # can watch for to learn how I existed.
            arg_0.remove_pid_file()
            arg_0.exit(ALREADY_STOPPED)

        if not arg_0.check_pid(arg_1):
            arg_0.log.critical(
                'Cluster [pid=%r] is not running.' % arg_1
            )
            arg_0.remove_pid_file()
            # Here I exit with a unusual exit status that other processes
            # can watch for to learn how I existed.
            arg_0.exit(ALREADY_STOPPED)

        elif os.name=='posix':
            arg_2 = arg_0.signal
            arg_0.log.info(
                "Stopping cluster [pid=%r] with [signal=%r]" % (arg_1, arg_2)
            )
            try:
                os.kill(arg_1, arg_2)
            except OSError:
                arg_0.log.error("Stopping cluster failed, assuming already dead.",
                    exc_info=True)
                arg_0.remove_pid_file()
        elif os.name=='nt':
            try:
                # kill the whole tree
                arg_3 = check_call(['taskkill', '-pid', str(arg_1), '-t', '-f'], stdout=PIPE,stderr=PIPE)
            except (CalledProcessError, OSError):
                arg_0.log.error("Stopping cluster failed, assuming already dead.",
                    exc_info=True)
            arg_0.remove_pid_file()


def Func(arg_0, arg_1, arg_2=None):
        """
        Get object size

        @param window_name: Window name to look for, either full name,
        LDTP's name convention, or a Unix glob.
        @type window_name: string
        @param object_name: Object name to look for, either full name,
        LDTP's name convention, or a Unix glob. Or menu heirarchy
        @type object_name: string

        @return: x, y, width, height on success.
        @rtype: list
        """
        if not arg_2:
            arg_3, arg_4, arg_5 = arg_0._get_window_handle(arg_1)
        else:
            arg_3 = arg_0._get_object_handle(arg_1, arg_2)
        return arg_0._Func(arg_3)


def Func ( arg_0 , arg_1 = None ) : arg_0 = numpy . asarray ( arg_0 ) if arg_1 is None : arg_1 = arg_0 . dtype return anonymousmemmap ( arg_0 . shape , arg_1 )

def Func(arg_0, arg_1=None):
    """ Create a shared memory array from the shape of array.
    """
    arg_0 = numpy.asarray(arg_0)
    if arg_1 is None:
        arg_1 = arg_0.dtype
    return anonymousmemmap(arg_0.shape, arg_1)

Create a shared memory array from the shape of array .


def Func(arg_0=True):  # pylint:disable=assign-to-new-keyword
    """Upload code of the current directory while respecting the .polyaxonignore file."""
    arg_1 = ProjectManager.get_config_or_raise()
    arg_2 = IgnoreManager.get_unignored_file_paths()
    try:
        with create_tarfile(arg_2, arg_1.name) as file_path:
            with get_files_in_current_directory('repo', [file_path]) as (arg_2, files_size):
                try:
                    PolyaxonClient().project.Func_repo(arg_1.user,
                                                         arg_1.name,
                                                         arg_2,
                                                         files_size,
                                                         arg_0=arg_0)
                except (PolyaxonHTTPError, PolyaxonShouldExitError, PolyaxonClientException) as e:
                    Printer.print_error(
                        'Could not Func code for project `{}`.'.format(arg_1.name))
                    Printer.print_error('Error message `{}`.'.format(e))
                    Printer.print_error(
                        'Check the project exists, '
                        'and that you have access rights, '
                        'this could happen as well when Funcing large files.'
                        'If you are running a notebook and mounting the code to the notebook, '
                        'you should stop it before Funcing.')
                    sys.exit(1)
                Printer.print_success('Files Funced.')
    except Exception as e:
        Printer.print_error("Could not Func the file.")
        Printer.print_error('Error message `{}`.'.format(e))
        sys.exit(1)

Upload code of the current directory while respecting the . polyaxonignore file .


def Func(arg_0, arg_1, arg_2=None):
        """
        Deletes the specified Cloud Bigtable instance.
        Raises google.api_core.exceptions.NotFound if the Cloud Bigtable instance does
        not exist.

        :param project_id: Optional, Google Cloud Platform project ID where the
            BigTable exists. If set to None or missing,
            the default project_id from the GCP connection is used.
        :type project_id: str
        :param instance_id: The ID of the Cloud Bigtable instance.
        :type instance_id: str
        """
        arg_3 = arg_0.get_instance(arg_1=arg_1, arg_2=arg_2)
        if arg_3:
            arg_3.delete()
        else:
            arg_0.log.info("The instance '%s' does not exist in project '%s'. Exiting", arg_1,
                          arg_2)

Deletes the specified Cloud Bigtable instance . Raises google . api_core . exceptions . NotFound if the Cloud Bigtable instance does not exist .


def Func(arg_0, arg_1):
        '''
        Decode a UNSUBACK control packet.
        '''
        arg_0.encoded = arg_1
        arg_3 = 1
        while arg_1[arg_3] & 0x80:
            arg_3 += 1
        arg_4 = arg_1[arg_3+1:]
        arg_0.msgId   = Func16Int(arg_4[0:2])
        arg_0.topics = []
        arg_4 = arg_4[2:]
        while len(arg_4):
            arg_7 = Func16Int(arg_4[0:2])
            arg_8 = arg_4[2:2+arg_7].Func(encoding='utf-8')
            arg_0.topics.append(arg_8)
            arg_4 = arg_4[2+arg_7:]


def Func ( arg_0 , arg_1 = None ) : if arg_0 . module is None : raise RuntimeError elif arg_1 is None : import importlib arg_1 = ModuleSource ( importlib . reload ( arg_1 ) ) elif arg_1 . name != arg_0 . module : raise RuntimeError if arg_0 . name in arg_1 . funcs : arg_2 = arg_1 . funcs [ arg_0 . name ] arg_0 . __init__ ( arg_2 = arg_2 ) else : arg_0 . __init__ ( arg_2 = NULL_FORMULA ) return arg_0

def Func(arg_0, arg_1=None):
        """Reload the source function from the source module.

        **Internal use only**
        Update the source function of the formula.
        This method is used to updated the underlying formula
        when the source code of the module in which the source function
        is read from is modified.

        If the formula was not created from a module, an error is raised.
        If ``module_`` is not given, the source module of the formula is
        reloaded. If ``module_`` is given and matches the source module,
        then the module_ is used without being reloaded.
        If ``module_`` is given and does not match the source module of
        the formula, an error is raised.

        Args:
            module_: A ``ModuleSource`` object

        Returns:
            self
        """
        if arg_0.module is None:
            raise RuntimeError
        elif arg_1 is None:
            import importlib

            arg_1 = ModuleSource(importlib.reload(arg_1))
        elif arg_1.name != arg_0.module:
            raise RuntimeError

        if arg_0.name in arg_1.funcs:
            arg_2 = arg_1.funcs[arg_0.name]
            arg_0.__init__(arg_2=arg_2)
        else:
            arg_0.__init__(arg_2=NULL_FORMULA)

        return arg_0

Reload the source function from the source module .


def Func ( arg_0 ) : arg_1 = OrderedDict ( ) for arg_2 , arg_3 in arg_0 . items ( ) : arg_1 [ arg_2 ] = arg_3 . cpu ( ) return arg_1

def Func(arg_0):
    """Copy a model state_dict to cpu.

    Args:
        state_dict (OrderedDict): Model weights on GPU.

    Returns:
        OrderedDict: Model weights on GPU.
    """
    arg_1 = OrderedDict()
    for arg_2, arg_3 in arg_0.items():
        arg_1[arg_2] = arg_3.cpu()
    return arg_1


return capitalcase(trimcase(
        re.sub(r"[A-Z]", lambda matched: joiner +
                                         lowercase(matched.group(0)), string)
    ))

def
Func
(
arg_0
)
:
arg_1
=
' '
arg_0
=
re
.
sub
(
r"[\-_\.\s]"
,
arg_1
,
str
(
arg_0
)
)
if
not
arg_0
:
return
arg_0
return
capitalcase
(
trimcase
(
re
.
sub
(
r"[A-Z]"
,
lambda
matched
:
arg_1
+
lowercase
(
matched
.
group
(
0
)
)
,
arg_0
)
)
)

def Func(arg_0):
    """Convert string into sentence case.
    First letter capped and each punctuations are joined with space.

    Args:
        string: String to convert.

    Returns:
        string: Sentence cased string.

    """
    arg_1 = ' '
    arg_0 = re.sub(r"[\-_\.\s]", arg_1, str(arg_0))
    if not arg_0:
        return arg_0
    return capitalcase(trimcase(
        re.sub(r"[A-Z]", lambda matched: arg_1 +
                                         lowercase(matched.group(0)), arg_0)
    ))

Convert string into sentence case . First letter capped and each punctuations are joined with space .


return tf.exp((-t) * tf.math.log1p(x) - tf.math.log(t))

def Func ( arg_0 , arg_1 ) : arg_1 = tf . cast ( arg_1 , arg_0 . power . dtype ) arg_2 = arg_0 . power - 1. return tf . exp ( ( - arg_2 ) * tf . math . log1p ( arg_1 ) - tf . math . log ( arg_2 ) )

def Func(arg_0, arg_1):
    """Integral of the `hat` function, used for sampling.

    We choose a `hat` function, h(x) = x^(-power), which is a continuous
    (unnormalized) density touching each positive integer at the (unnormalized)
    pmf. This function implements `hat` integral: H(x) = int_x^inf h(t) dt;
    which is needed for sampling purposes.

    Arguments:
      x: A Tensor of points x at which to evaluate H(x).

    Returns:
      A Tensor containing evaluation H(x) at x.
    """
    arg_1 = tf.cast(arg_1, arg_0.power.dtype)
    arg_2 = arg_0.power - 1.
    return tf.exp((-arg_2) * tf.math.log1p(arg_1) - tf.math.log(arg_2))

Integral of the hat function used for sampling .


def Func ( arg_0 , arg_1 , arg_2 ) : for arg_3 in arg_1 : arg_4 [ "_" . join ( [ arg_0 , arg_3 ] ) ] = arg_2 [ arg_3 ]

def Func(arg_0, arg_1, arg_2):
    """
    Define the list of 'exported' variables with 'prefix' with values from 'env'
    """

    for arg_3 in arg_1:
        arg_4["_".join([arg_0, arg_3])] = arg_2[arg_3]

Define the list of exported variables with prefix with values from env


def Func(arg_0, arg_1):
  '''
  Tempate uploader.yaml
  '''
  arg_2 = arg_1[0]
  arg_3 = "%s/standalone/templates/uploader.template.yaml" \
                             % arg_0["config_path"]
  arg_4 = "%s/standalone/uploader.yaml" % arg_0["config_path"]

  template_file(arg_3, arg_4,
                {"<http_uploader_uri>": "http://%s:9000/api/v1/file/upload" % arg_2})


def Func ( arg_0 , arg_1 ) : arg_0 . Funcers . append ( arg_1 ) from languageflow . Funcer . tagged import TaggedTransformer if isinstance ( arg_1 , TaggedTransformer ) : arg_0 . X , arg_0 . y = arg_1 . Func ( arg_0 . sentences ) if isinstance ( arg_1 , TfidfVectorizer ) : arg_0 . X = arg_1 . fit_Func ( arg_0 . X ) if isinstance ( arg_1 , CountVectorizer ) : arg_0 . X = arg_1 . fit_Func ( arg_0 . X ) if isinstance ( arg_1 , NumberRemover ) : arg_0 . X = arg_1 . Func ( arg_0 . X ) if isinstance ( arg_1 , MultiLabelBinarizer ) : arg_0 . y = arg_1 . fit_Func ( arg_0 . y )

def Func(arg_0, arg_1):
        """
        Add Funcer to flow and apply Funcer to data in flow

        Parameters
        ----------
        Funcer : Transformer
            a Funcer to Func data
        """
        arg_0.Funcers.append(arg_1)
        from languageflow.Funcer.tagged import TaggedTransformer

        if isinstance(arg_1, TaggedTransformer):
            arg_0.X, arg_0.y = arg_1.Func(arg_0.sentences)
        if isinstance(arg_1, TfidfVectorizer):
            arg_0.X = arg_1.fit_Func(arg_0.X)
        if isinstance(arg_1, CountVectorizer):
            arg_0.X = arg_1.fit_Func(arg_0.X)
        if isinstance(arg_1, NumberRemover):
            arg_0.X = arg_1.Func(arg_0.X)

        if isinstance(arg_1, MultiLabelBinarizer):
            arg_0.y = arg_1.fit_Func(arg_0.y)

Add transformer to flow and apply transformer to data in flow

        Parameters
        ----------
        transformer : Transformer
            a transformer to transform data


def Func ( arg_0 , arg_1 , arg_2 ) : arg_3 = { 'type' : 'message' , 'id' : next ( arg_0 . _msg_ids ) } arg_3 . update ( arg_1 = arg_1 , arg_2 = arg_2 ) return json . dumps ( arg_3 )

def Func(arg_0, arg_1, arg_2):
        """Format an outgoing message for transmission.

        Note:
          Adds the message type (``'message'``) and incremental ID.

        Arguments:
          channel (:py:class:`str`): The channel to send to.
          text (:py:class:`str`): The message text to send.

        Returns:
          :py:class:`str`: The JSON string of the message.

        """
        arg_3 = {'type': 'message', 'id': next(arg_0._msg_ids)}
        arg_3.update(arg_1=arg_1, arg_2=arg_2)
        return json.dumps(arg_3)

Format an outgoing message for transmission .


def
Func
(
arg_0
)
:
LOG
.
info
(
"Updating indexes..."
)
arg_1
=
0
for
arg_2
in
INDEXES
:
arg_3
=
arg_0
.
indexes
(
arg_2
)
arg_4
=
INDEXES
[
arg_2
]
for
arg_5
in
arg_4
:
arg_6
=
arg_5
.
document
.
get
(
'name'
)
if
arg_6
not
in
arg_3
:
arg_1
+=
1
LOG
.
info
(
"Adding index : %s"
%
arg_6
)
arg_0
.
db
[
arg_2
]
.
create_indexes
(
arg_4
)
if
arg_1
==
0
:
LOG
.
info
(
"All indexes in place"
)

def Func(arg_0):
        """Update the indexes

        If there are any indexes that are not added to the database, add those.

        """
        LOG.info("Updating indexes...")
        arg_1 = 0
        for arg_2 in INDEXES:
            arg_3 = arg_0.indexes(arg_2)
            arg_4 = INDEXES[arg_2]
            for arg_5 in arg_4:
                arg_6 = arg_5.document.get('name')
                if arg_6 not in arg_3:
                    arg_1 += 1
                    LOG.info("Adding index : %s" % arg_6)
                    arg_0.db[arg_2].create_indexes(arg_4)
        if arg_1 == 0:
            LOG.info("All indexes in place")

Update the indexes If there are any indexes that are not added to the database add those .


def Func(arg_0=None):
    """Build a color wheel.

    Args:
        bins(list or tuple, optional): Specify the number of bins for each
            color range, corresponding to six ranges: red -> yellow,
            yellow -> green, green -> cyan, cyan -> blue, blue -> magenta,
            magenta -> red. [15, 6, 4, 11, 13, 6] is used for default
            (see Middlebury).

    Returns:
        ndarray: Color wheel of shape (total_bins, 3).
    """
    if arg_0 is None:
        arg_0 = [15, 6, 4, 11, 13, 6]
    assert len(arg_0) == 6

    arg_1, arg_2, arg_3, arg_4, arg_5, arg_6 = tuple(arg_0)

    arg_7 = [1, np.arange(arg_1) / arg_1, 0]
    arg_8 = [1 - np.arange(arg_2) / arg_2, 1, 0]
    arg_9 = [0, 1, np.arange(arg_3) / arg_3]
    arg_10 = [0, 1 - np.arange(arg_4) / arg_4, 1]
    arg_11 = [np.arange(arg_5) / arg_5, 0, 1]
    arg_12 = [1, 0, 1 - np.arange(arg_6) / arg_6]

    arg_13 = arg_1 + arg_2 + arg_3 + arg_4 + arg_5 + arg_6

    arg_14 = np.zeros((3, arg_13), dtype=np.float32)

    arg_15 = 0
    for arg_16, arg_17 in enumerate([arg_7, arg_8, arg_9, arg_10, arg_11, arg_12]):
        for arg_18 in range(3):
            arg_14[arg_18, arg_15:arg_15 + arg_0[arg_16]] = arg_17[arg_18]
        arg_15 += arg_0[arg_16]

    return arg_14.T


def Func ( arg_0 , arg_1 , arg_2 , * arg_3 ) : arg_4 = tnr_re . search ( arg_2 [ arg_1 . slug ] ) if arg_4 : arg_2 [ 'tnr' ] = arg_4 . groupdict ( ) [ 'tnr' ] return arg_2

def Func(arg_0, arg_1, arg_2, *arg_3):
    """
    mBank Collect states TNR in transaction details as unique id for
    transactions, that may be used to identify the same transactions in
    different statement files eg. partial mt942 and full mt940
    Information about tnr uniqueness has been obtained from mBank support,
    it lacks in mt940 mBank specification.
    """

    arg_4 = tnr_re.search(arg_2[arg_1.slug])

    if arg_4:  # pragma no branch
        arg_2['tnr'] = arg_4.groupdict()['tnr']

    return arg_2

mBank Collect states TNR in transaction details as unique id for transactions that may be used to identify the same transactions in different statement files eg . partial mt942 and full mt940 Information about tnr uniqueness has been obtained from mBank support it lacks in mt940 mBank specification .


def Func(arg_0, arg_1):
        """Write bytes to the file."""
        arg_2 = arg_1.decode(arg_0._encoding)
        arg_0._file.Func(arg_2)


def Func(arg_0):
    '''for each variant, yields evidence and associated phenotypes, both current and suggested'''
    arg_1 = civic.get_variants_by_ids(arg_0)
    arg_2 = list()
    for arg_3 in arg_1:
        arg_2.extend(arg_3.evidence)
    for arg_4 in arg_2:
        arg_5 = f'https://civicdb.org/api/evidence_items/{e.id}/suggested_changes'
        arg_6 = requests.get(arg_5)
        arg_6.raise_for_status()
        arg_7 = dict()
        for arg_8 in arg_6.json():
            arg_9 = arg_8['suggested_changes'].get('phenotype_ids', None)
            if arg_9 is None:
                continue
            arg_10, arg_11 = arg_9
            arg_12 = set(arg_11) - set(arg_10)
            arg_13 = set(arg_10) - set(arg_11)
            arg_14 = arg_8['id']
            arg_7[arg_14] = {'added': arg_12, 'deleted': arg_13}
        yield arg_4, {'suggested_changes': arg_7, 'current': set([arg_15.id for arg_15 in arg_4.phenotypes])}

for each variant yields evidence and associated phenotypes both current and suggested


(self, url, params=None, data=None, files=None, **kwargs)

return self.call_api(
            "POST",
            url,
            params=params,
            data=data,
            files=files,
            **kwargs
        )

def Func(arg_0, arg_1, arg_2=None, arg_3=None, arg_4=None, **arg_5):
        """ Call the API with a POST request.

        Args:
            url (str): Resource location relative to the base URL.
            params (dict or None): Query-string parameters.
            data (dict or None): Request body contents.
            files (dict or None: Files to be passed to the request.

        Returns:
            An instance of ResultParser or ErrorParser.
        """
        return arg_0.call_api(
            "POST",
            arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            **arg_5
        )


(self, instance, group, overwrite=False)

def Func(arg_0, arg_1, arg_2, arg_3=False):
        """Adds information to overview tables and meta information to
        the `instance`s hdf5 `group`.

        :param instance: Instance to store meta info about
        :param group: HDF5 group of instance
        :param overwrite: If data should be explicitly overwritten

        """

        if arg_3:
            arg_4 = ()
        else:
            arg_4 = (HDF5StorageService.ADD_ROW,)

        arg_5 = True
        try:
            # Check if we need to store the comment. Maybe update the overview tables
            # accordingly if the current run index is lower than the one in the table.
            arg_5 = arg_0._prm_meta_add_summary(arg_1)

            try:
                # Update the summary overview table
                arg_6 = arg_1.v_branch + '_overview'

                arg_7 = getattr(arg_0._overview_group, arg_6)
                if len(arg_7) < pypetconstants.HDF5_MAX_OVERVIEW_TABLE_LENGTH:

                    arg_0._all_store_param_or_result_table_entry(arg_1, arg_7,
                                                                arg_4=arg_4)
            except pt.NoSuchNodeError:
                pass
        except Exception as exc:
            arg_0._logger.error('Could not store information table due to `%s`.' % repr(exc))

        if ((not arg_0._purge_duplicate_comments or arg_5) and
                    arg_1.v_comment != ''):
            # Only add the comment if necessary
            setattr(arg_2._v_attrs, HDF5StorageService.COMMENT, arg_1.v_comment)

        # Add class name and whether node is a leaf to the HDF5 attributes
        setattr(arg_2._v_attrs, HDF5StorageService.CLASS_NAME, arg_1.f_get_class_name())
        setattr(arg_2._v_attrs, HDF5StorageService.LEAF, True)

        if arg_1.v_is_parameter and arg_1.v_explored:
            # If the stored parameter was an explored one we need to mark this in the
            # explored overview table
            try:
                arg_8 = 'explored_parameters_overview'
                arg_7 = getattr(arg_0._overview_group, arg_8)

                if len(arg_7) < pypetconstants.HDF5_MAX_OVERVIEW_TABLE_LENGTH:
                    arg_0._all_store_param_or_result_table_entry(arg_1, arg_7,
                                                                arg_4=arg_4)
            except pt.NoSuchNodeError:
                pass
            except Exception as exc:
                arg_0._logger.error('Could not store information '
                                   'table due to `%s`.' % repr(exc))

Adds information to overview tables and meta information to the instance s hdf5 group .


def
Func
(
arg_0
,
arg_1
=
1
)
:
arg_2
=
list
(
)
for
arg_3
in
range
(
arg_1
)
:
arg_0
.
model
.
slim_optimize
(
error_value
=
,
message
=
'gapFuncing optimization failed'
)
arg_4
=
[
arg_0
.
model
.
reactions
.
get_by_id
(
ind
.
rxn_id
)
for
ind
in
arg_0
.
indicators
if
ind
.
_get_primal
(
)
>
arg_0
.
integer_threshold
]
if
not
arg_0
.
validate
(
arg_4
)
:
raise
RuntimeError
(
'failed to validate gapFunced model, '
'try lowering the integer_threshold'
)
arg_2
.
append
(
arg_4
)
arg_0
.
update_costs
(
)
return
arg_2

def Func(arg_0, arg_1=1):
        """Perform the gapFuncing by iteratively solving the model, updating
        the costs and recording the used reactions.

        Parameters
        ----------
        iterations : int
            The number of rounds of gapFuncing to perform. For every
            iteration, the penalty for every used reaction increases
            linearly. This way, the algorithm is encouraged to search for
            alternative solutions which may include previously used
            reactions. I.e., with enough iterations pathways including 10
            steps will eventually be reported even if the shortest pathway
            is a single reaction.

        Returns
        -------
        iterable
            A list of lists where each element is a list reactions that were
            used to gapFunc the model.

        Raises
        ------
        RuntimeError
            If the model fails to be validated (i.e. the original model with
            the proposed reactions added, still cannot get the required flux
            through the objective).
        """
        arg_2 = list()
        for arg_3 in range(arg_1):
            arg_0.model.slim_optimize(error_value=None,
                                     message='gapFuncing optimization failed')
            arg_4 = [arg_0.model.reactions.get_by_id(ind.rxn_id)
                        for ind in arg_0.indicators if
                        ind._get_primal() > arg_0.integer_threshold]
            if not arg_0.validate(arg_4):
                raise RuntimeError('failed to validate gapFunced model, '
                                   'try lowering the integer_threshold')
            arg_2.append(arg_4)
            arg_0.update_costs()
        return arg_2

Perform the gapfilling by iteratively solving the model, updating
        the costs and recording the used reactions.

        Parameters
        ----------
        iterations : int
            The number of rounds of gapfilling to perform. For every
            iteration, the penalty for every used reaction increases
            linearly. This way, the algorithm is encouraged to search for
            alternative solutions which may include previously used
            reactions. I.e., with enough iterations pathways including 10
            steps will eventually be reported even if the shortest pathway
            is a single reaction.

        Returns
        -------
        iterable
            A list of lists where each element is a list reactions that were
            used to gapfill the model.

        Raises
        ------
        RuntimeError
            If the model fails to be validated (i.e. the original model with
            the proposed reactions added, still cannot get the required flux
            through the objective).

Perform the gapfilling by iteratively solving the model updating the costs and recording the used reactions .


def Func ( arg_0 ) : arg_1 = 1 for arg_2 in arg_0 : if isinstance ( arg_2 , np . ndarray ) : if arg_2 . ndim > 0 : for arg_3 in arg_2 . ravel ( ) : arg_1 = max ( len ( arg_3 ) , arg_1 ) else : arg_1 = max ( len ( arg_2 . tolist ( ) ) , arg_1 ) else : arg_1 = max ( len ( arg_2 ) , arg_1 ) return int ( arg_1 * 1.5 )

def Func(arg_0):
        """ Returns the longest string size for a string entry across data."""
        arg_1 = 1

        for arg_2 in arg_0:
            if isinstance(arg_2, np.ndarray):
                if arg_2.ndim > 0:
                    for arg_3 in arg_2.ravel():
                        arg_1 = max(len(arg_3), arg_1)
                else:
                    arg_1 = max(len(arg_2.tolist()), arg_1)
            else:
                arg_1 = max(len(arg_2), arg_1)

        # Make the string Col longer than needed in order to allow later on slightly larger strings
        return int(arg_1 * 1.5)

Returns the longest string size for a string entry across data .


def Func ( arg_0 , arg_1 : arg_2 = True ) : if not isinstance ( arg_0 , ( dict , frozenset , list , set , tuple ) ) : return arg_0 else : return _Func_backup ( arg_0 , arg_1 = arg_1 )

def Func(arg_0, arg_1: arg_2 = True):
    """Recursively convert Python collections into Lisp collections."""
    if not isinstance(arg_0, (dict, frozenset, list, set, tuple)):
        return arg_0
    else:  # pragma: no cover
        return _Func_backup(arg_0, arg_1=arg_1)

Recursively convert Python collections into Lisp collections .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . has_package ( arg_1 ) and arg_0 . has_file ( arg_1 ) : if not arg_0 . file_chksum_set : arg_0 . file_chksum_set = True arg_0 . file ( arg_1 ) . chk_sum = checksum_from_sha1 ( arg_2 ) return True else : raise CardinalityError ( 'File::CheckSum' ) else : raise OrderError ( 'File::CheckSum' )

def Func(arg_0, arg_1, arg_2):
        """
        Raises OrderError if no package or file defined.
        Raises CardinalityError if more than one chksum set.
        """
        if arg_0.has_package(arg_1) and arg_0.has_file(arg_1):
            if not arg_0.file_chksum_set:
                arg_0.file_chksum_set = True
                arg_0.file(arg_1).chk_sum = checksum_from_sha1(arg_2)
                return True
            else:
                raise CardinalityError('File::CheckSum')
        else:
            raise OrderError('File::CheckSum')

Raises OrderError if no package or file defined . Raises CardinalityError if more than one chksum set .


def Func(arg_0, arg_1):
        """
        Set the public key of the certificate

        :param pkey: The public key
        :return: ``None``
        """
        arg_2 = _lib.NETSCAPE_SPKI_Func(arg_0._spki, arg_1._pkey)
        _openssl_assert(arg_2 == 1)


def
Func
(
arg_0
,
arg_1
=
,
arg_2
=
)
:
if
arg_1
is
not
:
arg_1
=
arg_1
.
lower
(
)
if
arg_2
is
not
:
arg_2
=
arg_2
.
lower
(
)
arg_3
=
True
if
arg_1
is
and
arg_2
is
:
arg_4
=
'%s/labels/search'
%
(
arg_0
.
base
)
arg_3
=
False
elif
arg_1
is
not
and
arg_2
is
not
:
arg_4
=
'%s/labels/search/%s/key/%s/value'
%
(
arg_0
.
base
,
arg_1
,
arg_2
)
elif
arg_1
is
:
arg_4
=
'%s/labels/search/%s/value'
%
(
arg_0
.
base
,
arg_2
)
else
:
arg_4
=
'%s/labels/search/%s/key'
%
(
arg_0
.
base
,
arg_1
)
arg_5
=
arg_0
.
_get
(
arg_4
)
if
len
(
arg_5
)
==
0
:
bot
.
info
(
"No labels found."
)
sys
.
exit
(
0
)
bot
.
info
(
"Labels\n"
)
arg_6
=
[
]
for
arg_7
in
arg_5
:
if
arg_3
is
True
:
arg_8
=
[
"%s:%s"
%
(
arg_7
[
'key'
]
,
arg_7
[
'value'
]
)
,
"\n%s\n\n"
%
"\n"
.
join
(
arg_7
[
'containers'
]
)
]
else
:
arg_8
=
[
"N=%s"
%
len
(
arg_7
[
'containers'
]
)
,
"%s:%s"
%
(
arg_7
[
'key'
]
,
arg_7
[
'value'
]
)
]
arg_6
.
append
(
arg_8
)
bot
.
table
(
arg_6
)
return
arg_6

def Func(arg_0, arg_1=None, arg_2=None):
    '''search across labels'''

    if arg_1 is not None:
        arg_1 = arg_1.lower()

    if arg_2 is not None:
        arg_2 = arg_2.lower()

    arg_3 = True
    if arg_1 is None and arg_2 is None:
        arg_4 = '%s/labels/search' % (arg_0.base)
        arg_3 = False

    elif arg_1 is not None and arg_2 is not None:
        arg_4 = '%s/labels/search/%s/key/%s/value' % (arg_0.base, arg_1, arg_2)

    elif arg_1 is None:
        arg_4 = '%s/labels/search/%s/value' % (arg_0.base, arg_2)

    else:
        arg_4 = '%s/labels/search/%s/key' % (arg_0.base, arg_1)

    arg_5 = arg_0._get(arg_4)
    if len(arg_5) == 0:
        bot.info("No labels found.")
        sys.exit(0)

    bot.info("Labels\n")

    arg_6 = []
    for arg_7 in arg_5:
        if arg_3 is True:
            arg_8 = ["%s:%s" %(arg_7['key'],arg_7['value']),
                     "\n%s\n\n" %"\n".join(arg_7['containers'])]
        else:
            arg_8 = ["N=%s" %len(arg_7['containers']),
                    "%s:%s" %(arg_7['key'],arg_7['value']) ]
        arg_6.append(arg_8)
    bot.table(arg_6)
    return arg_6


def
Func
(
arg_0
,
arg_1
)
:
if
isinstance
(
arg_1
,
type
)
:
return
arg_1
elif
isinstance
(
arg_1
,
string_types
)
:
if
":"
in
arg_1
:
arg_2
,
arg_3
=
arg_1
.
split
(
":"
)
if
not
arg_2
in
sys
.
modules
:
__import__
(
arg_2
)
arg_4
=
sys
.
modules
[
arg_2
]
return
arg_4
.
__dict__
[
arg_3
]
else
:
return
arg_0
.
load_class_from_locals
(
arg_1
)
else
:
arg_5
=
"Unexpected Type '%s'"
%
type
(
arg_1
)
raise
InternalCashewException
(
arg_5
)

def Func(arg_0, arg_1):
        """
        Detect if we get a class or a name, convert a name to a class.
        """
        if isinstance(arg_1, type):
            return arg_1

        elif isinstance(arg_1, string_types):
            if ":" in arg_1:
                arg_2, arg_3 = arg_1.split(":")

                if not arg_2 in sys.modules:
                    __import__(arg_2)

                arg_4 = sys.modules[arg_2]
                return arg_4.__dict__[arg_3]

            else:
                return arg_0.load_class_from_locals(arg_1)

        else:
            arg_5 = "Unexpected Type '%s'" % type(arg_1)
            raise InternalCashewException(arg_5)

Detect if we get a class or a name convert a name to a class .


def Func ( arg_0 , arg_1 ) : if not arg_0 . proc . curframe : return [ None ] arg_2 = arg_0 . proc . curframe . f_globals . copy ( ) arg_2 . update ( arg_0 . proc . curframe . f_locals ) if '.' in arg_1 : arg_3 = arg_1 . split ( '.' ) try : arg_4 = arg_2 [ arg_3 [ 0 ] ] for arg_5 in arg_3 [ 1 : - 1 ] : arg_4 = getattr ( arg_4 , arg_5 ) except ( KeyError , AttributeError ) : return [ ] arg_6 = '.' . join ( arg_3 [ : - 1 ] ) + '.' return [ arg_6 + arg_7 for arg_7 in dir ( arg_4 ) if arg_7 . startswith ( arg_3 [ - 1 ] ) ] else : return Mcomplete . complete_token ( arg_2 . keys ( ) , arg_1 )

def Func(arg_0, arg_1):
    '''Complete an arbitrary expression.'''
    if not arg_0.proc.curframe: return [None]
    # Collect globals and locals.  It is usually not really sensible to also
    # complete builtins, and they clutter the namespace quite heavily, so we
    # leave them out.
    arg_2 = arg_0.proc.curframe.f_globals.copy()
    arg_2.update(arg_0.proc.curframe.f_locals)
    if '.' in arg_1:
        # Walk an attribute chain up to the last part, similar to what
        # rlcompleter does.  This will bail if any of the parts are not
        # simple attribute access, which is what we want.
        arg_3 = arg_1.split('.')
        try:
            arg_4 = arg_2[arg_3[0]]
            for arg_5 in arg_3[1:-1]:
                arg_4 = getattr(arg_4, arg_5)
        except (KeyError, AttributeError):
            return []
        arg_6 = '.'.join(arg_3[:-1]) + '.'
        return [arg_6 + arg_7 for arg_7 in dir(arg_4) if
                arg_7.startswith(arg_3[-1])]
    else:
        # Complete a simple name.
        return Mcomplete.complete_token(arg_2.keys(), arg_1)


def Func(arg_0, arg_1):
    """This function determines whether the tracer should compute the deflections at the next plane.

    This is True if there is another plane after this plane, else it is False..

    Parameters
    -----------
    plane_index : int
        The index of the plane we are deciding if we should compute its deflections.
    total_planes : int
        The total number of planes."""

    if arg_0 < arg_1 - 1:
        return True
    elif arg_0 == arg_1 - 1:
        return False
    else:
        raise exc.RayTracingException('A galaxy was not correctly allocated its previous / next redshifts')

This function determines whether the tracer should compute the deflections at the next plane .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 is None : return { } arg_3 = { } for arg_4 in arg_0 . iter ( ) : arg_5 = arg_4 . get ( 'Id' ) if arg_5 is None : continue arg_6 = arg_4 . get ( 'Target' ) if any ( arg_6 . lower ( ) . endswith ( arg_7 ) for arg_7 in IMAGE_EXTENSIONS_TO_SKIP ) : continue if arg_6 in arg_1 : arg_8 = arg_2 . get ( arg_5 ) arg_6 = convert_image ( arg_1 [ arg_6 ] , arg_8 ) arg_3 [ arg_5 ] = cgi . escape ( arg_6 ) return arg_3

def Func(arg_0, arg_1, arg_2):
    """
    There is a separate file holds the targets to links as well as the targets
    for images. Return a dictionary based on the relationship id and the
    target.
    """
    if arg_0 is None:
        return {}
    arg_3 = {}
    # Loop through each relationship.
    for arg_4 in arg_0.iter():
        arg_5 = arg_4.get('Id')
        if arg_5 is None:
            continue
        # Store the target in the result dict.
        arg_6 = arg_4.get('Target')
        if any(
                arg_6.lower().endswith(arg_7) for
                arg_7 in IMAGE_EXTENSIONS_TO_SKIP):
            continue
        if arg_6 in arg_1:
            arg_8 = arg_2.get(arg_5)
            arg_6 = convert_image(arg_1[arg_6], arg_8)
        # cgi will replace things like & < > with & < >
        arg_3[arg_5] = cgi.escape(arg_6)

    return arg_3

There is a separate file holds the targets to links as well as the targets for images . Return a dictionary based on the relationship id and the target .


def Func ( arg_0 , arg_1 , arg_2 ) -> bool : arg_3 = arg_0 . get_all_values ( arg_1 , arg_2 , maxcnt = 2 , silent = True ) return arg_3 == [ True ]

def Func(arg_0, arg_1, arg_2) -> bool:
        """Check if expression is True and that it can not be False with current constraints"""
        arg_3 = arg_0.get_all_values(arg_1, arg_2, maxcnt=2, silent=True)
        return arg_3 == [True]


return any(((frame_num == total_frames - 1),
                ('root' in SETTINGS and (frame.get('filename') or '').lower().startswith((SETTINGS['root'] or '').lower()))))

def Func ( arg_0 , arg_1 , arg_2 ) : return any ( ( ( arg_1 == arg_2 - 1 ) , ( 'root' in SETTINGS and ( arg_0 . get ( 'filename' ) or '' ) . lower ( ) . startswith ( ( SETTINGS [ 'root' ] or '' ) . lower ( ) ) ) ) )

def Func(arg_0, arg_1, arg_2):
    """
    Returns True if we should record local variables for the given frame.
    """
    # Include the last frames locals
    # Include any frame locals that came from a file in the project's root
    return any(((arg_1 == arg_2 - 1),
                ('root' in SETTINGS and (arg_0.get('filename') or '').lower().startswith((SETTINGS['root'] or '').lower()))))

Returns True if we should record local variables for the given frame .


def Func(arg_0: arg_1) -> Callable[[arg_3, arg_5], None]:
    """Make a delete function that's bound to the manager."""

    @in_place_transformation
    def delete_node_by_hash(arg_2: arg_3, arg_4: arg_5) -> None:
        """Remove a node by identifier."""
        arg_6 = arg_0.get_dsl_by_hash(arg_4)
        arg_2.remove_node(arg_6)

    return delete_node_by_hash

Make a delete function that s bound to the manager .


def Func(arg_0):
        """ Read first header in file

        Returns:
            header (dict): keyword:value pairs of header metadata
        """
        arg_0.file_obj.seek(0)
        arg_1, arg_2 = arg_0.read_header()
        arg_0.file_obj.seek(0)
        return arg_1


def Func ( arg_0 ) : with tf . name_scope ( "mean_joint" ) : with tf . control_dependencies ( arg_0 . runtime_assertions ) : arg_1 = _broadcast_to_shape ( arg_0 . initial_state_prior . mean ( ) [ ... , tf . newaxis ] , tf . concat ( [ arg_0 . batch_shape_tensor ( ) , [ arg_0 . latent_size , 1 ] ] , axis = 0 ) ) arg_2 = _propagate_mean ( arg_1 , arg_0 . get_observation_matrix_for_timestep ( arg_0 . initial_step ) , arg_0 . get_observation_noise_for_timestep ( arg_0 . initial_step ) ) arg_3 = build_kalman_mean_step ( arg_0 . get_transition_matrix_for_timestep , arg_0 . get_transition_noise_for_timestep , arg_0 . get_observation_matrix_for_timestep , arg_0 . get_observation_noise_for_timestep ) ( arg_4 , arg_5 ) = tf . scan ( arg_3 , elems = tf . range ( arg_0 . initial_step + 1 , arg_0 . final_step ) , initializer = ( arg_1 , arg_2 ) ) arg_4 = tf . concat ( [ arg_1 [ tf . newaxis , ... ] , arg_4 ] , axis = 0 ) arg_5 = tf . concat ( [ arg_2 [ tf . newaxis , ... ] , arg_5 ] , axis = 0 ) arg_4 = tf . squeeze ( arg_4 , - 1 ) arg_4 = distribution_util . move_dimension ( arg_4 , 0 , - 2 ) arg_5 = tf . squeeze ( arg_5 , - 1 ) arg_5 = distribution_util . move_dimension ( arg_5 , 0 , - 2 ) return arg_4 , arg_5

def Func(arg_0):
    """Compute prior means for all variables via dynamic programming.

    Returns:
      latent_means: Prior means of latent states `z_t`, as a `Tensor`
        of shape `batch_shape + [num_timesteps, latent_size]`
      observation_means: Prior covariance matrices of observations
        `x_t`, as a `Tensor` of shape `batch_shape + [num_timesteps,
        observation_size]`
    """

    with tf.name_scope("mean_joint"):

      # The initial timestep is a special case, since we sample the
      # latent state from the prior rather than the transition model.

      with tf.control_dependencies(arg_0.runtime_assertions):
        # Broadcast to ensure we represent the full batch shape.
        arg_1 = _broadcast_to_shape(
            arg_0.initial_state_prior.mean()[..., tf.newaxis],
            tf.concat([arg_0.batch_shape_tensor(),
                       [arg_0.latent_size, 1]], axis=0))

      arg_2 = _propagate_mean(
          arg_1,
          arg_0.get_observation_matrix_for_timestep(arg_0.initial_step),
          arg_0.get_observation_noise_for_timestep(arg_0.initial_step))

      arg_3 = build_kalman_mean_step(
          arg_0.get_transition_matrix_for_timestep,
          arg_0.get_transition_noise_for_timestep,
          arg_0.get_observation_matrix_for_timestep,
          arg_0.get_observation_noise_for_timestep)

      # Scan over all timesteps following the initial step.
      (arg_4, arg_5) = tf.scan(
          arg_3,
          elems=tf.range(arg_0.initial_step+1, arg_0.final_step),
          initializer=(arg_1, arg_2))

      # Squish the initial step back on top of the other (scanned) timesteps
      arg_4 = tf.concat([arg_1[tf.newaxis, ...],
                                arg_4], axis=0)
      arg_5 = tf.concat([arg_2[tf.newaxis, ...],
                                     arg_5], axis=0)

      # Put dimensions back in order. The samples we've computed have
      # shape `[num_timesteps, batch_shape, size, 1]`, where `size`
      # is the dimension of the latent or observation spaces
      # respectively, but we want to return values with shape
      # `[batch_shape, num_timesteps, size]`.
      arg_4 = tf.squeeze(arg_4, -1)
      arg_4 = distribution_util.move_dimension(arg_4, 0, -2)
      arg_5 = tf.squeeze(arg_5, -1)
      arg_5 = distribution_util.move_dimension(
          arg_5, 0, -2)

      return arg_4, arg_5

Compute prior means for all variables via dynamic programming .


async def Func ( arg_0 , * , arg_1 : arg_2 [ arg_3 ] = 'US' ) -> List [ Track ] : arg_4 = [ ] arg_5 = 0 arg_6 = arg_0 . total_tracks or None while True : arg_7 = await arg_0 . __client . http . album_tracks ( arg_0 . id , limit = 50 , arg_5 = arg_5 , arg_1 = arg_1 ) if arg_6 is None : arg_6 = arg_7 [ 'total' ] arg_5 += 50 arg_4 += list ( Track ( arg_0 . __client , arg_8 ) for arg_8 in arg_7 [ 'items' ] ) if len ( arg_4 ) >= arg_6 : break return arg_4

async def Func(arg_0, *, arg_1: arg_2[arg_3] = 'US') -> List[Track]:
        """loads all of the albums tracks, depending on how many the album has this may be a long operation.

        Parameters
        ----------
        market : Optional[str]
            An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.

        Returns
        -------
        tracks : List[Track]
            The tracks of the artist.
        """
        arg_4 = []
        arg_5 = 0
        arg_6 = arg_0.total_tracks or None

        while True:
            arg_7 = await arg_0.__client.http.album_tracks(arg_0.id, limit=50, arg_5=arg_5, arg_1=arg_1)

            if arg_6 is None:
                arg_6 = arg_7['total']

            arg_5 += 50
            arg_4 += list(Track(arg_0.__client, arg_8) for arg_8 in arg_7['items'])

            if len(arg_4) >= arg_6:
                break

        return arg_4

loads all of the albums tracks depending on how many the album has this may be a long operation .


def Func ( arg_0 = None ) : arg_0 = arg_0 or env . SITE arg_1 = set ( ) for arg_2 , arg_3 in six . iteritems ( env . available_sites_by_host ) : for arg_4 in arg_3 : if arg_4 == arg_0 : arg_5 = get_host_ip ( arg_2 ) if arg_5 : arg_1 . add ( arg_5 ) break return list ( arg_1 )

def Func(arg_0=None):
    """
    Returns a list of hosts that have been configured to support the given site.
    """
    arg_0 = arg_0 or env.SITE
    arg_1 = set()
    for arg_2, arg_3 in six.iteritems(env.available_sites_by_host):
#         print('checking hostname:',hostname, _sites)
        for arg_4 in arg_3:
            if arg_4 == arg_0:
#                 print( '_site:',_site)
                arg_5 = get_host_ip(arg_2)
#                 print( 'host_ip:',host_ip)
                if arg_5:
                    arg_1.add(arg_5)
                    break
    return list(arg_1)

Returns a list of hosts that have been configured to support the given site .


def Func ( arg_0 , arg_1 ) : for arg_2 in arg_1 : try : if PurePath ( arg_0 ) . match ( arg_2 ) : return True except TypeError : pass return False

def Func(arg_0, arg_1):
        """Given a list of patterns, returns a if a path matches any pattern."""
        for arg_2 in arg_1:
            try:
                if PurePath(arg_0).match(arg_2):
                    return True
            except TypeError:
                pass
        return False

Given a list of patterns returns a if a path matches any pattern .


def Func ( ) : if _CON_SYM_ in globals ( ) : arg_0 = globals ( ) . pop ( _CON_SYM_ ) if not getattr ( arg_0 , '_session' ) . start ( ) : arg_0 . stop ( )

def Func():
    """
    Stop and destroy Bloomberg connection
    """
    if _CON_SYM_ in globals():
        arg_0 = globals().pop(_CON_SYM_)
        if not getattr(arg_0, '_session').start(): arg_0.stop()


(self, context, network_id, base_net_driver)

def Func(arg_0, arg_1, arg_2, arg_3):
        """Return a dict of extra network information.

        :param context: neutron request context.
        :param network_id: neturon network id.
        :param net_driver: network driver associated with network_id.
        :raises IronicException: Any unexpected data fetching failures will
            be logged and IronicException raised.

        This driver can attach to networks managed by other drivers. We may
        need some information from these drivers, or otherwise inform
        downstream about the type of network we are attaching to. We can
        make these decisions here.
        """
        arg_4 = arg_3.get_name()
        arg_5 = {"network_type": arg_4}
        LOG.debug('Func: %s %s'
                  % (arg_4, arg_2))

        # If the driver is NVP, we need to look up the lswitch id we should
        # be attaching to.
        if arg_4 == 'NVP':
            LOG.debug('looking up lswitch ids for network %s'
                      % (arg_2))
            arg_6 = arg_3.get_lswitch_ids_for_network(
                arg_1, arg_2)

            if not arg_6 or len(arg_6) > 1:
                arg_7 = ('lswitch id lookup failed, %s ids found.'
                       % (len(arg_6)))
                LOG.error(arg_7)
                raise IronicException(arg_7)

            arg_8 = arg_6.pop()
            LOG.info('found lswitch for network %s: %s'
                     % (arg_2, arg_8))
            arg_5['lswitch_id'] = arg_8

        LOG.debug('Func finished: %s %s %s'
                  % (arg_4, arg_2, arg_5))
        return arg_5

Return a dict of extra network information .


def Func(arg_0, arg_1, arg_2, arg_3=None):
        """
        Add a resource needed by this Fragment.

        Other helpers, such as :func:`add_css` or :func:`add_javascript` are
        more convenient for those common types of resource.

        `text`: the actual text of this resource, as a unicode string.

        `mimetype`: the MIME type of the resource.

        `placement`: where on the page the resource should be placed:

            None: let the Fragment choose based on the MIME type.

            "head": put this resource in the ``<head>`` of the page.

            "foot": put this resource at the end of the ``<body>`` of the
            page.

        """
        if not arg_3:
            arg_3 = arg_0._default_placement(arg_2)
        arg_4 = FragmentResource('text', arg_1, arg_2, arg_3)
        arg_0._resources.append(arg_4)

Add a resource needed by this Fragment .


def Func(arg_0):
        """Cancel the completion

        should be called when the completer have to be dismissed

        This reset internal variable, clearing the temporary buffer
        of the console where the completion are shown.
        """
        arg_0._consecutive_tab = 0
        arg_0._slice_start = 0
        arg_0._console_widget._clear_temporary_buffer()
        arg_0._index = (0, 0)
        if(arg_0._sliding_interval):
            arg_0._sliding_interval = None


Start a new step. returns a context manager which allows you to
        report an error

def
Func
(
arg_0
,
arg_1
)
:
@
contextmanager
def
Func_context
(
arg_1
)
:
if
arg_0
.
event_receiver
.
current_case
is
not
:
raise
Exception
(
'cannot open a Func within a Func'
)
arg_0
.
event_receiver
.
begin_case
(
arg_1
,
arg_0
.
now_seconds
(
)
,
arg_0
.
name
)
try
:
yield
arg_0
.
event_receiver
except
:
arg_2
,
arg_3
,
arg_4
=
sys
.
exc_info
(
)
arg_0
.
event_receiver
.
error
(
'%r'
%
[
arg_2
,
arg_3
,
arg_4
]
)
raise
finally
:
arg_0
.
event_receiver
.
end_case
(
arg_1
,
arg_0
.
now_seconds
(
)
)
return
Func_context
(
arg_1
)

def Func(arg_0, arg_1):
        """Start a new Func. returns a context manager which allows you to
        report an error"""

        @contextmanager
        def Func_context(arg_1):
            if arg_0.event_receiver.current_case is not None:
                raise Exception('cannot open a Func within a Func')

            arg_0.event_receiver.begin_case(arg_1, arg_0.now_seconds(), arg_0.name)
            try:
                yield arg_0.event_receiver
            except:
                arg_2, arg_3, arg_4 = sys.exc_info()
                arg_0.event_receiver.error('%r' % [arg_2, arg_3, arg_4])
                raise
            finally:
                arg_0.event_receiver.end_case(arg_1, arg_0.now_seconds())

        return Func_context(arg_1)

Start a new step . returns a context manager which allows you to report an error


Decorator for public views that do not require authentication
    Sets an attribute in the fuction STRONGHOLD_IS_PUBLIC to True

def Func ( arg_0 ) : arg_1 = arg_0 while isinstance ( arg_1 , partial ) : arg_1 = arg_1 . func set_view_func_Func ( arg_1 ) return arg_0

def Func(arg_0):
    """
    Decorator for Func views that do not require authentication
    Sets an attribute in the fuction STRONGHOLD_IS_PUBLIC to True
    """
    arg_1 = arg_0
    while isinstance(arg_1, partial):
        arg_1 = arg_1.func
    set_view_func_Func(arg_1)

    return arg_0


(self, bottomUpInput, enableLearn, enableInference=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
)
:
if
arg_3
is
:
if
arg_2
:
arg_3
=
False
else
:
arg_3
=
True
assert
(
arg_2
or
arg_3
)
arg_4
=
arg_1
.
nonzero
(
)
[
0
]
if
arg_2
:
arg_0
.
lrnIterationIdx
+=
1
arg_0
.
iterationIdx
+=
1
if
arg_0
.
verbosity
>=
3
:
print
"\n==== PY Iteration: %d ====="
%
(
arg_0
.
iterationIdx
)
print
"Active cols:"
,
arg_4
if
arg_2
:
if
arg_0
.
lrnIterationIdx
in
Segment
.
dutyCycleTiers
:
for
arg_5
,
arg_6
in
itertools
.
product
(
xrange
(
arg_0
.
numberOfCols
)
,
xrange
(
arg_0
.
cellsPerColumn
)
)
:
for
arg_7
in
arg_0
.
cells
[
arg_5
]
[
arg_6
]
:
arg_7
.
dutyCycle
(
)
if
arg_0
.
avgInputDensity
is
:
arg_0
.
avgInputDensity
=
len
(
arg_4
)
else
:
arg_0
.
avgInputDensity
=
(
0.99
*
arg_0
.
avgInputDensity
+
0.01
*
len
(
arg_4
)
)
if
arg_3
:
arg_0
.
_updateInferenceState
(
arg_4
)
if
arg_2
:
arg_0
.
_updateLearningState
(
arg_4
)
if
arg_0
.
globalDecay
>
0.0
and
(
(
arg_0
.
lrnIterationIdx
%
arg_0
.
maxAge
)
==
0
)
:
for
arg_5
,
arg_6
in
itertools
.
product
(
xrange
(
arg_0
.
numberOfCols
)
,
xrange
(
arg_0
.
cellsPerColumn
)
)
:
arg_9
=
[
]
for
arg_7
in
arg_0
.
cells
[
arg_5
]
[
arg_6
]
:
arg_10
=
arg_0
.
lrnIterationIdx
arg_7
.
lastActiveIteration
if
arg_10
<=
arg_0
.
maxAge
:
continue
arg_11
=
[
]
for
arg_12
in
arg_7
.
syns
:
arg_12
[
2
]
=
arg_12
[
2
]
arg_0
.
globalDecay
if
arg_12
[
2
]
<=
0
:
arg_11
.
append
(
arg_12
)
if
len
(
arg_11
)
==
arg_7
.
getNumSynapses
(
)
:
arg_9
.
append
(
arg_7
)
elif
len
(
arg_11
)
>
0
:
for
arg_13
in
arg_11
:
arg_7
.
syns
.
remove
(
arg_13
)
for
arg_14
in
arg_9
:
arg_0
.
_cleanUpdatesList
(
arg_5
,
arg_6
,
arg_14
)
arg_0
.
cells
[
arg_5
]
[
arg_6
]
.
remove
(
arg_14
)
if
arg_0
.
collectStats
:
if
arg_3
:
arg_15
=
arg_0
.
infPredictedState
[
't-1'
]
else
:
arg_15
=
arg_0
.
lrnPredictedState
[
't-1'
]
arg_0
.
_updateStatsInferEnd
(
arg_0
.
_internalStats
,
arg_4
,
arg_15
,
arg_0
.
colConfidence
[
't-1'
]
)
arg_16
=
arg_0
.
_FuncOutput
(
)
arg_0
.
printComputeEnd
(
arg_16
,
learn
=
arg_2
)
arg_0
.
resetCalled
=
False
return
arg_16

def Func(arg_0, arg_1, arg_2, arg_3=None):
    """
    Handle one Func, possibly learning.

    .. note::  It is an error to have both ``enableLearn`` and
               ``enableInference`` set to False

    .. note:: By default, we don't Func the inference output when learning
              because it slows things down, but you can override this by passing
              in True for ``enableInference``.

    :param bottomUpInput: The bottom-up input as numpy list, typically from a
           spatial pooler.
    :param enableLearn: (bool) If true, perform learning
    :param enableInference: (bool) If None, default behavior is to disable the
           inference output when ``enableLearn`` is on. If true, Func the
           inference output. If false, do not Func the inference output.

    :returns: TODO: document

    """
    # As a speed optimization for now (until we need online learning), skip
    # computing the inference output while learning
    if arg_3 is None:
      if arg_2:
        arg_3 = False
      else:
        arg_3 = True

    assert (arg_2 or arg_3)

    # Get the list of columns that have bottom-up
    arg_4 = arg_1.nonzero()[0]
    if arg_2:
      arg_0.lrnIterationIdx += 1
    arg_0.iterationIdx +=  1

    if arg_0.verbosity >= 3:
      print "\n==== PY Iteration: %d =====" % (arg_0.iterationIdx)
      print "Active cols:", arg_4

    # Update segment duty cycles if we are crossing a "tier"
    # We determine if it's time to update the segment duty cycles. Since the
    # duty cycle calculation is a moving average based on a tiered alpha, it is
    # important that we update all segments on each tier boundary
    if arg_2:
      if arg_0.lrnIterationIdx in Segment.dutyCycleTiers:
        for arg_5, arg_6 in itertools.product(xrange(arg_0.numberOfCols),
                                      xrange(arg_0.cellsPerColumn)):
          for arg_7 in arg_0.cells[arg_5][arg_6]:
            arg_7.dutyCycle()

    # Update the average input density
    if arg_0.avgInputDensity is None:
      arg_0.avgInputDensity = len(arg_4)
    else:
      arg_0.avgInputDensity = (0.99 * arg_0.avgInputDensity +
                              0.01 * len(arg_4))

    # First, update the inference state
    # As a speed optimization for now (until we need online learning), skip
    # computing the inference output while learning
    if arg_3:
      arg_0._updateInferenceState(arg_4)

    # Next, update the learning state
    if arg_2:
      arg_0._updateLearningState(arg_4)

      # Apply global decay, and remove synapses and/or segments.
      # Synapses are removed if their permanence value is <= 0.
      # Segments are removed when they don't have synapses anymore.
      # Removal of synapses can trigger removal of whole segments!
      # todo: isolate the synapse/segment retraction logic so that
      # it can be called in adaptSegments, in the case where we
      # do global decay only episodically.
      if arg_0.globalDecay > 0.0 and ((arg_0.lrnIterationIdx % arg_0.maxAge) == 0):
        for arg_5, arg_6 in itertools.product(xrange(arg_0.numberOfCols),
                                      xrange(arg_0.cellsPerColumn)):

          arg_9 = [] # collect and remove outside the loop
          for arg_7 in arg_0.cells[arg_5][arg_6]:
            arg_10 = arg_0.lrnIterationIdx - arg_7.lastActiveIteration
            if arg_10 <= arg_0.maxAge:
              continue

            arg_11 = [] # collect and remove outside the loop
            for arg_12 in arg_7.syns:

              arg_12[2] = arg_12[2] - arg_0.globalDecay # decrease permanence

              if arg_12[2] <= 0:
                arg_11.append(arg_12) # add to list to delete

            # 1 for sequenceSegment flag
            if len(arg_11) == arg_7.getNumSynapses():
              arg_9.append(arg_7) # will remove the whole segment
            elif len(arg_11) > 0:
              for arg_13 in arg_11: # remove some synapses on segment
                arg_7.syns.remove(arg_13)

          for arg_14 in arg_9: # remove some segments of this cell
            arg_0._cleanUpdatesList(arg_5, arg_6, arg_14)
            arg_0.cells[arg_5][arg_6].remove(arg_14)

    # Update the prediction score stats
    # Learning always includes inference
    if arg_0.collectStats:
      if arg_3:
        arg_15 = arg_0.infPredictedState['t-1']
      else:
        arg_15 = arg_0.lrnPredictedState['t-1']
      arg_0._updateStatsInferEnd(arg_0._internalStats,
                                arg_4,
                                arg_15,
                                arg_0.colConfidence['t-1'])

    # Finally return the TM output
    arg_16 = arg_0._FuncOutput()

    # Print diagnostic information based on the current verbosity level
    arg_0.printComputeEnd(arg_16, learn=arg_2)

    arg_0.resetCalled = False
    return arg_16

Handle one compute, possibly learning.

    .. note::  It is an error to have both ``enableLearn`` and
               ``enableInference`` set to False

    .. note:: By default, we don't compute the inference output when learning
              because it slows things down, but you can override this by passing
              in True for ``enableInference``.

    :param bottomUpInput: The bottom-up input as numpy list, typically from a
           spatial pooler.
    :param enableLearn: (bool) If true, perform learning
    :param enableInference: (bool) If None, default behavior is to disable the
           inference output when ``enableLearn`` is on. If true, compute the
           inference output. If false, do not compute the inference output.

    :returns: TODO: document


return Striplog([i.copy() for i in self],
                        order=self.order,
                        source=self.source)

def Func ( arg_0 ) : return Striplog ( [ arg_1 . Func ( ) for arg_1 in arg_0 ] , order = arg_0 . order , source = arg_0 . source )

def Func(arg_0):
        """Returns a shallow Func."""
        return Striplog([arg_1.Func() for arg_1 in arg_0],
                        order=arg_0.order,
                        source=arg_0.source)


def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Packed shuffle doublewords.

        Copies doublewords from source operand (second operand) and inserts them in the destination operand
        (first operand) at locations selected with the order operand (third operand).

        :param cpu: current CPU.
        :param op0: destination operand.
        :param op1: source operand.
        :param op3: order operand.
         """
        arg_4 = arg_1.size
        arg_5 = arg_1.read()
        arg_6 = arg_2.read()
        arg_7 = Operators.ZEXTEND(arg_3.read(), arg_4)

        arg_5 = arg_5 & 0xffffffffffffffffffffffffffffffff00000000000000000000000000000000
        arg_5 |= ((arg_6 >> (((arg_7 >> 0) & 3) * 32)) & 0xffffffff)
        arg_5 |= ((arg_6 >> (((arg_7 >> 2) & 3) * 32)) & 0xffffffff) << 32
        arg_5 |= ((arg_6 >> (((arg_7 >> 4) & 3) * 32)) & 0xffffffff) << 64
        arg_5 |= ((arg_6 >> (((arg_7 >> 6) & 3) * 32)) & 0xffffffff) << 96

        arg_1.write(arg_5)


def Func ( arg_0 , arg_1 ) : arg_2 = list ( ) for arg_3 in arg_1 : for arg_4 , arg_5 in arg_3 [ "data" ] . iteritems ( ) : arg_2 . append ( arg_0 . __make_points ( "monitoring" , { "host" : arg_4 , "comment" : arg_5 . get ( "comment" ) } , arg_3 [ "timestamp" ] , { arg_6 : arg_7 for arg_6 , arg_7 in arg_5 [ "metrics" ] . iteritems ( ) } ) ) return arg_2

def Func(arg_0, arg_1):
        """
        The reason why we have two separate methods for monitoring
        and aggregates is a strong difference in incoming data.
        """
        arg_2 = list()
        for arg_3 in arg_1:
            for arg_4, arg_5 in arg_3["data"].iteritems():
                arg_2.append(
                    arg_0.__make_points(
                        "monitoring",
                        {"host": arg_4, "comment": arg_5.get("comment")},
                        arg_3["timestamp"],
                        {
                            arg_6: arg_7
                            for arg_6, arg_7 in arg_5["metrics"].iteritems()
                        }
                    )
                )
        return arg_2

The reason why we have two separate methods for monitoring and aggregates is a strong difference in incoming data .


def
Func
(
arg_0
,
arg_1
)
:
if
arg_1
.
op
!=
"or"
:
return
arg_2
=
arg_0
.
_duplicated_isinstance_types
(
arg_1
)
for
arg_3
,
arg_4
in
arg_2
.
items
(
)
:
arg_5
=
sorted
(
name
for
name
in
arg_4
)
arg_0
.
add_message
(
"consider-merging-isinstance"
,
arg_1
=
arg_1
,
args
=
(
arg_3
,
", "
.
join
(
arg_5
)
)
,
)

def Func(arg_0, arg_1):
        """Check isinstance calls which can be merged together."""
        if arg_1.op != "or":
            return

        arg_2 = arg_0._duplicated_isinstance_types(arg_1)
        for arg_3, arg_4 in arg_2.items():
            arg_5 = sorted(name for name in arg_4)
            arg_0.add_message(
                "consider-merging-isinstance",
                arg_1=arg_1,
                args=(arg_3, ", ".join(arg_5)),
            )

Check isinstance calls which can be merged together .