def
Func
(
arg_0
,
arg_1
,
arg_2
=
True
)
:
arg_3
=
"pip install -r %s"
%
arg_1
return
arg_0
.
wait
(
arg_3
,
arg_2
=
arg_2
)

def Func(arg_0, arg_1, arg_2=True):
        """
        Install all requirements contained in the given file path
        Waits for command to finish.

        Parameters
        ----------
        requirements: str
            Path to requirements.txt
        raise_on_error: bool, default True
            If True then raise ValueError if stderr is not empty
        """
        arg_3 = "pip install -r %s" % arg_1
        return arg_0.wait(arg_3, arg_2=arg_2)

Install all requirements contained in the given file path Waits for command to finish .


def
Func
(
arg_0
,
arg_1
)
:
if
not
arg_0
:
return
arg_2
=
ec2_connect
(
arg_1
)
log
(
"Rebooting instances {0}."
.
format
(
arg_0
)
)
arg_2
.
Func
(
arg_0
)
log
(
"Done"
)

def Func(arg_0, arg_1):
    '''Reboot all the instances given by its ids'''
    if not arg_0: return
    arg_2 = ec2_connect(arg_1)
    log("Rebooting instances {0}.".format(arg_0))
    arg_2.Func(arg_0)
    log("Done")


def Func ( arg_0 , arg_1 ) : print arg_0 . get_usage ( ) print arg_1 sys . exit ( 1 )

def Func(arg_0, arg_1):
  """Report usage error and exit program with error indication."""
  print arg_0.get_usage()
  print arg_1
  sys.exit(1)

Report usage error and exit program with error indication .


def Func(arg_0, arg_1, arg_2, arg_3):
        """Renames a given `instance` based on `parent_node` and `name`.

        Adds meta information like depth as well.

        """
        arg_4 = arg_1._depth + 1
        if arg_1.v_is_root:
            arg_5 = arg_2  # We add below root
        else:
            arg_5 = arg_1._branch
        if arg_2 in arg_0._root_instance._run_information:
            arg_6 = arg_2
        else:
            arg_6 = arg_1._run_branch

        arg_3._set_details(arg_4, arg_5, arg_6)

Renames a given instance based on parent_node and name .


def Func ( arg_0 , arg_1 , arg_2 = None ) : if arg_0 . _sb_r1 ( arg_1 , arg_2 ) == len ( arg_1 ) and arg_0 . _sb_ends_in_short_syllable ( arg_1 ) : return True return False

def Func(arg_0, arg_1, arg_2=None):
        """Return True iff term is a short word.

        (...according to the Porter2 specification.)

        Parameters
        ----------
        term : str
            The term to examine
        r1_prefixes : set
            Prefixes to consider

        Returns
        -------
        bool
            True iff term is a short word

        """
        if arg_0._sb_r1(arg_1, arg_2) == len(
            arg_1
        ) and arg_0._sb_ends_in_short_syllable(arg_1):
            return True
        return False


def Func ( arg_0 ) : arg_1 = { } for arg_2 in get_schemas ( ) . values ( ) : arg_1 [ arg_2 . get_uri ( ) ] = arg_2 . get_schema ( ) arg_2 = arg_0 . get_schema ( ) return jsonschema . RefResolver . from_schema ( arg_2 , arg_1 = arg_1 )

def Func(arg_0):
        """Return a jsonschema.RefResolver for the schemas.

        All schemas returned be get_schemas() are resolved locally.
        """
        arg_1 = {}
        for arg_2 in get_schemas().values():
            arg_1[arg_2.get_uri()] = arg_2.get_schema()
        arg_2 = arg_0.get_schema()
        return jsonschema.RefResolver.from_schema(arg_2, arg_1=arg_1)

Return a jsonschema . RefResolver for the schemas .


def Func ( arg_0 ) : if not os . path . isdir ( arg_0 ) : os . Func ( arg_0 ) return arg_0

def Func(arg_0):
    """
    Create directories if they do not exist, otherwise do nothing.

    Return path for convenience
    """
    if not os.path.isdir(arg_0):
        os.Func(arg_0)
    return arg_0

Create directories if they do not exist otherwise do nothing .


def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
=
)
:
arg_4
=
{
'acl'
:
arg_0
.
account_key
,
'account'
:
arg_0
.
account_key
,
'request'
:
arg_1
,
}
arg_4
.
update
(
arg_3
or
{
}
)
arg_5
=
requests
.
post
(
url
=
'https://api.logentries.com/v2/{}'
.
format
(
arg_2
)
,
headers
=
arg_0
.
headers
,
data
=
json
.
dumps
(
arg_4
)
)
if
not
arg_5
.
ok
:
raise
ServerException
(
'{}: {}'
.
format
(
arg_5
.
status_code
,
arg_5
.
text
)
)
return
arg_5
.
json
(
)

def Func(arg_0, arg_1, arg_2, arg_3=None):
        """
        A wrapper for posting things.

        :param request: The request type. Must be one of the
            :class:`ApiActions<logentries_api.base.ApiActions>`
        :type request: str

        :param uri: The API endpoint to hit. Must be one of
            :class:`ApiUri<logentries_api.base.ApiUri>`
        :type uri: str

        :param params: A dictionary of supplemental kw args
        :type params: dict

        :returns: The response of your post
        :rtype: dict

        :raises: This will raise a
            :class:`ServerException<logentries_api.exceptions.ServerException>`
            if there is an error from Logentries
        """
        arg_4 = {
            'acl': arg_0.account_key,
            'account': arg_0.account_key,
            'request': arg_1,
        }

        arg_4.update(arg_3 or {})

        arg_5 = requests.post(
            url='https://api.logentries.com/v2/{}'.format(arg_2),
            headers=arg_0.headers,
            data=json.dumps(arg_4)
        )

        if not arg_5.ok:
            raise ServerException(
                '{}: {}'.format(arg_5.status_code, arg_5.text))
        return arg_5.json()


(self, client_key, timestamp, nonce,
                                     request, request_token=None,
                                     access_token=None)

def Func(arg_0, arg_1, arg_2, arg_3,
                                     arg_4, arg_5=None,
                                     arg_6=None):
        """Validate the timestamp and nonce is used or not."""
        log.debug('Validate timestamp and nonce %r', arg_1)
        arg_7 = arg_0._noncegetter(
            arg_1=arg_1, arg_2=arg_2,
            arg_3=arg_3, arg_5=arg_5,
            arg_6=arg_6
        )
        if arg_7:
            return False
        arg_0._noncesetter(
            arg_1=arg_1, arg_2=arg_2,
            arg_3=arg_3, arg_5=arg_5,
            arg_6=arg_6
        )
        return True

Validate the timestamp and nonce is used or not .


(
            self, queue_name,
            lock_duration=30, max_size_in_megabytes=None,
            requires_duplicate_detection=False,
            requires_session=False,
            default_message_time_to_live=None,
            dead_lettering_on_message_expiration=False,
            duplicate_detection_history_time_window=None,
            max_delivery_count=None, enable_batched_operations=None)

def
Func
(
arg_0
,
arg_1
,
arg_2
=
30
,
arg_3
=
,
arg_4
=
False
,
arg_5
=
False
,
arg_6
=
,
arg_7
=
False
,
arg_8
=
,
arg_9
=
,
arg_10
=
)
:
arg_11
=
Queue
(
arg_2
=
"PT{}S"
.
format
(
int
(
arg_2
)
)
,
arg_3
=
arg_3
,
arg_4
=
arg_4
,
arg_5
=
arg_5
,
arg_6
=
arg_6
,
arg_7
=
arg_7
,
arg_8
=
arg_8
,
arg_9
=
arg_9
,
arg_10
=
arg_10
)
try
:
return
arg_0
.
mgmt_client
.
Func
(
arg_1
,
queue
=
arg_11
,
fail_on_exist
=
True
)
except
requests
.
exceptions
.
ConnectionError
as
e
:
raise
ServiceBusConnectionError
(
"Namespace: {} not found"
.
format
(
arg_0
.
service_namespace
)
,
e
)

def Func(
            arg_0, arg_1,
            arg_2=30, arg_3=None,
            arg_4=False,
            arg_5=False,
            arg_6=None,
            arg_7=False,
            arg_8=None,
            arg_9=None, arg_10=None):
        """Create a queue entity.

        :param queue_name: The name of the new queue.
        :type queue_name: str
        :param lock_duration: The lock durection in seconds for each message in the queue.
        :type lock_duration: int
        :param max_size_in_megabytes: The max size to allow the queue to grow to.
        :type max_size_in_megabytes: int
        :param requires_duplicate_detection: Whether the queue will require every message with
         a specified time frame to have a unique ID. Non-unique messages will be discarded.
         Default value is False.
        :type requires_duplicate_detection: bool
        :param requires_session: Whether the queue will be sessionful, and therefore require all
         message to have a Session ID and be received by a sessionful receiver.
         Default value is False.
        :type requires_session: bool
        :param default_message_time_to_live: The length of time a message will remain in the queue
         before it is either discarded or moved to the dead letter queue.
        :type default_message_time_to_live: ~datetime.timedelta
        :param dead_lettering_on_message_expiration: Whether to move expired messages to the
         dead letter queue. Default value is False.
        :type dead_lettering_on_message_expiration: bool
        :param duplicate_detection_history_time_window: The period within which all incoming messages
         must have a unique message ID.
        :type duplicate_detection_history_time_window: ~datetime.timedelta
        :param max_delivery_count: The maximum number of times a message will attempt to be delivered
         before it is moved to the dead letter queue.
        :type max_delivery_count: int
        :param enable_batched_operations:
        :type: enable_batched_operations: bool
        :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found.
        :raises: ~azure.common.AzureConflictHttpError if a queue of the same name already exists.
        """
        arg_11 = Queue(
            arg_2="PT{}S".format(int(arg_2)),
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5,
            arg_6=arg_6,
            arg_7=arg_7,
            arg_8=arg_8,
            arg_9=arg_9,
            arg_10=arg_10)
        try:
            return arg_0.mgmt_client.Func(arg_1, queue=arg_11, fail_on_exist=True)
        except requests.exceptions.ConnectionError as e:
            raise ServiceBusConnectionError("Namespace: {} not found".format(arg_0.service_namespace), e)


(self, jobID, completionReason, completionMsg,
                      useConnectionID = True)

'              end_time=UTC_TIMESTAMP(), '

def Func(arg_0, arg_1, arg_2, arg_3,
                      arg_4 = True):
    """ Change the status on the given job to completed

    Parameters:
    ----------------------------------------------------------------
    job:                 jobID of the job to mark as completed
    completionReason:    completionReason string
    completionMsg:       completionMsg string

    useConnectionID: True if the connection id of the calling function
    must be the same as the connection that created the job. Set
    to False for hypersearch workers
    """

    # Get a database connection and cursor
    with ConnectionFactory.get() as conn:
      arg_5 = 'UPDATE %s SET status=%%s, ' \
              '              completion_reason=%%s, ' \
              '              completion_msg=%%s, ' \
              '              end_time=UTC_TIMESTAMP(), ' \
              '              _eng_last_update_time=UTC_TIMESTAMP() ' \
              '          WHERE job_id=%%s' \
              % (arg_0.jobsTableName,)
      arg_6 = [arg_0.STATUS_COMPLETED, arg_2, arg_3,
                   arg_1]

      if arg_4:
        arg_5 += ' AND _eng_cjm_conn_id=%s'
        arg_6.append(arg_0._connectionID)

      arg_7 = conn.cursor.execute(arg_5, arg_6)

      if arg_7 != 1:
        raise RuntimeError("Tried to change the status of jobID=%s to "
                           "completed, but this job could not be found or "
                           "belongs to some other CJM" % (arg_1))


(value, true=(u'yes', u'1', u'true'), false=(u'no', u'0', u'false'),
            encoding=None)

def Func ( arg_0 , arg_1 = ( u'yes' , u'1' , u'true' ) , arg_2 = ( u'no' , u'0' , u'false' ) , arg_3 = None ) : arg_0 = Text ( arg_0 , arg_3 ) if arg_0 is not None : arg_0 = arg_0 . lower ( ) . strip ( ) if arg_0 in arg_1 : return True elif arg_0 in arg_2 : return False return None

def Func(arg_0, arg_1=(u'yes', u'1', u'true'), arg_2=(u'no', u'0', u'false'),
            arg_3=None):
    """
    Parse a value as a boolean.

    :type  value: `unicode` or `bytes`
    :param value: Text value to parse.

    :type  true: `tuple` of `unicode`
    :param true: Values to compare, ignoring case, for ``True`` values.

    :type  false: `tuple` of `unicode`
    :param false: Values to compare, ignoring case, for ``False`` values.

    :type  encoding: `bytes`
    :param encoding: Encoding to treat `bytes` values as, defaults to
        ``utf-8``.

    :rtype: `bool`
    :return: Parsed boolean or ``None`` if ``value`` did not match ``true`` or
        ``false`` values.
    """
    arg_0 = Text(arg_0, arg_3)
    if arg_0 is not None:
        arg_0 = arg_0.lower().strip()
    if arg_0 in arg_1:
        return True
    elif arg_0 in arg_2:
        return False
    return None


