sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_dump_stack_peek) function_name_dump_stack_peek (parameters (identifier_data) identifier_data (default_parameter (identifier_separator) identifier_separator (string_' ') string_' ' )default_parameter (default_parameter (identifier_width) identifier_width (integer_16) integer_16 )default_parameter (default_parameter (identifier_arch) identifier_arch (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (return_statement (string_'') string_'' )return_statement )block )if_statement (if_statement (comparison_operator (identifier_arch) identifier_arch (None) None )comparison_operator (block (expression_statement (assignment (identifier_arch) identifier_arch (attribute (identifier_win32) identifier_win32 (identifier_arch) identifier_arch )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_pointers) identifier_pointers (call (attribute (identifier_compat) identifier_compat (identifier_keys) identifier_keys )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_pointers) identifier_pointers (identifier_sort) identifier_sort )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_result) identifier_result (string_'') string_'' )assignment )expression_statement (if_statement (identifier_pointers) identifier_pointers (block (if_statement (comparison_operator (identifier_arch) identifier_arch (attribute (identifier_win32) identifier_win32 (identifier_ARCH_I386) identifier_ARCH_I386 )attribute )comparison_operator (block (expression_statement (assignment (identifier_spreg) identifier_spreg (string_'esp') string_'esp' )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_arch) identifier_arch (attribute (identifier_win32) identifier_win32 (identifier_ARCH_AMD64) identifier_ARCH_AMD64 )attribute )comparison_operator (block (expression_statement (assignment (identifier_spreg) identifier_spreg (string_'rsp') string_'rsp' )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_spreg) identifier_spreg (string_'STACK') string_'STACK' )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_tag_fmt) identifier_tag_fmt (binary_operator (string_'[%s+0x%%.%dx]') string_'[%s+0x%%.%dx]' (tuple (identifier_spreg) identifier_spreg (call (identifier_len) identifier_len (argument_list (binary_operator (string_'%x') string_'%x' (subscript (identifier_pointers) identifier_pointers (unary_operator (integer_1) integer_1 )unary_operator )subscript )binary_operator )argument_list )call )tuple )binary_operator )assignment )expression_statement (for_statement (identifier_offset) identifier_offset (identifier_pointers) identifier_pointers (block (expression_statement (assignment (identifier_dumped) identifier_dumped (call (attribute (identifier_HexDump) identifier_HexDump (identifier_hexline) identifier_hexline )attribute (argument_list (subscript (identifier_data) identifier_data (identifier_offset) identifier_offset )subscript (identifier_separator) identifier_separator (identifier_width) identifier_width )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tag) identifier_tag (binary_operator (identifier_tag_fmt) identifier_tag_fmt (identifier_offset) identifier_offset )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_result) identifier_result (binary_operator (string_'%s -> %s\n') string_'%s -> %s\n' (tuple (identifier_tag) identifier_tag (identifier_dumped) identifier_dumped )tuple )binary_operator )augmented_assignment )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Dump data from pointers guessed within the given stack dump. @type data: str @param data: Dictionary mapping stack offsets to the data they point to. @type separator: str @param separator: Separator between the hexadecimal representation of each character. @type width: int @param width: (Optional) Maximum number of characters to convert per text line. This value is also used for padding. @type arch: str @param arch: Architecture of the machine whose registers were dumped. Defaults to the current architecture. @rtype: str @return: Text suitable for logging.
(module (function_definition (function_name_cmp) function_name_cmp (parameters (identifier_self) identifier_self (identifier_range2) identifier_range2 (default_parameter (identifier_overlap_size) identifier_overlap_size (integer_0) integer_0 )default_parameter )parameters (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_overlaps) identifier_overlaps )attribute (argument_list (identifier_range2) identifier_range2 (keyword_argument (identifier_padding) identifier_padding (identifier_overlap_size) identifier_overlap_size )keyword_argument )argument_list )call (block (return_statement (integer_0) integer_0 )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_chr) identifier_chr )attribute (attribute (identifier_range2) identifier_range2 (identifier_chr) identifier_chr )attribute )comparison_operator (block (return_statement (unary_operator (integer_1) integer_1 )unary_operator )return_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_chr) identifier_chr )attribute (attribute (identifier_range2) identifier_range2 (identifier_chr) identifier_chr )attribute )comparison_operator (block (return_statement (integer_1) integer_1 )return_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_end) identifier_end )attribute (attribute (identifier_range2) identifier_range2 (identifier_start) identifier_start )attribute )comparison_operator (block (return_statement (unary_operator (integer_1) integer_1 )unary_operator )return_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_start) identifier_start )attribute (attribute (identifier_range2) identifier_range2 (identifier_end) identifier_end )attribute )comparison_operator (block (return_statement (integer_1) integer_1 )return_statement )block )elif_clause )if_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (string_"ERROR: cmp function unexpcted state\n") string_"ERROR: cmp function unexpcted state\n" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list )argument_list )call )expression_statement (return_statement (integer_0) integer_0 )return_statement )block )function_definition )module
the comparitor for ranges * return 1 if greater than range2 * return -1 if less than range2 * return 0 if overlapped :param range2: :param overlap_size: allow some padding for an 'equal' comparison (default 0) :type range2: GenomicRange :type overlap_size: int
(module (function_definition (function_name_applyns) function_name_applyns (parameters (identifier_self) identifier_self (identifier_ns) identifier_ns )parameters (block (if_statement (comparison_operator (identifier_ns) identifier_ns (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_ns) identifier_ns (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call )not_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"namespace must be a list or a tuple") string_"namespace must be a list or a tuple" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_ns) identifier_ns (integer_0) integer_0 )subscript (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_expns) identifier_expns )attribute (subscript (identifier_ns) identifier_ns (integer_1) integer_1 )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_prefix) identifier_prefix )attribute (subscript (identifier_ns) identifier_ns (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_nsprefixes) identifier_nsprefixes )attribute (subscript (identifier_ns) identifier_ns (integer_0) integer_0 )subscript )subscript (subscript (identifier_ns) identifier_ns (integer_1) integer_1 )subscript )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Apply the namespace to this node. If the prefix is I{None} then this element's explicit namespace I{expns} is set to the URI defined by I{ns}. Otherwise, the I{ns} is simply mapped. @param ns: A namespace. @type ns: (I{prefix}, I{URI})
(module (function_definition (function_name_Any) function_name_Any (parameters (list_splat_pattern (identifier_validators) identifier_validators )list_splat_pattern )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_Any) identifier_Any )argument_list )call )decorator (function_definition (function_name_built) function_name_built (parameters (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_error) identifier_error (None) None )assignment )expression_statement (for_statement (identifier_validator) identifier_validator (identifier_validators) identifier_validators (block (try_statement (block (return_statement (call (identifier_validator) identifier_validator (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_Error) identifier_Error (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_error) identifier_error (identifier_e) identifier_e )assignment )expression_statement )block )except_clause )try_statement )block )for_statement (raise_statement (identifier_error) identifier_error )raise_statement )block )function_definition )decorated_definition (return_statement (identifier_built) identifier_built )return_statement )block )function_definition )module
Combines all the given validator callables into one, running the given value through them in sequence until a valid result is given.
(module (function_definition (function_name_row_sparse_data) function_name_row_sparse_data (parameters (identifier_self) identifier_self (identifier_row_id) identifier_row_id )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__stype) identifier__stype )attribute (string_'row_sparse') string_'row_sparse' )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (concatenated_string (string_"Cannot return a copy of Parameter %s via row_sparse_data() ") string_"Cannot return a copy of Parameter %s via row_sparse_data() " (string_"because its storage type is %s. Please use data() instead.") string_"because its storage type is %s. Please use data() instead." )concatenated_string (line_continuation_\) line_continuation_\ (tuple (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (attribute (identifier_self) identifier_self (identifier__stype) identifier__stype )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__get_row_sparse) identifier__get_row_sparse )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute (attribute (identifier_row_id) identifier_row_id (identifier_context) identifier_context )attribute (identifier_row_id) identifier_row_id )argument_list )call )return_statement )block )function_definition )module
Returns a copy of the 'row_sparse' parameter on the same context as row_id's. The copy only retains rows whose ids occur in provided row ids. The parameter must have been initialized on this context before. Parameters ---------- row_id: NDArray Row ids to retain for the 'row_sparse' parameter. Returns ------- NDArray on row_id's context
(module (function_definition (function_name_validate_get_dbs) function_name_validate_get_dbs (parameters (identifier_connection) identifier_connection )parameters (block (expression_statement (assignment (identifier_remote_dbs) identifier_remote_dbs (call (identifier_set) identifier_set (argument_list (call (attribute (call (attribute (identifier_rethinkdb) identifier_rethinkdb (identifier_db_list) identifier_db_list )attribute (argument_list )argument_list )call (identifier_run) identifier_run )attribute (argument_list (identifier_connection) identifier_connection )argument_list )call )argument_list )call )assignment )expression_statement (assert_statement (identifier_remote_dbs) identifier_remote_dbs )assert_statement (return_statement (identifier_remote_dbs) identifier_remote_dbs )return_statement )block )function_definition )module
validates the connection object is capable of read access to rethink should be at least one test database by default :param connection: <rethinkdb.net.DefaultConnection> :return: <set> list of databases :raises: ReqlDriverError AssertionError
(module (function_definition (function_name_bonded) function_name_bonded (parameters (identifier_self) identifier_self (identifier_n1) identifier_n1 (identifier_n2) identifier_n2 (identifier_distance) identifier_distance )parameters (block (if_statement (comparison_operator (identifier_distance) identifier_distance (binary_operator (attribute (identifier_self) identifier_self (identifier_max_length) identifier_max_length )attribute (attribute (identifier_self) identifier_self (identifier_bond_tolerance) identifier_bond_tolerance )attribute )binary_operator )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_deviation) identifier_deviation (float_0.0) float_0.0 )assignment )expression_statement (expression_statement (assignment (identifier_pair) identifier_pair (call (identifier_frozenset) identifier_frozenset (argument_list (list (identifier_n1) identifier_n1 (identifier_n2) identifier_n2 )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (None) None )assignment )expression_statement (for_statement (identifier_bond_type) identifier_bond_type (identifier_bond_types) identifier_bond_types (block (expression_statement (assignment (identifier_bond_length) identifier_bond_length (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_lengths) identifier_lengths )attribute (identifier_bond_type) identifier_bond_type )subscript (identifier_get) identifier_get )attribute (argument_list (identifier_pair) identifier_pair )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (parenthesized_expression (comparison_operator (identifier_bond_length) identifier_bond_length (None) None )comparison_operator )parenthesized_expression (line_continuation_\) line_continuation_\ (parenthesized_expression (comparison_operator (identifier_distance) identifier_distance (binary_operator (identifier_bond_length) identifier_bond_length (attribute (identifier_self) identifier_self (identifier_bond_tolerance) identifier_bond_tolerance )attribute )binary_operator )comparison_operator )parenthesized_expression )boolean_operator (block (if_statement (comparison_operator (identifier_result) identifier_result (None) None )comparison_operator (block (expression_statement (assignment (identifier_result) identifier_result (identifier_bond_type) identifier_bond_type )assignment )expression_statement (expression_statement (assignment (identifier_deviation) identifier_deviation (call (identifier_abs) identifier_abs (argument_list (binary_operator (identifier_bond_length) identifier_bond_length (identifier_distance) identifier_distance )binary_operator )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_new_deviation) identifier_new_deviation (call (identifier_abs) identifier_abs (argument_list (binary_operator (identifier_bond_length) identifier_bond_length (identifier_distance) identifier_distance )binary_operator )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_deviation) identifier_deviation (identifier_new_deviation) identifier_new_deviation )comparison_operator (block (expression_statement (assignment (identifier_result) identifier_result (identifier_bond_type) identifier_bond_type )assignment )expression_statement (expression_statement (assignment (identifier_deviation) identifier_deviation (identifier_new_deviation) identifier_new_deviation )assignment )expression_statement )block )if_statement )block )else_clause )if_statement )block )if_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Return the estimated bond type Arguments: | ``n1`` -- the atom number of the first atom in the bond | ``n2`` -- the atom number of the second atom the bond | ``distance`` -- the distance between the two atoms This method checks whether for the given pair of atom numbers, the given distance corresponds to a certain bond length. The best matching bond type will be returned. If the distance is a factor ``self.bond_tolerance`` larger than a tabulated distance, the algorithm will not relate them.
(module (function_definition (function_name__get_go2nthdridx) function_name__get_go2nthdridx (parameters (identifier_self) identifier_self (identifier_gos_all) identifier_gos_all )parameters (block (expression_statement (assignment (identifier_go2nthdridx) identifier_go2nthdridx (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (identifier_GrouperInit) identifier_GrouperInit (identifier_NtMaker) identifier_NtMaker )attribute (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (for_statement (identifier_goid) identifier_goid (identifier_gos_all) identifier_gos_all (block (expression_statement (assignment (subscript (identifier_go2nthdridx) identifier_go2nthdridx (identifier_goid) identifier_goid )subscript (call (attribute (identifier_obj) identifier_obj (identifier_get_nt) identifier_get_nt )attribute (argument_list (identifier_goid) identifier_goid )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_go2nthdridx) identifier_go2nthdridx )return_statement )block )function_definition )module
Get GO IDs header index for each user GO ID and corresponding parent GO IDs.
(module (function_definition (function_name__request) function_name__request (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_caller_frame) identifier_caller_frame (subscript (call (attribute (identifier_inspect) identifier_inspect (identifier_getouterframes) identifier_getouterframes )attribute (argument_list (call (attribute (identifier_inspect) identifier_inspect (identifier_currentframe) identifier_currentframe )attribute (argument_list )argument_list )call )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_args) identifier_args (identifier__) identifier__ (identifier__) identifier__ (identifier_values) identifier_values )pattern_list (call (attribute (identifier_inspect) identifier_inspect (identifier_getargvalues) identifier_getargvalues )attribute (argument_list (subscript (identifier_caller_frame) identifier_caller_frame (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_caller_name) identifier_caller_name (subscript (identifier_caller_frame) identifier_caller_frame (integer_3) integer_3 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (dictionary_comprehension (pair (identifier_arg) identifier_arg (subscript (identifier_values) identifier_values (identifier_arg) identifier_arg )subscript )pair (for_in_clause (identifier_arg) identifier_arg (identifier_args) identifier_args )for_in_clause (if_clause (comparison_operator (identifier_arg) identifier_arg (string_'self') string_'self' )comparison_operator )if_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_func) identifier_func (call (identifier_reduce) identifier_reduce (argument_list (lambda (lambda_parameters (identifier_resource) identifier_resource (identifier_name) identifier_name )lambda_parameters (call (attribute (identifier_resource) identifier_resource (identifier___getattr__) identifier___getattr__ )attribute (argument_list (identifier_name) identifier_name )argument_list )call )lambda (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_mappings) identifier_mappings )attribute (identifier_caller_name) identifier_caller_name )subscript (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (return_statement (call (identifier_func) identifier_func (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
retrieve the caller frame, extract the parameters from the caller function, find the matching function, and fire the request
(module (function_definition (function_name_get_all_completed_tasks) function_name_get_all_completed_tasks (parameters (identifier_self) identifier_self (identifier_api_token) identifier_api_token (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'token') string_'token' (identifier_api_token) identifier_api_token )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (string_'get_all_completed_items') string_'get_all_completed_items' (identifier_params) identifier_params (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Return a list of a user's completed tasks. .. warning:: Requires Todoist premium. :param api_token: The user's login api_token. :type api_token: str :param project_id: Filter the tasks by project. :type project_id: str :param limit: The maximum number of tasks to return (default ``30``, max ``50``). :type limit: int :param offset: Used for pagination if there are more tasks than limit. :type offset: int :param from_date: Return tasks with a completion date on or older than from_date. Formatted as ``2007-4-29T10:13``. :type from_date: str :param to: Return tasks with a completion date on or less than to_date. Formatted as ``2007-4-29T10:13``. :type from_date: str :return: The HTTP response to the request. :rtype: :class:`requests.Response` >>> from pytodoist.api import TodoistAPI >>> api = TodoistAPI() >>> response = api.login('john.doe@gmail.com', 'password') >>> user_info = response.json() >>> user_api_token = user_info['api_token'] >>> response = api.get_all_completed_tasks(user_api_token) >>> completed_tasks = response.json()
(module (function_definition (function_name_change_view) function_name_change_view (parameters (identifier_self) identifier_self (identifier_change_in_depth) identifier_change_in_depth )parameters (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_current_view_depth) identifier_current_view_depth )attribute (identifier_change_in_depth) identifier_change_in_depth )augmented_assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_current_view_depth) identifier_current_view_depth )attribute (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_current_view_depth) identifier_current_view_depth )attribute (integer_0) integer_0 )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_collapseAll) identifier_collapseAll )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_current_view_depth) identifier_current_view_depth )attribute (integer_0) integer_0 )comparison_operator (block (for_statement (identifier_item) identifier_item (call (attribute (identifier_self) identifier_self (identifier_get_items) identifier_get_items )attribute (argument_list (keyword_argument (identifier_maxlevel) identifier_maxlevel (binary_operator (attribute (identifier_self) identifier_self (identifier_current_view_depth) identifier_current_view_depth )attribute (integer_1) integer_1 )binary_operator )keyword_argument )argument_list )call (block (expression_statement (call (attribute (identifier_item) identifier_item (identifier_setExpanded) identifier_setExpanded )attribute (argument_list (True) True )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )function_definition )module
Change the view depth by expand or collapsing all same-level nodes
(module (function_definition (function_name_compose_tree_path) function_name_compose_tree_path (parameters (identifier_tree) identifier_tree (default_parameter (identifier_issn) identifier_issn (False) False )default_parameter )parameters (block (if_statement (identifier_issn) identifier_issn (block (return_statement (call (identifier_join) identifier_join (argument_list (string_"/") string_"/" (identifier_ISSN_DOWNLOAD_KEY) identifier_ISSN_DOWNLOAD_KEY (call (identifier_basename) identifier_basename (argument_list (attribute (identifier_tree) identifier_tree (identifier_issn) identifier_issn )attribute )argument_list )call )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_join) identifier_join (argument_list (string_"/") string_"/" (identifier_PATH_DOWNLOAD_KEY) identifier_PATH_DOWNLOAD_KEY (call (attribute (call (identifier_quote_plus) identifier_quote_plus (argument_list (attribute (identifier_tree) identifier_tree (identifier_path) identifier_path )attribute )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_"%2F") string_"%2F" (string_"/") string_"/" )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Compose absolute path for given `tree`. Args: pub (obj): :class:`.Tree` instance. issn (bool, default False): Compose URL using ISSN. Returns: str: Absolute path of the tree, without server's address and protocol.
(module (function_definition (function_name_start_http_server) function_name_start_http_server (parameters (identifier_self) identifier_self (identifier_port) identifier_port (identifier_args) identifier_args )parameters (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_info) identifier_info )attribute (argument_list (string_"Starting Tornado v%s HTTPServer on port %i Args: %r") string_"Starting Tornado v%s HTTPServer on port %i Args: %r" (identifier_tornado_version) identifier_tornado_version (identifier_port) identifier_port (identifier_args) identifier_args )argument_list )call )expression_statement (expression_statement (assignment (identifier_http_server) identifier_http_server (call (attribute (identifier_httpserver) identifier_httpserver (identifier_HTTPServer) identifier_HTTPServer )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_app) identifier_app )attribute (dictionary_splat (identifier_args) identifier_args )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_http_server) identifier_http_server (identifier_bind) identifier_bind )attribute (argument_list (identifier_port) identifier_port (keyword_argument (identifier_family) identifier_family (attribute (identifier_socket) identifier_socket (identifier_AF_INET) identifier_AF_INET )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_http_server) identifier_http_server (identifier_start) identifier_start )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement (return_statement (identifier_http_server) identifier_http_server )return_statement )block )function_definition )module
Start the HTTPServer :param int port: The port to run the HTTPServer on :param dict args: Dictionary of arguments for HTTPServer :rtype: tornado.httpserver.HTTPServer
(module (function_definition (function_name_file_length) function_name_file_length (parameters (identifier_in_file) identifier_in_file )parameters (block (expression_statement (assignment (identifier_fid) identifier_fid (call (identifier_open) identifier_open (argument_list (identifier_in_file) identifier_in_file )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_fid) identifier_fid (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_fid) identifier_fid (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call )return_statement )block )function_definition )module
Function to return the length of a file.
(module (function_definition (function_name_widget_from_tuple) function_name_widget_from_tuple (parameters (identifier_o) identifier_o )parameters (block (if_statement (call (identifier__matches) identifier__matches (argument_list (identifier_o) identifier_o (tuple (identifier_Real) identifier_Real (identifier_Real) identifier_Real )tuple )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_min) identifier_min (identifier_max) identifier_max (identifier_value) identifier_value )pattern_list (call (identifier__get_min_max_value) identifier__get_min_max_value (argument_list (subscript (identifier_o) identifier_o (integer_0) integer_0 )subscript (subscript (identifier_o) identifier_o (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement (if_statement (call (identifier_all) identifier_all (generator_expression (call (identifier_isinstance) identifier_isinstance (argument_list (identifier__) identifier__ (identifier_Integral) identifier_Integral )argument_list )call (for_in_clause (identifier__) identifier__ (identifier_o) identifier_o )for_in_clause )generator_expression )call (block (expression_statement (assignment (identifier_cls) identifier_cls (identifier_IntSlider) identifier_IntSlider )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_cls) identifier_cls (identifier_FloatSlider) identifier_FloatSlider )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (keyword_argument (identifier_value) identifier_value (identifier_value) identifier_value )keyword_argument (keyword_argument (identifier_min) identifier_min (identifier_min) identifier_min )keyword_argument (keyword_argument (identifier_max) identifier_max (identifier_max) identifier_max )keyword_argument )argument_list )call )return_statement )block (elif_clause (call (identifier__matches) identifier__matches (argument_list (identifier_o) identifier_o (tuple (identifier_Real) identifier_Real (identifier_Real) identifier_Real (identifier_Real) identifier_Real )tuple )argument_list )call (block (expression_statement (assignment (identifier_step) identifier_step (subscript (identifier_o) identifier_o (integer_2) integer_2 )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_step) identifier_step (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"step must be >= 0, not %r") string_"step must be >= 0, not %r" (identifier_step) identifier_step )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_min) identifier_min (identifier_max) identifier_max (identifier_value) identifier_value )pattern_list (call (identifier__get_min_max_value) identifier__get_min_max_value (argument_list (subscript (identifier_o) identifier_o (integer_0) integer_0 )subscript (subscript (identifier_o) identifier_o (integer_1) integer_1 )subscript (keyword_argument (identifier_step) identifier_step (identifier_step) identifier_step )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (identifier_all) identifier_all (generator_expression (call (identifier_isinstance) identifier_isinstance (argument_list (identifier__) identifier__ (identifier_Integral) identifier_Integral )argument_list )call (for_in_clause (identifier__) identifier__ (identifier_o) identifier_o )for_in_clause )generator_expression )call (block (expression_statement (assignment (identifier_cls) identifier_cls (identifier_IntSlider) identifier_IntSlider )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_cls) identifier_cls (identifier_FloatSlider) identifier_FloatSlider )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (keyword_argument (identifier_value) identifier_value (identifier_value) identifier_value )keyword_argument (keyword_argument (identifier_min) identifier_min (identifier_min) identifier_min )keyword_argument (keyword_argument (identifier_max) identifier_max (identifier_max) identifier_max )keyword_argument (keyword_argument (identifier_step) identifier_step (identifier_step) identifier_step )keyword_argument )argument_list )call )return_statement )block )elif_clause )if_statement )block )function_definition )module
Make widgets from a tuple abbreviation.
(module (function_definition (function_name_parse_xhtml_reaction_notes) function_name_parse_xhtml_reaction_notes (parameters (identifier_entry) identifier_entry )parameters (block (expression_statement (assignment (identifier_properties) identifier_properties (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_entry) identifier_entry (identifier_xml_notes) identifier_xml_notes )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_cobra_notes) identifier_cobra_notes (call (identifier_dict) identifier_dict (argument_list (call (identifier_parse_xhtml_notes) identifier_parse_xhtml_notes (argument_list (identifier_entry) identifier_entry )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'subsystem') string_'subsystem' (identifier_cobra_notes) identifier_cobra_notes )comparison_operator (block (expression_statement (assignment (subscript (identifier_properties) identifier_properties (string_'subsystem') string_'subsystem' )subscript (subscript (identifier_cobra_notes) identifier_cobra_notes (string_'subsystem') string_'subsystem' )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'gene_association') string_'gene_association' (identifier_cobra_notes) identifier_cobra_notes )comparison_operator (block (expression_statement (assignment (subscript (identifier_properties) identifier_properties (string_'genes') string_'genes' )subscript (subscript (identifier_cobra_notes) identifier_cobra_notes (string_'gene_association') string_'gene_association' )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'ec_number') string_'ec_number' (identifier_cobra_notes) identifier_cobra_notes )comparison_operator (block (expression_statement (assignment (subscript (identifier_properties) identifier_properties (string_'ec') string_'ec' )subscript (subscript (identifier_cobra_notes) identifier_cobra_notes (string_'ec_number') string_'ec_number' )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'authors') string_'authors' (identifier_cobra_notes) identifier_cobra_notes )comparison_operator (block (expression_statement (assignment (subscript (identifier_properties) identifier_properties (string_'authors') string_'authors' )subscript (list_comprehension (call (attribute (identifier_a) identifier_a (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_a) identifier_a (call (attribute (subscript (identifier_cobra_notes) identifier_cobra_notes (string_'authors') string_'authors' )subscript (identifier_split) identifier_split )attribute (argument_list (string_';') string_';' )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'confidence') string_'confidence' (identifier_cobra_notes) identifier_cobra_notes )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_int) identifier_int (argument_list (subscript (identifier_cobra_notes) identifier_cobra_notes (string_'confidence') string_'confidence' )subscript )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (call (attribute (concatenated_string (string_'Unable to parse confidence level for {} as an') string_'Unable to parse confidence level for {} as an' (string_' integer: {}') string_' integer: {}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_entry) identifier_entry (identifier_id) identifier_id )attribute (subscript (identifier_cobra_notes) identifier_cobra_notes (string_'confidence') string_'confidence' )subscript )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_value) identifier_value (subscript (identifier_cobra_notes) identifier_cobra_notes (string_'confidence') string_'confidence' )subscript )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (subscript (identifier_properties) identifier_properties (string_'confidence') string_'confidence' )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_properties) identifier_properties )return_statement )block )function_definition )module
Return reaction properties defined in the XHTML notes. Older SBML models often define additional properties in the XHTML notes section because structured methods for defining properties had not been developed. This will try to parse the following properties: ``SUBSYSTEM``, ``GENE ASSOCIATION``, ``EC NUMBER``, ``AUTHORS``, ``CONFIDENCE``. Args: entry: :class:`SBMLReactionEntry`.
(module (function_definition (function_name__load_profile) function_name__load_profile (parameters (identifier_self) identifier_self (identifier_profile_name) identifier_profile_name )parameters (block (expression_statement (assignment (identifier_default_profile) identifier_default_profile (subscript (attribute (identifier_self) identifier_self (identifier__profile_list) identifier__profile_list )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (for_statement (identifier_profile) identifier_profile (attribute (identifier_self) identifier_self (identifier__profile_list) identifier__profile_list )attribute (block (if_statement (call (attribute (identifier_profile) identifier_profile (identifier_get) identifier_get )attribute (argument_list (string_'default') string_'default' (False) False )argument_list )call (block (expression_statement (assignment (identifier_default_profile) identifier_default_profile (identifier_profile) identifier_profile )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_profile) identifier_profile (string_'display_name') string_'display_name' )subscript (identifier_profile_name) identifier_profile_name )comparison_operator (block (break_statement )break_statement )block )if_statement )block (else_clause (block (if_statement (identifier_profile_name) identifier_profile_name (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"No such profile: %s. Options include: %s") string_"No such profile: %s. Options include: %s" (tuple (identifier_profile_name) identifier_profile_name (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (generator_expression (subscript (identifier_p) identifier_p (string_'display_name') string_'display_name' )subscript (for_in_clause (identifier_p) identifier_p (attribute (identifier_self) identifier_self (identifier__profile_list) identifier__profile_list )attribute )for_in_clause )generator_expression )call )tuple )binary_operator )argument_list )call )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_profile) identifier_profile (identifier_default_profile) identifier_default_profile )assignment )expression_statement )block )else_clause )if_statement )block )else_clause )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_"Applying KubeSpawner override for profile '%s'") string_"Applying KubeSpawner override for profile '%s'" (subscript (identifier_profile) identifier_profile (string_'display_name') string_'display_name' )subscript )argument_list )call )expression_statement (expression_statement (assignment (identifier_kubespawner_override) identifier_kubespawner_override (call (attribute (identifier_profile) identifier_profile (identifier_get) identifier_get )attribute (argument_list (string_'kubespawner_override') string_'kubespawner_override' (dictionary )dictionary )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_kubespawner_override) identifier_kubespawner_override (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (call (identifier_callable) identifier_callable (argument_list (identifier_v) identifier_v )argument_list )call (block (expression_statement (assignment (identifier_v) identifier_v (call (identifier_v) identifier_v (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_".. overriding KubeSpawner value %s=%s (callable result)") string_".. overriding KubeSpawner value %s=%s (callable result)" (identifier_k) identifier_k (identifier_v) identifier_v )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_".. overriding KubeSpawner value %s=%s") string_".. overriding KubeSpawner value %s=%s" (identifier_k) identifier_k (identifier_v) identifier_v )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_k) identifier_k (identifier_v) identifier_v )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Load a profile by name Called by load_user_options
(module (function_definition (function_name_make_primitive_extrapolate_ends) function_name_make_primitive_extrapolate_ends (parameters (identifier_cas_coords) identifier_cas_coords (default_parameter (identifier_smoothing_level) identifier_smoothing_level (integer_2) integer_2 )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_smoothed_primitive) identifier_smoothed_primitive (call (identifier_make_primitive_smoothed) identifier_make_primitive_smoothed (argument_list (identifier_cas_coords) identifier_cas_coords (keyword_argument (identifier_smoothing_level) identifier_smoothing_level (identifier_smoothing_level) identifier_smoothing_level )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (assignment (identifier_smoothed_primitive) identifier_smoothed_primitive (call (identifier_make_primitive_smoothed) identifier_make_primitive_smoothed (argument_list (identifier_cas_coords) identifier_cas_coords (keyword_argument (identifier_smoothing_level) identifier_smoothing_level (binary_operator (identifier_smoothing_level) identifier_smoothing_level (integer_1) integer_1 )binary_operator )keyword_argument )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_smoothed_primitive) identifier_smoothed_primitive )argument_list )call (integer_3) integer_3 )comparison_operator (block (expression_statement (assignment (identifier_smoothed_primitive) identifier_smoothed_primitive (call (identifier_make_primitive_smoothed) identifier_make_primitive_smoothed (argument_list (identifier_cas_coords) identifier_cas_coords (keyword_argument (identifier_smoothing_level) identifier_smoothing_level (binary_operator (identifier_smoothing_level) identifier_smoothing_level (integer_1) integer_1 )binary_operator )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_final_primitive) identifier_final_primitive (list )list )assignment )expression_statement (for_statement (identifier_ca) identifier_ca (identifier_cas_coords) identifier_cas_coords (block (expression_statement (assignment (identifier_prim_dists) identifier_prim_dists (list_comprehension (call (identifier_distance) identifier_distance (argument_list (identifier_ca) identifier_ca (identifier_p) identifier_p )argument_list )call (for_in_clause (identifier_p) identifier_p (identifier_smoothed_primitive) identifier_smoothed_primitive )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_closest_indices) identifier_closest_indices (call (identifier_sorted) identifier_sorted (argument_list (list_comprehension (subscript (identifier_x) identifier_x (integer_0) integer_0 )subscript (for_in_clause (identifier_x) identifier_x (subscript (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_prim_dists) identifier_prim_dists )argument_list )call (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_k) identifier_k )lambda_parameters (subscript (identifier_k) identifier_k (integer_1) integer_1 )subscript )lambda )keyword_argument )argument_list )call (slice (colon) colon (integer_3) integer_3 )slice )subscript )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_a) identifier_a (identifier_b) identifier_b (identifier_c) identifier_c )pattern_list (list_comprehension (subscript (identifier_smoothed_primitive) identifier_smoothed_primitive (identifier_x) identifier_x )subscript (for_in_clause (identifier_x) identifier_x (identifier_closest_indices) identifier_closest_indices )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_ab_foot) identifier_ab_foot (call (identifier_find_foot) identifier_find_foot (argument_list (identifier_a) identifier_a (identifier_b) identifier_b (identifier_ca) identifier_ca )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bc_foot) identifier_bc_foot (call (identifier_find_foot) identifier_find_foot (argument_list (identifier_b) identifier_b (identifier_c) identifier_c (identifier_ca) identifier_ca )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ca_foot) identifier_ca_foot (binary_operator (parenthesized_expression (binary_operator (identifier_ab_foot) identifier_ab_foot (identifier_bc_foot) identifier_bc_foot )binary_operator )parenthesized_expression (integer_2) integer_2 )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_final_primitive) identifier_final_primitive (identifier_append) identifier_append )attribute (argument_list (identifier_ca_foot) identifier_ca_foot )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_final_primitive) identifier_final_primitive )return_statement )block )function_definition )module
Generates smoothed helix primitives and extrapolates lost ends. Notes ----- From an input list of CA coordinates, the running average is calculated to form a primitive. The smoothing_level dictates how many times to calculate the running average. A higher smoothing_level generates a 'smoother' primitive - i.e. the points on the primitive more closely fit a smooth curve in R^3. Each time the smoothing level is increased by 1, a point is lost from either end of the primitive. To correct for this, the primitive is extrapolated at the ends to approximate the lost values. There is a trade-off then between the smoothness of the primitive and its accuracy at the ends. Parameters ---------- cas_coords : list(numpy.array or float or tuple) Each element of the list must have length 3. smoothing_level : int Number of times to run the averaging. Returns ------- final_primitive : list(numpy.array) Each array has length 3.
(module (function_definition (function_name_chage) function_name_chage (parameters (identifier_username) identifier_username (default_parameter (identifier_lastday) identifier_lastday (None) None )default_parameter (default_parameter (identifier_expiredate) identifier_expiredate (None) None )default_parameter (default_parameter (identifier_inactive) identifier_inactive (None) None )default_parameter (default_parameter (identifier_mindays) identifier_mindays (None) None )default_parameter (default_parameter (identifier_maxdays) identifier_maxdays (None) None )default_parameter (default_parameter (identifier_root) identifier_root (None) None )default_parameter (default_parameter (identifier_warndays) identifier_warndays (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_cmd) identifier_cmd (list (string_'chage') string_'chage' )list )assignment )expression_statement (if_statement (identifier_root) identifier_root (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_extend) identifier_extend )attribute (argument_list (list (string_'--root') string_'--root' (identifier_root) identifier_root )list )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_lastday) identifier_lastday (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_extend) identifier_extend )attribute (argument_list (list (string_'--lastday') string_'--lastday' (identifier_lastday) identifier_lastday )list )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_expiredate) identifier_expiredate (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_extend) identifier_extend )attribute (argument_list (list (string_'--expiredate') string_'--expiredate' (identifier_expiredate) identifier_expiredate )list )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_inactive) identifier_inactive (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_extend) identifier_extend )attribute (argument_list (list (string_'--inactive') string_'--inactive' (identifier_inactive) identifier_inactive )list )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_mindays) identifier_mindays (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_extend) identifier_extend )attribute (argument_list (list (string_'--mindays') string_'--mindays' (identifier_mindays) identifier_mindays )list )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_maxdays) identifier_maxdays (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_extend) identifier_extend )attribute (argument_list (list (string_'--maxdays') string_'--maxdays' (identifier_maxdays) identifier_maxdays )list )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_warndays) identifier_warndays (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_extend) identifier_extend )attribute (argument_list (list (string_'--warndays') string_'--warndays' (identifier_warndays) identifier_warndays )list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (identifier_username) identifier_username )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_subprocess) identifier_subprocess (identifier_check_call) identifier_check_call )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )expression_statement )block )function_definition )module
Change user password expiry information :param str username: User to update :param str lastday: Set when password was changed in YYYY-MM-DD format :param str expiredate: Set when user's account will no longer be accessible in YYYY-MM-DD format. -1 will remove an account expiration date. :param str inactive: Set the number of days of inactivity after a password has expired before the account is locked. -1 will remove an account's inactivity. :param str mindays: Set the minimum number of days between password changes to MIN_DAYS. 0 indicates the password can be changed anytime. :param str maxdays: Set the maximum number of days during which a password is valid. -1 as MAX_DAYS will remove checking maxdays :param str root: Apply changes in the CHROOT_DIR directory :param str warndays: Set the number of days of warning before a password change is required :raises subprocess.CalledProcessError: if call to chage fails
(module (function_definition (function_name_get_by_id) function_name_get_by_id (parameters (identifier_self) identifier_self (identifier_id) identifier_id )parameters (block (for_statement (identifier_child) identifier_child (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute (block (if_statement (comparison_operator (subscript (identifier_child) identifier_child (attribute (identifier_self) identifier_self (identifier_child_id_attribute) identifier_child_id_attribute )attribute )subscript (identifier_id) identifier_id )comparison_operator (block (return_statement (identifier_child) identifier_child )return_statement )block (else_clause (block (continue_statement )continue_statement )block )else_clause )if_statement )block )for_statement (return_statement (None) None )return_statement )block )function_definition )module
Return object based on ``child_id_attribute``. Parameters ---------- val : str Returns ------- object Notes ----- Based on `.get()`_ from `backbone.js`_. .. _backbone.js: http://backbonejs.org/ .. _.get(): http://backbonejs.org/#Collection-get
(module (function_definition (function_name_attach_tracker) function_name_attach_tracker (parameters (identifier_self) identifier_self (identifier_stanza) identifier_stanza (default_parameter (identifier_tracker) identifier_tracker (None) None )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_stanza) identifier_stanza (identifier_xep0184_received) identifier_xep0184_received )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_"requesting delivery receipts for delivery receipts is not ") string_"requesting delivery receipts for delivery receipts is not " (string_"allowed") string_"allowed" )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_stanza) identifier_stanza (identifier_type_) identifier_type_ )attribute (attribute (attribute (identifier_aioxmpp) identifier_aioxmpp (identifier_MessageType) identifier_MessageType )attribute (identifier_ERROR) identifier_ERROR )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"requesting delivery receipts for errors is not supported") string_"requesting delivery receipts for errors is not supported" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_tracker) identifier_tracker (None) None )comparison_operator (block (expression_statement (assignment (identifier_tracker) identifier_tracker (call (attribute (attribute (identifier_aioxmpp) identifier_aioxmpp (identifier_tracking) identifier_tracking )attribute (identifier_MessageTracker) identifier_MessageTracker )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_stanza) identifier_stanza (identifier_xep0184_request_receipt) identifier_xep0184_request_receipt )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (identifier_stanza) identifier_stanza (identifier_autoset_id) identifier_autoset_id )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__bare_jid_maps) identifier__bare_jid_maps )attribute (attribute (identifier_stanza) identifier_stanza (identifier_to) identifier_to )attribute (attribute (identifier_stanza) identifier_stanza (identifier_id_) identifier_id_ )attribute )subscript (identifier_tracker) identifier_tracker )assignment )expression_statement (return_statement (identifier_tracker) identifier_tracker )return_statement )block )function_definition )module
Return a new tracker or modify one to track the stanza. :param stanza: Stanza to track. :type stanza: :class:`aioxmpp.Message` :param tracker: Existing tracker to attach to. :type tracker: :class:`.tracking.MessageTracker` :raises ValueError: if the stanza is of type :attr:`~aioxmpp.MessageType.ERROR` :raises ValueError: if the stanza contains a delivery receipt :return: The message tracker for the stanza. :rtype: :class:`.tracking.MessageTracker` The `stanza` gets a :xep:`184` reciept request attached and internal handlers are set up to update the `tracker` state once a confirmation is received. .. warning:: See the :ref:`api-tracking-memory`.
(module (function_definition (function_name_k_array_rank_jit) function_name_k_array_rank_jit (parameters (identifier_a) identifier_a )parameters (block (expression_statement (assignment (identifier_k) identifier_k (call (identifier_len) identifier_len (argument_list (identifier_a) identifier_a )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_idx) identifier_idx (subscript (identifier_a) identifier_a (integer_0) integer_0 )subscript )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (identifier_k) identifier_k )argument_list )call (block (expression_statement (augmented_assignment (identifier_idx) identifier_idx (call (identifier_comb_jit) identifier_comb_jit (argument_list (subscript (identifier_a) identifier_a (identifier_i) identifier_i )subscript (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator )argument_list )call )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_idx) identifier_idx )return_statement )block )function_definition )module
Numba jit version of `k_array_rank`. Notes ----- An incorrect value will be returned without warning or error if overflow occurs during the computation. It is the user's responsibility to ensure that the rank of the input array fits within the range of possible values of `np.intp`; a sufficient condition for it is `scipy.special.comb(a[-1]+1, len(a), exact=True) <= np.iinfo(np.intp).max`.
(module (function_definition (function_name_reset) function_name_reset (parameters (identifier_self) identifier_self (default_parameter (identifier_index) identifier_index (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_points_handler_count) identifier_points_handler_count (call (identifier_len) identifier_len (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_registration_view) identifier_registration_view )attribute (identifier_points) identifier_points )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_index) identifier_index (None) None )comparison_operator (block (expression_statement (assignment (identifier_indexes) identifier_indexes (call (identifier_range) identifier_range (argument_list (identifier_points_handler_count) identifier_points_handler_count )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_indexes) identifier_indexes (list (identifier_index) identifier_index )list )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_indexes) identifier_indexes (list_comprehension (identifier_i) identifier_i (for_in_clause (identifier_i) identifier_i (identifier_indexes) identifier_indexes )for_in_clause (if_clause (comparison_operator (identifier_i) identifier_i (identifier_points_handler_count) identifier_points_handler_count )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (for_statement (identifier_i) identifier_i (identifier_indexes) identifier_indexes (block (expression_statement (call (attribute (subscript (attribute (attribute (identifier_self) identifier_self (identifier_registration_view) identifier_registration_view )attribute (identifier_points) identifier_points )attribute (identifier_i) identifier_i )subscript (identifier_reset) identifier_reset )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (if_statement (identifier_indexes) identifier_indexes (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_registration_view) identifier_registration_view )attribute (identifier_update_transform) identifier_update_transform )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Reset the points for the specified index position. If no index is specified, reset points for all point handlers.
(module (function_definition (function_name_naccess_available) function_name_naccess_available (parameters )parameters (block (expression_statement (assignment (identifier_available) identifier_available (False) False )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_subprocess) identifier_subprocess (identifier_check_output) identifier_check_output )attribute (argument_list (list (string_'naccess') string_'naccess' )list (keyword_argument (identifier_stderr) identifier_stderr (attribute (identifier_subprocess) identifier_subprocess (identifier_DEVNULL) identifier_DEVNULL )attribute )keyword_argument )argument_list )call )expression_statement )block (except_clause (attribute (identifier_subprocess) identifier_subprocess (identifier_CalledProcessError) identifier_CalledProcessError )attribute (block (expression_statement (assignment (identifier_available) identifier_available (True) True )assignment )expression_statement )block )except_clause (except_clause (identifier_FileNotFoundError) identifier_FileNotFoundError (block (expression_statement (call (identifier_print) identifier_print (argument_list (concatenated_string (string_"naccess has not been found on your path. If you have already ") string_"naccess has not been found on your path. If you have already " (string_"installed naccess but are unsure how to add it to your path, ") string_"installed naccess but are unsure how to add it to your path, " (string_"check out this: https://stackoverflow.com/a/14638025") string_"check out this: https://stackoverflow.com/a/14638025" )concatenated_string )argument_list )call )expression_statement )block )except_clause )try_statement (return_statement (identifier_available) identifier_available )return_statement )block )function_definition )module
True if naccess is available on the path.
(module (function_definition (function_name__fix_time) function_name__fix_time (parameters (identifier_self) identifier_self (identifier_dt) identifier_dt )parameters (block (if_statement (comparison_operator (attribute (identifier_dt) identifier_dt (identifier_tzinfo) identifier_tzinfo )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_dt) identifier_dt (call (attribute (identifier_dt) identifier_dt (identifier_replace) identifier_replace )attribute (argument_list (keyword_argument (identifier_tzinfo) identifier_tzinfo (None) None )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_dt) identifier_dt )return_statement )block )function_definition )module
Stackdistiller converts all times to utc. We store timestamps as utc datetime. However, the explicit UTC timezone on incoming datetimes causes comparison issues deep in sqlalchemy. We fix this by converting all datetimes to naive utc timestamps
(module (function_definition (function_name_setup_task_signals) function_name_setup_task_signals (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_"Setting up task page signals.") string_"Setting up task page signals." )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_task_user_view_pb) identifier_task_user_view_pb )attribute (identifier_clicked) identifier_clicked )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_task_view_user) identifier_task_view_user )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_task_user_add_pb) identifier_task_user_add_pb )attribute (identifier_clicked) identifier_clicked )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_task_add_user) identifier_task_add_user )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_task_user_remove_pb) identifier_task_user_remove_pb )attribute (identifier_clicked) identifier_clicked )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_task_remove_user) identifier_task_remove_user )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_task_dep_view_pb) identifier_task_dep_view_pb )attribute (identifier_clicked) identifier_clicked )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_task_view_dep) identifier_task_view_dep )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_task_link_view_pb) identifier_task_link_view_pb )attribute (identifier_clicked) identifier_clicked )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_task_view_link) identifier_task_view_link )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_task_deadline_de) identifier_task_deadline_de )attribute (identifier_dateChanged) identifier_dateChanged )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_task_save) identifier_task_save )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_task_status_cb) identifier_task_status_cb )attribute (identifier_currentIndexChanged) identifier_currentIndexChanged )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_task_save) identifier_task_save )attribute )argument_list )call )expression_statement )block )function_definition )module
Setup the signals for the task page :returns: None :rtype: None :raises: None
(module (function_definition (function_name_UsesArtifact) function_name_UsesArtifact (parameters (identifier_self) identifier_self (identifier_artifacts) identifier_artifacts )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_artifacts) identifier_artifacts (identifier_string_types) identifier_string_types )argument_list )call (block (return_statement (comparison_operator (identifier_artifacts) identifier_artifacts (attribute (identifier_self) identifier_self (identifier_artifacts) identifier_artifacts )attribute )comparison_operator )return_statement )block (else_clause (block (return_statement (call (identifier_any) identifier_any (generator_expression (True) True (for_in_clause (identifier_artifact) identifier_artifact (identifier_artifacts) identifier_artifacts )for_in_clause (if_clause (comparison_operator (identifier_artifact) identifier_artifact (attribute (identifier_self) identifier_self (identifier_artifacts) identifier_artifacts )attribute )comparison_operator )if_clause )generator_expression )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Determines if the check uses the specified artifact. Args: artifacts: Either a single artifact name, or a list of artifact names Returns: True if the check uses a specific artifact.
(module (function_definition (function_name_execute_return_result) function_name_execute_return_result (parameters (identifier_cmd) identifier_cmd )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier__run_all) identifier__run_all (argument_list (identifier_cmd) identifier_cmd )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (subscript (identifier_ret) identifier_ret (string_'retcode') string_'retcode' )subscript (integer_0) integer_0 )comparison_operator (comparison_operator (string_'not supported') string_'not supported' (call (attribute (subscript (identifier_ret) identifier_ret (string_'stdout') string_'stdout' )subscript (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (string_'Command Failed: {0}\n') string_'Command Failed: {0}\n' (identifier_format) identifier_format )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_msg) identifier_msg (call (attribute (string_'Return Code: {0}\n') string_'Return Code: {0}\n' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_ret) identifier_ret (string_'retcode') string_'retcode' )subscript )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_msg) identifier_msg (call (attribute (string_'Output: {0}\n') string_'Output: {0}\n' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_ret) identifier_ret (string_'stdout') string_'stdout' )subscript )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_msg) identifier_msg (call (attribute (string_'Error: {0}\n') string_'Error: {0}\n' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_ret) identifier_ret (string_'stderr') string_'stderr' )subscript )argument_list )call )augmented_assignment )expression_statement (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )if_statement (return_statement (subscript (identifier_ret) identifier_ret (string_'stdout') string_'stdout' )subscript )return_statement )block )function_definition )module
Executes the passed command. Returns the standard out if successful :param str cmd: The command to run :return: The standard out of the command if successful, otherwise returns an error :rtype: str :raises: Error if command fails or is not supported
(module (function_definition (function_name_indices_from_symbol) function_name_indices_from_symbol (parameters (identifier_self) identifier_self (typed_parameter (identifier_symbol) identifier_symbol (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_tuple) identifier_tuple )type (block (return_statement (call (identifier_tuple) identifier_tuple (argument_list (generator_expression (identifier_i) identifier_i (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_specie) identifier_specie )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_species) identifier_species )attribute )argument_list )call )for_in_clause (if_clause (comparison_operator (attribute (identifier_specie) identifier_specie (identifier_symbol) identifier_symbol )attribute (identifier_symbol) identifier_symbol )comparison_operator )if_clause )generator_expression )argument_list )call )return_statement )block )function_definition )module
Returns a tuple with the sequential indices of the sites that contain an element with the given chemical symbol.
(module (function_definition (function_name_load_modules) function_name_load_modules (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_INTERFACES_MODULE) identifier_INTERFACES_MODULE )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (concatenated_string (string_"A module containing interfaces modules ") string_"A module containing interfaces modules " (string_"should be setup in INTERFACES_MODULE !") string_"should be setup in INTERFACES_MODULE !" )concatenated_string )argument_list )call )raise_statement )block (else_clause (block (for_statement (pattern_list (identifier_module) identifier_module (identifier_permission) identifier_permission )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_modules) identifier_modules )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_i) identifier_i (call (attribute (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier_INTERFACES_MODULE) identifier_INTERFACES_MODULE )attribute (identifier_module) identifier_module )argument_list )call (identifier_Interface) identifier_Interface )attribute (argument_list (identifier_self) identifier_self (identifier_permission) identifier_permission )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_interfaces) identifier_interfaces )attribute (identifier_module) identifier_module )subscript (identifier_i) identifier_i )assignment )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Should instance interfaces and set them to interface, following `modules`
(module (function_definition (function_name_rename) function_name_rename (parameters (identifier_self) identifier_self (identifier_newpath) identifier_newpath )parameters (block (expression_statement (string_"Move folder to a new name, possibly a whole new path") string_"Move folder to a new name, possibly a whole new path" )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'mvDir') string_'mvDir' (binary_operator (string_'/%s%s') string_'/%s%s' (tuple (attribute (attribute (identifier_self) identifier_self (identifier_jfs) identifier_jfs )attribute (identifier_username) identifier_username )attribute (identifier_newpath) identifier_newpath )tuple )binary_operator )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (attribute (identifier_self) identifier_self (identifier_jfs) identifier_jfs )attribute (identifier_post) identifier_post )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (keyword_argument (identifier_extra_headers) identifier_extra_headers (dictionary (pair (string_'Content-Type') string_'Content-Type' (string_'application/octet-stream') string_'application/octet-stream' )pair )dictionary )keyword_argument (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_r) identifier_r )return_statement )block )function_definition )module
Move folder to a new name, possibly a whole new path
(module (function_definition (function_name_evaluate) function_name_evaluate (parameters (identifier_condition) identifier_condition )parameters (block (expression_statement (assignment (identifier_success) identifier_success (False) False )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_condition) identifier_condition )argument_list )call (integer_0) integer_0 )comparison_operator (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_rule_name) identifier_rule_name (identifier_ast_tokens) identifier_ast_tokens (identifier_evaluate_function) identifier_evaluate_function )pattern_list (call (attribute (identifier_Condition) identifier_Condition (identifier_find_rule) identifier_find_rule )attribute (argument_list (identifier_condition) identifier_condition )argument_list )call )assignment )expression_statement (if_statement (not_operator (comparison_operator (identifier_rule_name) identifier_rule_name (string_'undefined') string_'undefined' )comparison_operator )not_operator (block (expression_statement (assignment (identifier_success) identifier_success (call (identifier_evaluate_function) identifier_evaluate_function (argument_list (identifier_ast_tokens) identifier_ast_tokens )argument_list )call )assignment )expression_statement )block )if_statement )block (except_clause (as_pattern (identifier_AttributeError) identifier_AttributeError (as_pattern_target (identifier_exception) identifier_exception )as_pattern_target )as_pattern (block (expression_statement (call (attribute (call (attribute (identifier_Logger) identifier_Logger (identifier_get_logger) identifier_get_logger )attribute (argument_list (identifier___name__) identifier___name__ )argument_list )call (identifier_error) identifier_error )attribute (argument_list (string_"Attribute error: %s") string_"Attribute error: %s" (identifier_exception) identifier_exception )argument_list )call )expression_statement )block )except_clause )try_statement )block (else_clause (block (expression_statement (assignment (identifier_success) identifier_success (True) True )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_success) identifier_success )return_statement )block )function_definition )module
Evaluate simple condition. >>> Condition.evaluate(' 2 == 2 ') True >>> Condition.evaluate(' not 2 == 2 ') False >>> Condition.evaluate(' not "abc" == "xyz" ') True >>> Condition.evaluate('2 in [2, 4, 6, 8, 10]') True >>> Condition.evaluate('5 in [2, 4, 6, 8, 10]') False >>> Condition.evaluate('"apple" in ["apple", "kiwi", "orange"]') True >>> Condition.evaluate('5 not in [2, 4, 6, 8, 10]') True >>> Condition.evaluate('"apple" not in ["kiwi", "orange"]') True Args: condition (str): Python condition as string. Returns: bool: True when condition evaluates to True.
(module (function_definition (function_name_build_absolute_uri) function_name_build_absolute_uri (parameters (identifier_request) identifier_request (identifier_relative_url) identifier_relative_url )parameters (block (expression_statement (assignment (identifier_webroot) identifier_webroot (call (identifier_getattr) identifier_getattr (argument_list (identifier_settings) identifier_settings (string_'WEBROOT') string_'WEBROOT' (string_'') string_'' )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (attribute (identifier_webroot) identifier_webroot (identifier_endswith) identifier_endswith )attribute (argument_list (string_"/") string_"/" )argument_list )call (call (attribute (identifier_relative_url) identifier_relative_url (identifier_startswith) identifier_startswith )attribute (argument_list (string_"/") string_"/" )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_webroot) identifier_webroot (subscript (identifier_webroot) identifier_webroot (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_request) identifier_request (identifier_build_absolute_uri) identifier_build_absolute_uri )attribute (argument_list (binary_operator (identifier_webroot) identifier_webroot (identifier_relative_url) identifier_relative_url )binary_operator )argument_list )call )return_statement )block )function_definition )module
Ensure absolute_uri are relative to WEBROOT.
(module (function_definition (function_name_form_number) function_name_form_number (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_k1) identifier_k1 (identifier_o1) identifier_o1 (identifier_m2) identifier_m2 (identifier_s2) identifier_s2 )pattern_list (generator_expression (call (attribute (identifier_np) identifier_np (identifier_extract) identifier_extract )attribute (argument_list (comparison_operator (subscript (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (string_'constituent') string_'constituent' )subscript (identifier_c) identifier_c )comparison_operator (subscript (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (string_'amplitude') string_'amplitude' )subscript )argument_list )call (for_in_clause (identifier_c) identifier_c (list (attribute (identifier_constituent) identifier_constituent (identifier__K1) identifier__K1 )attribute (attribute (identifier_constituent) identifier_constituent (identifier__O1) identifier__O1 )attribute (attribute (identifier_constituent) identifier_constituent (identifier__M2) identifier__M2 )attribute (attribute (identifier_constituent) identifier_constituent (identifier__S2) identifier__S2 )attribute )list )for_in_clause )generator_expression )assignment )expression_statement (return_statement (binary_operator (parenthesized_expression (binary_operator (identifier_k1) identifier_k1 (identifier_o1) identifier_o1 )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (identifier_m2) identifier_m2 (identifier_s2) identifier_s2 )binary_operator )parenthesized_expression )binary_operator )return_statement )block )function_definition )module
Returns the model's form number, a helpful heuristic for classifying tides.
(module (function_definition (function_name_assume_script) function_name_assume_script (parameters (identifier_self) identifier_self )parameters (type (string_'Language') string_'Language' )type (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__assumed) identifier__assumed )attribute (None) None )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier__assumed) identifier__assumed )attribute )return_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_language) identifier_language )attribute (not_operator (attribute (identifier_self) identifier_self (identifier_script) identifier_script )attribute )not_operator )boolean_operator (block (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__assumed) identifier__assumed )attribute (call (attribute (identifier_self) identifier_self (identifier_update_dict) identifier_update_dict )attribute (argument_list (dictionary (pair (string_'script') string_'script' (subscript (identifier_DEFAULT_SCRIPTS) identifier_DEFAULT_SCRIPTS (attribute (identifier_self) identifier_self (identifier_language) identifier_language )attribute )subscript )pair )dictionary )argument_list )call )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__assumed) identifier__assumed )attribute (identifier_self) identifier_self )assignment )expression_statement )block )except_clause )try_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__assumed) identifier__assumed )attribute (identifier_self) identifier_self )assignment )expression_statement )block )else_clause )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__assumed) identifier__assumed )attribute )return_statement )block )function_definition )module
Fill in the script if it's missing, and if it can be assumed from the language subtag. This is the opposite of `simplify_script`. >>> Language.make(language='en').assume_script() Language.make(language='en', script='Latn') >>> Language.make(language='yi').assume_script() Language.make(language='yi', script='Hebr') >>> Language.make(language='yi', script='Latn').assume_script() Language.make(language='yi', script='Latn') This fills in nothing when the script cannot be assumed -- such as when the language has multiple scripts, or it has no standard orthography: >>> Language.make(language='sr').assume_script() Language.make(language='sr') >>> Language.make(language='eee').assume_script() Language.make(language='eee') It also dosn't fill anything in when the language is unspecified. >>> Language.make(region='US').assume_script() Language.make(region='US')
(module (function_definition (function_name__element_path_create_new) function_name__element_path_create_new (parameters (identifier_element_path) identifier_element_path )parameters (block (expression_statement (assignment (identifier_element_names) identifier_element_names (call (attribute (identifier_element_path) identifier_element_path (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_start_element) identifier_start_element (call (attribute (identifier_ET) identifier_ET (identifier_Element) identifier_Element )attribute (argument_list (subscript (identifier_element_names) identifier_element_names (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_end_element) identifier_end_element (call (identifier__element_append_path) identifier__element_append_path (argument_list (identifier_start_element) identifier_start_element (subscript (identifier_element_names) identifier_element_names (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_start_element) identifier_start_element (identifier_end_element) identifier_end_element )expression_list )return_statement )block )function_definition )module
Create an entirely new element path. Return a tuple where the first item is the first element in the path, and the second item is the final element in the path.
(module (function_definition (function_name_create_module_rst_file) function_name_create_module_rst_file (parameters (identifier_module_name) identifier_module_name )parameters (block (expression_statement (assignment (identifier_return_text) identifier_return_text (binary_operator (string_'Module: ') string_'Module: ' (identifier_module_name) identifier_module_name )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_dash) identifier_dash (binary_operator (string_'=') string_'=' (call (identifier_len) identifier_len (argument_list (identifier_return_text) identifier_return_text )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_return_text) identifier_return_text (binary_operator (binary_operator (string_'\n') string_'\n' (identifier_dash) identifier_dash )binary_operator (string_'\n\n') string_'\n\n' )binary_operator )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_return_text) identifier_return_text (binary_operator (binary_operator (string_'.. automodule:: ') string_'.. automodule:: ' (identifier_module_name) identifier_module_name )binary_operator (string_'\n') string_'\n' )binary_operator )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_return_text) identifier_return_text (string_' :members:\n\n') string_' :members:\n\n' )augmented_assignment )expression_statement (return_statement (identifier_return_text) identifier_return_text )return_statement )block )function_definition )module
Function for creating content in each .rst file for a module. :param module_name: name of the module. :type module_name: str :returns: A content for auto module. :rtype: str
(module (function_definition (function_name_buffer_read_into) function_name_buffer_read_into (parameters (identifier_self) identifier_self (identifier_buffer) identifier_buffer (identifier_dtype) identifier_dtype )parameters (block (expression_statement (assignment (identifier_ctype) identifier_ctype (call (attribute (identifier_self) identifier_self (identifier__check_dtype) identifier__check_dtype )attribute (argument_list (identifier_dtype) identifier_dtype )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_cdata) identifier_cdata (identifier_frames) identifier_frames )pattern_list (call (attribute (identifier_self) identifier_self (identifier__check_buffer) identifier__check_buffer )attribute (argument_list (identifier_buffer) identifier_buffer (identifier_ctype) identifier_ctype )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_frames) identifier_frames (call (attribute (identifier_self) identifier_self (identifier__cdata_io) identifier__cdata_io )attribute (argument_list (string_'read') string_'read' (identifier_cdata) identifier_cdata (identifier_ctype) identifier_ctype (identifier_frames) identifier_frames )argument_list )call )assignment )expression_statement (return_statement (identifier_frames) identifier_frames )return_statement )block )function_definition )module
Read from the file into a given buffer object. Fills the given `buffer` with frames in the given data format starting at the current read/write position (which can be changed with :meth:`.seek`) until the buffer is full or the end of the file is reached. This advances the read/write position by the number of frames that were read. Parameters ---------- buffer : writable buffer Audio frames from the file are written to this buffer. dtype : {'float64', 'float32', 'int32', 'int16'} The data type of `buffer`. Returns ------- int The number of frames that were read from the file. This can be less than the size of `buffer`. The rest of the buffer is not filled with meaningful data. See Also -------- buffer_read, .read
(module (function_definition (function_name_will_print) function_name_will_print (parameters (default_parameter (identifier_level) identifier_level (integer_1) integer_1 )default_parameter )parameters (block (if_statement (comparison_operator (identifier_level) identifier_level (integer_1) integer_1 )comparison_operator (block (return_statement (boolean_operator (comparison_operator (identifier_quiet) identifier_quiet (None) None )comparison_operator (comparison_operator (identifier_quiet) identifier_quiet (False) False )comparison_operator )boolean_operator )return_statement )block (else_clause (block (return_statement (parenthesized_expression (boolean_operator (parenthesized_expression (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_verbosity) identifier_verbosity (identifier_int) identifier_int )argument_list )call (comparison_operator (identifier_level) identifier_level (identifier_verbosity) identifier_verbosity )comparison_operator )boolean_operator )parenthesized_expression (parenthesized_expression (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_verbosity) identifier_verbosity (identifier_bool) identifier_bool )argument_list )call (comparison_operator (identifier_verbosity) identifier_verbosity (True) True )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator )parenthesized_expression )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns True if the current global status of messaging would print a message using any of the printing functions in this module.
(module (function_definition (function_name_role_create) function_name_role_create (parameters (identifier_name) identifier_name (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter (dictionary_splat_pattern (identifier_connection_args) identifier_connection_args )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_kstone) identifier_kstone (call (identifier_auth) identifier_auth (argument_list (identifier_profile) identifier_profile (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'Error') string_'Error' (call (identifier_role_get) identifier_role_get (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call )comparison_operator (block (return_statement (dictionary (pair (string_'Error') string_'Error' (call (attribute (string_'Role "{0}" already exists') string_'Role "{0}" already exists' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )pair )dictionary )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_kstone) identifier_kstone (identifier_roles) identifier_roles )attribute (identifier_create) identifier_create )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement (return_statement (call (identifier_role_get) identifier_role_get (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Create a named role. CLI Example: .. code-block:: bash salt '*' keystone.role_create admin
(module (function_definition (function_name_cudaGetDevice) function_name_cudaGetDevice (parameters )parameters (block (expression_statement (assignment (identifier_dev) identifier_dev (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_status) identifier_status (call (attribute (identifier__libcudart) identifier__libcudart (identifier_cudaGetDevice) identifier_cudaGetDevice )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_dev) identifier_dev )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_cudaCheckStatus) identifier_cudaCheckStatus (argument_list (identifier_status) identifier_status )argument_list )call )expression_statement (return_statement (attribute (identifier_dev) identifier_dev (identifier_value) identifier_value )attribute )return_statement )block )function_definition )module
Get current CUDA device. Return the identifying number of the device currently used to process CUDA operations. Returns ------- dev : int Device number.
(module (function_definition (function_name_psnr) function_name_psnr (parameters (identifier_data1) identifier_data1 (identifier_data2) identifier_data2 (default_parameter (identifier_method) identifier_method (string_'starck') string_'starck' )default_parameter (default_parameter (identifier_max_pix) identifier_max_pix (integer_255) integer_255 )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (comparison_operator (identifier_method) identifier_method (string_'starck') string_'starck' )comparison_operator (block (return_statement (parenthesized_expression (binary_operator (integer_20) integer_20 (call (attribute (identifier_np) identifier_np (identifier_log10) identifier_log10 )attribute (argument_list (binary_operator (parenthesized_expression (binary_operator (subscript (attribute (identifier_data1) identifier_data1 (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (call (attribute (identifier_np) identifier_np (identifier_abs) identifier_abs )attribute (argument_list (binary_operator (call (attribute (identifier_np) identifier_np (identifier_max) identifier_max )attribute (argument_list (identifier_data1) identifier_data1 )argument_list )call (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (identifier_data1) identifier_data1 )argument_list )call )binary_operator )argument_list )call )binary_operator )parenthesized_expression (call (attribute (attribute (identifier_np) identifier_np (identifier_linalg) identifier_linalg )attribute (identifier_norm) identifier_norm )attribute (argument_list (binary_operator (identifier_data1) identifier_data1 (identifier_data2) identifier_data2 )binary_operator )argument_list )call )binary_operator )argument_list )call )binary_operator )parenthesized_expression )return_statement )block (elif_clause (comparison_operator (identifier_method) identifier_method (string_'wiki') string_'wiki' )comparison_operator (block (return_statement (parenthesized_expression (binary_operator (binary_operator (integer_20) integer_20 (call (attribute (identifier_np) identifier_np (identifier_log10) identifier_log10 )attribute (argument_list (identifier_max_pix) identifier_max_pix )argument_list )call )binary_operator (binary_operator (integer_10) integer_10 (call (attribute (identifier_np) identifier_np (identifier_log10) identifier_log10 )attribute (argument_list (call (identifier_mse) identifier_mse (argument_list (identifier_data1) identifier_data1 (identifier_data2) identifier_data2 )argument_list )call )argument_list )call )binary_operator )binary_operator )parenthesized_expression )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'Invalid PSNR method. Options are "starck" and ') string_'Invalid PSNR method. Options are "starck" and ' (string_'"wiki"') string_'"wiki"' )concatenated_string )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
r"""Peak Signal-to-Noise Ratio This method calculates the Peak Signal-to-Noise Ratio between an two data sets Parameters ---------- data1 : np.ndarray First data set data2 : np.ndarray Second data set method : str {'starck', 'wiki'}, optional PSNR implementation, default ('starck') max_pix : int, optional Maximum number of pixels, default (max_pix=255) Returns ------- float PSNR value Examples -------- >>> from modopt.math.stats import psnr >>> a = np.arange(9).reshape(3, 3) >>> psnr(a, a + 2) 12.041199826559248 >>> psnr(a, a + 2, method='wiki') 42.110203695399477 Notes ----- 'starck': Implements eq.3.7 from _[S2010] 'wiki': Implements PSNR equation on https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio .. math:: \mathrm{PSNR} = 20\log_{10}(\mathrm{MAX}_I - 10\log_{10}(\mathrm{MSE}))
(module (function_definition (function_name_get_display_label) function_name_get_display_label (parameters (identifier_choices) identifier_choices (identifier_status) identifier_status )parameters (block (for_statement (tuple_pattern (identifier_value) identifier_value (identifier_label) identifier_label )tuple_pattern (identifier_choices) identifier_choices (block (if_statement (comparison_operator (identifier_value) identifier_value (call (attribute (parenthesized_expression (boolean_operator (identifier_status) identifier_status (string_'') string_'' )boolean_operator )parenthesized_expression (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_display_label) identifier_display_label (identifier_label) identifier_label )assignment )expression_statement (break_statement )break_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (identifier_display_label) identifier_display_label (identifier_status) identifier_status )assignment )expression_statement )block )else_clause )for_statement (return_statement (identifier_display_label) identifier_display_label )return_statement )block )function_definition )module
Get a display label for resource status. This method is used in places where a resource's status or admin state labels need to assigned before they are sent to the view template.
(module (function_definition (function_name__start_auth_proc) function_name__start_auth_proc (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Computing the signing key hex') string_'Computing the signing key hex' )argument_list )call )expression_statement (expression_statement (assignment (identifier_verify_key) identifier_verify_key (attribute (attribute (identifier_self) identifier_self (identifier___signing_key) identifier___signing_key )attribute (identifier_verify_key) identifier_verify_key )attribute )assignment )expression_statement (expression_statement (assignment (identifier_sgn_verify_hex) identifier_sgn_verify_hex (call (attribute (identifier_verify_key) identifier_verify_key (identifier_encode) identifier_encode )attribute (argument_list (keyword_argument (identifier_encoder) identifier_encoder (attribute (attribute (identifier_nacl) identifier_nacl (identifier_encoding) identifier_encoding )attribute (identifier_HexEncoder) identifier_HexEncoder )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Starting the authenticator subprocess') string_'Starting the authenticator subprocess' )argument_list )call )expression_statement (expression_statement (assignment (identifier_auth) identifier_auth (call (identifier_NapalmLogsAuthProc) identifier_NapalmLogsAuthProc (argument_list (attribute (identifier_self) identifier_self (identifier_certificate) identifier_certificate )attribute (attribute (identifier_self) identifier_self (identifier_keyfile) identifier_keyfile )attribute (attribute (identifier_self) identifier_self (identifier___priv_key) identifier___priv_key )attribute (identifier_sgn_verify_hex) identifier_sgn_verify_hex (attribute (identifier_self) identifier_self (identifier_auth_address) identifier_auth_address )attribute (attribute (identifier_self) identifier_self (identifier_auth_port) identifier_auth_port )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_proc) identifier_proc (call (identifier_Process) identifier_Process (argument_list (keyword_argument (identifier_target) identifier_target (attribute (identifier_auth) identifier_auth (identifier_start) identifier_start )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_proc) identifier_proc (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_proc) identifier_proc (identifier_description) identifier_description )attribute (string_'Auth process') string_'Auth process' )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Started auth process as %s with PID %s') string_'Started auth process as %s with PID %s' (attribute (identifier_proc) identifier_proc (identifier__name) identifier__name )attribute (attribute (identifier_proc) identifier_proc (identifier_pid) identifier_pid )attribute )argument_list )call )expression_statement (return_statement (identifier_proc) identifier_proc )return_statement )block )function_definition )module
Start the authenticator process.
(module (function_definition (function_name_get_tree) function_name_get_tree (parameters (default_parameter (identifier_root) identifier_root (None) None )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_insights) identifier_insights )dotted_name (dotted_name (identifier_run) identifier_run )dotted_name )import_from_statement (return_statement (call (attribute (call (identifier_run) identifier_run (argument_list (identifier_MultipathConfTree) identifier_MultipathConfTree (keyword_argument (identifier_root) identifier_root (identifier_root) identifier_root )keyword_argument )argument_list )call (identifier_get) identifier_get )attribute (argument_list (identifier_MultipathConfTree) identifier_MultipathConfTree )argument_list )call )return_statement )block )function_definition )module
This is a helper function to get a multipath configuration component for your local machine or an archive. It's for use in interactive sessions.
(module (function_definition (function_name_get_notebook_app_versions) function_name_get_notebook_app_versions (parameters )parameters (block (expression_statement (assignment (identifier_notebook_apps) identifier_notebook_apps (call (attribute (identifier_dxpy) identifier_dxpy (identifier_find_apps) identifier_find_apps )attribute (argument_list (keyword_argument (identifier_name) identifier_name (identifier_NOTEBOOK_APP) identifier_NOTEBOOK_APP )keyword_argument (keyword_argument (identifier_all_versions) identifier_all_versions (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_versions) identifier_versions (list_comprehension (call (identifier_str) identifier_str (argument_list (subscript (call (attribute (identifier_dxpy) identifier_dxpy (identifier_describe) identifier_describe )attribute (argument_list (subscript (identifier_app) identifier_app (string_'id') string_'id' )subscript )argument_list )call (string_'version') string_'version' )subscript )argument_list )call (for_in_clause (identifier_app) identifier_app (identifier_notebook_apps) identifier_notebook_apps )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_versions) identifier_versions )return_statement )block )function_definition )module
Get the valid version numbers of the notebook app.
(module (function_definition (function_name__on_axes_updated) function_name__on_axes_updated (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_attrs) identifier_attrs )attribute (string_"axes") string_"axes" )subscript (list_comprehension (call (attribute (attribute (identifier_a) identifier_a (identifier_identity) identifier_identity )attribute (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call (for_in_clause (identifier_a) identifier_a (attribute (identifier_self) identifier_self (identifier__axes) identifier__axes )attribute )for_in_clause )list_comprehension )assignment )expression_statement (while_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__current_axis_identities_in_natural_namespace) identifier__current_axis_identities_in_natural_namespace )attribute )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (attribute (identifier_self) identifier_self (identifier__current_axis_identities_in_natural_namespace) identifier__current_axis_identities_in_natural_namespace )attribute (identifier_pop) identifier_pop )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (identifier_delattr) identifier_delattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key )argument_list )call )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )while_statement (for_statement (identifier_a) identifier_a (attribute (identifier_self) identifier_self (identifier__axes) identifier__axes )attribute (block (expression_statement (assignment (identifier_key) identifier_key (attribute (identifier_a) identifier_a (identifier_natural_name) identifier_natural_name )attribute )assignment )expression_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key (identifier_a) identifier_a )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__current_axis_identities_in_natural_namespace) identifier__current_axis_identities_in_natural_namespace )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_key) identifier_key )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Method to run when axes are changed in any way. Propagates updated axes properly.
(module (function_definition (function_name_branch_order) function_name_branch_order (parameters (identifier_h) identifier_h (identifier_section) identifier_section (default_parameter (identifier_path) identifier_path (list )list )default_parameter )parameters (block (expression_statement (call (attribute (identifier_path) identifier_path (identifier_append) identifier_append )attribute (argument_list (identifier_section) identifier_section )argument_list )call )expression_statement (expression_statement (assignment (identifier_sref) identifier_sref (call (attribute (identifier_h) identifier_h (identifier_SectionRef) identifier_SectionRef )attribute (argument_list (keyword_argument (identifier_sec) identifier_sec (identifier_section) identifier_section )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_sref) identifier_sref (identifier_has_parent) identifier_has_parent )attribute (argument_list )argument_list )call (float_0.9) float_0.9 )comparison_operator (block (return_statement (integer_0) integer_0 )return_statement )block (else_clause (block (expression_statement (assignment (identifier_nchild) identifier_nchild (call (identifier_len) identifier_len (argument_list (call (identifier_list) identifier_list (argument_list (attribute (call (attribute (identifier_h) identifier_h (identifier_SectionRef) identifier_SectionRef )attribute (argument_list (keyword_argument (identifier_sec) identifier_sec (attribute (identifier_sref) identifier_sref (identifier_parent) identifier_parent )attribute )keyword_argument )argument_list )call (identifier_child) identifier_child )attribute )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_nchild) identifier_nchild (float_1.1) float_1.1 )comparison_operator (block (return_statement (call (identifier_branch_order) identifier_branch_order (argument_list (identifier_h) identifier_h (attribute (identifier_sref) identifier_sref (identifier_parent) identifier_parent )attribute (identifier_path) identifier_path )argument_list )call )return_statement )block (else_clause (block (return_statement (binary_operator (integer_1) integer_1 (call (identifier_branch_order) identifier_branch_order (argument_list (identifier_h) identifier_h (attribute (identifier_sref) identifier_sref (identifier_parent) identifier_parent )attribute (identifier_path) identifier_path )argument_list )call )binary_operator )return_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )function_definition )module
Returns the branch order of a section
(module (function_definition (function_name_play_Note) function_name_play_Note (parameters (identifier_self) identifier_self (identifier_note) identifier_note )parameters (block (expression_statement (assignment (identifier_velocity) identifier_velocity (integer_64) integer_64 )assignment )expression_statement (expression_statement (assignment (identifier_channel) identifier_channel (integer_1) integer_1 )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_note) identifier_note (string_'dynamics') string_'dynamics' )argument_list )call (block (if_statement (comparison_operator (string_'velocity') string_'velocity' (attribute (identifier_note) identifier_note (identifier_dynamics) identifier_dynamics )attribute )comparison_operator (block (expression_statement (assignment (identifier_velocity) identifier_velocity (subscript (attribute (identifier_note) identifier_note (identifier_dynamics) identifier_dynamics )attribute (string_'velocity') string_'velocity' )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'channel') string_'channel' (attribute (identifier_note) identifier_note (identifier_dynamics) identifier_dynamics )attribute )comparison_operator (block (expression_statement (assignment (identifier_channel) identifier_channel (subscript (attribute (identifier_note) identifier_note (identifier_dynamics) identifier_dynamics )attribute (string_'channel') string_'channel' )subscript )assignment )expression_statement )block )if_statement )block )if_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_note) identifier_note (string_'channel') string_'channel' )argument_list )call (block (expression_statement (assignment (identifier_channel) identifier_channel (attribute (identifier_note) identifier_note (identifier_channel) identifier_channel )attribute )assignment )expression_statement )block )if_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_note) identifier_note (string_'velocity') string_'velocity' )argument_list )call (block (expression_statement (assignment (identifier_velocity) identifier_velocity (attribute (identifier_note) identifier_note (identifier_velocity) identifier_velocity )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_change_instrument) identifier_change_instrument )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_instrument) identifier_set_instrument )attribute (argument_list (identifier_channel) identifier_channel (attribute (identifier_self) identifier_self (identifier_instrument) identifier_instrument )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_change_instrument) identifier_change_instrument )attribute (False) False )assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_track_data) identifier_track_data )attribute (call (attribute (identifier_self) identifier_self (identifier_note_on) identifier_note_on )attribute (argument_list (identifier_channel) identifier_channel (binary_operator (call (identifier_int) identifier_int (argument_list (identifier_note) identifier_note )argument_list )call (integer_12) integer_12 )binary_operator (identifier_velocity) identifier_velocity )argument_list )call )augmented_assignment )expression_statement )block )function_definition )module
Convert a Note object to a midi event and adds it to the track_data. To set the channel on which to play this note, set Note.channel, the same goes for Note.velocity.
(module (function_definition (function_name_import_module_or_none) function_name_import_module_or_none (parameters (identifier_module_label) identifier_module_label )parameters (block (try_statement (block (return_statement (call (attribute (identifier_importlib) identifier_importlib (identifier_import_module) identifier_import_module )attribute (argument_list (identifier_module_label) identifier_module_label )argument_list )call )return_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (expression_statement (assignment (pattern_list (identifier___) identifier___ (identifier___) identifier___ (identifier_exc_traceback) identifier_exc_traceback )pattern_list (call (attribute (identifier_sys) identifier_sys (identifier_exc_info) identifier_exc_info )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_frames) identifier_frames (call (attribute (identifier_traceback) identifier_traceback (identifier_extract_tb) identifier_extract_tb )attribute (argument_list (identifier_exc_traceback) identifier_exc_traceback )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_frames) identifier_frames (list_comprehension (identifier_f) identifier_f (for_in_clause (identifier_f) identifier_f (identifier_frames) identifier_frames )for_in_clause (if_clause (boolean_operator (boolean_operator (boolean_operator (comparison_operator (subscript (identifier_f) identifier_f (integer_0) integer_0 )subscript (string_"<frozen importlib._bootstrap>") string_"<frozen importlib._bootstrap>" )comparison_operator (comparison_operator (subscript (identifier_f) identifier_f (integer_0) integer_0 )subscript (identifier_IMPORT_PATH_IMPORTLIB) identifier_IMPORT_PATH_IMPORTLIB )comparison_operator )boolean_operator (not_operator (call (attribute (subscript (identifier_f) identifier_f (integer_0) integer_0 )subscript (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_IMPORT_PATH_GEVENT) identifier_IMPORT_PATH_GEVENT )argument_list )call )not_operator )boolean_operator (not_operator (comparison_operator (identifier_IMPORT_PATH_PYDEV) identifier_IMPORT_PATH_PYDEV (subscript (identifier_f) identifier_f (integer_0) integer_0 )subscript )comparison_operator )not_operator )boolean_operator )if_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_frames) identifier_frames )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement )raise_statement )block )if_statement )block )except_clause )try_statement (return_statement (None) None )return_statement )block )function_definition )module
Imports the module with the given name. Returns None if the module doesn't exist, but it does propagates import errors in deeper modules.
(module (function_definition (function_name_union) function_name_union (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_sets) identifier_sets )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_cls) identifier_cls (conditional_expression (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_self) identifier_self (identifier_OrderedSet) identifier_OrderedSet )argument_list )call (identifier_OrderedSet) identifier_OrderedSet )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_containers) identifier_containers (call (identifier_map) identifier_map (argument_list (identifier_list) identifier_list (call (attribute (identifier_it) identifier_it (identifier_chain) identifier_chain )attribute (argument_list (list (identifier_self) identifier_self )list (identifier_sets) identifier_sets )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_items) identifier_items (call (attribute (attribute (identifier_it) identifier_it (identifier_chain) identifier_chain )attribute (identifier_from_iterable) identifier_from_iterable )attribute (argument_list (identifier_containers) identifier_containers )argument_list )call )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_items) identifier_items )argument_list )call )return_statement )block )function_definition )module
Combines all unique items. Each items order is defined by its first appearance. Example: >>> oset = OrderedSet.union(OrderedSet([3, 1, 4, 1, 5]), [1, 3], [2, 0]) >>> print(oset) OrderedSet([3, 1, 4, 5, 2, 0]) >>> oset.union([8, 9]) OrderedSet([3, 1, 4, 5, 2, 0, 8, 9]) >>> oset | {10} OrderedSet([3, 1, 4, 5, 2, 0, 10])
(module (function_definition (function_name_collect_data) function_name_collect_data (parameters (identifier_self) identifier_self (identifier_correct_only) identifier_correct_only )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_results) identifier_results )attribute (list )list )assignment )expression_statement (function_definition (function_name_get_value_from_logfile) function_name_get_value_from_logfile (parameters (identifier_lines) identifier_lines (identifier_identifier) identifier_identifier )parameters (block (return_statement (call (attribute (call (identifier_load_tool) identifier_load_tool (argument_list (identifier_self) identifier_self )argument_list )call (identifier_get_value_from_output) identifier_get_value_from_output )attribute (argument_list (identifier_lines) identifier_lines (identifier_identifier) identifier_identifier )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (identifier_log_zip_cache) identifier_log_zip_cache (dictionary )dictionary )assignment )expression_statement (try_statement (block (for_statement (pattern_list (identifier_xml_result) identifier_xml_result (identifier_result_file) identifier_result_file )pattern_list (attribute (identifier_self) identifier_self (identifier__xml_results) identifier__xml_results )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_results) identifier_results )attribute (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_RunResult) identifier_RunResult (identifier_create_from_xml) identifier_create_from_xml )attribute (argument_list (identifier_xml_result) identifier_xml_result (identifier_get_value_from_logfile) identifier_get_value_from_logfile (attribute (identifier_self) identifier_self (identifier_columns) identifier_columns )attribute (identifier_correct_only) identifier_correct_only (identifier_log_zip_cache) identifier_log_zip_cache (attribute (identifier_self) identifier_self (identifier_columns_relevant_for_diff) identifier_columns_relevant_for_diff )attribute (identifier_result_file) identifier_result_file )argument_list )call )argument_list )call )expression_statement )block )for_statement )block (finally_clause (block (for_statement (identifier_file) identifier_file (call (attribute (identifier_log_zip_cache) identifier_log_zip_cache (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_file) identifier_file (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )finally_clause )try_statement (for_statement (identifier_column) identifier_column (attribute (identifier_self) identifier_self (identifier_columns) identifier_columns )attribute (block (expression_statement (assignment (identifier_column_values) identifier_column_values (generator_expression (subscript (attribute (identifier_run_result) identifier_run_result (identifier_values) identifier_values )attribute (call (attribute (attribute (identifier_run_result) identifier_run_result (identifier_columns) identifier_columns )attribute (identifier_index) identifier_index )attribute (argument_list (identifier_column) identifier_column )argument_list )call )subscript (for_in_clause (identifier_run_result) identifier_run_result (attribute (identifier_self) identifier_self (identifier_results) identifier_results )attribute )for_in_clause )generator_expression )assignment )expression_statement (expression_statement (assignment (pattern_list (attribute (identifier_column) identifier_column (identifier_type) identifier_type )attribute (attribute (identifier_column) identifier_column (identifier_unit) identifier_unit )attribute (attribute (identifier_column) identifier_column (identifier_source_unit) identifier_source_unit )attribute (attribute (identifier_column) identifier_column (identifier_scale_factor) identifier_scale_factor )attribute )pattern_list (call (identifier_get_column_type) identifier_get_column_type (argument_list (identifier_column) identifier_column (identifier_column_values) identifier_column_values )argument_list )call )assignment )expression_statement )block )for_statement (delete_statement (attribute (identifier_self) identifier_self (identifier__xml_results) identifier__xml_results )attribute )delete_statement )block )function_definition )module
Load the actual result values from the XML file and the log files. This may take some time if many log files have to be opened and parsed.
(module (function_definition (function_name_add_component) function_name_add_component (parameters (identifier_self) identifier_self (typed_parameter (identifier_entity) identifier_entity (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_component_instance) identifier_component_instance (type (identifier_Any) identifier_Any )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (assignment (identifier_component_type) identifier_component_type (call (identifier_type) identifier_type (argument_list (identifier_component_instance) identifier_component_instance )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_component_type) identifier_component_type (attribute (identifier_self) identifier_self (identifier__components) identifier__components )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__components) identifier__components )attribute (identifier_component_type) identifier_component_type )subscript (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__components) identifier__components )attribute (identifier_component_type) identifier_component_type )subscript (identifier_add) identifier_add )attribute (argument_list (identifier_entity) identifier_entity )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_entity) identifier_entity (attribute (identifier_self) identifier_self (identifier__entities) identifier__entities )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__entities) identifier__entities )attribute (identifier_entity) identifier_entity )subscript (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier__entities) identifier__entities )attribute (identifier_entity) identifier_entity )subscript (identifier_component_type) identifier_component_type )subscript (identifier_component_instance) identifier_component_instance )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clear_cache) identifier_clear_cache )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Add a new Component instance to an Entity. Add a Component instance to an Entiy. If a Component of the same type is already assigned to the Entity, it will be replaced. :param entity: The Entity to associate the Component with. :param component_instance: A Component instance.
(module (function_definition (function_name_CreateChatWith) function_name_CreateChatWith (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_Usernames) identifier_Usernames )list_splat_pattern )parameters (block (return_statement (call (identifier_Chat) identifier_Chat (argument_list (identifier_self) identifier_self (subscript (call (identifier_chop) identifier_chop (argument_list (call (attribute (identifier_self) identifier_self (identifier__DoCommand) identifier__DoCommand )attribute (argument_list (binary_operator (string_'CHAT CREATE %s') string_'CHAT CREATE %s' (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_Usernames) identifier_Usernames )argument_list )call )binary_operator )argument_list )call (integer_2) integer_2 )argument_list )call (integer_1) integer_1 )subscript )argument_list )call )return_statement )block )function_definition )module
Creates a chat with one or more users. :Parameters: Usernames : str One or more Skypenames of the users. :return: A chat object :rtype: `Chat` :see: `Chat.AddMembers`
(module (function_definition (function_name_get_blink_cookie) function_name_get_blink_cookie (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_self) identifier_self (identifier_get_cookie) identifier_get_cookie )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clear_cookie) identifier_clear_cookie )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement (return_statement (call (attribute (identifier_escape) identifier_escape (identifier_url_unescape) identifier_url_unescape )attribute (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Gets a blink cookie value
(module (function_definition (function_name_com_google_fonts_check_metadata_valid_copyright) function_name_com_google_fonts_check_metadata_valid_copyright (parameters (identifier_font_metadata) identifier_font_metadata )parameters (block (import_statement (dotted_name (identifier_re) identifier_re )dotted_name )import_statement (expression_statement (assignment (identifier_string) identifier_string (attribute (identifier_font_metadata) identifier_font_metadata (identifier_copyright) identifier_copyright )attribute )assignment )expression_statement (expression_statement (assignment (identifier_does_match) identifier_does_match (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_r'Copyright [0-9]{4} The .* Project Authors \([^\@]*\)') string_r'Copyright [0-9]{4} The .* Project Authors \([^\@]*\)' (identifier_string) identifier_string )argument_list )call )assignment )expression_statement (if_statement (identifier_does_match) identifier_does_match (block (expression_statement (yield (expression_list (identifier_PASS) identifier_PASS (string_"METADATA.pb copyright string is good") string_"METADATA.pb copyright string is good" )expression_list )yield )expression_statement )block (else_clause (block (expression_statement (yield (expression_list (identifier_FAIL) identifier_FAIL (call (attribute (parenthesized_expression (concatenated_string (string_"METADATA.pb: Copyright notices should match") string_"METADATA.pb: Copyright notices should match" (string_" a pattern similar to:") string_" a pattern similar to:" (string_" 'Copyright 2017 The Familyname") string_" 'Copyright 2017 The Familyname" (string_" Project Authors (git url)'\n") string_" Project Authors (git url)'\n" (string_"But instead we have got:") string_"But instead we have got:" (string_" '{}'") string_" '{}'" )concatenated_string )parenthesized_expression (identifier_format) identifier_format )attribute (argument_list (identifier_string) identifier_string )argument_list )call )expression_list )yield )expression_statement )block )else_clause )if_statement )block )function_definition )module
Copyright notices match canonical pattern in METADATA.pb
(module (function_definition (function_name_from_json) function_name_from_json (parameters (identifier_cls) identifier_cls (identifier_stream) identifier_stream (identifier_json_data) identifier_json_data )parameters (block (expression_statement (assignment (identifier_type_converter) identifier_type_converter (call (identifier__get_decoder_method) identifier__get_decoder_method (argument_list (call (attribute (identifier_stream) identifier_stream (identifier_get_data_type) identifier_get_data_type )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_type_converter) identifier_type_converter (argument_list (call (attribute (identifier_json_data) identifier_json_data (identifier_get) identifier_get )attribute (argument_list (string_"data") string_"data" )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (keyword_argument (identifier_stream_id) identifier_stream_id (call (attribute (identifier_stream) identifier_stream (identifier_get_stream_id) identifier_get_stream_id )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_data_type) identifier_data_type (call (attribute (identifier_stream) identifier_stream (identifier_get_data_type) identifier_get_data_type )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_units) identifier_units (call (attribute (identifier_stream) identifier_stream (identifier_get_units) identifier_get_units )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_description) identifier_description (call (attribute (identifier_json_data) identifier_json_data (identifier_get) identifier_get )attribute (argument_list (string_"description") string_"description" )argument_list )call )keyword_argument (keyword_argument (identifier_timestamp) identifier_timestamp (call (attribute (identifier_json_data) identifier_json_data (identifier_get) identifier_get )attribute (argument_list (string_"timestampISO") string_"timestampISO" )argument_list )call )keyword_argument (keyword_argument (identifier_server_timestamp) identifier_server_timestamp (call (attribute (identifier_json_data) identifier_json_data (identifier_get) identifier_get )attribute (argument_list (string_"serverTimestampISO") string_"serverTimestampISO" )argument_list )call )keyword_argument (keyword_argument (identifier_quality) identifier_quality (call (attribute (identifier_json_data) identifier_json_data (identifier_get) identifier_get )attribute (argument_list (string_"quality") string_"quality" )argument_list )call )keyword_argument (keyword_argument (identifier_location) identifier_location (call (attribute (identifier_json_data) identifier_json_data (identifier_get) identifier_get )attribute (argument_list (string_"location") string_"location" )argument_list )call )keyword_argument (keyword_argument (identifier_dp_id) identifier_dp_id (call (attribute (identifier_json_data) identifier_json_data (identifier_get) identifier_get )attribute (argument_list (string_"id") string_"id" )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create a new DataPoint object from device cloud JSON data :param DataStream stream: The :class:`~DataStream` out of which this data is coming :param dict json_data: Deserialized JSON data from Device Cloud about this device :raises ValueError: if the data is malformed :return: (:class:`~DataPoint`) newly created :class:`~DataPoint`
(module (function_definition (function_name_format_query_result) function_name_format_query_result (parameters (identifier_self) identifier_self (identifier_query_result) identifier_query_result (identifier_query_path) identifier_query_path (default_parameter (identifier_return_type) identifier_return_type (identifier_list) identifier_list )default_parameter (default_parameter (identifier_preceding_depth) identifier_preceding_depth (None) None )default_parameter )parameters (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_query_result) identifier_query_result )argument_list )call (identifier_return_type) identifier_return_type )comparison_operator (block (expression_statement (assignment (identifier_converted_result) identifier_converted_result (call (attribute (identifier_self) identifier_self (identifier_format_with_handler) identifier_format_with_handler )attribute (argument_list (identifier_query_result) identifier_query_result (identifier_return_type) identifier_return_type )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_converted_result) identifier_converted_result (identifier_query_result) identifier_query_result )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_converted_result) identifier_converted_result (call (attribute (identifier_self) identifier_self (identifier_add_preceding_dict) identifier_add_preceding_dict )attribute (argument_list (identifier_converted_result) identifier_converted_result (identifier_query_path) identifier_query_path (identifier_preceding_depth) identifier_preceding_depth )argument_list )call )assignment )expression_statement (return_statement (identifier_converted_result) identifier_converted_result )return_statement )block )function_definition )module
Formats the query result based on the return type requested. :param query_result: (dict or str or list), yaml query result :param query_path: (str, list(str)), representing query path :param return_type: type, return type of object user desires :param preceding_depth: int, the depth to which we want to encapsulate back up config tree -1 : defaults to entire tree :return: (dict, OrderedDict, str, list), specified return type
(module (function_definition (function_name_get) function_name_get (parameters (identifier_cls) identifier_cls (identifier_bucket) identifier_bucket (identifier_key) identifier_key (identifier_upload_id) identifier_upload_id (default_parameter (identifier_with_completed) identifier_with_completed (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_q) identifier_q (call (attribute (attribute (identifier_cls) identifier_cls (identifier_query) identifier_query )attribute (identifier_filter_by) identifier_filter_by )attribute (argument_list (keyword_argument (identifier_upload_id) identifier_upload_id (identifier_upload_id) identifier_upload_id )keyword_argument (keyword_argument (identifier_bucket_id) identifier_bucket_id (call (identifier_as_bucket_id) identifier_as_bucket_id (argument_list (identifier_bucket) identifier_bucket )argument_list )call )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_with_completed) identifier_with_completed )not_operator (block (expression_statement (assignment (identifier_q) identifier_q (call (attribute (identifier_q) identifier_q (identifier_filter) identifier_filter )attribute (argument_list (call (attribute (attribute (identifier_cls) identifier_cls (identifier_completed) identifier_completed )attribute (identifier_is_) identifier_is_ )attribute (argument_list (False) False )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_q) identifier_q (identifier_one_or_none) identifier_one_or_none )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Fetch a specific multipart object.
(module (function_definition (function_name_get_file) function_name_get_file (parameters (identifier_type_str) identifier_type_str (identifier_open_files) identifier_open_files (identifier_basedir) identifier_basedir )parameters (block (if_statement (comparison_operator (identifier_type_str) identifier_type_str (identifier_open_files) identifier_open_files )comparison_operator (block (expression_statement (assignment (identifier_filename) identifier_filename (binary_operator (identifier_type_str) identifier_type_str (string_".html") string_".html" )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )assignment )expression_statement (expression_statement (assignment (identifier_fd) identifier_fd (call (attribute (identifier_codecs) identifier_codecs (identifier_open) identifier_open )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_basedir) identifier_basedir (identifier_filename) identifier_filename )argument_list )call (string_'w') string_'w' (identifier_encoding) identifier_encoding )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_open_files) identifier_open_files (identifier_type_str) identifier_type_str )subscript (identifier_fd) identifier_fd )assignment )expression_statement (expression_statement (call (identifier_write_html_header) identifier_write_html_header (argument_list (identifier_fd) identifier_fd (identifier_type_str) identifier_type_str (identifier_encoding) identifier_encoding )argument_list )call )expression_statement )block )if_statement (return_statement (subscript (identifier_open_files) identifier_open_files (identifier_type_str) identifier_type_str )subscript )return_statement )block )function_definition )module
Get already opened file, or open and initialize a new one.
(module (function_definition (function_name_createZone) function_name_createZone (parameters (identifier_self) identifier_self (identifier_zone) identifier_zone (default_parameter (identifier_zoneFile) identifier_zoneFile (None) None )default_parameter (default_parameter (identifier_callback) identifier_callback (None) None )default_parameter (default_parameter (identifier_errback) identifier_errback (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (import_statement (dotted_name (identifier_ns1) identifier_ns1 (identifier_zones) identifier_zones )dotted_name )import_statement (expression_statement (assignment (identifier_zone) identifier_zone (call (attribute (attribute (identifier_ns1) identifier_ns1 (identifier_zones) identifier_zones )attribute (identifier_Zone) identifier_Zone )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_zone) identifier_zone )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_zone) identifier_zone (identifier_create) identifier_create )attribute (argument_list (keyword_argument (identifier_zoneFile) identifier_zoneFile (identifier_zoneFile) identifier_zoneFile )keyword_argument (keyword_argument (identifier_callback) identifier_callback (identifier_callback) identifier_callback )keyword_argument (keyword_argument (identifier_errback) identifier_errback (identifier_errback) identifier_errback )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Create a new zone, and return an associated high level Zone object. Several optional keyword arguments are available to configure the SOA record. If zoneFile is specified, upload the specific zone definition file to populate the zone with. :param str zone: zone name, like 'example.com' :param str zoneFile: absolute path of a zone file :keyword int retry: retry time :keyword int refresh: refresh ttl :keyword int expiry: expiry ttl :keyword int nx_ttl: nxdomain TTL :rtype: :py:class:`ns1.zones.Zone`
(module (function_definition (function_name_internal_assert) function_name_internal_assert (parameters (identifier_condition) identifier_condition (default_parameter (identifier_message) identifier_message (None) None )default_parameter (default_parameter (identifier_item) identifier_item (None) None )default_parameter (default_parameter (identifier_extra) identifier_extra (None) None )default_parameter )parameters (block (if_statement (boolean_operator (identifier_DEVELOP) identifier_DEVELOP (call (identifier_callable) identifier_callable (argument_list (identifier_condition) identifier_condition )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_condition) identifier_condition (call (identifier_condition) identifier_condition (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (not_operator (identifier_condition) identifier_condition )not_operator (block (if_statement (comparison_operator (identifier_message) identifier_message (None) None )comparison_operator (block (expression_statement (assignment (identifier_message) identifier_message (string_"assertion failed") string_"assertion failed" )assignment )expression_statement (if_statement (comparison_operator (identifier_item) identifier_item (None) None )comparison_operator (block (expression_statement (assignment (identifier_item) identifier_item (identifier_condition) identifier_condition )assignment )expression_statement )block )if_statement )block )if_statement (raise_statement (call (identifier_CoconutInternalException) identifier_CoconutInternalException (argument_list (identifier_message) identifier_message (identifier_item) identifier_item (identifier_extra) identifier_extra )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Raise InternalException if condition is False. If condition is a function, execute it on DEVELOP only.
(module (function_definition (function_name__cache_get) function_name__cache_get (parameters (identifier_self) identifier_self (identifier_date) identifier_date )parameters (block (if_statement (comparison_operator (identifier_date) identifier_date (attribute (identifier_self) identifier_self (identifier_cache_data) identifier_cache_data )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Using class-cached data for date %s') string_'Using class-cached data for date %s' (call (attribute (identifier_date) identifier_date (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%d') string_'%Y-%m-%d' )argument_list )call )argument_list )call )expression_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_cache_data) identifier_cache_data )attribute (identifier_date) identifier_date )subscript )return_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Getting data from cache for date %s') string_'Getting data from cache for date %s' (call (attribute (identifier_date) identifier_date (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%d') string_'%Y-%m-%d' )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (attribute (identifier_self) identifier_self (identifier_cache) identifier_cache )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_project_name) identifier_project_name )attribute (identifier_date) identifier_date )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_cache_data) identifier_cache_data )attribute (identifier_date) identifier_date )subscript (identifier_data) identifier_data )assignment )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Return cache data for the specified day; cache locally in this class. :param date: date to get data for :type date: datetime.datetime :return: cache data for date :rtype: dict
(module (function_definition (function_name__zmq_socket_context) function_name__zmq_socket_context (parameters (identifier_context) identifier_context (identifier_socket_type) identifier_socket_type (identifier_bind_endpoints) identifier_bind_endpoints )parameters (block (expression_statement (assignment (identifier_socket) identifier_socket (call (attribute (identifier_context) identifier_context (identifier_socket) identifier_socket )attribute (argument_list (identifier_socket_type) identifier_socket_type )argument_list )call )assignment )expression_statement (try_statement (block (for_statement (identifier_endpoint) identifier_endpoint (identifier_bind_endpoints) identifier_bind_endpoints (block (try_statement (block (expression_statement (call (attribute (identifier_socket) identifier_socket (identifier_bind) identifier_bind )attribute (argument_list (identifier_endpoint) identifier_endpoint )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (identifier__logger) identifier__logger (identifier_fatal) identifier_fatal )attribute (argument_list (string_"Could not bind to '%s'.") string_"Could not bind to '%s'." (identifier_endpoint) identifier_endpoint )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )for_statement (expression_statement (yield (identifier_socket) identifier_socket )yield )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_socket) identifier_socket (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
A ZeroMQ socket context that both constructs a socket and closes it.
(module (function_definition (function_name_insert_local_var) function_name_insert_local_var (parameters (identifier_self) identifier_self (identifier_vname) identifier_vname (identifier_vtype) identifier_vtype (identifier_position) identifier_position )parameters (block (expression_statement (string_"Inserts a new local variable") string_"Inserts a new local variable" )expression_statement (expression_statement (assignment (identifier_index) identifier_index (call (attribute (identifier_self) identifier_self (identifier_insert_id) identifier_insert_id )attribute (argument_list (identifier_vname) identifier_vname (attribute (attribute (identifier_SharedData) identifier_SharedData (identifier_KINDS) identifier_KINDS )attribute (identifier_LOCAL_VAR) identifier_LOCAL_VAR )attribute (list (attribute (attribute (identifier_SharedData) identifier_SharedData (identifier_KINDS) identifier_KINDS )attribute (identifier_LOCAL_VAR) identifier_LOCAL_VAR )attribute (attribute (attribute (identifier_SharedData) identifier_SharedData (identifier_KINDS) identifier_KINDS )attribute (identifier_PARAMETER) identifier_PARAMETER )attribute )list (identifier_vtype) identifier_vtype )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (subscript (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute (identifier_index) identifier_index )subscript (identifier_attribute) identifier_attribute )attribute (identifier_position) identifier_position )assignment )expression_statement )block )function_definition )module
Inserts a new local variable
(module (function_definition (function_name_init_log_file) function_name_init_log_file (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_old_stdout) identifier_old_stdout )attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (call (identifier_open) identifier_open (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_WD) identifier_WD )attribute (string_"demag_gui.log") string_"demag_gui.log" )argument_list )call (string_'w+') string_'w+' )argument_list )call )assignment )expression_statement )block )function_definition )module
redirects stdout to a log file to prevent printing to a hanging terminal when dealing with the compiled binary.
(module (function_definition (function_name_fromXMLname) function_name_fromXMLname (parameters (identifier_string) identifier_string )parameters (block (expression_statement (assignment (identifier_retval) identifier_retval (call (identifier_sub) identifier_sub (argument_list (string_r'_xFFFF_') string_r'_xFFFF_' (string_'') string_'' (identifier_string) identifier_string )argument_list )call )assignment )expression_statement (function_definition (function_name_fun) function_name_fun (parameters (identifier_matchobj) identifier_matchobj )parameters (block (return_statement (call (identifier__fromUnicodeHex) identifier__fromUnicodeHex (argument_list (call (attribute (identifier_matchobj) identifier_matchobj (identifier_group) identifier_group )attribute (argument_list (integer_0) integer_0 )argument_list )call )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (identifier_retval) identifier_retval (call (identifier_sub) identifier_sub (argument_list (string_r'_x[0-9A-Za-z]+_') string_r'_x[0-9A-Za-z]+_' (identifier_fun) identifier_fun (identifier_retval) identifier_retval )argument_list )call )assignment )expression_statement (return_statement (identifier_retval) identifier_retval )return_statement )block )function_definition )module
Convert XML name to unicode string.
(module (function_definition (function_name_size) function_name_size (parameters (identifier_self) identifier_self )parameters (block (expression_statement (string_"The canonical serialized size of this branch.") string_"The canonical serialized size of this branch." )expression_statement (if_statement (comparison_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (string_'_size') string_'_size' (None) None )argument_list )call (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__size) identifier__size )attribute (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (string_'size') string_'size' (integer_0) integer_0 )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__size) identifier__size )attribute )return_statement )block )function_definition )module
The canonical serialized size of this branch.
(module (function_definition (function_name_ensure_hbounds) function_name_ensure_hbounds (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_cursor) identifier_cursor )attribute (identifier_x) identifier_x )attribute (call (identifier_min) identifier_min (argument_list (call (identifier_max) identifier_max (argument_list (integer_0) integer_0 (attribute (attribute (identifier_self) identifier_self (identifier_cursor) identifier_cursor )attribute (identifier_x) identifier_x )attribute )argument_list )call (binary_operator (attribute (identifier_self) identifier_self (identifier_columns) identifier_columns )attribute (integer_1) integer_1 )binary_operator )argument_list )call )assignment )expression_statement )block )function_definition )module
Ensure the cursor is within horizontal screen bounds.
(module (function_definition (function_name_csv_dict) function_name_csv_dict (parameters (identifier_d) identifier_d )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_d) identifier_d )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (string_"{}") string_"{}" )return_statement )block )if_statement (return_statement (binary_operator (binary_operator (string_"{") string_"{" (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (attribute (string_"'{}': {}") string_"'{}': {}" (identifier_format) identifier_format )attribute (argument_list (identifier_k) identifier_k (call (identifier_quotable) identifier_quotable (argument_list (identifier_v) identifier_v )argument_list )call )argument_list )call (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_d) identifier_d (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )argument_list )call )binary_operator (string_"}") string_"}" )binary_operator )return_statement )block )function_definition )module
Format dict to a string with comma-separated values.
(module (function_definition (function_name__add_identities_xml) function_name__add_identities_xml (parameters (identifier_self) identifier_self (identifier_document) identifier_document )parameters (block (for_statement (identifier_fingerprint) identifier_fingerprint (attribute (identifier_self) identifier_self (identifier_identities) identifier_identities )attribute (block (expression_statement (assignment (identifier_identity_element) identifier_identity_element (call (attribute (identifier_document) identifier_document (identifier_createElement) identifier_createElement )attribute (argument_list (string_'allow-access-from-identity') string_'allow-access-from-identity' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_signatory_element) identifier_signatory_element (call (attribute (identifier_document) identifier_document (identifier_createElement) identifier_createElement )attribute (argument_list (string_'signatory') string_'signatory' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_certificate_element) identifier_certificate_element (call (attribute (identifier_document) identifier_document (identifier_createElement) identifier_createElement )attribute (argument_list (string_'certificate') string_'certificate' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_certificate_element) identifier_certificate_element (identifier_setAttribute) identifier_setAttribute )attribute (argument_list (string_'fingerprint') string_'fingerprint' (identifier_fingerprint) identifier_fingerprint )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_certificate_element) identifier_certificate_element (identifier_setAttribute) identifier_setAttribute )attribute (argument_list (string_'fingerprint-algorithm') string_'fingerprint-algorithm' (string_'sha-1') string_'sha-1' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_signatory_element) identifier_signatory_element (identifier_appendChild) identifier_appendChild )attribute (argument_list (identifier_certificate_element) identifier_certificate_element )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_identity_element) identifier_identity_element (identifier_appendChild) identifier_appendChild )attribute (argument_list (identifier_signatory_element) identifier_signatory_element )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_document) identifier_document (identifier_documentElement) identifier_documentElement )attribute (identifier_appendChild) identifier_appendChild )attribute (argument_list (identifier_identity_element) identifier_identity_element )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Generates the XML elements for allowed digital signatures.
(module (function_definition (function_name_construct_scratch_path) function_name_construct_scratch_path (parameters (identifier_self) identifier_self (identifier_dirname) identifier_dirname (identifier_basename) identifier_basename )parameters (block (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_scratchdir) identifier_scratchdir )attribute (identifier_dirname) identifier_dirname (identifier_basename) identifier_basename )argument_list )call )return_statement )block )function_definition )module
Construct and return a path in the scratch area. This will be <self.scratchdir>/<dirname>/<basename>
(module (function_definition (function_name_load_plug_in) function_name_load_plug_in (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_name) identifier_name (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"name can only be an instance of type basestring") string_"name can only be an instance of type basestring" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_plug_in_name) identifier_plug_in_name (call (attribute (identifier_self) identifier_self (identifier__call) identifier__call )attribute (argument_list (string_"loadPlugIn") string_"loadPlugIn" (keyword_argument (identifier_in_p) identifier_in_p (list (identifier_name) identifier_name )list )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_plug_in_name) identifier_plug_in_name )return_statement )block )function_definition )module
Loads a DBGF plug-in. in name of type str The plug-in name or DLL. Special name 'all' loads all installed plug-ins. return plug_in_name of type str The name of the loaded plug-in.
(module (function_definition (function_name_delete_intel_notifications) function_name_delete_intel_notifications (parameters (identifier_self) identifier_self (identifier_ids) identifier_ids (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_ids) identifier_ids (identifier_list) identifier_list )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"ids must be a list") string_"ids must be a list" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_ids) identifier_ids )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_post) identifier_post )attribute (argument_list (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_base) identifier_base )attribute (string_'hunting/delete-notifications/programmatic/?key=') string_'hunting/delete-notifications/programmatic/?key=' )binary_operator (attribute (identifier_self) identifier_self (identifier_api_key) identifier_api_key )attribute )binary_operator (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_proxies) identifier_proxies (attribute (identifier_self) identifier_self (identifier_proxies) identifier_proxies )attribute )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (attribute (identifier_requests) identifier_requests (identifier_RequestException) identifier_RequestException )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (return_statement (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_error) identifier_error (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )keyword_argument )argument_list )call )return_statement )block )except_clause )try_statement (return_statement (call (identifier__return_response_and_status_code) identifier__return_response_and_status_code (argument_list (identifier_response) identifier_response )argument_list )call )return_statement )block )function_definition )module
Programmatically delete notifications via the Intel API. :param ids: A list of IDs to delete from the notification feed. :returns: The post response.
(module (function_definition (function_name_copy_keys) function_name_copy_keys (parameters (identifier_source) identifier_source (identifier_destination) identifier_destination (default_parameter (identifier_keys) identifier_keys (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_keys) identifier_keys (None) None )comparison_operator (block (expression_statement (assignment (identifier_keys) identifier_keys (call (attribute (identifier_destination) identifier_destination (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (identifier_k) identifier_k (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_source) identifier_source )argument_list )call (call (identifier_set) identifier_set (argument_list (identifier_keys) identifier_keys )argument_list )call )binary_operator (block (expression_statement (assignment (subscript (identifier_destination) identifier_destination (identifier_k) identifier_k )subscript (subscript (identifier_source) identifier_source (identifier_k) identifier_k )subscript )assignment )expression_statement )block )for_statement (return_statement (identifier_destination) identifier_destination )return_statement )block )function_definition )module
Add keys in source to destination Parameters ---------- source : dict destination: dict keys : None | iterable The keys in source to be copied into destination. If None, then `keys = destination.keys()`
(module (function_definition (function_name_asDict) function_name_asDict (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_field) identifier_field (attribute (identifier_BackgroundTaskInfo) identifier_BackgroundTaskInfo (identifier_FIELDS) identifier_FIELDS )attribute (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_field) identifier_field )subscript (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_field) identifier_field )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
asDict - Returns a copy of the current state as a dictionary. This copy will not be updated automatically. @return <dict> - Dictionary with all fields in BackgroundTaskInfo.FIELDS
(module (function_definition (function_name_set_timestamp) function_name_set_timestamp (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (if_statement (comparison_operator (string_'hittime') string_'hittime' (identifier_data) identifier_data )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'qt') string_'qt' )subscript (call (attribute (identifier_self) identifier_self (identifier_hittime) identifier_hittime )attribute (argument_list (keyword_argument (identifier_timestamp) identifier_timestamp (call (attribute (identifier_data) identifier_data (identifier_pop) identifier_pop )attribute (argument_list (string_'hittime') string_'hittime' (None) None )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'hitage') string_'hitage' (identifier_data) identifier_data )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'qt') string_'qt' )subscript (call (attribute (identifier_self) identifier_self (identifier_hittime) identifier_hittime )attribute (argument_list (keyword_argument (identifier_age) identifier_age (call (attribute (identifier_data) identifier_data (identifier_pop) identifier_pop )attribute (argument_list (string_'hitage') string_'hitage' (None) None )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement )block )function_definition )module
Interpret time-related options, apply queue-time parameter as needed
(module (function_definition (function_name_unique_list) function_name_unique_list (parameters (typed_parameter (identifier_seq) identifier_seq (type (generic_type (identifier_Iterable) identifier_Iterable (type_parameter (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_seen) identifier_seen (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_seen_add) identifier_seen_add (attribute (identifier_seen) identifier_seen (identifier_add) identifier_add )attribute )assignment )expression_statement (return_statement (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (identifier_seq) identifier_seq )for_in_clause (if_clause (not_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_x) identifier_x (identifier_seen) identifier_seen )comparison_operator (call (identifier_seen_add) identifier_seen_add (argument_list (identifier_x) identifier_x )argument_list )call )boolean_operator )parenthesized_expression )not_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
Returns a list of all the unique elements in the input list. Args: seq: input list Returns: list of unique elements As per http://stackoverflow.com/questions/480214/how-do-you-remove-duplicates-from-a-list-in-whilst-preserving-order
(module (function_definition (function_name__GetSqliteSchema) function_name__GetSqliteSchema (parameters (identifier_self) identifier_self (identifier_proto_struct_class) identifier_proto_struct_class (default_parameter (identifier_prefix) identifier_prefix (string_"") string_"" )default_parameter )parameters (block (expression_statement (assignment (identifier_schema) identifier_schema (call (attribute (identifier_collections) identifier_collections (identifier_OrderedDict) identifier_OrderedDict )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_type_info) identifier_type_info (attribute (identifier_proto_struct_class) identifier_proto_struct_class (identifier_type_infos) identifier_type_infos )attribute (block (if_statement (comparison_operator (attribute (identifier_type_info) identifier_type_info (identifier___class__) identifier___class__ )attribute (attribute (identifier_rdf_structs) identifier_rdf_structs (identifier_ProtoEmbedded) identifier_ProtoEmbedded )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_schema) identifier_schema (identifier_update) identifier_update )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__GetSqliteSchema) identifier__GetSqliteSchema )attribute (argument_list (attribute (identifier_type_info) identifier_type_info (identifier_type) identifier_type )attribute (keyword_argument (identifier_prefix) identifier_prefix (binary_operator (string_"%s%s.") string_"%s%s." (tuple (identifier_prefix) identifier_prefix (attribute (identifier_type_info) identifier_type_info (identifier_name) identifier_name )attribute )tuple )binary_operator )keyword_argument )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_field_name) identifier_field_name (call (attribute (identifier_utils) identifier_utils (identifier_SmartStr) identifier_SmartStr )attribute (argument_list (binary_operator (identifier_prefix) identifier_prefix (attribute (identifier_type_info) identifier_type_info (identifier_name) identifier_name )attribute )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_schema) identifier_schema (identifier_field_name) identifier_field_name )subscript (call (attribute (identifier_Rdf2SqliteAdapter) identifier_Rdf2SqliteAdapter (identifier_GetConverter) identifier_GetConverter )attribute (argument_list (identifier_type_info) identifier_type_info )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_schema) identifier_schema )return_statement )block )function_definition )module
Returns a mapping of SQLite column names to Converter objects.
(module (function_definition (function_name_highlightBlock) function_name_highlightBlock (parameters (identifier_self) identifier_self (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_cb) identifier_cb (call (attribute (identifier_self) identifier_self (identifier_currentBlock) identifier_currentBlock )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_p) identifier_p (call (attribute (identifier_cb) identifier_cb (identifier_position) identifier_position )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (binary_operator (call (identifier_str) identifier_str (argument_list (call (attribute (call (attribute (identifier_self) identifier_self (identifier_document) identifier_document )attribute (argument_list )argument_list )call (identifier_toPlainText) identifier_toPlainText )attribute (argument_list )argument_list )call )argument_list )call (string_'\n') string_'\n' )binary_operator )assignment )expression_statement (expression_statement (call (identifier_highlight) identifier_highlight (argument_list (identifier_text) identifier_text (attribute (identifier_self) identifier_self (identifier_lexer) identifier_lexer )attribute (attribute (identifier_self) identifier_self (identifier_formatter) identifier_formatter )attribute )argument_list )call )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (call (identifier_str) identifier_str (argument_list (identifier_text) identifier_text )argument_list )call )argument_list )call )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setFormat) identifier_setFormat )attribute (argument_list (identifier_i) identifier_i (integer_1) integer_1 (subscript (attribute (attribute (identifier_self) identifier_self (identifier_formatter) identifier_formatter )attribute (identifier_data) identifier_data )attribute (binary_operator (identifier_p) identifier_p (identifier_i) identifier_i )binary_operator )subscript )argument_list )call )expression_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_tstamp) identifier_tstamp )attribute (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement )block )function_definition )module
Takes a block, applies format to the document. according to what's in it.
(module (function_definition (function_name_getStorageLevel) function_name_getStorageLevel (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_java_storage_level) identifier_java_storage_level (call (attribute (attribute (identifier_self) identifier_self (identifier__jrdd) identifier__jrdd )attribute (identifier_getStorageLevel) identifier_getStorageLevel )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_storage_level) identifier_storage_level (call (identifier_StorageLevel) identifier_StorageLevel (argument_list (call (attribute (identifier_java_storage_level) identifier_java_storage_level (identifier_useDisk) identifier_useDisk )attribute (argument_list )argument_list )call (call (attribute (identifier_java_storage_level) identifier_java_storage_level (identifier_useMemory) identifier_useMemory )attribute (argument_list )argument_list )call (call (attribute (identifier_java_storage_level) identifier_java_storage_level (identifier_useOffHeap) identifier_useOffHeap )attribute (argument_list )argument_list )call (call (attribute (identifier_java_storage_level) identifier_java_storage_level (identifier_deserialized) identifier_deserialized )attribute (argument_list )argument_list )call (call (attribute (identifier_java_storage_level) identifier_java_storage_level (identifier_replication) identifier_replication )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_storage_level) identifier_storage_level )return_statement )block )function_definition )module
Get the RDD's current storage level. >>> rdd1 = sc.parallelize([1,2]) >>> rdd1.getStorageLevel() StorageLevel(False, False, False, False, 1) >>> print(rdd1.getStorageLevel()) Serialized 1x Replicated
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_file_or_filename) identifier_file_or_filename )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_file_or_filename) identifier_file_or_filename (identifier_basestring) identifier_basestring )argument_list )call (block (expression_statement (assignment (pattern_list (attribute (identifier_self) identifier_self (identifier__fcn_name) identifier__fcn_name )attribute (identifier__) identifier__ )pattern_list (call (identifier_splitext) identifier_splitext (argument_list (call (identifier_basename) identifier_basename (argument_list (identifier_file_or_filename) identifier_file_or_filename )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__fcn_name) identifier__fcn_name )attribute (attribute (attribute (identifier_self) identifier_self (identifier_case) identifier_case )attribute (identifier_name) identifier_name )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__fcn_name) identifier__fcn_name )attribute (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__fcn_name) identifier__fcn_name )attribute (identifier_replace) identifier_replace )attribute (argument_list (string_",") string_"," (string_"") string_"" )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_" ") string_" " (string_"_") string_"_" )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_MATPOWERWriter) identifier_MATPOWERWriter (identifier_self) identifier_self )argument_list )call (identifier_write) identifier_write )attribute (argument_list (identifier_file_or_filename) identifier_file_or_filename )argument_list )call )expression_statement )block )function_definition )module
Writes case data to file in MATPOWER format.
(module (function_definition (function_name__cleanup) function_name__cleanup (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_filename) identifier_filename (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__storage_dir) identifier__storage_dir )attribute )argument_list )call (block (expression_statement (assignment (identifier_file_path) identifier_file_path (call (attribute (identifier_path) identifier_path (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__storage_dir) identifier__storage_dir )attribute (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_file_stat) identifier_file_stat (call (attribute (identifier_os) identifier_os (identifier_stat) identifier_stat )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_evaluate) identifier_evaluate (call (identifier_max) identifier_max (argument_list (attribute (identifier_file_stat) identifier_file_stat (identifier_st_ctime) identifier_st_ctime )attribute (attribute (identifier_file_stat) identifier_file_stat (identifier_st_mtime) identifier_st_mtime )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (binary_operator (identifier_evaluate) identifier_evaluate (attribute (identifier_self) identifier_self (identifier__duration) identifier__duration )attribute )binary_operator (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'Removing stale file: %s') string_'Removing stale file: %s' (identifier_file_path) identifier_file_path )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_unlink) identifier_unlink )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Remove any stale files from the session storage directory
(module (function_definition (function_name_import_related_module) function_name_import_related_module (parameters (identifier_package) identifier_package (identifier_pkg_path) identifier_pkg_path (identifier_related_name) identifier_related_name (default_parameter (identifier_ignore_exceptions) identifier_ignore_exceptions (False) False )default_parameter )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_imp) identifier_imp (identifier_find_module) identifier_find_module )attribute (argument_list (identifier_related_name) identifier_related_name (identifier_pkg_path) identifier_pkg_path )argument_list )call )expression_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (return_statement )return_statement )block )except_clause )try_statement (try_statement (block (return_statement (call (identifier_getattr) identifier_getattr (argument_list (call (identifier___import__) identifier___import__ (argument_list (binary_operator (string_'%s') string_'%s' (parenthesized_expression (identifier_package) identifier_package )parenthesized_expression )binary_operator (call (identifier_globals) identifier_globals (argument_list )argument_list )call (call (identifier_locals) identifier_locals (argument_list )argument_list )call (list (identifier_related_name) identifier_related_name )list )argument_list )call (identifier_related_name) identifier_related_name )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (if_statement (identifier_ignore_exceptions) identifier_ignore_exceptions (block (expression_statement (call (attribute (attribute (identifier_current_app) identifier_current_app (identifier_logger) identifier_logger )attribute (identifier_exception) identifier_exception )attribute (argument_list (call (attribute (string_'Can not import "{}" package') string_'Can not import "{}" package' (identifier_format) identifier_format )attribute (argument_list (identifier_package) identifier_package )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (raise_statement (identifier_e) identifier_e )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition )module
Import module from given path.
(module (function_definition (function_name__on_open) function_name__on_open (parameters (identifier_self) identifier_self (identifier__) identifier__ )parameters (block (expression_statement (assignment (identifier_nick) identifier_nick (call (attribute (identifier_self) identifier_self (identifier__format_nick) identifier__format_nick )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__nick) identifier__nick )attribute (attribute (identifier_self) identifier_self (identifier__pwd) identifier__pwd )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_"cmd") string_"cmd" (string_"join") string_"join" )pair (pair (string_"channel") string_"channel" (attribute (identifier_self) identifier_self (identifier__channel) identifier__channel )attribute )pair (pair (string_"nick") string_"nick" (identifier_nick) identifier_nick )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__send_packet) identifier__send_packet )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__thread) identifier__thread )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (call (attribute (identifier_threading) identifier_threading (identifier_Thread) identifier_Thread )attribute (argument_list (keyword_argument (identifier_target) identifier_target (attribute (identifier_self) identifier_self (identifier__ping) identifier__ping )attribute )keyword_argument )argument_list )call (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Joins the hack.chat channel and starts pinging.
(module (function_definition (function_name_drain_events) function_name_drain_events (parameters (identifier_self) identifier_self (default_parameter (identifier_allowed_methods) identifier_allowed_methods (None) None )default_parameter (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_wait_multi) identifier_wait_multi )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_channels) identifier_channels )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Wait for an event on any channel.
(module (function_definition (function_name_save_code) function_name_save_code (parameters (identifier_self) identifier_self (identifier_authorization_code) identifier_authorization_code )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (attribute (identifier_authorization_code) identifier_authorization_code (identifier_code) identifier_code )attribute (dictionary (pair (string_"client_id") string_"client_id" (attribute (identifier_authorization_code) identifier_authorization_code (identifier_client_id) identifier_client_id )attribute )pair (pair (string_"code") string_"code" (attribute (identifier_authorization_code) identifier_authorization_code (identifier_code) identifier_code )attribute )pair (pair (string_"expires_at") string_"expires_at" (attribute (identifier_authorization_code) identifier_authorization_code (identifier_expires_at) identifier_expires_at )attribute )pair (pair (string_"redirect_uri") string_"redirect_uri" (attribute (identifier_authorization_code) identifier_authorization_code (identifier_redirect_uri) identifier_redirect_uri )attribute )pair (pair (string_"scopes") string_"scopes" (attribute (identifier_authorization_code) identifier_authorization_code (identifier_scopes) identifier_scopes )attribute )pair (pair (string_"data") string_"data" (attribute (identifier_authorization_code) identifier_authorization_code (identifier_data) identifier_data )attribute )pair (pair (string_"user_id") string_"user_id" (attribute (identifier_authorization_code) identifier_authorization_code (identifier_user_id) identifier_user_id )attribute )pair )dictionary )argument_list )call )expression_statement )block )function_definition )module
Stores the data belonging to an authorization code token in redis. See :class:`oauth2.store.AuthCodeStore`.
(module (function_definition (function_name_get_objects_dex) function_name_get_objects_dex (parameters (identifier_self) identifier_self )parameters (block (for_statement (pattern_list (identifier_digest) identifier_digest (identifier_d) identifier_d )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_analyzed_dex) identifier_analyzed_dex )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (yield (expression_list (identifier_digest) identifier_digest (identifier_d) identifier_d (subscript (attribute (identifier_self) identifier_self (identifier_analyzed_vms) identifier_analyzed_vms )attribute (identifier_digest) identifier_digest )subscript )expression_list )yield )expression_statement )block )for_statement )block )function_definition )module
Yields all dex objects inclduing their Analysis objects :returns: tuple of (sha256, DalvikVMFormat, Analysis)
(module (function_definition (function_name_set_params) function_name_set_params (parameters (identifier_self) identifier_self (default_parameter (identifier_subs) identifier_subs (None) None )default_parameter (default_parameter (identifier_numticks) identifier_numticks (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_numticks) identifier_numticks (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_numticks) identifier_numticks )attribute (identifier_numticks) identifier_numticks )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_subs) identifier_subs (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__subs) identifier__subs )attribute (identifier_subs) identifier_subs )assignment )expression_statement )block )if_statement )block )function_definition )module
Set parameters within this locator. Parameters ---------- subs : array, optional Subtick values, as multiples of the main ticks. numticks : array, optional Number of ticks.
(module (function_definition (function_name_find_one) function_name_find_one (parameters (identifier_self) identifier_self (default_parameter (identifier_filter) identifier_filter (None) None )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_build_table) identifier_build_table )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_allcond) identifier_allcond (call (attribute (identifier_self) identifier_self (identifier_parse_query) identifier_parse_query )attribute (argument_list (identifier_filter) identifier_filter )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_allcond) identifier_allcond )argument_list )call )return_statement )block )function_definition )module
Finds one matching query element :param query: dictionary representing the mongo query :return: the resulting document (if found)
(module (function_definition (function_name_get_field_type) function_name_get_field_type (parameters (identifier_cls) identifier_cls (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_python_type) identifier_python_type (call (attribute (identifier_cls) identifier_cls (identifier__get_field_python_type) identifier__get_field_python_type )attribute (argument_list (attribute (identifier_cls) identifier_cls (identifier_model) identifier_model )attribute (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_python_type) identifier_python_type (identifier__COLUMN_FIELD_MAP) identifier__COLUMN_FIELD_MAP )comparison_operator (block (expression_statement (assignment (identifier_field_class) identifier_field_class (subscript (identifier__COLUMN_FIELD_MAP) identifier__COLUMN_FIELD_MAP (identifier_python_type) identifier_python_type )subscript )assignment )expression_statement (return_statement (call (identifier_field_class) identifier_field_class (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_BaseField) identifier_BaseField (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block )function_definition )module
Takes a field name and gets an appropriate BaseField instance for that column. It inspects the Model that is set on the manager to determine what the BaseField subclass should be. :param unicode name: :return: A BaseField subclass that is appropriate for translating a string input into the appropriate format. :rtype: ripozo.viewsets.fields.base.BaseField
(module (function_definition (function_name_get_instance) function_name_get_instance (parameters (identifier_self) identifier_self (identifier_payload) identifier_payload )parameters (block (return_statement (call (identifier_VoipInstance) identifier_VoipInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_account_sid) identifier_account_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'account_sid') string_'account_sid' )subscript )keyword_argument (keyword_argument (identifier_country_code) identifier_country_code (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'country_code') string_'country_code' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Build an instance of VoipInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.available_phone_number.voip.VoipInstance :rtype: twilio.rest.api.v2010.account.available_phone_number.voip.VoipInstance
(module (function_definition (function_name_getWorker) function_name_getWorker (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (if_statement (not_operator (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_worker_list) identifier_worker_list )attribute )comparison_operator )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"Worker {0} is not registered!") string_"Worker {0} is not registered!" (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )expression_statement (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (call (attribute (string_"Worker {0} is not registered!") string_"Worker {0} is not registered!" (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_worker_list) identifier_worker_list )attribute (identifier_name) identifier_name )subscript )return_statement )block )function_definition )module
Retrieve the Worker registered under the given name. If the given name does not exists in the Worker list, an Exception is raised. Parameters ---------- name: string Name of the Worker to retrieve
(module (function_definition (function_name_is_expired) function_name_is_expired (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_window) identifier_window )attribute (None) None )comparison_operator (block (return_statement (comparison_operator (parenthesized_expression (binary_operator (call (attribute (identifier_self) identifier_self (identifier__time) identifier__time )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier_start_time) identifier_start_time )attribute )binary_operator )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_window) identifier_window )attribute )comparison_operator )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Returns true if the time is beyond the window
(module (function_definition (function_name_send) function_name_send (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_send_with_options) identifier_send_with_options )attribute (argument_list (keyword_argument (identifier_args) identifier_args (identifier_args) identifier_args )keyword_argument (keyword_argument (identifier_kwargs) identifier_kwargs (identifier_kwargs) identifier_kwargs )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Asynchronously send a message to this actor. Parameters: *args(tuple): Positional arguments to send to the actor. **kwargs(dict): Keyword arguments to send to the actor. Returns: Message: The enqueued message.
(module (function_definition (function_name_rfcformat) function_name_rfcformat (parameters (identifier_dt) identifier_dt (default_parameter (identifier_localtime) identifier_localtime (False) False )default_parameter )parameters (block (if_statement (not_operator (identifier_localtime) identifier_localtime )not_operator (block (return_statement (call (identifier_formatdate) identifier_formatdate (argument_list (call (identifier_timegm) identifier_timegm (argument_list (call (attribute (identifier_dt) identifier_dt (identifier_utctimetuple) identifier_utctimetuple )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_local_rfcformat) identifier_local_rfcformat (argument_list (identifier_dt) identifier_dt )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Return the RFC822-formatted representation of a datetime object. :param datetime dt: The datetime. :param bool localtime: If ``True``, return the date relative to the local timezone instead of UTC, displaying the proper offset, e.g. "Sun, 10 Nov 2013 08:23:45 -0600"
(module (function_definition (function_name_set_country) function_name_set_country (parameters (identifier_self) identifier_self (identifier_country) identifier_country )parameters (block (expression_statement (assignment (identifier_country) identifier_country (call (identifier__convert_to_charp) identifier__convert_to_charp (argument_list (identifier_country) identifier_country )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_country_func) identifier__set_country_func )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_alpr_pointer) identifier_alpr_pointer )attribute (identifier_country) identifier_country )argument_list )call )expression_statement )block )function_definition )module
This sets the country for detecting license plates. For example, setting country to "us" for United States or "eu" for Europe. :param country: A unicode/ascii string (Python 2/3) or bytes array (Python 3) :return: None
(module (function_definition (function_name__get_version) function_name__get_version (parameters )parameters (block (expression_statement (assignment (identifier_version_string) identifier_version_string (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run') string_'cmd.run' )subscript (argument_list (list (call (identifier__check_pkgin) identifier__check_pkgin (argument_list )argument_list )call (string_'-v') string_'-v' )list (keyword_argument (identifier_output_loglevel) identifier_output_loglevel (string_'trace') string_'trace' )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_version_string) identifier_version_string (None) None )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_version_match) identifier_version_match (call (attribute (identifier_VERSION_MATCH) identifier_VERSION_MATCH (identifier_search) identifier_search )attribute (argument_list (identifier_version_string) identifier_version_string )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_version_match) identifier_version_match )not_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (call (attribute (call (attribute (identifier_version_match) identifier_version_match (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call )return_statement )block )function_definition )module
Get the pkgin version
(module (function_definition (function_name__ParseLogline) function_name__ParseLogline (parameters (identifier_self) identifier_self (identifier_parser_mediator) identifier_parser_mediator (identifier_structure) identifier_structure )parameters (block (expression_statement (assignment (pattern_list (identifier_month) identifier_month (identifier_day_of_month) identifier_day_of_month (identifier_year) identifier_year (identifier_hours) identifier_hours (identifier_minutes) identifier_minutes (identifier_seconds) identifier_seconds (identifier_milliseconds) identifier_milliseconds )pattern_list (parenthesized_expression (attribute (identifier_structure) identifier_structure (identifier_date_time) identifier_date_time )attribute )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_time_elements_tuple) identifier_time_elements_tuple (tuple (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day_of_month) identifier_day_of_month (identifier_hours) identifier_hours (identifier_minutes) identifier_minutes (identifier_seconds) identifier_seconds (identifier_milliseconds) identifier_milliseconds )tuple )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_date_time) identifier_date_time (call (attribute (identifier_dfdatetime_time_elements) identifier_dfdatetime_time_elements (identifier_TimeElementsInMilliseconds) identifier_TimeElementsInMilliseconds )attribute (argument_list (keyword_argument (identifier_time_elements_tuple) identifier_time_elements_tuple (identifier_time_elements_tuple) identifier_time_elements_tuple )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (call (attribute (identifier_parser_mediator) identifier_parser_mediator (identifier_ProduceExtractionWarning) identifier_ProduceExtractionWarning )attribute (argument_list (call (attribute (string_'invalid date time value: {0!s}') string_'invalid date time value: {0!s}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_structure) identifier_structure (identifier_date_time) identifier_date_time )attribute )argument_list )call )argument_list )call )expression_statement (return_statement )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_event_data) identifier_event_data (call (identifier_SkyDriveOldLogEventData) identifier_SkyDriveOldLogEventData (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_event_data) identifier_event_data (identifier_log_level) identifier_log_level )attribute (attribute (identifier_structure) identifier_structure (identifier_log_level) identifier_log_level )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_event_data) identifier_event_data (identifier_offset) identifier_offset )attribute (attribute (identifier_self) identifier_self (identifier_offset) identifier_offset )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_event_data) identifier_event_data (identifier_source_code) identifier_source_code )attribute (attribute (identifier_structure) identifier_structure (identifier_source_code) identifier_source_code )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_event_data) identifier_event_data (identifier_text) identifier_text )attribute (attribute (identifier_structure) identifier_structure (identifier_text) identifier_text )attribute )assignment )expression_statement (expression_statement (assignment (identifier_event) identifier_event (call (attribute (identifier_time_events) identifier_time_events (identifier_DateTimeValuesEvent) identifier_DateTimeValuesEvent )attribute (argument_list (identifier_date_time) identifier_date_time (attribute (identifier_definitions) identifier_definitions (identifier_TIME_DESCRIPTION_ADDED) identifier_TIME_DESCRIPTION_ADDED )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parser_mediator) identifier_parser_mediator (identifier_ProduceEventWithEventData) identifier_ProduceEventWithEventData )attribute (argument_list (identifier_event) identifier_event (identifier_event_data) identifier_event_data )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__last_date_time) identifier__last_date_time )attribute (identifier_date_time) identifier_date_time )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__last_event_data) identifier__last_event_data )attribute (identifier_event_data) identifier_event_data )assignment )expression_statement )block )function_definition )module
Parse a logline and store appropriate attributes. Args: parser_mediator (ParserMediator): mediates interactions between parsers and other components, such as storage and dfvfs. structure (pyparsing.ParseResults): structure of tokens derived from a line of a text file.
(module (function_definition (function_name_compile_tag_re) function_name_compile_tag_re (parameters (identifier_self) identifier_self (identifier_tags) identifier_tags )parameters (block (return_statement (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_raw_tag_re) identifier_raw_tag_re )attribute (identifier_tags) identifier_tags )binary_operator (attribute (identifier_self) identifier_self (identifier_re_flags) identifier_re_flags )attribute )argument_list )call )return_statement )block )function_definition )module
Return the regex used to look for Mustache tags compiled to work with specific opening tags, close tags, and tag types.