sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name__load_matcher) function_name__load_matcher (parameters (identifier_self) identifier_self )parameters (type (None) None )type (block (for_statement (identifier_id_key) identifier_id_key (attribute (identifier_self) identifier_self (identifier__rule_lst) identifier__rule_lst )attribute (block (if_statement (attribute (subscript (attribute (identifier_self) identifier_self (identifier__rule_lst) identifier__rule_lst )attribute (identifier_id_key) identifier_id_key )subscript (identifier_active) identifier_active )attribute (block (expression_statement (assignment (identifier_pattern_lst) identifier_pattern_lst (list_comprehension (attribute (identifier_a_pattern) identifier_a_pattern (identifier_spacy_token_lst) identifier_spacy_token_lst )attribute (for_in_clause (identifier_a_pattern) identifier_a_pattern (attribute (subscript (attribute (identifier_self) identifier_self (identifier__rule_lst) identifier__rule_lst )attribute (identifier_id_key) identifier_id_key )subscript (identifier_patterns) identifier_patterns )attribute )for_in_clause )list_comprehension )assignment )expression_statement (for_statement (pattern_list (identifier_spacy_rule_id) identifier_spacy_rule_id (identifier_spacy_rule) identifier_spacy_rule )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (call (attribute (identifier_itertools) identifier_itertools (identifier_product) identifier_product )attribute (argument_list (list_splat (identifier_pattern_lst) identifier_pattern_lst )list_splat )argument_list )call )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__matcher) identifier__matcher )attribute (identifier_add) identifier_add )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__construct_key) identifier__construct_key )attribute (argument_list (identifier_id_key) identifier_id_key (identifier_spacy_rule_id) identifier_spacy_rule_id )argument_list )call (None) None (call (identifier_list) identifier_list (argument_list (identifier_spacy_rule) identifier_spacy_rule )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )for_statement )block )function_definition )module
Add constructed spacy rule to Matcher
(module (function_definition (function_name_reject_recursive_repeats) function_name_reject_recursive_repeats (parameters (identifier_to_wrap) identifier_to_wrap )parameters (block (expression_statement (assignment (attribute (identifier_to_wrap) identifier_to_wrap (identifier___already_called) identifier___already_called )attribute (dictionary )dictionary )assignment )expression_statement (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_to_wrap) identifier_to_wrap )argument_list )call )decorator (function_definition (function_name_wrapped) function_name_wrapped (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_arg_instances) identifier_arg_instances (call (identifier_tuple) identifier_tuple (argument_list (call (identifier_map) identifier_map (argument_list (identifier_id) identifier_id (identifier_args) identifier_args )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_thread_id) identifier_thread_id (call (attribute (identifier_threading) identifier_threading (identifier_get_ident) identifier_get_ident )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_thread_local_args) identifier_thread_local_args (binary_operator (tuple (identifier_thread_id) identifier_thread_id )tuple (identifier_arg_instances) identifier_arg_instances )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_thread_local_args) identifier_thread_local_args (attribute (identifier_to_wrap) identifier_to_wrap (identifier___already_called) identifier___already_called )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'Recursively called %s with %r') string_'Recursively called %s with %r' (tuple (identifier_to_wrap) identifier_to_wrap (identifier_args) identifier_args )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_to_wrap) identifier_to_wrap (identifier___already_called) identifier___already_called )attribute (identifier_thread_local_args) identifier_thread_local_args )subscript (True) True )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_wrapped_val) identifier_wrapped_val (call (identifier_to_wrap) identifier_to_wrap (argument_list (list_splat (identifier_args) identifier_args )list_splat )argument_list )call )assignment )expression_statement )block (finally_clause (block (delete_statement (subscript (attribute (identifier_to_wrap) identifier_to_wrap (identifier___already_called) identifier___already_called )attribute (identifier_thread_local_args) identifier_thread_local_args )subscript )delete_statement )block )finally_clause )try_statement (return_statement (identifier_wrapped_val) identifier_wrapped_val )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapped) identifier_wrapped )return_statement )block )function_definition )module
Prevent simple cycles by returning None when called recursively with same instance
(module (function_definition (function_name___is_subgraph_planar) function_name___is_subgraph_planar (parameters (identifier_graph) identifier_graph )parameters (block (expression_statement (assignment (identifier_num_nodes) identifier_num_nodes (call (attribute (identifier_graph) identifier_graph (identifier_num_nodes) identifier_num_nodes )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_num_edges) identifier_num_edges (call (attribute (identifier_graph) identifier_graph (identifier_num_edges) identifier_num_edges )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_num_nodes) identifier_num_nodes (integer_5) integer_5 )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (identifier_num_edges) identifier_num_edges (binary_operator (integer_3) integer_3 (parenthesized_expression (binary_operator (identifier_num_nodes) identifier_num_nodes (integer_2) integer_2 )binary_operator )parenthesized_expression )binary_operator )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (call (identifier_kocay_planarity_test) identifier_kocay_planarity_test (argument_list (identifier_graph) identifier_graph )argument_list )call )return_statement )block )function_definition )module
Internal function to determine if a subgraph is planar.
(module (function_definition (function_name_merge_element_data) function_name_merge_element_data (parameters (identifier_dest) identifier_dest (identifier_sources) identifier_sources (default_parameter (identifier_use_copy) identifier_use_copy (True) True )default_parameter )parameters (block (if_statement (comparison_operator (identifier_dest) identifier_dest (None) None )comparison_operator (block (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (identifier_dest) identifier_dest (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_use_copy) identifier_use_copy (block (expression_statement (assignment (identifier_sources) identifier_sources (call (attribute (identifier_copy) identifier_copy (identifier_deepcopy) identifier_deepcopy )attribute (argument_list (identifier_sources) identifier_sources )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (identifier_s) identifier_s (identifier_sources) identifier_sources (block (if_statement (comparison_operator (string_'electron_shells') string_'electron_shells' (identifier_s) identifier_s )comparison_operator (block (if_statement (comparison_operator (string_'electron_shells') string_'electron_shells' (identifier_ret) identifier_ret )comparison_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'electron_shells') string_'electron_shells' )subscript (list )list )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (identifier_ret) identifier_ret (string_'electron_shells') string_'electron_shells' )subscript (identifier_extend) identifier_extend )attribute (argument_list (subscript (identifier_s) identifier_s (string_'electron_shells') string_'electron_shells' )subscript )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (string_'ecp_potentials') string_'ecp_potentials' (identifier_s) identifier_s )comparison_operator (block (if_statement (comparison_operator (string_'ecp_potentials') string_'ecp_potentials' (identifier_ret) identifier_ret )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_'Cannot overwrite existing ECP') string_'Cannot overwrite existing ECP' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'ecp_potentials') string_'ecp_potentials' )subscript (subscript (identifier_s) identifier_s (string_'ecp_potentials') string_'ecp_potentials' )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'ecp_electrons') string_'ecp_electrons' )subscript (subscript (identifier_s) identifier_s (string_'ecp_electrons') string_'ecp_electrons' )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'references') string_'references' (identifier_s) identifier_s )comparison_operator (block (if_statement (comparison_operator (string_'references') string_'references' (identifier_ret) identifier_ret )comparison_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'references') string_'references' )subscript (list )list )assignment )expression_statement )block )if_statement (for_statement (identifier_ref) identifier_ref (subscript (identifier_s) identifier_s (string_'references') string_'references' )subscript (block (if_statement (not_operator (comparison_operator (identifier_ref) identifier_ref (subscript (identifier_ret) identifier_ret (string_'references') string_'references' )subscript )comparison_operator )not_operator (block (expression_statement (call (attribute (subscript (identifier_ret) identifier_ret (string_'references') string_'references' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_ref) identifier_ref )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Merges the basis set data for an element from multiple sources into dest. The destination is not modified, and a (shallow) copy of dest is returned with the data from sources added. If use_copy is True, then the data merged into dest will be a (deep) copy of that found in sources. Otherwise, data may be shared between dest and sources
(module (function_definition (function_name__intersection) function_name__intersection (parameters (identifier_A) identifier_A (identifier_B) identifier_B )parameters (block (expression_statement (assignment (identifier_intersection) identifier_intersection (list )list )assignment )expression_statement (for_statement (identifier_i) identifier_i (identifier_A) identifier_A (block (if_statement (comparison_operator (identifier_i) identifier_i (identifier_B) identifier_B )comparison_operator (block (expression_statement (call (attribute (identifier_intersection) identifier_intersection (identifier_append) identifier_append )attribute (argument_list (identifier_i) identifier_i )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_intersection) identifier_intersection )return_statement )block )function_definition )module
A simple function to find an intersection between two arrays. @type A: List @param A: First List @type B: List @param B: Second List @rtype: List @return: List of Intersections
(module (function_definition (function_name_format_info) function_name_format_info (parameters (identifier_raw) identifier_raw )parameters (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (call (identifier__) identifier__ (argument_list (string_'raw[0]: %s') string_'raw[0]: %s' )argument_list )call (subscript (identifier_raw) identifier_raw (integer_0) integer_0 )subscript )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_results) identifier_results (identifier_sense) identifier_sense )pattern_list (identifier_raw) identifier_raw )assignment )expression_statement (expression_statement (assignment (identifier_new) identifier_new (call (attribute (string_'\n') string_'\n' (identifier_join) identifier_join )attribute (generator_expression (call (attribute (call (attribute (string_'{} {} {} {}') string_'{} {} {} {}' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_i) identifier_i (integer_0) integer_0 )subscript (call (attribute (identifier_sense) identifier_sense (identifier_kind_id_to_name) identifier_kind_id_to_name )attribute (argument_list (subscript (identifier_i) identifier_i (integer_1) integer_1 )subscript )argument_list )call (call (attribute (call (attribute (identifier_sense) identifier_sense (identifier_file_id_to_name) identifier_file_id_to_name )attribute (argument_list (subscript (identifier_i) identifier_i (integer_2) integer_2 )subscript )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (conditional_expression (binary_operator (subscript (identifier_i) identifier_i (integer_3) integer_3 )subscript (string_' ') string_' ' )binary_operator (subscript (identifier_i) identifier_i (integer_3) integer_3 )subscript (string_'') string_'' )conditional_expression )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_i) identifier_i (identifier_results) identifier_results )for_in_clause )generator_expression )call )assignment )expression_statement (return_statement (identifier_new) identifier_new )return_statement )block )function_definition )module
Format a string representing the information concerning the name.
(module (function_definition (function_name_external) function_name_external (parameters (identifier_func) identifier_func )parameters (block (function_definition (function_name_f) function_name_f (parameters (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 (identifier_func) identifier_func (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (attribute (identifier_f) identifier_f (identifier_external) identifier_external )attribute (True) True )assignment )expression_statement (expression_statement (assignment (attribute (identifier_f) identifier_f (identifier___doc__) identifier___doc__ )attribute (attribute (identifier_func) identifier_func (identifier___doc__) identifier___doc__ )attribute )assignment )expression_statement (return_statement (identifier_f) identifier_f )return_statement )block )function_definition )module
Mark function as external. :param func: :return:
(module (function_definition (function_name__iupac_ambiguous_equal) function_name__iupac_ambiguous_equal (parameters (identifier_ambig_base) identifier_ambig_base (identifier_unambig_base) identifier_unambig_base )parameters (block (expression_statement (assignment (identifier_iupac_translation) identifier_iupac_translation (dictionary (pair (string_'A') string_'A' (string_'A') string_'A' )pair (pair (string_'C') string_'C' (string_'C') string_'C' )pair (pair (string_'G') string_'G' (string_'G') string_'G' )pair (pair (string_'T') string_'T' (string_'T') string_'T' )pair (pair (string_'U') string_'U' (string_'U') string_'U' )pair (pair (string_'R') string_'R' (string_'AG') string_'AG' )pair (pair (string_'Y') string_'Y' (string_'CT') string_'CT' )pair (pair (string_'S') string_'S' (string_'GC') string_'GC' )pair (pair (string_'W') string_'W' (string_'AT') string_'AT' )pair (pair (string_'K') string_'K' (string_'GT') string_'GT' )pair (pair (string_'M') string_'M' (string_'AC') string_'AC' )pair (pair (string_'B') string_'B' (string_'CGT') string_'CGT' )pair (pair (string_'D') string_'D' (string_'AGT') string_'AGT' )pair (pair (string_'H') string_'H' (string_'ACT') string_'ACT' )pair (pair (string_'V') string_'V' (string_'ACG') string_'ACG' )pair (pair (string_'N') string_'N' (string_'ACGT') string_'ACGT' )pair (pair (string_'-') string_'-' (string_'-') string_'-' )pair )dictionary )assignment )expression_statement (for_statement (identifier_i) identifier_i (tuple (identifier_ambig_base) identifier_ambig_base (identifier_unambig_base) identifier_unambig_base )tuple (block (if_statement (not_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_i) identifier_i )argument_list )call (integer_1) integer_1 )comparison_operator )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"only one base may be passed.") string_"only one base may be passed." )argument_list )call )raise_statement )block )if_statement )block )for_statement (return_statement (comparison_operator (call (attribute (identifier_unambig_base) identifier_unambig_base (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call (subscript (identifier_iupac_translation) identifier_iupac_translation (call (attribute (identifier_ambig_base) identifier_ambig_base (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )subscript )comparison_operator )return_statement )block )function_definition )module
Tests two bases for equality, accounting for IUPAC ambiguous DNA ambiguous base may be IUPAC ambiguous, unambiguous must be one of ACGT
(module (function_definition (function_name__dict_key_priority) function_name__dict_key_priority (parameters (identifier_s) identifier_s )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_s) identifier_s (identifier_Hook) identifier_Hook )argument_list )call (block (return_statement (binary_operator (call (identifier__priority) identifier__priority (argument_list (attribute (identifier_s) identifier_s (identifier__schema) identifier__schema )attribute )argument_list )call (float_0.5) float_0.5 )binary_operator )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_s) identifier_s (identifier_Optional) identifier_Optional )argument_list )call (block (return_statement (binary_operator (call (identifier__priority) identifier__priority (argument_list (attribute (identifier_s) identifier_s (identifier__schema) identifier__schema )attribute )argument_list )call (float_0.5) float_0.5 )binary_operator )return_statement )block )if_statement (return_statement (call (identifier__priority) identifier__priority (argument_list (identifier_s) identifier_s )argument_list )call )return_statement )block )function_definition )module
Return priority for a given key object.
(module (function_definition (function_name_publish) function_name_publish (parameters (identifier_self) identifier_self (identifier_topic) identifier_topic (identifier_data) identifier_data (default_parameter (identifier_defer) identifier_defer (None) None )default_parameter (default_parameter (identifier_block) identifier_block (True) True )default_parameter (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter (default_parameter (identifier_raise_error) identifier_raise_error (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_AsyncResult) identifier_AsyncResult (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_self) identifier_self (identifier__get_connection) identifier__get_connection )attribute (argument_list (keyword_argument (identifier_block) identifier_block (identifier_block) identifier_block )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__response_queues) identifier__response_queues )attribute (identifier_conn) identifier_conn )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_result) identifier_result )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_publish) identifier_publish )attribute (argument_list (identifier_topic) identifier_topic (identifier_data) identifier_data (keyword_argument (identifier_defer) identifier_defer (identifier_defer) identifier_defer )keyword_argument )argument_list )call )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__put_connection) identifier__put_connection )attribute (argument_list (identifier_conn) identifier_conn )argument_list )call )expression_statement )block )finally_clause )try_statement (if_statement (identifier_raise_error) identifier_raise_error (block (return_statement (call (attribute (identifier_result) identifier_result (identifier_get) identifier_get )attribute (argument_list )argument_list )call )return_statement )block )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Publish a message to the given topic. :param topic: the topic to publish to :param data: bytestring data to publish :param defer: duration in milliseconds to defer before publishing (requires nsq 0.3.6) :param block: wait for a connection to become available before publishing the message. If block is `False` and no connections are available, :class:`~gnsq.errors.NSQNoConnections` is raised :param timeout: if timeout is a positive number, it blocks at most ``timeout`` seconds before raising :class:`~gnsq.errors.NSQNoConnections` :param raise_error: if ``True``, it blocks until a response is received from the nsqd server, and any error response is raised. Otherwise an :class:`~gevent.event.AsyncResult` is returned
(module (function_definition (function_name_dict_from_node) function_name_dict_from_node (parameters (identifier_node) identifier_node (default_parameter (identifier_recursive) identifier_recursive (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_dict) identifier_dict (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_snode) identifier_snode (identifier_node) identifier_node (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_snode) identifier_snode )argument_list )call (integer_0) integer_0 )comparison_operator (block (if_statement (identifier_recursive) identifier_recursive (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_dict_from_node) identifier_dict_from_node (argument_list (identifier_snode) identifier_snode (True) True )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_len) identifier_len (argument_list (identifier_snode) identifier_snode )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block (elif_clause (comparison_operator (attribute (identifier_snode) identifier_snode (identifier_text) identifier_text )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (attribute (identifier_snode) identifier_snode (identifier_text) identifier_text )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_value) identifier_value (string_u'') string_u'' )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (attribute (identifier_snode) identifier_snode (identifier_tag) identifier_tag )attribute (call (attribute (identifier_dict) identifier_dict (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (subscript (identifier_dict) identifier_dict (attribute (identifier_snode) identifier_snode (identifier_tag) identifier_tag )attribute )subscript )argument_list )call (identifier_list) identifier_list )comparison_operator (block (expression_statement (call (attribute (subscript (identifier_dict) identifier_dict (attribute (identifier_snode) identifier_snode (identifier_tag) identifier_tag )attribute )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_dict) identifier_dict (attribute (identifier_snode) identifier_snode (identifier_tag) identifier_tag )attribute )subscript (list (subscript (identifier_dict) identifier_dict (attribute (identifier_snode) identifier_snode (identifier_tag) identifier_tag )attribute )subscript (identifier_value) identifier_value )list )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_dict) identifier_dict (attribute (identifier_snode) identifier_snode (identifier_tag) identifier_tag )attribute )subscript (identifier_value) identifier_value )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_dict) identifier_dict )return_statement )block )function_definition )module
Converts ElementTree node to a dictionary. Parameters ---------- node : ElementTree node recursive : boolean If recursive=False, the value of any field with children will be the number of children. Returns ------- dict : nested dictionary. Tags as keys and values as values. Sub-elements that occur multiple times in an element are contained in a list.
(module (function_definition (function_name_confirmation_pdf) function_name_confirmation_pdf (parameters (identifier_self) identifier_self (identifier_confirmation_id) identifier_confirmation_id )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__create_get_request) identifier__create_get_request )attribute (argument_list (keyword_argument (identifier_resource) identifier_resource (identifier_CONFIRMATIONS) identifier_CONFIRMATIONS )keyword_argument (keyword_argument (identifier_billomat_id) identifier_billomat_id (identifier_confirmation_id) identifier_confirmation_id )keyword_argument (keyword_argument (identifier_command) identifier_command (identifier_PDF) identifier_PDF )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Opens a pdf of a confirmation :param confirmation_id: the confirmation id :return: dict
(module (function_definition (function_name_last_executed_query) function_name_last_executed_query (parameters (identifier_self) identifier_self (identifier_cursor) identifier_cursor (identifier_sql) identifier_sql (identifier_params) identifier_params )parameters (block (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_DatabaseOperations) identifier_DatabaseOperations (identifier_self) identifier_self )argument_list )call (identifier_last_executed_query) identifier_last_executed_query )attribute (argument_list (identifier_cursor) identifier_cursor (attribute (identifier_cursor) identifier_cursor (identifier_last_sql) identifier_last_sql )attribute (attribute (identifier_cursor) identifier_cursor (identifier_last_params) identifier_last_params )attribute )argument_list )call )return_statement )block )function_definition )module
Returns a string of the query last executed by the given cursor, with placeholders replaced with actual values. `sql` is the raw query containing placeholders, and `params` is the sequence of parameters. These are used by default, but this method exists for database backends to provide a better implementation according to their own quoting schemes.
(module (function_definition (function_name_engine) function_name_engine (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_pid) identifier_pid (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (attribute (identifier_SQLAlchemyTarget) identifier_SQLAlchemyTarget (identifier__engine_dict) identifier__engine_dict )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_connection_string) identifier_connection_string )attribute )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_conn) identifier_conn )not_operator (comparison_operator (attribute (identifier_conn) identifier_conn (identifier_pid) identifier_pid )attribute (identifier_pid) identifier_pid )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_engine) identifier_engine (call (attribute (identifier_sqlalchemy) identifier_sqlalchemy (identifier_create_engine) identifier_create_engine )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_connection_string) identifier_connection_string )attribute (keyword_argument (identifier_connect_args) identifier_connect_args (attribute (identifier_self) identifier_self (identifier_connect_args) identifier_connect_args )attribute )keyword_argument (keyword_argument (identifier_echo) identifier_echo (attribute (identifier_self) identifier_self (identifier_echo) identifier_echo )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_SQLAlchemyTarget) identifier_SQLAlchemyTarget (identifier__engine_dict) identifier__engine_dict )attribute (attribute (identifier_self) identifier_self (identifier_connection_string) identifier_connection_string )attribute )subscript (call (attribute (identifier_self) identifier_self (identifier_Connection) identifier_Connection )attribute (argument_list (identifier_engine) identifier_engine (identifier_pid) identifier_pid )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (subscript (attribute (identifier_SQLAlchemyTarget) identifier_SQLAlchemyTarget (identifier__engine_dict) identifier__engine_dict )attribute (attribute (identifier_self) identifier_self (identifier_connection_string) identifier_connection_string )attribute )subscript (identifier_engine) identifier_engine )attribute )return_statement )block )function_definition )module
Return an engine instance, creating it if it doesn't exist. Recreate the engine connection if it wasn't originally created by the current process.
(module (function_definition (function_name_write_sample_sheet) function_name_write_sample_sheet (parameters (identifier_path) identifier_path (identifier_accessions) identifier_accessions (identifier_names) identifier_names (identifier_celfile_urls) identifier_celfile_urls (default_parameter (identifier_sel) identifier_sel (None) None )default_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'wb') string_'wb' )argument_list )call (as_pattern_target (identifier_ofh) identifier_ofh )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_writer) identifier_writer (call (attribute (identifier_csv) identifier_csv (identifier_writer) identifier_writer )attribute (argument_list (identifier_ofh) identifier_ofh (keyword_argument (identifier_dialect) identifier_dialect (string_'excel-tab') string_'excel-tab' )keyword_argument (keyword_argument (identifier_lineterminator) identifier_lineterminator (attribute (identifier_os) identifier_os (identifier_linesep) identifier_linesep )attribute )keyword_argument (keyword_argument (identifier_quoting) identifier_quoting (attribute (identifier_csv) identifier_csv (identifier_QUOTE_NONE) identifier_QUOTE_NONE )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_writer) identifier_writer (identifier_writerow) identifier_writerow )attribute (argument_list (list (string_'Accession') string_'Accession' (string_'Name') string_'Name' (string_'CEL file') string_'CEL file' (string_'CEL file URL') string_'CEL file URL' )list )argument_list )call )expression_statement (expression_statement (assignment (identifier_n) identifier_n (call (identifier_len) identifier_len (argument_list (identifier_names) identifier_names )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_sel) identifier_sel (None) None )comparison_operator (block (expression_statement (assignment (identifier_sel) identifier_sel (call (identifier_range) identifier_range (argument_list (identifier_n) identifier_n )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (identifier_i) identifier_i (identifier_sel) identifier_sel (block (expression_statement (assignment (identifier_cf) identifier_cf (subscript (call (attribute (subscript (identifier_celfile_urls) identifier_celfile_urls (identifier_i) identifier_i )subscript (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_writer) identifier_writer (identifier_writerow) identifier_writerow )attribute (argument_list (list (subscript (identifier_accessions) identifier_accessions (identifier_i) identifier_i )subscript (subscript (identifier_names) identifier_names (identifier_i) identifier_i )subscript (identifier_cf) identifier_cf (subscript (identifier_celfile_urls) identifier_celfile_urls (identifier_i) identifier_i )subscript )list )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Write the sample sheet.
(module (function_definition (function_name_catalog_split_yaml) function_name_catalog_split_yaml (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_kwargs_copy) identifier_kwargs_copy (call (attribute (attribute (identifier_self) identifier_self (identifier_base_dict) identifier_base_dict )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_kwargs_copy) identifier_kwargs_copy (identifier_update) identifier_update )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__replace_none) identifier__replace_none )attribute (argument_list (identifier_kwargs_copy) identifier_kwargs_copy )argument_list )call )expression_statement (expression_statement (assignment (identifier_localpath) identifier_localpath (call (attribute (attribute (identifier_NameFactory) identifier_NameFactory (identifier_catalog_split_yaml_format) identifier_catalog_split_yaml_format )attribute (identifier_format) identifier_format )attribute (argument_list (dictionary_splat (identifier_kwargs_copy) identifier_kwargs_copy )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'fullpath') string_'fullpath' (False) False )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_fullpath) identifier_fullpath )attribute (argument_list (keyword_argument (identifier_localpath) identifier_localpath (identifier_localpath) identifier_localpath )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (identifier_localpath) identifier_localpath )return_statement )block )function_definition )module
return the name of a catalog split yaml file
(module (function_definition (function_name_train) function_name_train (parameters (identifier_self) identifier_self (identifier_content_objs) identifier_content_objs (identifier_idx_labels) identifier_idx_labels )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (call (identifier_set) identifier_set (argument_list (list_comprehension (subscript (identifier_lab) identifier_lab (integer_0) integer_0 )subscript (for_in_clause (identifier_lab) identifier_lab (identifier_idx_labels) identifier_idx_labels )for_in_clause )list_comprehension )argument_list )call )argument_list )call (integer_1) integer_1 )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_fcs) identifier_fcs (list_comprehension (identifier_fc) identifier_fc (for_in_clause (pattern_list (identifier__) identifier__ (identifier_fc) identifier_fc )pattern_list (identifier_content_objs) identifier_content_objs )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_feature_names) identifier_feature_names (call (identifier_vectorizable_features) identifier_vectorizable_features (argument_list (identifier_fcs) identifier_fcs )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dis) identifier_dis (call (identifier_dissimilarities) identifier_dissimilarities (argument_list (identifier_feature_names) identifier_feature_names (identifier_fcs) identifier_fcs )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_phi_dicts) identifier_phi_dicts (identifier_labels) identifier_labels )pattern_list (expression_list (list )list (list )list )expression_list )assignment )expression_statement (for_statement (pattern_list (identifier_coref_value) identifier_coref_value (identifier_i) identifier_i (identifier_j) identifier_j )pattern_list (identifier_idx_labels) identifier_idx_labels (block (expression_statement (call (attribute (identifier_labels) identifier_labels (identifier_append) identifier_append )attribute (argument_list (identifier_coref_value) identifier_coref_value )argument_list )call )expression_statement (expression_statement (assignment (identifier_phi_dict) identifier_phi_dict (call (identifier_dict) identifier_dict (argument_list (list_comprehension (tuple (identifier_name) identifier_name (subscript (subscript (identifier_dis) identifier_dis (identifier_name) identifier_name )subscript (identifier_i) identifier_i (identifier_j) identifier_j )subscript )tuple (for_in_clause (identifier_name) identifier_name (identifier_feature_names) identifier_feature_names )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_phi_dicts) identifier_phi_dicts (identifier_append) identifier_append )attribute (argument_list (identifier_phi_dict) identifier_phi_dict )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_vec) identifier_vec (call (identifier_dict_vector) identifier_dict_vector (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_training_data) identifier_training_data (call (attribute (identifier_vec) identifier_vec (identifier_fit_transform) identifier_fit_transform )attribute (argument_list (identifier_phi_dicts) identifier_phi_dicts )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_model) identifier_model (call (identifier_LogisticRegression) identifier_LogisticRegression (argument_list (keyword_argument (identifier_class_weight) identifier_class_weight (string_'auto') string_'auto' )keyword_argument (keyword_argument (identifier_penalty) identifier_penalty (string_'l1') string_'l1' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_model) identifier_model (identifier_fit) identifier_fit )attribute (argument_list (identifier_training_data) identifier_training_data (identifier_labels) identifier_labels )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_feature_weights) identifier_feature_weights )attribute (call (identifier_dict) identifier_dict (argument_list (list_comprehension (tuple (identifier_name) identifier_name (subscript (subscript (attribute (identifier_model) identifier_model (identifier_coef_) identifier_coef_ )attribute (integer_0) integer_0 )subscript (identifier_i) identifier_i )subscript )tuple (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_name) identifier_name )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_feature_names) identifier_feature_names )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_feature_names) identifier_feature_names (identifier_model) identifier_model (identifier_vec) identifier_vec )expression_list )return_statement )block )function_definition )module
Trains and returns a model using sklearn. If there are new labels to add, they can be added, returns an sklearn model which can be used for prediction and getting features. This method may return ``None`` if there is insufficient training data to produce a model. :param labels: Ground truth data. :type labels: list of ``({-1, 1}, index1, index2)``.
(module (function_definition (function_name_draw_address) function_name_draw_address (parameters (identifier_canvas) identifier_canvas )parameters (block (expression_statement (assignment (identifier_business_details) identifier_business_details (tuple (string_u'COMPANY NAME LTD') string_u'COMPANY NAME LTD' (string_u'STREET') string_u'STREET' (string_u'TOWN') string_u'TOWN' (string_U'COUNTY') string_U'COUNTY' (string_U'POSTCODE') string_U'POSTCODE' (string_U'COUNTRY') string_U'COUNTRY' (string_u'') string_u'' (string_u'') string_u'' (string_u'Phone: +00 (0) 000 000 000') string_u'Phone: +00 (0) 000 000 000' (string_u'Email: example@example.com') string_u'Email: example@example.com' (string_u'Website: www.example.com') string_u'Website: www.example.com' (string_u'Reg No: 00000000') string_u'Reg No: 00000000' )tuple )assignment )expression_statement (expression_statement (call (attribute (identifier_canvas) identifier_canvas (identifier_setFont) identifier_setFont )attribute (argument_list (string_'Helvetica') string_'Helvetica' (integer_9) integer_9 )argument_list )call )expression_statement (expression_statement (assignment (identifier_textobject) identifier_textobject (call (attribute (identifier_canvas) identifier_canvas (identifier_beginText) identifier_beginText )attribute (argument_list (binary_operator (integer_13) integer_13 (identifier_cm) identifier_cm )binary_operator (binary_operator (unary_operator (float_2.5) float_2.5 )unary_operator (identifier_cm) identifier_cm )binary_operator )argument_list )call )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_business_details) identifier_business_details (block (expression_statement (call (attribute (identifier_textobject) identifier_textobject (identifier_textLine) identifier_textLine )attribute (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_canvas) identifier_canvas (identifier_drawText) identifier_drawText )attribute (argument_list (identifier_textobject) identifier_textobject )argument_list )call )expression_statement )block )function_definition )module
Draws the business address
(module (function_definition (function_name_on_output_path_textChanged) function_name_on_output_path_textChanged (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_output_path) identifier_output_path (call (attribute (attribute (identifier_self) identifier_self (identifier_output_path) identifier_output_path )attribute (identifier_text) identifier_text )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output_not_xml_msg) identifier_output_not_xml_msg (call (identifier_tr) identifier_tr (argument_list (string_'output file is not .tif') string_'output file is not .tif' )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_output_path) identifier_output_path (not_operator (call (attribute (identifier_output_path) identifier_output_path (identifier_endswith) identifier_endswith )attribute (argument_list (string_'.tif') string_'.tif' )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_warning_text) identifier_warning_text )attribute (identifier_add) identifier_add )attribute (argument_list (identifier_output_not_xml_msg) identifier_output_not_xml_msg )argument_list )call )expression_statement )block (elif_clause (boolean_operator (identifier_output_path) identifier_output_path (comparison_operator (identifier_output_not_xml_msg) identifier_output_not_xml_msg (attribute (identifier_self) identifier_self (identifier_warning_text) identifier_warning_text )attribute )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_warning_text) identifier_warning_text )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_output_not_xml_msg) identifier_output_not_xml_msg )argument_list )call )expression_statement )block )elif_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_warning) identifier_update_warning )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Action when output file name is changed.
(module (function_definition (function_name__log_function) function_name__log_function (parameters (identifier_self) identifier_self (identifier_handler) identifier_handler )parameters (block (if_statement (comparison_operator (call (attribute (identifier_handler) identifier_handler (identifier_get_status) identifier_get_status )attribute (argument_list )argument_list )call (integer_400) integer_400 )comparison_operator (block (expression_statement (assignment (identifier_log_method) identifier_log_method (attribute (identifier_request_log) identifier_request_log (identifier_info) identifier_info )attribute )assignment )expression_statement )block (elif_clause (comparison_operator (call (attribute (identifier_handler) identifier_handler (identifier_get_status) identifier_get_status )attribute (argument_list )argument_list )call (integer_500) integer_500 )comparison_operator (block (expression_statement (assignment (identifier_log_method) identifier_log_method (attribute (identifier_request_log) identifier_request_log (identifier_warning) identifier_warning )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_log_method) identifier_log_method (attribute (identifier_request_log) identifier_request_log (identifier_error) identifier_error )attribute )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_i) identifier_i (subscript (identifier_settings) identifier_settings (string_'LOGGING_IGNORE_URLS') string_'LOGGING_IGNORE_URLS' )subscript (block (if_statement (call (attribute (attribute (attribute (identifier_handler) identifier_handler (identifier_request) identifier_request )attribute (identifier_uri) identifier_uri )attribute (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_i) identifier_i )argument_list )call (block (expression_statement (assignment (identifier_log_method) identifier_log_method (attribute (identifier_request_log) identifier_request_log (identifier_debug) identifier_debug )attribute )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_request_time) identifier_request_time (binary_operator (float_1000.0) float_1000.0 (call (attribute (attribute (identifier_handler) identifier_handler (identifier_request) identifier_request )attribute (identifier_request_time) identifier_request_time )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (call (identifier_log_method) identifier_log_method (argument_list (string_"%d %s %.2fms") string_"%d %s %.2fms" (call (attribute (identifier_handler) identifier_handler (identifier_get_status) identifier_get_status )attribute (argument_list )argument_list )call (call (attribute (identifier_handler) identifier_handler (identifier__request_summary) identifier__request_summary )attribute (argument_list )argument_list )call (identifier_request_time) identifier_request_time )argument_list )call )expression_statement )block )function_definition )module
Override Application.log_function so that what to log can be controlled.
(module (function_definition (function_name_loadSettings) function_name_loadSettings (parameters (identifier_self) identifier_self (default_parameter (identifier_groupName) identifier_groupName (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_groupName) identifier_groupName (conditional_expression (identifier_groupName) identifier_groupName (identifier_groupName) identifier_groupName (attribute (identifier_self) identifier_self (identifier_settingsGroupName) identifier_settingsGroupName )attribute )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_settings) identifier_settings (call (attribute (identifier_QtCore) identifier_QtCore (identifier_QSettings) identifier_QSettings )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Reading {!r} from: {}") string_"Reading {!r} from: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_groupName) identifier_groupName (call (attribute (identifier_settings) identifier_settings (identifier_fileName) identifier_fileName )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_settings) identifier_settings (identifier_beginGroup) identifier_beginGroup )attribute (argument_list (identifier_groupName) identifier_groupName )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (try_statement (block (for_statement (identifier_key) identifier_key (call (attribute (identifier_settings) identifier_settings (identifier_childKeys) identifier_childKeys )attribute (argument_list )argument_list )call (block (if_statement (call (attribute (identifier_key) identifier_key (identifier_startswith) identifier_startswith )attribute (argument_list (string_'item') string_'item' )argument_list )call (block (expression_statement (assignment (identifier_dct) identifier_dct (call (attribute (identifier_ast) identifier_ast (identifier_literal_eval) identifier_literal_eval )attribute (argument_list (call (attribute (identifier_settings) identifier_settings (identifier_value) identifier_value )attribute (argument_list (identifier_key) identifier_key )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_regItem) identifier_regItem (call (attribute (attribute (identifier_self) identifier_self (identifier__itemClass) identifier__itemClass )attribute (identifier_createFromDict) identifier_createFromDict )attribute (argument_list (identifier_dct) identifier_dct )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_registerItem) identifier_registerItem )attribute (argument_list (identifier_regItem) identifier_regItem )argument_list )call )expression_statement )block )if_statement )block )for_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_settings) identifier_settings (identifier_endGroup) identifier_endGroup )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Reads the registry items from the persistent settings store.
(module (function_definition (function_name__signal_handler) function_name__signal_handler (parameters (identifier_self) identifier_self (identifier_signum) identifier_signum (identifier_frame) identifier_frame )parameters (block (if_statement (attribute (attribute (identifier_self) identifier_self (identifier__options) identifier__options )attribute (identifier_config) identifier_config )attribute (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__options) identifier__options )attribute (identifier_config) identifier_config )attribute (string_"w") string_"w" )argument_list )call (as_pattern_target (identifier_cfg) identifier_cfg )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_yaml) identifier_yaml (identifier_dump) identifier_dump )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__home_assistant_config) identifier__home_assistant_config )attribute (argument_list )argument_list )call (identifier_cfg) identifier_cfg )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Dumped home assistant configuration at") string_"Dumped home assistant configuration at" (attribute (attribute (identifier_self) identifier_self (identifier__options) identifier__options )attribute (identifier_config) identifier_config )attribute )argument_list )call )expression_statement )block )with_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__connection) identifier__connection )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block )function_definition )module
Method called when handling signals
(module (function_definition (function_name_permitted_actions) function_name_permitted_actions (parameters (identifier_self) identifier_self (identifier_user) identifier_user (default_parameter (identifier_obj) identifier_obj (None) None )default_parameter )parameters (block (try_statement (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier__obj_ok) identifier__obj_ok )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )not_operator (block (raise_statement (identifier_InvalidPermissionObjectException) identifier_InvalidPermissionObjectException )raise_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_user) identifier_user (identifier_permset_tree) identifier_permset_tree )attribute (identifier_permitted_actions) identifier_permitted_actions )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )return_statement )block (except_clause (identifier_ObjectDoesNotExist) identifier_ObjectDoesNotExist (block (return_statement (list )list )return_statement )block )except_clause )try_statement )block )function_definition )module
Determine list of permitted actions for an object or object pattern. :param user: The user to test. :type user: ``User`` :param obj: A function mapping from action names to object paths to test. :type obj: callable :returns: ``list(tutelary.engine.Action)`` -- permitted actions.
(module (function_definition (function_name__get_variable_names) function_name__get_variable_names (parameters (identifier_arr) identifier_arr )parameters (block (if_statement (comparison_operator (identifier_VARIABLELABEL) identifier_VARIABLELABEL (attribute (identifier_arr) identifier_arr (identifier_dims) identifier_dims )attribute )comparison_operator (block (return_statement (call (attribute (subscript (attribute (identifier_arr) identifier_arr (identifier_coords) identifier_coords )attribute (identifier_VARIABLELABEL) identifier_VARIABLELABEL )subscript (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (attribute (identifier_arr) identifier_arr (identifier_name) identifier_name )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
Return the variable names of an array
(module (function_definition (function_name_info) function_name_info (parameters (identifier_gandi) identifier_gandi (identifier_resource) identifier_resource )parameters (block (expression_statement (assignment (identifier_output_keys) identifier_output_keys (list (string_'name') string_'name' (string_'state') string_'state' (string_'size') string_'size' (string_'type') string_'type' (string_'id') string_'id' (string_'dc') string_'dc' (string_'vm') string_'vm' (string_'profile') string_'profile' (string_'kernel') string_'kernel' (string_'cmdline') string_'cmdline' )list )assignment )expression_statement (expression_statement (assignment (identifier_resource) identifier_resource (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_tuple) identifier_tuple (argument_list (call (identifier_set) identifier_set (argument_list (identifier_resource) identifier_resource )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_vms) identifier_vms (call (identifier_dict) identifier_dict (argument_list (list_comprehension (tuple (subscript (identifier_vm) identifier_vm (string_'id') string_'id' )subscript (identifier_vm) identifier_vm )tuple (for_in_clause (identifier_vm) identifier_vm (call (attribute (attribute (identifier_gandi) identifier_gandi (identifier_iaas) identifier_iaas )attribute (identifier_list) identifier_list )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_datacenters) identifier_datacenters (call (attribute (attribute (identifier_gandi) identifier_gandi (identifier_datacenter) identifier_datacenter )attribute (identifier_list) identifier_list )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_num) identifier_num (identifier_item) identifier_item )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_resource) identifier_resource )argument_list )call (block (if_statement (identifier_num) identifier_num (block (expression_statement (call (attribute (identifier_gandi) identifier_gandi (identifier_separator_line) identifier_separator_line )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_disk) identifier_disk (call (attribute (attribute (identifier_gandi) identifier_gandi (identifier_disk) identifier_disk )attribute (identifier_info) identifier_info )attribute (argument_list (identifier_item) identifier_item )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_output_disk) identifier_output_disk (argument_list (identifier_gandi) identifier_gandi (identifier_disk) identifier_disk (identifier_datacenters) identifier_datacenters (identifier_vms) identifier_vms (list )list (identifier_output_keys) identifier_output_keys )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (identifier_disk) identifier_disk )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Display information about a disk. Resource can be a disk name or ID
(module (function_definition (function_name_readFile) function_name_readFile (parameters (identifier_self) identifier_self (identifier_pathToFile) identifier_pathToFile )parameters (block (expression_statement (assignment (identifier_fd) identifier_fd (call (identifier_open) identifier_open (argument_list (identifier_pathToFile) identifier_pathToFile (string_"rb") string_"rb" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_fd) identifier_fd (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_fd) identifier_fd (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Returns data from a file. @type pathToFile: str @param pathToFile: Path to the file. @rtype: str @return: The data from file.
(module (function_definition (function_name_glyphs2ufo) function_name_glyphs2ufo (parameters (identifier_options) identifier_options )parameters (block (if_statement (comparison_operator (attribute (identifier_options) identifier_options (identifier_output_dir) identifier_output_dir )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_options) identifier_options (identifier_output_dir) identifier_output_dir )attribute (boolean_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (attribute (identifier_options) identifier_options (identifier_glyphs_file) identifier_glyphs_file )attribute )argument_list )call (string_".") string_"." )boolean_operator )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_options) identifier_options (identifier_designspace_path) identifier_designspace_path )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_options) identifier_options (identifier_designspace_path) identifier_designspace_path )attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_options) identifier_options (identifier_output_dir) identifier_output_dir )attribute (binary_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (attribute (identifier_options) identifier_options (identifier_glyphs_file) identifier_glyphs_file )attribute )argument_list )call (integer_0) integer_0 )subscript )argument_list )call (string_".designspace") string_".designspace" )binary_operator )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_glyphsLib) identifier_glyphsLib (identifier_build_masters) identifier_build_masters )attribute (argument_list (attribute (identifier_options) identifier_options (identifier_glyphs_file) identifier_glyphs_file )attribute (attribute (identifier_options) identifier_options (identifier_output_dir) identifier_output_dir )attribute (attribute (identifier_options) identifier_options (identifier_instance_dir) identifier_instance_dir )attribute (keyword_argument (identifier_designspace_path) identifier_designspace_path (attribute (identifier_options) identifier_options (identifier_designspace_path) identifier_designspace_path )attribute )keyword_argument (keyword_argument (identifier_minimize_glyphs_diffs) identifier_minimize_glyphs_diffs (attribute (identifier_options) identifier_options (identifier_no_preserve_glyphsapp_metadata) identifier_no_preserve_glyphsapp_metadata )attribute )keyword_argument (keyword_argument (identifier_propagate_anchors) identifier_propagate_anchors (attribute (identifier_options) identifier_options (identifier_propagate_anchors) identifier_propagate_anchors )attribute )keyword_argument (keyword_argument (identifier_normalize_ufos) identifier_normalize_ufos (attribute (identifier_options) identifier_options (identifier_normalize_ufos) identifier_normalize_ufos )attribute )keyword_argument (keyword_argument (identifier_create_background_layers) identifier_create_background_layers (attribute (identifier_options) identifier_options (identifier_create_background_layers) identifier_create_background_layers )attribute )keyword_argument (keyword_argument (identifier_generate_GDEF) identifier_generate_GDEF (attribute (identifier_options) identifier_options (identifier_generate_GDEF) identifier_generate_GDEF )attribute )keyword_argument (keyword_argument (identifier_store_editor_state) identifier_store_editor_state (not_operator (attribute (identifier_options) identifier_options (identifier_no_store_editor_state) identifier_no_store_editor_state )attribute )not_operator )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Converts a Glyphs.app source file into UFO masters and a designspace file.
(module (function_definition (function_name_iter_tours) function_name_iter_tours (parameters (identifier_tourfile) identifier_tourfile (default_parameter (identifier_frames) identifier_frames (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_fp) identifier_fp (call (identifier_open) identifier_open (argument_list (identifier_tourfile) identifier_tourfile )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_i) identifier_i (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_row) identifier_row (identifier_fp) identifier_fp (block (if_statement (comparison_operator (subscript (identifier_row) identifier_row (integer_0) integer_0 )subscript (string_'>') string_'>' )comparison_operator (block (expression_statement (assignment (identifier_label) identifier_label (call (attribute (subscript (identifier_row) identifier_row (slice (integer_1) integer_1 (colon) colon )slice )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_label) identifier_label (identifier_startswith) identifier_startswith )attribute (argument_list (string_"GA") string_"GA" )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_pf) identifier_pf (identifier_j) identifier_j (identifier_score) identifier_score )pattern_list (call (attribute (identifier_label) identifier_label (identifier_split) identifier_split )attribute (argument_list (string_"-") string_"-" (integer_2) integer_2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_j) identifier_j (call (identifier_int) identifier_int (argument_list (identifier_j) identifier_j )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_j) identifier_j (integer_0) integer_0 )assignment )expression_statement )block )else_clause )if_statement (expression_statement (augmented_assignment (identifier_i) identifier_i (integer_1) integer_1 )augmented_assignment )expression_statement )block (else_clause (block (if_statement (comparison_operator (binary_operator (identifier_j) identifier_j (identifier_frames) identifier_frames )binary_operator (integer_0) integer_0 )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_tour) identifier_tour (identifier_tour_o) identifier_tour_o )pattern_list (call (identifier_separate_tour_and_o) identifier_separate_tour_and_o (argument_list (identifier_row) identifier_row )argument_list )call )assignment )expression_statement (expression_statement (yield (expression_list (identifier_i) identifier_i (identifier_label) identifier_label (identifier_tour) identifier_tour (identifier_tour_o) identifier_tour_o )expression_list )yield )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (call (attribute (identifier_fp) identifier_fp (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Extract tours from tourfile. Tourfile contains a set of contig configurations, generated at each iteration of the genetic algorithm. Each configuration has two rows, first row contains iteration id and score, second row contains list of contigs, separated by comma.
(module (function_definition (function_name_diff) function_name_diff (parameters (identifier_self) identifier_self (identifier_mail_a) identifier_mail_a (identifier_mail_b) identifier_mail_b )parameters (block (return_statement (call (identifier_len) identifier_len (argument_list (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (call (identifier_unified_diff) identifier_unified_diff (argument_list (attribute (identifier_mail_a) identifier_mail_a (identifier_body_lines) identifier_body_lines )attribute (attribute (identifier_mail_b) identifier_mail_b (identifier_body_lines) identifier_body_lines )attribute (keyword_argument (identifier_fromfile) identifier_fromfile (string_'a') string_'a' )keyword_argument (keyword_argument (identifier_tofile) identifier_tofile (string_'b') string_'b' )keyword_argument (keyword_argument (identifier_fromfiledate) identifier_fromfiledate (string_'') string_'' )keyword_argument (keyword_argument (identifier_tofiledate) identifier_tofiledate (string_'') string_'' )keyword_argument (keyword_argument (identifier_n) identifier_n (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_lineterm) identifier_lineterm (string_'\n') string_'\n' )keyword_argument )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return difference in bytes between two mails' normalized body. TODO: rewrite the diff algorithm to not rely on naive unified diff result parsing.
(module (function_definition (function_name_commit) function_name_commit (parameters (identifier_self) identifier_self (identifier_id) identifier_id (identifier_impreq) identifier_impreq )parameters (block (expression_statement (assignment (identifier_schema) identifier_schema (call (identifier_RequestSchema) identifier_RequestSchema (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_json) identifier_json (call (attribute (attribute (identifier_self) identifier_self (identifier_service) identifier_service )attribute (identifier_encode) identifier_encode )attribute (argument_list (identifier_schema) identifier_schema (identifier_impreq) identifier_impreq )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_schema) identifier_schema (call (identifier_RequestSchema) identifier_RequestSchema (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (attribute (identifier_self) identifier_self (identifier_service) identifier_service )attribute (identifier_post) identifier_post )attribute (argument_list (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_base) identifier_base )attribute (call (identifier_str) identifier_str (argument_list (identifier_id) identifier_id )argument_list )call )binary_operator (string_'/') string_'/' )binary_operator (keyword_argument (identifier_json) identifier_json (identifier_json) identifier_json )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_service) identifier_service )attribute (identifier_decode) identifier_decode )attribute (argument_list (identifier_schema) identifier_schema (identifier_resp) identifier_resp )argument_list )call )return_statement )block )function_definition )module
Commit a staged import. :param id: Staged import ID as an int. :param impreq: :class:`imports.Request <imports.Request>` object :return: :class:`imports.Request <imports.Request>` object :rtype: imports.Request
(module (function_definition (function_name_deploy_from_template) function_name_deploy_from_template (parameters (identifier_self) identifier_self (identifier_context) identifier_context (identifier_deploy_action) identifier_deploy_action (identifier_cancellation_context) identifier_cancellation_context )parameters (block (expression_statement (assignment (identifier_deploy_from_template_model) identifier_deploy_from_template_model (call (attribute (attribute (identifier_self) identifier_self (identifier_resource_model_parser) identifier_resource_model_parser )attribute (identifier_convert_to_resource_model) identifier_convert_to_resource_model )attribute (argument_list (keyword_argument (identifier_attributes) identifier_attributes (attribute (attribute (attribute (identifier_deploy_action) identifier_deploy_action (identifier_actionParams) identifier_actionParams )attribute (identifier_deployment) identifier_deployment )attribute (identifier_attributes) identifier_attributes )attribute )keyword_argument (keyword_argument (identifier_resource_model_type) identifier_resource_model_type (identifier_vCenterVMFromTemplateResourceModel) identifier_vCenterVMFromTemplateResourceModel )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data_holder) identifier_data_holder (call (identifier_DeployFromTemplateDetails) identifier_DeployFromTemplateDetails (argument_list (identifier_deploy_from_template_model) identifier_deploy_from_template_model (attribute (attribute (identifier_deploy_action) identifier_deploy_action (identifier_actionParams) identifier_actionParams )attribute (identifier_appName) identifier_appName )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_deploy_result_action) identifier_deploy_result_action (call (attribute (attribute (identifier_self) identifier_self (identifier_command_wrapper) identifier_command_wrapper )attribute (identifier_execute_command_with_connection) identifier_execute_command_with_connection )attribute (argument_list (identifier_context) identifier_context (attribute (attribute (identifier_self) identifier_self (identifier_deploy_command) identifier_deploy_command )attribute (identifier_execute_deploy_from_template) identifier_execute_deploy_from_template )attribute (identifier_data_holder) identifier_data_holder (identifier_cancellation_context) identifier_cancellation_context (attribute (identifier_self) identifier_self (identifier_folder_manager) identifier_folder_manager )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_deploy_result_action) identifier_deploy_result_action (identifier_actionId) identifier_actionId )attribute (attribute (identifier_deploy_action) identifier_deploy_action (identifier_actionId) identifier_actionId )attribute )assignment )expression_statement (return_statement (identifier_deploy_result_action) identifier_deploy_result_action )return_statement )block )function_definition )module
Deploy From Template Command, will deploy vm from template :param CancellationContext cancellation_context: :param ResourceCommandContext context: the context of the command :param DeployApp deploy_action: :return DeployAppResult deploy results
(module (function_definition (function_name_authenticate_with_serviceaccount) function_name_authenticate_with_serviceaccount (parameters (identifier_reactor) identifier_reactor (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_config) identifier_config (call (attribute (identifier_KubeConfig) identifier_KubeConfig (identifier_from_service_account) identifier_from_service_account )attribute (argument_list (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_policy) identifier_policy (call (identifier_https_policy_from_config) identifier_https_policy_from_config (argument_list (identifier_config) identifier_config )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_token) identifier_token (subscript (attribute (identifier_config) identifier_config (identifier_user) identifier_user )attribute (string_"token") string_"token" )subscript )assignment )expression_statement (expression_statement (assignment (identifier_agent) identifier_agent (call (identifier_HeaderInjectingAgent) identifier_HeaderInjectingAgent (argument_list (keyword_argument (identifier__to_inject) identifier__to_inject (call (identifier_Headers) identifier_Headers (argument_list (dictionary (pair (string_u"authorization") string_u"authorization" (list (call (attribute (string_u"Bearer {}") string_u"Bearer {}" (identifier_format) identifier_format )attribute (argument_list (identifier_token) identifier_token )argument_list )call )list )pair )dictionary )argument_list )call )keyword_argument (keyword_argument (identifier__agent) identifier__agent (call (identifier_Agent) identifier_Agent (argument_list (identifier_reactor) identifier_reactor (keyword_argument (identifier_contextFactory) identifier_contextFactory (identifier_policy) identifier_policy )keyword_argument )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_agent) identifier_agent )return_statement )block )function_definition )module
Create an ``IAgent`` which can issue authenticated requests to a particular Kubernetes server using a service account token. :param reactor: The reactor with which to configure the resulting agent. :param bytes path: The location of the service account directory. The default should work fine for normal use within a container. :return IAgent: An agent which will authenticate itself to a particular Kubernetes server and which will verify that server or refuse to interact with it.
(module (function_definition (function_name_get_region) function_name_get_region (parameters (identifier_self) identifier_self (identifier_x) identifier_x (identifier_z) identifier_z )parameters (block (if_statement (comparison_operator (tuple (identifier_x) identifier_x (identifier_z) identifier_z )tuple (attribute (identifier_self) identifier_self (identifier_regions) identifier_regions )attribute )comparison_operator (block (if_statement (comparison_operator (tuple (identifier_x) identifier_x (identifier_z) identifier_z )tuple (attribute (identifier_self) identifier_self (identifier_regionfiles) identifier_regionfiles )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_regions) identifier_regions )attribute (tuple (identifier_x) identifier_x (identifier_z) identifier_z )tuple )subscript (call (attribute (identifier_region) identifier_region (identifier_RegionFile) identifier_RegionFile )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_regionfiles) identifier_regionfiles )attribute (tuple (identifier_x) identifier_x (identifier_z) identifier_z )tuple )subscript )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_regions) identifier_regions )attribute (tuple (identifier_x) identifier_x (identifier_z) identifier_z )tuple )subscript (call (attribute (identifier_region) identifier_region (identifier_RegionFile) identifier_RegionFile )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (subscript (attribute (identifier_self) identifier_self (identifier_regions) identifier_regions )attribute (tuple (identifier_x) identifier_x (identifier_z) identifier_z )tuple )subscript (identifier_loc) identifier_loc )attribute (call (identifier_Location) identifier_Location (argument_list (keyword_argument (identifier_x) identifier_x (identifier_x) identifier_x )keyword_argument (keyword_argument (identifier_z) identifier_z (identifier_z) identifier_z )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_regions) identifier_regions )attribute (tuple (identifier_x) identifier_x (identifier_z) identifier_z )tuple )subscript )return_statement )block )function_definition )module
Get a region using x,z coordinates of a region. Cache results.
(module (function_definition (function_name_fields) function_name_fields (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute (call (identifier_FieldList) identifier_FieldList (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (keyword_argument (identifier_assistant_sid) identifier_assistant_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'assistant_sid') string_'assistant_sid' )subscript )keyword_argument (keyword_argument (identifier_task_sid) identifier_task_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'sid') string_'sid' )subscript )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute )return_statement )block )function_definition )module
Access the fields :returns: twilio.rest.autopilot.v1.assistant.task.field.FieldList :rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldList
(module (function_definition (function_name_get_allowed_domain) function_name_get_allowed_domain (parameters (identifier_url) identifier_url (default_parameter (identifier_allow_subdomains) identifier_allow_subdomains (True) True )default_parameter )parameters (block (if_statement (identifier_allow_subdomains) identifier_allow_subdomains (block (return_statement (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (identifier_re_www) identifier_re_www (string_'') string_'' (call (attribute (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_r'[^/]+\.[^/]+') string_r'[^/]+\.[^/]+' (identifier_url) identifier_url )argument_list )call (identifier_group) identifier_group )attribute (argument_list (integer_0) integer_0 )argument_list )call )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (identifier_re_domain) identifier_re_domain (call (attribute (identifier_UrlExtractor) identifier_UrlExtractor (identifier_get_allowed_domain) identifier_get_allowed_domain )attribute (argument_list (identifier_url) identifier_url )argument_list )call )argument_list )call (identifier_group) identifier_group )attribute (argument_list (integer_0) integer_0 )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Determines the url's domain. :param str url: the url to extract the allowed domain from :param bool allow_subdomains: determines wether to include subdomains :return str: subdomains.domain.topleveldomain or domain.topleveldomain
(module (function_definition (function_name_unpack_struct) function_name_unpack_struct (parameters (identifier_self) identifier_self (identifier_struct) identifier_struct )parameters (block (expression_statement (assignment (identifier_size) identifier_size (attribute (identifier_struct) identifier_struct (identifier_size) identifier_size )attribute )assignment )expression_statement (expression_statement (assignment (identifier_offset) identifier_offset (attribute (identifier_self) identifier_self (identifier_offset) identifier_offset )attribute )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (block (expression_statement (assignment (identifier_avail) identifier_avail (binary_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )argument_list )call (identifier_offset) identifier_offset )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_avail) identifier_avail (integer_0) integer_0 )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_avail) identifier_avail (identifier_size) identifier_size )comparison_operator (block (raise_statement (call (identifier_UnpackException) identifier_UnpackException (argument_list (attribute (identifier_struct) identifier_struct (identifier_format) identifier_format )attribute (identifier_size) identifier_size (identifier_avail) identifier_avail )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_offset) identifier_offset )attribute (binary_operator (identifier_offset) identifier_offset (identifier_size) identifier_size )binary_operator )assignment )expression_statement (return_statement (call (attribute (identifier_struct) identifier_struct (identifier_unpack_from) identifier_unpack_from )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_offset) identifier_offset )argument_list )call )return_statement )block )function_definition )module
unpacks the given struct from the underlying buffer and returns the results. Will raise an UnpackException if there is not enough data to satisfy the format of the structure
(module (function_definition (function_name__init_file) function_name__init_file (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_keyring_key) identifier_keyring_key )attribute (call (attribute (identifier_self) identifier_self (identifier__get_new_password) identifier__get_new_password )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_password) identifier_set_password )attribute (argument_list (string_'keyring-setting') string_'keyring-setting' (string_'password reference') string_'password reference' (string_'password reference value') string_'password reference value' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__write_config_value) identifier__write_config_value )attribute (argument_list (string_'keyring-setting') string_'keyring-setting' (string_'scheme') string_'scheme' (attribute (identifier_self) identifier_self (identifier_scheme) identifier_scheme )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__write_config_value) identifier__write_config_value )attribute (argument_list (string_'keyring-setting') string_'keyring-setting' (string_'version') string_'version' (attribute (identifier_self) identifier_self (identifier_version) identifier_version )attribute )argument_list )call )expression_statement )block )function_definition )module
Initialize a new password file and set the reference password.
(module (function_definition (function_name__cfg) function_name__cfg (parameters (identifier_key) identifier_key (default_parameter (identifier_default) identifier_default (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_root_cfg) identifier_root_cfg (call (attribute (identifier___salt__) identifier___salt__ (identifier_get) identifier_get )attribute (argument_list (string_'config.get') string_'config.get' (attribute (identifier___opts__) identifier___opts__ (identifier_get) identifier_get )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_kms_cfg) identifier_kms_cfg (call (identifier_root_cfg) identifier_root_cfg (argument_list (string_'aws_kms') string_'aws_kms' (dictionary )dictionary )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_kms_cfg) identifier_kms_cfg (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key (identifier_default) identifier_default )argument_list )call )return_statement )block )function_definition )module
Return the requested value from the aws_kms key in salt configuration. If it's not set, return the default.
(module (function_definition (function_name_setScales) function_name_setScales (parameters (identifier_self) identifier_self (default_parameter (identifier_scales) identifier_scales (None) None )default_parameter (default_parameter (identifier_term_num) identifier_term_num (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_scales) identifier_scales (None) None )comparison_operator (block (for_statement (identifier_term_i) identifier_term_i (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_n_terms) identifier_n_terms )attribute )argument_list )call (block (expression_statement (assignment (identifier_n_scales) identifier_n_scales (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_vd) identifier_vd )attribute (identifier_getTerm) identifier_getTerm )attribute (argument_list (identifier_term_i) identifier_term_i )argument_list )call (identifier_getNumberScales) identifier_getNumberScales )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_vd) identifier_vd )attribute (identifier_getTerm) identifier_getTerm )attribute (argument_list (identifier_term_i) identifier_term_i )argument_list )call (identifier_setScales) identifier_setScales )attribute (argument_list (call (attribute (identifier_SP) identifier_SP (identifier_array) identifier_array )attribute (argument_list (call (attribute (identifier_SP) identifier_SP (identifier_randn) identifier_randn )attribute (argument_list (identifier_n_scales) identifier_n_scales )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )for_statement )block (elif_clause (comparison_operator (identifier_term_num) identifier_term_num (None) None )comparison_operator (block (assert_statement (comparison_operator (subscript (attribute (identifier_scales) identifier_scales (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_vd) identifier_vd )attribute (identifier_getNumberScales) identifier_getNumberScales )attribute (argument_list )argument_list )call )comparison_operator (string_'incompatible shape') string_'incompatible shape' )assert_statement (expression_statement (assignment (identifier_index) identifier_index (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_term_i) identifier_term_i (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_n_terms) identifier_n_terms )attribute )argument_list )call (block (expression_statement (assignment (identifier_index1) identifier_index1 (binary_operator (identifier_index) identifier_index (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_vd) identifier_vd )attribute (identifier_getTerm) identifier_getTerm )attribute (argument_list (identifier_term_i) identifier_term_i )argument_list )call (identifier_getNumberScales) identifier_getNumberScales )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_vd) identifier_vd )attribute (identifier_getTerm) identifier_getTerm )attribute (argument_list (identifier_term_i) identifier_term_i )argument_list )call (identifier_setScales) identifier_setScales )attribute (argument_list (subscript (identifier_scales) identifier_scales (slice (identifier_index) identifier_index (colon) colon (identifier_index1) identifier_index1 )slice )subscript )argument_list )call )expression_statement (expression_statement (assignment (identifier_index) identifier_index (identifier_index1) identifier_index1 )assignment )expression_statement )block )for_statement )block )elif_clause (else_clause (block (assert_statement (comparison_operator (subscript (attribute (identifier_scales) identifier_scales (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_vd) identifier_vd )attribute (identifier_getTerm) identifier_getTerm )attribute (argument_list (identifier_term_num) identifier_term_num )argument_list )call (identifier_getNumberScales) identifier_getNumberScales )attribute (argument_list )argument_list )call )comparison_operator (string_'incompatible shape') string_'incompatible shape' )assert_statement (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_vd) identifier_vd )attribute (identifier_getTerm) identifier_getTerm )attribute (argument_list (identifier_term_num) identifier_term_num )argument_list )call (identifier_setScales) identifier_setScales )attribute (argument_list (identifier_scales) identifier_scales )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
get random initialization of variances based on the empirical trait variance Args: scales: if scales==None: set them randomly, else: set scales to term_num (if term_num==None: set to all terms) term_num: set scales to term_num
(module (function_definition (function_name__get_hanging_wall_coeffs_rrup) function_name__get_hanging_wall_coeffs_rrup (parameters (identifier_self) identifier_self (identifier_dists) identifier_dists )parameters (block (expression_statement (assignment (identifier_fhngrrup) identifier_fhngrrup (call (attribute (identifier_np) identifier_np (identifier_ones) identifier_ones )attribute (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_dists) identifier_dists (identifier_rrup) identifier_rrup )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_idx) identifier_idx (comparison_operator (attribute (identifier_dists) identifier_dists (identifier_rrup) identifier_rrup )attribute (float_0.0) float_0.0 )comparison_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_fhngrrup) identifier_fhngrrup (identifier_idx) identifier_idx )subscript (binary_operator (parenthesized_expression (binary_operator (subscript (attribute (identifier_dists) identifier_dists (identifier_rrup) identifier_rrup )attribute (identifier_idx) identifier_idx )subscript (subscript (attribute (identifier_dists) identifier_dists (identifier_rjb) identifier_rjb )attribute (identifier_idx) identifier_idx )subscript )binary_operator )parenthesized_expression (subscript (attribute (identifier_dists) identifier_dists (identifier_rrup) identifier_rrup )attribute (identifier_idx) identifier_idx )subscript )binary_operator )assignment )expression_statement (return_statement (identifier_fhngrrup) identifier_fhngrrup )return_statement )block )function_definition )module
Returns the hanging wall rrup term defined in equation 13
(module (function_definition (function_name_get_phase) function_name_get_phase (parameters (identifier_n_samples) identifier_n_samples (identifier_des_mask) identifier_des_mask (identifier_asc_mask) identifier_asc_mask )parameters (block (import_statement (dotted_name (identifier_numpy) identifier_numpy )dotted_name )import_statement (expression_statement (assignment (identifier_phase) identifier_phase (call (attribute (identifier_numpy) identifier_numpy (identifier_zeros) identifier_zeros )attribute (argument_list (identifier_n_samples) identifier_n_samples (keyword_argument (identifier_dtype) identifier_dtype (identifier_int) identifier_int )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_phase) identifier_phase (identifier_asc_mask) identifier_asc_mask )subscript (integer_1) integer_1 )assignment )expression_statement (expression_statement (assignment (subscript (identifier_phase) identifier_phase (identifier_des_mask) identifier_des_mask )subscript (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement (return_statement (identifier_phase) identifier_phase )return_statement )block )function_definition )module
Get the directional phase sign for each sample in depths Args ---- n_samples: int Length of output phase array des_mask: numpy.ndarray, shape (n,) Boolean mask of values where animal is descending asc_mask: numpy.ndarray, shape(n,) Boolean mask of values where animal is ascending Returns ------- phase: numpy.ndarray, shape (n,) Signed integer array values representing animal's dive phase *Phases*: * 0: neither ascending/descending * 1: ascending * -1: descending.
(module (function_definition (function_name__get_api_id) function_name__get_api_id (parameters (identifier_self) identifier_self (identifier_event_properties) identifier_event_properties )parameters (block (expression_statement (assignment (identifier_api_id) identifier_api_id (call (attribute (identifier_event_properties) identifier_event_properties (identifier_get) identifier_get )attribute (argument_list (string_"RestApiId") string_"RestApiId" )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_api_id) identifier_api_id (identifier_dict) identifier_dict )argument_list )call (comparison_operator (string_"Ref") string_"Ref" (identifier_api_id) identifier_api_id )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_api_id) identifier_api_id (subscript (identifier_api_id) identifier_api_id (string_"Ref") string_"Ref" )subscript )assignment )expression_statement )block )if_statement (return_statement (identifier_api_id) identifier_api_id )return_statement )block )function_definition )module
Get API logical id from API event properties. Handles case where API id is not specified or is a reference to a logical id.
(module (function_definition (function_name_setup_dir) function_name_setup_dir (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_cd) identifier_cd (boolean_operator (attribute (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute (identifier_cd) identifier_cd )attribute (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'crony') string_'crony' )subscript (identifier_get) identifier_get )attribute (argument_list (string_'directory') string_'directory' )argument_list )call )boolean_operator )assignment )expression_statement (if_statement (identifier_cd) identifier_cd (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_f'Adding cd to {cd}') string_f'Adding cd to {cd}' )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_cmd) identifier_cmd )attribute (string_f'cd {cd} && {self.cmd}') string_f'cd {cd} && {self.cmd}' )assignment )expression_statement )block )if_statement )block )function_definition )module
Change directory for script if necessary.
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_encodedKey) identifier_encodedKey (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_self) identifier_self (identifier_connect) identifier_connect )attribute (argument_list )argument_list )call (as_pattern_target (identifier_conn) identifier_conn )as_pattern_target )as_pattern )with_item )with_clause (block (with_statement (with_clause (with_item (call (identifier_doTransaction) identifier_doTransaction (argument_list (identifier_conn) identifier_conn )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_sql) identifier_sql (binary_operator (binary_operator (string_'INSERT IGNORE INTO ') string_'INSERT IGNORE INTO ' (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute )binary_operator (string_' (name) VALUES (%s)') string_' (name) VALUES (%s)' )binary_operator )assignment )expression_statement (return_statement (call (identifier_insertSQL) identifier_insertSQL (argument_list (identifier_conn) identifier_conn (identifier_sql) identifier_sql (keyword_argument (identifier_args) identifier_args (list (identifier_encodedKey) identifier_encodedKey )list )keyword_argument )argument_list )call )return_statement )block )with_statement )block )with_statement )block )function_definition )module
add key to the namespace. it is fine to add a key multiple times.
(module (function_definition (function_name___start_connection) function_name___start_connection (parameters (identifier_self) identifier_self (identifier_context) identifier_context (identifier_node) identifier_node (default_parameter (identifier_ccallbacks) identifier_ccallbacks (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier__logger) identifier__logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Creating connection object: CONTEXT=[%s] NODE=[%s]") string_"Creating connection object: CONTEXT=[%s] NODE=[%s]" (identifier_context) identifier_context (identifier_node) identifier_node )argument_list )call )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (attribute (attribute (identifier_nsq) identifier_nsq (identifier_connection) identifier_connection )attribute (identifier_Connection) identifier_Connection )attribute (argument_list (identifier_context) identifier_context (identifier_node) identifier_node (attribute (identifier_self) identifier_self (identifier___identify) identifier___identify )attribute (attribute (identifier_self) identifier_self (identifier___message_handler) identifier___message_handler )attribute (attribute (identifier_self) identifier_self (identifier___quit_ev) identifier___quit_ev )attribute (identifier_ccallbacks) identifier_ccallbacks (keyword_argument (identifier_ignore_quit) identifier_ignore_quit (attribute (identifier_self) identifier_self (identifier___connection_ignore_quit) identifier___connection_ignore_quit )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_g) identifier_g (call (attribute (identifier_gevent) identifier_gevent (identifier_spawn) identifier_spawn )attribute (argument_list (attribute (identifier_c) identifier_c (identifier_run) identifier_run )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_timeout_s) identifier_timeout_s (attribute (attribute (attribute (identifier_nsq) identifier_nsq (identifier_config) identifier_config )attribute (identifier_client) identifier_client )attribute (identifier_NEW_CONNECTION_NEGOTIATE_TIMEOUT_S) identifier_NEW_CONNECTION_NEGOTIATE_TIMEOUT_S )attribute )assignment )expression_statement (if_statement (comparison_operator (call (attribute (attribute (identifier_c) identifier_c (identifier_connected_ev) identifier_connected_ev )attribute (identifier_wait) identifier_wait )attribute (argument_list (identifier_timeout_s) identifier_timeout_s )argument_list )call (False) False )comparison_operator (block (expression_statement (call (attribute (identifier__logger) identifier__logger (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_"New connection to server [%s] timed-out. Cleaning-") string_"New connection to server [%s] timed-out. Cleaning-" (string_"up thread.") string_"up thread." )concatenated_string (identifier_node) identifier_node )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_g) identifier_g (identifier_kill) identifier_kill )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_g) identifier_g (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement (raise_statement (call (identifier_EnvironmentError) identifier_EnvironmentError (argument_list (binary_operator (string_"Connection to server [%s] failed.") string_"Connection to server [%s] failed." (tuple (identifier_node) identifier_node )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___connections) identifier___connections )attribute (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_node) identifier_node (identifier_c) identifier_c (identifier_g) identifier_g )tuple )argument_list )call )expression_statement )block )function_definition )module
Start a new connection, and manage it from a new greenlet.
(module (function_definition (function_name_getYadisXRD) function_name_getYadisXRD (parameters (identifier_xrd_tree) identifier_xrd_tree )parameters (block (expression_statement (assignment (identifier_xrd) identifier_xrd (None) None )assignment )expression_statement (for_statement (identifier_xrd) identifier_xrd (call (attribute (identifier_xrd_tree) identifier_xrd_tree (identifier_findall) identifier_findall )attribute (argument_list (identifier_xrd_tag) identifier_xrd_tag )argument_list )call (block (pass_statement )pass_statement )block )for_statement (if_statement (comparison_operator (identifier_xrd) identifier_xrd (None) None )comparison_operator (block (raise_statement (call (identifier_XRDSError) identifier_XRDSError (argument_list (string_'No XRD present in tree') string_'No XRD present in tree' )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_xrd) identifier_xrd )return_statement )block )function_definition )module
Return the XRD element that should contain the Yadis services
(module (function_definition (function_name__exponential_timeout_generator) function_name__exponential_timeout_generator (parameters (identifier_initial) identifier_initial (identifier_maximum) identifier_maximum (identifier_multiplier) identifier_multiplier (identifier_deadline) identifier_deadline )parameters (block (if_statement (comparison_operator (identifier_deadline) identifier_deadline (None) None )comparison_operator (block (expression_statement (assignment (identifier_deadline_datetime) identifier_deadline_datetime (binary_operator (call (attribute (identifier_datetime_helpers) identifier_datetime_helpers (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_seconds) identifier_seconds (identifier_deadline) identifier_deadline )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_deadline_datetime) identifier_deadline_datetime (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_max) identifier_max )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_timeout) identifier_timeout (identifier_initial) identifier_initial )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (identifier_now) identifier_now (call (attribute (identifier_datetime_helpers) identifier_datetime_helpers (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (yield (call (identifier_min) identifier_min (argument_list (identifier_timeout) identifier_timeout (identifier_maximum) identifier_maximum (call (identifier_float) identifier_float (argument_list (attribute (parenthesized_expression (binary_operator (identifier_deadline_datetime) identifier_deadline_datetime (identifier_now) identifier_now )binary_operator )parenthesized_expression (identifier_seconds) identifier_seconds )attribute )argument_list )call )argument_list )call )yield )expression_statement (expression_statement (assignment (identifier_timeout) identifier_timeout (binary_operator (identifier_timeout) identifier_timeout (identifier_multiplier) identifier_multiplier )binary_operator )assignment )expression_statement )block )while_statement )block )function_definition )module
A generator that yields exponential timeout values. Args: initial (float): The initial timeout. maximum (float): The maximum timeout. multiplier (float): The multiplier applied to the timeout. deadline (float): The overall deadline across all invocations. Yields: float: A timeout value.
(module (function_definition (function_name_raise_error) function_name_raise_error (parameters (typed_parameter (identifier_error_type) identifier_error_type (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (None) None )type (block (try_statement (block (expression_statement (assignment (identifier_error) identifier_error (call (identifier_next) identifier_next (argument_list (generator_expression (identifier_v) identifier_v (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_ERROR_CODES) identifier_ERROR_CODES (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_k) identifier_k (identifier_error_type) identifier_error_type )comparison_operator )if_clause )generator_expression )argument_list )call )assignment )expression_statement )block (except_clause (identifier_StopIteration) identifier_StopIteration (block (expression_statement (assignment (identifier_error) identifier_error (identifier_AirVisualError) identifier_AirVisualError )assignment )expression_statement )block )except_clause )try_statement (raise_statement (call (identifier_error) identifier_error (argument_list (identifier_error_type) identifier_error_type )argument_list )call )raise_statement )block )function_definition )module
Raise the appropriate error based on error message.
(module (function_definition (function_name__button_plus_clicked) function_name__button_plus_clicked (parameters (identifier_self) identifier_self (identifier_n) identifier_n )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__button_save) identifier__button_save )attribute (identifier_setEnabled) identifier_setEnabled )attribute (argument_list (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_insert_colorpoint) identifier_insert_colorpoint )attribute (argument_list (subscript (subscript (attribute (identifier_self) identifier_self (identifier__colorpoint_list) identifier__colorpoint_list )attribute (identifier_n) identifier_n )subscript (integer_0) integer_0 )subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier__colorpoint_list) identifier__colorpoint_list )attribute (identifier_n) identifier_n )subscript (integer_1) integer_1 )subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier__colorpoint_list) identifier__colorpoint_list )attribute (identifier_n) identifier_n )subscript (integer_2) integer_2 )subscript )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__build_gui) identifier__build_gui )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Create a new colorpoint.
(module (function_definition (function_name_section) function_name_section (parameters (identifier_self) identifier_self (identifier_section) identifier_section )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier__container) identifier__container )attribute (identifier_ConfigUpdater) identifier_ConfigUpdater )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Sections can only be added at section level!") string_"Sections can only be added at section level!" )argument_list )call )raise_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_section) identifier_section (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_section) identifier_section (call (identifier_Section) identifier_Section (argument_list (identifier_section) identifier_section (keyword_argument (identifier_container) identifier_container (attribute (identifier_self) identifier_self (identifier__container) identifier__container )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block (elif_clause (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_section) identifier_section (identifier_Section) identifier_Section )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Parameter must be a string or Section type!") string_"Parameter must be a string or Section type!" )argument_list )call )raise_statement )block )elif_clause )if_statement (if_statement (comparison_operator (attribute (identifier_section) identifier_section (identifier_name) identifier_name )attribute (list_comprehension (attribute (identifier_block) identifier_block (identifier_name) identifier_name )attribute (for_in_clause (identifier_block) identifier_block (attribute (identifier_self) identifier_self (identifier__container) identifier__container )attribute )for_in_clause (if_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_block) identifier_block (identifier_Section) identifier_Section )argument_list )call )if_clause )list_comprehension )comparison_operator (block (raise_statement (call (identifier_DuplicateSectionError) identifier_DuplicateSectionError (argument_list (attribute (identifier_section) identifier_section (identifier_name) identifier_name )attribute )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__container) identifier__container )attribute (identifier_structure) identifier_structure )attribute (identifier_insert) identifier_insert )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__idx) identifier__idx )attribute (identifier_section) identifier_section )argument_list )call )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__idx) identifier__idx )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Creates a section block Args: section (str or :class:`Section`): name of section or object Returns: self for chaining
(module (function_definition (function_name_normalized_start) function_name_normalized_start (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_namespaces_after_key) identifier_namespaces_after_key (call (identifier_list) identifier_list (argument_list (call (attribute (call (attribute (identifier_self) identifier_self (identifier_make_datastore_query) identifier_make_datastore_query )attribute (argument_list )argument_list )call (identifier_Run) identifier_Run )attribute (argument_list (keyword_argument (identifier_limit) identifier_limit (integer_1) integer_1 )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_namespaces_after_key) identifier_namespaces_after_key )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_namespace_after_key) identifier_namespace_after_key (boolean_operator (call (attribute (subscript (identifier_namespaces_after_key) identifier_namespaces_after_key (integer_0) integer_0 )subscript (identifier_name) identifier_name )attribute (argument_list )argument_list )call (string_'') string_'' )boolean_operator )assignment )expression_statement (return_statement (call (identifier_NamespaceRange) identifier_NamespaceRange (argument_list (identifier_namespace_after_key) identifier_namespace_after_key (attribute (identifier_self) identifier_self (identifier_namespace_end) identifier_namespace_end )attribute (keyword_argument (identifier__app) identifier__app (attribute (identifier_self) identifier_self (identifier_app) identifier_app )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns a NamespaceRange with leading non-existant namespaces removed. Returns: A copy of this NamespaceRange whose namespace_start is adjusted to exclude the portion of the range that contains no actual namespaces in the datastore. None is returned if the NamespaceRange contains no actual namespaces in the datastore.
(module (function_definition (function_name___locate_scubainit) function_name___locate_scubainit (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_pkg_path) identifier_pkg_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_scubainit_path) identifier_scubainit_path )attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_pkg_path) identifier_pkg_path (string_'scubainit') string_'scubainit' )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_scubainit_path) identifier_scubainit_path )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_ScubaError) identifier_ScubaError (argument_list (call (attribute (string_'scubainit not found at "{}"') string_'scubainit not found at "{}"' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_scubainit_path) identifier_scubainit_path )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Determine path to scubainit binary
(module (function_definition (function_name_open_http) function_name_open_http (parameters (identifier_self) identifier_self (identifier_url) identifier_url (default_parameter (identifier_data) identifier_data (None) None )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__open_generic_http) identifier__open_generic_http )attribute (argument_list (attribute (identifier_http_client) identifier_http_client (identifier_HTTPConnection) identifier_HTTPConnection )attribute (identifier_url) identifier_url (identifier_data) identifier_data )argument_list )call )return_statement )block )function_definition )module
Use HTTP protocol.
(module (function_definition (function_name_find_packages) function_name_find_packages (parameters )parameters (block (expression_statement (assignment (identifier_packages) identifier_packages (list (string_'pyctools') string_'pyctools' )list )assignment )expression_statement (for_statement (pattern_list (identifier_root) identifier_root (identifier_dirs) identifier_dirs (identifier_files) identifier_files )pattern_list (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (string_'src') string_'src' (string_'pyctools') string_'pyctools' )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_package) identifier_package (call (attribute (string_'.') string_'.' (identifier_join) identifier_join )attribute (argument_list (subscript (call (attribute (identifier_root) identifier_root (identifier_split) identifier_split )attribute (argument_list (attribute (identifier_os) identifier_os (identifier_sep) identifier_sep )attribute )argument_list )call (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (for_statement (identifier_name) identifier_name (identifier_dirs) identifier_dirs (block (expression_statement (call (attribute (identifier_packages) identifier_packages (identifier_append) identifier_append )attribute (argument_list (binary_operator (binary_operator (identifier_package) identifier_package (string_'.') string_'.' )binary_operator (identifier_name) identifier_name )binary_operator )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_packages) identifier_packages )return_statement )block )function_definition )module
Walk source directory tree and convert each sub directory to a package name.
(module (function_definition (function_name_capacityForRole) function_name_capacityForRole (parameters (identifier_self) identifier_self (identifier_role) identifier_role )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_role) identifier_role (identifier_DanceRole) identifier_DanceRole )argument_list )call (block (expression_statement (assignment (identifier_role_id) identifier_role_id (attribute (identifier_role) identifier_role (identifier_id) identifier_id )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_role_id) identifier_role_id (identifier_role) identifier_role )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_eventRoles) identifier_eventRoles (call (attribute (attribute (identifier_self) identifier_self (identifier_eventrole_set) identifier_eventrole_set )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_capacity__gt) identifier_capacity__gt (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (call (attribute (identifier_eventRoles) identifier_eventRoles (identifier_count) identifier_count )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_role_id) identifier_role_id (list_comprehension (attribute (attribute (identifier_x) identifier_x (identifier_role) identifier_role )attribute (identifier_id) identifier_id )attribute (for_in_clause (identifier_x) identifier_x (identifier_eventRoles) identifier_eventRoles )for_in_clause )list_comprehension )comparison_operator )boolean_operator (block (return_statement (integer_0) integer_0 )return_statement )block (elif_clause (comparison_operator (call (attribute (identifier_eventRoles) identifier_eventRoles (identifier_count) identifier_count )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (attribute (call (attribute (identifier_eventRoles) identifier_eventRoles (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_role) identifier_role (identifier_role) identifier_role )keyword_argument )argument_list )call (identifier_capacity) identifier_capacity )attribute )return_statement )block )elif_clause )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_self) identifier_self (identifier_Series) identifier_Series )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_availableRoles) identifier_availableRoles (call (attribute (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_classDescription) identifier_classDescription )attribute (identifier_danceTypeLevel) identifier_danceTypeLevel )attribute (identifier_danceType) identifier_danceType )attribute (identifier_roles) identifier_roles )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (call (attribute (identifier_availableRoles) identifier_availableRoles (identifier_count) identifier_count )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_role_id) identifier_role_id (list_comprehension (attribute (identifier_x) identifier_x (identifier_id) identifier_id )attribute (for_in_clause (identifier_x) identifier_x (identifier_availableRoles) identifier_availableRoles )for_in_clause )list_comprehension )comparison_operator )boolean_operator (block (return_statement (integer_0) integer_0 )return_statement )block (elif_clause (boolean_operator (comparison_operator (call (attribute (identifier_availableRoles) identifier_availableRoles (identifier_count) identifier_count )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (attribute (identifier_self) identifier_self (identifier_capacity) identifier_capacity )attribute )boolean_operator (block (return_statement (call (identifier_ceil) identifier_ceil (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_capacity) identifier_capacity )attribute (call (attribute (identifier_availableRoles) identifier_availableRoles (identifier_count) identifier_count )attribute (argument_list )argument_list )call )binary_operator )argument_list )call )return_statement )block )elif_clause )if_statement )block (except_clause (as_pattern (identifier_ObjectDoesNotExist) identifier_ObjectDoesNotExist (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_'Error in calculating capacity for role: %s') string_'Error in calculating capacity for role: %s' (identifier_e) identifier_e )binary_operator )argument_list )call )expression_statement )block )except_clause )try_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier_capacity) identifier_capacity )attribute )return_statement )block )function_definition )module
Accepts a DanceRole object and determines the capacity for that role at this event.this Since roles are not always custom specified for events, this looks for the set of available roles in multiple places, and only returns the overall capacity of the event if roles are not found elsewhere.
(module (function_definition (function_name_create_and_run_collector) function_name_create_and_run_collector (parameters (identifier_document) identifier_document (identifier_options) identifier_options )parameters (block (expression_statement (assignment (identifier_collector) identifier_collector (None) None )assignment )expression_statement (if_statement (not_operator (comparison_operator (attribute (identifier_options) identifier_options (identifier_report) identifier_report )attribute (string_'off') string_'off' )comparison_operator )not_operator (block (expression_statement (assignment (identifier_collector) identifier_collector (call (identifier_Collector) identifier_Collector (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_collector) identifier_collector (identifier_store) identifier_store )attribute (identifier_configure) identifier_configure )attribute (argument_list (identifier_document) identifier_document )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_Event) identifier_Event (identifier_configure) identifier_configure )attribute (argument_list (keyword_argument (identifier_collector_queue) identifier_collector_queue (attribute (identifier_collector) identifier_collector (identifier_queue) identifier_queue )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_collector) identifier_collector (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_collector) identifier_collector )return_statement )block )function_definition )module
Create and run collector process for report data.
(module (function_definition (function_name_time_until_expiration) function_name_time_until_expiration (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_password_expires_at) identifier_password_expires_at )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_expiration_date) identifier_expiration_date (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_strptime) identifier_strptime )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_password_expires_at) identifier_password_expires_at )attribute (string_"%Y-%m-%dT%H:%M:%S.%f") string_"%Y-%m-%dT%H:%M:%S.%f" )argument_list )call )assignment )expression_statement (return_statement (binary_operator (identifier_expiration_date) identifier_expiration_date (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_now) identifier_now )attribute (argument_list )argument_list )call )binary_operator )return_statement )block )if_statement )block )function_definition )module
Returns the number of remaining days until user's password expires. Calculates the number days until the user must change their password, once the password expires the user will not able to log in until an admin changes its password.
(module (function_definition (function_name_validate_port) function_name_validate_port (parameters (identifier_port) identifier_port )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_port) identifier_port (tuple (identifier_str) identifier_str (identifier_int) identifier_int )tuple )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_f'port must be an integer or string: {port}') string_f'port must be an integer or string: {port}' )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_port) identifier_port (identifier_str) identifier_str )argument_list )call (call (attribute (identifier_port) identifier_port (identifier_isdigit) identifier_isdigit )attribute (argument_list )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_port) identifier_port (call (identifier_int) identifier_int (argument_list (identifier_port) identifier_port )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_port) identifier_port (identifier_int) identifier_int )argument_list )call (comparison_operator (integer_0) integer_0 (identifier_port) identifier_port (integer_65535) integer_65535 )comparison_operator )boolean_operator (block (return_statement (identifier_port) identifier_port )return_statement )block )if_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_f'invalid port: {port}') string_f'invalid port: {port}' )argument_list )call )raise_statement )block )function_definition )module
Validate port and return it as an integer. A string, or its representation as an integer, is accepted.
(module (function_definition (function_name_default_token_implementation) function_name_default_token_implementation (parameters (identifier_self) identifier_self (identifier_user_id) identifier_user_id )parameters (block (expression_statement (assignment (identifier_user) identifier_user (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (identifier_user_id) identifier_user_id )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_user) identifier_user )not_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (string_'No user with such id [{}]') string_'No user with such id [{}]' )assignment )expression_statement (raise_statement (call (attribute (identifier_x) identifier_x (identifier_JwtNoUser) identifier_JwtNoUser )attribute (argument_list (call (attribute (identifier_msg) identifier_msg (identifier_format) identifier_format )attribute (argument_list (identifier_user_id) identifier_user_id )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (attribute (identifier_user) identifier_user (identifier__token) identifier__token )attribute (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_decode_token) identifier_decode_token )attribute (argument_list (attribute (identifier_user) identifier_user (identifier__token) identifier__token )attribute )argument_list )call )expression_statement (return_statement (attribute (identifier_user) identifier_user (identifier__token) identifier__token )attribute )return_statement )block (except_clause (attribute (attribute (identifier_jwt) identifier_jwt (identifier_exceptions) identifier_exceptions )attribute (identifier_ExpiredSignatureError) identifier_ExpiredSignatureError )attribute (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement (expression_statement (assignment (identifier_from_now) identifier_from_now (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_seconds) identifier_seconds (attribute (identifier_self) identifier_self (identifier_jwt_lifetime) identifier_jwt_lifetime )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_expires) identifier_expires (binary_operator (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call (identifier_from_now) identifier_from_now )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_issued) identifier_issued (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_not_before) identifier_not_before (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_exp) identifier_exp (identifier_expires) identifier_expires )keyword_argument (keyword_argument (identifier_nbf) identifier_nbf (identifier_not_before) identifier_not_before )keyword_argument (keyword_argument (identifier_iat) identifier_iat (identifier_issued) identifier_issued )keyword_argument (keyword_argument (identifier_user_id) identifier_user_id (identifier_user_id) identifier_user_id )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_token) identifier_token (call (attribute (identifier_jwt) identifier_jwt (identifier_encode) identifier_encode )attribute (argument_list (identifier_data) identifier_data (attribute (identifier_self) identifier_self (identifier_jwt_secret) identifier_jwt_secret )attribute (keyword_argument (identifier_algorithm) identifier_algorithm (attribute (identifier_self) identifier_self (identifier_jwt_algo) identifier_jwt_algo )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_string_token) identifier_string_token (call (attribute (identifier_token) identifier_token (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_user) identifier_user (identifier__token) identifier__token )attribute (identifier_string_token) identifier_string_token )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_save) identifier_save )attribute (argument_list (identifier_user) identifier_user )argument_list )call )expression_statement (return_statement (identifier_string_token) identifier_string_token )return_statement )block )function_definition )module
Default JWT token implementation This is used by default for generating user tokens if custom implementation was not configured. The token will contain user_id and expiration date. If you need more information added to the token, register your custom implementation. It will load a user to see if token is already on file. If it is, the existing token will be checked for expiration and returned if valid. Otherwise a new token will be generated and persisted. This can be used to perform token revocation. :param user_id: int, user id :return: string
(module (function_definition (function_name_get_all_tags_of_offer) function_name_get_all_tags_of_offer (parameters (identifier_self) identifier_self (identifier_offer_id) identifier_offer_id )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__iterate_through_pages) identifier__iterate_through_pages )attribute (argument_list (keyword_argument (identifier_get_function) identifier_get_function (attribute (identifier_self) identifier_self (identifier_get_tags_of_offer_per_page) identifier_get_tags_of_offer_per_page )attribute )keyword_argument (keyword_argument (identifier_resource) identifier_resource (identifier_OFFER_TAGS) identifier_OFFER_TAGS )keyword_argument (dictionary_splat (dictionary (pair (string_'offer_id') string_'offer_id' (identifier_offer_id) identifier_offer_id )pair )dictionary )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Get all tags of offer This will iterate over all pages until it gets all elements. So if the rate limit exceeded it will throw an Exception and you will get nothing :param offer_id: the offer id :return: list
(module (function_definition (function_name_get_state_map) function_name_get_state_map (parameters (identifier_meta_graph) identifier_meta_graph (identifier_state_ops) identifier_state_ops (identifier_unsupported_state_ops) identifier_unsupported_state_ops (identifier_get_tensor_by_name) identifier_get_tensor_by_name )parameters (block (expression_statement (assignment (identifier_state_map) identifier_state_map (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_node) identifier_node (attribute (attribute (identifier_meta_graph) identifier_meta_graph (identifier_graph_def) identifier_graph_def )attribute (identifier_node) identifier_node )attribute (block (if_statement (comparison_operator (attribute (identifier_node) identifier_node (identifier_op) identifier_op )attribute (identifier_state_ops) identifier_state_ops )comparison_operator (block (expression_statement (assignment (identifier_tensor_name) identifier_tensor_name (binary_operator (attribute (identifier_node) identifier_node (identifier_name) identifier_name )attribute (string_":0") string_":0" )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_tensor) identifier_tensor (call (identifier_get_tensor_by_name) identifier_get_tensor_by_name (argument_list (identifier_tensor_name) identifier_tensor_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_num_outputs) identifier_num_outputs (call (identifier_len) identifier_len (argument_list (attribute (attribute (identifier_tensor) identifier_tensor (identifier_op) identifier_op )attribute (identifier_outputs) identifier_outputs )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_num_outputs) identifier_num_outputs (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Stateful op %s has %d outputs, expected 1") string_"Stateful op %s has %d outputs, expected 1" (tuple (attribute (identifier_node) identifier_node (identifier_op) identifier_op )attribute (identifier_num_outputs) identifier_num_outputs )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (identifier_state_map) identifier_state_map (identifier_tensor_name) identifier_tensor_name )subscript (identifier_tensor) identifier_tensor )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_node) identifier_node (identifier_op) identifier_op )attribute (identifier_unsupported_state_ops) identifier_unsupported_state_ops )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Unsupported stateful op: %s") string_"Unsupported stateful op: %s" (attribute (identifier_node) identifier_node (identifier_op) identifier_op )attribute )binary_operator )argument_list )call )raise_statement )block )if_statement )block )for_statement (return_statement (identifier_state_map) identifier_state_map )return_statement )block )function_definition )module
Returns a map from tensor names to tensors that hold the state.
(module (function_definition (function_name__void_array_to_list) function_name__void_array_to_list (parameters (identifier_restuple) identifier_restuple (identifier__func) identifier__func (identifier__args) identifier__args )parameters (block (expression_statement (assignment (identifier_shape) identifier_shape (tuple (attribute (attribute (identifier_restuple) identifier_restuple (identifier_e) identifier_e )attribute (identifier_len) identifier_len )attribute (integer_1) integer_1 )tuple )assignment )expression_statement (expression_statement (assignment (identifier_array_size) identifier_array_size (call (attribute (identifier_np) identifier_np (identifier_prod) identifier_prod )attribute (argument_list (identifier_shape) identifier_shape )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mem_size) identifier_mem_size (binary_operator (integer_8) integer_8 (identifier_array_size) identifier_array_size )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_array_str_e) identifier_array_str_e (call (identifier_string_at) identifier_string_at (argument_list (attribute (attribute (identifier_restuple) identifier_restuple (identifier_e) identifier_e )attribute (identifier_data) identifier_data )attribute (identifier_mem_size) identifier_mem_size )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_array_str_n) identifier_array_str_n (call (identifier_string_at) identifier_string_at (argument_list (attribute (attribute (identifier_restuple) identifier_restuple (identifier_n) identifier_n )attribute (identifier_data) identifier_data )attribute (identifier_mem_size) identifier_mem_size )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ls_e) identifier_ls_e (call (attribute (call (attribute (identifier_np) identifier_np (identifier_frombuffer) identifier_frombuffer )attribute (argument_list (identifier_array_str_e) identifier_array_str_e (identifier_float) identifier_float (identifier_array_size) identifier_array_size )argument_list )call (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ls_n) identifier_ls_n (call (attribute (call (attribute (identifier_np) identifier_np (identifier_frombuffer) identifier_frombuffer )attribute (argument_list (identifier_array_str_n) identifier_array_str_n (identifier_float) identifier_float (identifier_array_size) identifier_array_size )argument_list )call (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_ls_e) identifier_ls_e (identifier_ls_n) identifier_ls_n )expression_list )return_statement )block )function_definition )module
Convert the FFI result to Python data structures
(module (function_definition (function_name_register) function_name_register (parameters (identifier_self) identifier_self (identifier_event) identifier_event (identifier_fn) identifier_fn )parameters (block (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__callbacks) identifier__callbacks )attribute (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_event) identifier_event (list )list )argument_list )call (identifier_append) identifier_append )attribute (argument_list (identifier_fn) identifier_fn )argument_list )call )expression_statement (return_statement (identifier_fn) identifier_fn )return_statement )block )function_definition )module
Tell the object to run `fn` whenever a message of type `event` is received.
(module (function_definition (function_name_safe_stat) function_name_safe_stat (parameters (identifier_path) identifier_path (default_parameter (identifier_timeout) identifier_timeout (integer_1) integer_1 )default_parameter (default_parameter (identifier_cmd) identifier_cmd (None) None )default_parameter )parameters (block (expression_statement (string_"Use threads and a subproc to bodge a timeout on top of filesystem access") string_"Use threads and a subproc to bodge a timeout on top of filesystem access" )expression_statement (global_statement (identifier_safe_stat_process) identifier_safe_stat_process )global_statement (if_statement (comparison_operator (identifier_cmd) identifier_cmd (None) None )comparison_operator (block (expression_statement (assignment (identifier_cmd) identifier_cmd (list (string_'/usr/bin/stat') string_'/usr/bin/stat' )list )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (identifier_path) identifier_path )argument_list )call )expression_statement (function_definition (function_name_target) function_name_target (parameters )parameters (block (global_statement (identifier_safe_stat_process) identifier_safe_stat_process )global_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Stat thread started') string_'Stat thread started' )argument_list )call )expression_statement (expression_statement (assignment (identifier_safe_stat_process) identifier_safe_stat_process (call (attribute (identifier_subprocess) identifier_subprocess (identifier_Popen) identifier_Popen )attribute (argument_list (identifier_cmd) identifier_cmd (keyword_argument (identifier_stdout) identifier_stdout (identifier_PIPE) identifier_PIPE )keyword_argument (keyword_argument (identifier_stderr) identifier_stderr (identifier_PIPE) identifier_PIPE )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier__results) identifier__results (call (attribute (identifier_safe_stat_process) identifier_safe_stat_process (identifier_communicate) identifier_communicate )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Stat thread finished') string_'Stat thread finished' )argument_list )call )expression_statement )block )function_definition (expression_statement (assignment (identifier_thread) identifier_thread (call (attribute (identifier_threading) identifier_threading (identifier_Thread) identifier_Thread )attribute (argument_list (keyword_argument (identifier_target) identifier_target (identifier_target) identifier_target )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_join) identifier_join )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call )expression_statement (if_statement (call (attribute (identifier_thread) identifier_thread (identifier_is_alive) identifier_is_alive )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_safe_stat_process) identifier_safe_stat_process (identifier_terminate) identifier_terminate )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (comparison_operator (attribute (identifier_safe_stat_process) identifier_safe_stat_process (identifier_returncode) identifier_returncode )attribute (integer_0) integer_0 )comparison_operator )return_statement )block )function_definition )module
Use threads and a subproc to bodge a timeout on top of filesystem access
(module (function_definition (function_name_rotateX) function_name_rotateX (parameters (identifier_self) identifier_self (identifier_angle) identifier_angle )parameters (block (expression_statement (assignment (identifier_rad) identifier_rad (binary_operator (binary_operator (identifier_angle) identifier_angle (attribute (identifier_math) identifier_math (identifier_pi) identifier_pi )attribute )binary_operator (integer_180) integer_180 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_cosa) identifier_cosa (call (attribute (identifier_math) identifier_math (identifier_cos) identifier_cos )attribute (argument_list (identifier_rad) identifier_rad )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sina) identifier_sina (call (attribute (identifier_math) identifier_math (identifier_sin) identifier_sin )attribute (argument_list (identifier_rad) identifier_rad )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y) identifier_y (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute (identifier_cosa) identifier_cosa )binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_z) identifier_z )attribute (identifier_sina) identifier_sina )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_z) identifier_z (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute (identifier_sina) identifier_sina )binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_z) identifier_z )attribute (identifier_cosa) identifier_cosa )binary_operator )binary_operator )assignment )expression_statement (return_statement (call (identifier_Point3D) identifier_Point3D (argument_list (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute (identifier_y) identifier_y (identifier_z) identifier_z )argument_list )call )return_statement )block )function_definition )module
Rotates the point around the X axis by the given angle in degrees.
(module (function_definition (function_name_missing) function_name_missing (parameters (identifier_self) identifier_self (identifier_dst) identifier_dst )parameters (block (for_statement (identifier_inst) identifier_inst (call (attribute (identifier_six) identifier_six (identifier_itervalues) identifier_itervalues )attribute (argument_list (identifier_dst) identifier_dst )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_inst) identifier_inst (identifier_status) identifier_status )attribute (identifier_REMOVED) identifier_REMOVED )comparison_operator (block (expression_statement (assignment (attribute (identifier_inst) identifier_inst (identifier_status) identifier_status )attribute (identifier_REMOVED) identifier_REMOVED )assignment )expression_statement (expression_statement (call (attribute (identifier_inst) identifier_inst (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Mark all missing plugins, that exists in database, but are not registered.
(module (function_definition (function_name_open) function_name_open (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (call (attribute (identifier_fits) identifier_fits (identifier_open) identifier_open )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_fname) identifier_fname )attribute (keyword_argument (identifier_mode) identifier_mode (string_'readonly') string_'readonly' )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_extn) identifier_extn )attribute (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_extn) identifier_extn )attribute )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_hdu) identifier_hdu (subscript (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (subscript (attribute (identifier_self) identifier_self (identifier_extn) identifier_extn )attribute (integer_0) integer_0 )subscript )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_hdu) identifier_hdu (subscript (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (subscript (attribute (identifier_self) identifier_self (identifier_extn) identifier_extn )attribute (integer_0) integer_0 )subscript (subscript (attribute (identifier_self) identifier_self (identifier_extn) identifier_extn )attribute (integer_1) integer_1 )subscript )subscript )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_hdu) identifier_hdu (subscript (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (integer_0) integer_0 )subscript )assignment )expression_statement )block )else_clause )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_hdu) identifier_hdu (attribute (attribute (attribute (identifier_fits) identifier_fits (identifier_hdu) identifier_hdu )attribute (identifier_compressed) identifier_compressed )attribute (identifier_CompImageHDU) identifier_CompImageHDU )attribute )argument_list )call (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_compress) identifier_compress )attribute (True) True )assignment )expression_statement )block )if_statement (return_statement (identifier_hdu) identifier_hdu )return_statement )block )function_definition )module
Opens the file for subsequent access.
(module (function_definition (function_name_setup_locale) function_name_setup_locale (parameters (typed_parameter (identifier_lc_all) identifier_lc_all (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_first_weekday) identifier_first_weekday (type (identifier_int) identifier_int )type (None) None )typed_default_parameter (keyword_separator )keyword_separator (typed_default_parameter (identifier_lc_collate) identifier_lc_collate (type (identifier_str) identifier_str )type (None) None )typed_default_parameter (typed_default_parameter (identifier_lc_ctype) identifier_lc_ctype (type (identifier_str) identifier_str )type (None) None )typed_default_parameter (typed_default_parameter (identifier_lc_messages) identifier_lc_messages (type (identifier_str) identifier_str )type (None) None )typed_default_parameter (typed_default_parameter (identifier_lc_monetary) identifier_lc_monetary (type (identifier_str) identifier_str )type (None) None )typed_default_parameter (typed_default_parameter (identifier_lc_numeric) identifier_lc_numeric (type (identifier_str) identifier_str )type (None) None )typed_default_parameter (typed_default_parameter (identifier_lc_time) identifier_lc_time (type (identifier_str) identifier_str )type (None) None )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (if_statement (comparison_operator (identifier_first_weekday) identifier_first_weekday (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_calendar) identifier_calendar (identifier_setfirstweekday) identifier_setfirstweekday )attribute (argument_list (identifier_first_weekday) identifier_first_weekday )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_locale) identifier_locale (identifier_setlocale) identifier_setlocale )attribute (argument_list (attribute (identifier_locale) identifier_locale (identifier_LC_COLLATE) identifier_LC_COLLATE )attribute (boolean_operator (identifier_lc_collate) identifier_lc_collate (identifier_lc_all) identifier_lc_all )boolean_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_locale) identifier_locale (identifier_setlocale) identifier_setlocale )attribute (argument_list (attribute (identifier_locale) identifier_locale (identifier_LC_CTYPE) identifier_LC_CTYPE )attribute (boolean_operator (identifier_lc_ctype) identifier_lc_ctype (identifier_lc_all) identifier_lc_all )boolean_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_locale) identifier_locale (identifier_setlocale) identifier_setlocale )attribute (argument_list (attribute (identifier_locale) identifier_locale (identifier_LC_MESSAGES) identifier_LC_MESSAGES )attribute (boolean_operator (identifier_lc_messages) identifier_lc_messages (identifier_lc_all) identifier_lc_all )boolean_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_locale) identifier_locale (identifier_setlocale) identifier_setlocale )attribute (argument_list (attribute (identifier_locale) identifier_locale (identifier_LC_MONETARY) identifier_LC_MONETARY )attribute (boolean_operator (identifier_lc_monetary) identifier_lc_monetary (identifier_lc_all) identifier_lc_all )boolean_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_locale) identifier_locale (identifier_setlocale) identifier_setlocale )attribute (argument_list (attribute (identifier_locale) identifier_locale (identifier_LC_NUMERIC) identifier_LC_NUMERIC )attribute (boolean_operator (identifier_lc_numeric) identifier_lc_numeric (identifier_lc_all) identifier_lc_all )boolean_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_locale) identifier_locale (identifier_setlocale) identifier_setlocale )attribute (argument_list (attribute (identifier_locale) identifier_locale (identifier_LC_TIME) identifier_LC_TIME )attribute (boolean_operator (identifier_lc_time) identifier_lc_time (identifier_lc_all) identifier_lc_all )boolean_operator )argument_list )call )expression_statement (return_statement (call (attribute (identifier_locale) identifier_locale (identifier_setlocale) identifier_setlocale )attribute (argument_list (attribute (identifier_locale) identifier_locale (identifier_LC_ALL) identifier_LC_ALL )attribute (identifier_lc_all) identifier_lc_all )argument_list )call )return_statement )block )function_definition )module
Shortcut helper to setup locale for backend application. :param lc_all: Locale to use. :param first_weekday: Weekday for start week. 0 for Monday, 6 for Sunday. By default: None :param lc_collate: Collate locale to use. By default: ``<lc_all>`` :param lc_ctype: Ctype locale to use. By default: ``<lc_all>`` :param lc_messages: Messages locale to use. By default: ``<lc_all>`` :param lc_monetary: Monetary locale to use. By default: ``<lc_all>`` :param lc_numeric: Numeric locale to use. By default: ``<lc_all>`` :param lc_time: Time locale to use. By default: ``<lc_all>``
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_revert) identifier_revert )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (attribute (identifier_errors) identifier_errors (identifier_ChangelistError) identifier_ChangelistError )attribute (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__connection) identifier__connection )attribute (identifier_run) identifier_run )attribute (argument_list (list (string_'change') string_'change' (string_'-d') string_'-d' (call (identifier_str) identifier_str (argument_list (attribute (identifier_self) identifier_self (identifier__change) identifier__change )attribute )argument_list )call )list )argument_list )call )expression_statement )block )function_definition )module
Reverts all files in this changelist then deletes the changelist from perforce
(module (function_definition (function_name_remove_mapping) function_name_remove_mapping (parameters (identifier_agent) identifier_agent (identifier_prefix) identifier_prefix (identifier_ip) identifier_ip )parameters (block (return_statement (call (identifier__broadcast) identifier__broadcast (argument_list (identifier_agent) identifier_agent (identifier_RemoveMappingManager) identifier_RemoveMappingManager (attribute (identifier_RecordType) identifier_RecordType (identifier_record_A) identifier_record_A )attribute (identifier_prefix) identifier_prefix (identifier_ip) identifier_ip )argument_list )call )return_statement )block )function_definition )module
Removes a mapping with a contract. It has high latency but gives some kind of guarantee.
(module (function_definition (function_name_register_directory) function_name_register_directory (parameters (identifier_self) identifier_self (identifier_directory) identifier_directory (identifier_parent) identifier_parent (default_parameter (identifier_ensure_uniqueness) identifier_ensure_uniqueness (False) False )default_parameter )parameters (block (if_statement (identifier_ensure_uniqueness) identifier_ensure_uniqueness (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_get_directory_nodes) identifier_get_directory_nodes )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call (block (raise_statement (call (attribute (attribute (identifier_foundations) identifier_foundations (identifier_exceptions) identifier_exceptions )attribute (identifier_ProgrammingError) identifier_ProgrammingError )attribute (argument_list (call (attribute (string_"{0} | '{1}' directory is already registered!") string_"{0} | '{1}' directory is already registered!" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (identifier_directory) identifier_directory )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )if_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"> Registering '{0}' directory.") string_"> Registering '{0}' directory." (identifier_format) identifier_format )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_row) identifier_row (call (attribute (identifier_parent) identifier_parent (identifier_children_count) identifier_children_count )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_beginInsertRows) identifier_beginInsertRows )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_node_index) identifier_get_node_index )attribute (argument_list (identifier_parent) identifier_parent )argument_list )call (identifier_row) identifier_row (identifier_row) identifier_row )argument_list )call )expression_statement (expression_statement (assignment (identifier_directory_node) identifier_directory_node (call (identifier_DirectoryNode) identifier_DirectoryNode (argument_list (keyword_argument (identifier_name) identifier_name (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )keyword_argument (keyword_argument (identifier_path) identifier_path (identifier_directory) identifier_directory )keyword_argument (keyword_argument (identifier_parent) identifier_parent (identifier_parent) identifier_parent )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_endInsertRows) identifier_endInsertRows )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_directory_registered) identifier_directory_registered )attribute (identifier_emit) identifier_emit )attribute (argument_list (identifier_directory_node) identifier_directory_node )argument_list )call )expression_statement (return_statement (identifier_directory_node) identifier_directory_node )return_statement )block )function_definition )module
Registers given directory in the Model. :param directory: Directory to register. :type directory: unicode :param parent: DirectoryNode parent. :type parent: GraphModelNode :param ensure_uniqueness: Ensure registrar uniqueness. :type ensure_uniqueness: bool :return: DirectoryNode. :rtype: DirectoryNode
(module (function_definition (function_name_logout) function_name_logout (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_flask_login) identifier_flask_login )dotted_name (dotted_name (identifier_logout_user) identifier_logout_user )dotted_name (dotted_name (identifier_current_user) identifier_current_user )dotted_name )import_from_statement (if_statement (not_operator (attribute (identifier_current_user) identifier_current_user (identifier_is_authenticated) identifier_is_authenticated )attribute )not_operator (block (return_statement (True) True )return_statement )block )if_statement (expression_statement (assignment (identifier_user) identifier_user (identifier_current_user) identifier_current_user )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_events) identifier_events (identifier_logout_event) identifier_logout_event )attribute (identifier_send) identifier_send )attribute (argument_list (identifier_user) identifier_user )argument_list )call )expression_statement (expression_statement (call (identifier_logout_user) identifier_logout_user (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_app) identifier_app (call (attribute (identifier_current_app) identifier_current_app (identifier__get_current_object) identifier__get_current_object )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_identity_changed) identifier_identity_changed (identifier_send) identifier_send )attribute (argument_list (identifier_app) identifier_app (keyword_argument (identifier_identity) identifier_identity (call (identifier_AnonymousIdentity) identifier_AnonymousIdentity (argument_list )argument_list )call )keyword_argument )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Logout user and emit event.
(module (function_definition (function_name__build) function_name__build (parameters (identifier_self) identifier_self (identifier_inputs) identifier_inputs (identifier_prev_state) identifier_prev_state )parameters (block (expression_statement (assignment (identifier_next_state) identifier_next_state (call (attribute (identifier_self) identifier_self (identifier__model) identifier__model )attribute (argument_list (identifier_prev_state) identifier_prev_state )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_next_state) identifier_next_state (identifier_next_state) identifier_next_state )expression_list )return_statement )block )function_definition )module
Connects the ModelRNN module into the graph. If this is not the first time the module has been connected to the graph, the Tensors provided as input_ and state must have the same final dimension, in order for the existing variables to be the correct size for their corresponding multiplications. The batch size may differ for each connection. Args: inputs: Tensor input to the ModelRNN (ignored). prev_state: Tensor of size `model.output_size`. Returns: output: Tensor of size `model.output_size`. next_state: Tensor of size `model.output_size`.
(module (function_definition (function_name_clear) function_name_clear (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_key) identifier_key (call (attribute (attribute (identifier_self) identifier_self (identifier_conn) identifier_conn )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conn) identifier_conn )attribute (identifier_delete) identifier_delete )attribute (argument_list (identifier_key) identifier_key )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Helper for clearing all the keys in a database. Use with caution!
(module (function_definition (function_name_push) function_name_push (parameters (identifier_self) identifier_self (identifier_read_time) identifier_read_time (identifier_next_resume_token) identifier_next_resume_token )parameters (block (expression_statement (assignment (pattern_list (identifier_deletes) identifier_deletes (identifier_adds) identifier_adds (identifier_updates) identifier_updates )pattern_list (call (attribute (identifier_Watch) identifier_Watch (identifier__extract_changes) identifier__extract_changes )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_doc_map) identifier_doc_map )attribute (attribute (identifier_self) identifier_self (identifier_change_map) identifier_change_map )attribute (identifier_read_time) identifier_read_time )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_updated_tree) identifier_updated_tree (identifier_updated_map) identifier_updated_map (identifier_appliedChanges) identifier_appliedChanges )pattern_list (call (attribute (identifier_self) identifier_self (identifier__compute_snapshot) identifier__compute_snapshot )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_doc_tree) identifier_doc_tree )attribute (attribute (identifier_self) identifier_self (identifier_doc_map) identifier_doc_map )attribute (identifier_deletes) identifier_deletes (identifier_adds) identifier_adds (identifier_updates) identifier_updates )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier_has_pushed) identifier_has_pushed )attribute )not_operator (call (identifier_len) identifier_len (argument_list (identifier_appliedChanges) identifier_appliedChanges )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_functools) identifier_functools (identifier_cmp_to_key) identifier_cmp_to_key )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__comparator) identifier__comparator )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_keys) identifier_keys (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_updated_tree) identifier_updated_tree (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__snapshot_callback) identifier__snapshot_callback )attribute (argument_list (identifier_keys) identifier_keys (identifier_appliedChanges) identifier_appliedChanges (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_fromtimestamp) identifier_fromtimestamp )attribute (argument_list (attribute (identifier_read_time) identifier_read_time (identifier_seconds) identifier_seconds )attribute (attribute (identifier_pytz) identifier_pytz (identifier_utc) identifier_utc )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_has_pushed) identifier_has_pushed )attribute (True) True )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_doc_tree) identifier_doc_tree )attribute (identifier_updated_tree) identifier_updated_tree )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_doc_map) identifier_doc_map )attribute (identifier_updated_map) identifier_updated_map )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_change_map) identifier_change_map )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_resume_token) identifier_resume_token )attribute (identifier_next_resume_token) identifier_next_resume_token )assignment )expression_statement )block )function_definition )module
Assembles a new snapshot from the current set of changes and invokes the user's callback. Clears the current changes on completion.
(module (function_definition (function_name_node_label_absent) function_name_node_label_absent (parameters (identifier_name) identifier_name (identifier_node) identifier_node (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'changes') string_'changes' (dictionary )dictionary )pair (pair (string_'result') string_'result' (False) False )pair (pair (string_'comment') string_'comment' (string_'') string_'' )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_labels) identifier_labels (call (subscript (identifier___salt__) identifier___salt__ (string_'kubernetes.node_labels') string_'kubernetes.node_labels' )subscript (argument_list (identifier_node) identifier_node (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_name) identifier_name (identifier_labels) identifier_labels )comparison_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (conditional_expression (True) True (not_operator (subscript (identifier___opts__) identifier___opts__ (string_'test') string_'test' )subscript )not_operator (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (string_'The label does not exist') string_'The label does not exist' )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )if_statement (if_statement (subscript (identifier___opts__) identifier___opts__ (string_'test') string_'test' )subscript (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (string_'The label is going to be deleted') string_'The label is going to be deleted' )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (None) None )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )if_statement (expression_statement (call (subscript (identifier___salt__) identifier___salt__ (string_'kubernetes.node_remove_label') string_'kubernetes.node_remove_label' )subscript (argument_list (keyword_argument (identifier_node_name) identifier_node_name (identifier_node) identifier_node )keyword_argument (keyword_argument (identifier_label_name) identifier_label_name (identifier_name) identifier_name )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (True) True )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'changes') string_'changes' )subscript (dictionary (pair (string_'kubernetes.node_label') string_'kubernetes.node_label' (dictionary (pair (string_'new') string_'new' (string_'absent') string_'absent' )pair (pair (string_'old') string_'old' (string_'present') string_'present' )pair )dictionary )pair )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (string_'Label removed from node') string_'Label removed from node' )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Ensures that the named label is absent from the node. name The name of the label node The name of the node
(module (function_definition (function_name_show_wbridges) function_name_show_wbridges (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_grp) identifier_grp (call (attribute (identifier_self) identifier_self (identifier_getPseudoBondGroup) identifier_getPseudoBondGroup )attribute (argument_list (binary_operator (string_"Water Bridges-%i") string_"Water Bridges-%i" (attribute (identifier_self) identifier_self (identifier_tid) identifier_tid )attribute )binary_operator (keyword_argument (identifier_associateWith) identifier_associateWith (list (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute )list )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_grp) identifier_grp (identifier_lineWidth) identifier_lineWidth )attribute (integer_3) integer_3 )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_wbridge) identifier_wbridge )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_plcomplex) identifier_plcomplex )attribute (identifier_waterbridges) identifier_waterbridges )attribute )argument_list )call (block (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_grp) identifier_grp (identifier_newPseudoBond) identifier_newPseudoBond )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_atoms) identifier_atoms )attribute (attribute (identifier_wbridge) identifier_wbridge (identifier_water_id) identifier_water_id )attribute )subscript (subscript (attribute (identifier_self) identifier_self (identifier_atoms) identifier_atoms )attribute (attribute (identifier_wbridge) identifier_wbridge (identifier_acc_id) identifier_acc_id )attribute )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_c) identifier_c (identifier_color) identifier_color )attribute (call (attribute (identifier_self) identifier_self (identifier_colorbyname) identifier_colorbyname )attribute (argument_list (string_'cornflower blue') string_'cornflower blue' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_water_ids) identifier_water_ids )attribute (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_wbridge) identifier_wbridge (identifier_water_id) identifier_water_id )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_b) identifier_b (call (attribute (identifier_grp) identifier_grp (identifier_newPseudoBond) identifier_newPseudoBond )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_atoms) identifier_atoms )attribute (attribute (identifier_wbridge) identifier_wbridge (identifier_don_id) identifier_don_id )attribute )subscript (subscript (attribute (identifier_self) identifier_self (identifier_atoms) identifier_atoms )attribute (attribute (identifier_wbridge) identifier_wbridge (identifier_water_id) identifier_water_id )attribute )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_b) identifier_b (identifier_color) identifier_color )attribute (call (attribute (identifier_self) identifier_self (identifier_colorbyname) identifier_colorbyname )attribute (argument_list (string_'cornflower blue') string_'cornflower blue' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_water_ids) identifier_water_ids )attribute (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_wbridge) identifier_wbridge (identifier_water_id) identifier_water_id )attribute )argument_list )call )expression_statement (if_statement (attribute (identifier_wbridge) identifier_wbridge (identifier_protisdon) identifier_protisdon )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_bs_res_ids) identifier_bs_res_ids )attribute (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_wbridge) identifier_wbridge (identifier_don_id) identifier_don_id )attribute )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_bs_res_ids) identifier_bs_res_ids )attribute (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_wbridge) identifier_wbridge (identifier_acc_id) identifier_acc_id )attribute )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Visualizes water bridges
(module (function_definition (function_name_get_snapshots_filename) function_name_get_snapshots_filename (parameters (identifier_impl) identifier_impl (identifier_working_dir) identifier_working_dir )parameters (block (expression_statement (assignment (identifier_snapshots_filename) identifier_snapshots_filename (binary_operator (call (attribute (identifier_impl) identifier_impl (identifier_get_virtual_chain_name) identifier_get_virtual_chain_name )attribute (argument_list )argument_list )call (string_".snapshots") string_".snapshots" )binary_operator )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_working_dir) identifier_working_dir (identifier_snapshots_filename) identifier_snapshots_filename )argument_list )call )return_statement )block )function_definition )module
Get the absolute path to the chain's consensus snapshots file.
(module (function_definition (function_name_name_to_system_object) function_name_name_to_system_object (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_name) identifier_name (identifier_str) identifier_str )argument_list )call (block (if_statement (attribute (identifier_self) identifier_self (identifier_allow_name_referencing) identifier_allow_name_referencing )attribute (block (expression_statement (assignment (identifier_name) identifier_name (identifier_name) identifier_name )assignment )expression_statement )block (else_clause (block (raise_statement (call (identifier_NameError) identifier_NameError (argument_list (string_'System.allow_name_referencing is set to False, cannot convert string to name') string_'System.allow_name_referencing is set to False, cannot convert string to name' )argument_list )call )raise_statement )block )else_clause )if_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_name) identifier_name (identifier_Object) identifier_Object )argument_list )call (block (expression_statement (assignment (identifier_name) identifier_name (call (identifier_str) identifier_str (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_namespace) identifier_namespace )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name (None) None )argument_list )call )return_statement )block )function_definition )module
Give SystemObject instance corresponding to the name
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_can_write) identifier__check_can_write )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_compressed) identifier_compressed (call (attribute (attribute (identifier_self) identifier_self (identifier__compressor) identifier__compressor )attribute (identifier_compress) identifier_compress )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__fp) identifier__fp )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_compressed) identifier_compressed )argument_list )call )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__pos) identifier__pos )attribute (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call )augmented_assignment )expression_statement (return_statement (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call )return_statement )block )function_definition )module
Write a bytes object to the file. Returns the number of uncompressed bytes written, which is always len(data). Note that due to buffering, the file on disk may not reflect the data written until close() is called.
(module (function_definition (function_name_get_all_subnets) function_name_get_all_subnets (parameters (identifier_self) identifier_self (default_parameter (identifier_subnet_ids) identifier_subnet_ids (None) None )default_parameter (default_parameter (identifier_filters) identifier_filters (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (if_statement (identifier_subnet_ids) identifier_subnet_ids (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_build_list_params) identifier_build_list_params )attribute (argument_list (identifier_params) identifier_params (identifier_subnet_ids) identifier_subnet_ids (string_'SubnetId') string_'SubnetId' )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_filters) identifier_filters (block (expression_statement (assignment (identifier_i) identifier_i (integer_1) integer_1 )assignment )expression_statement (for_statement (identifier_filter) identifier_filter (identifier_filters) identifier_filters (block (expression_statement (assignment (subscript (identifier_params) identifier_params (parenthesized_expression (binary_operator (string_'Filter.%d.Name') string_'Filter.%d.Name' (identifier_i) identifier_i )binary_operator )parenthesized_expression )subscript (subscript (identifier_filter) identifier_filter (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_params) identifier_params (parenthesized_expression (binary_operator (string_'Filter.%d.Value.1') string_'Filter.%d.Value.1' (identifier_i) identifier_i )binary_operator )parenthesized_expression )subscript (subscript (identifier_filter) identifier_filter (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (augmented_assignment (identifier_i) identifier_i (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_list) identifier_get_list )attribute (argument_list (string_'DescribeSubnets') string_'DescribeSubnets' (identifier_params) identifier_params (list (tuple (string_'item') string_'item' (identifier_Subnet) identifier_Subnet )tuple )list )argument_list )call )return_statement )block )function_definition )module
Retrieve information about your Subnets. You can filter results to return information only about those Subnets that match your search parameters. Otherwise, all Subnets associated with your account are returned. :type subnet_ids: list :param subnet_ids: A list of strings with the desired Subnet ID's :type filters: list of tuples :param filters: A list of tuples containing filters. Each tuple consists of a filter key and a filter value. Possible filter keys are: - *state*, the state of the Subnet (pending,available) - *vpdId*, the ID of teh VPC the subnet is in. - *cidrBlock*, CIDR block of the subnet - *availabilityZone*, the Availability Zone the subnet is in. :rtype: list :return: A list of :class:`boto.vpc.subnet.Subnet`
(module (function_definition (function_name_post) function_name_post (parameters (identifier_self) identifier_self (identifier_request) identifier_request (identifier_uri) identifier_uri )parameters (block (expression_statement (assignment (identifier_uri) identifier_uri (call (attribute (identifier_self) identifier_self (identifier_decode_uri) identifier_decode_uri )attribute (argument_list (identifier_uri) identifier_uri )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_data) identifier_data (identifier_meta) identifier_meta )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_post_data) identifier_get_post_data )attribute (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_meta) identifier_meta (string_'author') string_'author' )subscript (call (attribute (identifier_auth) identifier_auth (identifier_get_username) identifier_get_username )attribute (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_node) identifier_node (call (attribute (identifier_cio) identifier_cio (identifier_set) identifier_set )attribute (argument_list (identifier_uri) identifier_uri (identifier_data) identifier_data (keyword_argument (identifier_publish) identifier_publish (False) False )keyword_argument (dictionary_splat (identifier_meta) identifier_meta )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_render_to_json) identifier_render_to_json )attribute (argument_list (identifier_node) identifier_node )argument_list )call )return_statement )block )function_definition )module
Set node data for uri, return rendered content. JSON Response: {uri: x, content: y}
(module (function_definition (function_name_copy) function_name_copy (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_object_getattr) identifier_object_getattr )attribute (attribute (identifier_Query) identifier_Query (identifier_object_getattr) identifier_object_getattr )attribute )comparison_operator (block (expression_statement (assignment (identifier_other) identifier_other (call (identifier_Query) identifier_Query (argument_list (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_other) identifier_other (call (identifier_Query) identifier_Query (argument_list (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (keyword_argument (identifier_object_getattr) identifier_object_getattr (attribute (identifier_self) identifier_self (identifier_object_getattr) identifier_object_getattr )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_other) identifier_other (identifier_limit) identifier_limit )attribute (attribute (identifier_self) identifier_self (identifier_limit) identifier_limit )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_other) identifier_other (identifier_offset) identifier_offset )attribute (attribute (identifier_self) identifier_self (identifier_offset) identifier_offset )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_other) identifier_other (identifier_offset_key) identifier_offset_key )attribute (attribute (identifier_self) identifier_self (identifier_offset_key) identifier_offset_key )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_other) identifier_other (identifier_filters) identifier_filters )attribute (attribute (identifier_self) identifier_self (identifier_filters) identifier_filters )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_other) identifier_other (identifier_orders) identifier_orders )attribute (attribute (identifier_self) identifier_self (identifier_orders) identifier_orders )attribute )assignment )expression_statement (return_statement (identifier_other) identifier_other )return_statement )block )function_definition )module
Returns a copy of this query.
(module (function_definition (function_name_create) function_name_create (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_api) identifier_api (attribute (attribute (attribute (identifier_self) identifier_self (identifier__instance) identifier__instance )attribute (identifier__client) identifier__client )attribute (identifier_database_admin_api) identifier_database_admin_api )attribute )assignment )expression_statement (expression_statement (assignment (identifier_metadata) identifier_metadata (call (identifier__metadata_with_prefix) identifier__metadata_with_prefix (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_db_name) identifier_db_name (attribute (identifier_self) identifier_self (identifier_database_id) identifier_database_id )attribute )assignment )expression_statement (if_statement (comparison_operator (string_"-") string_"-" (identifier_db_name) identifier_db_name )comparison_operator (block (expression_statement (assignment (identifier_db_name) identifier_db_name (binary_operator (string_"`%s`") string_"`%s`" (tuple (identifier_db_name) identifier_db_name )tuple )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_future) identifier_future (call (attribute (identifier_api) identifier_api (identifier_create_database) identifier_create_database )attribute (argument_list (keyword_argument (identifier_parent) identifier_parent (attribute (attribute (identifier_self) identifier_self (identifier__instance) identifier__instance )attribute (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_create_statement) identifier_create_statement (binary_operator (string_"CREATE DATABASE %s") string_"CREATE DATABASE %s" (tuple (identifier_db_name) identifier_db_name )tuple )binary_operator )keyword_argument (keyword_argument (identifier_extra_statements) identifier_extra_statements (call (identifier_list) identifier_list (argument_list (attribute (identifier_self) identifier_self (identifier__ddl_statements) identifier__ddl_statements )attribute )argument_list )call )keyword_argument (keyword_argument (identifier_metadata) identifier_metadata (identifier_metadata) identifier_metadata )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_future) identifier_future )return_statement )block )function_definition )module
Create this database within its instance Inclues any configured schema assigned to :attr:`ddl_statements`. See https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.database.v1#google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase :rtype: :class:`~google.api_core.operation.Operation` :returns: a future used to poll the status of the create request :raises Conflict: if the database already exists :raises NotFound: if the instance owning the database does not exist
(module (function_definition (function_name_isPeregrine) function_name_isPeregrine (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_isPeregrine) identifier_isPeregrine (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_obj) identifier_obj )attribute (identifier_id) identifier_id )attribute (attribute (attribute (identifier_self) identifier_self (identifier_obj) identifier_obj )attribute (identifier_sign) identifier_sign )attribute (attribute (attribute (identifier_self) identifier_self (identifier_obj) identifier_obj )attribute (identifier_signlon) identifier_signlon )attribute )argument_list )call )return_statement )block )function_definition )module
Returns if this object is peregrine.
(module (function_definition (function_name__management_form) function_name__management_form (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_is_bound) identifier_is_bound )attribute (block (expression_statement (assignment (identifier_form) identifier_form (call (identifier_ConcurrentManagementForm) identifier_ConcurrentManagementForm (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (keyword_argument (identifier_auto_id) identifier_auto_id (attribute (identifier_self) identifier_self (identifier_auto_id) identifier_auto_id )attribute )keyword_argument (keyword_argument (identifier_prefix) identifier_prefix (attribute (identifier_self) identifier_self (identifier_prefix) identifier_prefix )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_form) identifier_form (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (identifier_ValidationError) identifier_ValidationError (argument_list (string_'ManagementForm data is missing or has been tampered with') string_'ManagementForm data is missing or has been tampered with' )argument_list )call )raise_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (identifier_form) identifier_form (call (identifier_ConcurrentManagementForm) identifier_ConcurrentManagementForm (argument_list (keyword_argument (identifier_auto_id) identifier_auto_id (attribute (identifier_self) identifier_self (identifier_auto_id) identifier_auto_id )attribute )keyword_argument (keyword_argument (identifier_prefix) identifier_prefix (attribute (identifier_self) identifier_self (identifier_prefix) identifier_prefix )attribute )keyword_argument (keyword_argument (identifier_initial) identifier_initial (dictionary (pair (identifier_TOTAL_FORM_COUNT) identifier_TOTAL_FORM_COUNT (call (attribute (identifier_self) identifier_self (identifier_total_form_count) identifier_total_form_count )attribute (argument_list )argument_list )call )pair (pair (identifier_INITIAL_FORM_COUNT) identifier_INITIAL_FORM_COUNT (call (attribute (identifier_self) identifier_self (identifier_initial_form_count) identifier_initial_form_count )attribute (argument_list )argument_list )call )pair (pair (identifier_MAX_NUM_FORM_COUNT) identifier_MAX_NUM_FORM_COUNT (attribute (identifier_self) identifier_self (identifier_max_num) identifier_max_num )attribute )pair )dictionary )keyword_argument (keyword_argument (identifier_versions) identifier_versions (list_comprehension (tuple (attribute (attribute (identifier_form) identifier_form (identifier_instance) identifier_instance )attribute (identifier_pk) identifier_pk )attribute (call (identifier_get_revision_of_object) identifier_get_revision_of_object (argument_list (attribute (identifier_form) identifier_form (identifier_instance) identifier_instance )attribute )argument_list )call )tuple (for_in_clause (identifier_form) identifier_form (attribute (identifier_self) identifier_self (identifier_initial_forms) identifier_initial_forms )attribute )for_in_clause )list_comprehension )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_form) identifier_form )return_statement )block )function_definition )module
Returns the ManagementForm instance for this FormSet.
(module (function_definition (function_name__match_depth) function_name__match_depth (parameters (identifier_self) identifier_self (identifier_sect) identifier_sect (identifier_depth) identifier_depth )parameters (block (while_statement (comparison_operator (identifier_depth) identifier_depth (attribute (identifier_sect) identifier_sect (identifier_depth) identifier_depth )attribute )comparison_operator (block (if_statement (comparison_operator (identifier_sect) identifier_sect (attribute (identifier_sect) identifier_sect (identifier_parent) identifier_parent )attribute )comparison_operator (block (raise_statement (call (identifier_SyntaxError) identifier_SyntaxError (argument_list )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_sect) identifier_sect (attribute (identifier_sect) identifier_sect (identifier_parent) identifier_parent )attribute )assignment )expression_statement )block )while_statement (if_statement (comparison_operator (attribute (identifier_sect) identifier_sect (identifier_depth) identifier_depth )attribute (identifier_depth) identifier_depth )comparison_operator (block (return_statement (identifier_sect) identifier_sect )return_statement )block )if_statement (raise_statement (call (identifier_SyntaxError) identifier_SyntaxError (argument_list )argument_list )call )raise_statement )block )function_definition )module
Given a section and a depth level, walk back through the sections parents to see if the depth level matches a previous section. Return a reference to the right section, or raise a SyntaxError.
(module (function_definition (function_name_list_firmware_manifests) function_name_list_firmware_manifests (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (identifier_self) identifier_self (identifier__verify_sort_options) identifier__verify_sort_options )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (identifier_self) identifier_self (identifier__verify_filters) identifier__verify_filters )attribute (argument_list (identifier_kwargs) identifier_kwargs (identifier_FirmwareManifest) identifier_FirmwareManifest (True) True )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_api) identifier_api (call (attribute (identifier_self) identifier_self (identifier__get_api) identifier__get_api )attribute (argument_list (attribute (identifier_update_service) identifier_update_service (identifier_DefaultApi) identifier_DefaultApi )attribute )argument_list )call )assignment )expression_statement (return_statement (call (identifier_PaginatedResponse) identifier_PaginatedResponse (argument_list (attribute (identifier_api) identifier_api (identifier_firmware_manifest_list) identifier_firmware_manifest_list )attribute (keyword_argument (identifier_lwrap_type) identifier_lwrap_type (identifier_FirmwareManifest) identifier_FirmwareManifest )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
List all manifests. :param int limit: number of manifests to retrieve :param str order: sort direction of manifests when ordered by time. 'desc' or 'asc' :param str after: get manifests after given `image_id` :param dict filters: Dictionary of filters to apply :return: list of :py:class:`FirmwareManifest` objects :rtype: PaginatedResponse
(module (function_definition (function_name__consent_registration) function_name__consent_registration (parameters (identifier_self) identifier_self (identifier_consent_args) identifier_consent_args )parameters (block (expression_statement (assignment (identifier_jws) identifier_jws (call (attribute (call (identifier_JWS) identifier_JWS (argument_list (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_consent_args) identifier_consent_args )argument_list )call (keyword_argument (identifier_alg) identifier_alg (attribute (attribute (identifier_self) identifier_self (identifier_signing_key) identifier_signing_key )attribute (identifier_alg) identifier_alg )attribute )keyword_argument )argument_list )call (identifier_sign_compact) identifier_sign_compact )attribute (argument_list (list (attribute (identifier_self) identifier_self (identifier_signing_key) identifier_signing_key )attribute )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_request) identifier_request (call (attribute (string_"{}/creq/{}") string_"{}/creq/{}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_api_url) identifier_api_url )attribute (identifier_jws) identifier_jws )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_res) identifier_res (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (block (raise_statement (call (identifier_UnexpectedResponseError) identifier_UnexpectedResponseError (argument_list (string_"Consent service error: %s %s") string_"Consent service error: %s %s" (attribute (identifier_res) identifier_res (identifier_status_code) identifier_status_code )attribute (attribute (identifier_res) identifier_res (identifier_text) identifier_text )attribute )argument_list )call )raise_statement )block )if_statement (return_statement (attribute (identifier_res) identifier_res (identifier_text) identifier_text )attribute )return_statement )block )function_definition )module
Register a request at the consent service :type consent_args: dict :rtype: str :param consent_args: All necessary parameters for the consent request :return: Ticket received from the consent service
(module (function_definition (function_name_container_exists) function_name_container_exists (parameters (identifier_self) identifier_self (default_parameter (identifier_id) identifier_id (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_exists) identifier_exists (False) False )assignment )expression_statement (if_statement (boolean_operator (identifier_id) identifier_id (call (attribute (identifier_self) identifier_self (identifier_container_by_id) identifier_container_by_id )attribute (argument_list (identifier_id) identifier_id )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_exists) identifier_exists (True) True )assignment )expression_statement )block (elif_clause (boolean_operator (identifier_name) identifier_name (call (attribute (identifier_self) identifier_self (identifier_container_by_name) identifier_container_by_name )attribute (argument_list (identifier_name) identifier_name )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_exists) identifier_exists (True) True )assignment )expression_statement )block )elif_clause )if_statement (return_statement (identifier_exists) identifier_exists )return_statement )block )function_definition )module
Checks if container exists already
(module (function_definition (function_name__load_dataframe) function_name__load_dataframe (parameters (identifier_self) identifier_self (identifier_resource_name) identifier_resource_name )parameters (block (try_statement (block (import_statement (dotted_name (identifier_pandas) identifier_pandas )dotted_name )import_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (concatenated_string (string_'To enable dataframe support, ') string_'To enable dataframe support, ' (string_'run \'pip install datadotworld[pandas]\'') string_'run \'pip install datadotworld[pandas]\'' )concatenated_string )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_tabular_resource) identifier_tabular_resource (subscript (attribute (identifier_self) identifier_self (identifier___tabular_resources) identifier___tabular_resources )attribute (identifier_resource_name) identifier_resource_name )subscript )assignment )expression_statement (expression_statement (assignment (identifier_field_dtypes) identifier_field_dtypes (call (identifier_fields_to_dtypes) identifier_fields_to_dtypes (argument_list (subscript (attribute (identifier_tabular_resource) identifier_tabular_resource (identifier_descriptor) identifier_descriptor )attribute (string_'schema') string_'schema' )subscript )argument_list )call )assignment )expression_statement (try_statement (block (return_statement (call (attribute (identifier_pandas) identifier_pandas (identifier_read_csv) identifier_read_csv )attribute (argument_list (call (attribute (identifier_path) identifier_path (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___base_path) identifier___base_path )attribute (subscript (attribute (identifier_tabular_resource) identifier_tabular_resource (identifier_descriptor) identifier_descriptor )attribute (string_'path') string_'path' )subscript )argument_list )call (keyword_argument (identifier_dtype) identifier_dtype (subscript (identifier_field_dtypes) identifier_field_dtypes (string_'other') string_'other' )subscript )keyword_argument (keyword_argument (identifier_parse_dates) identifier_parse_dates (call (identifier_list) identifier_list (argument_list (call (attribute (subscript (identifier_field_dtypes) identifier_field_dtypes (string_'dates') string_'dates' )subscript (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )keyword_argument (keyword_argument (identifier_infer_datetime_format) identifier_infer_datetime_format (True) True )keyword_argument )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_ValueError) identifier_ValueError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (call (attribute (concatenated_string (string_'Unable to set data frame dtypes automatically using {} ') string_'Unable to set data frame dtypes automatically using {} ' (string_'schema. Data types may need to be adjusted manually. ') string_'schema. Data types may need to be adjusted manually. ' (string_'Error: {}') string_'Error: {}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_resource_name) identifier_resource_name (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (identifier_pandas) identifier_pandas (identifier_read_csv) identifier_read_csv )attribute (argument_list (call (attribute (identifier_path) identifier_path (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___base_path) identifier___base_path )attribute (subscript (attribute (identifier_tabular_resource) identifier_tabular_resource (identifier_descriptor) identifier_descriptor )attribute (string_'path') string_'path' )subscript )argument_list )call )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Build pandas.DataFrame from resource data Lazy load any optional dependencies in order to allow users to use package without installing pandas if so they wish. :param resource_name:
(module (function_definition (function_name__build_query_string) function_name__build_query_string (parameters (identifier_q) identifier_q (default_parameter (identifier_default_field) identifier_default_field (None) None )default_parameter (default_parameter (identifier_default_operator) identifier_default_operator (string_'AND') string_'AND' )default_parameter )parameters (block (function_definition (function_name__is_phrase_search) function_name__is_phrase_search (parameters (identifier_query_string) identifier_query_string )parameters (block (expression_statement (assignment (identifier_clean_query) identifier_clean_query (call (attribute (identifier_query_string) identifier_query_string (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (boolean_operator (boolean_operator (identifier_clean_query) identifier_clean_query (call (attribute (identifier_clean_query) identifier_clean_query (identifier_startswith) identifier_startswith )attribute (argument_list (string_'"') string_'"' )argument_list )call )boolean_operator (call (attribute (identifier_clean_query) identifier_clean_query (identifier_endswith) identifier_endswith )attribute (argument_list (string_'"') string_'"' )argument_list )call )boolean_operator )return_statement )block )function_definition (function_definition (function_name__get_phrase) function_name__get_phrase (parameters (identifier_query_string) identifier_query_string )parameters (block (return_statement (call (attribute (call (attribute (identifier_query_string) identifier_query_string (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list (string_'"') string_'"' )argument_list )call )return_statement )block )function_definition (if_statement (call (identifier__is_phrase_search) identifier__is_phrase_search (argument_list (identifier_q) identifier_q )argument_list )call (block (expression_statement (assignment (identifier_query) identifier_query (dictionary (pair (string_'match_phrase') string_'match_phrase' (dictionary (pair (string_'_all') string_'_all' (call (identifier__get_phrase) identifier__get_phrase (argument_list (identifier_q) identifier_q )argument_list )call )pair )dictionary )pair )dictionary )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_query) identifier_query (dictionary (pair (string_'query_string') string_'query_string' (dictionary (pair (string_'query') string_'query' (identifier_q) identifier_q )pair (pair (string_'default_operator') string_'default_operator' (identifier_default_operator) identifier_default_operator )pair )dictionary )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (subscript (identifier_query) identifier_query (string_'query_string') string_'query_string' )subscript (identifier_update) identifier_update )attribute (argument_list (conditional_expression (dictionary (pair (string_'lenient') string_'lenient' (False) False )pair )dictionary (identifier_default_field) identifier_default_field (dictionary (pair (string_'default_field') string_'default_field' (identifier_default_field) identifier_default_field )pair )dictionary )conditional_expression )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_query) identifier_query )return_statement )block )function_definition )module
Build ``query_string`` object from ``q``. :param q: q of type String :param default_field: default_field :return: dictionary object.
(module (function_definition (function_name__comic_archive_write_zipfile) function_name__comic_archive_write_zipfile (parameters (identifier_new_filename) identifier_new_filename (identifier_tmp_dir) identifier_tmp_dir )parameters (block (if_statement (attribute (identifier_Settings) identifier_Settings (identifier_verbose) identifier_verbose )attribute (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Rezipping archive') string_'Rezipping archive' (keyword_argument (identifier_end) identifier_end (string_'') string_'' )keyword_argument )argument_list )call )expression_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_zipfile) identifier_zipfile (identifier_ZipFile) identifier_ZipFile )attribute (argument_list (identifier_new_filename) identifier_new_filename (string_'w') string_'w' (keyword_argument (identifier_compression) identifier_compression (attribute (identifier_zipfile) identifier_zipfile (identifier_ZIP_DEFLATED) identifier_ZIP_DEFLATED )attribute )keyword_argument )argument_list )call (as_pattern_target (identifier_new_zf) identifier_new_zf )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_root_len) identifier_root_len (call (identifier_len) identifier_len (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_tmp_dir) identifier_tmp_dir )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (identifier_r_d_f) identifier_r_d_f (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_tmp_dir) identifier_tmp_dir )argument_list )call (block (expression_statement (assignment (identifier_root) identifier_root (subscript (identifier_r_d_f) identifier_r_d_f (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_filenames) identifier_filenames (subscript (identifier_r_d_f) identifier_r_d_f (integer_2) integer_2 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_archive_root) identifier_archive_root (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_root) identifier_root )argument_list )call (slice (identifier_root_len) identifier_root_len (colon) colon )slice )subscript )assignment )expression_statement (for_statement (identifier_fname) identifier_fname (identifier_filenames) identifier_filenames (block (expression_statement (assignment (identifier_fullpath) identifier_fullpath (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_root) identifier_root (identifier_fname) identifier_fname )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_archive_name) identifier_archive_name (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_archive_root) identifier_archive_root (identifier_fname) identifier_fname )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_Settings) identifier_Settings (identifier_verbose) identifier_verbose )attribute (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'.') string_'.' (keyword_argument (identifier_end) identifier_end (string_'') string_'' )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_new_zf) identifier_new_zf (identifier_write) identifier_write )attribute (argument_list (identifier_fullpath) identifier_fullpath (identifier_archive_name) identifier_archive_name (attribute (identifier_zipfile) identifier_zipfile (identifier_ZIP_DEFLATED) identifier_ZIP_DEFLATED )attribute )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )with_statement )block )function_definition )module
Zip up the files in the tempdir into the new filename.
(module (function_definition (function_name_read_transport) function_name_read_transport (parameters (identifier_self) identifier_self )parameters (block (if_statement (parenthesized_expression (comparison_operator (string_'r') string_'r' (attribute (identifier_self) identifier_self (identifier_access_type) identifier_access_type )attribute )comparison_operator )parenthesized_expression (block (raise_statement (identifier_BTIncompatibleTransportAccessType) identifier_BTIncompatibleTransportAccessType )raise_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_codec) identifier_codec )attribute (identifier_decode) identifier_decode )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_fd) identifier_fd )attribute (attribute (identifier_self) identifier_self (identifier_read_mtu) identifier_read_mtu )attribute )argument_list )call )return_statement )block )function_definition )module
Read data from media transport. The returned data payload is SBC decoded and has all RTP encapsulation removed. :return data: Payload data that has been decoded, with RTP encapsulation removed. :rtype: array{byte}
(module (function_definition (function_name_add_options) function_name_add_options (parameters (identifier_self) identifier_self (typed_parameter (identifier_path) identifier_path (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_handler) identifier_handler (type (identifier__WebHandler) identifier__WebHandler )type )typed_parameter (typed_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern (type (identifier_Any) identifier_Any )type )typed_parameter )parameters (type (identifier_AbstractRoute) identifier_AbstractRoute )type (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_add_route) identifier_add_route )attribute (argument_list (attribute (identifier_hdrs) identifier_hdrs (identifier_METH_OPTIONS) identifier_METH_OPTIONS )attribute (identifier_path) identifier_path (identifier_handler) identifier_handler (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Shortcut for add_route with method OPTIONS
(module (function_definition (function_name_build_model_input) function_name_build_model_input (parameters (identifier_cls) identifier_cls (default_parameter (identifier_name) identifier_name (string_'input') string_'input' )default_parameter )parameters (block (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_name) identifier_name (attribute (identifier_PortDirection) identifier_PortDirection (identifier_INPUT) identifier_INPUT )attribute (keyword_argument (identifier_type) identifier_type (attribute (identifier_PortType) identifier_PortType (identifier_MODEL) identifier_MODEL )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Build a model input port. :param name: port name :type name: str :return: port object :rtype: PortDef
(module (function_definition (function_name_format_hsl) function_name_format_hsl (parameters (identifier_hsl_color) identifier_hsl_color )parameters (block (expression_statement (assignment (pattern_list (identifier_hue) identifier_hue (identifier_saturation) identifier_saturation (identifier_lightness) identifier_lightness )pattern_list (identifier_hsl_color) identifier_hsl_color )assignment )expression_statement (return_statement (call (attribute (string_'hsl({}, {:.2%}, {:.2%})') string_'hsl({}, {:.2%}, {:.2%})' (identifier_format) identifier_format )attribute (argument_list (identifier_hue) identifier_hue (identifier_saturation) identifier_saturation (identifier_lightness) identifier_lightness )argument_list )call )return_statement )block )function_definition )module
Format hsl color as css color string.
(module (function_definition (function_name_results) function_name_results (parameters (identifier_self) identifier_self (identifier_Pc) identifier_Pc )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_Psatn) identifier_Psatn (comparison_operator (subscript (identifier_self) identifier_self (string_'pore.invasion_pressure') string_'pore.invasion_pressure' )subscript (identifier_Pc) identifier_Pc )comparison_operator )assignment )expression_statement (expression_statement (assignment (identifier_Tsatn) identifier_Tsatn (comparison_operator (subscript (identifier_self) identifier_self (string_'throat.invasion_pressure') string_'throat.invasion_pressure' )subscript (identifier_Pc) identifier_Pc )comparison_operator )assignment )expression_statement (expression_statement (assignment (identifier_inv_phase) identifier_inv_phase (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_inv_phase) identifier_inv_phase (string_'pore.occupancy') string_'pore.occupancy' )subscript (call (attribute (identifier_sp) identifier_sp (identifier_array) identifier_array )attribute (argument_list (identifier_Psatn) identifier_Psatn (keyword_argument (identifier_dtype) identifier_dtype (identifier_float) identifier_float )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_inv_phase) identifier_inv_phase (string_'throat.occupancy') string_'throat.occupancy' )subscript (call (attribute (identifier_sp) identifier_sp (identifier_array) identifier_array )attribute (argument_list (identifier_Tsatn) identifier_Tsatn (keyword_argument (identifier_dtype) identifier_dtype (identifier_float) identifier_float )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_inv_phase) identifier_inv_phase )return_statement )block )function_definition )module
r""" This method determines which pores and throats are filled with invading phase at the specified capillary pressure, and creates several arrays indicating the occupancy status of each pore and throat for the given pressure. Parameters ---------- Pc : scalar The capillary pressure for which an invading phase configuration is desired. Returns ------- A dictionary containing an assortment of data about distribution of the invading phase at the specified capillary pressure. The data include: **'pore.occupancy'** : A value between 0 and 1 indicating the fractional volume of each pore that is invaded. If no late pore filling model was applied, then this will only be integer values (either filled or not). **'throat.occupancy'** : The same as 'pore.occupancy' but for throats. This dictionary can be passed directly to the ``update`` method of the *Phase* object. These values can then be accessed by models or algorithms.
(module (function_definition (function_name_downloads_per_day) function_name_downloads_per_day (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_count) identifier_count (identifier_num_days) identifier_num_days )pattern_list (call (attribute (identifier_self) identifier_self (identifier__downloads_for_num_days) identifier__downloads_for_num_days )attribute (argument_list (integer_7) integer_7 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (identifier_ceil) identifier_ceil (argument_list (binary_operator (identifier_count) identifier_count (identifier_num_days) identifier_num_days )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Downloads per day = (%d / %d) = %d") string_"Downloads per day = (%d / %d) = %d" (identifier_count) identifier_count (identifier_num_days) identifier_num_days (identifier_res) identifier_res )argument_list )call )expression_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Return the number of downloads per day, averaged over the past 7 days of data. :return: average number of downloads per day :rtype: int
(module (function_definition (function_name__calculate_weights) function_name__calculate_weights (parameters (identifier_self) identifier_self (identifier_this_samples) identifier_this_samples (identifier_N) identifier_N )parameters (block (expression_statement (assignment (identifier_this_weights) identifier_this_weights (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_weights) identifier_weights )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_N) identifier_N )argument_list )call (slice (colon) colon )slice (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_target_values) identifier_target_values )attribute (None) None )comparison_operator (block (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_N) identifier_N )argument_list )call (block (expression_statement (assignment (identifier_tmp) identifier_tmp (binary_operator (call (attribute (identifier_self) identifier_self (identifier_target) identifier_target )attribute (argument_list (subscript (identifier_this_samples) identifier_this_samples (identifier_i) identifier_i )subscript )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_proposal) identifier_proposal )attribute (identifier_evaluate) identifier_evaluate )attribute (argument_list (subscript (identifier_this_samples) identifier_this_samples (identifier_i) identifier_i )subscript )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_this_weights) identifier_this_weights (identifier_i) identifier_i )subscript (call (identifier__exp) identifier__exp (argument_list (identifier_tmp) identifier_tmp )argument_list )call )assignment )expression_statement )block )for_statement )block (else_clause (block (expression_statement (assignment (identifier_this_target_values) identifier_this_target_values (call (attribute (attribute (identifier_self) identifier_self (identifier_target_values) identifier_target_values )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_N) identifier_N )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_N) identifier_N )argument_list )call (block (expression_statement (assignment (subscript (identifier_this_target_values) identifier_this_target_values (identifier_i) identifier_i )subscript (call (attribute (identifier_self) identifier_self (identifier_target) identifier_target )attribute (argument_list (subscript (identifier_this_samples) identifier_this_samples (identifier_i) identifier_i )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tmp) identifier_tmp (binary_operator (subscript (identifier_this_target_values) identifier_this_target_values (identifier_i) identifier_i )subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_proposal) identifier_proposal )attribute (identifier_evaluate) identifier_evaluate )attribute (argument_list (subscript (identifier_this_samples) identifier_this_samples (identifier_i) identifier_i )subscript )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_this_weights) identifier_this_weights (identifier_i) identifier_i )subscript (call (identifier__exp) identifier__exp (argument_list (identifier_tmp) identifier_tmp )argument_list )call )assignment )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Calculate and save the weights of a run.