def Func ( arg_0 ) : arg_1 = arg_0 . get_checklist_information ( ) . get ( 'idCard' , None ) if arg_1 : return arg_0 . client . Func ( arg_1 )

def Func(arg_0):
        '''
        Get card this checklist is on.
        '''
        arg_1 = arg_0.get_checklist_information().get('idCard', None)
        if arg_1:
            return arg_0.client.Func(arg_1)


def Func ( arg_0 , arg_1 ) : if arg_0 . _len_expected is not None : arg_1 , arg_2 = arg_1 [ : arg_0 . _len_expected ] , arg_1 [ arg_0 . _len_expected : ] arg_0 . _len_expected -= len ( arg_1 ) else : arg_2 = "" arg_0 . _buffer += arg_1 if arg_0 . _len_expected == 0 : arg_1 = arg_0 . _buffer . strip ( ) if arg_1 : arg_3 = arg_1 . split ( "\r" ) for arg_4 in arg_3 : try : arg_5 = arg_0 . factory . get_stream ( ) . get_connection ( ) . parse ( arg_4 ) if arg_5 : arg_0 . factory . get_stream ( ) . received ( [ arg_5 ] ) except ValueError : pass arg_0 . _buffer = "" arg_0 . _len_expected = None arg_0 . setLineMode ( arg_2 )

def Func(arg_0, arg_1):
        """ Process data.

        Args:
            data (str): Incoming data
        """
        if arg_0._len_expected is not None:
            arg_1, arg_2 = arg_1[:arg_0._len_expected], arg_1[arg_0._len_expected:]
            arg_0._len_expected -= len(arg_1)
        else:
            arg_2 = ""

        arg_0._buffer += arg_1
        if arg_0._len_expected == 0:
            arg_1 = arg_0._buffer.strip()
            if arg_1:
                arg_3 = arg_1.split("\r")
                for arg_4 in arg_3:
                    try:
                        arg_5 = arg_0.factory.get_stream().get_connection().parse(arg_4)
                        if arg_5:
                            arg_0.factory.get_stream().received([arg_5])
                    except ValueError:
                        pass

            arg_0._buffer = ""
            arg_0._len_expected = None
            arg_0.setLineMode(arg_2)


def Func(arg_0, arg_1=None):
    """This deletes an SQS queue given its URL

    Parameters
    ----------

    queue_url : str
        The SQS URL of the queue to delete.

    client : boto3.Client or None
        If None, this function will instantiate a new `boto3.Client` object to
        use in its operations. Alternatively, pass in an existing `boto3.Client`
        instance to re-use it here.

    Returns
    -------

    bool
        True if the queue was deleted successfully. False otherwise.

    """

    if not arg_1:
        arg_1 = boto3.client('sqs')

    try:

        arg_1.delete_queue(QueueUrl=arg_0)
        return True

    except Exception as e:
        LOGEXCEPTION('could not delete the specified queue: %s'
                     % (arg_0,))
        return False


def Func ( ) -> set : try : arg_0 = arg_1 [ 'languages' ] except KeyError : arg_0 = LanguageTool . _Func ( ) arg_1 [ 'languages' ] = arg_0 return arg_0

def Func() -> set:
    """Get supported languages."""
    try:
        arg_0 = arg_1['languages']
    except KeyError:
        arg_0 = LanguageTool._Func()
        arg_1['languages'] = arg_0
    return arg_0


def Func(arg_0):
        '''
        Validates the provided config to make sure all the required fields are
        there.
        '''
        # first ensure that all the required fields are there
        for arg_1, arg_2 in arg_0.params_map.items():
            if arg_2['required']:
                if arg_1 not in arg_0.config:
                    raise ValueError("Invalid Configuration! Required parameter '%s' was not provided to Sultan.")

        # second ensure that the fields that were pased were actually fields that
        # can be used
        for arg_1 in arg_0.config.keys():
            if arg_1 not in arg_0.params_map:
                raise ValueError("Invalid Configuration! The parameter '%s' provided is not used by Sultan!" % arg_1)

Validates the provided config to make sure all the required fields are there .


def Func ( arg_0 , * arg_1 , ** arg_2 ) : if 'query' in arg_2 : arg_3 = arg_2 . pop ( 'query' ) else : arg_3 = None arg_4 = urlresolvers . Func ( arg_0 , arg_1 = arg_1 , arg_2 = arg_2 ) if arg_3 : return '{}?{}' . format ( arg_4 , django . utils . http . urlencode ( arg_3 ) ) else : return arg_4

def Func(arg_0, *arg_1, **arg_2):
	'''
	User-friendly Func. Pass arguments and keyword arguments to Django's `Func`
	as `args` and `kwargs` arguments, respectively.

	The special optional keyword argument `query` is a dictionary of query (or GET) parameters
	that can be appended to the `Func`d URL.

	Example:

		Func('products:category', categoryId = 5, query = {'page': 2})

	is equivalent to

		django.core.urlresolvers.Func('products:category', kwargs = {'categoryId': 5}) + '?page=2'

	'''
	if 'query' in arg_2:
		arg_3 = arg_2.pop('query')
	else:
		arg_3 = None
	arg_4 = urlresolvers.Func(arg_0, arg_1 = arg_1, arg_2 = arg_2)
	if arg_3:
		return '{}?{}'.format(arg_4, django.utils.http.urlencode(arg_3))
	else:
		return arg_4

User-friendly reverse. Pass arguments and keyword arguments to Django's `reverse`
	as `args` and `kwargs` arguments, respectively.

	The special optional keyword argument `query` is a dictionary of query (or GET) parameters
	that can be appended to the `reverse`d URL.

	Example:

		reverse('products:category', categoryId = 5, query = {'page': 2})

	is equivalent to

		django.core.urlresolvers.reverse('products:category', kwargs = {'categoryId': 5}) + '?page=2'

User - friendly reverse . Pass arguments and keyword arguments to Django s reverse as args and kwargs arguments respectively .


def Func(arg_0):
        """
        Get Opsgenie api_key for creating alert
        """
        arg_1 = arg_0.get_connection(arg_0.http_conn_id)
        arg_2 = arg_1.password
        if not arg_2:
            raise AirflowException('Opsgenie API Key is required for this hook, '
                                   'please check your conn_id configuration.')
        return arg_2


return {model.reactions.get_by_id(r) for ids in essential for r in ids}

def Func ( arg_0 , arg_1 = None , arg_2 = None ) : if arg_1 is None : arg_1 = arg_0 . slim_optimize ( error_value = None ) * 1E-02 arg_3 = single_reaction_deletion ( arg_0 , method = 'fba' , arg_2 = arg_2 ) arg_4 = arg_3 . loc [ arg_3 [ 'growth' ] . isna ( ) | ( arg_3 [ 'growth' ] < arg_1 ) , : ] . index return { arg_0 . reactions . get_by_id ( arg_6 ) for arg_5 in arg_4 for arg_6 in arg_5 }

def Func(arg_0, arg_1=None, arg_2=None):
    """Return a set of essential reactions.

    A reaction is considered essential if restricting its flux to zero
    causes the objective, e.g., the growth rate, to also be zero, below the
    threshold, or infeasible.

    Parameters
    ----------
    model : cobra.Model
        The model to find the essential reactions for.
    threshold : float, optional
        Minimal objective flux to be considered viable. By default this is
        1% of the maximal objective.
    processes : int, optional
        The number of parallel processes to run. Can speed up the computations
        if the number of knockouts to perform is large. If not explicitly
        passed, it will be set from the global configuration singleton.

    Returns
    -------
    set
        Set of essential reactions
    """
    if arg_1 is None:
        arg_1 = arg_0.slim_optimize(error_value=None) * 1E-02
    arg_3 = single_reaction_deletion(
        arg_0, method='fba', arg_2=arg_2)
    arg_4 = arg_3.loc[arg_3['growth'].isna() |
                              (arg_3['growth'] < arg_1), :].index
    return {arg_0.reactions.get_by_id(arg_6) for arg_5 in arg_4 for arg_6 in arg_5}


def Func ( arg_0 ) : arg_1 = arg_0 . pop ( 0 ) arg_2 = arg_1 . index ( 'download_count' ) arg_3 = sum ( int ( row [ arg_2 ] ) for row in arg_0 ) arg_0 . insert ( 0 , arg_1 ) return arg_3 , arg_2

def Func(arg_0):
    """Return the total downloads, and the downloads column"""
    arg_1 = arg_0.pop(0)
    arg_2 = arg_1.index('download_count')
    arg_3 = sum(int(row[arg_2]) for row in arg_0)

    arg_0.insert(0, arg_1)
    return arg_3, arg_2

Return the total downloads and the downloads column


return {term.identifier for term in namespace.entries}

def Func ( arg_0 : arg_1 ) -> Set [ NamespaceEntry ] : return { arg_2 . identifier for arg_2 in arg_0 . entries }

def Func(arg_0: arg_1) -> Set[NamespaceEntry]:
        """Convert a PyBEL generalized namespace entries to a set.

        Default to using the identifier, but can be overridden to use the name instead.

        >>> {term.identifier for term in namespace.entries}
        """
        return {arg_2.identifier for arg_2 in arg_0.entries}

Convert a PyBEL generalized namespace entries to a set .


def
Func
(
)
:
logging
.
info
(
'Starting HTTP server at {}:{}'
.
format
(
constants
.
DAEMON_HTTP_BIND_IP
,
constants
.
DAEMON_HTTP_BIND_PORT
)
)
arg_0
=
threading
.
Thread
(
target
=
http_server
.
app
.
run
,
args
=
(
constants
.
DAEMON_HTTP_BIND_IP
,
constants
.
DAEMON_HTTP_BIND_PORT
)
)
arg_0
.
daemon
=
True
arg_0
.
start
(
)

def Func():
    """Start the daemon's HTTP server on a separate thread.
    This server is only used for servicing container status
    requests from Dusty's custom 502 page."""
    logging.info('Starting HTTP server at {}:{}'.format(constants.DAEMON_HTTP_BIND_IP,
                                                        constants.DAEMON_HTTP_BIND_PORT))
    arg_0 = threading.Thread(target=http_server.app.run, args=(constants.DAEMON_HTTP_BIND_IP,
                                                                constants.DAEMON_HTTP_BIND_PORT))
    arg_0.daemon = True
    arg_0.start()

Start the daemon s HTTP server on a separate thread . This server is only used for servicing container status requests from Dusty s custom 502 page .


def
Func
(
arg_0
,
arg_1
)
:
if
arg_0
.
pos
&
7
:
raise
ValueError
(
'Func: need byte boundary'
)
arg_2
=
arg_0
.
data
[
arg_0
.
pos
>>
3
:
(
arg_0
.
pos
>>
3
)
+
arg_1
]
arg_0
.
pos
+=
8
*
arg_1
return
arg_2

def Func(arg_0, arg_1):
        """Read n bytes from the stream on a byte boundary.
        """
        if arg_0.pos&7: raise ValueError('Func: need byte boundary')
        arg_2 = arg_0.data[arg_0.pos>>3:(arg_0.pos>>3)+arg_1]
        arg_0.pos += 8*arg_1
        return arg_2

Read n bytes from the stream on a byte boundary .


(
            self, application_type_name, application_type_version, timeout=60, async_parameter=None, custom_headers=None, raw=False, **operation_config)

