sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_auth_token) function_name_auth_token (parameters (identifier_cls) identifier_cls (identifier_token) identifier_token )parameters (block (expression_statement (assignment (identifier_store) identifier_store (attribute (attribute (identifier_goldman) identifier_goldman (identifier_sess) identifier_sess )attribute (identifier_store) identifier_store )attribute )assignment )expression_statement (expression_statement (assignment (identifier_login) identifier_login (call (attribute (identifier_store) identifier_store (identifier_find) identifier_find )attribute (argument_list (attribute (identifier_cls) identifier_cls (identifier_RTYPE) identifier_RTYPE )attribute (string_'token') string_'token' (identifier_token) identifier_token )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_login) identifier_login )not_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (string_'No login found with that token. It may have been revoked.') string_'No login found with that token. It may have been revoked.' )assignment )expression_statement (raise_statement (call (identifier_AuthRejected) identifier_AuthRejected (argument_list (dictionary_splat (dictionary (pair (string_'detail') string_'detail' (identifier_msg) identifier_msg )pair )dictionary )dictionary_splat )argument_list )call )raise_statement )block (elif_clause (attribute (identifier_login) identifier_login (identifier_locked) identifier_locked )attribute (block (expression_statement (assignment (identifier_msg) identifier_msg (string_'The login account is currently locked out.') string_'The login account is currently locked out.' )assignment )expression_statement (raise_statement (call (identifier_AuthRejected) identifier_AuthRejected (argument_list (dictionary_splat (dictionary (pair (string_'detail') string_'detail' (identifier_msg) identifier_msg )pair )dictionary )dictionary_splat )argument_list )call )raise_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_login) identifier_login (identifier_post_authenticate) identifier_post_authenticate )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Callback method for OAuth 2.0 bearer token middleware
(module (function_definition (function_name_set_exception) function_name_set_exception (parameters (identifier_self) identifier_self (identifier_exception) identifier_exception )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_exception) identifier_exception (identifier_Exception) identifier_Exception )argument_list )call (binary_operator (string_"%r should be an Exception") string_"%r should be an Exception" (identifier_exception) identifier_exception )binary_operator )assert_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__exception) identifier__exception )attribute (identifier_exception) identifier_exception )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__state) identifier__state )attribute (attribute (identifier_self) identifier_self (identifier_FINISHED) identifier_FINISHED )attribute )assignment )expression_statement )block )function_definition )module
Sets the result of the future as being the given exception. Should only be used by Task and unit tests.
(module (function_definition (function_name_kth_to_last_dict) function_name_kth_to_last_dict (parameters (identifier_head) identifier_head (identifier_k) identifier_k )parameters (block (if_statement (not_operator (parenthesized_expression (boolean_operator (identifier_head) identifier_head (comparison_operator (identifier_k) identifier_k (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator )boolean_operator )parenthesized_expression )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_d) identifier_d (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_count) identifier_count (integer_0) integer_0 )assignment )expression_statement (while_statement (identifier_head) identifier_head (block (expression_statement (assignment (subscript (identifier_d) identifier_d (identifier_count) identifier_count )subscript (identifier_head) identifier_head )assignment )expression_statement (expression_statement (assignment (identifier_head) identifier_head (attribute (identifier_head) identifier_head (identifier_next) identifier_next )attribute )assignment )expression_statement (expression_statement (augmented_assignment (identifier_count) identifier_count (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (return_statement (boolean_operator (comparison_operator (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_d) identifier_d )argument_list )call (identifier_k) identifier_k )binary_operator (identifier_d) identifier_d )comparison_operator (subscript (identifier_d) identifier_d (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_d) identifier_d )argument_list )call (identifier_k) identifier_k )binary_operator )subscript )boolean_operator )return_statement )block )function_definition )module
This is a brute force method where we keep a dict the size of the list Then we check it for the value we need. If the key is not in the dict, our and statement will short circuit and return False
(module (function_definition (function_name__load_data) function_name__load_data (parameters )parameters (block (expression_statement (assignment (identifier_lines) identifier_lines (call (attribute (attribute (identifier_dragonmapper) identifier_dragonmapper (identifier_data) identifier_data )attribute (identifier_load_data_file) identifier_load_data_file )attribute (argument_list (string_'transcriptions.csv') string_'transcriptions.csv' )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_pinyin_map) identifier_pinyin_map (identifier_zhuyin_map) identifier_zhuyin_map (identifier_ipa_map) identifier_ipa_map )pattern_list (expression_list (dictionary )dictionary (dictionary )dictionary (dictionary )dictionary )expression_list )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_lines) identifier_lines (block (expression_statement (assignment (pattern_list (identifier_p) identifier_p (identifier_z) identifier_z (identifier_i) identifier_i )pattern_list (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list (string_',') string_',' )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_pinyin_map) identifier_pinyin_map (identifier_p) identifier_p )subscript (dictionary (pair (string_'Zhuyin') string_'Zhuyin' (identifier_z) identifier_z )pair (pair (string_'IPA') string_'IPA' (identifier_i) identifier_i )pair )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_zhuyin_map) identifier_zhuyin_map (identifier_z) identifier_z )subscript (dictionary (pair (string_'Pinyin') string_'Pinyin' (identifier_p) identifier_p )pair (pair (string_'IPA') string_'IPA' (identifier_i) identifier_i )pair )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ipa_map) identifier_ipa_map (identifier_i) identifier_i )subscript (dictionary (pair (string_'Pinyin') string_'Pinyin' (identifier_p) identifier_p )pair (pair (string_'Zhuyin') string_'Zhuyin' (identifier_z) identifier_z )pair )dictionary )assignment )expression_statement )block )for_statement (return_statement (expression_list (identifier_pinyin_map) identifier_pinyin_map (identifier_zhuyin_map) identifier_zhuyin_map (identifier_ipa_map) identifier_ipa_map )expression_list )return_statement )block )function_definition )module
Load the transcription mapping data into a dictionary.
(module (function_definition (function_name__recursively_lookup_complex) function_name__recursively_lookup_complex (parameters (identifier_self) identifier_self (identifier_complex_id) identifier_complex_id )parameters (block (assert_statement (comparison_operator (identifier_complex_id) identifier_complex_id (attribute (identifier_self) identifier_self (identifier_complex_map) identifier_complex_map )attribute )comparison_operator )assert_statement (expression_statement (assignment (identifier_expanded_agent_strings) identifier_expanded_agent_strings (list )list )assignment )expression_statement (expression_statement (assignment (identifier_expand_these_next) identifier_expand_these_next (list (identifier_complex_id) identifier_complex_id )list )assignment )expression_statement (while_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_expand_these_next) identifier_expand_these_next )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_c) identifier_c (subscript (identifier_expand_these_next) identifier_expand_these_next (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_expand_these_next) identifier_expand_these_next (subscript (identifier_expand_these_next) identifier_expand_these_next (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement (assert_statement (comparison_operator (identifier_c) identifier_c (attribute (identifier_self) identifier_self (identifier_complex_map) identifier_complex_map )attribute )comparison_operator )assert_statement (for_statement (identifier_s) identifier_s (subscript (attribute (identifier_self) identifier_self (identifier_complex_map) identifier_complex_map )attribute (identifier_c) identifier_c )subscript (block (if_statement (comparison_operator (identifier_s) identifier_s (attribute (identifier_self) identifier_self (identifier_complex_map) identifier_complex_map )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_expand_these_next) identifier_expand_these_next (identifier_append) identifier_append )attribute (argument_list (identifier_s) identifier_s )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_expanded_agent_strings) identifier_expanded_agent_strings (identifier_append) identifier_append )attribute (argument_list (identifier_s) identifier_s )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )while_statement (return_statement (identifier_expanded_agent_strings) identifier_expanded_agent_strings )return_statement )block )function_definition )module
Looks up the constitutents of a complex. If any constituent is itself a complex, recursively expands until all constituents are not complexes.
(module (function_definition (function_name__escapify) function_name__escapify (parameters (identifier_label) identifier_label )parameters (block (expression_statement (assignment (identifier_text) identifier_text (string_'') string_'' )assignment )expression_statement (for_statement (identifier_c) identifier_c (identifier_label) identifier_label (block (if_statement (comparison_operator (identifier_c) identifier_c (identifier__escaped) identifier__escaped )comparison_operator (block (expression_statement (augmented_assignment (identifier_text) identifier_text (binary_operator (string_'\\') string_'\\' (identifier_c) identifier_c )binary_operator )augmented_assignment )expression_statement )block (elif_clause (boolean_operator (comparison_operator (call (identifier_ord) identifier_ord (argument_list (identifier_c) identifier_c )argument_list )call (integer_0x20) integer_0x20 )comparison_operator (comparison_operator (call (identifier_ord) identifier_ord (argument_list (identifier_c) identifier_c )argument_list )call (integer_0x7F) integer_0x7F )comparison_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_text) identifier_text (identifier_c) identifier_c )augmented_assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (augmented_assignment (identifier_text) identifier_text (binary_operator (string_'\\%03d') string_'\\%03d' (call (identifier_ord) identifier_ord (argument_list (identifier_c) identifier_c )argument_list )call )binary_operator )augmented_assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_text) identifier_text )return_statement )block )function_definition )module
Escape the characters in label which need it. @returns: the escaped string @rtype: string
(module (function_definition (function_name_snap) function_name_snap (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_length) identifier_length (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (if_statement (not_operator (comparison_operator (integer_2) integer_2 (identifier_length) identifier_length (integer_6) integer_6 )comparison_operator )not_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (string_'snap takes 2 to 6 arguments, {0} given.') string_'snap takes 2 to 6 arguments, {0} given.' (identifier_format) identifier_format )attribute (argument_list (identifier_length) identifier_length )argument_list )call )assignment )expression_statement (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_param) identifier_param (call (identifier_Enum) identifier_Enum (argument_list (string_'x') string_'x' (string_'y') string_'y' (string_'r') string_'r' (string_'theta') string_'theta' (string_'aux1') string_'aux1' (string_'aux2') string_'aux2' (string_'aux3') string_'aux3' (string_'aux4') string_'aux4' (string_'frequency') string_'frequency' (string_'trace1') string_'trace1' (string_'trace2') string_'trace2' (string_'trace3') string_'trace3' (string_'trace4') string_'trace4' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (expression_list (string_'SNAP?') string_'SNAP?' (binary_operator (tuple (identifier_Float) identifier_Float )tuple (identifier_length) identifier_length )binary_operator (binary_operator (tuple (identifier_param) identifier_param )tuple (identifier_length) identifier_length )binary_operator )expression_list )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__ask) identifier__ask )attribute (argument_list (identifier_cmd) identifier_cmd (list_splat (identifier_args) identifier_args )list_splat )argument_list )call )return_statement )block )function_definition )module
Records multiple values at once. It takes two to six arguments specifying which values should be recorded together. Valid arguments are 'x', 'y', 'r', 'theta', 'aux1', 'aux2', 'aux3', 'aux4', 'frequency', 'trace1', 'trace2', 'trace3' and 'trace4'. snap is faster since it avoids communication overhead. 'x' and 'y' are recorded together, as well as 'r' and 'theta'. Between these pairs, there is a delay of approximately 10 us. 'aux1', 'aux2', 'aux3' and 'aux4' have am uncertainty of up to 32 us. It takes at least 40 ms or a period to calculate the frequency. E.g.:: lockin.snap('x', 'theta', 'trace3')
(module (function_definition (function_name__input_as_multiline_string) function_name__input_as_multiline_string (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__input_filename) identifier__input_filename )attribute (call (attribute (identifier_self) identifier_self (identifier_getTmpFilename) identifier_getTmpFilename )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_WorkingDir) identifier_WorkingDir )attribute (keyword_argument (identifier_suffix) identifier_suffix (string_'.fasta') string_'.fasta' )keyword_argument )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (attribute (identifier_self) identifier_self (identifier__input_filename) identifier__input_filename )attribute (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement )block )with_statement (return_statement (attribute (identifier_self) identifier_self (identifier__input_filename) identifier__input_filename )attribute )return_statement )block )function_definition )module
Write multiline string to temp file, return filename data: a multiline string to be written to a file.
(module (function_definition (function_name__unquote) function_name__unquote (parameters (identifier_self) identifier_self (identifier_val) identifier_val )parameters (block (if_statement (boolean_operator (boolean_operator (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_val) identifier_val )argument_list )call (integer_2) integer_2 )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (subscript (identifier_val) identifier_val (integer_0) integer_0 )subscript (tuple (string_"'") string_"'" (string_'"') string_'"' )tuple )comparison_operator )parenthesized_expression )boolean_operator (parenthesized_expression (comparison_operator (subscript (identifier_val) identifier_val (integer_0) integer_0 )subscript (subscript (identifier_val) identifier_val (unary_operator (integer_1) integer_1 )unary_operator )subscript )comparison_operator )parenthesized_expression )boolean_operator (block (expression_statement (assignment (identifier_val) identifier_val (subscript (identifier_val) identifier_val (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement )block )if_statement (return_statement (identifier_val) identifier_val )return_statement )block )function_definition )module
Unquote a value if necessary.
(module (function_definition (function_name_get_pushes) function_name_get_pushes (parameters (identifier_self) identifier_self (identifier_project) identifier_project (dictionary_splat_pattern (identifier_params) identifier_params )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__get_json_list) identifier__get_json_list )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_PUSH_ENDPOINT) identifier_PUSH_ENDPOINT )attribute (identifier_project) identifier_project (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Gets pushes from project, filtered by parameters By default this method will just return the latest 10 pushes (if they exist) :param project: project (repository name) to query data for :param params: keyword arguments to filter results
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_iden) identifier_iden )parameters (block (expression_statement (assignment (identifier_appt) identifier_appt (call (attribute (attribute (identifier_self) identifier_self (identifier_appts) identifier_appts )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_iden) identifier_iden )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_appt) identifier_appt (None) None )comparison_operator (block (raise_statement (call (attribute (identifier_s_exc) identifier_s_exc (identifier_NoSuchIden) identifier_NoSuchIden )attribute (argument_list )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_heappos) identifier_heappos (call (attribute (attribute (identifier_self) identifier_self (identifier_apptheap) identifier_apptheap )attribute (identifier_index) identifier_index )attribute (argument_list (identifier_appt) identifier_appt )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause (else_clause (block (if_statement (comparison_operator (identifier_heappos) identifier_heappos (binary_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_apptheap) identifier_apptheap )attribute )argument_list )call (integer_1) integer_1 )binary_operator )comparison_operator (block (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_apptheap) identifier_apptheap )attribute (identifier_heappos) identifier_heappos )subscript )delete_statement )block (else_clause (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_apptheap) identifier_apptheap )attribute (identifier_heappos) identifier_heappos )subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_apptheap) identifier_apptheap )attribute (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_heapq) identifier_heapq (identifier_heapify) identifier_heapify )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_apptheap) identifier_apptheap )attribute )argument_list )call )expression_statement )block )else_clause )if_statement )block )else_clause )try_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_appts) identifier_appts )attribute (identifier_iden) identifier_iden )subscript )delete_statement (expression_statement (await (call (attribute (attribute (identifier_self) identifier_self (identifier__hivedict) identifier__hivedict )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_iden) identifier_iden )argument_list )call )await )expression_statement )block )function_definition )module
Delete an appointment
(module (function_definition (function_name_list) function_name_list (parameters (identifier_gandi) identifier_gandi (identifier_domain) identifier_domain (identifier_limit) identifier_limit )parameters (block (expression_statement (assignment (identifier_options) identifier_options (dictionary (pair (string_'items_per_page') string_'items_per_page' (identifier_limit) identifier_limit )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_gandi) identifier_gandi (identifier_forward) identifier_forward )attribute (identifier_list) identifier_list )attribute (argument_list (identifier_domain) identifier_domain (identifier_options) identifier_options )argument_list )call )assignment )expression_statement (for_statement (identifier_forward) identifier_forward (identifier_result) identifier_result (block (expression_statement (call (identifier_output_forward) identifier_output_forward (argument_list (identifier_gandi) identifier_gandi (identifier_domain) identifier_domain (identifier_forward) identifier_forward )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
List mail forwards for a domain.
(module (function_definition (function_name__get_pooling_layers) function_name__get_pooling_layers (parameters (identifier_self) identifier_self (identifier_start_node_id) identifier_start_node_id (identifier_end_node_id) identifier_end_node_id )parameters (block (expression_statement (assignment (identifier_layer_list) identifier_layer_list (list )list )assignment )expression_statement (expression_statement (assignment (identifier_node_list) identifier_node_list (list (identifier_start_node_id) identifier_start_node_id )list )assignment )expression_statement (assert_statement (call (attribute (identifier_self) identifier_self (identifier__depth_first_search) identifier__depth_first_search )attribute (argument_list (identifier_end_node_id) identifier_end_node_id (identifier_layer_list) identifier_layer_list (identifier_node_list) identifier_node_list )argument_list )call )assert_statement (expression_statement (assignment (identifier_ret) identifier_ret (list )list )assignment )expression_statement (for_statement (identifier_layer_id) identifier_layer_id (identifier_layer_list) identifier_layer_list (block (expression_statement (assignment (identifier_layer) identifier_layer (subscript (attribute (identifier_self) identifier_self (identifier_layer_list) identifier_layer_list )attribute (identifier_layer_id) identifier_layer_id )subscript )assignment )expression_statement (if_statement (call (identifier_is_layer) identifier_is_layer (argument_list (identifier_layer) identifier_layer (string_"Pooling") string_"Pooling" )argument_list )call (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (identifier_layer) identifier_layer )argument_list )call )expression_statement )block (elif_clause (boolean_operator (call (identifier_is_layer) identifier_is_layer (argument_list (identifier_layer) identifier_layer (string_"Conv") string_"Conv" )argument_list )call (comparison_operator (attribute (identifier_layer) identifier_layer (identifier_stride) identifier_stride )attribute (integer_1) integer_1 )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (identifier_layer) identifier_layer )argument_list )call )expression_statement )block )elif_clause )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Given two node IDs, return all the pooling layers between them.
(module (function_definition (function_name_votes) function_name_votes (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_votes) identifier_votes (list )list )assignment )expression_statement (for_statement (identifier_option) identifier_option (call (attribute (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call (block (expression_statement (augmented_assignment (identifier_votes) identifier_votes (call (attribute (attribute (identifier_option) identifier_option (identifier_votes) identifier_votes )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_votes) identifier_votes )return_statement )block )function_definition )module
Returns all the votes related to this topic poll.
(module (function_definition (function_name_has_annotation) function_name_has_annotation (parameters (identifier_self) identifier_self (typed_parameter (identifier_annotation) identifier_annotation (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_bool) identifier_bool )type (block (return_statement (parenthesized_expression (boolean_operator (boolean_operator (call (attribute (identifier_self) identifier_self (identifier_has_enumerated_annotation) identifier_has_enumerated_annotation )attribute (argument_list (identifier_annotation) identifier_annotation )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_has_regex_annotation) identifier_has_regex_annotation )attribute (argument_list (identifier_annotation) identifier_annotation )argument_list )call )boolean_operator (call (attribute (identifier_self) identifier_self (identifier_has_local_annotation) identifier_has_local_annotation )attribute (argument_list (identifier_annotation) identifier_annotation )argument_list )call )boolean_operator )parenthesized_expression )return_statement )block )function_definition )module
Check if this annotation is defined.
(module (function_definition (function_name_triad) function_name_triad (parameters (identifier_note) identifier_note (identifier_key) identifier_key )parameters (block (return_statement (list (identifier_note) identifier_note (call (attribute (identifier_intervals) identifier_intervals (identifier_third) identifier_third )attribute (argument_list (identifier_note) identifier_note (identifier_key) identifier_key )argument_list )call (call (attribute (identifier_intervals) identifier_intervals (identifier_fifth) identifier_fifth )attribute (argument_list (identifier_note) identifier_note (identifier_key) identifier_key )argument_list )call )list )return_statement )block )function_definition )module
Return the triad on note in key as a list. Examples: >>> triad('E', 'C') ['E', 'G', 'B'] >>> triad('E', 'B') ['E', 'G#', 'B']
(module (function_definition (function_name_date_from_string) function_name_date_from_string (parameters (identifier_string) identifier_string (default_parameter (identifier_format_string) identifier_format_string (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_format_string) identifier_format_string (identifier_str) identifier_str )argument_list )call (block (return_statement (call (attribute (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_string) identifier_string (identifier_format_string) identifier_format_string )argument_list )call (identifier_date) identifier_date )attribute (argument_list )argument_list )call )return_statement )block (elif_clause (comparison_operator (identifier_format_string) identifier_format_string (None) None )comparison_operator (block (expression_statement (assignment (identifier_format_string) identifier_format_string (list (string_"%Y-%m-%d") string_"%Y-%m-%d" (string_"%m-%d-%Y") string_"%m-%d-%Y" (string_"%m/%d/%Y") string_"%m/%d/%Y" (string_"%d/%m/%Y") string_"%d/%m/%Y" )list )assignment )expression_statement )block )elif_clause )if_statement (for_statement (identifier_format) identifier_format (identifier_format_string) identifier_format_string (block (try_statement (block (return_statement (call (attribute (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_string) identifier_string (identifier_format) identifier_format )argument_list )call (identifier_date) identifier_date )attribute (argument_list )argument_list )call )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (continue_statement )continue_statement )block )except_clause )try_statement )block )for_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Could not produce date from string: {}") string_"Could not produce date from string: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_string) identifier_string )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Runs through a few common string formats for datetimes, and attempts to coerce them into a datetime. Alternatively, format_string can provide either a single string to attempt or an iterable of strings to attempt.
(module (function_definition (function_name___init_defaults) function_name___init_defaults (parameters (identifier_self) identifier_self (identifier_config) identifier_config )parameters (block (expression_statement (assignment (identifier_provider) identifier_provider (attribute (identifier_self) identifier_self (identifier___provider) identifier___provider )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_provider) identifier_provider (string_'sqlite') string_'sqlite' )comparison_operator (block (expression_statement (call (attribute (identifier_config) identifier_config (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'dbname') string_'dbname' (string_':memory:') string_':memory:' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'create_db') string_'create_db' (True) True )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_provider) identifier_provider (string_'mysql') string_'mysql' )comparison_operator (block (expression_statement (call (attribute (identifier_config) identifier_config (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'port') string_'port' (integer_3306) integer_3306 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'charset') string_'charset' (string_'utf8') string_'utf8' )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_provider) identifier_provider (string_'postgres') string_'postgres' )comparison_operator (block (expression_statement (call (attribute (identifier_config) identifier_config (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'port') string_'port' (integer_5432) integer_5432 )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_provider) identifier_provider (string_'oracle') string_'oracle' )comparison_operator (block (expression_statement (call (attribute (identifier_config) identifier_config (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'port') string_'port' (integer_1521) integer_1521 )argument_list )call )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'Unsupported provider "{}"') string_'Unsupported provider "{}"' (identifier_format) identifier_format )attribute (argument_list (identifier_provider) identifier_provider )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_provider) identifier_provider (string_'sqlite') string_'sqlite' )comparison_operator (block (expression_statement (call (attribute (identifier_config) identifier_config (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'host') string_'host' (string_'localhost') string_'localhost' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'user') string_'user' (None) None )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'password') string_'password' (None) None )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'dbname') string_'dbname' (None) None )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Initializes the default connection settings.
(module (function_definition (function_name__add_opt_argument) function_name__add_opt_argument (parameters (identifier_self) identifier_self (identifier_opt_args) identifier_opt_args (identifier_arg_parser) identifier_arg_parser )parameters (block (expression_statement (assignment (identifier_option_args) identifier_option_args (call (attribute (identifier_opt_args) identifier_opt_args (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_groups) identifier_groups (call (attribute (identifier_option_args) identifier_option_args (identifier_pop) identifier_pop )attribute (argument_list (string_'groups') string_'groups' (None) None )argument_list )call )assignment )expression_statement (if_statement (identifier_groups) identifier_groups (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_group) identifier__add_group )attribute (argument_list (keyword_argument (identifier_parser) identifier_parser (identifier_arg_parser) identifier_arg_parser )keyword_argument (keyword_argument (identifier_groups) identifier_groups (identifier_groups) identifier_groups )keyword_argument (keyword_argument (identifier_option_args) identifier_option_args (identifier_option_args) identifier_option_args )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_exclusive_args) identifier_exclusive_args (call (attribute (identifier_option_args) identifier_option_args (identifier_pop) identifier_pop )attribute (argument_list (string_'mutually_exclusive') string_'mutually_exclusive' (None) None )argument_list )call )assignment )expression_statement (if_statement (identifier_exclusive_args) identifier_exclusive_args (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_mutually_exclusive_group) identifier__add_mutually_exclusive_group )attribute (argument_list (keyword_argument (identifier_parser) identifier_parser (identifier_arg_parser) identifier_arg_parser )keyword_argument (keyword_argument (identifier_groups) identifier_groups (identifier_exclusive_args) identifier_exclusive_args )keyword_argument (keyword_argument (identifier_option_args) identifier_option_args (identifier_option_args) identifier_option_args )keyword_argument )argument_list )call )expression_statement )block )if_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_option_args) identifier_option_args (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_arg) identifier__add_arg )attribute (argument_list (keyword_argument (identifier_parser) identifier_parser (identifier_arg_parser) identifier_arg_parser )keyword_argument (keyword_argument (identifier_value_dict) identifier_value_dict (identifier_v) identifier_v )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Add an argument to an instantiated parser. :param opt_args: ``dict`` :param arg_parser: ``object``
(module (function_definition (function_name_prettylist) function_name_prettylist (parameters (identifier_list_) identifier_list_ )parameters (block (if_statement (not_operator (identifier_list_) identifier_list_ )not_operator (block (return_statement (string_'') string_'' )return_statement )block )if_statement (expression_statement (assignment (identifier_values) identifier_values (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_uniqueList) identifier_uniqueList (list )list )assignment )expression_statement (for_statement (identifier_entry) identifier_entry (identifier_list_) identifier_list_ (block (if_statement (not_operator (comparison_operator (identifier_entry) identifier_entry (identifier_values) identifier_values )comparison_operator )not_operator (block (expression_statement (call (attribute (identifier_values) identifier_values (identifier_add) identifier_add )attribute (argument_list (identifier_entry) identifier_entry )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_uniqueList) identifier_uniqueList (identifier_append) identifier_append )attribute (argument_list (identifier_entry) identifier_entry )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (conditional_expression (subscript (identifier_uniqueList) identifier_uniqueList (integer_0) integer_0 )subscript (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_uniqueList) identifier_uniqueList )argument_list )call (integer_1) integer_1 )comparison_operator (line_continuation_\) line_continuation_\ (binary_operator (binary_operator (string_'[') string_'[' (call (attribute (string_'; ') string_'; ' (identifier_join) identifier_join )attribute (argument_list (identifier_uniqueList) identifier_uniqueList )argument_list )call )binary_operator (string_']') string_']' )binary_operator )conditional_expression )return_statement )block )function_definition )module
Filter out duplicate values while keeping order.
(module (function_definition (function_name_ecef2enuv) function_name_ecef2enuv (parameters (typed_parameter (identifier_u) identifier_u (type (identifier_float) identifier_float )type )typed_parameter (typed_parameter (identifier_v) identifier_v (type (identifier_float) identifier_float )type )typed_parameter (typed_parameter (identifier_w) identifier_w (type (identifier_float) identifier_float )type )typed_parameter (typed_parameter (identifier_lat0) identifier_lat0 (type (identifier_float) identifier_float )type )typed_parameter (typed_parameter (identifier_lon0) identifier_lon0 (type (identifier_float) identifier_float )type )typed_parameter (typed_default_parameter (identifier_deg) identifier_deg (type (identifier_bool) identifier_bool )type (True) True )typed_default_parameter )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_float) identifier_float )type (type (identifier_float) identifier_float )type (type (identifier_float) identifier_float )type )type_parameter )generic_type )type (block (if_statement (identifier_deg) identifier_deg (block (expression_statement (assignment (identifier_lat0) identifier_lat0 (call (identifier_radians) identifier_radians (argument_list (identifier_lat0) identifier_lat0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lon0) identifier_lon0 (call (identifier_radians) identifier_radians (argument_list (identifier_lon0) identifier_lon0 )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_t) identifier_t (binary_operator (binary_operator (call (identifier_cos) identifier_cos (argument_list (identifier_lon0) identifier_lon0 )argument_list )call (identifier_u) identifier_u )binary_operator (binary_operator (call (identifier_sin) identifier_sin (argument_list (identifier_lon0) identifier_lon0 )argument_list )call (identifier_v) identifier_v )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_uEast) identifier_uEast (binary_operator (binary_operator (unary_operator (call (identifier_sin) identifier_sin (argument_list (identifier_lon0) identifier_lon0 )argument_list )call )unary_operator (identifier_u) identifier_u )binary_operator (binary_operator (call (identifier_cos) identifier_cos (argument_list (identifier_lon0) identifier_lon0 )argument_list )call (identifier_v) identifier_v )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_wUp) identifier_wUp (binary_operator (binary_operator (call (identifier_cos) identifier_cos (argument_list (identifier_lat0) identifier_lat0 )argument_list )call (identifier_t) identifier_t )binary_operator (binary_operator (call (identifier_sin) identifier_sin (argument_list (identifier_lat0) identifier_lat0 )argument_list )call (identifier_w) identifier_w )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_vNorth) identifier_vNorth (binary_operator (binary_operator (unary_operator (call (identifier_sin) identifier_sin (argument_list (identifier_lat0) identifier_lat0 )argument_list )call )unary_operator (identifier_t) identifier_t )binary_operator (binary_operator (call (identifier_cos) identifier_cos (argument_list (identifier_lat0) identifier_lat0 )argument_list )call (identifier_w) identifier_w )binary_operator )binary_operator )assignment )expression_statement (return_statement (expression_list (identifier_uEast) identifier_uEast (identifier_vNorth) identifier_vNorth (identifier_wUp) identifier_wUp )expression_list )return_statement )block )function_definition )module
VECTOR from observer to target ECEF => ENU Parameters ---------- u : float or numpy.ndarray of float target x ECEF coordinate (meters) v : float or numpy.ndarray of float target y ECEF coordinate (meters) w : float or numpy.ndarray of float target z ECEF coordinate (meters) lat0 : float Observer geodetic latitude lon0 : float Observer geodetic longitude h0 : float observer altitude above geodetic ellipsoid (meters) deg : bool, optional degrees input/output (False: radians in/out) Returns ------- uEast : float or numpy.ndarray of float target east ENU coordinate (meters) vNorth : float or numpy.ndarray of float target north ENU coordinate (meters) wUp : float or numpy.ndarray of float target up ENU coordinate (meters)
(module (function_definition (function_name_get_unique_figname) function_name_get_unique_figname (parameters (identifier_dirname) identifier_dirname (identifier_root) identifier_root (identifier_ext) identifier_ext )parameters (block (expression_statement (assignment (identifier_i) identifier_i (integer_1) integer_1 )assignment )expression_statement (expression_statement (assignment (identifier_figname) identifier_figname (binary_operator (binary_operator (identifier_root) identifier_root (binary_operator (string_'_%d') string_'_%d' (identifier_i) identifier_i )binary_operator )binary_operator (identifier_ext) identifier_ext )binary_operator )assignment )expression_statement (while_statement (True) True (block (if_statement (call (attribute (identifier_osp) identifier_osp (identifier_exists) identifier_exists )attribute (argument_list (call (attribute (identifier_osp) identifier_osp (identifier_join) identifier_join )attribute (argument_list (identifier_dirname) identifier_dirname (identifier_figname) identifier_figname )argument_list )call )argument_list )call (block (expression_statement (augmented_assignment (identifier_i) identifier_i (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_figname) identifier_figname (binary_operator (binary_operator (identifier_root) identifier_root (binary_operator (string_'_%d') string_'_%d' (identifier_i) identifier_i )binary_operator )binary_operator (identifier_ext) identifier_ext )binary_operator )assignment )expression_statement )block (else_clause (block (return_statement (call (attribute (identifier_osp) identifier_osp (identifier_join) identifier_join )attribute (argument_list (identifier_dirname) identifier_dirname (identifier_figname) identifier_figname )argument_list )call )return_statement )block )else_clause )if_statement )block )while_statement )block )function_definition )module
Append a number to "root" to form a filename that does not already exist in "dirname".
(module (function_definition (function_name_log_power_spectrum) function_name_log_power_spectrum (parameters (identifier_frames) identifier_frames (default_parameter (identifier_fft_points) identifier_fft_points (integer_512) integer_512 )default_parameter (default_parameter (identifier_normalize) identifier_normalize (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_power_spec) identifier_power_spec (call (identifier_power_spectrum) identifier_power_spectrum (argument_list (identifier_frames) identifier_frames (identifier_fft_points) identifier_fft_points )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_power_spec) identifier_power_spec (comparison_operator (identifier_power_spec) identifier_power_spec (float_1e-20) float_1e-20 )comparison_operator )subscript (float_1e-20) float_1e-20 )assignment )expression_statement (expression_statement (assignment (identifier_log_power_spec) identifier_log_power_spec (binary_operator (integer_10) integer_10 (call (attribute (identifier_np) identifier_np (identifier_log10) identifier_log10 )attribute (argument_list (identifier_power_spec) identifier_power_spec )argument_list )call )binary_operator )assignment )expression_statement (if_statement (identifier_normalize) identifier_normalize (block (return_statement (binary_operator (identifier_log_power_spec) identifier_log_power_spec (call (attribute (identifier_np) identifier_np (identifier_max) identifier_max )attribute (argument_list (identifier_log_power_spec) identifier_log_power_spec )argument_list )call )binary_operator )return_statement )block (else_clause (block (return_statement (identifier_log_power_spec) identifier_log_power_spec )return_statement )block )else_clause )if_statement )block )function_definition )module
Log power spectrum of each frame in frames. Args: frames (array): The frame array in which each row is a frame. fft_points (int): The length of FFT. If fft_length is greater than frame_len, the frames will be zero-padded. normalize (bool): If normalize=True, the log power spectrum will be normalized. Returns: array: The power spectrum - If frames is an num_frames x sample_per_frame matrix, output will be num_frames x fft_length.
(module (function_definition (function_name__receive_all) function_name__receive_all (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (tuple_pattern (identifier_data) identifier_data (identifier_part) identifier_part )tuple_pattern (tuple (string_'') string_'' (string_'') string_'' )tuple )assignment )expression_statement (if_statement (identifier_is_py3) identifier_is_py3 (block (expression_statement (assignment (identifier_crlf_bytes) identifier_crlf_bytes (call (identifier_bytes) identifier_bytes (argument_list (attribute (identifier_self) identifier_self (identifier___CRLF) identifier___CRLF )attribute (keyword_argument (identifier_encoding) identifier_encoding (attribute (identifier_self) identifier_self (identifier___encoding) identifier___encoding )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_crlf_bytes) identifier_crlf_bytes (attribute (identifier_self) identifier_self (identifier___CRLF) identifier___CRLF )attribute )assignment )expression_statement )block )else_clause )if_statement (while_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier__running) identifier__running )attribute (comparison_operator (subscript (identifier_part) identifier_part (slice (unary_operator (integer_2) integer_2 )unary_operator (colon) colon )slice )subscript (identifier_crlf_bytes) identifier_crlf_bytes )comparison_operator )boolean_operator (block (try_statement (block (expression_statement (assignment (identifier_part) identifier_part (call (attribute (attribute (identifier_self) identifier_self (identifier__socket) identifier__socket )attribute (identifier_recv) identifier_recv )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_buffer_size) identifier_buffer_size )attribute )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (tuple (attribute (identifier_socket) identifier_socket (identifier_timeout) identifier_timeout )attribute (attribute (identifier_socket) identifier_socket (identifier_error) identifier_error )attribute )tuple (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (if_statement (attribute (identifier_self) identifier_self (identifier__running) identifier__running )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement (raise_statement (call (identifier_SocketError) identifier_SocketError (argument_list (binary_operator (string_'[Connect: %s]: Socket %s') string_'[Connect: %s]: Socket %s' (tuple (attribute (identifier_self) identifier_self (identifier__unique_id) identifier__unique_id )attribute (identifier_e) identifier_e )tuple )binary_operator )argument_list )call )raise_statement )block (else_clause (block (return_statement )return_statement )block )else_clause )if_statement )block )except_clause )try_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_part) identifier_part )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement (raise_statement (call (identifier_SocketError) identifier_SocketError (argument_list (string_'Connection closed by server') string_'Connection closed by server' )argument_list )call )raise_statement )block )if_statement (expression_statement (augmented_assignment (identifier_data) identifier_data (call (attribute (identifier_part) identifier_part (identifier_decode) identifier_decode )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___encoding) identifier___encoding )attribute )argument_list )call )augmented_assignment )expression_statement )block )while_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Whilst socket is running receives data from socket, till CRLF is detected.
(module (function_definition (function_name_gen_tensor_data) function_name_gen_tensor_data (parameters )parameters (block (expression_statement (assignment (pattern_list (identifier_X) identifier_X (identifier_y) identifier_y )pattern_list (call (identifier_toy_interaction) identifier_toy_interaction (argument_list (keyword_argument (identifier_return_X_y) identifier_return_X_y (True) True )keyword_argument (keyword_argument (identifier_n) identifier_n (integer_10000) integer_10000 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_gam) identifier_gam (call (attribute (call (identifier_LinearGAM) identifier_LinearGAM (argument_list (call (identifier_te) identifier_te (argument_list (integer_0) integer_0 (integer_1) integer_1 (keyword_argument (identifier_lam) identifier_lam (float_0.1) float_0.1 )keyword_argument )argument_list )call )argument_list )call (identifier_fit) identifier_fit )attribute (argument_list (identifier_X) identifier_X (identifier_y) identifier_y )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_XX) identifier_XX (call (attribute (identifier_gam) identifier_gam (identifier_generate_X_grid) identifier_generate_X_grid )attribute (argument_list (keyword_argument (identifier_term) identifier_term (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_meshgrid) identifier_meshgrid (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_Z) identifier_Z (call (attribute (identifier_gam) identifier_gam (identifier_partial_dependence) identifier_partial_dependence )attribute (argument_list (keyword_argument (identifier_term) identifier_term (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_meshgrid) identifier_meshgrid (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fig) identifier_fig (call (attribute (identifier_plt) identifier_plt (identifier_figure) identifier_figure )attribute (argument_list (keyword_argument (identifier_figsize) identifier_figsize (tuple (integer_9) integer_9 (integer_6) integer_6 )tuple )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ax) identifier_ax (call (attribute (identifier_plt) identifier_plt (identifier_axes) identifier_axes )attribute (argument_list (keyword_argument (identifier_projection) identifier_projection (string_'3d') string_'3d' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_ax) identifier_ax (identifier_dist) identifier_dist )attribute (float_7.5) float_7.5 )assignment )expression_statement (expression_statement (call (attribute (identifier_ax) identifier_ax (identifier_plot_surface) identifier_plot_surface )attribute (argument_list (subscript (identifier_XX) identifier_XX (integer_0) integer_0 )subscript (subscript (identifier_XX) identifier_XX (integer_1) integer_1 )subscript (identifier_Z) identifier_Z (keyword_argument (identifier_cmap) identifier_cmap (string_'viridis') string_'viridis' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ax) identifier_ax (identifier_set_axis_off) identifier_set_axis_off )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_fig) identifier_fig (identifier_tight_layout) identifier_tight_layout )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_savefig) identifier_savefig )attribute (argument_list (string_'imgs/pygam_tensor.png') string_'imgs/pygam_tensor.png' (keyword_argument (identifier_transparent) identifier_transparent (True) True )keyword_argument (keyword_argument (identifier_dpi) identifier_dpi (integer_300) integer_300 )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
toy interaction data
(module (function_definition (function_name_encode) function_name_encode (parameters (identifier_self) identifier_self (identifier_tags) identifier_tags (identifier_encoding) identifier_encoding (identifier_values_to_sub) identifier_values_to_sub )parameters (block (for_statement (identifier_tag) identifier_tag (identifier_tags) identifier_tags (block (if_statement (comparison_operator (call (attribute (subscript (identifier_tags) identifier_tags (identifier_tag) identifier_tag )subscript (identifier_get) identifier_get )attribute (argument_list (identifier_encoding) identifier_encoding )argument_list )call (string_"None") string_"None" )comparison_operator (block (if_statement (comparison_operator (call (attribute (subscript (identifier_tags) identifier_tags (identifier_tag) identifier_tag )subscript (identifier_get) identifier_get )attribute (argument_list (identifier_encoding) identifier_encoding )argument_list )call (string_"url") string_"url" )comparison_operator (block (expression_statement (assignment (subscript (identifier_values_to_sub) identifier_values_to_sub (identifier_tag) identifier_tag )subscript (call (attribute (identifier_self) identifier_self (identifier_url_encode) identifier_url_encode )attribute (argument_list (subscript (identifier_values_to_sub) identifier_values_to_sub (identifier_tag) identifier_tag )subscript )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (call (attribute (subscript (identifier_tags) identifier_tags (identifier_tag) identifier_tag )subscript (identifier_get) identifier_get )attribute (argument_list (identifier_encoding) identifier_encoding )argument_list )call (string_"base64") string_"base64" )comparison_operator (block (expression_statement (assignment (subscript (identifier_values_to_sub) identifier_values_to_sub (identifier_tag) identifier_tag )subscript (call (attribute (identifier_self) identifier_self (identifier_base64_utf_encode) identifier_base64_utf_encode )attribute (argument_list (subscript (identifier_values_to_sub) identifier_values_to_sub (identifier_tag) identifier_tag )subscript )argument_list )call )assignment )expression_statement )block )if_statement )block )if_statement )block )for_statement (return_statement (identifier_values_to_sub) identifier_values_to_sub )return_statement )block )function_definition )module
reads the encoding type from the event-mapping.json and determines whether a value needs encoding Parameters ---------- tags: dict the values of a particular event that can be substituted within the event json encoding: string string that helps navigate to the encoding field of the json values_to_sub: dict key/value pairs that will be substituted into the json Returns ------- values_to_sub: dict the encoded (if need be) values to substitute into the json.
(module (function_definition (function_name_load) function_name_load (parameters (identifier_self) identifier_self (default_parameter (identifier_local) identifier_local (string_'localsettings.py') string_'localsettings.py' )default_parameter (default_parameter (identifier_default) identifier_default (string_'settings.py') string_'settings.py' )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__load_defaults) identifier__load_defaults )attribute (argument_list (identifier_default) identifier_default )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__load_custom) identifier__load_custom )attribute (argument_list (identifier_local) identifier_local )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Load the settings dict @param local: The local settings filename to use @param default: The default settings module to read @return: A dict of the loaded settings
(module (function_definition (function_name__print_breakdown) function_name__print_breakdown (parameters (identifier_cls) identifier_cls (identifier_savedir) identifier_savedir (identifier_fname) identifier_fname (identifier_data) identifier_data )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_savedir) identifier_savedir )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_savedir) identifier_savedir )argument_list )call )expression_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_savedir) identifier_savedir (identifier_fname) identifier_fname )argument_list )call (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_fout) identifier_fout )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_fout) identifier_fout (identifier_write) identifier_write )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Function to print model fixtures into generated file
(module (function_definition (function_name_get_data_source) function_name_get_data_source (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_product_type) identifier_product_type (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_product_id) identifier_product_id )attribute (identifier_split) identifier_split )attribute (argument_list (string_'_') string_'_' )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (if_statement (boolean_operator (call (attribute (identifier_product_type) identifier_product_type (identifier_endswith) identifier_endswith )attribute (argument_list (string_'L1C') string_'L1C' )argument_list )call (comparison_operator (identifier_product_type) identifier_product_type (string_'OPER') string_'OPER' )comparison_operator )boolean_operator (block (return_statement (attribute (identifier_DataSource) identifier_DataSource (identifier_SENTINEL2_L1C) identifier_SENTINEL2_L1C )attribute )return_statement )block )if_statement (if_statement (boolean_operator (call (attribute (identifier_product_type) identifier_product_type (identifier_endswith) identifier_endswith )attribute (argument_list (string_'L2A') string_'L2A' )argument_list )call (comparison_operator (identifier_product_type) identifier_product_type (string_'USER') string_'USER' )comparison_operator )boolean_operator (block (return_statement (attribute (identifier_DataSource) identifier_DataSource (identifier_SENTINEL2_L2A) identifier_SENTINEL2_L2A )attribute )return_statement )block )if_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'Unknown data source of product {}') string_'Unknown data source of product {}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_product_id) identifier_product_id )attribute )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
The method determines data source from product ID. :return: Data source of the product :rtype: DataSource :raises: ValueError
(module (function_definition (function_name_load_buildfile) function_name_load_buildfile (parameters (identifier_self) identifier_self (identifier_target) identifier_target )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'Loading: %s') string_'Loading: %s' (identifier_target) identifier_target )argument_list )call )expression_statement (expression_statement (assignment (identifier_filepath) identifier_filepath (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_target) identifier_target (identifier_path) identifier_path )attribute (attribute (call (attribute (identifier_app) identifier_app (identifier_get_options) identifier_get_options )attribute (argument_list )argument_list )call (identifier_buildfile_name) identifier_buildfile_name )attribute )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_repo) identifier_repo (call (attribute (attribute (identifier_self) identifier_self (identifier_repo_state) identifier_repo_state )attribute (identifier_GetRepo) identifier_GetRepo )attribute (argument_list (attribute (identifier_target) identifier_target (identifier_repo) identifier_repo )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_repo) identifier_repo (identifier_get_file) identifier_get_file )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )return_statement )block (except_clause (as_pattern (attribute (identifier_gitrepo) identifier_gitrepo (identifier_GitError) identifier_GitError )attribute (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (string_'Failed loading %s: %s') string_'Failed loading %s: %s' (identifier_target) identifier_target (identifier_err) identifier_err )argument_list )call )expression_statement (raise_statement (call (attribute (identifier_error) identifier_error (identifier_BrokenGraph) identifier_BrokenGraph )attribute (argument_list (string_'Sadface.') string_'Sadface.' )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Pull a build file from git.
(module (function_definition (function_name_get_node) function_name_get_node (parameters (identifier_service_name) identifier_service_name (identifier_host_name) identifier_host_name )parameters (block (return_statement (call (attribute (identifier_common_pb2) identifier_common_pb2 (identifier_Node) identifier_Node )attribute (argument_list (keyword_argument (identifier_identifier) identifier_identifier (call (attribute (identifier_common_pb2) identifier_common_pb2 (identifier_ProcessIdentifier) identifier_ProcessIdentifier )attribute (argument_list (keyword_argument (identifier_host_name) identifier_host_name (conditional_expression (call (attribute (identifier_socket) identifier_socket (identifier_gethostname) identifier_gethostname )attribute (argument_list )argument_list )call (comparison_operator (identifier_host_name) identifier_host_name (None) None )comparison_operator (identifier_host_name) identifier_host_name )conditional_expression )keyword_argument (keyword_argument (identifier_pid) identifier_pid (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_start_timestamp) identifier_start_timestamp (call (identifier_proto_ts_from_datetime) identifier_proto_ts_from_datetime (argument_list (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call )argument_list )call )keyword_argument )argument_list )call )keyword_argument (keyword_argument (identifier_library_info) identifier_library_info (call (attribute (identifier_common_pb2) identifier_common_pb2 (identifier_LibraryInfo) identifier_LibraryInfo )attribute (argument_list (keyword_argument (identifier_language) identifier_language (call (attribute (attribute (attribute (identifier_common_pb2) identifier_common_pb2 (identifier_LibraryInfo) identifier_LibraryInfo )attribute (identifier_Language) identifier_Language )attribute (identifier_Value) identifier_Value )attribute (argument_list (string_'PYTHON') string_'PYTHON' )argument_list )call )keyword_argument (keyword_argument (identifier_exporter_version) identifier_exporter_version (identifier_EXPORTER_VERSION) identifier_EXPORTER_VERSION )keyword_argument (keyword_argument (identifier_core_library_version) identifier_core_library_version (identifier_opencensus_version) identifier_opencensus_version )keyword_argument )argument_list )call )keyword_argument (keyword_argument (identifier_service_info) identifier_service_info (call (attribute (identifier_common_pb2) identifier_common_pb2 (identifier_ServiceInfo) identifier_ServiceInfo )attribute (argument_list (keyword_argument (identifier_name) identifier_name (identifier_service_name) identifier_service_name )keyword_argument )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Generates Node message from params and system information.
(module (function_definition (function_name_schema_class) function_name_schema_class (parameters (identifier_self) identifier_self (identifier_object_schema) identifier_object_schema (identifier_model_name) identifier_model_name (default_parameter (identifier_classes) identifier_classes (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_cls_bldr) identifier_cls_bldr (call (identifier_ClassBuilder) identifier_ClassBuilder (argument_list (attribute (identifier_self) identifier_self (identifier_resolver) identifier_resolver )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_model_cls) identifier_model_cls (call (attribute (identifier_cls_bldr) identifier_cls_bldr (identifier_construct) identifier_construct )attribute (argument_list (identifier_model_name) identifier_model_name (identifier_object_schema) identifier_object_schema )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_model_cls) identifier_model_cls (identifier_proptype) identifier_proptype )attribute (attribute (identifier_SchemaObjectFactory) identifier_SchemaObjectFactory (identifier_proptype) identifier_proptype )attribute )assignment )expression_statement (return_statement (subscript (list (identifier_model_cls) identifier_model_cls (attribute (identifier_cls_bldr) identifier_cls_bldr (identifier_resolved) identifier_resolved )attribute )list (identifier_classes) identifier_classes )subscript )return_statement )block )function_definition )module
Create a object-class based on the object_schema. Use this class to create specific instances, and validate the data values. See the "python-jsonschema-objects" package for details on further usage. Parameters ---------- object_schema : dict The JSON-schema that defines the object model_name : str if provided, the name given to the new class. if not provided, then the name will be determined by one of the following schema values, in this order: ['x-model', 'title', 'id'] classes : bool When `True`, this method will return the complete dictionary of all resolved object-classes built from the object_schema. This can be helpful when a deeply nested object_schema is provided; but generally not necessary. You can then create a :class:`Namespace` instance using this dict. See the 'python-jschonschema-objects.utls' package for further details. When `False` (default), return only the object-class Returns ------- - new class for given object_schema (default) - dict of all classes when :param:`classes` is True
(module (function_definition (function_name_prepare_value) function_name_prepare_value (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (attribute (identifier_self) identifier_self (identifier_required) identifier_required )attribute )boolean_operator (block (expression_statement (assignment (identifier_choices) identifier_choices (call (identifier_list) identifier_list (argument_list (attribute (identifier_self) identifier_self (identifier_choices) identifier_choices )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_choices) identifier_choices )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (subscript (subscript (identifier_choices) identifier_choices (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_TemplateChoiceField) identifier_TemplateChoiceField (identifier_self) identifier_self )argument_list )call (identifier_prepare_value) identifier_prepare_value )attribute (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
To avoid evaluating the lazysorted callable more than necessary to establish a potential initial value for the field, we do it here. If there's - only one template choice, and - the field is required, and - there's no prior initial set (either by being bound or by being set higher up the stack then forcibly select the only "good" value as the default.
(module (function_definition (function_name_genome_alignment_iterator) function_name_genome_alignment_iterator (parameters (identifier_fn) identifier_fn (identifier_reference_species) identifier_reference_species (default_parameter (identifier_index_friendly) identifier_index_friendly (False) False )default_parameter (default_parameter (identifier_verbose) identifier_verbose (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_kw_args) identifier_kw_args (dictionary (pair (string_"reference_species") string_"reference_species" (identifier_reference_species) identifier_reference_species )pair )dictionary )assignment )expression_statement (for_statement (identifier_e) identifier_e (call (attribute (identifier_maf) identifier_maf (identifier_maf_iterator) identifier_maf_iterator )attribute (argument_list (identifier_fn) identifier_fn (keyword_argument (identifier_index_friendly) identifier_index_friendly (identifier_index_friendly) identifier_index_friendly )keyword_argument (keyword_argument (identifier_yield_class) identifier_yield_class (identifier_GenomeAlignmentBlock) identifier_GenomeAlignmentBlock )keyword_argument (keyword_argument (identifier_yield_kw_args) identifier_yield_kw_args (identifier_kw_args) identifier_kw_args )keyword_argument (keyword_argument (identifier_verbose) identifier_verbose (identifier_verbose) identifier_verbose )keyword_argument )argument_list )call (block (expression_statement (yield (identifier_e) identifier_e )yield )expression_statement )block )for_statement )block )function_definition )module
build an iterator for an MAF file of genome alignment blocks. :param fn: filename or stream-like object to iterate over. :param reference_species: which species in the alignment should be treated as the reference? :param index_friendly: if True, buffering is disabled to support using the iterator to build an index. :return an iterator that yields GenomeAlignment objects
(module (function_definition (function_name_match) function_name_match (parameters (identifier_self) identifier_self (identifier_method) identifier_method (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_segments) identifier_segments (call (attribute (identifier_path) identifier_path (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (while_statement (call (identifier_len) identifier_len (argument_list (identifier_segments) identifier_segments )argument_list )call (block (expression_statement (assignment (identifier_index) identifier_index (call (attribute (string_'/') string_'/' (identifier_join) identifier_join )attribute (argument_list (identifier_segments) identifier_segments )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_index) identifier_index (attribute (identifier_self) identifier_self (identifier___idx__) identifier___idx__ )attribute )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_handler) identifier_handler (identifier_params) identifier_params )pattern_list (call (attribute (identifier_self) identifier_self (identifier_match_rule) identifier_match_rule )attribute (argument_list (identifier_method) identifier_method (identifier_path) identifier_path (subscript (attribute (identifier_self) identifier_self (identifier___idx__) identifier___idx__ )attribute (identifier_index) identifier_index )subscript )argument_list )call )assignment )expression_statement (if_statement (identifier_handler) identifier_handler (block (return_statement (expression_list (identifier_handler) identifier_handler (identifier_params) identifier_params )expression_list )return_statement )block )if_statement )block )if_statement (expression_statement (call (attribute (identifier_segments) identifier_segments (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )expression_statement )block )while_statement (return_statement (expression_list (None) None (None) None )expression_list )return_statement )block )function_definition )module
find handler from registered rules Example: handler, params = match('GET', '/path')
(module (function_definition (function_name_date_to_json) function_name_date_to_json (parameters (identifier_pydate) identifier_pydate (identifier_manager) identifier_manager )parameters (block (if_statement (comparison_operator (identifier_pydate) identifier_pydate (None) None )comparison_operator (block (return_statement (None) None )return_statement )block (else_clause (block (return_statement (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_year) identifier_year (attribute (identifier_pydate) identifier_pydate (identifier_year) identifier_year )attribute )keyword_argument (keyword_argument (identifier_month) identifier_month (binary_operator (attribute (identifier_pydate) identifier_pydate (identifier_month) identifier_month )attribute (integer_1) integer_1 )binary_operator )keyword_argument (keyword_argument (identifier_date) identifier_date (attribute (identifier_pydate) identifier_pydate (identifier_day) identifier_day )attribute )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Serialize a Python date object. Attributes of this dictionary are to be passed to the JavaScript Date constructor.
(module (function_definition (function_name__get_by_id) function_name__get_by_id (parameters (identifier_collection) identifier_collection (identifier_id) identifier_id )parameters (block (expression_statement (assignment (identifier_matches) identifier_matches (list_comprehension (identifier_item) identifier_item (for_in_clause (identifier_item) identifier_item (identifier_collection) identifier_collection )for_in_clause (if_clause (comparison_operator (attribute (identifier_item) identifier_item (identifier_id) identifier_id )attribute (identifier_id) identifier_id )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (if_statement (not_operator (identifier_matches) identifier_matches )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Could not find a matching item') string_'Could not find a matching item' )argument_list )call )raise_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_matches) identifier_matches )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'The id matched {0} items, not 1') string_'The id matched {0} items, not 1' (identifier_format) identifier_format )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_matches) identifier_matches )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )elif_clause )if_statement (return_statement (subscript (identifier_matches) identifier_matches (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Get item from a list by the id field
(module (function_definition (function_name_get_service_details) function_name_get_service_details (parameters (identifier_self) identifier_self (identifier_service_id) identifier_service_id )parameters (block (expression_statement (assignment (identifier_service_query) identifier_service_query (line_continuation_\) line_continuation_\ (subscript (subscript (attribute (attribute (identifier_self) identifier_self (identifier__soap_client) identifier__soap_client )attribute (identifier_service) identifier_service )attribute (string_'LDBServiceSoap') string_'LDBServiceSoap' )subscript (string_'GetServiceDetails') string_'GetServiceDetails' )subscript )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_soap_response) identifier_soap_response (call (identifier_service_query) identifier_service_query (argument_list (keyword_argument (identifier_serviceID) identifier_serviceID (identifier_service_id) identifier_service_id )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_WebFault) identifier_WebFault (block (raise_statement (identifier_WebServiceError) identifier_WebServiceError )raise_statement )block )except_clause )try_statement (return_statement (call (identifier_ServiceDetails) identifier_ServiceDetails (argument_list (identifier_soap_response) identifier_soap_response )argument_list )call )return_statement )block )function_definition )module
Get the details of an individual service and return a ServiceDetails instance. Positional arguments: service_id: A Darwin LDB service id
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (identifier_jump) identifier_jump )parameters (block (expression_statement (assignment (identifier_atom) identifier_atom (attribute (attribute (identifier_jump) identifier_jump (identifier_initial_site) identifier_initial_site )attribute (identifier_atom) identifier_atom )attribute )assignment )expression_statement (expression_statement (assignment (identifier_dr) identifier_dr (call (attribute (identifier_jump) identifier_jump (identifier_dr) identifier_dr )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_cell_lengths) identifier_cell_lengths )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_jump) identifier_jump (identifier_final_site) identifier_final_site )attribute (identifier_occupation) identifier_occupation )attribute (attribute (identifier_atom) identifier_atom (identifier_number) identifier_number )attribute )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_jump) identifier_jump (identifier_final_site) identifier_final_site )attribute (identifier_atom) identifier_atom )attribute (identifier_atom) identifier_atom )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_jump) identifier_jump (identifier_final_site) identifier_final_site )attribute (identifier_is_occupied) identifier_is_occupied )attribute (True) True )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_jump) identifier_jump (identifier_initial_site) identifier_initial_site )attribute (identifier_occupation) identifier_occupation )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_jump) identifier_jump (identifier_initial_site) identifier_initial_site )attribute (identifier_atom) identifier_atom )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_jump) identifier_jump (identifier_initial_site) identifier_initial_site )attribute (identifier_is_occupied) identifier_is_occupied )attribute (False) False )assignment )expression_statement (expression_statement (assignment (attribute (identifier_atom) identifier_atom (identifier_site) identifier_site )attribute (attribute (identifier_jump) identifier_jump (identifier_final_site) identifier_final_site )attribute )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_atom) identifier_atom (identifier_number_of_hops) identifier_number_of_hops )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_atom) identifier_atom (identifier_dr) identifier_dr )attribute (identifier_dr) identifier_dr )augmented_assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_atom) identifier_atom (identifier_summed_dr2) identifier_summed_dr2 )attribute (call (attribute (identifier_np) identifier_np (identifier_dot) identifier_dot )attribute (argument_list (identifier_dr) identifier_dr (identifier_dr) identifier_dr )argument_list )call )augmented_assignment )expression_statement )block )function_definition )module
Update the lattice state by accepting a specific jump Args: jump (Jump): The jump that has been accepted. Returns: None.
(module (function_definition (function_name_read_sha1) function_name_read_sha1 (parameters (identifier_file_path) identifier_file_path (default_parameter (identifier_buf_size) identifier_buf_size (None) None )default_parameter (default_parameter (identifier_start_byte) identifier_start_byte (integer_0) integer_0 )default_parameter (default_parameter (identifier_read_size) identifier_read_size (None) None )default_parameter (default_parameter (identifier_extra_hashers) identifier_extra_hashers (list )list )default_parameter )parameters (block (expression_statement (assignment (identifier_read_size) identifier_read_size (boolean_operator (identifier_read_size) identifier_read_size (attribute (call (attribute (identifier_os) identifier_os (identifier_stat) identifier_stat )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call (identifier_st_size) identifier_st_size )attribute )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_buf_size) identifier_buf_size (boolean_operator (identifier_buf_size) identifier_buf_size (identifier_DEFAULT_BUFFER_SIZE) identifier_DEFAULT_BUFFER_SIZE )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_data_read) identifier_data_read (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_total_sha1) identifier_total_sha1 (call (attribute (identifier_hashlib) identifier_hashlib (identifier_sha1) identifier_sha1 )attribute (argument_list )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (identifier_data_read) identifier_data_read (identifier_read_size) identifier_read_size )comparison_operator (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_file_path) identifier_file_path (string_'rb') string_'rb' (keyword_argument (identifier_buffering) identifier_buffering (integer_0) integer_0 )keyword_argument )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_seek) identifier_seek )attribute (argument_list (identifier_start_byte) identifier_start_byte )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list (call (identifier_min) identifier_min (argument_list (identifier_buf_size) identifier_buf_size (binary_operator (identifier_read_size) identifier_read_size (identifier_data_read) identifier_data_read )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement (assert_statement (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call (integer_0) integer_0 )comparison_operator )parenthesized_expression )assert_statement (expression_statement (call (attribute (identifier_total_sha1) identifier_total_sha1 (identifier_update) identifier_update )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement (for_statement (identifier_hasher) identifier_hasher (identifier_extra_hashers) identifier_extra_hashers (block (expression_statement (call (attribute (identifier_hasher) identifier_hasher (identifier_update) identifier_update )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement )block )for_statement (expression_statement (augmented_assignment (identifier_data_read) identifier_data_read (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_start_byte) identifier_start_byte (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call )augmented_assignment )expression_statement )block )with_statement )block )while_statement (assert_statement (parenthesized_expression (comparison_operator (identifier_data_read) identifier_data_read (identifier_read_size) identifier_read_size )comparison_operator )parenthesized_expression )assert_statement (return_statement (identifier_total_sha1) identifier_total_sha1 )return_statement )block )function_definition )module
Determines the sha1 hash of a file in chunks, to prevent loading the entire file at once into memory
(module (function_definition (function_name_get_user_id) function_name_get_user_id (parameters (identifier_self) identifier_self (identifier_user) identifier_user )parameters (block (expression_statement (assignment (identifier_user_field) identifier_user_field (boolean_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_settings) identifier_settings (string_'SAML_IDP_DJANGO_USERNAME_FIELD') string_'SAML_IDP_DJANGO_USERNAME_FIELD' (None) None )argument_list )call (line_continuation_\) line_continuation_\ (call (identifier_getattr) identifier_getattr (argument_list (identifier_user) identifier_user (string_'USERNAME_FIELD') string_'USERNAME_FIELD' (string_'username') string_'username' )argument_list )call )boolean_operator )assignment )expression_statement (return_statement (call (identifier_str) identifier_str (argument_list (call (identifier_getattr) identifier_getattr (argument_list (identifier_user) identifier_user (identifier_user_field) identifier_user_field )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get identifier for a user. Take the one defined in settings.SAML_IDP_DJANGO_USERNAME_FIELD first, if not set use the USERNAME_FIELD property which is set on the user Model. This defaults to the user.username field.
(module (function_definition (function_name_render_impl) function_name_render_impl (parameters (identifier_self) identifier_self (identifier_template) identifier_template (identifier_context) identifier_context (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_ropts) identifier_ropts (call (identifier_dict) identifier_dict (generator_expression (tuple (identifier_k) identifier_k (identifier_v) identifier_v )tuple (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_options) identifier_options (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_k) identifier_k (string_"safe") string_"safe" )comparison_operator )if_clause )generator_expression )call )assignment )expression_statement (expression_statement (assignment (identifier_tmpl) identifier_tmpl (call (attribute (attribute (attribute (identifier_anytemplate) identifier_anytemplate (identifier_engines) identifier_engines )attribute (identifier_base) identifier_base )attribute (identifier_fallback_render) identifier_fallback_render )attribute (argument_list (identifier_template) identifier_template (dictionary )dictionary (dictionary_splat (identifier_ropts) identifier_ropts )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_renders_impl) identifier_renders_impl )attribute (argument_list (identifier_tmpl) identifier_tmpl (identifier_context) identifier_context (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Inherited class must implement this! :param template: Template file path :param context: A dict or dict-like object to instantiate given template file :param options: Same options as :meth:`renders_impl` - at_paths: Template search paths (common option) - at_encoding: Template encoding (common option) - safe: Safely substitute parameters in templates, that is, original template content will be returned if some of template parameters are not found in given context :return: To be rendered string in inherited classes
(module (function_definition (function_name_get_chunks) function_name_get_chunks (parameters (identifier_self) identifier_self (identifier_chunk_type) identifier_chunk_type )parameters (block (for_statement (pattern_list (identifier_nonter) identifier_nonter (identifier_this_type) identifier_this_type )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_label_for_nonter) identifier_label_for_nonter )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_this_type) identifier_this_type (identifier_chunk_type) identifier_chunk_type )comparison_operator (block (expression_statement (assignment (identifier_subsumed) identifier_subsumed (call (attribute (attribute (identifier_self) identifier_self (identifier_terms_subsumed_by_nonter) identifier_terms_subsumed_by_nonter )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_nonter) identifier_nonter )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_subsumed) identifier_subsumed (None) None )comparison_operator (block (expression_statement (yield (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_list) identifier_list (argument_list (identifier_subsumed) identifier_subsumed )argument_list )call )argument_list )call )yield )expression_statement )block )if_statement )block )if_statement )block )for_statement )block )function_definition )module
Returns the chunks for a certain type @type chunk_type: string @param chunk_type: type of the chunk @rtype: list @return: the chunks for that type
(module (function_definition (function_name_namespace_map) function_name_namespace_map (parameters (identifier_self) identifier_self (identifier_target) identifier_target )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_target) identifier__check_target )attribute (argument_list (identifier_target) identifier_target )argument_list )call )expression_statement (return_statement (boolean_operator (attribute (identifier_target) identifier_target (identifier_namespace_map) identifier_namespace_map )attribute (attribute (identifier_self) identifier_self (identifier__default_namespace_map) identifier__default_namespace_map )attribute )boolean_operator )return_statement )block )function_definition )module
Returns the namespace_map used for Thrift generation. :param target: The target to extract the namespace_map from. :type target: :class:`pants.backend.codegen.targets.java_thrift_library.JavaThriftLibrary` :returns: The namespaces to remap (old to new). :rtype: dictionary
(module (function_definition (function_name_fix_header) function_name_fix_header (parameters (identifier_filepath) identifier_filepath )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filepath) identifier_filepath (string_"r+") string_"r+" )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_current) identifier_current (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fixed) identifier_fixed (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (generator_expression (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_line) identifier_line (call (attribute (identifier_current) identifier_current (identifier_split) identifier_split )attribute (argument_list (string_"\n") string_"\n" )argument_list )call )for_in_clause )generator_expression )call )assignment )expression_statement (if_statement (comparison_operator (identifier_current) identifier_current (identifier_fixed) identifier_fixed )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_truncate) identifier_truncate )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (identifier_fixed) identifier_fixed )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Removes leading whitespace from a MacOS header file. This whitespace is causing issues with directives on some platforms.
(module (function_definition (function_name_get_fact_cache) function_name_get_fact_cache (parameters (identifier_self) identifier_self (identifier_host) identifier_host )parameters (block (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_fact_cache_type) identifier_fact_cache_type )attribute (string_'jsonfile') string_'jsonfile' )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_'Unsupported fact cache type. Only "jsonfile" is supported for reading and writing facts from ansible-runner') string_'Unsupported fact cache type. Only "jsonfile" is supported for reading and writing facts from ansible-runner' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_fact_cache) identifier_fact_cache (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_fact_cache) identifier_fact_cache )attribute (identifier_host) identifier_host )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_fact_cache) identifier_fact_cache )argument_list )call (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_fact_cache) identifier_fact_cache )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )with_statement )block )if_statement (return_statement (dictionary )dictionary )return_statement )block )function_definition )module
Get the entire fact cache only if the fact_cache_type is 'jsonfile'
(module (function_definition (function_name_max_pool) function_name_max_pool (parameters (identifier_x_input) identifier_x_input (identifier_pool_size) identifier_pool_size )parameters (block (return_statement (call (attribute (attribute (identifier_tf) identifier_tf (identifier_nn) identifier_nn )attribute (identifier_max_pool) identifier_max_pool )attribute (argument_list (identifier_x_input) identifier_x_input (keyword_argument (identifier_ksize) identifier_ksize (list (integer_1) integer_1 (identifier_pool_size) identifier_pool_size (identifier_pool_size) identifier_pool_size (integer_1) integer_1 )list )keyword_argument (keyword_argument (identifier_strides) identifier_strides (list (integer_1) integer_1 (identifier_pool_size) identifier_pool_size (identifier_pool_size) identifier_pool_size (integer_1) integer_1 )list )keyword_argument (keyword_argument (identifier_padding) identifier_padding (string_'SAME') string_'SAME' )keyword_argument )argument_list )call )return_statement )block )function_definition )module
max_pool downsamples a feature map by 2X.
(module (function_definition (function_name_accept_moderator_invite) function_name_accept_moderator_invite (parameters (identifier_self) identifier_self (identifier_subreddit) identifier_subreddit )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_'r') string_'r' (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_subreddit) identifier_subreddit )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_user) identifier_user )attribute (identifier__mod_subs) identifier__mod_subs )attribute (None) None )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_evict) identifier_evict )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'my_mod_subreddits') string_'my_mod_subreddits' )subscript )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_request_json) identifier_request_json )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'accept_mod_invite') string_'accept_mod_invite' )subscript (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Accept a moderator invite to the given subreddit. Callable upon an instance of Subreddit with no arguments. :returns: The json response from the server.
(module (function_definition (function_name_extender) function_name_extender (parameters (default_parameter (identifier_path) identifier_path (None) None )default_parameter (default_parameter (identifier_cache) identifier_cache (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_old_path) identifier_old_path (subscript (attribute (identifier_sys) identifier_sys (identifier_path) identifier_path )attribute (slice (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (call (identifier_extend) identifier_extend (argument_list (identifier_path) identifier_path (keyword_argument (identifier_cache) identifier_cache (None) None )keyword_argument )argument_list )call )expression_statement (try_statement (block (expression_statement (yield )yield )expression_statement )block (finally_clause (block (expression_statement (assignment (attribute (identifier_sys) identifier_sys (identifier_path) identifier_path )attribute (identifier_old_path) identifier_old_path )assignment )expression_statement )block )finally_clause )try_statement )block )function_definition )module
A context that temporarily extends sys.path and reverts it after the context is complete.
(module (function_definition (function_name_pretty_print_config_to_json) function_name_pretty_print_config_to_json (parameters (identifier_self) identifier_self (identifier_configs) identifier_configs )parameters (block (expression_statement (assignment (identifier_descriptor) identifier_descriptor (call (attribute (identifier_self) identifier_self (identifier_get_directory_list_doc) identifier_get_directory_list_doc )attribute (argument_list (identifier_configs) identifier_configs )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_descriptor) identifier_descriptor (keyword_argument (identifier_sort_keys) identifier_sort_keys (True) True )keyword_argument (keyword_argument (identifier_indent) identifier_indent (integer_2) integer_2 )keyword_argument (keyword_argument (identifier_separators) identifier_separators (tuple (string_',') string_',' (string_': ') string_': ' )tuple )keyword_argument )argument_list )call )return_statement )block )function_definition )module
JSON string description of a protorpc.remote.Service in a discovery doc. Args: configs: Either a single dict or a list of dicts containing the service configurations to list. Returns: string, The directory list document as a JSON string.
(module (function_definition (function_name_urlread) function_name_urlread (parameters (identifier_url) identifier_url (default_parameter (identifier_encoding) identifier_encoding (string_'utf8') string_'utf8' )default_parameter )parameters (block (try_statement (block (import_from_statement (dotted_name (identifier_urllib) identifier_urllib (identifier_request) identifier_request )dotted_name (dotted_name (identifier_urlopen) identifier_urlopen )dotted_name )import_from_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (import_from_statement (dotted_name (identifier_urllib2) identifier_urllib2 )dotted_name (dotted_name (identifier_urlopen) identifier_urlopen )dotted_name )import_from_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_response) identifier_response (call (identifier_urlopen) identifier_urlopen (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_response) identifier_response (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_content) identifier_content (identifier_decode) identifier_decode )attribute (argument_list (identifier_encoding) identifier_encoding )argument_list )call )assignment )expression_statement (return_statement (identifier_content) identifier_content )return_statement )block )function_definition )module
Read the content of an URL. Parameters ---------- url : str Returns ------- content : str
(module (function_definition (function_name_get_cb_plot) function_name_get_cb_plot (parameters (identifier_cb) identifier_cb (default_parameter (identifier_plot) identifier_plot (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_plot) identifier_plot (boolean_operator (identifier_plot) identifier_plot (attribute (identifier_cb) identifier_cb (identifier_plot) identifier_plot )attribute )boolean_operator )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_plot) identifier_plot (identifier_GeoOverlayPlot) identifier_GeoOverlayPlot )argument_list )call (block (expression_statement (assignment (identifier_plots) identifier_plots (list_comprehension (call (identifier_get_cb_plot) identifier_get_cb_plot (argument_list (identifier_cb) identifier_cb (identifier_p) identifier_p )argument_list )call (for_in_clause (identifier_p) identifier_p (call (attribute (attribute (identifier_plot) identifier_plot (identifier_subplots) identifier_subplots )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_plots) identifier_plots (list_comprehension (identifier_p) identifier_p (for_in_clause (identifier_p) identifier_p (identifier_plots) identifier_plots )for_in_clause (if_clause (call (identifier_any) identifier_any (generator_expression (boolean_operator (comparison_operator (identifier_s) identifier_s (attribute (identifier_cb) identifier_cb (identifier_streams) identifier_streams )attribute )comparison_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_s) identifier_s (string_'_triggering') string_'_triggering' (False) False )argument_list )call )boolean_operator (for_in_clause (identifier_s) identifier_s (attribute (identifier_p) identifier_p (identifier_streams) identifier_streams )attribute )for_in_clause )generator_expression )call )if_clause )list_comprehension )assignment )expression_statement (if_statement (identifier_plots) identifier_plots (block (expression_statement (assignment (identifier_plot) identifier_plot (subscript (identifier_plots) identifier_plots (integer_0) integer_0 )subscript )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_plot) identifier_plot )return_statement )block )function_definition )module
Finds the subplot with the corresponding stream.
(module (function_definition (function_name_cmd) function_name_cmd (parameters (identifier_self) identifier_self (identifier_tgt) identifier_tgt (identifier_fun) identifier_fun (default_parameter (identifier_arg) identifier_arg (tuple )tuple )default_parameter (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter (default_parameter (identifier_tgt_type) identifier_tgt_type (string_'glob') string_'glob' )default_parameter (default_parameter (identifier_ret) identifier_ret (string_'') string_'' )default_parameter (default_parameter (identifier_jid) identifier_jid (string_'') string_'' )default_parameter (default_parameter (identifier_full_return) identifier_full_return (False) False )default_parameter (default_parameter (identifier_kwarg) identifier_kwarg (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_was_listening) identifier_was_listening (attribute (attribute (identifier_self) identifier_self (identifier_event) identifier_event )attribute (identifier_cpub) identifier_cpub )attribute )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_pub_data) identifier_pub_data (call (attribute (identifier_self) identifier_self (identifier_run_job) identifier_run_job )attribute (argument_list (identifier_tgt) identifier_tgt (identifier_fun) identifier_fun (identifier_arg) identifier_arg (identifier_tgt_type) identifier_tgt_type (identifier_ret) identifier_ret (identifier_timeout) identifier_timeout (identifier_jid) identifier_jid (keyword_argument (identifier_kwarg) identifier_kwarg (identifier_kwarg) identifier_kwarg )keyword_argument (keyword_argument (identifier_listen) identifier_listen (True) True )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_pub_data) identifier_pub_data )not_operator (block (return_statement (identifier_pub_data) identifier_pub_data )return_statement )block )if_statement (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_fn_ret) identifier_fn_ret (call (attribute (identifier_self) identifier_self (identifier_get_cli_event_returns) identifier_get_cli_event_returns )attribute (argument_list (subscript (identifier_pub_data) identifier_pub_data (string_'jid') string_'jid' )subscript (subscript (identifier_pub_data) identifier_pub_data (string_'minions') string_'minions' )subscript (call (attribute (identifier_self) identifier_self (identifier__get_timeout) identifier__get_timeout )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call (identifier_tgt) identifier_tgt (identifier_tgt_type) identifier_tgt_type (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (block (if_statement (identifier_fn_ret) identifier_fn_ret (block (for_statement (pattern_list (identifier_mid) identifier_mid (identifier_data) identifier_data )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_fn_ret) identifier_fn_ret )argument_list )call (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_mid) identifier_mid )subscript (parenthesized_expression (conditional_expression (identifier_data) identifier_data (identifier_full_return) identifier_full_return (call (attribute (identifier_data) identifier_data (identifier_get) identifier_get )attribute (argument_list (string_'ret') string_'ret' (dictionary )dictionary )argument_list )call )conditional_expression )parenthesized_expression )assignment )expression_statement )block )for_statement )block )if_statement )block )for_statement (for_statement (identifier_failed) identifier_failed (call (identifier_list) identifier_list (argument_list (binary_operator (call (identifier_set) identifier_set (argument_list (subscript (identifier_pub_data) identifier_pub_data (string_'minions') string_'minions' )subscript )argument_list )call (call (identifier_set) identifier_set (argument_list (identifier_ret) identifier_ret )argument_list )call )binary_operator )argument_list )call (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_failed) identifier_failed )subscript (False) False )assignment )expression_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block (finally_clause (block (if_statement (not_operator (identifier_was_listening) identifier_was_listening )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_event) identifier_event )attribute (identifier_close_pub) identifier_close_pub )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )finally_clause )try_statement )block )function_definition )module
Synchronously execute a command on targeted minions The cmd method will execute and wait for the timeout period for all minions to reply, then it will return all minion data at once. .. code-block:: python >>> import salt.client >>> local = salt.client.LocalClient() >>> local.cmd('*', 'cmd.run', ['whoami']) {'jerry': 'root'} With extra keyword arguments for the command function to be run: .. code-block:: python local.cmd('*', 'test.arg', ['arg1', 'arg2'], kwarg={'foo': 'bar'}) Compound commands can be used for multiple executions in a single publish. Function names and function arguments are provided in separate lists but the index values must correlate and an empty list must be used if no arguments are required. .. code-block:: python >>> local.cmd('*', [ 'grains.items', 'sys.doc', 'cmd.run', ], [ [], [], ['uptime'], ]) :param tgt: Which minions to target for the execution. Default is shell glob. Modified by the ``tgt_type`` option. :type tgt: string or list :param fun: The module and function to call on the specified minions of the form ``module.function``. For example ``test.ping`` or ``grains.items``. Compound commands Multiple functions may be called in a single publish by passing a list of commands. This can dramatically lower overhead and speed up the application communicating with Salt. This requires that the ``arg`` param is a list of lists. The ``fun`` list and the ``arg`` list must correlate by index meaning a function that does not take arguments must still have a corresponding empty list at the expected index. :type fun: string or list of strings :param arg: A list of arguments to pass to the remote function. If the function takes no arguments ``arg`` may be omitted except when executing a compound command. :type arg: list or list-of-lists :param timeout: Seconds to wait after the last minion returns but before all minions return. :param tgt_type: The type of ``tgt``. Allowed values: * ``glob`` - Bash glob completion - Default * ``pcre`` - Perl style regular expression * ``list`` - Python list of hosts * ``grain`` - Match based on a grain comparison * ``grain_pcre`` - Grain comparison with a regex * ``pillar`` - Pillar data comparison * ``pillar_pcre`` - Pillar data comparison with a regex * ``nodegroup`` - Match on nodegroup * ``range`` - Use a Range server for matching * ``compound`` - Pass a compound match string * ``ipcidr`` - Match based on Subnet (CIDR notation) or IPv4 address. .. versionchanged:: 2017.7.0 Renamed from ``expr_form`` to ``tgt_type`` :param ret: The returner to use. The value passed can be single returner, or a comma delimited list of returners to call in order on the minions :param kwarg: A dictionary with keyword arguments for the function. :param full_return: Output the job return only (default) or the full return including exit code and other job metadata. :param kwargs: Optional keyword arguments. Authentication credentials may be passed when using :conf_master:`external_auth`. For example: ``local.cmd('*', 'test.ping', username='saltdev', password='saltdev', eauth='pam')``. Or: ``local.cmd('*', 'test.ping', token='5871821ea51754fdcea8153c1c745433')`` :returns: A dictionary with the result of the execution, keyed by minion ID. A compound command will return a sub-dictionary keyed by function name.
(module (function_definition (function_name_google_nest_count) function_name_google_nest_count (parameters (identifier_self) identifier_self (identifier_style) identifier_style )parameters (block (expression_statement (assignment (identifier_nest_count) identifier_nest_count (integer_0) integer_0 )assignment )expression_statement (if_statement (comparison_operator (string_'margin-left') string_'margin-left' (identifier_style) identifier_style )comparison_operator (block (expression_statement (assignment (identifier_nest_count) identifier_nest_count (binary_operator (call (identifier_int) identifier_int (argument_list (subscript (subscript (identifier_style) identifier_style (string_'margin-left') string_'margin-left' )subscript (slice (colon) colon (unary_operator (integer_2) integer_2 )unary_operator )slice )subscript )argument_list )call (attribute (identifier_self) identifier_self (identifier_google_list_indent) identifier_google_list_indent )attribute )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_nest_count) identifier_nest_count )return_statement )block )function_definition )module
calculate the nesting count of google doc lists
(module (function_definition (function_name_removeRouterPrefix) function_name_removeRouterPrefix (parameters (identifier_self) identifier_self (identifier_prefixEntry) identifier_prefixEntry )parameters (block (print_statement (binary_operator (string_'%s call removeRouterPrefix') string_'%s call removeRouterPrefix' (attribute (identifier_self) identifier_self (identifier_port) identifier_port )attribute )binary_operator )print_statement (print_statement (identifier_prefixEntry) identifier_prefixEntry )print_statement (expression_statement (assignment (identifier_prefix) identifier_prefix (call (attribute (identifier_self) identifier_self (identifier___convertIp6PrefixStringToIp6Address) identifier___convertIp6PrefixStringToIp6Address )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_prefixEntry) identifier_prefixEntry )argument_list )call )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_prefixLen) identifier_prefixLen (integer_64) integer_64 )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (binary_operator (string_'prefix remove %s/%d') string_'prefix remove %s/%d' (tuple (identifier_prefix) identifier_prefix (identifier_prefixLen) identifier_prefixLen )tuple )binary_operator )assignment )expression_statement (print_statement (identifier_cmd) identifier_cmd )print_statement (if_statement (comparison_operator (subscript (call (attribute (identifier_self) identifier_self (identifier___sendCommand) identifier___sendCommand )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call (integer_0) integer_0 )subscript (string_'Done') string_'Done' )comparison_operator (block (return_statement (comparison_operator (subscript (call (attribute (identifier_self) identifier_self (identifier___sendCommand) identifier___sendCommand )attribute (argument_list (string_'netdataregister') string_'netdataregister' )argument_list )call (integer_0) integer_0 )subscript (string_'Done') string_'Done' )comparison_operator )return_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block (except_clause (identifier_Exception) identifier_Exception (identifier_e) identifier_e (block (expression_statement (call (attribute (identifier_ModuleHelper) identifier_ModuleHelper (identifier_WriteIntoDebugLogger) identifier_WriteIntoDebugLogger )attribute (argument_list (binary_operator (string_"removeRouterPrefix() Error: ") string_"removeRouterPrefix() Error: " (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )binary_operator )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
remove the configured prefix on a border router Args: prefixEntry: a on-mesh prefix entry Returns: True: successful to remove the prefix entry from border router False: fail to remove the prefix entry from border router
(module (function_definition (function_name_is_suburi) function_name_is_suburi (parameters (identifier_self) identifier_self (identifier_base) identifier_base (identifier_test) identifier_test )parameters (block (if_statement (comparison_operator (identifier_base) identifier_base (identifier_test) identifier_test )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_base) identifier_base (integer_0) integer_0 )subscript (subscript (identifier_test) identifier_test (integer_0) integer_0 )subscript )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_common) identifier_common (call (attribute (identifier_posixpath) identifier_posixpath (identifier_commonprefix) identifier_commonprefix )attribute (argument_list (tuple (subscript (identifier_base) identifier_base (integer_1) integer_1 )subscript (subscript (identifier_test) identifier_test (integer_1) integer_1 )subscript )tuple )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_common) identifier_common )argument_list )call (call (identifier_len) identifier_len (argument_list (subscript (identifier_base) identifier_base (integer_1) integer_1 )subscript )argument_list )call )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Check if test is below base in a URI tree Both args must be URIs in reduced form.
(module (function_definition (function_name_clipPolygons) function_name_clipPolygons (parameters (identifier_self) identifier_self (identifier_polygons) identifier_polygons )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_plane) identifier_plane )attribute )not_operator (block (return_statement (subscript (identifier_polygons) identifier_polygons (slice (colon) colon )slice )subscript )return_statement )block )if_statement (expression_statement (assignment (identifier_front) identifier_front (list )list )assignment )expression_statement (expression_statement (assignment (identifier_back) identifier_back (list )list )assignment )expression_statement (for_statement (identifier_poly) identifier_poly (identifier_polygons) identifier_polygons (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_plane) identifier_plane )attribute (identifier_splitPolygon) identifier_splitPolygon )attribute (argument_list (identifier_poly) identifier_poly (identifier_front) identifier_front (identifier_back) identifier_back (identifier_front) identifier_front (identifier_back) identifier_back )argument_list )call )expression_statement )block )for_statement (if_statement (attribute (identifier_self) identifier_self (identifier_front) identifier_front )attribute (block (expression_statement (assignment (identifier_front) identifier_front (call (attribute (attribute (identifier_self) identifier_self (identifier_front) identifier_front )attribute (identifier_clipPolygons) identifier_clipPolygons )attribute (argument_list (identifier_front) identifier_front )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_back) identifier_back )attribute (block (expression_statement (assignment (identifier_back) identifier_back (call (attribute (attribute (identifier_self) identifier_self (identifier_back) identifier_back )attribute (identifier_clipPolygons) identifier_clipPolygons )attribute (argument_list (identifier_back) identifier_back )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_back) identifier_back (list )list )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_front) identifier_front (identifier_extend) identifier_extend )attribute (argument_list (identifier_back) identifier_back )argument_list )call )expression_statement (return_statement (identifier_front) identifier_front )return_statement )block )function_definition )module
Recursively remove all polygons in `polygons` that are inside this BSP tree.
(module (function_definition (function_name_streaming_command) function_name_streaming_command (parameters (identifier_self) identifier_self (identifier_service) identifier_service (default_parameter (identifier_command) identifier_command (string_'') string_'' )default_parameter (default_parameter (identifier_timeout_ms) identifier_timeout_ms (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_timeout) identifier_timeout (call (attribute (attribute (identifier_timeouts) identifier_timeouts (identifier_PolledTimeout) identifier_PolledTimeout )attribute (identifier_from_millis) identifier_from_millis )attribute (argument_list (identifier_timeout_ms) identifier_timeout_ms )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_stream) identifier_stream (call (attribute (identifier_self) identifier_self (identifier_open_stream) identifier_open_stream )attribute (argument_list (binary_operator (string_'%s:%s') string_'%s:%s' (tuple (identifier_service) identifier_service (identifier_command) identifier_command )tuple )binary_operator (identifier_timeout) identifier_timeout )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_stream) identifier_stream )not_operator (block (raise_statement (call (attribute (identifier_usb_exceptions) identifier_usb_exceptions (identifier_AdbStreamUnavailableError) identifier_AdbStreamUnavailableError )attribute (argument_list (string_'%s does not support service: %s') string_'%s does not support service: %s' (identifier_self) identifier_self (identifier_service) identifier_service )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_data) identifier_data (call (attribute (identifier_stream) identifier_stream (identifier_read_until_close) identifier_read_until_close )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call (block (expression_statement (yield (identifier_data) identifier_data )yield )expression_statement )block )for_statement )block )function_definition )module
One complete set of packets for a single command. Helper function to call open_stream and yield the output. Sends service:command in a new connection, reading the data for the response. All the data is held in memory, large responses will be slow and can fill up memory. Args: service: The service on the device to talk to. command: The command to send to the service. timeout_ms: Timeout for the entire command, in milliseconds (or as a PolledTimeout object). Yields: The data contained in the responses from the service.
(module (function_definition (function_name_get_code_language) function_name_get_code_language (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_js_source) identifier_js_source (call (attribute (identifier_self) identifier_self (identifier_get_js_source) identifier_get_js_source )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute (identifier_get) identifier_get )attribute (argument_list (string_"include_html") string_"include_html" (False) False )argument_list )call (block (expression_statement (assignment (identifier_resources) identifier_resources (call (identifier_get_sphinx_resources) identifier_get_sphinx_resources (argument_list (keyword_argument (identifier_include_bokehjs_api) identifier_include_bokehjs_api (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_html_source) identifier_html_source (call (attribute (identifier_BJS_HTML) identifier_BJS_HTML (identifier_render) identifier_render )attribute (argument_list (keyword_argument (identifier_css_files) identifier_css_files (attribute (identifier_resources) identifier_resources (identifier_css_files) identifier_css_files )attribute )keyword_argument (keyword_argument (identifier_js_files) identifier_js_files (attribute (identifier_resources) identifier_resources (identifier_js_files) identifier_js_files )attribute )keyword_argument (keyword_argument (identifier_bjs_script) identifier_bjs_script (identifier_js_source) identifier_js_source )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (list (identifier_html_source) identifier_html_source (string_"html") string_"html" )list )return_statement )block (else_clause (block (return_statement (list (identifier_js_source) identifier_js_source (string_"javascript") string_"javascript" )list )return_statement )block )else_clause )if_statement )block )function_definition )module
This is largely copied from bokeh.sphinxext.bokeh_plot.run
(module (function_definition (function_name__forward) function_name__forward (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_current_token) identifier_current_token )attribute (call (identifier_next) identifier_next (argument_list (attribute (identifier_self) identifier_self (identifier_tokens) identifier_tokens )attribute )argument_list )call )assignment )expression_statement )block (except_clause (identifier_StopIteration) identifier_StopIteration (block (raise_statement (call (identifier_MissingTokensError) identifier_MissingTokensError (argument_list (binary_operator (string_"Unexpected end of token stream at %d.") string_"Unexpected end of token stream at %d." (attribute (identifier_self) identifier_self (identifier_current_pos) identifier_current_pos )attribute )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_current_pos) identifier_current_pos )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )function_definition )module
Advance to the next token. Internal methods, updates: - self.current_token - self.current_pos Raises: MissingTokensError: when trying to advance beyond the end of the token flow.
(module (function_definition (function_name_get_args_and_values) function_name_get_args_and_values (parameters (identifier_parser) identifier_parser (identifier_an_action) identifier_an_action )parameters (block (expression_statement (assignment (identifier_args) identifier_args (attribute (call (attribute (identifier_inspect) identifier_inspect (identifier_getargspec) identifier_getargspec )attribute (argument_list (attribute (attribute (identifier_an_action) identifier_an_action (identifier___class__) identifier___class__ )attribute (identifier___init__) identifier___init__ )attribute )argument_list )call (identifier_args) identifier_args )attribute )assignment )expression_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (identifier_dict) identifier_dict (generator_expression (tuple (identifier_an_attr) identifier_an_attr (call (identifier_getattr) identifier_getattr (argument_list (identifier_an_action) identifier_an_action (identifier_an_attr) identifier_an_attr )argument_list )call )tuple (for_in_clause (identifier_an_attr) identifier_an_attr (identifier_args) identifier_args )for_in_clause (if_clause (parenthesized_expression (boolean_operator (comparison_operator (identifier_an_attr) identifier_an_attr (tuple (string_'self') string_'self' (string_'required') string_'required' )tuple )comparison_operator (comparison_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_an_action) identifier_an_action (identifier_an_attr) identifier_an_attr )argument_list )call (None) None )comparison_operator )boolean_operator )parenthesized_expression )if_clause )generator_expression )call )assignment )expression_statement (expression_statement (assignment (identifier_action_name) identifier_action_name (call (identifier_find_action_name_by_value) identifier_find_action_name_by_value (argument_list (attribute (attribute (identifier_parser) identifier_parser (identifier__optionals) identifier__optionals )attribute (identifier__registries) identifier__registries )attribute (identifier_an_action) identifier_an_action )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'required') string_'required' (identifier_kwargs) identifier_kwargs )comparison_operator (block (delete_statement (subscript (identifier_kwargs) identifier_kwargs (string_'required') string_'required' )subscript )delete_statement )block )if_statement (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'action') string_'action' )subscript (identifier_action_name) identifier_action_name )assignment )expression_statement (if_statement (comparison_operator (string_'option_strings') string_'option_strings' (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (identifier_args) identifier_args (call (identifier_tuple) identifier_tuple (argument_list (subscript (identifier_kwargs) identifier_kwargs (string_'option_strings') string_'option_strings' )subscript )argument_list )call )assignment )expression_statement (delete_statement (subscript (identifier_kwargs) identifier_kwargs (string_'option_strings') string_'option_strings' )subscript )delete_statement )block (else_clause (block (expression_statement (assignment (identifier_args) identifier_args (tuple )tuple )assignment )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )expression_list )return_statement )block )function_definition )module
this rountine attempts to reconstruct the kwargs that were used in the creation of an action object
(module (function_definition (function_name_get_aggregate) function_name_get_aggregate (parameters (identifier_config) identifier_config )parameters (block (expression_statement (assignment (identifier__urlqueue) identifier__urlqueue (call (attribute (identifier_urlqueue) identifier_urlqueue (identifier_UrlQueue) identifier_UrlQueue )attribute (argument_list (keyword_argument (identifier_max_allowed_urls) identifier_max_allowed_urls (subscript (identifier_config) identifier_config (string_"maxnumurls") string_"maxnumurls" )subscript )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier__robots_txt) identifier__robots_txt (call (attribute (identifier_robots_txt) identifier_robots_txt (identifier_RobotsTxt) identifier_RobotsTxt )attribute (argument_list (subscript (identifier_config) identifier_config (string_"useragent") string_"useragent" )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_plugin_manager) identifier_plugin_manager (call (attribute (identifier_plugins) identifier_plugins (identifier_PluginManager) identifier_PluginManager )attribute (argument_list (identifier_config) identifier_config )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result_cache) identifier_result_cache (call (attribute (identifier_results) identifier_results (identifier_ResultCache) identifier_ResultCache )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_aggregator) identifier_aggregator (identifier_Aggregate) identifier_Aggregate )attribute (argument_list (identifier_config) identifier_config (identifier__urlqueue) identifier__urlqueue (identifier__robots_txt) identifier__robots_txt (identifier_plugin_manager) identifier_plugin_manager (identifier_result_cache) identifier_result_cache )argument_list )call )return_statement )block )function_definition )module
Get an aggregator instance with given configuration.
(module (function_definition (function_name_get_current_main_assistant) function_name_get_current_main_assistant (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_current_page) identifier_current_page (call (attribute (attribute (identifier_self) identifier_self (identifier_notebook) identifier_notebook )attribute (identifier_get_nth_page) identifier_get_nth_page )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_notebook) identifier_notebook )attribute (identifier_get_current_page) identifier_get_current_page )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_current_page) identifier_current_page (identifier_main_assistant) identifier_main_assistant )attribute )return_statement )block )function_definition )module
Function return current assistant
(module (function_definition (function_name_unstructure_attrs_asdict) function_name_unstructure_attrs_asdict (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj )parameters (block (expression_statement (assignment (identifier_attrs) identifier_attrs (attribute (attribute (identifier_obj) identifier_obj (identifier___class__) identifier___class__ )attribute (identifier___attrs_attrs__) identifier___attrs_attrs__ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_dispatch) identifier_dispatch (attribute (attribute (identifier_self) identifier_self (identifier__unstructure_func) identifier__unstructure_func )attribute (identifier_dispatch) identifier_dispatch )attribute )assignment )expression_statement (expression_statement (assignment (identifier_rv) identifier_rv (call (attribute (identifier_self) identifier_self (identifier__dict_factory) identifier__dict_factory )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_a) identifier_a (identifier_attrs) identifier_attrs (block (expression_statement (assignment (identifier_name) identifier_name (attribute (identifier_a) identifier_a (identifier_name) identifier_name )attribute )assignment )expression_statement (expression_statement (assignment (identifier_v) identifier_v (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_rv) identifier_rv (identifier_name) identifier_name )subscript (call (call (identifier_dispatch) identifier_dispatch (argument_list (attribute (identifier_v) identifier_v (identifier___class__) identifier___class__ )attribute )argument_list )call (argument_list (identifier_v) identifier_v )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_rv) identifier_rv )return_statement )block )function_definition )module
Our version of `attrs.asdict`, so we can call back to us.
(module (function_definition (function_name_is_edge) function_name_is_edge (parameters (identifier_obj) identifier_obj (identifier_shape) identifier_shape )parameters (block (if_statement (comparison_operator (attribute (subscript (identifier_obj) identifier_obj (integer_0) integer_0 )subscript (identifier_start) identifier_start )attribute (integer_0) integer_0 )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (attribute (subscript (identifier_obj) identifier_obj (integer_1) integer_1 )subscript (identifier_start) identifier_start )attribute (integer_0) integer_0 )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (attribute (subscript (identifier_obj) identifier_obj (integer_0) integer_0 )subscript (identifier_stop) identifier_stop )attribute (subscript (identifier_shape) identifier_shape (integer_0) integer_0 )subscript )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (attribute (subscript (identifier_obj) identifier_obj (integer_1) integer_1 )subscript (identifier_stop) identifier_stop )attribute (subscript (identifier_shape) identifier_shape (integer_1) integer_1 )subscript )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Check if a 2d object is on the edge of the array. Parameters ---------- obj : tuple(slice, slice) Pair of slices (e.g. from scipy.ndimage.measurements.find_objects) shape : tuple(int, int) Array shape. Returns ------- b : boolean True if the object touches any edge of the array, else False.
(module (function_definition (function_name_rekey_multi) function_name_rekey_multi (parameters (identifier_self) identifier_self (identifier_keys) identifier_keys (default_parameter (identifier_nonce) identifier_nonce (None) None )default_parameter (default_parameter (identifier_recovery_key) identifier_recovery_key (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (None) None )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_keys) identifier_keys (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_self) identifier_self (identifier_rekey) identifier_rekey )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_nonce) identifier_nonce (identifier_nonce) identifier_nonce )keyword_argument (keyword_argument (identifier_recovery_key) identifier_recovery_key (identifier_recovery_key) identifier_recovery_key )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_result) identifier_result (identifier_get) identifier_get )attribute (argument_list (string_'complete') string_'complete' )argument_list )call (block (break_statement )break_statement )block )if_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Enter multiple recovery key shares to progress the rekey of the Vault. If the threshold number of recovery key shares is reached, Vault will complete the rekey. :param keys: Specifies multiple recovery share keys. :type keys: list :param nonce: Specifies the nonce of the rekey operation. :type nonce: str | unicode :param recovery_key: If true, send requests to "rekey-recovery-key" instead of "rekey" api path. :type recovery_key: bool :return: The last response of the rekey request. :rtype: response.Request
(module (function_definition (function_name_change_password) function_name_change_password (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_form) identifier_form (call (attribute (identifier_self) identifier_self (identifier__get_form) identifier__get_form )attribute (argument_list (string_'SECURITY_CHANGE_PASSWORD_FORM') string_'SECURITY_CHANGE_PASSWORD_FORM' )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_form) identifier_form (identifier_validate_on_submit) identifier_validate_on_submit )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_security_service) identifier_security_service )attribute (identifier_change_password) identifier_change_password )attribute (argument_list (call (attribute (identifier_current_user) identifier_current_user (identifier__get_current_object) identifier__get_current_object )attribute (argument_list )argument_list )call (attribute (attribute (identifier_form) identifier_form (identifier_new_password) identifier_new_password )attribute (identifier_data) identifier_data )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_after_this_request) identifier_after_this_request )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__commit) identifier__commit )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_flash) identifier_flash )attribute (argument_list (call (identifier__) identifier__ (argument_list (string_'flask_unchained.bundles.security:flash.password_change') string_'flask_unchained.bundles.security:flash.password_change' )argument_list )call (keyword_argument (identifier_category) identifier_category (string_'success') string_'success' )keyword_argument )argument_list )call )expression_statement (if_statement (attribute (identifier_request) identifier_request (identifier_is_json) identifier_is_json )attribute (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_jsonify) identifier_jsonify )attribute (argument_list (dictionary (pair (string_'token') string_'token' (call (attribute (identifier_current_user) identifier_current_user (identifier_get_auth_token) identifier_get_auth_token )attribute (argument_list )argument_list )call )pair )dictionary )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_redirect) identifier_redirect )attribute (argument_list (string_'SECURITY_POST_CHANGE_REDIRECT_ENDPOINT') string_'SECURITY_POST_CHANGE_REDIRECT_ENDPOINT' (string_'SECURITY_POST_LOGIN_REDIRECT_ENDPOINT') string_'SECURITY_POST_LOGIN_REDIRECT_ENDPOINT' )argument_list )call )return_statement )block (elif_clause (boolean_operator (attribute (identifier_form) identifier_form (identifier_errors) identifier_errors )attribute (attribute (identifier_request) identifier_request (identifier_is_json) identifier_is_json )attribute )boolean_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_errors) identifier_errors )attribute (argument_list (attribute (identifier_form) identifier_form (identifier_errors) identifier_errors )attribute )argument_list )call )return_statement )block )elif_clause )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_render) identifier_render )attribute (argument_list (string_'change_password') string_'change_password' (keyword_argument (identifier_change_password_form) identifier_change_password_form (identifier_form) identifier_form )keyword_argument (dictionary_splat (call (attribute (attribute (identifier_self) identifier_self (identifier_security) identifier_security )attribute (identifier_run_ctx_processor) identifier_run_ctx_processor )attribute (argument_list (string_'change_password') string_'change_password' )argument_list )call )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
View function for a user to change their password. Supports html and json requests.
(module (function_definition (function_name_return_port) function_name_return_port (parameters (identifier_port) identifier_port )parameters (block (if_statement (comparison_operator (identifier_port) identifier_port (identifier__random_ports) identifier__random_ports )comparison_operator (block (expression_statement (call (attribute (identifier__random_ports) identifier__random_ports (identifier_remove) identifier_remove )attribute (argument_list (identifier_port) identifier_port )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_port) identifier_port (identifier__owned_ports) identifier__owned_ports )comparison_operator (block (expression_statement (call (attribute (identifier__owned_ports) identifier__owned_ports (identifier_remove) identifier_remove )attribute (argument_list (identifier_port) identifier_port )argument_list )call )expression_statement (expression_statement (call (attribute (identifier__free_ports) identifier__free_ports (identifier_add) identifier_add )attribute (argument_list (identifier_port) identifier_port )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_port) identifier_port (identifier__free_ports) identifier__free_ports )comparison_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (string_"Returning a port that was already returned: %s") string_"Returning a port that was already returned: %s" (identifier_port) identifier_port )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (string_"Returning a port that wasn't given by portpicker: %s") string_"Returning a port that wasn't given by portpicker: %s" (identifier_port) identifier_port )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Return a port that is no longer being used so it can be reused.
(module (function_definition (function_name_handle_client_new_job) function_name_handle_client_new_job (parameters (identifier_self) identifier_self (identifier_client_addr) identifier_client_addr (typed_parameter (identifier_message) identifier_message (type (identifier_ClientNewJob) identifier_ClientNewJob )type )typed_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_info) identifier_info )attribute (argument_list (string_"Adding a new job %s %s to the queue") string_"Adding a new job %s %s to the queue" (identifier_client_addr) identifier_client_addr (attribute (identifier_message) identifier_message (identifier_job_id) identifier_job_id )attribute )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__waiting_jobs) identifier__waiting_jobs )attribute (tuple (identifier_client_addr) identifier_client_addr (attribute (identifier_message) identifier_message (identifier_job_id) identifier_job_id )attribute )tuple )subscript (identifier_message) identifier_message )assignment )expression_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_update_queue) identifier_update_queue )attribute (argument_list )argument_list )call )await )expression_statement )block )function_definition )module
Handle an ClientNewJob message. Add a job to the queue and triggers an update
(module (function_definition (function_name_int2str) function_name_int2str (parameters (identifier_self) identifier_self (identifier_num) identifier_num )parameters (block (if_statement (comparison_operator (call (identifier_int) identifier_int (argument_list (identifier_num) identifier_num )argument_list )call (identifier_num) identifier_num )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'number must be an integer') string_'number must be an integer' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_num) identifier_num (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'number must be positive') string_'number must be positive' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_radix) identifier_radix (identifier_alphabet) identifier_alphabet )pattern_list (expression_list (attribute (identifier_self) identifier_self (identifier_radix) identifier_radix )attribute (attribute (identifier_self) identifier_self (identifier_alphabet) identifier_alphabet )attribute )expression_list )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_radix) identifier_radix (tuple (integer_8) integer_8 (integer_10) integer_10 (integer_16) integer_16 )tuple )comparison_operator (line_continuation_\) line_continuation_\ (comparison_operator (call (attribute (subscript (identifier_alphabet) identifier_alphabet (slice (colon) colon (identifier_radix) identifier_radix )slice )subscript (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (call (attribute (subscript (identifier_BASE85) identifier_BASE85 (slice (colon) colon (identifier_radix) identifier_radix )slice )subscript (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (return_statement (call (attribute (parenthesized_expression (binary_operator (subscript (dictionary (pair (integer_8) integer_8 (string_'%o') string_'%o' )pair (pair (integer_10) integer_10 (string_'%d') string_'%d' )pair (pair (integer_16) integer_16 (string_'%x') string_'%x' )pair )dictionary (identifier_radix) identifier_radix )subscript (identifier_num) identifier_num )binary_operator )parenthesized_expression (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_ret) identifier_ret (string_'') string_'' )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (identifier_ret) identifier_ret (binary_operator (subscript (identifier_alphabet) identifier_alphabet (binary_operator (identifier_num) identifier_num (identifier_radix) identifier_radix )binary_operator )subscript (identifier_ret) identifier_ret )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_num) identifier_num (identifier_radix) identifier_radix )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (augmented_assignment (identifier_num) identifier_num (identifier_radix) identifier_radix )augmented_assignment )expression_statement )block )while_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Converts an integer into a string. :param num: A numeric value to be converted to another base as a string. :rtype: string :raise TypeError: when *num* isn't an integer :raise ValueError: when *num* isn't positive
(module (function_definition (function_name_mcast_sender) function_name_mcast_sender (parameters (default_parameter (identifier_mcgroup) identifier_mcgroup (identifier_MC_GROUP) identifier_MC_GROUP )default_parameter )parameters (block (expression_statement (assignment (identifier_sock) identifier_sock (call (identifier_socket) identifier_socket (argument_list (identifier_AF_INET) identifier_AF_INET (identifier_SOCK_DGRAM) identifier_SOCK_DGRAM )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_setsockopt) identifier_setsockopt )attribute (argument_list (identifier_SOL_SOCKET) identifier_SOL_SOCKET (identifier_SO_REUSEADDR) identifier_SO_REUSEADDR (integer_1) integer_1 )argument_list )call )expression_statement (if_statement (call (identifier__is_broadcast_group) identifier__is_broadcast_group (argument_list (identifier_mcgroup) identifier_mcgroup )argument_list )call (block (expression_statement (assignment (identifier_group) identifier_group (string_'<broadcast>') string_'<broadcast>' )assignment )expression_statement (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_setsockopt) identifier_setsockopt )attribute (argument_list (identifier_SOL_SOCKET) identifier_SOL_SOCKET (identifier_SO_BROADCAST) identifier_SO_BROADCAST (integer_1) integer_1 )argument_list )call )expression_statement )block (elif_clause (parenthesized_expression (boolean_operator (parenthesized_expression (comparison_operator (call (identifier_int) identifier_int (argument_list (subscript (call (attribute (identifier_mcgroup) identifier_mcgroup (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." )argument_list )call (integer_0) integer_0 )subscript )argument_list )call (integer_239) integer_239 )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (call (identifier_int) identifier_int (argument_list (subscript (call (attribute (identifier_mcgroup) identifier_mcgroup (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." )argument_list )call (integer_0) integer_0 )subscript )argument_list )call (integer_224) integer_224 )comparison_operator )parenthesized_expression )boolean_operator )parenthesized_expression (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (string_"Invalid multicast address.") string_"Invalid multicast address." )argument_list )call )raise_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_group) identifier_group (identifier_mcgroup) identifier_mcgroup )assignment )expression_statement (expression_statement (assignment (identifier_ttl) identifier_ttl (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_'b') string_'b' (identifier_TTL_LOCALNET) identifier_TTL_LOCALNET )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_setsockopt) identifier_setsockopt )attribute (argument_list (identifier_IPPROTO_IP) identifier_IPPROTO_IP (identifier_IP_MULTICAST_TTL) identifier_IP_MULTICAST_TTL (identifier_ttl) identifier_ttl )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_sock) identifier_sock (identifier_group) identifier_group )expression_list )return_statement )block )function_definition )module
Non-object interface for sending multicast messages.
(module (function_definition (function_name_to_raster) function_name_to_raster (parameters (identifier_self) identifier_self (identifier_vector) identifier_vector )parameters (block (return_statement (call (identifier_transform) identifier_transform (argument_list (call (attribute (identifier_vector) identifier_vector (identifier_get_shape) identifier_get_shape )attribute (argument_list (attribute (identifier_vector) identifier_vector (identifier_crs) identifier_crs )attribute )argument_list )call (attribute (identifier_vector) identifier_vector (identifier_crs) identifier_crs )attribute (attribute (identifier_self) identifier_self (identifier_crs) identifier_crs )attribute (keyword_argument (identifier_dst_affine) identifier_dst_affine (unary_operator (attribute (identifier_self) identifier_self (identifier_affine) identifier_affine )attribute )unary_operator )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the vector in pixel coordinates, as shapely.Geometry.
(module (function_definition (function_name_list_replications) function_name_list_replications (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_docs) identifier_docs (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_database) identifier_database )attribute (identifier_all_docs) identifier_all_docs )attribute (argument_list (keyword_argument (identifier_include_docs) identifier_include_docs (True) True )keyword_argument )argument_list )call (string_'rows') string_'rows' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_documents) identifier_documents (list )list )assignment )expression_statement (for_statement (identifier_doc) identifier_doc (identifier_docs) identifier_docs (block (if_statement (call (attribute (subscript (identifier_doc) identifier_doc (string_'id') string_'id' )subscript (identifier_startswith) identifier_startswith )attribute (argument_list (string_'_design/') string_'_design/' )argument_list )call (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_document) identifier_document (call (identifier_Document) identifier_Document (argument_list (attribute (identifier_self) identifier_self (identifier_database) identifier_database )attribute (subscript (identifier_doc) identifier_doc (string_'id') string_'id' )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_document) identifier_document (identifier_update) identifier_update )attribute (argument_list (subscript (identifier_doc) identifier_doc (string_'doc') string_'doc' )subscript )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_documents) identifier_documents (identifier_append) identifier_append )attribute (argument_list (identifier_document) identifier_document )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_documents) identifier_documents )return_statement )block )function_definition )module
Retrieves all replication documents from the replication database. :returns: List containing replication Document objects
(module (function_definition (function_name_sort) function_name_sort (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_columns) identifier_columns )list_splat_pattern (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_sorts) identifier_sorts (call (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'sort') string_'sort' (list )list )argument_list )call )assignment )expression_statement (for_statement (identifier_column) identifier_column (identifier_columns) identifier_columns (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_column) identifier_column (identifier_Column) identifier_Column )argument_list )call (block (expression_statement (assignment (identifier_identifier) identifier_identifier (attribute (identifier_column) identifier_column (identifier_id) identifier_id )attribute )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_column) identifier_column (attribute (identifier_utils) identifier_utils (identifier_basestring) identifier_basestring )attribute )argument_list )call (block (expression_statement (assignment (identifier_descending) identifier_descending (boolean_operator (call (attribute (identifier_column) identifier_column (identifier_startswith) identifier_startswith )attribute (argument_list (string_'-') string_'-' )argument_list )call (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (string_'descending') string_'descending' (False) False )argument_list )call )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_identifier) identifier_identifier (attribute (subscript (attribute (attribute (identifier_self) identifier_self (identifier_api) identifier_api )attribute (identifier_columns) identifier_columns )attribute (call (attribute (identifier_column) identifier_column (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_'-') string_'-' )argument_list )call )subscript (identifier_id) identifier_id )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Can only sort on columns or column strings. Received: {}") string_"Can only sort on columns or column strings. Received: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_column) identifier_column )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (if_statement (identifier_descending) identifier_descending (block (expression_statement (assignment (identifier_sign) identifier_sign (string_'-') string_'-' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_sign) identifier_sign (string_'') string_'' )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_sorts) identifier_sorts (identifier_append) identifier_append )attribute (argument_list (binary_operator (identifier_sign) identifier_sign (identifier_identifier) identifier_identifier )binary_operator )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_raw) identifier_raw )attribute (string_'sort') string_'sort' )subscript (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (identifier_sorts) identifier_sorts )argument_list )call )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Return a new query which will produce results sorted by one or more metrics or dimensions. You may use plain strings for the columns, or actual `Column`, `Metric` and `Dimension` objects. Add a minus in front of the metric (either the string or the object) to sort in descending order. ```python # sort using strings query.sort('pageviews', '-device type') # alternatively, ask for a descending sort in a keyword argument query.sort('pageviews', descending=True) # sort using metric, dimension or column objects pageviews = profile.core.metrics['pageviews'] query.sort(-pageviews) ```
(module (function_definition (function_name__update_frames) function_name__update_frames (parameters (identifier_self) identifier_self (identifier_written) identifier_written )parameters (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_seekable) identifier_seekable )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_curr) identifier_curr (call (attribute (identifier_self) identifier_self (identifier_tell) identifier_tell )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier__info) identifier__info )attribute (identifier_frames) identifier_frames )attribute (call (attribute (identifier_self) identifier_self (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 (identifier_SEEK_END) identifier_SEEK_END )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_seek) identifier_seek )attribute (argument_list (identifier_curr) identifier_curr (identifier_SEEK_SET) identifier_SEEK_SET )argument_list )call )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (attribute (attribute (identifier_self) identifier_self (identifier__info) identifier__info )attribute (identifier_frames) identifier_frames )attribute (identifier_written) identifier_written )augmented_assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Update self.frames after writing.
(module (function_definition (function_name__write) function_name__write (parameters (identifier_self) identifier_self (identifier_session) identifier_session (identifier_openFile) identifier_openFile (identifier_replaceParamFile) identifier_replaceParamFile )parameters (block (expression_statement (assignment (identifier_hmetRecords) identifier_hmetRecords (attribute (identifier_self) identifier_self (identifier_hmetRecords) identifier_hmetRecords )attribute )assignment )expression_statement (for_statement (identifier_record) identifier_record (identifier_hmetRecords) identifier_hmetRecords (block (expression_statement (call (attribute (identifier_openFile) identifier_openFile (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_'%s\t%s\t%s\t%s\t%.3f\t%s\t%s\t%s\t%s\t%.2f\t%.2f\n') string_'%s\t%s\t%s\t%s\t%.3f\t%s\t%s\t%s\t%s\t%.2f\t%.2f\n' (tuple (attribute (attribute (identifier_record) identifier_record (identifier_hmetDateTime) identifier_hmetDateTime )attribute (identifier_year) identifier_year )attribute (attribute (attribute (identifier_record) identifier_record (identifier_hmetDateTime) identifier_hmetDateTime )attribute (identifier_month) identifier_month )attribute (attribute (attribute (identifier_record) identifier_record (identifier_hmetDateTime) identifier_hmetDateTime )attribute (identifier_day) identifier_day )attribute (attribute (attribute (identifier_record) identifier_record (identifier_hmetDateTime) identifier_hmetDateTime )attribute (identifier_hour) identifier_hour )attribute (attribute (identifier_record) identifier_record (identifier_barometricPress) identifier_barometricPress )attribute (attribute (identifier_record) identifier_record (identifier_relHumidity) identifier_relHumidity )attribute (attribute (identifier_record) identifier_record (identifier_totalSkyCover) identifier_totalSkyCover )attribute (attribute (identifier_record) identifier_record (identifier_windSpeed) identifier_windSpeed )attribute (attribute (identifier_record) identifier_record (identifier_dryBulbTemp) identifier_dryBulbTemp )attribute (attribute (identifier_record) identifier_record (identifier_directRad) identifier_directRad )attribute (attribute (identifier_record) identifier_record (identifier_globalRad) identifier_globalRad )attribute )tuple )binary_operator )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Write HMET WES to File Method
(module (function_definition (function_name_remove_context) function_name_remove_context (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__context) identifier__context )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_contexts) identifier_contexts )attribute (identifier_name) identifier_name )subscript )delete_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__flush_tools) identifier__flush_tools )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Remove a context from the suite. Args: name (str): Name of the context to remove.
(module (function_definition (function_name_do_python_eval) function_name_do_python_eval (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_annopath) identifier_annopath (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data_path) identifier_data_path )attribute (string_'Annotations') string_'Annotations' (string_'{:s}.xml') string_'{:s}.xml' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_imageset_file) identifier_imageset_file (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data_path) identifier_data_path )attribute (string_'ImageSets') string_'ImageSets' (string_'Main') string_'Main' (binary_operator (attribute (identifier_self) identifier_self (identifier_image_set) identifier_image_set )attribute (string_'.txt') string_'.txt' )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cache_dir) identifier_cache_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_cache_path) identifier_cache_path )attribute (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_aps) identifier_aps (list )list )assignment )expression_statement (expression_statement (assignment (identifier_use_07_metric) identifier_use_07_metric (conditional_expression (True) True (comparison_operator (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_year) identifier_year )attribute )argument_list )call (integer_2010) integer_2010 )comparison_operator (False) False )conditional_expression )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'VOC07 metric? ') string_'VOC07 metric? ' (parenthesized_expression (conditional_expression (string_'Y') string_'Y' (identifier_use_07_metric) identifier_use_07_metric (string_'No') string_'No' )conditional_expression )parenthesized_expression )binary_operator )argument_list )call )expression_statement (for_statement (pattern_list (identifier_cls_ind) identifier_cls_ind (identifier_cls) identifier_cls )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_classes) identifier_classes )attribute )argument_list )call (block (expression_statement (assignment (identifier_filename) identifier_filename (call (attribute (call (attribute (identifier_self) identifier_self (identifier_get_result_file_template) identifier_get_result_file_template )attribute (argument_list )argument_list )call (identifier_format) identifier_format )attribute (argument_list (identifier_cls) identifier_cls )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_rec) identifier_rec (identifier_prec) identifier_prec (identifier_ap) identifier_ap )pattern_list (call (identifier_voc_eval) identifier_voc_eval (argument_list (identifier_filename) identifier_filename (identifier_annopath) identifier_annopath (identifier_imageset_file) identifier_imageset_file (identifier_cls) identifier_cls (identifier_cache_dir) identifier_cache_dir (keyword_argument (identifier_ovthresh) identifier_ovthresh (float_0.5) float_0.5 )keyword_argument (keyword_argument (identifier_use_07_metric) identifier_use_07_metric (identifier_use_07_metric) identifier_use_07_metric )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_aps) identifier_aps (list (identifier_ap) identifier_ap )list )augmented_assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'AP for {} = {:.4f}') string_'AP for {} = {:.4f}' (identifier_format) identifier_format )attribute (argument_list (identifier_cls) identifier_cls (identifier_ap) identifier_ap )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'Mean AP = {:.4f}') string_'Mean AP = {:.4f}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_mean) identifier_mean )attribute (argument_list (identifier_aps) identifier_aps )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
python evaluation wrapper Returns: ---------- None
(module (function_definition (function_name_DbDeleteClassAttributeProperty) function_name_DbDeleteClassAttributeProperty (parameters (identifier_self) identifier_self (identifier_argin) identifier_argin )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__log) identifier__log )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_"In DbDeleteClassAttributeProperty()") string_"In DbDeleteClassAttributeProperty()" )argument_list )call )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_argin) identifier_argin )argument_list )call (integer_3) integer_3 )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_warn_stream) identifier_warn_stream )attribute (argument_list (string_"DataBase::db_delete_class_attribute_property(): insufficient number of arguments ") string_"DataBase::db_delete_class_attribute_property(): insufficient number of arguments " )argument_list )call )expression_statement (expression_statement (call (identifier_th_exc) identifier_th_exc (argument_list (identifier_DB_IncorrectArguments) identifier_DB_IncorrectArguments (string_"insufficient number of arguments to delete class attribute property") string_"insufficient number of arguments to delete class attribute property" (string_"DataBase::DeleteClassAttributeProperty()") string_"DataBase::DeleteClassAttributeProperty()" )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_klass_name) identifier_klass_name (identifier_attr_name) identifier_attr_name )pattern_list (subscript (identifier_argin) identifier_argin (slice (colon) colon (integer_2) integer_2 )slice )subscript )assignment )expression_statement (for_statement (identifier_prop_name) identifier_prop_name (subscript (identifier_argin) identifier_argin (slice (integer_2) integer_2 (colon) colon )slice )subscript (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute (identifier_delete_class_attribute_property) identifier_delete_class_attribute_property )attribute (argument_list (identifier_klass_name) identifier_klass_name (identifier_attr_name) identifier_attr_name (identifier_prop_name) identifier_prop_name )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
delete class attribute properties from database :param argin: Str[0] = Tango class name Str[1] = Attribute name Str[2] = Property name Str[n] = Property name :type: tango.DevVarStringArray :return: :rtype: tango.DevVoid
(module (function_definition (function_name__extract_sel_info) function_name__extract_sel_info (parameters (identifier_sel) identifier_sel )parameters (block (import_from_statement (dotted_name (identifier_cssselect2) identifier_cssselect2 (identifier_parser) identifier_parser )dotted_name (dotted_name (identifier_CombinedSelector) identifier_CombinedSelector )dotted_name (dotted_name (identifier_CompoundSelector) identifier_CompoundSelector )dotted_name (dotted_name (identifier_PseudoClassSelector) identifier_PseudoClassSelector )dotted_name (dotted_name (identifier_FunctionalPseudoClassSelector) identifier_FunctionalPseudoClassSelector )dotted_name )import_from_statement (expression_statement (assignment (identifier_steps) identifier_steps (list )list )assignment )expression_statement (expression_statement (assignment (identifier_extras) identifier_extras (list )list )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_sel) identifier_sel (identifier_CombinedSelector) identifier_CombinedSelector )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_lstep) identifier_lstep (identifier_lextras) identifier_lextras )pattern_list (call (identifier__extract_sel_info) identifier__extract_sel_info (argument_list (attribute (identifier_sel) identifier_sel (identifier_left) identifier_left )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_rstep) identifier_rstep (identifier_rextras) identifier_rextras )pattern_list (call (identifier__extract_sel_info) identifier__extract_sel_info (argument_list (attribute (identifier_sel) identifier_sel (identifier_right) identifier_right )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_steps) identifier_steps (binary_operator (identifier_lstep) identifier_lstep (identifier_rstep) identifier_rstep )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_extras) identifier_extras (binary_operator (identifier_lextras) identifier_lextras (identifier_rextras) identifier_rextras )binary_operator )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_sel) identifier_sel (identifier_CompoundSelector) identifier_CompoundSelector )argument_list )call (block (for_statement (identifier_ssel) identifier_ssel (attribute (identifier_sel) identifier_sel (identifier_simple_selectors) identifier_simple_selectors )attribute (block (expression_statement (assignment (pattern_list (identifier_s) identifier_s (identifier_e) identifier_e )pattern_list (call (identifier__extract_sel_info) identifier__extract_sel_info (argument_list (identifier_ssel) identifier_ssel )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_steps) identifier_steps (identifier_extend) identifier_extend )attribute (argument_list (identifier_s) identifier_s )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_extras) identifier_extras (identifier_extend) identifier_extend )attribute (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement )block )for_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_sel) identifier_sel (identifier_FunctionalPseudoClassSelector) identifier_FunctionalPseudoClassSelector )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_sel) identifier_sel (identifier_name) identifier_name )attribute (string_'pass') string_'pass' )comparison_operator (block (expression_statement (call (attribute (identifier_steps) identifier_steps (identifier_append) identifier_append )attribute (argument_list (call (attribute (call (identifier_serialize) identifier_serialize (argument_list (attribute (identifier_sel) identifier_sel (identifier_arguments) identifier_arguments )attribute )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list (string_'"\'') string_'"\'' )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_sel) identifier_sel (identifier_PseudoClassSelector) identifier_PseudoClassSelector )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_sel) identifier_sel (identifier_name) identifier_name )attribute (string_'deferred') string_'deferred' )comparison_operator (block (expression_statement (call (attribute (identifier_extras) identifier_extras (identifier_append) identifier_append )attribute (argument_list (string_'deferred') string_'deferred' )argument_list )call )expression_statement )block )if_statement )block )elif_clause )if_statement (return_statement (tuple (identifier_steps) identifier_steps (identifier_extras) identifier_extras )tuple )return_statement )block )function_definition )module
Recurse down parsed tree, return pseudo class info
(module (function_definition (function_name_atlasdb_get_zonefiles_missing_count_by_name) function_name_atlasdb_get_zonefiles_missing_count_by_name (parameters (identifier_name) identifier_name (default_parameter (identifier_max_index) identifier_max_index (None) None )default_parameter (default_parameter (identifier_indexes_exclude) identifier_indexes_exclude (list )list )default_parameter (default_parameter (identifier_con) identifier_con (None) None )default_parameter (default_parameter (identifier_path) identifier_path (None) None )default_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_AtlasDBOpen) identifier_AtlasDBOpen (argument_list (keyword_argument (identifier_con) identifier_con (identifier_con) identifier_con )keyword_argument (keyword_argument (identifier_path) identifier_path (identifier_path) identifier_path )keyword_argument )argument_list )call (as_pattern_target (identifier_dbcon) identifier_dbcon )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_sql) identifier_sql (call (attribute (string_'SELECT COUNT(*) FROM zonefiles WHERE name = ? AND present = 0 {} {};') string_'SELECT COUNT(*) FROM zonefiles WHERE name = ? AND present = 0 {} {};' (identifier_format) identifier_format )attribute (argument_list (conditional_expression (string_'AND inv_index <= ?') string_'AND inv_index <= ?' (comparison_operator (identifier_max_index) identifier_max_index (None) None )comparison_operator (string_'') string_'' )conditional_expression (conditional_expression (call (attribute (string_'AND inv_index NOT IN ({})') string_'AND inv_index NOT IN ({})' (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (identifier_str) identifier_str (argument_list (call (identifier_int) identifier_int (argument_list (identifier_i) identifier_i )argument_list )call )argument_list )call (for_in_clause (identifier_i) identifier_i (identifier_indexes_exclude) identifier_indexes_exclude )for_in_clause )list_comprehension )argument_list )call )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_indexes_exclude) identifier_indexes_exclude )argument_list )call (integer_0) integer_0 )comparison_operator (string_'') string_'' )conditional_expression )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (tuple (identifier_name) identifier_name )tuple )assignment )expression_statement (if_statement (comparison_operator (identifier_max_index) identifier_max_index (None) None )comparison_operator (block (expression_statement (augmented_assignment (identifier_args) identifier_args (tuple (identifier_max_index) identifier_max_index )tuple )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_cur) identifier_cur (call (attribute (identifier_dbcon) identifier_dbcon (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (identifier_atlasdb_query_execute) identifier_atlasdb_query_execute (argument_list (identifier_cur) identifier_cur (identifier_sql) identifier_sql (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (for_statement (identifier_row) identifier_row (identifier_res) identifier_res (block (return_statement (subscript (identifier_row) identifier_row (string_'COUNT(*)') string_'COUNT(*)' )subscript )return_statement )block )for_statement )block )with_statement )block )function_definition )module
Get the number of missing zone files for a particular name, optionally up to a maximum zonefile index and optionally omitting particular zone files in the count. Returns an integer
(module (function_definition (function_name__process_value) function_name__process_value (parameters (identifier_self) identifier_self (identifier_value) identifier_value (identifier_type) identifier_type )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (binary_operator (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute (tuple (identifier_list) identifier_list )tuple )binary_operator )argument_list )call )not_operator (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Process a value that will be sent to backend :param value: the value to return :param type: hint for what sort of value this is :type type: str
(module (function_definition (function_name_addComponentToPathway) function_name_addComponentToPathway (parameters (identifier_self) identifier_self (identifier_component_id) identifier_component_id (identifier_pathway_id) identifier_pathway_id )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_graph) identifier_graph )attribute (identifier_addTriple) identifier_addTriple )attribute (argument_list (identifier_component_id) identifier_component_id (subscript (attribute (identifier_self) identifier_self (identifier_globaltt) identifier_globaltt )attribute (string_'involved in') string_'involved in' )subscript (identifier_pathway_id) identifier_pathway_id )argument_list )call )expression_statement (return_statement )return_statement )block )function_definition )module
This can be used directly when the component is directly involved in the pathway. If a transforming event is performed on the component first, then the addGeneToPathway should be used instead. :param pathway_id: :param component_id: :return:
(module (function_definition (function_name_addLoginMethod) function_name_addLoginMethod (parameters (identifier_self) identifier_self (identifier_localpart) identifier_localpart (identifier_domain) identifier_domain (default_parameter (identifier_protocol) identifier_protocol (identifier_ANY_PROTOCOL) identifier_ANY_PROTOCOL )default_parameter (default_parameter (identifier_verified) identifier_verified (False) False )default_parameter (default_parameter (identifier_internal) identifier_internal (False) False )default_parameter )parameters (block (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_parent) identifier_parent )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_otherStore) identifier_otherStore (call (attribute (attribute (identifier_self) identifier_self (identifier_avatars) identifier_avatars )attribute (identifier_open) identifier_open )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_peer) identifier_peer (call (attribute (identifier_otherStore) identifier_otherStore (identifier_findUnique) identifier_findUnique )attribute (argument_list (identifier_LoginAccount) identifier_LoginAccount )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_otherStore) identifier_otherStore (attribute (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_parent) identifier_parent )attribute )assignment )expression_statement (expression_statement (assignment (identifier_subStoreItem) identifier_subStoreItem (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_parent) identifier_parent )attribute (identifier_getItemByID) identifier_getItemByID )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_idInParent) identifier_idInParent )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_peer) identifier_peer (call (attribute (identifier_otherStore) identifier_otherStore (identifier_findUnique) identifier_findUnique )attribute (argument_list (identifier_LoginAccount) identifier_LoginAccount (comparison_operator (attribute (identifier_LoginAccount) identifier_LoginAccount (identifier_avatars) identifier_avatars )attribute (identifier_subStoreItem) identifier_subStoreItem )comparison_operator )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (for_statement (pattern_list (identifier_store) identifier_store (identifier_account) identifier_account )pattern_list (list (tuple (identifier_otherStore) identifier_otherStore (identifier_peer) identifier_peer )tuple (tuple (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_self) identifier_self )tuple )list (block (expression_statement (call (attribute (identifier_store) identifier_store (identifier_findOrCreate) identifier_findOrCreate )attribute (argument_list (identifier_LoginMethod) identifier_LoginMethod (keyword_argument (identifier_account) identifier_account (identifier_account) identifier_account )keyword_argument (keyword_argument (identifier_localpart) identifier_localpart (identifier_localpart) identifier_localpart )keyword_argument (keyword_argument (identifier_domain) identifier_domain (identifier_domain) identifier_domain )keyword_argument (keyword_argument (identifier_protocol) identifier_protocol (identifier_protocol) identifier_protocol )keyword_argument (keyword_argument (identifier_verified) identifier_verified (identifier_verified) identifier_verified )keyword_argument (keyword_argument (identifier_internal) identifier_internal (identifier_internal) identifier_internal )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Add a login method to this account, propogating up or down as necessary to site store or user store to maintain consistency.
(module (function_definition (function_name_get_threads) function_name_get_threads (parameters (identifier_self) identifier_self (identifier_querystring) identifier_querystring (default_parameter (identifier_sort) identifier_sort (string_'newest_first') string_'newest_first' )default_parameter (default_parameter (identifier_exclude_tags) identifier_exclude_tags (None) None )default_parameter )parameters (block (assert_statement (comparison_operator (identifier_sort) identifier_sort (attribute (identifier_self) identifier_self (identifier__sort_orders) identifier__sort_orders )attribute )comparison_operator )assert_statement (expression_statement (assignment (identifier_q) identifier_q (call (attribute (identifier_self) identifier_self (identifier_query) identifier_query )attribute (argument_list (identifier_querystring) identifier_querystring )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_q) identifier_q (identifier_set_sort) identifier_set_sort )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier__sort_orders) identifier__sort_orders )attribute (identifier_sort) identifier_sort )subscript )argument_list )call )expression_statement (if_statement (identifier_exclude_tags) identifier_exclude_tags (block (for_statement (identifier_tag) identifier_tag (identifier_exclude_tags) identifier_exclude_tags (block (expression_statement (call (attribute (identifier_q) identifier_q (identifier_exclude_tag) identifier_exclude_tag )attribute (argument_list (identifier_tag) identifier_tag )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_async_) identifier_async_ )attribute (argument_list (attribute (identifier_q) identifier_q (identifier_search_threads) identifier_search_threads )attribute (parenthesized_expression (lambda (lambda_parameters (identifier_a) identifier_a )lambda_parameters (call (attribute (identifier_a) identifier_a (identifier_get_thread_id) identifier_get_thread_id )attribute (argument_list )argument_list )call )lambda )parenthesized_expression )argument_list )call )return_statement )block )function_definition )module
asynchronously look up thread ids matching `querystring`. :param querystring: The query string to use for the lookup :type querystring: str. :param sort: Sort order. one of ['oldest_first', 'newest_first', 'message_id', 'unsorted'] :type query: str :param exclude_tags: Tags to exclude by default unless included in the search :type exclude_tags: list of str :returns: a pipe together with the process that asynchronously writes to it. :rtype: (:class:`multiprocessing.Pipe`, :class:`multiprocessing.Process`)
(module (function_definition (function_name_particles_by_name) function_name_particles_by_name (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (for_statement (identifier_particle) identifier_particle (call (attribute (identifier_self) identifier_self (identifier_particles) identifier_particles )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_particle) identifier_particle (identifier_name) identifier_name )attribute (identifier_name) identifier_name )comparison_operator (block (expression_statement (yield (identifier_particle) identifier_particle )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Return all Particles of the Compound with a specific name Parameters ---------- name : str Only particles with this name are returned Yields ------ mb.Compound The next Particle in the Compound with the user-specified name
(module (function_definition (function_name_timeit) function_name_timeit (parameters (identifier_func) identifier_func )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name_timer_wrapper) function_name_timer_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_Timer) identifier_Timer (argument_list )argument_list )call (as_pattern_target (identifier_timer) identifier_timer )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_result) identifier_result (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 )assignment )expression_statement )block )with_statement (return_statement (expression_list (identifier_result) identifier_result (identifier_timer) identifier_timer )expression_list )return_statement )block )function_definition )decorated_definition (return_statement (identifier_timer_wrapper) identifier_timer_wrapper )return_statement )block )function_definition )module
Returns the number of seconds that a function took along with the result
(module (function_definition (function_name__generate) function_name__generate (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_needs_close) identifier_needs_close (False) False )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_sys) identifier_sys (identifier_hexversion) identifier_hexversion )attribute (integer_0x03000000) integer_0x03000000 )comparison_operator (block (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__opts) identifier__opts )attribute (identifier_output) identifier_output )attribute (string_'-') string_'-' )comparison_operator (block (import_from_statement (dotted_name (identifier_io) identifier_io )dotted_name (dotted_name (identifier_TextIOWrapper) identifier_TextIOWrapper )dotted_name )import_from_statement (expression_statement (assignment (identifier_pyfile) identifier_pyfile (call (identifier_TextIOWrapper) identifier_TextIOWrapper (argument_list (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_buffer) identifier_buffer )attribute (keyword_argument (identifier_encoding) identifier_encoding (string_'utf8') string_'utf8' )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_pyfile) identifier_pyfile (call (identifier_open) identifier_open (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__opts) identifier__opts )attribute (identifier_output) identifier_output )attribute (string_'wt') string_'wt' (keyword_argument (identifier_encoding) identifier_encoding (string_'utf8') string_'utf8' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_needs_close) identifier_needs_close (True) True )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__opts) identifier__opts )attribute (identifier_output) identifier_output )attribute (string_'-') string_'-' )comparison_operator (block (expression_statement (assignment (identifier_pyfile) identifier_pyfile (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_pyfile) identifier_pyfile (call (identifier_open) identifier_open (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__opts) identifier__opts )attribute (identifier_output) identifier_output )attribute (string_'wt') string_'wt' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_needs_close) identifier_needs_close (True) True )assignment )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_import_from) identifier_import_from (attribute (attribute (identifier_self) identifier_self (identifier__opts) identifier__opts )attribute (identifier_import_from) identifier_import_from )attribute )assignment )expression_statement (if_statement (identifier_import_from) identifier_import_from (block (expression_statement (assignment (identifier_from_imports) identifier_from_imports (True) True )assignment )expression_statement )block (elif_clause (attribute (attribute (identifier_self) identifier_self (identifier__opts) identifier__opts )attribute (identifier_from_imports) identifier_from_imports )attribute (block (expression_statement (assignment (identifier_from_imports) identifier_from_imports (True) True )assignment )expression_statement (expression_statement (assignment (identifier_import_from) identifier_import_from (string_'.') string_'.' )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_from_imports) identifier_from_imports (False) False )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (identifier_compileUi) identifier_compileUi (argument_list (attribute (identifier_self) identifier_self (identifier__ui_file) identifier__ui_file )attribute (identifier_pyfile) identifier_pyfile (attribute (attribute (identifier_self) identifier_self (identifier__opts) identifier__opts )attribute (identifier_execute) identifier_execute )attribute (attribute (attribute (identifier_self) identifier_self (identifier__opts) identifier__opts )attribute (identifier_indent) identifier_indent )attribute (identifier_from_imports) identifier_from_imports (attribute (attribute (identifier_self) identifier_self (identifier__opts) identifier__opts )attribute (identifier_resource_suffix) identifier_resource_suffix )attribute (identifier_import_from) identifier_import_from )argument_list )call )expression_statement (if_statement (identifier_needs_close) identifier_needs_close (block (expression_statement (call (attribute (identifier_pyfile) identifier_pyfile (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Generate the Python code.
(module (function_definition (function_name__extract_image_urls) function_name__extract_image_urls (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_resultsPage) identifier_resultsPage (attribute (attribute (identifier_self) identifier_self (identifier__chromeDriver) identifier__chromeDriver )attribute (identifier_page_source) identifier_page_source )attribute )assignment )expression_statement (expression_statement (assignment (identifier_resultsPageSoup) identifier_resultsPageSoup (call (identifier_BeautifulSoup) identifier_BeautifulSoup (argument_list (identifier_resultsPage) identifier_resultsPage (string_'html.parser') string_'html.parser' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_images) identifier_images (call (attribute (identifier_resultsPageSoup) identifier_resultsPageSoup (identifier_find_all) identifier_find_all )attribute (argument_list (string_'div') string_'div' (keyword_argument (identifier_class_) identifier_class_ (string_'rg_meta') string_'rg_meta' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_images) identifier_images (list_comprehension (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (subscript (attribute (identifier_image) identifier_image (identifier_contents) identifier_contents )attribute (integer_0) integer_0 )subscript )argument_list )call (for_in_clause (identifier_image) identifier_image (identifier_images) identifier_images )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (list_comprehension (call (attribute (attribute (identifier_self) identifier_self (identifier__imageURLs) identifier__imageURLs )attribute (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_image) identifier_image (string_'ou') string_'ou' )subscript )argument_list )call (for_in_clause (identifier_image) identifier_image (identifier_images) identifier_images )for_in_clause )list_comprehension )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__imageURLsExtractedCount) identifier__imageURLsExtractedCount )attribute (call (identifier_len) identifier_len (argument_list (identifier_images) identifier_images )argument_list )call )augmented_assignment )expression_statement )block )function_definition )module
Retrieves image URLs from the current page
(module (function_definition (function_name_groupReadOnlyViews) function_name_groupReadOnlyViews (parameters (identifier_self) identifier_self (identifier_person) identifier_person )parameters (block (expression_statement (assignment (identifier_grouped) identifier_grouped (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_contactType) identifier_contactType (call (attribute (identifier_self) identifier_self (identifier_getContactTypes) identifier_getContactTypes )attribute (argument_list )argument_list )call (block (for_statement (identifier_contactItem) identifier_contactItem (call (attribute (identifier_contactType) identifier_contactType (identifier_getContactItems) identifier_getContactItems )attribute (argument_list (identifier_person) identifier_person )argument_list )call (block (expression_statement (assignment (identifier_contactGroup) identifier_contactGroup (call (attribute (identifier_contactType) identifier_contactType (identifier_getContactGroup) identifier_getContactGroup )attribute (argument_list (identifier_contactItem) identifier_contactItem )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_contactGroup) identifier_contactGroup (None) None )comparison_operator (block (expression_statement (assignment (identifier_contactGroup) identifier_contactGroup (attribute (identifier_contactGroup) identifier_contactGroup (identifier_groupName) identifier_groupName )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_contactGroup) identifier_contactGroup (identifier_grouped) identifier_grouped )comparison_operator (block (expression_statement (assignment (subscript (identifier_grouped) identifier_grouped (identifier_contactGroup) identifier_contactGroup )subscript (list )list )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (identifier_grouped) identifier_grouped (identifier_contactGroup) identifier_contactGroup )subscript (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_contactType) identifier_contactType (identifier_getReadOnlyView) identifier_getReadOnlyView )attribute (argument_list (identifier_contactItem) identifier_contactItem )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_grouped) identifier_grouped )return_statement )block )function_definition )module
Collect all contact items from the available contact types for the given person, organize them by contact group, and turn them into read-only views. @type person: L{Person} @param person: The person whose contact items we're interested in. @return: A mapping of of L{ContactGroup} names to the read-only views of their member contact items, with C{None} being the key for groupless contact items. @rtype: C{dict} of C{str}
(module (function_definition (function_name_GetParsersInformation) function_name_GetParsersInformation (parameters (identifier_cls) identifier_cls )parameters (block (expression_statement (assignment (identifier_parsers_information) identifier_parsers_information (list )list )assignment )expression_statement (for_statement (pattern_list (identifier__) identifier__ (identifier_parser_class) identifier_parser_class )pattern_list (call (attribute (identifier_cls) identifier_cls (identifier_GetParsers) identifier_GetParsers )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_description) identifier_description (call (identifier_getattr) identifier_getattr (argument_list (identifier_parser_class) identifier_parser_class (string_'DESCRIPTION') string_'DESCRIPTION' (string_'') string_'' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parsers_information) identifier_parsers_information (identifier_append) identifier_append )attribute (argument_list (tuple (attribute (identifier_parser_class) identifier_parser_class (identifier_NAME) identifier_NAME )attribute (identifier_description) identifier_description )tuple )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_parsers_information) identifier_parsers_information )return_statement )block )function_definition )module
Retrieves the parsers information. Returns: list[tuple[str, str]]: parser names and descriptions.
(module (function_definition (function_name_load) function_name_load (parameters (identifier_cls) identifier_cls (identifier_path) identifier_path )parameters (block (assert_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_path) identifier_path )argument_list )call (binary_operator (string_"No such file: %r") string_"No such file: %r" (identifier_path) identifier_path )binary_operator )assert_statement (expression_statement (assignment (tuple_pattern (identifier_folder) identifier_folder (identifier_filename) identifier_filename )tuple_pattern (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (tuple_pattern (identifier_name) identifier_name (identifier_extension) identifier_extension )tuple_pattern (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_wave) identifier_wave (call (identifier_Waveform) identifier_Waveform (argument_list (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_wave) identifier_wave (identifier__path) identifier__path )attribute (identifier_path) identifier_path )assignment )expression_statement (return_statement (identifier_wave) identifier_wave )return_statement )block )function_definition )module
Load Waveform from file.
(module (function_definition (function_name_in_same_dir) function_name_in_same_dir (parameters (identifier_as_file) identifier_as_file (identifier_target_file) identifier_target_file )parameters (block (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_as_file) identifier_as_file )argument_list )call (identifier_target_file) identifier_target_file )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return an absolute path to a target file that is located in the same directory as as_file Args: as_file: File name (including __file__) Use the directory path of this file target_file: Name of the target file
(module (function_definition (function_name_send_scp) function_name_send_scp (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_"x") string_"x" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y) identifier_y (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_"y") string_"y" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_p) identifier_p (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_"p") string_"p" )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__send_scp) identifier__send_scp )attribute (argument_list (identifier_x) identifier_x (identifier_y) identifier_y (identifier_p) identifier_p (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Transmit an SCP Packet and return the response. This function is a thin wrapper around :py:meth:`rig.machine_control.scp_connection.SCPConnection.send_scp`. This function will attempt to use the SCP connection nearest the destination of the SCP command if multiple connections have been discovered using :py:meth:`.discover_connections`. Parameters ---------- x : int y : int p : int *args **kwargs
(module (function_definition (function_name_make_local_dirs) function_name_make_local_dirs (parameters (identifier_dl_dir) identifier_dl_dir (identifier_dl_inputs) identifier_dl_inputs (identifier_keep_subdirs) identifier_keep_subdirs )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_dl_dir) identifier_dl_dir )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_dl_dir) identifier_dl_dir )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'Created local base download directory: %s') string_'Created local base download directory: %s' (identifier_dl_dir) identifier_dl_dir )binary_operator )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_keep_subdirs) identifier_keep_subdirs (block (expression_statement (assignment (identifier_dl_dirs) identifier_dl_dirs (call (identifier_set) identifier_set (argument_list (list_comprehension (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_dl_dir) identifier_dl_dir (subscript (identifier_d) identifier_d (integer_1) integer_1 )subscript )argument_list )call (for_in_clause (identifier_d) identifier_d (identifier_dl_inputs) identifier_dl_inputs )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (for_statement (identifier_d) identifier_d (identifier_dl_dirs) identifier_dl_dirs (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_d) identifier_d )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_d) identifier_d )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )if_statement (return_statement )return_statement )block )function_definition )module
Make any required local directories to prepare for downloading
(module (function_definition (function_name_publish) function_name_publish (parameters (identifier_self) identifier_self (identifier_distribution) identifier_distribution (default_parameter (identifier_storage) identifier_storage (string_"") string_"" )default_parameter )parameters (block (try_statement (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier__publishes) identifier__publishes )attribute (identifier_distribution) identifier_distribution )subscript )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__publishes) identifier__publishes )attribute (identifier_distribution) identifier_distribution )subscript (call (identifier_Publish) identifier_Publish (argument_list (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_distribution) identifier_distribution (keyword_argument (identifier_timestamp) identifier_timestamp (attribute (identifier_self) identifier_self (identifier_timestamp) identifier_timestamp )attribute )keyword_argument (keyword_argument (identifier_storage) identifier_storage (parenthesized_expression (boolean_operator (identifier_storage) identifier_storage (attribute (identifier_self) identifier_self (identifier_storage) identifier_storage )attribute )boolean_operator )parenthesized_expression )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier__publishes) identifier__publishes )attribute (identifier_distribution) identifier_distribution )subscript )return_statement )block )except_clause )try_statement )block )function_definition )module
Get or create publish
(module (function_definition (function_name_object) function_name_object (parameters (identifier_self) identifier_self (identifier_infotype) identifier_infotype (identifier_key) identifier_key )parameters (block (expression_statement (string_"Return the encoding, idletime, or refcount about the key") string_"Return the encoding, idletime, or refcount about the key" )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_execute_command) identifier_execute_command )attribute (argument_list (string_'OBJECT') string_'OBJECT' (identifier_infotype) identifier_infotype (identifier_key) identifier_key (keyword_argument (identifier_infotype) identifier_infotype (identifier_infotype) identifier_infotype )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the encoding, idletime, or refcount about the key
(module (function_definition (function_name_get_emitter) function_name_get_emitter (parameters (identifier_self) identifier_self (typed_parameter (identifier_name) identifier_name (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (generic_type (identifier_Callable) identifier_Callable (type_parameter (type (list (identifier_Event) identifier_Event )list )type (type (identifier_Event) identifier_Event )type )type_parameter )generic_type )type (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__event_manager) identifier__event_manager )attribute (identifier_get_emitter) identifier_get_emitter )attribute (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block )function_definition )module
Gets and emitter for a named event. Parameters ---------- name : The name of the event he requested emitter will emit. Users may provide their own named events by requesting an emitter with this function, but should do so with caution as it makes time much more difficult to think about. Returns ------- An emitter for the named event. The emitter should be called by the requesting component at the appropriate point in the simulation lifecycle.
(module (function_definition (function_name_redirect_output) function_name_redirect_output (parameters (identifier_fileobj) identifier_fileobj )parameters (block (expression_statement (assignment (identifier_old) identifier_old (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_fileobj) identifier_fileobj )assignment )expression_statement (try_statement (block (expression_statement (yield (identifier_fileobj) identifier_fileobj )yield )expression_statement )block (finally_clause (block (expression_statement (assignment (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_old) identifier_old )assignment )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Redirect standard out to file.
(module (function_definition (function_name_read_kioslaverc) function_name_read_kioslaverc (parameters (identifier_kde_config_dir) identifier_kde_config_dir )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_filename) identifier_filename (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_kde_config_dir) identifier_kde_config_dir (string_"kioslaverc") string_"kioslaverc" )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename )argument_list )call (as_pattern_target (identifier_fd) identifier_fd )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_line) identifier_line (identifier_fd) identifier_fd (block (expression_statement (assignment (identifier_line) identifier_line (call (attribute (identifier_line) identifier_line (identifier_rstrip) identifier_rstrip )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_line) identifier_line (identifier_startswith) identifier_startswith )attribute (argument_list (string_'[') string_'[' )argument_list )call (block (expression_statement (assignment (identifier_in_proxy_settings) identifier_in_proxy_settings (call (attribute (identifier_line) identifier_line (identifier_startswith) identifier_startswith )attribute (argument_list (string_"[Proxy Settings]") string_"[Proxy Settings]" )argument_list )call )assignment )expression_statement )block (elif_clause (identifier_in_proxy_settings) identifier_in_proxy_settings (block (if_statement (comparison_operator (string_'=') string_'=' (identifier_line) identifier_line )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list (string_'=') string_'=' (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_key) identifier_key (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_value) identifier_value (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_key) identifier_key )not_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_key) identifier_key (call (attribute (call (attribute (identifier_loc_ro) identifier_loc_ro (identifier_sub) identifier_sub )attribute (argument_list (string_"") string_"" (identifier_key) identifier_key )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_key) identifier_key )not_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (identifier_add_kde_setting) identifier_add_kde_setting (argument_list (identifier_key) identifier_key (identifier_value) identifier_value (identifier_data) identifier_data )argument_list )call )expression_statement )block )elif_clause )if_statement )block )for_statement )block )with_statement (expression_statement (call (identifier_resolve_kde_settings) identifier_resolve_kde_settings (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Read kioslaverc into data dictionary.