def Func(
            arg_0, arg_1, arg_2, arg_3=60, arg_4=None, arg_5=None, arg_6=False, **arg_7):
        """Removes or unregisters a Service Fabric application type from the
        cluster.

        This operation can only be performed if all application instances of
        the application type have been deleted. Once the application type is
        unregistered, no new application instances can be created for this
        particular application type.

        :param application_type_name: The name of the application type.
        :type application_type_name: str
        :param application_type_version: The version of the application type
         as defined in the application manifest.
        :type application_type_version: str
        :param timeout: The server timeout for performing the operation in
         seconds. This timeout specifies the time duration that the client is
         willing to wait for the requested operation to complete. The default
         value for this parameter is 60 seconds.
        :type timeout: long
        :param async_parameter: The flag indicating whether or not unprovision
         should occur asynchronously. When set to true, the unprovision
         operation returns when the request is accepted by the system, and the
         unprovision operation continues without any timeout limit. The default
         value is false. However, we recommend setting it to true for large
         application packages that were provisioned.
        :type async_parameter: bool
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
        """
        arg_8 = models.UnprovisionApplicationTypeDescriptionInfo(arg_2=arg_2, async_property=arg_4)

        arg_9 = "6.0"

        # Construct URL
        arg_10 = arg_0.Func.metadata['url']
        arg_11 = {
            'applicationTypeName': arg_0._serialize.url("application_type_name", arg_1, 'str')
        }
        arg_10 = arg_0._client.format_url(arg_10, **arg_11)

        # Construct parameters
        arg_12 = {}
        arg_12['api-version'] = arg_0._serialize.query("api_version", arg_9, 'str')
        if arg_3 is not None:
            arg_12['timeout'] = arg_0._serialize.query("timeout", arg_3, 'long', maximum=4294967295, minimum=1)

        # Construct headers
        arg_13 = {}
        arg_13['Content-Type'] = 'application/json; charset=utf-8'
        if arg_5:
            arg_13.update(arg_5)

        # Construct body
        arg_14 = arg_0._serialize.body(arg_8, 'UnprovisionApplicationTypeDescriptionInfo')

        # Construct and send request
        arg_15 = arg_0._client.post(arg_10, arg_12, arg_13, arg_14)
        arg_16 = arg_0._client.send(arg_15, stream=False, **arg_7)

        if arg_16.status_code not in [200, 202]:
            raise models.FabricErrorException(arg_0._deserialize, arg_16)

        if arg_6:
            arg_17 = ClientRawResponse(None, arg_16)
            return arg_17

Removes or unregisters a Service Fabric application type from the cluster .


(
            self, resource_group_name, cluster_name, persist_on_success, script_actions=None, custom_headers=None, raw=False, polling=True, **operation_config)

return LROPoller(self._client, raw_result, get_long_running_output, polling_method)

def Func(
            arg_0, arg_1, arg_2, arg_3, arg_4=None, arg_5=None, arg_6=False, arg_7=True, **arg_8):
        """Executes script actions on the specified HDInsight cluster.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster.
        :type cluster_name: str
        :param persist_on_success: Gets or sets if the scripts needs to be
         persisted.
        :type persist_on_success: bool
        :param script_actions: The list of run time script actions.
        :type script_actions:
         list[~azure.mgmt.hdinsight.models.RuntimeScriptAction]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns None or
         ClientRawResponse<None> if raw==True
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
        :raises:
         :class:`ErrorResponseException<azure.mgmt.hdinsight.models.ErrorResponseException>`
        """
        arg_9 = arg_0._Func_initial(
            arg_1=arg_1,
            arg_2=arg_2,
            arg_3=arg_3,
            arg_4=arg_4,
            arg_5=arg_5,
            arg_6=True,
            **arg_8
        )

        def get_long_running_output(arg_10):
            if arg_6:
                arg_11 = ClientRawResponse(None, arg_10)
                return arg_11

        arg_12 = arg_8.get(
            'long_running_operation_timeout',
            arg_0.config.long_running_operation_timeout)
        if arg_7 is True: arg_13 = ARMPolling(arg_12, **arg_8)
        elif arg_7 is False: arg_13 = NoPolling()
        else: arg_13 = arg_7
        return LROPoller(arg_0._client, arg_9, get_long_running_output, arg_13)

Executes script actions on the specified HDInsight cluster .


def Func ( arg_0 , arg_1 ) : ( arg_2 , arg_3 ) = arg_0 . _timeouts [ arg_1 ] arg_4 = time . time ( ) if arg_2 <= arg_4 : arg_5 = dict . pop ( arg_0 , arg_1 ) del arg_0 . _timeouts [ arg_1 ] if arg_3 : try : arg_3 ( arg_1 , arg_5 ) except TypeError : try : arg_3 ( arg_1 ) except TypeError : arg_3 ( ) return None else : return arg_2 - arg_4

def Func(arg_0, arg_1):
        """Do the expiration of a dictionary item.

        Remove the item if it has expired by now.

        :Parameters:
            - `key`: key to the object.
        :Types:
            - `key`: any hashable value
        """
        (arg_2, arg_3) = arg_0._timeouts[arg_1]
        arg_4 = time.time()
        if arg_2 <= arg_4:
            arg_5 = dict.pop(arg_0, arg_1)
            del arg_0._timeouts[arg_1]
            if arg_3:
                try:
                    arg_3(arg_1, arg_5)
                except TypeError:
                    try:
                        arg_3(arg_1)
                    except TypeError:
                        arg_3()
            return None
        else:
            return arg_2 - arg_4

Do the expiration of a dictionary item .


def Func ( arg_0 , arg_1 = 'png' , arg_2 = False ) : from io import BytesIO arg_3 = BytesIO ( ) if arg_1 == 'png' : from IPython . display import Image arg_4 = cairo . ImageSurface ( cairo . FORMAT_ARGB32 , arg_0 . WIDTH , arg_0 . HEIGHT ) arg_0 . snapshot ( arg_4 ) arg_4 . write_to_png ( arg_3 ) arg_3 . seek ( 0 ) arg_5 = arg_3 . read ( ) if arg_2 : return arg_5 else : return Image ( arg_5 ) elif arg_1 == 'svg' : from IPython . display import SVG arg_4 = cairo . SVGSurface ( arg_3 , arg_0 . WIDTH , arg_0 . HEIGHT ) arg_4 . finish ( ) arg_3 . seek ( 0 ) arg_5 = arg_3 . read ( ) if arg_2 : return arg_5 else : return SVG ( arg_5 )

def Func(arg_0, arg_1='png', arg_2=False):
        '''Returns an Image object of the current surface. Used for displaying
        output in Jupyter notebooks. Adapted from the cairo-jupyter project.'''

        from io import BytesIO

        arg_3 = BytesIO()

        if arg_1 == 'png':
            from IPython.display import Image
            arg_4 = cairo.ImageSurface(cairo.FORMAT_ARGB32, arg_0.WIDTH, arg_0.HEIGHT)
            arg_0.snapshot(arg_4)
            arg_4.write_to_png(arg_3)
            arg_3.seek(0)
            arg_5 = arg_3.read()
            if arg_2:
                return arg_5
            else:
                return Image(arg_5)
        elif arg_1 == 'svg':
            from IPython.display import SVG
            arg_4 = cairo.SVGSurface(arg_3, arg_0.WIDTH, arg_0.HEIGHT)
            arg_4.finish()
            arg_3.seek(0)
            arg_5 = arg_3.read()
            if arg_2:
                return arg_5
            else:
                return SVG(arg_5)

Returns an Image object of the current surface . Used for displaying output in Jupyter notebooks . Adapted from the cairo - jupyter project .


def Func ( arg_0 ) : if arg_0 . __Func : return arg_0 . __Func else : try : arg_0 . __Func = Chem . MolFromSmiles ( arg_0 . smiles ) return arg_0 . __Func except : return None

def Func(arg_0):
        r'''RDKit object of the chemical, without hydrogen. If RDKit is not
        available, holds None.

        For examples of what can be done with RDKit, see
        `their website <http://www.rdkit.org/docs/GettingStartedInPython.html>`_.
        '''
        if arg_0.__Func:
            return arg_0.__Func
        else:
            try:
                arg_0.__Func = Chem.MolFromSmiles(arg_0.smiles)
                return arg_0.__Func
            except:
                return None

r RDKit object of the chemical without hydrogen . If RDKit is not available holds None .


def Func(arg_0):
    """Start the event loop to collect data from the serial device."""

    # If the device isn't passed in, look for it in the config.
    if arg_0 is None:
        arg_0 = app.config.get('DEVICE')

    # If the device is *still* none, error.
    if arg_0 is None:
        print("The serial device needs to be passed in as --device or "
              "set in the config as DEVICE.")
        return

    Func_collect(arg_0)

Start the event loop to collect data from the serial device .


def Func ( arg_0 , arg_1 , arg_2 ) : if arg_0 . _token : arg_0 . logoff ( ) try : arg_3 = arg_0 . __makerequest ( 'Func' , email = arg_1 , arg_2 = arg_2 ) except FogBugzAPIError : arg_4 = sys . exc_info ( ) [ 1 ] raise FogBugzLogonError ( arg_4 ) arg_0 . _token = arg_3 . token . string if type ( arg_0 . _token ) == CData : arg_0 . _token = arg_0 . _token . encode ( 'utf-8' )

def Func(arg_0, arg_1, arg_2):
        """
        Logs the user on to FogBugz.

        Returns None for a successful login.
        """
        if arg_0._token:
            arg_0.logoff()
        try:
            arg_3 = arg_0.__makerequest(
                'Func', email=arg_1, arg_2=arg_2)
        except FogBugzAPIError:
            arg_4 = sys.exc_info()[1]
            raise FogBugzLogonError(arg_4)

        arg_0._token = arg_3.token.string
        if type(arg_0._token) == CData:
                arg_0._token = arg_0._token.encode('utf-8')


def Func(arg_0):
    """
    Returns the right half of the split complement.
    """
    arg_1 = split_complementary(arg_0)[2]
    arg_2 = complementary(arg_0)
    arg_2[3].h = arg_1.h
    arg_2[4].h = arg_1.h
    arg_2[5].h = arg_1.h

    arg_2 = colorlist(
        arg_2[0], arg_2[2], arg_2[1], arg_2[5], arg_2[4], arg_2[3]
    )

    return arg_2

Returns the right half of the split complement .


def Func(arg_0, arg_1, arg_2):
        r'''Method to obtain a sorted list methods which are valid at `T`
        according to `test_method_validity`. Considers either only user methods
        if forced is True, or all methods. User methods are first tested
        according to their listed order, and unless forced is True, then all
        methods are tested and sorted by their order in `ranked_methods`.

        Parameters
        ----------
        T : float
            Temperature at which to test methods, [K]
        P : float
            Pressure at which to test methods, [Pa]

        Returns
        -------
        sorted_valid_methods_P : list
            Sorted lists of methods valid at T and P according to
            `test_method_validity`
        '''
        # Same as select_valid_methods but with _P added to variables
        if arg_0.forced_P:
            arg_3 = list(arg_0.user_methods_P)
        else:
            arg_3 = list(arg_0.all_methods_P)

        if arg_0.user_methods_P:
            [arg_3.remove(arg_4) for arg_4 in arg_0.user_methods_P]

        arg_5 = sorted([arg_0.ranked_methods_P.index(arg_4) for arg_4 in arg_3])
        arg_6 = [arg_0.ranked_methods_P[arg_4] for arg_4 in arg_5]

        if arg_0.user_methods_P:
            [arg_6.insert(0, arg_4) for arg_4 in reversed(arg_0.user_methods_P)]

        arg_7 = []
        for arg_8 in arg_6:
            if arg_0.test_method_validity_P(arg_1, arg_2, arg_8):
                arg_7.append(arg_8)

        return arg_7

r Method to obtain a sorted list methods which are valid at T according to test_method_validity . Considers either only user methods if forced is True or all methods . User methods are first tested according to their listed order and unless forced is True then all methods are tested and sorted by their order in ranked_methods .


(filename, start, stop, n_samples, sr, mono=True)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 , arg_4 , arg_5 = True ) : with psf . SoundFile ( str ( arg_0 ) , mode = 'r' ) as soundf : arg_6 = arg_2 - arg_1 soundf . seek ( arg_1 ) arg_7 = soundf . read ( arg_6 ) . T if arg_5 : arg_7 = librosa . to_mono ( arg_7 ) arg_7 = librosa . resample ( arg_7 , soundf . samplerate , arg_4 ) arg_7 = librosa . util . fix_length ( arg_7 , arg_3 ) return arg_7

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5=True):
    '''Slice a fragment of audio from a file.

    This uses pysoundfile to efficiently seek without
    loading the entire stream.

    Parameters
    ----------
    filename : str
        Path to the input file

    start : int
        The sample index of `filename` at which the audio fragment should start

    stop : int
        The sample index of `filename` at which the audio fragment should stop (e.g. y = audio[start:stop])

    n_samples : int > 0
        The number of samples to load

    sr : int > 0
        The target sampling rate

    mono : bool
        Ensure monophonic audio

    Returns
    -------
    y : np.ndarray [shape=(n_samples,)]
        A fragment of audio sampled from `filename`

    Raises
    ------
    ValueError
        If the source file is shorter than the requested length

    '''

    with psf.SoundFile(str(arg_0), mode='r') as soundf:
        arg_6 = arg_2 - arg_1

        soundf.seek(arg_1)

        arg_7 = soundf.read(arg_6).T

        if arg_5:
            arg_7 = librosa.to_mono(arg_7)

        # Resample to initial sr
        arg_7 = librosa.resample(arg_7, soundf.samplerate, arg_4)

        # Clip to the target length exactly
        arg_7 = librosa.util.fix_length(arg_7, arg_3)

        return arg_7


(self, os_path=None, skip_sub_command=False,
                    disk_closed_callback=None)

def Func(arg_0, arg_1=None, arg_2=False,
                    arg_3=None):
        """
        A context manager yielding a stdout-suitable file-like object
        based on the optional os_path and optionally skipping any
        configured sub-command.

        :param os_path: Optional path to base the file-like object
            on.
        :param skip_sub_command: Set True to skip any configured
            sub-command filter.
        :param disk_closed_callback: If the backing of the file-like
            object is an actual file that will be closed,
            disk_closed_callback (if set) will be called with the
            on-disk path just after closing it.
        """
        arg_4 = None if arg_2 else arg_0.stdout_sub_command
        arg_5, arg_6 = arg_0._get_out_and_path(
            arg_0.stdout, arg_0.stdout_root, arg_4, arg_1)
        try:
            if hasattr(arg_5, 'stdin'):
                yield arg_5.stdin
            else:
                yield arg_5
        finally:
            if hasattr(arg_5, 'stdin'):
                arg_0._close(arg_5.stdin)
            arg_0._wait(arg_5, arg_6)
            arg_0._close(arg_5)
            if arg_3 and arg_6:
                arg_3(arg_6)

A context manager yielding a stdout - suitable file - like object based on the optional os_path and optionally skipping any configured sub - command .


def Func(arg_0, arg_1, arg_2):
        """
        Deduplicate any outgoing message requests, and send the remainder.

        Args:
            http_request: The HTTP request in whose response we want to embed the messages
            message_requests: A list of undeduplicated messages in the form of tuples of message type
                and text- for example, ('error', 'Something went wrong')
        """
        arg_3 = set(arg_2)
        for arg_4, arg_5 in arg_3:
            arg_6 = getattr(messages, arg_4)
            arg_6(arg_1, arg_5)

Deduplicate any outgoing message requests and send the remainder .


def Func(arg_0, arg_1: arg_2):
        """
        Called when a file in the monitored directory has been moved.

        Breaks move down into a delete and a create (which it is sometimes detected as!).
        :param event: the file system event
        """
        if not arg_1.is_directory and arg_0.is_data_file(arg_1.src_path):
            arg_3 = FileSystemEvent(arg_1.src_path)
            arg_3.event_type = EVENT_TYPE_DELETED
            arg_0._on_file_deleted(arg_3)

            arg_5 = FileSystemEvent(arg_1.dest_path)
            arg_5.event_type = EVENT_TYPE_CREATED
            arg_0._on_file_created(arg_5)

Called when a file in the monitored directory has been moved .


def Func(arg_0, arg_1):
        """
        Add a certificate revocation list to this store.

        The certificate revocation lists added to a store will only be used if
        the associated flags are configured to check certificate revocation
        lists.

        .. versionadded:: 16.1.0

        :param CRL crl: The certificate revocation list to add to this store.
        :return: ``None`` if the certificate revocation list was added
            successfully.
        """
        _openssl_assert(_lib.X509_STORE_Func(arg_0._store, arg_1._crl) != 0)

Add a certificate revocation list to this store .


def Func ( arg_0 , arg_1 ) : global g_node_name global arg_6 if g_node_name in arg_0 : arg_2 = arg_0 . split ( ) [ arg_3 , arg_4 , arg_5 ] = arg_0 . partition ( g_node_name ) if arg_4 : arg_2 = arg_5 . split ( ) arg_6 [ "6.node_name" ] = extract_true_string ( arg_2 [ 1 ] ) arg_1 . remove ( Func ) return True

def Func(arg_0,arg_1):
    """
    Find the slave machine where a Jenkins job was executed on.  It will save this
    information in g_failed_test_info_dict.  In addition, it will
    delete this particular function handle off the temp_func_list as we do not need
    to perform this action again.

    Parameters
    ----------

    each_line :  str
        contains a line read in from jenkins console
    temp_func_list :  list of Python function handles
        contains a list of functions that we want to invoke to extract information from
        the Jenkins console text.

    :return: bool to determine if text mining should continue on the jenkins console text
    """
    global g_node_name
    global arg_6

    if g_node_name in arg_0:
        arg_2 = arg_0.split()
        [arg_3,arg_4,arg_5] = arg_0.partition(g_node_name)

        if arg_4:
            arg_2 = arg_5.split()
            arg_6["6.node_name"] = extract_true_string(arg_2[1])
            arg_1.remove(Func)

    return True

Find the slave machine where a Jenkins job was executed on . It will save this information in g_failed_test_info_dict . In addition it will delete this particular function handle off the temp_func_list as we do not need to perform this action again .


return content, empty_files, faulty_files

def Func ( arg_0 ) : if not arg_0 . config_files_ : return { } , [ ] , [ ] arg_1 = { arg_6 : { } for arg_6 in arg_0 } arg_2 = [ ] arg_3 = [ ] for arg_4 in arg_0 . config_files_ : arg_5 = arg_0 . read_config_ ( arg_4 ) if arg_5 is None : arg_3 . append ( arg_4 ) continue elif not arg_5 : arg_2 . append ( arg_4 ) continue for arg_6 , arg_7 in arg_5 . items ( ) : arg_1 [ arg_6 ] . update ( arg_7 ) return arg_1 , arg_2 , arg_3

def Func(arg_0):
        """Read config files and set config values accordingly.

        Returns:
            (dict, list, list): respectively content of files, list of
            missing/empty files and list of files for which a parsing error
            arised.
        """
        if not arg_0.config_files_:
            return {}, [], []
        arg_1 = {arg_6: {} for arg_6 in arg_0}
        arg_2 = []
        arg_3 = []
        for arg_4 in arg_0.config_files_:
            arg_5 = arg_0.read_config_(arg_4)
            if arg_5 is None:
                arg_3.append(arg_4)
                continue
            elif not arg_5:
                arg_2.append(arg_4)
                continue
            for arg_6, arg_7 in arg_5.items():
                arg_1[arg_6].update(arg_7)
        return arg_1, arg_2, arg_3

Read config files and set config values accordingly .


(file_name, start_on=None, ignore=(), use_short=True, **queries)

def Func ( arg_0 , arg_1 = None , arg_2 = ( ) , arg_3 = True , ** arg_4 ) : with open ( arg_0 ) as template_file : return file ( template_file , arg_1 = arg_1 , arg_2 = arg_2 , arg_3 = arg_3 , ** arg_4 )

def Func(arg_0, arg_1=None, arg_2=(), arg_3=True, **arg_4):
    '''Returns a blox template from a valid file path'''
    with open(arg_0) as template_file:
        return file(template_file, arg_1=arg_1, arg_2=arg_2, arg_3=arg_3, **arg_4)


(on_travis_push, on_travis_pr, on_travis_api,
                              on_travis_cron)

def Func(arg_0, arg_1, arg_2,
                              arg_3):
    """Detect if the upload should be skipped based on the
    ``TRAVIS_EVENT_TYPE`` environment variable.

    Returns
    -------
    should_skip : `bool`
        True if the upload should be skipped based on the combination of
        ``TRAVIS_EVENT_TYPE`` and user settings.
    """
    arg_4 = os.getenv('TRAVIS_EVENT_TYPE')
    if arg_4 is None:
        raise click.UsageError(
            'Using --travis but the TRAVIS_EVENT_TYPE '
            'environment variable is not detected.')

    if arg_4 == 'push' and arg_0 is False:
        click.echo('Skipping upload on Travis push event.')
        return True
    elif arg_4 == 'pull_request' and arg_1 is False:
        click.echo('Skipping upload on Travis pull request event.')
        return True
    elif arg_4 == 'api' and arg_2 is False:
        click.echo('Skipping upload on Travis pull request event.')
        return True
    elif arg_4 == 'cron' and arg_3 is False:
        click.echo('Skipping upload on Travis cron event.')
        return True
    else:
        return False

Detect if the upload should be skipped based on the TRAVIS_EVENT_TYPE environment variable .


return True if cursor.fetchone() else False

def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
(
"SELECT {} FROM {} WHERE {}=?"
.
format
(
arg_0
.
__value__
,
arg_0
.
__tablename__
,
arg_0
.
__key__
)
,
(
arg_1
,
)
,
)
arg_3
=
sqlite3
.
connect
(
arg_0
.
sqlite_file
)
arg_4
=
arg_3
.
cursor
(
)
arg_4
.
execute
(
*
arg_2
)
return
True
if
arg_4
.
fetchone
(
)
else
False

def Func(arg_0, arg_1):
        """ Is the key `key` available?
        """
        arg_2 = (
            "SELECT {} FROM {} WHERE {}=?".format(
                arg_0.__value__, arg_0.__tablename__, arg_0.__key__
            ),
            (arg_1,),
        )
        arg_3 = sqlite3.connect(arg_0.sqlite_file)
        arg_4 = arg_3.cursor()
        arg_4.execute(*arg_2)
        return True if arg_4.fetchone() else False


return ts[index_sort], a_ch[index_sort], ts_par[index_sort]

def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : arg_4 = np . hstack ( [ arg_0 , arg_2 ] ) arg_5 = np . hstack ( [ arg_1 , arg_3 ] ) arg_6 = np . hstack ( [ np . zeros ( arg_0 . shape [ 0 ] , dtype = bool ) , np . ones ( arg_2 . shape [ 0 ] , dtype = bool ) ] ) arg_7 = arg_4 . argsort ( ) return arg_4 [ arg_7 ] , arg_6 [ arg_7 ] , arg_5 [ arg_7 ]

def Func(arg_0, arg_1, arg_2, arg_3):
    """Merge donor and acceptor timestamps and particle arrays.

    Parameters:
        ts_d (array): donor timestamp array
        ts_par_d (array): donor particles array
        ts_a (array): acceptor timestamp array
        ts_par_a (array): acceptor particles array

    Returns:
        Arrays: timestamps, acceptor bool mask, timestamp particle
    """
    arg_4 = np.hstack([arg_0, arg_2])
    arg_5 = np.hstack([arg_1, arg_3])
    arg_6 = np.hstack([np.zeros(arg_0.shape[0], dtype=bool),
                      np.ones(arg_2.shape[0], dtype=bool)])
    arg_7 = arg_4.argsort()
    return arg_4[arg_7], arg_6[arg_7], arg_5[arg_7]

Merge donor and acceptor timestamps and particle arrays .


def Func ( arg_0 ) : with os . fdopen ( os . open ( arg_0 . tokenFile , os . O_WRONLY | os . O_CREAT , 0o600 ) , "w" ) as f : f . truncate ( ) f . write ( arg_0 . userId + "\n" ) f . write ( arg_0 . tokens [ "skype" ] + "\n" ) f . write ( str ( int ( time . mktime ( arg_0 . tokenExpiry [ "skype" ] . timetuple ( ) ) ) ) + "\n" ) f . write ( arg_0 . tokens [ "reg" ] + "\n" ) f . write ( str ( int ( time . mktime ( arg_0 . tokenExpiry [ "reg" ] . timetuple ( ) ) ) ) + "\n" ) f . write ( arg_0 . msgsHost + "\n" )

def Func(arg_0):
        """
        Store details of the current connection in the named file.

        This can be used by :meth:`readToken` to re-authenticate at a later time.
        """
        # Write token file privately.
        with os.fdopen(os.open(arg_0.tokenFile, os.O_WRONLY | os.O_CREAT, 0o600), "w") as f:
            # When opening files via os, truncation must be done manually.
            f.truncate()
            f.write(arg_0.userId + "\n")
            f.write(arg_0.tokens["skype"] + "\n")
            f.write(str(int(time.mktime(arg_0.tokenExpiry["skype"].timetuple()))) + "\n")
            f.write(arg_0.tokens["reg"] + "\n")
            f.write(str(int(time.mktime(arg_0.tokenExpiry["reg"].timetuple()))) + "\n")
            f.write(arg_0.msgsHost + "\n")

Store details of the current connection in the named file .


def Func(arg_0, arg_1):
    """
    Performs PUTs rooted at the path using a directory structure
    pointed to by context.input\_.

    See :py:mod:`swiftly.cli.put` for context usage information.

    See :py:class:`CLIPut` for more information.
    """
    if not arg_0.input_:
        raise ReturnCode(
            'called Func without context.input_ set')
    if not os.path.isdir(arg_0.input_):
        raise ReturnCode(
            '%r is not a directory' % arg_0.input_)
    if not arg_1:
        raise ReturnCode(
            'uploading a directory structure requires at least a container '
            'name')
    arg_2 = arg_0.copy()
    arg_2.input_ = None
    arg_4 = arg_1.split('/', 1)[0]
    cli_put_container(arg_2, arg_4)
    arg_5 = len(arg_0.input_)
    if not arg_0.input_.endswith(os.sep):
        arg_5 += 1
    arg_6 = Concurrency(arg_0.concurrency)
    for (arg_7, arg_8, arg_9) in os.walk(arg_0.input_):
        if not arg_8 and not arg_9:
            arg_2 = arg_0.copy()
            arg_2.headers = dict(arg_0.headers)
            arg_2.headers['content-type'] = 'text/directory'
            arg_2.headers['x-object-meta-mtime'] = \
                '%f' % os.path.getmtime(arg_0.input_)
            arg_2.input_ = None
            arg_2.empty = True
            arg_12 = arg_1
            if arg_1[-1] != '/':
                arg_12 += '/'
            arg_12 += arg_7[arg_5:]
            for (arg_13, arg_14, arg_15, arg_16) in \
                    six.itervalues(arg_6.get_results()):
                if arg_14:
                    arg_6.join()
                    raise arg_14
            arg_6.spawn(arg_12, cli_put_object, arg_2, arg_12)
        else:
            for arg_17 in arg_9:
                arg_2 = arg_0.copy()
                arg_2.input_ = os.path.join(arg_7, arg_17)
                arg_12 = arg_1
                if arg_1[-1] != '/':
                    arg_12 += '/'
                if arg_7[arg_5:]:
                    arg_12 += arg_7[arg_5:] + '/'
                arg_12 += arg_17
                for (arg_13, arg_14, arg_15, arg_16) in \
                        six.itervalues(arg_6.get_results()):
                    if arg_14:
                        arg_6.join()
                        raise arg_14
                arg_6.spawn(arg_12, cli_put_object, arg_2, arg_12)
    arg_6.join()
    for (arg_13, arg_14, arg_15, arg_16) in \
            six.itervalues(arg_6.get_results()):
        if arg_14:
            raise arg_14

Performs PUTs rooted at the path using a directory structure pointed to by context . input \ _ .


def Func(arg_0, arg_1, arg_2):
        """Upload to WebDAV store."""
        try:
            arg_3 = subprocess.check_output('git remote get-url origin 2>/dev/null', shell=True)
        except subprocess.CalledProcessError:
            arg_3 = ''
        else:
            arg_3 = arg_3.decode('ascii').strip()
            arg_3 = arg_3.replace('http://', '').replace('https://', '').replace('ssh://', '')
            arg_3 = re.search(r'[^:/]+?[:/](.+)', arg_3)
            arg_3 = arg_3.group(1).replace('.git', '') if arg_3 else ''
        arg_4 = None
        with arg_0._zipped(arg_1) as handle:
            arg_5 = dict(name=arg_0.cfg.project.name, version=arg_2, arg_3=arg_3)
            arg_6 = requests.put(arg_0.params['url'].format(**arg_5),
                                 arg_7=handle.read(), headers={'Accept': 'application/json'})
            if arg_6.status_code in range(200, 300):
                notify.info("{status_code} {reason}".format(**vars(arg_6)))
                try:
                    arg_7 = arg_6.json()
                except ValueError as exc:
                    notify.warning("Didn't get a JSON response! ({})".format(exc))
                else:
                    if 'downloadUri' in arg_7:  # Artifactory
                        arg_4 = arg_7['downloadUri'] + '!/index.html'
            elif arg_6.status_code == 301:
                arg_4 = arg_6.headers['location']
            else:
                arg_7 = arg_0.cfg.copy()
                arg_7.update(arg_0.params)
                arg_7.update(vars(arg_6))
                notify.error("{status_code} {reason} for PUT to {url}".format(**arg_7))

        if not arg_4:
            notify.warning("Couldn't get URL from upload response!")
        return arg_4


def
Func
(
arg_0
,
arg_1
)
:
import
time
,
sys
print
(
"hi from engine %i"
%
id
)
sys
.
stdout
.
flush
(
)
time
.
sleep
(
arg_1
)
return
arg_0
,
arg_1

def Func(arg_0, arg_1):
    """simple function that takes args, prints a short message, sleeps for a time, and returns the same args"""
    import time,sys
    print("hi from engine %i" % id)
    sys.stdout.flush()
    time.sleep(arg_1)
    return arg_0,arg_1

simple function that takes args prints a short message sleeps for a time and returns the same args


(filename_audio, filename_jam, jam, strict=True, fmt='auto', **kwargs)

def Func ( arg_0 , arg_1 , arg_2 , arg_3 = True , arg_4 = 'auto' , ** arg_5 ) : arg_6 = arg_2 . sandbox . muda . _audio [ 'y' ] arg_7 = arg_2 . sandbox . muda . _audio [ 'sr' ] psf . write ( arg_0 , arg_6 , arg_7 , ** arg_5 ) arg_2 . Func ( arg_1 , arg_3 = arg_3 , arg_4 = arg_4 )

def Func(arg_0, arg_1, arg_2, arg_3=True, arg_4='auto', **arg_5):
    '''Save a muda jam to disk

    Parameters
    ----------
    filename_audio: str
        The path to store the audio file

    filename_jam: str
        The path to store the jams object

    strict: bool
        Strict safety checking for jams output

    fmt : str
        Output format parameter for `jams.JAMS.Func`

    kwargs
        Additional parameters to `soundfile.write`
    '''

    arg_6 = arg_2.sandbox.muda._audio['y']
    arg_7 = arg_2.sandbox.muda._audio['sr']

    # First, dump the audio file
    psf.write(arg_0, arg_6, arg_7, **arg_5)

    # Then dump the jam
    arg_2.Func(arg_1, arg_3=arg_3, arg_4=arg_4)

Save a muda jam to disk

    Parameters
    ----------
    filename_audio: str
        The path to store the audio file

    filename_jam: str
        The path to store the jams object

    strict: bool
        Strict safety checking for jams output

    fmt : str
        Output format parameter for `jams.JAMS.save`

    kwargs
        Additional parameters to `soundfile.write`


def
Func
(
arg_0
,
arg_1
,
arg_2
)
:
arg_3
=
requests
.
post
(
arg_0
.
meta_url
(
"metadata/ocp/set/"
+
arg_1
)
,
json
=
arg_2
,
verify
=
False
)
if
arg_3
.
status_code
!=
200
:
raise
RemoteDataUploadError
(
"Could not upload metadata: "
+
arg_3
.
json
(
)
[
'message'
]
)
return
arg_3
.
json
(
)

def Func(arg_0, arg_1, arg_2):
        """
        Insert new metadata into the OCP metadata database.

        Arguments:
            token (str): Token of the datum to set
            data (str): A dictionary to insert as metadata. Include `secret`.

        Returns:
            json: Info of the inserted ID (convenience) or an error message.

        Throws:
            RemoteDataUploadError: If the token is already populated, or if
                there is an issue with your specified `secret` key.
        """
        arg_3 = requests.post(arg_0.meta_url("metadata/ocp/set/" + arg_1),
                            json=arg_2, verify=False)

        if arg_3.status_code != 200:
            raise RemoteDataUploadError(
                "Could not upload metadata: " + arg_3.json()['message']
            )
        return arg_3.json()

Insert new metadata into the OCP metadata database .


def
Func
(
arg_0
)
:
if
not
arg_0
.
endswith
(
".yaml"
)
:
raise
ValueError
(
"Config file not yaml"
)
with
open
(
arg_0
,
'r'
)
as
f
:
arg_1
=
yaml
.
load
(
f
)
return
arg_1

def Func(arg_0):
  """Reads yaml config file and returns auto-typed config_dict"""
  if not arg_0.endswith(".yaml"):
    raise ValueError("Config file not yaml")

  with open(arg_0, 'r') as f:
    arg_1 = yaml.load(f)

  return arg_1

Reads yaml config file and returns auto - typed config_dict


def Func ( arg_0 ) : try : for arg_1 , arg_2 in arg_0 . _orig_sys_module_state . iteritems ( ) : setattr ( arg_3 , arg_1 , arg_2 ) except AttributeError : pass if arg_0 . _orig_sys_modules_main_mod is not None : arg_3 . modules [ arg_0 . _orig_sys_modules_main_name ] = arg_0 . _orig_sys_modules_main_mod

def Func(arg_0):
        """Restore the state of the sys module."""
        try:
            for arg_1, arg_2 in arg_0._orig_sys_module_state.iteritems():
                setattr(arg_3, arg_1, arg_2)
        except AttributeError:
            pass
        # Reset what what done in self.init_sys_modules
        if arg_0._orig_sys_modules_main_mod is not None:
            arg_3.modules[arg_0._orig_sys_modules_main_name] = arg_0._orig_sys_modules_main_mod


def Func ( arg_0 , arg_1 ) : arg_2 = arg_1 . ListFields ( ) if arg_0 . use_index_order : arg_2 . sort ( arg_5 = lambda x : x [ 0 ] . index ) for arg_3 , arg_4 in arg_2 : if _IsMapEntry ( arg_3 ) : for arg_5 in sorted ( arg_4 ) : arg_6 = arg_3 . message_type . _concrete_class ( arg_5 = arg_5 , arg_4 = arg_4 [ arg_5 ] ) arg_0 . PrintField ( arg_3 , arg_6 ) elif arg_3 . label == descriptor . FieldDescriptor . LABEL_REPEATED : for arg_7 in arg_4 : arg_0 . PrintField ( arg_3 , arg_7 ) else : arg_0 . PrintField ( arg_3 , arg_4 )

def Func(arg_0, arg_1):
    """Convert protobuf message to text format.

    Args:
      message: The protocol buffers message.
    """
    arg_2 = arg_1.ListFields()
    if arg_0.use_index_order:
      arg_2.sort(arg_5=lambda x: x[0].index)
    for arg_3, arg_4 in arg_2:
      if _IsMapEntry(arg_3):
        for arg_5 in sorted(arg_4):
          # This is slow for maps with submessage entires because it copies the
          # entire tree.  Unfortunately this would take significant refactoring
          # of this file to work around.
          #
          # TODO(haberman): refactor and optimize if this becomes an issue.
          arg_6 = arg_3.message_type._concrete_class(
              arg_5=arg_5, arg_4=arg_4[arg_5])
          arg_0.PrintField(arg_3, arg_6)
      elif arg_3.label == descriptor.FieldDescriptor.LABEL_REPEATED:
        for arg_7 in arg_4:
          arg_0.PrintField(arg_3, arg_7)
      else:
        arg_0.PrintField(arg_3, arg_4)

Convert protobuf message to text format .


return self.dist_abs(src, tar) / (len(src) + len(tar))

def Func ( arg_0 , arg_1 , arg_2 ) : if arg_1 == arg_2 : return 0.0 return arg_0 . Func_abs ( arg_1 , arg_2 ) / ( len ( arg_1 ) + len ( arg_2 ) )

def Func(arg_0, arg_1, arg_2):
        """Return the normalized indel Funcance between two strings.

        This is equivalent to normalized Levenshtein Funcance, when only
        inserts and deletes are possible.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison

        Returns
        -------
        float
            Normalized indel Funcance

        Examples
        --------
        >>> cmp = Indel()
        >>> round(cmp.Func('cat', 'hat'), 12)
        0.333333333333
        >>> round(cmp.Func('Niall', 'Neil'), 12)
        0.333333333333
        >>> round(cmp.Func('Colin', 'Cuilen'), 12)
        0.454545454545
        >>> cmp.Func('ATCG', 'TAGC')
        0.5

        """
        if arg_1 == arg_2:
            return 0.0
        return arg_0.Func_abs(arg_1, arg_2) / (len(arg_1) + len(arg_2))

Return the normalized indel distance between two strings.

        This is equivalent to normalized Levenshtein distance, when only
        inserts and deletes are possible.

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison

        Returns
        -------
        float
            Normalized indel distance

        Examples
        --------
        >>> cmp = Indel()
        >>> round(cmp.dist('cat', 'hat'), 12)
        0.333333333333
        >>> round(cmp.dist('Niall', 'Neil'), 12)
        0.333333333333
        >>> round(cmp.dist('Colin', 'Cuilen'), 12)
        0.454545454545
        >>> cmp.dist('ATCG', 'TAGC')
        0.5

Return the normalized indel distance between two strings .


def Func(arg_0, arg_1):
        """Average temperature of all disks making up the volume"""
        arg_1 = arg_0._get_volume(arg_1)
        if arg_1 is not None:
            arg_2 = arg_1["disks"]
            if arg_2 is not None:
                arg_3 = 0
                arg_4 = 0

                for arg_5 in arg_2:
                    arg_6 = arg_0.disk_temp(arg_5)
                    if arg_6 is not None:
                        arg_4 += 1
                        arg_3 += arg_6

                if arg_3 > 0 and arg_4 > 0:
                    return round(arg_3 / arg_4, 0)


def Func(arg_0, arg_1):
        """Writes data from buffer to logger"""
        if not arg_0._recursion:
            arg_0._recursion = True
            try:
                for arg_3 in arg_1.rstrip().splitlines():
                    arg_0._logger.log(arg_0._log_level, arg_3.rstrip())
            finally:
                arg_0._recursion = False
        else:
            # If stderr is redirected to stdout we can avoid further recursion by
            sys.__stderr__.Func('ERROR: Recursion in Stream redirection!')


def Func ( arg_0 , arg_1 ) : arg_2 = inspect . getmembers ( arg_0 , predicate = inspect . ismethod ) arg_3 = inspect . getmembers ( arg_1 , predicate = inspect . ismethod ) arg_3 = [ f [ 0 ] for f in arg_3 ] for arg_4 , arg_5 in arg_2 : if arg_4 . startswith ( '_' ) : continue if arg_4 not in arg_3 : continue if arg_5 . __doc__ is None : arg_5 = getattr ( arg_0 , arg_4 ) arg_5 . __func__ . __doc__ = getattr ( arg_1 , arg_4 ) . __func__ . __doc__

def Func(arg_0, arg_1):
    """
    Apply the documentation from ``superclass`` to ``subclass`` by filling
    in all overridden member function docstrings with those from the
    parent class
    """
    arg_2 = inspect.getmembers(arg_0, predicate=inspect.ismethod)
    arg_3 = inspect.getmembers(arg_1, predicate=inspect.ismethod)

    arg_3 = [f[0] for f in arg_3]

    for arg_4, arg_5 in arg_2:
        if arg_4.startswith('_'):
            continue

        if arg_4 not in arg_3:
            continue

        if arg_5.__doc__ is None:
            arg_5 = getattr(arg_0, arg_4)
            arg_5.__func__.__doc__ = getattr(arg_1, arg_4).__func__.__doc__

Apply the documentation from superclass to subclass by filling in all overridden member function docstrings with those from the parent class


def
Func
(
arg_0
,
arg_1
,
arg_2
=
60
)
:
if
not
arg_1
.
strip
(
)
:
return
arg_1
arg_3
=
1
while
len
(
strip_codes
(
arg_1
)
)
<
arg_2
:
arg_4
=
arg_0
.
find_word_end
(
arg_1
,
arg_3
)
if
arg_4
<
0
:
arg_3
=
1
arg_4
=
arg_0
.
find_word_end
(
arg_1
,
arg_3
)
if
arg_4
<
0
:
arg_1
=
''
.
join
(
(
' '
,
arg_1
)
)
else
:
arg_1
=
' '
.
join
(
(
arg_1
[
:
arg_4
]
,
arg_1
[
arg_4
:
]
)
)
arg_3
+=
1
if
' '
not
in
strip_codes
(
arg_1
)
.
strip
(
)
:
return
arg_1
.
replace
(
' '
,
''
)
return
arg_1

def Func(arg_0, arg_1, arg_2=60):
        """ Insert spaces between words until it is wide enough for `width`.
        """
        if not arg_1.strip():
            return arg_1
        # Word index, which word to insert on (cycles between 1->len(words))
        arg_3 = 1
        while len(strip_codes(arg_1)) < arg_2:
            arg_4 = arg_0.find_word_end(arg_1, arg_3)
            if arg_4 < 0:
                # Reached the end?, try starting at the front again.
                arg_3 = 1
                arg_4 = arg_0.find_word_end(arg_1, arg_3)
            if arg_4 < 0:
                # There are no spaces to expand, just prepend one.
                arg_1 = ''.join((' ', arg_1))
            else:
                arg_1 = ' '.join((arg_1[:arg_4], arg_1[arg_4:]))
                arg_3 += 1

        # Don't push a single word all the way to the right.
        if ' ' not in strip_codes(arg_1).strip():
            return arg_1.replace(' ', '')
        return arg_1

Insert spaces between words until it is wide enough for width .


Returns a list of descendents of this node.

def Func ( arg_0 ) : arg_1 = set ( [ ] ) arg_0 . _depth_descend ( arg_0 , arg_1 ) try : arg_1 . remove ( arg_0 ) except KeyError : pass return list ( arg_1 )

def Func(arg_0):
        """Returns a list of Func of this node."""
        arg_1 = set([])
        arg_0._depth_descend(arg_0, arg_1)
        try:
            arg_1.remove(arg_0)
        except KeyError:
            # we weren't descendent of ourself, that's ok
            pass

        return list(arg_1)

Returns a list of descendents of this node .


def
Func
(
arg_0
,
arg_1
)
:
if
isinstance
(
arg_1
,
ElementClass
)
:
arg_0
.
_payload
=
[
XMLPayload
(
arg_1
)
]
elif
isinstance
(
arg_1
,
StanzaPayload
)
:
arg_0
.
_payload
=
[
arg_1
]
else
:
raise
TypeError
(
"Bad payload type"
)
arg_0
.
_dirty
=
True

def Func(arg_0, arg_1):
        """Set stanza payload to a single item.

        All current stanza content of will be dropped.
        Marks the stanza dirty.

        :Parameters:
            - `payload`: XML element or stanza payload object to use
        :Types:
            - `payload`: :etree:`ElementTree.Element` or `StanzaPayload`
        """
        if isinstance(arg_1, ElementClass):
            arg_0._payload = [ XMLPayload(arg_1) ]
        elif isinstance(arg_1, StanzaPayload):
            arg_0._payload = [ arg_1 ]
        else:
            raise TypeError("Bad payload type")
        arg_0._dirty = True


return GridStack(regular=regular_padded_grid, sub=sub_padded_grid, blurring=np.array([[0.0, 0.0]]))

def Func(arg_0, arg_1, arg_2, arg_3):
        """Setup a grid-stack of masked grid_stack from a mask,  sub-grid size and psf-shape.

        Parameters
        -----------
        mask : Mask
            The mask whose masked pixels the grid-stack are setup using.
        sub_grid_size : int
            The size of a sub-pixels sub-grid (sub_grid_size x sub_grid_size).
        psf_shape : (int, int)
            The shape of the PSF used in the analysis, which defines the mask's blurring-region.
        """
        arg_4 = PaddedRegularGrid.padded_grid_from_shape_psf_shape_and_pixel_scale(
            shape=arg_1.shape,
            arg_3=arg_3,
            pixel_scale=arg_1.pixel_scale)
        arg_5 = PaddedSubGrid.padded_grid_from_mask_sub_grid_size_and_psf_shape(arg_1=arg_1,
                                                                                arg_2=arg_2,
                                                                                arg_3=arg_3)
        # TODO : The blurring grid is not used when the grid mapper is called, the 0.0 0.0 stops errors inr ayT_racing
        # TODO : implement a more explicit solution
        return GridStack(regular=arg_4, sub=arg_5, blurring=np.array([[0.0, 0.0]]))

Setup a grid - stack of masked grid_stack from a mask sub - grid size and psf - shape .


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_3 = etree . Element ( "ChangeResourceRecordSetsRequest" , xmlns = arg_0 . _xml_namespace ) arg_4 = etree . SubElement ( arg_3 , "ChangeBatch" ) if arg_2 : arg_5 = etree . SubElement ( arg_4 , "Comment" ) arg_5 . text = arg_2 arg_7 = etree . SubElement ( arg_4 , "Changes" ) for arg_8 in arg_1 . deletions + arg_1 . creations : arg_7 . append ( write_change ( arg_8 ) ) arg_9 = etree . ElementTree ( element = arg_3 ) arg_10 = BytesIO ( ) arg_9 . write ( arg_10 , xml_declaration = True , encoding = 'utf-8' , method = "xml" ) return arg_10 . getvalue ( ) . decode ( 'utf-8' )

def Func(arg_0, arg_1, arg_2=None):
    """
    Forms an XML string that we'll send to Route53 in order to change
    record sets.

    :param Route53Connection connection: The connection instance used to
        query the API.
    :param change_set.ChangeSet change_set: The ChangeSet object to create the
        XML doc from.
    :keyword str comment: An optional comment to go along with the request.
    """

    arg_3 = etree.Element(
        "ChangeResourceRecordSetsRequest",
        xmlns=arg_0._xml_namespace
    )

    arg_4 = etree.SubElement(arg_3, "ChangeBatch")

    if arg_2:
        arg_5 = etree.SubElement(arg_4, "Comment")
        arg_5.text = arg_2

    arg_7 = etree.SubElement(arg_4, "Changes")

    # Deletions need to come first in the change sets.
    for arg_8 in arg_1.deletions + arg_1.creations:
        arg_7.append(write_change(arg_8))

    arg_9 = etree.ElementTree(element=arg_3)

    #print(prettyprint_xml(e_root))

    arg_10 = BytesIO()
    # This writes bytes.
    arg_9.write(arg_10, xml_declaration=True, encoding='utf-8', method="xml")
    return arg_10.getvalue().decode('utf-8')

Forms an XML string that we ll send to Route53 in order to change record sets .


def Func ( arg_0 ) : arg_1 = get_namespace ( arg_0 , 'w' ) arg_2 = arg_0 . find ( '%srPr' % arg_1 ) if arg_2 is None : return False arg_3 = arg_2 . find ( '%sb' % arg_1 ) return style_is_false ( arg_3 )

def Func(arg_0):
    """
    The function will return True if the r tag passed in is considered bold.
    """
    arg_1 = get_namespace(arg_0, 'w')
    arg_2 = arg_0.find('%srPr' % arg_1)
    if arg_2 is None:
        return False
    arg_3 = arg_2.find('%sb' % arg_1)
    return style_is_false(arg_3)

The function will return True if the r tag passed in is considered bold .


def Func ( arg_0 , arg_1 , arg_2 , arg_3 ) : for arg_4 , arg_5 in arg_1 : arg_3 . model . json = arg_5 arg_3 . model . created = arg_2 . replace ( tzinfo = None ) arg_3 . model . updated = arg_4 . replace ( tzinfo = None ) db . session . commit ( ) return Record ( arg_3 . model . json , arg_6 = arg_3 . model )

def Func(arg_0, arg_1, arg_2, arg_3):
        """Update an existing record."""
        for arg_4, arg_5 in arg_1:
            arg_3.model.json = arg_5
            arg_3.model.created = arg_2.replace(tzinfo=None)
            arg_3.model.updated = arg_4.replace(tzinfo=None)
            db.session.commit()
        return Record(arg_3.model.json, arg_6=arg_3.model)


return self._nn_interface._add_generic(self, type_name=PARAMETER,
                                               group_type_name=PARAMETER_GROUP,
                                               args=args, kwargs=kwargs)

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

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

        >>> new_parameter = Parameter('group1.group2.myparam', data=42, comment='Example!')
        >>> traj.Func(new_parameter)

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

        >>> traj.Func('group1.group2.myparam', 42, comment='Example!')

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

        >>> traj.Func(PickleParameter,'group1.group2.myparam', data=42, comment='Example!')

        The full name of the current node is added as a prefix to the given parameter name.
        If the current node is the trajectory the prefix `'parameters'` is added to the name.

        Note, all non-keyword and keyword parameters apart from the optional constructor
        are passed on as is to the constructor.

        Moreover, you always should specify a default data value of a parameter,
        even if you want to explore it later.

        """
        return arg_0._nn_interface._add_generic(arg_0, type_name=PARAMETER,
                                               group_type_name=PARAMETER_GROUP,
                                               arg_1=arg_1, arg_2=arg_2)

Adds a parameter under the current node.

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

        >>> new_parameter = Parameter('group1.group2.myparam', data=42, comment='Example!')
        >>> traj.f_add_parameter(new_parameter)

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

        >>> traj.f_add_parameter('group1.group2.myparam', 42, comment='Example!')

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

        >>> traj.f_add_parameter(PickleParameter,'group1.group2.myparam', data=42, comment='Example!')

        The full name of the current node is added as a prefix to the given parameter name.
        If the current node is the trajectory the prefix `'parameters'` is added to the name.

        Note, all non-keyword and keyword parameters apart from the optional constructor
        are passed on as is to the constructor.

        Moreover, you always should specify a default data value of a parameter,
        even if you want to explore it later.

Adds a parameter under the current node .


return cls(array=array_util.numpy_array_2d_from_fits(file_path, hdu), pixel_scale=pixel_scale)

def Func(arg_0, arg_1, arg_2, arg_3):
        """
        Loads the PSF from a .fits file.

        Parameters
        ----------
        pixel_scale
        file_path: String
            The path to the file containing the PSF
        hdu : int
            The HDU the PSF is stored in the .fits file.
        """
        return arg_0(array=array_util.numpy_array_2d_from_fits(arg_1, arg_2), arg_3=arg_3)


(a, b, fromfile='', tofile='', fromfiledate='',
                 tofiledate='', n=3, lineterm='\n')

def
Func
(
arg_0
,
arg_1
,
arg_2
=
''
,
arg_3
=
''
,
arg_4
=
''
,
arg_5
=
''
,
arg_6
=
3
,
arg_7
=
'\n'
)
:
arg_8
=
False
for
arg_9
in
SequenceMatcher
(
,
arg_0
,
arg_1
)
.
get_grouped_opcodes
(
arg_6
)
:
if
not
arg_8
:
arg_8
=
True
arg_10
=
'\t%s'
%
(
arg_4
)
if
arg_4
else
''
arg_11
=
'\t%s'
%
(
arg_5
)
if
arg_5
else
''
yield
'--- %s%s%s'
%
(
arg_2
,
arg_10
,
arg_7
)
yield
'+++ %s%s%s'
%
(
arg_3
,
arg_11
,
arg_7
)
arg_12
,
arg_13
=
arg_9
[
0
]
,
arg_9
[
1
]
arg_14
=
_format_range_unified
(
arg_12
[
1
]
,
arg_13
[
2
]
)
arg_15
=
_format_range_unified
(
arg_12
[
3
]
,
arg_13
[
4
]
)
yield
'@@ -%s +%s @@%s'
%
(
arg_14
,
arg_15
,
arg_7
)
for
arg_16
,
arg_17
,
arg_18
,
arg_19
,
arg_20
in
arg_9
:
if
arg_16
==
'equal'
:
for
arg_21
in
arg_0
[
arg_17
:
arg_18
]
:
yield
' '
+
arg_21
continue
if
arg_16
in
(
'replace'
,
'delete'
)
:
for
arg_21
in
arg_0
[
arg_17
:
arg_18
]
:
yield
'-'
+
arg_21
if
arg_16
in
(
'replace'
,
'insert'
)
:
for
arg_21
in
arg_1
[
arg_19
:
arg_20
]
:
yield
'+'
+
arg_21

def Func(arg_0, arg_1, arg_2='', arg_3='', arg_4='',
                 arg_5='', arg_6=3, arg_7='\n'):
    r"""
    Compare two sequences of lines; generate the delta as a unified diff.

    Unified diffs are a compact way of showing line changes and a few
    lines of context.  The number of context lines is set by 'n' which
    defaults to three.

    By default, the diff control lines (those with ---, +++, or @@) are
    created with a trailing newline.  This is helpful so that inputs
    created from file.readlines() result in diffs that are suitable for
    file.writelines() since both the inputs and outputs have trailing
    newlines.

    For inputs that do not have trailing newlines, set the lineterm
    argument to "" so that the output will be uniformly newline free.

    The unidiff format normally has a header for filenames and modification
    times.  Any or all of these may be specified using strings for
    'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'.
    The modification times are normally expressed in the ISO 8601 format.

    Example:

    >>> for line in Func('one two three four'.split(),
    ...             'zero one tree four'.split(), 'Original', 'Current',
    ...             '2005-01-26 23:30:50', '2010-04-02 10:20:52',
    ...             lineterm=''):
    ...     print line                  # doctest: +NORMALIZE_WHITESPACE
    --- Original        2005-01-26 23:30:50
    +++ Current         2010-04-02 10:20:52
    @@ -1,4 +1,4 @@
    +zero
     one
    -two
    -three
    +tree
     four
    """

    arg_8 = False
    for arg_9 in SequenceMatcher(None,arg_0,arg_1).get_grouped_opcodes(arg_6):
        if not arg_8:
            arg_8 = True
            # fromdate = '\t{}'.format(fromfiledate) if fromfiledate else ''
            arg_10 = '\t%s' % (arg_4) if arg_4 else ''
            # todate = '\t{}'.format(tofiledate) if tofiledate else ''
            arg_11 = '\t%s' % (arg_5) if arg_5 else ''
            # yield '--- {}{}{}'.format(fromfile, fromdate, lineterm)
            yield '--- %s%s%s' % (arg_2, arg_10, arg_7)
            # yield '+++ {}{}{}'.format(tofile, todate, lineterm)
            yield '+++ %s%s%s' % (arg_3, arg_11, arg_7)

        arg_12, arg_13 = arg_9[0], arg_9[-1]
        arg_14 = _format_range_unified(arg_12[1], arg_13[2])
        arg_15 = _format_range_unified(arg_12[3], arg_13[4])
        # yield '@@ -{} +{} @@{}'.format(file1_range, file2_range, lineterm)
        yield '@@ -%s +%s @@%s' % (arg_14, arg_15, arg_7)

        for arg_16, arg_17, arg_18, arg_19, arg_20 in arg_9:
            if arg_16 == 'equal':
                for arg_21 in arg_0[arg_17:arg_18]:
                    yield ' ' + arg_21
                continue
            if arg_16 in ('replace', 'delete'):
                for arg_21 in arg_0[arg_17:arg_18]:
                    yield '-' + arg_21
            if arg_16 in ('replace', 'insert'):
                for arg_21 in arg_1[arg_19:arg_20]:
                    yield '+' + arg_21

r"""
    Compare two sequences of lines; generate the delta as a unified diff.

    Unified diffs are a compact way of showing line changes and a few
    lines of context.  The number of context lines is set by 'n' which
    defaults to three.

    By default, the diff control lines (those with ---, +++, or @@) are
    created with a trailing newline.  This is helpful so that inputs
    created from file.readlines() result in diffs that are suitable for
    file.writelines() since both the inputs and outputs have trailing
    newlines.

    For inputs that do not have trailing newlines, set the lineterm
    argument to "" so that the output will be uniformly newline free.

    The unidiff format normally has a header for filenames and modification
    times.  Any or all of these may be specified using strings for
    'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'.
    The modification times are normally expressed in the ISO 8601 format.

    Example:

    >>> for line in unified_diff('one two three four'.split(),
    ...             'zero one tree four'.split(), 'Original', 'Current',
    ...             '2005-01-26 23:30:50', '2010-04-02 10:20:52',
    ...             lineterm=''):
    ...     print line                  # doctest: +NORMALIZE_WHITESPACE
    --- Original        2005-01-26 23:30:50
    +++ Current         2010-04-02 10:20:52
    @@ -1,4 +1,4 @@
    +zero
     one
    -two
    -three
    +tree
     four

r Compare two sequences of lines ; generate the delta as a unified diff .


def Func ( arg_0 , arg_1 ) : arg_2 = arg_0 . widgets [ arg_1 . name ] arg_3 = arg_2 . get_parent ( ) arg_0 . container . remove ( arg_3 ) del arg_0 . widgets [ arg_1 . name ] arg_0 . window . set_size_request ( 400 , 35 * len ( arg_0 . widgets . keys ( ) ) ) arg_0 . window . show_all ( )

def Func(arg_0, arg_1):
        """
        var was added in the bot

        :param v:
        :return:
        """
        arg_2 = arg_0.widgets[arg_1.name]

        # widgets are all in a single container ..
        arg_3 = arg_2.get_parent()
        arg_0.container.remove(arg_3)
        del arg_0.widgets[arg_1.name]

        arg_0.window.set_size_request(400, 35 * len(arg_0.widgets.keys()))
        arg_0.window.show_all()


(params, w_name, scope_name, inputs, layers, weights, names)

def
Func
(
arg_0
,
arg_1
,
arg_2
,
arg_3
,
arg_4
,
arg_5
,
arg_6
)
:
print
(
'Converting lrelu ...'
)
if
arg_6
==
'short'
:
arg_7
=
'lRELU'
+
random_string
(
3
)
elif
arg_6
==
'keep'
:
arg_7
=
arg_1
else
:
arg_7
=
arg_1
+
str
(
random
.
random
(
)
)
arg_8
=
keras
.
layers
.
LeakyReLU
(
alpha
=
arg_0
[
'alpha'
]
,
name
=
arg_7
)
arg_4
[
arg_2
]
=
arg_8
(
arg_4
[
arg_3
[
0
]
]
)

def Func(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6):
    """
    Convert leaky relu layer.

   Args:
        params: dictionary with layer parameters
        w_name: name prefix in state_dict
        scope_name: pytorch scope name
        inputs: pytorch node inputs
        layers: dictionary with keras tensors
        weights: pytorch state_dict
        names: use short names for keras layers
    """
    print('Converting lrelu ...')

    if arg_6 == 'short':
        arg_7 = 'lRELU' + random_string(3)
    elif arg_6 == 'keep':
        arg_7 = arg_1
    else:
        arg_7 = arg_1 + str(random.random())

    arg_8 = \
        keras.layers.LeakyReLU(alpha=arg_0['alpha'], name=arg_7)
    arg_4[arg_2] = arg_8(arg_4[arg_3[0]])


return std_imports, external_imports, local_imports

def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
[
]
arg_3
=
[
]
arg_4
=
[
]
arg_5
=
[
]
arg_6
=
[
]
arg_7
=
[
]
arg_8
=
[
]
arg_9
=
[
]
arg_10
=
isort
.
SortImports
(
file_contents
=
""
,
known_third_party
=
arg_0
.
config
.
known_third_party
,
known_standard_library
=
arg_0
.
config
.
known_standard_library
,
)
for
arg_11
,
arg_12
in
arg_0
.
_imports_stack
:
if
arg_12
.
startswith
(
"."
)
:
arg_13
=
"."
+
arg_12
.
split
(
"."
)
[
1
]
else
:
arg_13
=
arg_12
.
split
(
"."
)
[
0
]
arg_14
=
not
isinstance
(
arg_11
.
parent
,
astroid
.
Module
)
arg_15
=
not
arg_0
.
linter
.
is_message_enabled
(
"wrong-import-order"
,
arg_11
.
fromlineno
)
arg_16
=
arg_10
.
place_module
(
arg_13
)
arg_17
=
(
arg_11
,
arg_13
)
if
arg_16
in
(
"FUTURE"
,
"STDLIB"
)
:
arg_2
.
append
(
arg_17
)
arg_18
=
(
arg_7
or
arg_8
or
arg_9
)
if
arg_0
.
_is_fallback_import
(
arg_11
,
arg_18
)
:
continue
if
arg_18
and
not
arg_14
:
arg_0
.
add_message
(
"wrong-import-order"
,
arg_11
=
arg_11
,
args
=
(
'standard import "%s"'
%
arg_11
.
as_string
(
)
,
'"%s"'
%
arg_18
[
0
]
[
0
]
.
as_string
(
)
,
)
,
)
elif
arg_16
==
"THIRDPARTY"
:
arg_3
.
append
(
arg_17
)
arg_5
.
append
(
arg_17
)
if
not
arg_14
and
not
arg_15
:
arg_7
.
append
(
arg_17
)
arg_18
=
arg_8
or
arg_9
if
arg_18
and
not
arg_14
:
arg_0
.
add_message
(
"wrong-import-order"
,
arg_11
=
arg_11
,
args
=
(
'third party import "%s"'
%
arg_11
.
as_string
(
)
,
'"%s"'
%
arg_18
[
0
]
[
0
]
.
as_string
(
)
,
)
,
)
elif
arg_16
==
"FIRSTPARTY"
:
arg_4
.
append
(
arg_17
)
arg_5
.
append
(
arg_17
)
if
not
arg_14
and
not
arg_15
:
arg_8
.
append
(
arg_17
)
arg_18
=
arg_9
if
arg_18
and
not
arg_14
:
arg_0
.
add_message
(
"wrong-import-order"
,
arg_11
=
arg_11
,
args
=
(
'first party import "%s"'
%
arg_11
.
as_string
(
)
,
'"%s"'
%
arg_18
[
0
]
[
0
]
.
as_string
(
)
,
)
,
)
elif
arg_16
==
"LOCALFOLDER"
:
arg_6
.
append
(
(
arg_11
,
arg_13
)
)
if
not
arg_14
and
not
arg_15
:
arg_9
.
append
(
(
arg_11
,
arg_13
)
)
return
arg_2
,
arg_5
,
arg_6

def Func(arg_0, arg_1):
        """Checks imports of module `node` are grouped by category

        Imports must follow this order: standard, 3rd party, local
        """
        arg_2 = []
        arg_3 = []
        arg_4 = []
        # need of a list that holds third or first party ordered import
        arg_5 = []
        arg_6 = []
        arg_7 = []
        arg_8 = []
        arg_9 = []
        arg_10 = isort.SortImports(
            file_contents="",
            known_third_party=arg_0.config.known_third_party,
            known_standard_library=arg_0.config.known_standard_library,
        )
        for arg_11, arg_12 in arg_0._imports_stack:
            if arg_12.startswith("."):
                arg_13 = "." + arg_12.split(".")[1]
            else:
                arg_13 = arg_12.split(".")[0]
            arg_14 = not isinstance(arg_11.parent, astroid.Module)
            arg_15 = not arg_0.linter.is_message_enabled(
                "wrong-import-order", arg_11.fromlineno
            )
            arg_16 = arg_10.place_module(arg_13)
            arg_17 = (arg_11, arg_13)
            if arg_16 in ("FUTURE", "STDLIB"):
                arg_2.append(arg_17)
                arg_18 = (
                    arg_7
                    or arg_8
                    or arg_9
                )
                if arg_0._is_fallback_import(arg_11, arg_18):
                    continue
                if arg_18 and not arg_14:
                    arg_0.add_message(
                        "wrong-import-order",
                        arg_11=arg_11,
                        args=(
                            'standard import "%s"' % arg_11.as_string(),
                            '"%s"' % arg_18[0][0].as_string(),
                        ),
                    )
            elif arg_16 == "THIRDPARTY":
                arg_3.append(arg_17)
                arg_5.append(arg_17)
                if not arg_14 and not arg_15:
                    arg_7.append(arg_17)
                arg_18 = arg_8 or arg_9
                if arg_18 and not arg_14:
                    arg_0.add_message(
                        "wrong-import-order",
                        arg_11=arg_11,
                        args=(
                            'third party import "%s"' % arg_11.as_string(),
                            '"%s"' % arg_18[0][0].as_string(),
                        ),
                    )
            elif arg_16 == "FIRSTPARTY":
                arg_4.append(arg_17)
                arg_5.append(arg_17)
                if not arg_14 and not arg_15:
                    arg_8.append(arg_17)
                arg_18 = arg_9
                if arg_18 and not arg_14:
                    arg_0.add_message(
                        "wrong-import-order",
                        arg_11=arg_11,
                        args=(
                            'first party import "%s"' % arg_11.as_string(),
                            '"%s"' % arg_18[0][0].as_string(),
                        ),
                    )
            elif arg_16 == "LOCALFOLDER":
                arg_6.append((arg_11, arg_13))
                if not arg_14 and not arg_15:
                    arg_9.append((arg_11, arg_13))
        return arg_2, arg_5, arg_6

Checks imports of module node are grouped by category


return Metric.createFromTrace(trace.makeCountsTrace(),
                                  excludeResets=self.mmGetTraceResets())

def Func ( arg_0 , arg_1 ) : return Metric . createFromTrace ( arg_1 . makeCountsTrace ( ) , excludeResets = arg_0 . mmGetTraceResets ( ) )

def Func(arg_0, arg_1):
    """
    Convenience method to compute a metric over an indices trace, excluding
    resets.

    @param (IndicesTrace) Trace of indices

    @return (Metric) Metric over trace excluding resets
    """
    return Metric.createFromTrace(arg_1.makeCountsTrace(),
                                  excludeResets=arg_0.mmGetTraceResets())

Convenience method to compute a metric over an indices trace excluding resets .


def Func(arg_0):
        """
        Return the serial number of this certificate.

        :return: The serial number.
        :rtype: int
        """
        arg_1 = _lib.X509_get_serialNumber(arg_0._x509)
        arg_2 = _lib.ASN1_INTEGER_to_BN(arg_1, _ffi.NULL)
        try:
            arg_3 = _lib.BN_bn2hex(arg_2)
            try:
                arg_4 = _ffi.string(arg_3)
                arg_5 = int(arg_4, 16)
                return arg_5
            finally:
                _lib.OPENSSL_free(arg_3)
        finally:
            _lib.BN_free(arg_2)

Return the serial number of this certificate .


def
Func
(
arg_0
)
:
arg_1
=
arg_0
.
header
+
"\n"
arg_1
+=
arg_0
.
extension_lib
+
"\n"
for
arg_2
in
arg_0
.
qregs
:
arg_1
+=
arg_2
.
Func
(
)
+
"\n"
for
arg_2
in
arg_0
.
cregs
:
arg_1
+=
arg_2
.
Func
(
)
+
"\n"
for
arg_3
,
arg_4
,
arg_5
in
arg_0
.
data
:
if
arg_3
.
name
==
'measure'
:
arg_6
=
arg_4
[
0
]
arg_7
=
arg_5
[
0
]
arg_1
+=
"%s %s[%d] -> %s[%d];\n"
%
(
arg_3
.
Func
(
)
,
arg_6
[
0
]
.
name
,
arg_6
[
1
]
,
arg_7
[
0
]
.
name
,
arg_7
[
1
]
)
else
:
arg_1
+=
"%s %s;\n"
%
(
arg_3
.
Func
(
)
,
","
.
join
(
[
"%s[%d]"
%
(
arg_8
[
0
]
.
name
,
arg_8
[
1
]
)
for
arg_8
in
arg_4
+
arg_5
]
)
)
return
arg_1

def Func(arg_0):
        """Return OpenQASM string."""
        arg_1 = arg_0.header + "\n"
        arg_1 += arg_0.extension_lib + "\n"
        for arg_2 in arg_0.qregs:
            arg_1 += arg_2.Func() + "\n"
        for arg_2 in arg_0.cregs:
            arg_1 += arg_2.Func() + "\n"
        for arg_3, arg_4, arg_5 in arg_0.data:
            if arg_3.name == 'measure':
                arg_6 = arg_4[0]
                arg_7 = arg_5[0]
                arg_1 += "%s %s[%d] -> %s[%d];\n" % (arg_3.Func(),
                                                           arg_6[0].name, arg_6[1],
                                                           arg_7[0].name, arg_7[1])
            else:
                arg_1 += "%s %s;\n" % (arg_3.Func(),
                                             ",".join(["%s[%d]" % (arg_8[0].name, arg_8[1])
                                                       for arg_8 in arg_4 + arg_5]))
        return arg_1


(cls, resource: str, session: Optional[Session] = None)

def Func(arg_0, arg_1: arg_2, arg_3: arg_4[arg_5] = None) -> 'Action':
        """Store a "drop" event.

        :param resource: The normalized name of the resource to store

        Example:

        >>> from bio2bel.models import Action
        >>> Action.Func('hgnc')
        """
        arg_6 = arg_0.make_drop(arg_1)
        _store_helper(arg_6, arg_3=arg_3)
        return arg_6

Store a "drop" event.

        :param resource: The normalized name of the resource to store

        Example:

        >>> from bio2bel.models import Action
        >>> Action.store_drop('hgnc')


def Func ( arg_0 ) : arg_1 = arg_0 . db . read ( arg_0 . path , { "q" : "ls" } ) if arg_1 is None or arg_1 . json ( ) is None : return [ ] Func = [ ] for arg_3 in arg_1 . json ( ) : arg_4 = arg_0 [ arg_3 [ "name" ] ] arg_4 . metadata = arg_3 Func . append ( arg_4 ) return Func

def Func(arg_0):
        """Returns the list of devices that belong to the user"""
        arg_1 = arg_0.db.read(arg_0.path, {"q": "ls"})

        if arg_1 is None or arg_1.json() is None:
            return []
        Func = []
        for arg_3 in arg_1.json():
            arg_4 = arg_0[arg_3["name"]]
            arg_4.metadata = arg_3
            Func.append(arg_4)
        return Func


return (
            'Transaction {i} has invalid signature '
            '(using {fragments} fragments).'.format(
                fragments=len(group),
                i=group[0].current_index,
            )
        )

def Func(arg_0, arg_1):
        # type: (List[Transaction], type) -> Optional[Text]
        """
        Validates the signature fragments for a group of transactions
        using the specified sponge type.

        Note: this method assumes that the transactions in the group
        have already passed basic validation (see
        :py:meth:`_create_validator`).

        :return:
          - ``None``:  Indicates that the signature fragments are valid.
          - ``Text``:  Error message indicating the fragments are invalid.
        """
        arg_2 = validate_signature_fragments(
            fragments=[txn.signature_message_fragment for txn in arg_0],
            hash_=arg_0[0].bundle_hash,
            public_key=arg_0[0].address,
            arg_1=arg_1,
        )

        if arg_2:
            return None

        return (
            'Transaction {i} has invalid signature '
            '(using {fragments} fragments).'.format(
                fragments=len(arg_0),
                i=arg_0[0].current_index,
            )
        )

Validates the signature fragments for a group of transactions using the specified sponge type .


Returns a partial of _get_repetition that accepts only a text argument.

(extractor, bounds, *, ignore_whitespace=False)

return partial(_get_repetition, extractor, bounds=bounds, ignore_whitespace=ignore_whitespace)

def Func ( arg_0 , arg_1 , * , arg_2 = False ) : return partial ( _get_Func , arg_0 , arg_1 = arg_1 , arg_2 = arg_2 )

def Func(arg_0, arg_1, *, arg_2=False):
  """Returns a partial of _get_Func that accepts only a text argument."""
  return partial(_get_Func, arg_0, arg_1=arg_1, arg_2=arg_2)

Returns a partial of _get_repetition that accepts only a text argument .


def Func(arg_0, arg_1, arg_2):
        """
        Reads the conditional statement from the given node.

        workflow -- the workflow with which the concurrence is associated
        start_node -- the xml structure (xml.dom.minidom.Node)
        """
        # Collect all information.
        arg_3 = None
        arg_4 = None
        for arg_5 in arg_2.childNodes:
            if arg_5.nodeType != minidom.Node.ELEMENT_NODE:
                continue
            if arg_5.nodeName.lower() == 'successor':
                if arg_4 is not None:
                    _exc('Duplicate task name %s' % arg_4)
                if arg_5.firstChild is None:
                    _exc('Successor tag without a task name')
                arg_4 = arg_5.firstChild.nodeValue
            elif arg_5.nodeName.lower() in _op_map:
                if arg_3 is not None:
                    _exc('Multiple conditions are not yet supported')
                arg_3 = arg_0.deserialize_logical(arg_5)
            else:
                _exc('Unknown node: %s' % arg_5.nodeName)

        if arg_3 is None:
            _exc('Missing condition in conditional statement')
        if arg_4 is None:
            _exc('A %s has no task specified' % arg_2.nodeName)
        return arg_3, arg_4

Reads the conditional statement from the given node .


def
Func
(
arg_0
,
arg_1
)
:
arg_2
=
urlopen
(
arg_0
)
if
arg_2
.
code
!=
200
:
raise
Exception
(
'GET {} failed.'
.
format
(
arg_0
)
)
with
open
(
_get_package_path
(
arg_1
)
,
'w'
)
as
fp
:
for
arg_3
in
arg_2
:
if
not
arg_3
.
startswith
(
b'#'
)
:
fp
.
write
(
arg_3
.
decode
(
'utf8'
)
)
print
(
'Updated {}'
.
format
(
arg_1
)
)

def Func(arg_0, arg_1):
    """Update the content of a single file."""
    arg_2 = urlopen(arg_0)
    if arg_2.code != 200:
        raise Exception('GET {} failed.'.format(arg_0))
    with open(_get_package_path(arg_1), 'w') as fp:
        for arg_3 in arg_2:
            if not arg_3.startswith(b'#'):
                fp.write(arg_3.decode('utf8'))
    print('Updated {}'.format(arg_1))


def Func ( arg_0 , arg_1 , arg_2 = None ) : arg_0 = tf . clip_by_value ( arg_0 , 0. , 1. ) arg_0 = tf . unstack ( arg_0 [ : arg_2 ] ) arg_3 = [ tf . concat ( tf . unstack ( seq ) , 1 ) for seq in arg_0 ] arg_3 = tf . expand_dims ( tf . concat ( arg_3 , 0 ) , 0 ) tf . compat . v2 . summary . image ( arg_1 , arg_3 , max_outputs = 1 , step = tf . compat . v1 . train . get_or_create_global_step ( ) )

def Func(arg_0, arg_1, arg_2=None):
  """Visualizes sequences as TensorBoard summaries.

  Args:
    seqs: A tensor of shape [n, t, h, w, c].
    name: String name of this summary.
    num: Integer for the number of examples to visualize. Defaults to
      all examples.
  """
  arg_0 = tf.clip_by_value(arg_0, 0., 1.)
  arg_0 = tf.unstack(arg_0[:arg_2])
  arg_3 = [tf.concat(tf.unstack(seq), 1) for seq in arg_0]
  arg_3 = tf.expand_dims(tf.concat(arg_3, 0), 0)
  tf.compat.v2.summary.image(
      arg_1,
      arg_3,
      max_outputs=1,
      step=tf.compat.v1.train.get_or_create_global_step())

Visualizes sequences as TensorBoard summaries .


return super(Deposit, self).patch(*args, **kwargs)

def Func ( arg_0 , * arg_1 , ** arg_2 ) : return super ( Deposit , arg_0 ) . Func ( * arg_1 , ** arg_2 )

def Func(arg_0, *arg_1, **arg_2):
        """Patch only drafts.

        Status required: ``'draft'``.

        Meta information inside `_deposit` are preserved.
        """
        return super(Deposit, arg_0).Func(*arg_1, **arg_2)