sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_ratechangebase) function_name_ratechangebase (parameters (identifier_self) identifier_self (identifier_ratefactor) identifier_ratefactor (identifier_current_base) identifier_current_base (identifier_new_base) identifier_new_base )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__multiplier) identifier__multiplier )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (attribute (identifier_logging) identifier_logging (identifier_WARNING) identifier_WARNING )attribute (string_"CurrencyHandler: changing base ourselves") string_"CurrencyHandler: changing base ourselves" )argument_list )call )expression_statement (if_statement (comparison_operator (call (identifier_Decimal) identifier_Decimal (argument_list (integer_1) integer_1 )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_get_ratefactor) identifier_get_ratefactor )attribute (argument_list (identifier_current_base) identifier_current_base (identifier_current_base) identifier_current_base )argument_list )call )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_"CurrencyHandler: current baserate: %s not 1") string_"CurrencyHandler: current baserate: %s not 1" (identifier_current_base) identifier_current_base )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__multiplier) identifier__multiplier )attribute (binary_operator (call (identifier_Decimal) identifier_Decimal (argument_list (integer_1) integer_1 )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_get_ratefactor) identifier_get_ratefactor )attribute (argument_list (identifier_current_base) identifier_current_base (identifier_new_base) identifier_new_base )argument_list )call )binary_operator )assignment )expression_statement )block )if_statement (return_statement (call (attribute (parenthesized_expression (binary_operator (identifier_ratefactor) identifier_ratefactor (attribute (identifier_self) identifier_self (identifier__multiplier) identifier__multiplier )attribute )binary_operator )parenthesized_expression (identifier_quantize) identifier_quantize )attribute (argument_list (call (identifier_Decimal) identifier_Decimal (argument_list (string_".0001") string_".0001" )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Local helper function for changing currency base, returns new rate in new base Defaults to ROUND_HALF_EVEN
(module (function_definition (function_name__extract_peaks) function_name__extract_peaks (parameters (identifier_specgram) identifier_specgram (identifier_neighborhood) identifier_neighborhood (identifier_threshold) identifier_threshold )parameters (block (expression_statement (assignment (identifier_kernel) identifier_kernel (call (attribute (identifier_np) identifier_np (identifier_ones) identifier_ones )attribute (argument_list (keyword_argument (identifier_shape) identifier_shape (identifier_neighborhood) identifier_neighborhood )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_local_averages) identifier_local_averages (call (identifier_convolve) identifier_convolve (argument_list (identifier_specgram) identifier_specgram (binary_operator (identifier_kernel) identifier_kernel (call (attribute (identifier_kernel) identifier_kernel (identifier_sum) identifier_sum )attribute (argument_list )argument_list )call )binary_operator (keyword_argument (identifier_mode) identifier_mode (string_"constant") string_"constant" )keyword_argument (keyword_argument (identifier_cval) identifier_cval (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_floor) identifier_floor (binary_operator (parenthesized_expression (binary_operator (integer_1) integer_1 (identifier_threshold) identifier_threshold )binary_operator )parenthesized_expression (identifier_local_averages) identifier_local_averages )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_candidates) identifier_candidates (call (attribute (identifier_np) identifier_np (identifier_where) identifier_where )attribute (argument_list (comparison_operator (identifier_specgram) identifier_specgram (identifier_floor) identifier_floor )comparison_operator (identifier_specgram) identifier_specgram (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_local_maximums) identifier_local_maximums (call (identifier_grey_dilation) identifier_grey_dilation (argument_list (identifier_candidates) identifier_candidates (keyword_argument (identifier_footprint) identifier_footprint (identifier_kernel) identifier_kernel )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_peak_coords) identifier_peak_coords (call (attribute (identifier_np) identifier_np (identifier_argwhere) identifier_argwhere )attribute (argument_list (comparison_operator (identifier_specgram) identifier_specgram (identifier_local_maximums) identifier_local_maximums )comparison_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_peaks) identifier_peaks (call (identifier_zip) identifier_zip (argument_list (subscript (identifier_peak_coords) identifier_peak_coords (slice (colon) colon )slice (integer_0) integer_0 )subscript (subscript (identifier_peak_coords) identifier_peak_coords (slice (colon) colon )slice (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement (return_statement (identifier_peaks) identifier_peaks )return_statement )block )function_definition )module
Partition the spectrogram into subcells and extract peaks from each cell if the peak is sufficiently energetic compared to the neighborhood.
(module (function_definition (function_name_OPERATING_SYSTEM) function_name_OPERATING_SYSTEM (parameters (identifier_stats) identifier_stats (identifier_info) identifier_info )parameters (block (expression_statement (call (attribute (identifier_info) identifier_info (identifier_append) identifier_append )attribute (argument_list (tuple (string_'architecture') string_'architecture' (call (attribute (call (attribute (identifier_platform) identifier_platform (identifier_machine) identifier_machine )attribute (argument_list )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )tuple )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_info) identifier_info (identifier_append) identifier_append )attribute (argument_list (tuple (string_'distribution') string_'distribution' (binary_operator (string_"%s;%s") string_"%s;%s" (parenthesized_expression (subscript (call (attribute (identifier_platform) identifier_platform (identifier_linux_distribution) identifier_linux_distribution )attribute (argument_list )argument_list )call (slice (integer_0) integer_0 (colon) colon (integer_2) integer_2 )slice )subscript )parenthesized_expression )binary_operator )tuple )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_info) identifier_info (identifier_append) identifier_append )attribute (argument_list (tuple (string_'system') string_'system' (binary_operator (string_"%s;%s") string_"%s;%s" (tuple (call (attribute (identifier_platform) identifier_platform (identifier_system) identifier_system )attribute (argument_list )argument_list )call (call (attribute (identifier_platform) identifier_platform (identifier_release) identifier_release )attribute (argument_list )argument_list )call )tuple )binary_operator )tuple )argument_list )call )expression_statement )block )function_definition )module
General information about the operating system. This is a flag you can pass to `Stats.submit()`.
(module (function_definition (function_name_coerce) function_name_coerce (parameters (identifier_self) identifier_self (identifier_other) identifier_other (default_parameter (identifier_is_positive) identifier_is_positive (True) True )default_parameter )parameters (block (if_statement (boolean_operator (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_other) identifier_other (string_'get_domain') string_'get_domain' )argument_list )call (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_other) identifier_other (string_'lower') string_'lower' )argument_list )call )boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_other) identifier_other (string_'upper') string_'upper' )argument_list )call )boolean_operator (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_is_domain_equal) identifier_is_domain_equal )attribute (argument_list (identifier_other) identifier_other )argument_list )call (block (return_statement (identifier_other) identifier_other )return_statement )block (else_clause (block (expression_statement (assignment (identifier_msg) identifier_msg (string_"Cannot merge partial orders with different domains!") string_"Cannot merge partial orders with different domains!" )assignment )expression_statement (raise_statement (call (identifier_CellConstructionFailure) identifier_CellConstructionFailure (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )else_clause )if_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_other) identifier_other (identifier_LinearOrderedCell) identifier_LinearOrderedCell )argument_list )call (block (raise_statement (call (identifier_NotImplemented) identifier_NotImplemented (argument_list (string_"Please Implement me!") string_"Please Implement me!" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_domain) identifier_domain (call (attribute (identifier_self) identifier_self (identifier_get_domain) identifier_get_domain )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_other) identifier_other (identifier_domain) identifier_domain )comparison_operator (block (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_is_positive) identifier_is_positive )not_operator (block (expression_statement (assignment (attribute (identifier_c) identifier_c (identifier_lower) identifier_lower )attribute (call (identifier_set) identifier_set (argument_list (list (identifier_other) identifier_other )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_c) identifier_c (identifier_upper) identifier_upper )attribute (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_c) identifier_c (identifier_upper) identifier_upper )attribute (call (identifier_set) identifier_set (argument_list (list (identifier_other) identifier_other )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_c) identifier_c (identifier_lower) identifier_lower )attribute (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_c) identifier_c )return_statement )block (else_clause (block (raise_statement (call (identifier_CellConstructionFailure) identifier_CellConstructionFailure (argument_list (binary_operator (string_"Could not coerce value that is") string_"Could not coerce value that is" (binary_operator (string_" outside order's domain . (Other = %s) ") string_" outside order's domain . (Other = %s) " (tuple (call (identifier_str) identifier_str (argument_list (identifier_other) identifier_other )argument_list )call )tuple )binary_operator )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Only copies a pointer to the new domain's cell
(module (function_definition (function_name_authenticate_xmpp) function_name_authenticate_xmpp (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_request_sid) identifier_request_sid )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_'Prepare the XMPP authentication') string_'Prepare the XMPP authentication' )argument_list )call )expression_statement (expression_statement (assignment (identifier_sasl) identifier_sasl (call (identifier_SASLClient) identifier_SASLClient (argument_list (keyword_argument (identifier_host) identifier_host (attribute (identifier_self) identifier_self (identifier_to) identifier_to )attribute )keyword_argument (keyword_argument (identifier_service) identifier_service (string_'xmpp') string_'xmpp' )keyword_argument (keyword_argument (identifier_username) identifier_username (attribute (identifier_self) identifier_self (identifier_jid) identifier_jid )attribute )keyword_argument (keyword_argument (identifier_password) identifier_password (attribute (identifier_self) identifier_self (identifier_password) identifier_password )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_sasl) identifier_sasl (identifier_choose_mechanism) identifier_choose_mechanism )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_server_auth) identifier_server_auth )attribute (keyword_argument (identifier_allow_anonymous) identifier_allow_anonymous (False) False )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_challenge) identifier_challenge (call (attribute (identifier_self) identifier_self (identifier_get_challenge) identifier_get_challenge )attribute (argument_list (attribute (identifier_sasl) identifier_sasl (identifier_mechanism) identifier_mechanism )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_sasl) identifier_sasl (identifier_process) identifier_process )attribute (argument_list (call (attribute (identifier_base64) identifier_base64 (identifier_b64decode) identifier_b64decode )attribute (argument_list (identifier_challenge) identifier_challenge )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_resp_root) identifier_resp_root (call (attribute (identifier_self) identifier_self (identifier_send_challenge_response) identifier_send_challenge_response )attribute (argument_list (identifier_response) identifier_response )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_success) identifier_success (call (attribute (identifier_self) identifier_self (identifier_check_authenticate_success) identifier_check_authenticate_success )attribute (argument_list (identifier_resp_root) identifier_resp_root )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_success) identifier_success (None) None )comparison_operator (line_continuation_\) line_continuation_\ (comparison_operator (call (attribute (identifier_resp_root) identifier_resp_root (identifier_find) identifier_find )attribute (argument_list (call (attribute (string_'{{{0}}}challenge') string_'{{{0}}}challenge' (identifier_format) identifier_format )attribute (argument_list (identifier_XMPP_SASL_NS) identifier_XMPP_SASL_NS )argument_list )call )argument_list )call (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_resp_root) identifier_resp_root (call (attribute (identifier_self) identifier_self (identifier_send_challenge_response) identifier_send_challenge_response )attribute (argument_list (string_'') string_'' )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_check_authenticate_success) identifier_check_authenticate_success )attribute (argument_list (identifier_resp_root) identifier_resp_root )argument_list )call )return_statement )block )if_statement (return_statement (identifier_success) identifier_success )return_statement )block )function_definition )module
Authenticate the user to the XMPP server via the BOSH connection.
(module (function_definition (function_name__install_exception_handler) function_name__install_exception_handler (parameters (identifier_self) identifier_self )parameters (block (function_definition (function_name_handler) function_name_handler (parameters (identifier_t) identifier_t (identifier_value) identifier_value (identifier_traceback) identifier_traceback )parameters (block (if_statement (attribute (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute (identifier_verbose) identifier_verbose )attribute (block (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier___excepthook__) identifier___excepthook__ )attribute (argument_list (identifier_t) identifier_t (identifier_value) identifier_value (identifier_traceback) identifier_traceback )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_'%s\n') string_'%s\n' (call (attribute (call (identifier_unicode) identifier_unicode (argument_list (identifier_value) identifier_value )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition (expression_statement (assignment (attribute (identifier_sys) identifier_sys (identifier_excepthook) identifier_excepthook )attribute (identifier_handler) identifier_handler )assignment )expression_statement )block )function_definition )module
Installs a replacement for sys.excepthook, which handles pretty-printing uncaught exceptions.
(module (function_definition (function_name__serialize) function_name__serialize (parameters (identifier_self) identifier_self (identifier_array_parent) identifier_array_parent (identifier_value) identifier_value (identifier_state) identifier_state )parameters (block (if_statement (not_operator (identifier_value) identifier_value )not_operator (block (return_statement )return_statement )block )if_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_item_value) identifier_item_value )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_value) identifier_value )argument_list )call (block (expression_statement (call (attribute (identifier_state) identifier_state (identifier_push_location) identifier_push_location )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__item_processor) identifier__item_processor )attribute (identifier_element_path) identifier_element_path )attribute (identifier_i) identifier_i )argument_list )call )expression_statement (expression_statement (assignment (identifier_item_element) identifier_item_element (call (attribute (attribute (identifier_self) identifier_self (identifier__item_processor) identifier__item_processor )attribute (identifier_serialize) identifier_serialize )attribute (argument_list (identifier_item_value) identifier_item_value (identifier_state) identifier_state )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_array_parent) identifier_array_parent (identifier_append) identifier_append )attribute (argument_list (identifier_item_element) identifier_item_element )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_state) identifier_state (identifier_pop_location) identifier_pop_location )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Serialize the array value and add it to the array parent element.
(module (function_definition (function_name__update_ssl_config) function_name__update_ssl_config (parameters (identifier_opts) identifier_opts )parameters (block (if_statement (comparison_operator (subscript (identifier_opts) identifier_opts (string_'ssl') string_'ssl' )subscript (tuple (None) None (False) False )tuple )comparison_operator (block (expression_statement (assignment (subscript (identifier_opts) identifier_opts (string_'ssl') string_'ssl' )subscript (None) None )assignment )expression_statement (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_opts) identifier_opts (string_'ssl') string_'ssl' )subscript (True) True )comparison_operator (block (expression_statement (assignment (subscript (identifier_opts) identifier_opts (string_'ssl') string_'ssl' )subscript (dictionary )dictionary )assignment )expression_statement (return_statement )return_statement )block )if_statement (import_statement (dotted_name (identifier_ssl) identifier_ssl )dotted_name )import_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_prefix) identifier_prefix )pattern_list (tuple (tuple (string_'cert_reqs') string_'cert_reqs' (string_'CERT_') string_'CERT_' )tuple (tuple (string_'ssl_version') string_'ssl_version' (string_'PROTOCOL_') string_'PROTOCOL_' )tuple )tuple (block (expression_statement (assignment (identifier_val) identifier_val (call (attribute (subscript (identifier_opts) identifier_opts (string_'ssl') string_'ssl' )subscript (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_val) identifier_val (None) None )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (boolean_operator (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call )not_operator (not_operator (call (attribute (identifier_val) identifier_val (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_prefix) identifier_prefix )argument_list )call )not_operator )boolean_operator (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_ssl) identifier_ssl (identifier_val) identifier_val )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (string_'SSL option \'{0}\' must be set to one of the following values: \'{1}\'.') string_'SSL option \'{0}\' must be set to one of the following values: \'{1}\'.' (line_continuation_\) line_continuation_\ (identifier_format) identifier_format )attribute (argument_list (identifier_key) identifier_key (call (attribute (string_'\', \'') string_'\', \'' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (identifier_val) identifier_val (for_in_clause (identifier_val) identifier_val (call (identifier_dir) identifier_dir (argument_list (identifier_ssl) identifier_ssl )argument_list )call )for_in_clause (if_clause (call (attribute (identifier_val) identifier_val (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_prefix) identifier_prefix )argument_list )call )if_clause )list_comprehension )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (identifier_message) identifier_message )argument_list )call )expression_statement (raise_statement (call (attribute (attribute (identifier_salt) identifier_salt (identifier_exceptions) identifier_exceptions )attribute (identifier_SaltConfigurationError) identifier_SaltConfigurationError )attribute (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (subscript (identifier_opts) identifier_opts (string_'ssl') string_'ssl' )subscript (identifier_key) identifier_key )subscript (call (identifier_getattr) identifier_getattr (argument_list (identifier_ssl) identifier_ssl (identifier_val) identifier_val )argument_list )call )assignment )expression_statement )block )for_statement )block )function_definition )module
Resolves string names to integer constant in ssl configuration.
(module (function_definition (function_name_load) function_name_load (parameters (identifier_dbname) identifier_dbname )parameters (block (expression_statement (assignment (identifier_db) identifier_db (call (identifier_Database) identifier_Database (argument_list (identifier_dbname) identifier_dbname )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tables) identifier_tables (call (identifier_get_table_list) identifier_get_table_list (argument_list (attribute (identifier_db) identifier_db (identifier_cur) identifier_cur )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_chains) identifier_chains (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_name) identifier_name (identifier_tables) identifier_tables (block (expression_statement (assignment (subscript (attribute (identifier_db) identifier_db (identifier__traces) identifier__traces )attribute (identifier_name) identifier_name )subscript (call (identifier_Trace) identifier_Trace (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_db) identifier_db (identifier_db) identifier_db )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (subscript (attribute (identifier_db) identifier_db (identifier__traces) identifier__traces )attribute (identifier_name) identifier_name )subscript (identifier__shape) identifier__shape )attribute (call (identifier_get_shape) identifier_get_shape (argument_list (attribute (identifier_db) identifier_db (identifier_cur) identifier_cur )attribute (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_db) identifier_db (identifier_name) identifier_name (subscript (attribute (identifier_db) identifier_db (identifier__traces) identifier__traces )attribute (identifier_name) identifier_name )subscript )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_db) identifier_db (identifier_cur) identifier_cur )attribute (identifier_execute) identifier_execute )attribute (argument_list (binary_operator (string_'SELECT MAX(trace) FROM [%s]') string_'SELECT MAX(trace) FROM [%s]' (identifier_name) identifier_name )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_chains) identifier_chains (call (identifier_max) identifier_max (argument_list (identifier_chains) identifier_chains (binary_operator (subscript (subscript (call (attribute (attribute (identifier_db) identifier_db (identifier_cur) identifier_cur )attribute (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript (integer_1) integer_1 )binary_operator )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_db) identifier_db (identifier_chains) identifier_chains )attribute (identifier_chains) identifier_chains )assignment )expression_statement (expression_statement (assignment (attribute (identifier_db) identifier_db (identifier_trace_names) identifier_trace_names )attribute (binary_operator (identifier_chains) identifier_chains (list (identifier_tables) identifier_tables )list )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_db) identifier_db (identifier__state_) identifier__state_ )attribute (dictionary )dictionary )assignment )expression_statement (return_statement (identifier_db) identifier_db )return_statement )block )function_definition )module
Load an existing SQLite database. Return a Database instance.
(module (function_definition (function_name__read_opt_none) function_name__read_opt_none (parameters (identifier_self) identifier_self (identifier_code) identifier_code (keyword_separator )keyword_separator (identifier_desc) identifier_desc )parameters (block (expression_statement (assignment (identifier__type) identifier__type (call (attribute (identifier_self) identifier_self (identifier__read_opt_type) identifier__read_opt_type )attribute (argument_list (identifier_code) identifier_code )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier__size) identifier__size (call (attribute (identifier_self) identifier_self (identifier__read_unpack) identifier__read_unpack )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier__data) identifier__data (call (attribute (identifier_self) identifier_self (identifier__read_fileng) identifier__read_fileng )attribute (argument_list (identifier__size) identifier__size )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_opt) identifier_opt (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_desc) identifier_desc (call (attribute (identifier__IPv6_Opts_NULL) identifier__IPv6_Opts_NULL (identifier_get) identifier_get )attribute (argument_list (identifier_code) identifier_code (identifier_desc) identifier_desc )argument_list )call )keyword_argument (keyword_argument (identifier_type) identifier_type (identifier__type) identifier__type )keyword_argument (keyword_argument (identifier_length) identifier_length (binary_operator (identifier__size) identifier__size (integer_2) integer_2 )binary_operator )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier__data) identifier__data )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_opt) identifier_opt )return_statement )block )function_definition )module
Read IPv6_Opts unassigned options. Structure of IPv6_Opts unassigned options [RFC 8200]: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - | Option Type | Opt Data Len | Option Data +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - Octets Bits Name Description 0 0 ipv6_opts.opt.type Option Type 0 0 ipv6_opts.opt.type.value Option Number 0 0 ipv6_opts.opt.type.action Action (00-11) 0 2 ipv6_opts.opt.type.change Change Flag (0/1) 1 8 ipv6_opts.opt.length Length of Option Data 2 16 ipv6_opts.opt.data Option Data
(module (function_definition (function_name_get_value) function_name_get_value (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (try_statement (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier__dictionary) identifier__dictionary )attribute (identifier_key) identifier_key )subscript )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_ConfigurationError) identifier_ConfigurationError (argument_list (call (attribute (string_"No such key - {}") string_"No such key - {}" (identifier_format) identifier_format )attribute (argument_list (identifier_key) identifier_key )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Get a value from the configuration.
(module (function_definition (function_name_remove_this_opinion) function_name_remove_this_opinion (parameters (identifier_self) identifier_self (identifier_opinion_id) identifier_opinion_id )parameters (block (for_statement (identifier_opi) identifier_opi (call (attribute (identifier_self) identifier_self (identifier_get_opinions) identifier_get_opinions )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (call (attribute (identifier_opi) identifier_opi (identifier_get_id) identifier_get_id )attribute (argument_list )argument_list )call (identifier_opinion_id) identifier_opinion_id )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (identifier_remove) identifier_remove )attribute (argument_list (call (attribute (identifier_opi) identifier_opi (identifier_get_node) identifier_get_node )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement )block )function_definition )module
Removes the opinion for the given opinion identifier @type opinion_id: string @param opinion_id: the opinion identifier to be removed
(module (function_definition (function_name_pretty_dict_str) function_name_pretty_dict_str (parameters (identifier_d) identifier_d (default_parameter (identifier_indent) identifier_indent (integer_2) integer_2 )default_parameter )parameters (block (expression_statement (assignment (identifier_b) identifier_b (call (identifier_StringIO) identifier_StringIO (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_write_pretty_dict_str) identifier_write_pretty_dict_str (argument_list (identifier_b) identifier_b (identifier_d) identifier_d (keyword_argument (identifier_indent) identifier_indent (identifier_indent) identifier_indent )keyword_argument )argument_list )call )expression_statement (return_statement (call (attribute (identifier_b) identifier_b (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
shows JSON indented representation of d
(module (function_definition (function_name_check_server) function_name_check_server (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_msg) identifier_msg (string_'API server not found. Please check your API url configuration.') string_'API server not found. Please check your API url configuration.' )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_head) identifier_head )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_domain) identifier_domain )attribute )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (identifier_raise_from) identifier_raise_from (argument_list (call (attribute (identifier_errors) identifier_errors (identifier_ServerError) identifier_ServerError )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call (identifier_e) identifier_e )argument_list )call )expression_statement )block )except_clause )try_statement (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_response) identifier__check_response )attribute (argument_list (identifier_response) identifier_response )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_errors) identifier_errors (identifier_NotFound) identifier_NotFound )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_raise_from) identifier_raise_from (argument_list (call (attribute (identifier_errors) identifier_errors (identifier_ServerError) identifier_ServerError )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call (identifier_e) identifier_e )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Checks if the server is reachable and throws and exception if it isn't
(module (function_definition (function_name_tabs_obsolete) function_name_tabs_obsolete (parameters (identifier_physical_line) identifier_physical_line )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_indent) identifier_indent (call (attribute (call (attribute (identifier_INDENT_REGEX) identifier_INDENT_REGEX (identifier_match) identifier_match )attribute (argument_list (identifier_physical_line) identifier_physical_line )argument_list )call (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'\t') string_'\t' (identifier_indent) identifier_indent )comparison_operator (block (return_statement (expression_list (call (attribute (identifier_indent) identifier_indent (identifier_index) identifier_index )attribute (argument_list (string_'\t') string_'\t' )argument_list )call (string_"W191 indentation contains tabs") string_"W191 indentation contains tabs" )expression_list )return_statement )block )if_statement )block )function_definition )module
r"""For new projects, spaces-only are strongly recommended over tabs. Okay: if True:\n return W191: if True:\n\treturn
(module (function_definition (function_name_init) function_name_init (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_call_delegate) identifier_call_delegate )attribute (argument_list (string_'will_start_debug_core') string_'will_start_debug_core' (keyword_argument (identifier_core) identifier_core (identifier_self) identifier_self )keyword_argument )argument_list )call )not_operator (block (if_statement (attribute (identifier_self) identifier_self (identifier_halt_on_connect) identifier_halt_on_connect )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_halt) identifier_halt )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__read_core_type) identifier__read_core_type )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_for_fpu) identifier__check_for_fpu )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_build_target_xml) identifier_build_target_xml )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sw_bp) identifier_sw_bp )attribute (identifier_init) identifier_init )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_call_delegate) identifier_call_delegate )attribute (argument_list (string_'did_start_debug_core') string_'did_start_debug_core' (keyword_argument (identifier_core) identifier_core (identifier_self) identifier_self )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Cortex M initialization. The bus must be accessible when this method is called.
(module (function_definition (function_name_run_epoch) function_name_run_epoch (parameters (identifier_self) identifier_self (typed_parameter (identifier_epoch_info) identifier_epoch_info (type (identifier_EpochInfo) identifier_EpochInfo )type )typed_parameter (typed_parameter (identifier_source) identifier_source (type (string_'vel.api.Source') string_'vel.api.Source' )type )typed_parameter )parameters (block (expression_statement (call (attribute (identifier_epoch_info) identifier_epoch_info (identifier_on_epoch_begin) identifier_on_epoch_begin )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_lr) identifier_lr (subscript (subscript (attribute (attribute (identifier_epoch_info) identifier_epoch_info (identifier_optimizer) identifier_optimizer )attribute (identifier_param_groups) identifier_param_groups )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (string_'lr') string_'lr' )subscript )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"|-------- Epoch {:06} Lr={:.6f} ----------|") string_"|-------- Epoch {:06} Lr={:.6f} ----------|" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_epoch_info) identifier_epoch_info (identifier_global_epoch_idx) identifier_global_epoch_idx )attribute (identifier_lr) identifier_lr )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_train_epoch) identifier_train_epoch )attribute (argument_list (identifier_epoch_info) identifier_epoch_info (identifier_source) identifier_source )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_epoch_info) identifier_epoch_info (identifier_result_accumulator) identifier_result_accumulator )attribute (identifier_freeze_results) identifier_freeze_results )attribute (argument_list (string_'train') string_'train' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_validation_epoch) identifier_validation_epoch )attribute (argument_list (identifier_epoch_info) identifier_epoch_info (identifier_source) identifier_source )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_epoch_info) identifier_epoch_info (identifier_result_accumulator) identifier_result_accumulator )attribute (identifier_freeze_results) identifier_freeze_results )attribute (argument_list (string_'val') string_'val' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_epoch_info) identifier_epoch_info (identifier_on_epoch_end) identifier_on_epoch_end )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Run full epoch of learning
(module (function_definition (function_name__fetch_transfer_spec) function_name__fetch_transfer_spec (parameters (identifier_self) identifier_self (identifier_node_action) identifier_node_action (identifier_token) identifier_token (identifier_bucket_name) identifier_bucket_name (identifier_paths) identifier_paths )parameters (block (expression_statement (assignment (pattern_list (identifier_aspera_access_key) identifier_aspera_access_key (identifier_aspera_secret_key) identifier_aspera_secret_key (identifier_ats_endpoint) identifier_ats_endpoint )pattern_list (call (attribute (identifier_self) identifier_self (identifier__get_aspera_metadata) identifier__get_aspera_metadata )attribute (argument_list (identifier_bucket_name) identifier_bucket_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier__headers) identifier__headers (dictionary (pair (string_'accept') string_'accept' (string_"application/json") string_"application/json" )pair (pair (string_'Content-Type') string_'Content-Type' (string_"application/json") string_"application/json" )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_credentials) identifier_credentials (dictionary (pair (string_'type') string_'type' (string_'token') string_'token' )pair (pair (string_'token') string_'token' (dictionary (pair (string_'delegated_refresh_token') string_'delegated_refresh_token' (identifier_token) identifier_token )pair )dictionary )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier__url) identifier__url (identifier_ats_endpoint) identifier_ats_endpoint )assignment )expression_statement (expression_statement (assignment (subscript (identifier__headers) identifier__headers (string_'X-Aspera-Storage-Credentials') string_'X-Aspera-Storage-Credentials' )subscript (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_credentials) identifier_credentials )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier__data) identifier__data (dictionary (pair (string_'transfer_requests') string_'transfer_requests' (list (dictionary (pair (string_'transfer_request') string_'transfer_request' (dictionary (pair (string_'paths') string_'paths' (identifier_paths) identifier_paths )pair (pair (string_'tags') string_'tags' (dictionary (pair (string_'aspera') string_'aspera' (dictionary (pair (string_'node') string_'node' (dictionary (pair (string_'storage_credentials') string_'storage_credentials' (identifier_credentials) identifier_credentials )pair )dictionary )pair )dictionary )pair )dictionary )pair )dictionary )pair )dictionary )list )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier__session) identifier__session (call (attribute (identifier_requests) identifier_requests (identifier_Session) identifier_Session )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier__response) identifier__response (call (attribute (identifier__session) identifier__session (identifier_post) identifier_post )attribute (argument_list (keyword_argument (identifier_url) identifier_url (binary_operator (binary_operator (identifier__url) identifier__url (string_"/files/") string_"/files/" )binary_operator (identifier_node_action) identifier_node_action )binary_operator )keyword_argument (keyword_argument (identifier_auth) identifier_auth (tuple (identifier_aspera_access_key) identifier_aspera_access_key (identifier_aspera_secret_key) identifier_aspera_secret_key )tuple )keyword_argument (keyword_argument (identifier_headers) identifier_headers (identifier__headers) identifier__headers )keyword_argument (keyword_argument (identifier_json) identifier_json (identifier__data) identifier__data )keyword_argument (keyword_argument (identifier_verify) identifier_verify (attribute (attribute (identifier_self) identifier_self (identifier__config) identifier__config )attribute (identifier_verify_ssl) identifier_verify_ssl )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier__response) identifier__response )return_statement )block )function_definition )module
make hhtp call to Aspera to fetch back trasnfer spec
(module (function_definition (function_name_create_jinja_environment) function_name_create_jinja_environment (parameters (identifier_self) identifier_self )parameters (type (identifier_Environment) identifier_Environment )type (block (expression_statement (assignment (identifier_options) identifier_options (call (identifier_dict) identifier_dict (argument_list (attribute (identifier_self) identifier_self (identifier_jinja_options) identifier_jinja_options )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'autoescape') string_'autoescape' (identifier_options) identifier_options )comparison_operator (block (expression_statement (assignment (subscript (identifier_options) identifier_options (string_'autoescape') string_'autoescape' )subscript (attribute (identifier_self) identifier_self (identifier_select_jinja_autoescape) identifier_select_jinja_autoescape )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'auto_reload') string_'auto_reload' (identifier_options) identifier_options )comparison_operator (block (expression_statement (assignment (subscript (identifier_options) identifier_options (string_'auto_reload') string_'auto_reload' )subscript (boolean_operator (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'TEMPLATES_AUTO_RELOAD') string_'TEMPLATES_AUTO_RELOAD' )subscript (attribute (identifier_self) identifier_self (identifier_debug) identifier_debug )attribute )boolean_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_jinja_env) identifier_jinja_env (call (attribute (identifier_self) identifier_self (identifier_jinja_environment) identifier_jinja_environment )attribute (argument_list (identifier_self) identifier_self (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_jinja_env) identifier_jinja_env (identifier_globals) identifier_globals )attribute (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'config') string_'config' (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute )pair (pair (string_'g') string_'g' (identifier_g) identifier_g )pair (pair (string_'get_flashed_messages') string_'get_flashed_messages' (identifier_get_flashed_messages) identifier_get_flashed_messages )pair (pair (string_'request') string_'request' (identifier_request) identifier_request )pair (pair (string_'session') string_'session' (identifier_session) identifier_session )pair (pair (string_'url_for') string_'url_for' (identifier_url_for) identifier_url_for )pair )dictionary )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_jinja_env) identifier_jinja_env (identifier_filters) identifier_filters )attribute (string_'tojson') string_'tojson' )subscript (identifier_tojson_filter) identifier_tojson_filter )assignment )expression_statement (return_statement (identifier_jinja_env) identifier_jinja_env )return_statement )block )function_definition )module
Create and return the jinja environment. This will create the environment based on the :attr:`jinja_options` and configuration settings. The environment will include the Quart globals by default.
(module (function_definition (function_name_get_workspace_disk_usage) function_name_get_workspace_disk_usage (parameters (identifier_workspace) identifier_workspace (default_parameter (identifier_summarize) identifier_summarize (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_command) identifier_command (list (string_'du') string_'du' (string_'-h') string_'-h' )list )assignment )expression_statement (if_statement (identifier_summarize) identifier_summarize (block (expression_statement (call (attribute (identifier_command) identifier_command (identifier_append) identifier_append )attribute (argument_list (string_'-s') string_'-s' )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_command) identifier_command (identifier_append) identifier_append )attribute (argument_list (string_'-a') string_'-a' )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_command) identifier_command (identifier_append) identifier_append )attribute (argument_list (identifier_workspace) identifier_workspace )argument_list )call )expression_statement (expression_statement (assignment (identifier_disk_usage_info) identifier_disk_usage_info (call (attribute (call (attribute (call (attribute (identifier_subprocess) identifier_subprocess (identifier_check_output) identifier_check_output )attribute (argument_list (identifier_command) identifier_command )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call (identifier_split) identifier_split )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_filesize_pairs) identifier_filesize_pairs (call (identifier_list) identifier_list (argument_list (call (identifier_zip) identifier_zip (argument_list (subscript (identifier_disk_usage_info) identifier_disk_usage_info (slice (colon) colon (colon) colon (integer_2) integer_2 )slice )subscript (subscript (identifier_disk_usage_info) identifier_disk_usage_info (slice (integer_1) integer_1 (colon) colon (colon) colon (integer_2) integer_2 )slice )subscript )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_filesizes) identifier_filesizes (list )list )assignment )expression_statement (for_statement (identifier_filesize_pair) identifier_filesize_pair (identifier_filesize_pairs) identifier_filesize_pairs (block (expression_statement (assignment (pattern_list (identifier_size) identifier_size (identifier_name) identifier_name )pattern_list (identifier_filesize_pair) identifier_filesize_pair )assignment )expression_statement (expression_statement (call (attribute (identifier_filesizes) identifier_filesizes (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_'name') string_'name' (subscript (identifier_name) identifier_name (slice (call (identifier_len) identifier_len (argument_list (identifier_workspace) identifier_workspace )argument_list )call (colon) colon )slice )subscript )pair (pair (string_'size') string_'size' (identifier_size) identifier_size )pair )dictionary )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_filesizes) identifier_filesizes )return_statement )block )function_definition )module
Retrieve disk usage information of a workspace.
(module (function_definition (function_name_fit) function_name_fit (parameters (identifier_self) identifier_self (identifier_images) identifier_images (default_parameter (identifier_reference) identifier_reference (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_images) identifier_images (call (identifier_check_images) identifier_check_images (argument_list (identifier_images) identifier_images )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_reference) identifier_reference (call (identifier_check_reference) identifier_check_reference (argument_list (identifier_images) identifier_images (identifier_reference) identifier_reference )argument_list )call )assignment )expression_statement (function_definition (function_name_func) function_name_func (parameters (identifier_item) identifier_item )parameters (block (expression_statement (assignment (pattern_list (identifier_key) identifier_key (identifier_image) identifier_image )pattern_list (identifier_item) identifier_item )assignment )expression_statement (return_statement (call (identifier_asarray) identifier_asarray (argument_list (list (identifier_key) identifier_key (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (identifier_image) identifier_image (identifier_reference) identifier_reference )argument_list )call )list )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (identifier_transformations) identifier_transformations (call (attribute (call (attribute (identifier_images) identifier_images (identifier_map) identifier_map )attribute (argument_list (identifier_func) identifier_func (keyword_argument (identifier_with_keys) identifier_with_keys (True) True )keyword_argument )argument_list )call (identifier_toarray) identifier_toarray )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (attribute (identifier_images) identifier_images (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_transformations) identifier_transformations (list (identifier_transformations) identifier_transformations )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_algorithm) identifier_algorithm (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )assignment )expression_statement (return_statement (call (identifier_RegistrationModel) identifier_RegistrationModel (argument_list (call (identifier_dict) identifier_dict (argument_list (identifier_transformations) identifier_transformations )argument_list )call (keyword_argument (identifier_algorithm) identifier_algorithm (identifier_algorithm) identifier_algorithm )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Estimate registration model using cross-correlation. Use cross correlation to compute displacements between images or volumes and reference. Displacements will be 2D for images and 3D for volumes. Parameters ---------- images : array-like or thunder images The sequence of images / volumes to register. reference : array-like A reference image to align to.
(module (function_definition (function_name_github_request) function_name_github_request (parameters (identifier_self) identifier_self (identifier_path) identifier_path (identifier_callback) identifier_callback (default_parameter (identifier_access_token) identifier_access_token (None) None )default_parameter (default_parameter (identifier_post_args) identifier_post_args (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier__API_URL) identifier__API_URL )attribute (identifier_path) identifier_path )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_all_args) identifier_all_args (dictionary )dictionary )assignment )expression_statement (if_statement (identifier_access_token) identifier_access_token (block (expression_statement (assignment (subscript (identifier_all_args) identifier_all_args (string_"access_token") string_"access_token" )subscript (identifier_access_token) identifier_access_token )assignment )expression_statement (expression_statement (call (attribute (identifier_all_args) identifier_all_args (identifier_update) identifier_update )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_all_args) identifier_all_args (block (expression_statement (augmented_assignment (identifier_url) identifier_url (binary_operator (string_"?") string_"?" (call (attribute (attribute (identifier_auth) identifier_auth (identifier_urllib_parse) identifier_urllib_parse )attribute (identifier_urlencode) identifier_urlencode )attribute (argument_list (identifier_all_args) identifier_all_args )argument_list )call )binary_operator )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_callback) identifier_callback (call (attribute (identifier_self) identifier_self (identifier_async_callback) identifier_async_callback )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__on_github_request) identifier__on_github_request )attribute (identifier_callback) identifier_callback )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_http) identifier_http (call (attribute (identifier_self) identifier_self (identifier__get_auth_http_client) identifier__get_auth_http_client )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_post_args) identifier_post_args (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_http) identifier_http (identifier_fetch) identifier_fetch )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_method) identifier_method (string_"POST") string_"POST" )keyword_argument (keyword_argument (identifier_user_agent) identifier_user_agent (string_'Tinman/Tornado') string_'Tinman/Tornado' )keyword_argument (keyword_argument (identifier_body) identifier_body (call (attribute (attribute (identifier_auth) identifier_auth (identifier_urllib_parse) identifier_urllib_parse )attribute (identifier_urlencode) identifier_urlencode )attribute (argument_list (identifier_post_args) identifier_post_args )argument_list )call )keyword_argument (keyword_argument (identifier_callback) identifier_callback (identifier_callback) identifier_callback )keyword_argument )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_http) identifier_http (identifier_fetch) identifier_fetch )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_user_agent) identifier_user_agent (string_'Tinman/Tornado') string_'Tinman/Tornado' )keyword_argument (keyword_argument (identifier_callback) identifier_callback (identifier_callback) identifier_callback )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Make a request to the GitHub API, passing in the path, a callback, the access token, optional post arguments and keyword arguments to be added as values in the request body or URI
(module (function_definition (function_name_compute_threat_list_diff) function_name_compute_threat_list_diff (parameters (identifier_self) identifier_self (identifier_threat_type) identifier_threat_type (identifier_constraints) identifier_constraints (default_parameter (identifier_version_token) identifier_version_token (None) None )default_parameter (default_parameter (identifier_retry) identifier_retry (attribute (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_gapic_v1) identifier_gapic_v1 )attribute (identifier_method) identifier_method )attribute (identifier_DEFAULT) identifier_DEFAULT )attribute )default_parameter (default_parameter (identifier_timeout) identifier_timeout (attribute (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_gapic_v1) identifier_gapic_v1 )attribute (identifier_method) identifier_method )attribute (identifier_DEFAULT) identifier_DEFAULT )attribute )default_parameter (default_parameter (identifier_metadata) identifier_metadata (None) None )default_parameter )parameters (block (if_statement (comparison_operator (string_"compute_threat_list_diff") string_"compute_threat_list_diff" (attribute (identifier_self) identifier_self (identifier__inner_api_calls) identifier__inner_api_calls )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__inner_api_calls) identifier__inner_api_calls )attribute (string_"compute_threat_list_diff") string_"compute_threat_list_diff" )subscript (call (attribute (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_gapic_v1) identifier_gapic_v1 )attribute (identifier_method) identifier_method )attribute (identifier_wrap_method) identifier_wrap_method )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_transport) identifier_transport )attribute (identifier_compute_threat_list_diff) identifier_compute_threat_list_diff )attribute (keyword_argument (identifier_default_retry) identifier_default_retry (attribute (subscript (attribute (identifier_self) identifier_self (identifier__method_configs) identifier__method_configs )attribute (string_"ComputeThreatListDiff") string_"ComputeThreatListDiff" )subscript (identifier_retry) identifier_retry )attribute )keyword_argument (keyword_argument (identifier_default_timeout) identifier_default_timeout (attribute (subscript (attribute (identifier_self) identifier_self (identifier__method_configs) identifier__method_configs )attribute (string_"ComputeThreatListDiff") string_"ComputeThreatListDiff" )subscript (identifier_timeout) identifier_timeout )attribute )keyword_argument (keyword_argument (identifier_client_info) identifier_client_info (attribute (identifier_self) identifier_self (identifier__client_info) identifier__client_info )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_webrisk_pb2) identifier_webrisk_pb2 (identifier_ComputeThreatListDiffRequest) identifier_ComputeThreatListDiffRequest )attribute (argument_list (keyword_argument (identifier_threat_type) identifier_threat_type (identifier_threat_type) identifier_threat_type )keyword_argument (keyword_argument (identifier_constraints) identifier_constraints (identifier_constraints) identifier_constraints )keyword_argument (keyword_argument (identifier_version_token) identifier_version_token (identifier_version_token) identifier_version_token )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (subscript (attribute (identifier_self) identifier_self (identifier__inner_api_calls) identifier__inner_api_calls )attribute (string_"compute_threat_list_diff") string_"compute_threat_list_diff" )subscript (argument_list (identifier_request) identifier_request (keyword_argument (identifier_retry) identifier_retry (identifier_retry) identifier_retry )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument (keyword_argument (identifier_metadata) identifier_metadata (identifier_metadata) identifier_metadata )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Gets the most recent threat list diffs. Example: >>> from google.cloud import webrisk_v1beta1 >>> from google.cloud.webrisk_v1beta1 import enums >>> >>> client = webrisk_v1beta1.WebRiskServiceV1Beta1Client() >>> >>> # TODO: Initialize `threat_type`: >>> threat_type = enums.ThreatType.THREAT_TYPE_UNSPECIFIED >>> >>> # TODO: Initialize `constraints`: >>> constraints = {} >>> >>> response = client.compute_threat_list_diff(threat_type, constraints) Args: threat_type (~google.cloud.webrisk_v1beta1.types.ThreatType): Required. The ThreatList to update. constraints (Union[dict, ~google.cloud.webrisk_v1beta1.types.Constraints]): The constraints associated with this request. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.webrisk_v1beta1.types.Constraints` version_token (bytes): The current version token of the client for the requested list (the client version that was received from the last successful diff). retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. Returns: A :class:`~google.cloud.webrisk_v1beta1.types.ComputeThreatListDiffResponse` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. google.api_core.exceptions.RetryError: If the request failed due to a retryable error and retry attempts failed. ValueError: If the parameters are invalid.
(module (function_definition (function_name_prange) function_name_prange (parameters (list_splat_pattern (identifier_x) identifier_x )list_splat_pattern )parameters (block (try_statement (block (expression_statement (assignment (identifier_root) identifier_root (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (identifier_len) identifier_len (argument_list (attribute (identifier_root) identifier_root (identifier_handlers) identifier_handlers )attribute )argument_list )call (block (for_statement (identifier_h) identifier_h (attribute (identifier_root) identifier_root (identifier_handlers) identifier_handlers )attribute (block (if_statement (boolean_operator (parenthesized_expression (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_h) identifier_h )argument_list )call (attribute (identifier_logging) identifier_logging (identifier_StreamHandler) identifier_StreamHandler )attribute )comparison_operator )parenthesized_expression (line_continuation_\) line_continuation_\ (parenthesized_expression (comparison_operator (attribute (identifier_h) identifier_h (identifier_level) identifier_level )attribute (attribute (identifier_logging) identifier_logging (identifier_CRITICAL) identifier_CRITICAL )attribute )comparison_operator )parenthesized_expression )boolean_operator (block (import_from_statement (dotted_name (identifier_tqdm) identifier_tqdm )dotted_name (dotted_name (identifier_tqdm) identifier_tqdm )dotted_name )import_from_statement (return_statement (call (identifier_tqdm) identifier_tqdm (argument_list (call (identifier_range) identifier_range (argument_list (list_splat (identifier_x) identifier_x )list_splat )argument_list )call )argument_list )call )return_statement )block )if_statement )block )for_statement (return_statement (call (identifier_range) identifier_range (argument_list (list_splat (identifier_x) identifier_x )list_splat )argument_list )call )return_statement )block (else_clause (block (import_from_statement (dotted_name (identifier_tqdm) identifier_tqdm )dotted_name (dotted_name (identifier_tqdm) identifier_tqdm )dotted_name )import_from_statement (return_statement (call (identifier_tqdm) identifier_tqdm (argument_list (call (identifier_range) identifier_range (argument_list (list_splat (identifier_x) identifier_x )list_splat )argument_list )call )argument_list )call )return_statement )block )else_clause )if_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (return_statement (call (identifier_range) identifier_range (argument_list (list_splat (identifier_x) identifier_x )list_splat )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Progress bar range with `tqdm`
(module (function_definition (function_name__is_nanpa_number_with_national_prefix) function_name__is_nanpa_number_with_national_prefix (parameters (identifier_self) identifier_self )parameters (block (return_statement (parenthesized_expression (boolean_operator (boolean_operator (boolean_operator (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__current_metadata) identifier__current_metadata )attribute (identifier_country_code) identifier_country_code )attribute (integer_1) integer_1 )comparison_operator (comparison_operator (subscript (attribute (identifier_self) identifier_self (identifier__national_number) identifier__national_number )attribute (integer_0) integer_0 )subscript (string_'1') string_'1' )comparison_operator )boolean_operator (comparison_operator (subscript (attribute (identifier_self) identifier_self (identifier__national_number) identifier__national_number )attribute (integer_1) integer_1 )subscript (string_'0') string_'0' )comparison_operator )boolean_operator (comparison_operator (subscript (attribute (identifier_self) identifier_self (identifier__national_number) identifier__national_number )attribute (integer_1) integer_1 )subscript (string_'1') string_'1' )comparison_operator )boolean_operator )parenthesized_expression )return_statement )block )function_definition )module
Returns true if the current country is a NANPA country and the national number begins with the national prefix.
(module (function_definition (function_name_native_types) function_name_native_types (parameters (identifier_code) identifier_code )parameters (block (expression_statement (assignment (identifier_out) identifier_out (list )list )assignment )expression_statement (for_statement (identifier_c) identifier_c (identifier_code) identifier_code (block (if_statement (call (identifier_isconstant) identifier_isconstant (argument_list (identifier_c) identifier_c (keyword_argument (identifier_quoted) identifier_quoted (True) True )keyword_argument )argument_list )call (block (if_statement (call (identifier_isstring) identifier_isstring (argument_list (identifier_c) identifier_c (keyword_argument (identifier_quoted) identifier_quoted (True) True )keyword_argument )argument_list )call (block (expression_statement (assignment (identifier_v) identifier_v (subscript (identifier_c) identifier_c (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement )block (elif_clause (call (identifier_isbool) identifier_isbool (argument_list (identifier_c) identifier_c )argument_list )call (block (expression_statement (assignment (identifier_v) identifier_v (call (identifier_to_bool) identifier_to_bool (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (call (identifier_isnumber) identifier_isnumber (argument_list (identifier_c) identifier_c )argument_list )call (block (expression_statement (assignment (identifier_v) identifier_v (identifier_c) identifier_c )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_CompileError) identifier_CompileError (argument_list (binary_operator (string_"Unknown type %s: %s") string_"Unknown type %s: %s" (tuple (attribute (call (identifier_type) identifier_type (argument_list (identifier_c) identifier_c )argument_list )call (identifier___name__) identifier___name__ )attribute (identifier_c) identifier_c )tuple )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_append) identifier_append )attribute (argument_list (call (identifier_make_embedded_push) identifier_make_embedded_push (argument_list (identifier_v) identifier_v )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (try_statement (block (expression_statement (call (attribute (identifier_out) identifier_out (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_instructions) identifier_instructions (identifier_lookup) identifier_lookup )attribute (argument_list (identifier_c) identifier_c )argument_list )call )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_CompileError) identifier_CompileError (argument_list (binary_operator (string_"Unknown word '%s'") string_"Unknown word '%s'" (identifier_c) identifier_c )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Convert code elements from strings to native Python types.
(module (function_definition (function_name_add_sam2rnf_parser) function_name_add_sam2rnf_parser (parameters (identifier_subparsers) identifier_subparsers (identifier_subcommand) identifier_subcommand (identifier_help) identifier_help (identifier_description) identifier_description (default_parameter (identifier_simulator_name) identifier_simulator_name (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_parser_sam2rnf) identifier_parser_sam2rnf (call (attribute (identifier_subparsers) identifier_subparsers (identifier_add_parser) identifier_add_parser )attribute (argument_list (identifier_subcommand) identifier_subcommand (keyword_argument (identifier_help) identifier_help (identifier_help) identifier_help )keyword_argument (keyword_argument (identifier_description) identifier_description (identifier_description) identifier_description )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parser_sam2rnf) identifier_parser_sam2rnf (identifier_set_defaults) identifier_set_defaults )attribute (argument_list (keyword_argument (identifier_func) identifier_func (identifier_sam2rnf) identifier_sam2rnf )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parser_sam2rnf) identifier_parser_sam2rnf (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_'-s') string_'-s' (string_'--sam') string_'--sam' (keyword_argument (identifier_type) identifier_type (identifier_str) identifier_str )keyword_argument (keyword_argument (identifier_metavar) identifier_metavar (string_'file') string_'file' )keyword_argument (keyword_argument (identifier_dest) identifier_dest (string_'sam_fn') string_'sam_fn' )keyword_argument (keyword_argument (identifier_required) identifier_required (True) True )keyword_argument (keyword_argument (identifier_help) identifier_help (string_'Input SAM/BAM with true (expected) alignments of the reads (- for standard input).') string_'Input SAM/BAM with true (expected) alignments of the reads (- for standard input).' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier__add_shared_params) identifier__add_shared_params (argument_list (identifier_parser_sam2rnf) identifier_parser_sam2rnf (keyword_argument (identifier_unmapped_switcher) identifier_unmapped_switcher (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parser_sam2rnf) identifier_parser_sam2rnf (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_'-n') string_'-n' (string_'--simulator-name') string_'--simulator-name' (keyword_argument (identifier_type) identifier_type (identifier_str) identifier_str )keyword_argument (keyword_argument (identifier_metavar) identifier_metavar (string_'str') string_'str' )keyword_argument (keyword_argument (identifier_dest) identifier_dest (string_'simulator_name') string_'simulator_name' )keyword_argument (keyword_argument (identifier_default) identifier_default (identifier_simulator_name) identifier_simulator_name )keyword_argument (keyword_argument (identifier_help) identifier_help (conditional_expression (string_'Name of the simulator (for RNF).') string_'Name of the simulator (for RNF).' (comparison_operator (identifier_simulator_name) identifier_simulator_name (None) None )comparison_operator (attribute (identifier_argparse) identifier_argparse (identifier_SUPPRESS) identifier_SUPPRESS )attribute )conditional_expression )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Add another parser for a SAM2RNF-like command. Args: subparsers (subparsers): File name of the genome from which read tuples are created (FASTA file). simulator_name (str): Name of the simulator used in comments.
(module (function_definition (function_name_move_dir) function_name_move_dir (parameters (identifier_src_fs) identifier_src_fs (identifier_src_path) identifier_src_path (identifier_dst_fs) identifier_dst_fs (identifier_dst_path) identifier_dst_path (default_parameter (identifier_workers) identifier_workers (integer_0) integer_0 )default_parameter )parameters (block (function_definition (function_name_src) function_name_src (parameters )parameters (block (return_statement (call (identifier_manage_fs) identifier_manage_fs (argument_list (identifier_src_fs) identifier_src_fs (keyword_argument (identifier_writeable) identifier_writeable (False) False )keyword_argument )argument_list )call )return_statement )block )function_definition (function_definition (function_name_dst) function_name_dst (parameters )parameters (block (return_statement (call (identifier_manage_fs) identifier_manage_fs (argument_list (identifier_dst_fs) identifier_dst_fs (keyword_argument (identifier_create) identifier_create (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition (with_statement (with_clause (with_item (as_pattern (call (identifier_src) identifier_src (argument_list )argument_list )call (as_pattern_target (identifier__src_fs) identifier__src_fs )as_pattern_target )as_pattern )with_item (with_item (as_pattern (call (identifier_dst) identifier_dst (argument_list )argument_list )call (as_pattern_target (identifier__dst_fs) identifier__dst_fs )as_pattern_target )as_pattern )with_item )with_clause (block (with_statement (with_clause (with_item (call (attribute (identifier__src_fs) identifier__src_fs (identifier_lock) identifier_lock )attribute (argument_list )argument_list )call )with_item (with_item (call (attribute (identifier__dst_fs) identifier__dst_fs (identifier_lock) identifier_lock )attribute (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (identifier__dst_fs) identifier__dst_fs (identifier_makedir) identifier_makedir )attribute (argument_list (identifier_dst_path) identifier_dst_path (keyword_argument (identifier_recreate) identifier_recreate (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier_copy_dir) identifier_copy_dir (argument_list (identifier_src_fs) identifier_src_fs (identifier_src_path) identifier_src_path (identifier_dst_fs) identifier_dst_fs (identifier_dst_path) identifier_dst_path (keyword_argument (identifier_workers) identifier_workers (identifier_workers) identifier_workers )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier__src_fs) identifier__src_fs (identifier_removetree) identifier_removetree )attribute (argument_list (identifier_src_path) identifier_src_path )argument_list )call )expression_statement )block )with_statement )block )with_statement )block )function_definition )module
Move a directory from one filesystem to another. Arguments: src_fs (FS or str): Source filesystem (instance or URL). src_path (str): Path to a directory on ``src_fs`` dst_fs (FS or str): Destination filesystem (instance or URL). dst_path (str): Path to a directory on ``dst_fs``. workers (int): Use `worker` threads to copy data, or ``0`` (default) for a single-threaded copy.
(module (function_definition (function_name_read_first_available_value) function_name_read_first_available_value (parameters (identifier_filename) identifier_filename (identifier_field_name) identifier_field_name )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_filename) identifier_filename )argument_list )call )not_operator (block (return_statement (None) None )return_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_csvfile) identifier_csvfile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_reader) identifier_reader (call (attribute (identifier_csv) identifier_csv (identifier_DictReader) identifier_DictReader )attribute (argument_list (identifier_csvfile) identifier_csvfile )argument_list )call )assignment )expression_statement (for_statement (identifier_row) identifier_row (identifier_reader) identifier_reader (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_row) identifier_row (identifier_get) identifier_get )attribute (argument_list (identifier_field_name) identifier_field_name )argument_list )call )assignment )expression_statement (if_statement (identifier_value) identifier_value (block (return_statement (identifier_value) identifier_value )return_statement )block )if_statement )block )for_statement )block )with_statement (return_statement (None) None )return_statement )block )function_definition )module
Reads the first assigned value of the given field in the CSV table.
(module (function_definition (function_name_start_aeidon) function_name_start_aeidon (parameters )parameters (block (expression_statement (assignment (identifier_extensions) identifier_extensions (list (string_'ass') string_'ass' (string_'srt') string_'srt' (string_'ssa') string_'ssa' (string_'sub') string_'sub' )list )assignment )expression_statement (expression_statement (assignment (attribute (identifier_Config) identifier_Config (identifier_filenames) identifier_filenames )attribute (call (identifier_prep_files) identifier_prep_files (argument_list (attribute (identifier_Config) identifier_Config (identifier_args) identifier_args )attribute (identifier_extensions) identifier_extensions )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_Config) identifier_Config (identifier_patterns) identifier_patterns )attribute (call (identifier_pattern_logic_aeidon) identifier_pattern_logic_aeidon (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_filename) identifier_filename (attribute (identifier_Config) identifier_Config (identifier_filenames) identifier_filenames )attribute (block (expression_statement (call (identifier_AeidonProject) identifier_AeidonProject (argument_list (identifier_filename) identifier_filename )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Prepare filenames and patterns then process subtitles with aeidon.
(module (function_definition (function_name_ColorWithLightness) function_name_ColorWithLightness (parameters (identifier_self) identifier_self (identifier_lightness) identifier_lightness )parameters (block (expression_statement (assignment (pattern_list (identifier_h) identifier_h (identifier_s) identifier_s (identifier_l) identifier_l )pattern_list (attribute (identifier_self) identifier_self (identifier___hsl) identifier___hsl )attribute )assignment )expression_statement (return_statement (call (identifier_Color) identifier_Color (argument_list (tuple (identifier_h) identifier_h (identifier_s) identifier_s (identifier_lightness) identifier_lightness )tuple (string_'hsl') string_'hsl' (attribute (identifier_self) identifier_self (identifier___a) identifier___a )attribute (attribute (identifier_self) identifier_self (identifier___wref) identifier___wref )attribute )argument_list )call )return_statement )block )function_definition )module
Create a new instance based on this one with a new lightness value. Parameters: :lightness: The lightness of the new color [0...1]. Returns: A grapefruit.Color instance. >>> Color.NewFromHsl(30, 1, 0.5).ColorWithLightness(0.25) (0.5, 0.25, 0.0, 1.0) >>> Color.NewFromHsl(30, 1, 0.5).ColorWithLightness(0.25).hsl (30, 1, 0.25)
(module (function_definition (function_name_return_error) function_name_return_error (parameters (identifier_self) identifier_self (identifier_status) identifier_status (default_parameter (identifier_payload) identifier_payload (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_resp) identifier_resp (None) None )assignment )expression_statement (if_statement (comparison_operator (identifier_payload) identifier_payload (None) None )comparison_operator (block (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_payload) identifier_payload )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (identifier_self) identifier_self (identifier_make_response) identifier_make_response )attribute (argument_list (identifier_payload) identifier_payload (keyword_argument (identifier_status) identifier_status (identifier_status) identifier_status )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_status) identifier_status (list (integer_405) integer_405 )list )comparison_operator (block (expression_statement (call (identifier_abort) identifier_abort (argument_list (identifier_status) identifier_status )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_abort) identifier_abort (argument_list (identifier_status) identifier_status (keyword_argument (identifier_response) identifier_response (identifier_resp) identifier_resp )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Error handler called by request handlers when an error occurs and the request should be aborted. Usage:: def handle_post_request(self, *args, **kwargs): self.request_handler = self.get_request_handler() try: self.request_handler.process(self.get_data()) except SomeException as e: self.return_error(400, payload=self.request_handler.errors) return self.return_create_response()
(module (function_definition (function_name_cmd) function_name_cmd (parameters (identifier_send) identifier_send (identifier_msg) identifier_msg (identifier_args) identifier_args )parameters (block (if_statement (not_operator (identifier_msg) identifier_msg )not_operator (block (expression_statement (call (identifier_send) identifier_send (argument_list (string_"Google what?") string_"Google what?" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_key) identifier_key (subscript (subscript (subscript (identifier_args) identifier_args (string_'config') string_'config' )subscript (string_'api') string_'api' )subscript (string_'googleapikey') string_'googleapikey' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_cx) identifier_cx (subscript (subscript (subscript (identifier_args) identifier_args (string_'config') string_'config' )subscript (string_'api') string_'api' )subscript (string_'googlesearchid') string_'googlesearchid' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (call (identifier_get) identifier_get (argument_list (string_'https://www.googleapis.com/customsearch/v1') string_'https://www.googleapis.com/customsearch/v1' (keyword_argument (identifier_params) identifier_params (dictionary (pair (string_'key') string_'key' (identifier_key) identifier_key )pair (pair (string_'cx') string_'cx' (identifier_cx) identifier_cx )pair (pair (string_'q') string_'q' (identifier_msg) identifier_msg )pair )dictionary )keyword_argument )argument_list )call (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'items') string_'items' (identifier_data) identifier_data )comparison_operator (block (expression_statement (call (identifier_send) identifier_send (argument_list (string_"Google didn't say much.") string_"Google didn't say much." )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_url) identifier_url (subscript (subscript (subscript (identifier_data) identifier_data (string_'items') string_'items' )subscript (integer_0) integer_0 )subscript (string_'link') string_'link' )subscript )assignment )expression_statement (expression_statement (call (identifier_send) identifier_send (argument_list (binary_operator (string_"Google says %s") string_"Google says %s" (identifier_url) identifier_url )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Googles something. Syntax: {command} <term>
(module (function_definition (function_name_get_input_vector) function_name_get_input_vector (parameters (identifier_self) identifier_self (identifier_ind) identifier_ind )parameters (block (expression_statement (assignment (identifier_dim) identifier_dim (call (attribute (identifier_self) identifier_self (identifier_get_dimension) identifier_get_dimension )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_b) identifier_b (call (attribute (identifier_fasttext) identifier_fasttext (identifier_Vector) identifier_Vector )attribute (argument_list (identifier_dim) identifier_dim )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_f) identifier_f )attribute (identifier_getInputVector) identifier_getInputVector )attribute (argument_list (identifier_b) identifier_b (identifier_ind) identifier_ind )argument_list )call )expression_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_b) identifier_b )argument_list )call )return_statement )block )function_definition )module
Given an index, get the corresponding vector of the Input Matrix.
(module (function_definition (function_name_pool_to_HW) function_name_pool_to_HW (parameters (identifier_shape) identifier_shape (identifier_data_frmt) identifier_data_frmt )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_shape) identifier_shape )argument_list )call (integer_4) integer_4 )comparison_operator (block (return_statement (identifier_shape) identifier_shape )return_statement )block )if_statement (if_statement (comparison_operator (identifier_data_frmt) identifier_data_frmt (string_'NCHW') string_'NCHW' )comparison_operator (block (return_statement (list (subscript (identifier_shape) identifier_shape (integer_2) integer_2 )subscript (subscript (identifier_shape) identifier_shape (integer_3) integer_3 )subscript )list )return_statement )block )if_statement (return_statement (list (subscript (identifier_shape) identifier_shape (integer_1) integer_1 )subscript (subscript (identifier_shape) identifier_shape (integer_2) integer_2 )subscript )list )return_statement )block )function_definition )module
Convert from NHWC|NCHW => HW
(module (function_definition (function_name_visit_while) function_name_visit_while (parameters (identifier_self) identifier_self (identifier_node) identifier_node )parameters (block (expression_statement (assignment (identifier_whiles) identifier_whiles (binary_operator (string_"while %s:\n%s") string_"while %s:\n%s" (tuple (call (attribute (attribute (identifier_node) identifier_node (identifier_test) identifier_test )attribute (identifier_accept) identifier_accept )attribute (argument_list (identifier_self) identifier_self )argument_list )call (call (attribute (identifier_self) identifier_self (identifier__stmt_list) identifier__stmt_list )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_body) identifier_body )attribute )argument_list )call )tuple )binary_operator )assignment )expression_statement (if_statement (attribute (identifier_node) identifier_node (identifier_orelse) identifier_orelse )attribute (block (expression_statement (assignment (identifier_whiles) identifier_whiles (binary_operator (string_"%s\nelse:\n%s") string_"%s\nelse:\n%s" (tuple (identifier_whiles) identifier_whiles (call (attribute (identifier_self) identifier_self (identifier__stmt_list) identifier__stmt_list )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_orelse) identifier_orelse )attribute )argument_list )call )tuple )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_whiles) identifier_whiles )return_statement )block )function_definition )module
return an astroid.While node as string
(module (function_definition (function_name_add_request_handler) function_name_add_request_handler (parameters (identifier_self) identifier_self (identifier_request_handler) identifier_request_handler )parameters (block (if_statement (comparison_operator (identifier_request_handler) identifier_request_handler (None) None )comparison_operator (block (raise_statement (call (identifier_RuntimeConfigException) identifier_RuntimeConfigException (argument_list (string_"Valid Request Handler instance to be provided") string_"Valid Request Handler instance to be provided" )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_request_handler) identifier_request_handler (identifier_AbstractRequestHandler) identifier_AbstractRequestHandler )argument_list )call )not_operator (block (raise_statement (call (identifier_RuntimeConfigException) identifier_RuntimeConfigException (argument_list (string_"Input should be a RequestHandler instance") string_"Input should be a RequestHandler instance" )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_request_handler_chains) identifier_request_handler_chains )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_GenericRequestHandlerChain) identifier_GenericRequestHandlerChain (argument_list (keyword_argument (identifier_request_handler) identifier_request_handler (identifier_request_handler) identifier_request_handler )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Register input to the request handlers list. :param request_handler: Request Handler instance to be registered. :type request_handler: AbstractRequestHandler :return: None
(module (function_definition (function_name_run) function_name_run (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_chunk_index) identifier_chunk_index (call (attribute (identifier_self) identifier_self (identifier_chunk_index_gen) identifier_chunk_index_gen )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_array) identifier_array )attribute (identifier_shape) identifier_shape )attribute (attribute (identifier_self) identifier_self (identifier_iteration_order) identifier_iteration_order )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_chunk_index) identifier_chunk_index (block (if_statement (attribute (identifier_self) identifier_self (identifier_masked) identifier_masked )attribute (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_array) identifier_array )attribute (identifier_key) identifier_key )subscript (identifier_masked_array) identifier_masked_array )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_array) identifier_array )attribute (identifier_key) identifier_key )subscript (identifier_ndarray) identifier_ndarray )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_output_chunk) identifier_output_chunk (call (identifier_Chunk) identifier_Chunk (argument_list (identifier_key) identifier_key (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_output) identifier_output )attribute (argument_list (identifier_output_chunk) identifier_output_chunk )argument_list )call )expression_statement )block )for_statement )block (except_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_abort) identifier_abort )attribute (argument_list )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause (else_clause (block (for_statement (identifier_queue) identifier_queue (attribute (identifier_self) identifier_self (identifier_output_queues) identifier_output_queues )attribute (block (expression_statement (call (attribute (identifier_queue) identifier_queue (identifier_put) identifier_put )attribute (argument_list (identifier_QUEUE_FINISHED) identifier_QUEUE_FINISHED )argument_list )call )expression_statement )block )for_statement )block )else_clause )try_statement )block )function_definition )module
Emit the Chunk instances which cover the underlying Array. The Array is divided into chunks with a size limit of MAX_CHUNK_SIZE which are emitted into all registered output queues.
(module (function_definition (function_name_register) function_name_register (parameters (identifier_self) identifier_self (identifier_table) identifier_table )parameters (block (if_statement (attribute (attribute (identifier_table) identifier_table (identifier_table_type) identifier_table_type )attribute (identifier_is_system) identifier_is_system )attribute (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Cannot add system table to catalog') string_'Cannot add system table to catalog' )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (attribute (attribute (identifier_table) identifier_table (identifier_table_type) identifier_table_type )attribute (identifier_is_shared) identifier_is_shared )attribute )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Cannot add local table to catalog') string_'Cannot add local table to catalog' )argument_list )call )raise_statement )block )if_statement (if_statement (attribute (identifier_table) identifier_table (identifier_is_substitute) identifier_is_substitute )attribute (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Cannot add substitute table to catalog') string_'Cannot add substitute table to catalog' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_versions) identifier_versions (call (attribute (attribute (identifier_self) identifier_self (identifier___tables) identifier___tables )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_table) identifier_table (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_versions) identifier_versions (None) None )comparison_operator (block (expression_statement (assignment (identifier_versions) identifier_versions (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier___tables) identifier___tables )attribute (attribute (identifier_table) identifier_table (identifier_name) identifier_name )attribute )subscript (identifier_versions) identifier_versions )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_versions) identifier_versions (attribute (identifier_table) identifier_table (identifier_version) identifier_version )attribute )subscript (identifier_table) identifier_table )assignment )expression_statement )block )function_definition )module
Adds a shared table to the catalog. Args: table (SymbolTable): A non-system, shared symbol table.
(module (function_definition (function_name_serial_adapters) function_name_serial_adapters (parameters (identifier_self) identifier_self (identifier_serial_adapters) identifier_serial_adapters )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__serial_adapters) identifier__serial_adapters )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (identifier_serial_adapters) identifier_serial_adapters )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__serial_adapters) identifier__serial_adapters )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_SerialAdapter) identifier_SerialAdapter (argument_list (keyword_argument (identifier_interfaces) identifier_interfaces (integer_4) integer_4 )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'IOU "{name}" [{id}]: number of Serial adapters changed to {adapters}') string_'IOU "{name}" [{id}]: number of Serial adapters changed to {adapters}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier__name) identifier__name )attribute )keyword_argument (keyword_argument (identifier_id) identifier_id (attribute (identifier_self) identifier_self (identifier__id) identifier__id )attribute )keyword_argument (keyword_argument (identifier_adapters) identifier_adapters (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__serial_adapters) identifier__serial_adapters )attribute )argument_list )call )keyword_argument )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__adapters) identifier__adapters )attribute (binary_operator (attribute (identifier_self) identifier_self (identifier__ethernet_adapters) identifier__ethernet_adapters )attribute (attribute (identifier_self) identifier_self (identifier__serial_adapters) identifier__serial_adapters )attribute )binary_operator )assignment )expression_statement )block )function_definition )module
Sets the number of Serial adapters for this IOU VM. :param serial_adapters: number of adapters
(module (function_definition (function_name_delete_collection) function_name_delete_collection (parameters (identifier_self) identifier_self (identifier_collection) identifier_collection )parameters (block (expression_statement (assignment (identifier_uri) identifier_uri (call (attribute (identifier_str) identifier_str (identifier_join) identifier_join )attribute (argument_list (string_'/') string_'/' (list (attribute (identifier_self) identifier_self (identifier_uri) identifier_uri )attribute (identifier_collection) identifier_collection )list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_service) identifier_service )attribute (identifier__delete) identifier__delete )attribute (argument_list (identifier_uri) identifier_uri )argument_list )call )return_statement )block )function_definition )module
Deletes an existing collection. The collection being updated *is* expected to include the id.
(module (function_definition (function_name_RetrieveAsset) function_name_RetrieveAsset (parameters (identifier_logdir) identifier_logdir (identifier_plugin_name) identifier_plugin_name (identifier_asset_name) identifier_asset_name )parameters (block (expression_statement (assignment (identifier_asset_path) identifier_asset_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (identifier_PluginDirectory) identifier_PluginDirectory (argument_list (identifier_logdir) identifier_logdir (identifier_plugin_name) identifier_plugin_name )argument_list )call (identifier_asset_name) identifier_asset_name )argument_list )call )assignment )expression_statement (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (attribute (attribute (attribute (identifier_tf) identifier_tf (identifier_io) identifier_io )attribute (identifier_gfile) identifier_gfile )attribute (identifier_GFile) identifier_GFile )attribute (argument_list (identifier_asset_path) identifier_asset_path (string_"r") string_"r" )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_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )return_statement )block )with_statement )block (except_clause (attribute (attribute (identifier_tf) identifier_tf (identifier_errors) identifier_errors )attribute (identifier_NotFoundError) identifier_NotFoundError )attribute (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (binary_operator (string_"Asset path %s not found") string_"Asset path %s not found" (identifier_asset_path) identifier_asset_path )binary_operator )argument_list )call )raise_statement )block )except_clause (except_clause (as_pattern (attribute (attribute (identifier_tf) identifier_tf (identifier_errors) identifier_errors )attribute (identifier_OpError) identifier_OpError )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (binary_operator (string_"Couldn't read asset path: %s, OpError %s") string_"Couldn't read asset path: %s, OpError %s" (tuple (identifier_asset_path) identifier_asset_path (identifier_e) identifier_e )tuple )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Retrieve a particular plugin asset from a logdir. Args: logdir: A directory that was created by a TensorFlow summary.FileWriter. plugin_name: The plugin we want an asset from. asset_name: The name of the requested asset. Returns: string contents of the plugin asset. Raises: KeyError: if the asset does not exist.
(module (function_definition (function_name_extract_paths) function_name_extract_paths (parameters (identifier_self) identifier_self (identifier_paths) identifier_paths (identifier_ignore_nopath) identifier_ignore_nopath )parameters (block (try_statement (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list )argument_list )call (identifier_extract_paths) identifier_extract_paths )attribute (argument_list (keyword_argument (identifier_paths) identifier_paths (identifier_paths) identifier_paths )keyword_argument (keyword_argument (identifier_ignore_nopath) identifier_ignore_nopath (identifier_ignore_nopath) identifier_ignore_nopath )keyword_argument )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_ExtractPathError) identifier_ExtractPathError (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'%s: failed extracting files: %s') string_'%s: failed extracting files: %s' (call (attribute (attribute (identifier_self) identifier_self (identifier_vm) identifier_vm )attribute (identifier_name) identifier_name )attribute (argument_list )argument_list )call (attribute (identifier_err) identifier_err (identifier_message) identifier_message )attribute )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__has_guestfs) identifier__has_guestfs )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_extract_paths_dead) identifier_extract_paths_dead )attribute (argument_list (identifier_paths) identifier_paths (identifier_ignore_nopath) identifier_ignore_nopath )argument_list )call )expression_statement )block (else_clause (block (raise_statement )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition )module
Extract the given paths from the domain Attempt to extract all files defined in ``paths`` with the method defined in :func:`~lago.plugins.vm.VMProviderPlugin.extract_paths`, if it fails, and `guestfs` is available it will try extracting the files with guestfs. Args: paths(list of tuples): files to extract in `[(src1, dst1), (src2, dst2)...]` format. ignore_nopath(boolean): if True will ignore none existing paths. Returns: None Raises: :exc:`~lago.plugins.vm.ExtractPathNoPathError`: if a none existing path was found on the VM, and `ignore_nopath` is False. :exc:`~lago.plugins.vm.ExtractPathError`: on all other failures.
(module (function_definition (function_name_useThis) function_name_useThis (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 (attribute (identifier_self) identifier_self (identifier__callback) identifier__callback )attribute (call (attribute (identifier_functools) identifier_functools (identifier_partial) identifier_partial )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__callback) identifier__callback )attribute (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block )function_definition )module
Change parameter of the callback function. :param *args, **kwargs: parameter(s) to use when executing the callback function.
(module (function_definition (function_name_show_diff) function_name_show_diff (parameters (identifier_before_editing) identifier_before_editing (identifier_after_editing) identifier_after_editing )parameters (block (function_definition (function_name_listify) function_name_listify (parameters (identifier_string) identifier_string )parameters (block (return_statement (list_comprehension (binary_operator (identifier_l) identifier_l (string_'\n') string_'\n' )binary_operator (for_in_clause (identifier_l) identifier_l (call (attribute (call (attribute (identifier_string) identifier_string (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'\n') string_'\n' )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_'\n') string_'\n' )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition (expression_statement (assignment (identifier_unified_diff) identifier_unified_diff (call (attribute (identifier_difflib) identifier_difflib (identifier_unified_diff) identifier_unified_diff )attribute (argument_list (call (identifier_listify) identifier_listify (argument_list (identifier_before_editing) identifier_before_editing )argument_list )call (call (identifier_listify) identifier_listify (argument_list (identifier_after_editing) identifier_after_editing )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_isatty) identifier_isatty )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_buf) identifier_buf (call (attribute (identifier_io) identifier_io (identifier_StringIO) identifier_StringIO )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_unified_diff) identifier_unified_diff (block (expression_statement (call (attribute (identifier_buf) identifier_buf (identifier_write) identifier_write )attribute (argument_list (call (identifier_text_type) identifier_text_type (argument_list (identifier_line) identifier_line )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_buf) identifier_buf (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (class_definition (identifier_opts) identifier_opts (block (expression_statement (assignment (identifier_side_by_side) identifier_side_by_side (False) False )assignment )expression_statement (expression_statement (assignment (identifier_width) identifier_width (integer_80) integer_80 )assignment )expression_statement (expression_statement (assignment (identifier_tab_width) identifier_tab_width (integer_8) integer_8 )assignment )expression_statement )block )class_definition (expression_statement (call (attribute (identifier_cdiff) identifier_cdiff (identifier_markup_to_pager) identifier_markup_to_pager )attribute (argument_list (call (attribute (identifier_cdiff) identifier_cdiff (identifier_PatchStream) identifier_PatchStream )attribute (argument_list (identifier_buf) identifier_buf )argument_list )call (identifier_opts) identifier_opts )argument_list )call )expression_statement )block (else_clause (block (for_statement (identifier_line) identifier_line (identifier_unified_diff) identifier_unified_diff (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (call (attribute (identifier_line) identifier_line (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'\n') string_'\n' )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Shows a diff between two strings. If the output is to a tty the diff will be colored. Inputs are expected to be unicode strings.
(module (function_definition (function_name_namespace_uri) function_name_namespace_uri (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (return_statement (call (identifier_next) identifier_next (argument_list (call (identifier_iter) identifier_iter (argument_list (call (identifier_filter) identifier_filter (argument_list (lambda (lambda_parameters (identifier_uri) identifier_uri )lambda_parameters (attribute (call (identifier_URI) identifier_URI (argument_list (identifier_uri) identifier_uri )argument_list )call (identifier_namespace) identifier_namespace )attribute )lambda (attribute (identifier_self) identifier_self (identifier__uri) identifier__uri )attribute )argument_list )call )argument_list )call )argument_list )call )return_statement )block (except_clause (identifier_StopIteration) identifier_StopIteration (block (return_statement (None) None )return_statement )block )except_clause )try_statement )block )function_definition )module
Finds and returns first applied URI of this node that has a namespace. :return str: uri
(module (function_definition (function_name_params) function_name_params (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_params) identifier_params (identifier_complex) identifier_complex )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_params) identifier_get_params )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url_params) identifier_url_params (call (attribute (attribute (identifier_self) identifier_self (identifier_default_params) identifier_default_params )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_url_params) identifier_url_params (identifier_update) identifier_update )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_serialize_params) identifier_serialize_params )attribute (argument_list (identifier_params) identifier_params (identifier_complex) identifier_complex )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_url_params) identifier_url_params )return_statement )block )function_definition )module
URL parameters for wq.io.loaders.NetLoader
(module (function_definition (function_name_load_ipython_extension) function_name_load_ipython_extension (parameters (identifier_ipython) identifier_ipython )parameters (block (import_from_statement (dotted_name (identifier_google) identifier_google (identifier_cloud) identifier_cloud (identifier_bigquery) identifier_bigquery (identifier_magics) identifier_magics )dotted_name (dotted_name (identifier__cell_magic) identifier__cell_magic )dotted_name )import_from_statement (expression_statement (call (attribute (identifier_ipython) identifier_ipython (identifier_register_magic_function) identifier_register_magic_function )attribute (argument_list (identifier__cell_magic) identifier__cell_magic (keyword_argument (identifier_magic_kind) identifier_magic_kind (string_"cell") string_"cell" )keyword_argument (keyword_argument (identifier_magic_name) identifier_magic_name (string_"bigquery") string_"bigquery" )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Called by IPython when this module is loaded as an IPython extension.
(module (function_definition (function_name__create_local_driver) function_name__create_local_driver (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_driver_type) identifier_driver_type (call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_get) identifier_get )attribute (argument_list (string_'Driver') string_'Driver' (string_'type') string_'type' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_driver_name) identifier_driver_name (subscript (call (attribute (identifier_driver_type) identifier_driver_type (identifier_split) identifier_split )attribute (argument_list (string_'-') string_'-' )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_driver_name) identifier_driver_name (tuple (string_'android') string_'android' (string_'ios') string_'ios' (string_'iphone') string_'iphone' )tuple )comparison_operator (block (expression_statement (assignment (identifier_driver) identifier_driver (call (attribute (identifier_self) identifier_self (identifier__setup_appium) identifier__setup_appium )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_driver_setup) identifier_driver_setup (dictionary (pair (string_'firefox') string_'firefox' (attribute (identifier_self) identifier_self (identifier__setup_firefox) identifier__setup_firefox )attribute )pair (pair (string_'chrome') string_'chrome' (attribute (identifier_self) identifier_self (identifier__setup_chrome) identifier__setup_chrome )attribute )pair (pair (string_'safari') string_'safari' (attribute (identifier_self) identifier_self (identifier__setup_safari) identifier__setup_safari )attribute )pair (pair (string_'opera') string_'opera' (attribute (identifier_self) identifier_self (identifier__setup_opera) identifier__setup_opera )attribute )pair (pair (string_'iexplore') string_'iexplore' (attribute (identifier_self) identifier_self (identifier__setup_explorer) identifier__setup_explorer )attribute )pair (pair (string_'edge') string_'edge' (attribute (identifier_self) identifier_self (identifier__setup_edge) identifier__setup_edge )attribute )pair (pair (string_'phantomjs') string_'phantomjs' (attribute (identifier_self) identifier_self (identifier__setup_phantomjs) identifier__setup_phantomjs )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_driver_setup_method) identifier_driver_setup_method (call (attribute (identifier_driver_setup) identifier_driver_setup (identifier_get) identifier_get )attribute (argument_list (identifier_driver_name) identifier_driver_name )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_driver_setup_method) identifier_driver_setup_method )not_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (call (attribute (string_'Unknown driver {0}') string_'Unknown driver {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_driver_name) identifier_driver_name )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_capabilities) identifier_capabilities (call (attribute (identifier_self) identifier_self (identifier__get_capabilities_from_driver_type) identifier__get_capabilities_from_driver_type )attribute (argument_list (identifier_driver_name) identifier_driver_name )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_capabilities_from_properties) identifier__add_capabilities_from_properties )attribute (argument_list (identifier_capabilities) identifier_capabilities (string_'Capabilities') string_'Capabilities' )argument_list )call )expression_statement (expression_statement (assignment (identifier_driver) identifier_driver (call (identifier_driver_setup_method) identifier_driver_setup_method (argument_list (identifier_capabilities) identifier_capabilities )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_driver) identifier_driver )return_statement )block )function_definition )module
Create a driver in local machine :returns: a new local selenium driver
(module (function_definition (function_name_fro) function_name_fro (parameters (identifier_self) identifier_self (identifier_statement) identifier_statement )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_name_format) identifier_name_format )attribute )not_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_fail_safe_fro) identifier_fail_safe_fro )attribute (argument_list (identifier_statement) identifier_statement )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_result) identifier_result (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_attribute) identifier_attribute (attribute (identifier_statement) identifier_statement (identifier_attribute) identifier_attribute )attribute (block (if_statement (boolean_operator (boolean_operator (attribute (identifier_attribute) identifier_attribute (identifier_name_format) identifier_name_format )attribute (attribute (identifier_self) identifier_self (identifier_name_format) identifier_name_format )attribute )boolean_operator (line_continuation_\) line_continuation_\ (comparison_operator (attribute (identifier_attribute) identifier_attribute (identifier_name_format) identifier_name_format )attribute (attribute (identifier_self) identifier_self (identifier_name_format) identifier_name_format )attribute )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (try_statement (block (expression_statement (assignment (tuple_pattern (identifier_key) identifier_key (identifier_val) identifier_val )tuple_pattern (call (attribute (identifier_self) identifier_self (identifier_ava_from) identifier_ava_from )attribute (argument_list (identifier_attribute) identifier_attribute )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_KeyError) identifier_KeyError (identifier_AttributeError) identifier_AttributeError )tuple (block (pass_statement )pass_statement )block )except_clause (else_clause (block (expression_statement (assignment (subscript (identifier_result) identifier_result (identifier_key) identifier_key )subscript (identifier_val) identifier_val )assignment )expression_statement )block )else_clause )try_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Get the attributes and the attribute values. :param statement: The AttributeStatement. :return: A dictionary containing attributes and values
(module (function_definition (function_name_reset) function_name_reset (parameters (identifier_self) identifier_self (default_parameter (identifier_clear) identifier_clear (False) False )default_parameter )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__executing) identifier__executing )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__executing) identifier__executing )attribute (False) False )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__request_info) identifier__request_info )attribute (string_'execute') string_'execute' )subscript (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__reading) identifier__reading )attribute (False) False )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier__highlighter) identifier__highlighter )attribute (identifier_highlighting_on) identifier_highlighting_on )attribute (False) False )assignment )expression_statement (if_statement (identifier_clear) identifier_clear (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__control) identifier__control )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__display_banner) identifier__display_banner )attribute (block (if_statement (attribute (identifier_self) identifier_self (identifier_kernel_banner) identifier_kernel_banner )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__append_plain_text) identifier__append_plain_text )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_kernel_banner) identifier_kernel_banner )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__append_plain_text) identifier__append_plain_text )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_banner) identifier_banner )attribute )argument_list )call )expression_statement )block )if_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__show_interpreter_prompt) identifier__show_interpreter_prompt )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Overridden to customize the order that the banners are printed
(module (function_definition (function_name_xor) function_name_xor (parameters (identifier_a) identifier_a (identifier_b) identifier_b )parameters (block (return_statement (call (identifier_bytearray) identifier_bytearray (generator_expression (binary_operator (identifier_i) identifier_i (identifier_j) identifier_j )binary_operator (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_j) identifier_j )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_a) identifier_a (identifier_b) identifier_b )argument_list )call )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Bitwise xor on equal length bytearrays.
(module (function_definition (function_name_add_column) function_name_add_column (parameters (identifier_filename) identifier_filename (identifier_column) identifier_column (identifier_formula) identifier_formula (default_parameter (identifier_force) identifier_force (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_columns) identifier_columns (call (identifier_parse_formula) identifier_parse_formula (argument_list (identifier_formula) identifier_formula )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_"Running file: %s") string_"Running file: %s" (identifier_filename) identifier_filename )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_" Reading columns: %s") string_" Reading columns: %s" (identifier_columns) identifier_columns )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_fitsio) identifier_fitsio (identifier_read) identifier_read )attribute (argument_list (identifier_filename) identifier_filename (keyword_argument (identifier_columns) identifier_columns (identifier_columns) identifier_columns )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_' Evaluating formula: %s') string_' Evaluating formula: %s' (identifier_formula) identifier_formula )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_col) identifier_col (call (identifier_eval) identifier_eval (argument_list (identifier_formula) identifier_formula )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_col) identifier_col (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_col) identifier_col (keyword_argument (identifier_dtype) identifier_dtype (list (tuple (identifier_column) identifier_column (attribute (identifier_col) identifier_col (identifier_dtype) identifier_dtype )attribute )tuple )list )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_insert_columns) identifier_insert_columns (argument_list (identifier_filename) identifier_filename (identifier_col) identifier_col (keyword_argument (identifier_force) identifier_force (identifier_force) identifier_force )keyword_argument )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Add a column to a FITS file. ADW: Could this be replaced by a ftool?
(module (function_definition (function_name_check_buffer) function_name_check_buffer (parameters (identifier_coords) identifier_coords (identifier_length) identifier_length (identifier_buffer) identifier_buffer )parameters (block (expression_statement (assignment (identifier_s) identifier_s (call (identifier_min) identifier_min (argument_list (subscript (identifier_coords) identifier_coords (integer_0) integer_0 )subscript (identifier_buffer) identifier_buffer )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_e) identifier_e (call (identifier_min) identifier_min (argument_list (binary_operator (identifier_length) identifier_length (subscript (identifier_coords) identifier_coords (integer_1) integer_1 )subscript )binary_operator (identifier_buffer) identifier_buffer )argument_list )call )assignment )expression_statement (return_statement (list (identifier_s) identifier_s (identifier_e) identifier_e )list )return_statement )block )function_definition )module
check to see how much of the buffer is being used
(module (function_definition (function_name_history_search_backward) function_name_history_search_backward (parameters (identifier_self) identifier_self (identifier_e) identifier_e )parameters (block (expression_statement (identifier_u) identifier_u )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_l_buffer) identifier_l_buffer )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__history) identifier__history )attribute (identifier_history_search_backward) identifier_history_search_backward )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_l_buffer) identifier_l_buffer )attribute )argument_list )call )assignment )expression_statement )block )function_definition )module
u'''Search backward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search. By default, this command is unbound.
(module (function_definition (function_name_calc_bin) function_name_calc_bin (parameters (identifier_self) identifier_self (default_parameter (identifier__bin) identifier__bin (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier__bin) identifier__bin (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier__bin) identifier__bin (call (attribute (identifier_bins) identifier_bins (identifier_bins) identifier_bins )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_start) identifier_start )attribute (attribute (identifier_self) identifier_self (identifier_end) identifier_end )attribute (keyword_argument (identifier_one) identifier_one (True) True )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (assignment (identifier__bin) identifier__bin (None) None )assignment )expression_statement )block )except_clause )try_statement )block )if_statement (return_statement (identifier__bin) identifier__bin )return_statement )block )function_definition )module
Calculate the smallest UCSC genomic bin that will contain this feature.
(module (function_definition (function_name_get_endpoints_using_raw_json_emission) function_name_get_endpoints_using_raw_json_emission (parameters (identifier_domain) identifier_domain )parameters (block (expression_statement (assignment (identifier_uri) identifier_uri (call (attribute (string_"http://{0}/data.json") string_"http://{0}/data.json" (identifier_format) identifier_format )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_uri) identifier_uri )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_r) identifier_r (identifier_raise_for_status) identifier_raise_for_status )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (identifier_r) identifier_r (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Implements a raw HTTP GET against the entire Socrata portal for the domain in question. This method uses the first of the two ways of getting this information, the raw JSON endpoint. Parameters ---------- domain: str A Socrata data portal domain. "data.seattle.gov" or "data.cityofnewyork.us" for example. Returns ------- Portal dataset metadata from the JSON endpoint.
(module (function_definition (function_name_encode) function_name_encode (parameters (identifier_cinfo) identifier_cinfo (identifier_cio) identifier_cio (identifier_image) identifier_image )parameters (block (expression_statement (assignment (identifier_argtypes) identifier_argtypes (list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_POINTER) identifier_POINTER )attribute (argument_list (identifier_CompressionInfoType) identifier_CompressionInfoType )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_POINTER) identifier_POINTER )attribute (argument_list (identifier_CioType) identifier_CioType )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_POINTER) identifier_POINTER )attribute (argument_list (identifier_ImageType) identifier_ImageType )argument_list )call )list )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_OPENJPEG) identifier_OPENJPEG (identifier_opj_encode) identifier_opj_encode )attribute (identifier_argtypes) identifier_argtypes )attribute (identifier_argtypes) identifier_argtypes )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_OPENJPEG) identifier_OPENJPEG (identifier_opj_encode) identifier_opj_encode )attribute (identifier_restype) identifier_restype )attribute (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute )assignment )expression_statement (expression_statement (assignment (identifier_status) identifier_status (call (attribute (identifier_OPENJPEG) identifier_OPENJPEG (identifier_opj_encode) identifier_opj_encode )attribute (argument_list (identifier_cinfo) identifier_cinfo (identifier_cio) identifier_cio (identifier_image) identifier_image )argument_list )call )assignment )expression_statement (return_statement (identifier_status) identifier_status )return_statement )block )function_definition )module
Wrapper for openjpeg library function opj_encode. Encodes an image into a JPEG-2000 codestream. Parameters ---------- cinfo : compression handle cio : output buffer stream image : image to encode
(module (function_definition (function_name__joint_log_likelihood) function_name__joint_log_likelihood (parameters (identifier_self) identifier_self (identifier_X) identifier_X )parameters (block (expression_statement (call (identifier_check_is_fitted) identifier_check_is_fitted (argument_list (identifier_self) identifier_self (string_"classes_") string_"classes_" )argument_list )call )expression_statement (expression_statement (assignment (identifier_X) identifier_X (call (identifier_check_array) identifier_check_array (argument_list (identifier_X) identifier_X (keyword_argument (identifier_accept_sparse) identifier_accept_sparse (string_'csr') string_'csr' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_X_bin) identifier_X_bin (call (attribute (identifier_self) identifier_self (identifier__transform_data) identifier__transform_data )attribute (argument_list (identifier_X) identifier_X )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_n_classes) identifier_n_classes (identifier_n_features) identifier_n_features )pattern_list (attribute (attribute (identifier_self) identifier_self (identifier_feature_log_prob_) identifier_feature_log_prob_ )attribute (identifier_shape) identifier_shape )attribute )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_n_samples) identifier_n_samples (identifier_n_features_X) identifier_n_features_X )pattern_list (attribute (identifier_X_bin) identifier_X_bin (identifier_shape) identifier_shape )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_n_features_X) identifier_n_features_X (identifier_n_features) identifier_n_features )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Expected input with %d features, got %d instead") string_"Expected input with %d features, got %d instead" (tuple (identifier_n_features) identifier_n_features (identifier_n_features_X) identifier_n_features_X )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_jll) identifier_jll (call (identifier_safe_sparse_dot) identifier_safe_sparse_dot (argument_list (identifier_X_bin) identifier_X_bin (attribute (attribute (identifier_self) identifier_self (identifier_feature_log_prob_) identifier_feature_log_prob_ )attribute (identifier_T) identifier_T )attribute )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_jll) identifier_jll (attribute (identifier_self) identifier_self (identifier_class_log_prior_) identifier_class_log_prior_ )attribute )augmented_assignment )expression_statement (return_statement (identifier_jll) identifier_jll )return_statement )block )function_definition )module
Calculate the posterior log probability of the samples X
(module (function_definition (function_name_rhsm_register) function_name_rhsm_register (parameters (identifier_self) identifier_self (identifier_rhsm) identifier_rhsm )parameters (block (expression_statement (assignment (identifier_login) identifier_login (call (attribute (identifier_rhsm) identifier_rhsm (identifier_get) identifier_get )attribute (argument_list (string_'login') string_'login' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_password) identifier_password (call (attribute (identifier_rhsm) identifier_rhsm (identifier_get) identifier_get )attribute (argument_list (string_'password') string_'password' (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_'RHN_PW') string_'RHN_PW' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pool_id) identifier_pool_id (call (attribute (identifier_rhsm) identifier_rhsm (identifier_get) identifier_get )attribute (argument_list (string_'pool_id') string_'pool_id' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run) identifier_run )attribute (argument_list (string_'rm /etc/pki/product/69.pem') string_'rm /etc/pki/product/69.pem' (keyword_argument (identifier_ignore_error) identifier_ignore_error (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_custom_log) identifier_custom_log (binary_operator (string_'subscription-manager register --username %s --password *******') string_'subscription-manager register --username %s --password *******' (identifier_login) identifier_login )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run) identifier_run )attribute (argument_list (binary_operator (string_'subscription-manager register --username %s --password "%s"') string_'subscription-manager register --username %s --password "%s"' (tuple (identifier_login) identifier_login (identifier_password) identifier_password )tuple )binary_operator (keyword_argument (identifier_success_status) identifier_success_status (tuple (integer_0) integer_0 (integer_64) integer_64 )tuple )keyword_argument (keyword_argument (identifier_custom_log) identifier_custom_log (identifier_custom_log) identifier_custom_log )keyword_argument (keyword_argument (identifier_retry) identifier_retry (integer_3) integer_3 )keyword_argument )argument_list )call )expression_statement (if_statement (identifier_pool_id) identifier_pool_id (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run) identifier_run )attribute (argument_list (binary_operator (string_'subscription-manager attach --pool %s') string_'subscription-manager attach --pool %s' (identifier_pool_id) identifier_pool_id )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run) identifier_run )attribute (argument_list (string_'subscription-manager attach --auto') string_'subscription-manager attach --auto' )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rhsm_active) identifier_rhsm_active )attribute (True) True )assignment )expression_statement )block )function_definition )module
Register the host on the RHSM. :param rhsm: a dict of parameters (login, password, pool_id)
(module (function_definition (function_name_allowed_methods) function_name_allowed_methods (parameters (identifier_self) identifier_self (default_parameter (identifier_path_info) identifier_path_info (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_match) identifier_match )attribute (argument_list (identifier_path_info) identifier_path_info (keyword_argument (identifier_method) identifier_method (string_"--") string_"--" )keyword_argument )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_MethodNotAllowed) identifier_MethodNotAllowed (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (return_statement (attribute (identifier_e) identifier_e (identifier_valid_methods) identifier_valid_methods )attribute )return_statement )block )except_clause (except_clause (identifier_HTTPException) identifier_HTTPException (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (list )list )return_statement )block )function_definition )module
Returns the valid methods that match for a given path. .. versionadded:: 0.7
(module (function_definition (function_name__patch_expand_path) function_name__patch_expand_path (parameters (identifier_self) identifier_self (identifier_settings) identifier_settings (identifier_name) identifier_name (identifier_value) identifier_value )parameters (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isabs) identifier_isabs )attribute (argument_list (identifier_value) identifier_value )argument_list )call (block (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_normpath) identifier_normpath )attribute (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_value) identifier_value (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isabs) identifier_isabs )attribute (argument_list (identifier_value) identifier_value )argument_list )call )not_operator (attribute (identifier_self) identifier_self (identifier_projectdir) identifier_projectdir )attribute )boolean_operator (block (expression_statement (assignment (identifier_value) identifier_value (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_projectdir) identifier_projectdir )attribute (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_normpath) identifier_normpath )attribute (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Patch a path to expand home directory and make absolute path. Args: settings (dict): Current settings. name (str): Setting name. value (str): Path to patch. Returns: str: Patched path to an absolute path.
(module (function_definition (function_name_set_layout_settings) function_name_set_layout_settings (parameters (identifier_self) identifier_self (identifier_settings) identifier_settings )parameters (block (expression_statement (assignment (identifier_size) identifier_size (call (attribute (identifier_settings) identifier_settings (identifier_get) identifier_get )attribute (argument_list (string_'size') string_'size' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_size) identifier_size (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_resize) identifier_resize )attribute (argument_list (call (identifier_QSize) identifier_QSize (argument_list (list_splat (identifier_size) identifier_size )list_splat )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_window_size) identifier_window_size )attribute (call (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_pos) identifier_pos (call (attribute (identifier_settings) identifier_settings (identifier_get) identifier_get )attribute (argument_list (string_'pos') string_'pos' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_pos) identifier_pos (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_move) identifier_move )attribute (argument_list (call (identifier_QPoint) identifier_QPoint (argument_list (list_splat (identifier_pos) identifier_pos )list_splat )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_hexstate) identifier_hexstate (call (attribute (identifier_settings) identifier_settings (identifier_get) identifier_get )attribute (argument_list (string_'hexstate') string_'hexstate' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_hexstate) identifier_hexstate (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_restoreState) identifier_restoreState )attribute (argument_list (call (attribute (call (identifier_QByteArray) identifier_QByteArray (argument_list )argument_list )call (identifier_fromHex) identifier_fromHex )attribute (argument_list (call (attribute (call (identifier_str) identifier_str (argument_list (identifier_hexstate) identifier_hexstate )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (call (attribute (identifier_settings) identifier_settings (identifier_get) identifier_get )attribute (argument_list (string_'is_maximized') string_'is_maximized' )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setWindowState) identifier_setWindowState )attribute (argument_list (attribute (identifier_Qt) identifier_Qt (identifier_WindowMaximized) identifier_WindowMaximized )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (call (attribute (identifier_settings) identifier_settings (identifier_get) identifier_get )attribute (argument_list (string_'is_fullscreen') string_'is_fullscreen' )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setWindowState) identifier_setWindowState )attribute (argument_list (attribute (identifier_Qt) identifier_Qt (identifier_WindowFullScreen) identifier_WindowFullScreen )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_splitsettings) identifier_splitsettings (call (attribute (identifier_settings) identifier_settings (identifier_get) identifier_get )attribute (argument_list (string_'splitsettings') string_'splitsettings' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_splitsettings) identifier_splitsettings (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_editorwidget) identifier_editorwidget )attribute (identifier_editorsplitter) identifier_editorsplitter )attribute (identifier_set_layout_settings) identifier_set_layout_settings )attribute (argument_list (identifier_splitsettings) identifier_splitsettings )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Restore layout state
(module (function_definition (function_name_add_entries_to_gallery) function_name_add_entries_to_gallery (parameters (identifier_app) identifier_app (identifier_doctree) identifier_doctree (identifier_docname) identifier_docname )parameters (block (if_statement (comparison_operator (identifier_docname) identifier_docname (string_'gallery') string_'gallery' )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (not_operator (call (identifier_has_gallery) identifier_has_gallery (argument_list (attribute (attribute (identifier_app) identifier_app (identifier_builder) identifier_builder )attribute (identifier_name) identifier_name )attribute )argument_list )call )not_operator (block (return_statement )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_node) identifier_node (subscript (call (attribute (identifier_doctree) identifier_doctree (identifier_traverse) identifier_traverse )attribute (argument_list (identifier_gallery) identifier_gallery )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (return_statement )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_content) identifier_content (list )list )assignment )expression_statement (for_statement (identifier_entry) identifier_entry (attribute (attribute (identifier_app) identifier_app (identifier_env) identifier_env )attribute (identifier_gallery_entries) identifier_gallery_entries )attribute (block (expression_statement (assignment (identifier_raw_html_node) identifier_raw_html_node (call (attribute (identifier_nodes) identifier_nodes (identifier_raw) identifier_raw )attribute (argument_list (string_'') string_'' (keyword_argument (identifier_text) identifier_text (attribute (identifier_entry) identifier_entry (identifier_html) identifier_html )attribute )keyword_argument (keyword_argument (identifier_format) identifier_format (string_'html') string_'html' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_content) identifier_content (identifier_append) identifier_append )attribute (argument_list (identifier_raw_html_node) identifier_raw_html_node )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_node) identifier_node (identifier_replace_self) identifier_replace_self )attribute (argument_list (identifier_content) identifier_content )argument_list )call )expression_statement )block )function_definition )module
Add entries to the gallery node Should happen when all the doctrees have been read and the gallery entries have been collected. i.e at doctree-resolved time.
(module (function_definition (function_name_open_python) function_name_open_python (parameters (identifier_self) identifier_self (identifier_message) identifier_message (identifier_namespace) identifier_namespace )parameters (block (import_from_statement (dotted_name (identifier_code) identifier_code )dotted_name (dotted_name (identifier_InteractiveConsole) identifier_InteractiveConsole )dotted_name )import_from_statement (import_statement (dotted_name (identifier_readline) identifier_readline )dotted_name )import_statement (import_statement (dotted_name (identifier_rlcompleter) identifier_rlcompleter )dotted_name )import_statement (expression_statement (call (attribute (identifier_readline) identifier_readline (identifier_set_completer) identifier_set_completer )attribute (argument_list (attribute (call (attribute (identifier_rlcompleter) identifier_rlcompleter (identifier_Completer) identifier_Completer )attribute (argument_list (identifier_namespace) identifier_namespace )argument_list )call (identifier_complete) identifier_complete )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_readline) identifier_readline (identifier_parse_and_bind) identifier_parse_and_bind )attribute (argument_list (string_'tab: complete') string_'tab: complete' )argument_list )call )expression_statement (expression_statement (assignment (identifier_console) identifier_console (call (identifier_InteractiveConsole) identifier_InteractiveConsole (argument_list (identifier_namespace) identifier_namespace )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_console) identifier_console (identifier_interact) identifier_interact )attribute (argument_list (identifier_message) identifier_message )argument_list )call )expression_statement )block )function_definition )module
Open interactive python console
(module (function_definition (function_name_get_product_version) function_name_get_product_version (parameters (typed_parameter (identifier_path) identifier_path (type (subscript (attribute (identifier_typing) identifier_typing (identifier_Union) identifier_Union )attribute (identifier_str) identifier_str (identifier_Path) identifier_Path )subscript )type )typed_parameter )parameters (type (identifier_VersionInfo) identifier_VersionInfo )type (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (call (identifier_Path) identifier_Path (argument_list (identifier_path) identifier_path )argument_list )call (identifier_absolute) identifier_absolute )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pe_info) identifier_pe_info (call (attribute (identifier_pefile) identifier_pefile (identifier_PE) identifier_PE )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_path) identifier_path )argument_list )call )argument_list )call )assignment )expression_statement (try_statement (block (for_statement (identifier_file_info) identifier_file_info (attribute (identifier_pe_info) identifier_pe_info (identifier_FileInfo) identifier_FileInfo )attribute (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_file_info) identifier_file_info (identifier_list) identifier_list )argument_list )call (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier__parse_file_info) identifier__parse_file_info (argument_list (identifier_file_info) identifier_file_info )argument_list )call )assignment )expression_statement (if_statement (identifier_result) identifier_result (block (return_statement (identifier_result) identifier_result )return_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier__parse_file_info) identifier__parse_file_info (argument_list (attribute (identifier_pe_info) identifier_pe_info (identifier_FileInfo) identifier_FileInfo )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_result) identifier_result (block (return_statement (identifier_result) identifier_result )return_statement )block )if_statement )block )else_clause )if_statement )block )for_statement (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_f'unable to obtain version from {path}') string_f'unable to obtain version from {path}' )argument_list )call )raise_statement )block (except_clause (as_pattern (tuple (identifier_KeyError) identifier_KeyError (identifier_AttributeError) identifier_AttributeError )tuple (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_traceback) identifier_traceback (identifier_print_exc) identifier_print_exc )attribute (argument_list )argument_list )call )expression_statement (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_f'unable to obtain version from {path}') string_f'unable to obtain version from {path}' )argument_list )call (identifier_exc) identifier_exc )raise_statement )block )except_clause )try_statement )block )function_definition )module
Get version info from executable Args: path: path to the executable Returns: VersionInfo
(module (function_definition (function_name_append) function_name_append (parameters (identifier_self) identifier_self (identifier_function) identifier_function (default_parameter (identifier_update) identifier_update (True) True )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__funcs) identifier__funcs )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_function) identifier_function )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_dep) identifier__add_dep )attribute (argument_list (identifier_function) identifier_function )argument_list )call )expression_statement (if_statement (identifier_update) identifier_update (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update) identifier__update )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Append a new function to the end of this chain.
(module (function_definition (function_name_encodeMsg) function_name_encodeMsg (parameters (identifier_self) identifier_self (identifier_mesg) identifier_mesg )parameters (block (expression_statement (assignment (identifier_fmt) identifier_fmt (call (attribute (attribute (identifier_self) identifier_self (identifier_locs) identifier_locs )attribute (identifier_get) identifier_get )attribute (argument_list (string_'log:fmt') string_'log:fmt' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_fmt) identifier_fmt (string_'jsonl') string_'jsonl' )comparison_operator (block (expression_statement (assignment (identifier_s) identifier_s (binary_operator (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_mesg) identifier_mesg (keyword_argument (identifier_sort_keys) identifier_sort_keys (True) True )keyword_argument )argument_list )call (string_'\n') string_'\n' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_buf) identifier_buf (call (attribute (identifier_s) identifier_s (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_buf) identifier_buf )return_statement )block (elif_clause (comparison_operator (identifier_fmt) identifier_fmt (string_'mpk') string_'mpk' )comparison_operator (block (expression_statement (assignment (identifier_buf) identifier_buf (call (attribute (identifier_s_msgpack) identifier_s_msgpack (identifier_en) identifier_en )attribute (argument_list (identifier_mesg) identifier_mesg )argument_list )call )assignment )expression_statement (return_statement (identifier_buf) identifier_buf )return_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_mesg) identifier_mesg (string_f'Unknown encoding format: {fmt}') string_f'Unknown encoding format: {fmt}' )assignment )expression_statement (raise_statement (call (attribute (identifier_s_exc) identifier_s_exc (identifier_SynErr) identifier_SynErr )attribute (argument_list (keyword_argument (identifier_mesg) identifier_mesg (identifier_mesg) identifier_mesg )keyword_argument )argument_list )call )raise_statement )block )function_definition )module
Get byts for a message
(module (function_definition (function_name_load_embedding) function_name_load_embedding (parameters (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_EMBEDDING_DIM) identifier_EMBEDDING_DIM (integer_300) integer_300 )assignment )expression_statement (expression_statement (assignment (identifier_embedding_dict) identifier_embedding_dict (dictionary )dictionary )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'r') string_'r' (keyword_argument (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )keyword_argument )argument_list )call (as_pattern_target (identifier_file) identifier_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_pairs) identifier_pairs (list_comprehension (call (attribute (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list (string_'\r\n') string_'\r\n' )argument_list )call (identifier_split) identifier_split )attribute (argument_list )argument_list )call (for_in_clause (identifier_line) identifier_line (call (attribute (identifier_file) identifier_file (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (for_statement (identifier_pair) identifier_pair (identifier_pairs) identifier_pairs (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_pair) identifier_pair )argument_list )call (binary_operator (identifier_EMBEDDING_DIM) identifier_EMBEDDING_DIM (integer_1) integer_1 )binary_operator )comparison_operator (block (expression_statement (assignment (subscript (identifier_embedding_dict) identifier_embedding_dict (subscript (identifier_pair) identifier_pair (integer_0) integer_0 )subscript )subscript (list_comprehension (call (identifier_float) identifier_float (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (subscript (identifier_pair) identifier_pair (slice (integer_1) integer_1 (colon) colon )slice )subscript )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement )block )for_statement )block )with_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'embedding_dict size: %d') string_'embedding_dict size: %d' (call (identifier_len) identifier_len (argument_list (identifier_embedding_dict) identifier_embedding_dict )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_embedding_dict) identifier_embedding_dict )return_statement )block )function_definition )module
return embedding for a specific file by given file path.
(module (function_definition (function_name__is_modified) function_name__is_modified (parameters (identifier_self) identifier_self (identifier_filepath) identifier_filepath )parameters (block (if_statement (call (attribute (identifier_self) identifier_self (identifier__is_new) identifier__is_new )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_mtime) identifier_mtime (call (attribute (identifier_self) identifier_self (identifier__get_modified_time) identifier__get_modified_time )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )assignment )expression_statement (return_statement (comparison_operator (subscript (attribute (identifier_self) identifier_self (identifier__watched_files) identifier__watched_files )attribute (identifier_filepath) identifier_filepath )subscript (identifier_mtime) identifier_mtime )comparison_operator )return_statement )block )function_definition )module
Returns True if the file has been modified since last seen. Will return False if the file has not been seen before.
(module (function_definition (function_name_setup_logfile_raw) function_name_setup_logfile_raw (parameters (identifier_self) identifier_self (identifier_logfile) identifier_logfile (default_parameter (identifier_mode) identifier_mode (string_'w') string_'w' )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_logfile_raw) identifier_logfile_raw )attribute (call (identifier_open) identifier_open (argument_list (identifier_logfile) identifier_logfile (keyword_argument (identifier_mode) identifier_mode (identifier_mode) identifier_mode )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
start logging raw bytes to the given logfile, without timestamps
(module (function_definition (function_name_status) function_name_status (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_report) identifier_report )attribute (None) None )comparison_operator (block (return_statement (attribute (identifier_SentSms) identifier_SentSms (identifier_ENROUTE) identifier_ENROUTE )attribute )return_statement )block (else_clause (block (return_statement (conditional_expression (attribute (identifier_SentSms) identifier_SentSms (identifier_DELIVERED) identifier_DELIVERED )attribute (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_report) identifier_report )attribute (identifier_deliveryStatus) identifier_deliveryStatus )attribute (attribute (identifier_StatusReport) identifier_StatusReport (identifier_DELIVERED) identifier_DELIVERED )attribute )comparison_operator (attribute (identifier_SentSms) identifier_SentSms (identifier_FAILED) identifier_FAILED )attribute )conditional_expression )return_statement )block )else_clause )if_statement )block )function_definition )module
Status of this SMS. Can be ENROUTE, DELIVERED or FAILED The actual status report object may be accessed via the 'report' attribute if status is 'DELIVERED' or 'FAILED'
(module (function_definition (function_name_declare_param) function_name_declare_param (parameters (identifier_self) identifier_self (identifier_id_) identifier_id_ (identifier_lineno) identifier_lineno (default_parameter (identifier_type_) identifier_type_ (None) None )default_parameter )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_check_is_undeclared) identifier_check_is_undeclared )attribute (argument_list (identifier_id_) identifier_id_ (identifier_lineno) identifier_lineno (keyword_argument (identifier_classname) identifier_classname (string_'parameter') string_'parameter' )keyword_argument (keyword_argument (identifier_scope) identifier_scope (attribute (identifier_self) identifier_self (identifier_current_scope) identifier_current_scope )attribute )keyword_argument (keyword_argument (identifier_show_error) identifier_show_error (True) True )keyword_argument )argument_list )call )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_entry) identifier_entry (call (attribute (identifier_self) identifier_self (identifier_declare) identifier_declare )attribute (argument_list (identifier_id_) identifier_id_ (identifier_lineno) identifier_lineno (call (attribute (identifier_symbols) identifier_symbols (identifier_PARAMDECL) identifier_PARAMDECL )attribute (argument_list (identifier_id_) identifier_id_ (identifier_lineno) identifier_lineno (identifier_type_) identifier_type_ )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_entry) identifier_entry (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (attribute (identifier_entry) identifier_entry (identifier_declared) identifier_declared )attribute (True) True )assignment )expression_statement (if_statement (attribute (attribute (identifier_entry) identifier_entry (identifier_type_) identifier_type_ )attribute (identifier_implicit) identifier_implicit )attribute (block (expression_statement (call (identifier_warning_implicit_type) identifier_warning_implicit_type (argument_list (identifier_lineno) identifier_lineno (identifier_id_) identifier_id_ (identifier_type_) identifier_type_ )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_entry) identifier_entry )return_statement )block )function_definition )module
Declares a parameter Check if entry.declared is False. Otherwise raises an error.
(module (function_definition (function_name_html_to_xhtml) function_name_html_to_xhtml (parameters (identifier_html_unicode_string) identifier_html_unicode_string )parameters (block (try_statement (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_html_unicode_string) identifier_html_unicode_string (identifier_basestring) identifier_basestring )argument_list )call )assert_statement )block (except_clause (identifier_AssertionError) identifier_AssertionError (block (raise_statement (identifier_TypeError) identifier_TypeError )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_root) identifier_root (call (identifier_BeautifulSoup) identifier_BeautifulSoup (argument_list (identifier_html_unicode_string) identifier_html_unicode_string (string_'html.parser') string_'html.parser' )argument_list )call )assignment )expression_statement (try_statement (block (assert_statement (comparison_operator (attribute (identifier_root) identifier_root (identifier_html) identifier_html )attribute (None) None )comparison_operator )assert_statement )block (except_clause (identifier_AssertionError) identifier_AssertionError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (list (string_'html_unicode_string cannot be a fragment.') string_'html_unicode_string cannot be a fragment.' (string_'string is the following: %s') string_'string is the following: %s' (call (identifier_unicode) identifier_unicode (argument_list (identifier_root) identifier_root )argument_list )call )list )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (subscript (attribute (identifier_root) identifier_root (identifier_html) identifier_html )attribute (string_'xmlns') string_'xmlns' )subscript (string_'http://www.w3.org/1999/xhtml') string_'http://www.w3.org/1999/xhtml' )assignment )expression_statement (expression_statement (assignment (identifier_unicode_string) identifier_unicode_string (call (identifier_unicode) identifier_unicode (argument_list (call (attribute (identifier_root) identifier_root (identifier_prettify) identifier_prettify )attribute (argument_list (keyword_argument (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )keyword_argument (keyword_argument (identifier_formatter) identifier_formatter (string_'html') string_'html' )keyword_argument )argument_list )call (keyword_argument (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_tag) identifier_tag (attribute (identifier_constants) identifier_constants (identifier_SINGLETON_TAG_LIST) identifier_SINGLETON_TAG_LIST )attribute (block (expression_statement (assignment (identifier_unicode_string) identifier_unicode_string (call (attribute (identifier_unicode_string) identifier_unicode_string (identifier_replace) identifier_replace )attribute (argument_list (binary_operator (binary_operator (string_'<') string_'<' (identifier_tag) identifier_tag )binary_operator (string_'/>') string_'/>' )binary_operator (binary_operator (binary_operator (string_'<') string_'<' (identifier_tag) identifier_tag )binary_operator (string_' />') string_' />' )binary_operator )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_unicode_string) identifier_unicode_string )return_statement )block )function_definition )module
Converts html to xhtml Args: html_unicode_string: A (possible unicode) string representing HTML. Returns: A (possibly unicode) string representing XHTML. Raises: TypeError: Raised if input_string isn't a unicode string or string.
(module (function_definition (function_name_layers) function_name_layers (parameters (identifier_self) identifier_self (default_parameter (identifier_rev) identifier_rev (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_image_layers) identifier_image_layers (list_comprehension (call (identifier_PodmanImage) identifier_PodmanImage (argument_list (None) None (keyword_argument (identifier_identifier) identifier_identifier (identifier_x) identifier_x )keyword_argument (keyword_argument (identifier_pull_policy) identifier_pull_policy (attribute (identifier_PodmanImagePullPolicy) identifier_PodmanImagePullPolicy (identifier_NEVER) identifier_NEVER )attribute )keyword_argument )argument_list )call (for_in_clause (identifier_x) identifier_x (call (attribute (identifier_self) identifier_self (identifier_get_layer_ids) identifier_get_layer_ids )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (not_operator (identifier_rev) identifier_rev )not_operator (block (expression_statement (call (attribute (identifier_image_layers) identifier_image_layers (identifier_reverse) identifier_reverse )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_image_layers) identifier_image_layers )return_statement )block )function_definition )module
Get list of PodmanImage for every layer in image :param rev: get layers rev :return: list of :class:`conu.PodmanImage`
(module (function_definition (function_name_copy) function_name_copy (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_copyClass) identifier_copyClass (attribute (identifier_self) identifier_self (identifier_copyClass) identifier_copyClass )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_copyClass) identifier_copyClass (None) None )comparison_operator (block (expression_statement (assignment (identifier_copyClass) identifier_copyClass (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_copied) identifier_copied (call (identifier_copyClass) identifier_copyClass (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_copied) identifier_copied (identifier_copyData) identifier_copyData )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement (return_statement (identifier_copied) identifier_copied )return_statement )block )function_definition )module
Copy this object into a new object of the same type. The returned object will not have a parent object.
(module (function_definition (function_name_tsiterator) function_name_tsiterator (parameters (identifier_ts) identifier_ts (default_parameter (identifier_dateconverter) identifier_dateconverter (None) None )default_parameter (default_parameter (identifier_desc) identifier_desc (None) None )default_parameter (default_parameter (identifier_clean) identifier_clean (False) False )default_parameter (default_parameter (identifier_start_value) identifier_start_value (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_dateconverter) identifier_dateconverter (boolean_operator (identifier_dateconverter) identifier_dateconverter (identifier_default_converter) identifier_default_converter )boolean_operator )assignment )expression_statement (expression_statement (yield (binary_operator (list (string_'Date') string_'Date' )list (call (attribute (identifier_ts) identifier_ts (identifier_names) identifier_names )attribute (argument_list )argument_list )call )binary_operator )yield )expression_statement (if_statement (comparison_operator (identifier_clean) identifier_clean (string_'full') string_'full' )comparison_operator (block (for_statement (pattern_list (identifier_dt) identifier_dt (identifier_value) identifier_value )pattern_list (call (identifier_full_clean) identifier_full_clean (argument_list (identifier_ts) identifier_ts (identifier_dateconverter) identifier_dateconverter (identifier_desc) identifier_desc (identifier_start_value) identifier_start_value )argument_list )call (block (expression_statement (yield (binary_operator (tuple (identifier_dt) identifier_dt )tuple (call (identifier_tuple) identifier_tuple (argument_list (identifier_value) identifier_value )argument_list )call )binary_operator )yield )expression_statement )block )for_statement )block (else_clause (block (if_statement (identifier_clean) identifier_clean (block (expression_statement (assignment (identifier_ts) identifier_ts (call (attribute (identifier_ts) identifier_ts (identifier_clean) identifier_clean )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (pattern_list (identifier_dt) identifier_dt (identifier_value) identifier_value )pattern_list (call (attribute (identifier_ts) identifier_ts (identifier_items) identifier_items )attribute (argument_list (keyword_argument (identifier_desc) identifier_desc (identifier_desc) identifier_desc )keyword_argument (keyword_argument (identifier_start_value) identifier_start_value (identifier_start_value) identifier_start_value )keyword_argument )argument_list )call (block (expression_statement (assignment (identifier_dt) identifier_dt (call (identifier_dateconverter) identifier_dateconverter (argument_list (identifier_dt) identifier_dt )argument_list )call )assignment )expression_statement (expression_statement (yield (binary_operator (tuple (identifier_dt) identifier_dt )tuple (call (identifier_tuple) identifier_tuple (argument_list (identifier_value) identifier_value )argument_list )call )binary_operator )yield )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
An iterator of timeseries as tuples.
(module (function_definition (function_name_add_args) function_name_add_args (parameters (identifier_parser) identifier_parser (default_parameter (identifier_positional) identifier_positional (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_group) identifier_group (call (attribute (identifier_parser) identifier_parser (identifier_add_argument_group) identifier_add_argument_group )attribute (argument_list (string_"read loading") string_"read loading" )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_group) identifier_group (identifier_add_argument) identifier_add_argument )attribute (argument_list (conditional_expression (string_"reads") string_"reads" (identifier_positional) identifier_positional (string_"--reads") string_"--reads" )conditional_expression (keyword_argument (identifier_nargs) identifier_nargs (string_"+") string_"+" )keyword_argument (keyword_argument (identifier_default) identifier_default (list )list )keyword_argument (keyword_argument (identifier_help) identifier_help (string_"Paths to bam files. Any number of paths may be specified.") string_"Paths to bam files. Any number of paths may be specified." )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_group) identifier_group (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_"--read-source-name") string_"--read-source-name" (keyword_argument (identifier_nargs) identifier_nargs (string_"+") string_"+" )keyword_argument (keyword_argument (identifier_help) identifier_help (concatenated_string (string_"Names for each read source. The number of names specified ") string_"Names for each read source. The number of names specified " (string_"must match the number of bam files. If not specified, filenames are ") string_"must match the number of bam files. If not specified, filenames are " (string_"used for names.") string_"used for names." )concatenated_string )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_group) identifier_group (call (attribute (identifier_parser) identifier_parser (identifier_add_argument_group) identifier_add_argument_group )attribute (argument_list (string_"read filtering") string_"read filtering" (concatenated_string (string_"A number of read filters are available. See the pysam ") string_"A number of read filters are available. See the pysam " (string_"documentation (http://pysam.readthedocs.org/en/latest/api.html) ") string_"documentation (http://pysam.readthedocs.org/en/latest/api.html) " (string_"for details on what these fields mean. When multiple filter ") string_"for details on what these fields mean. When multiple filter " (string_"options are specified, reads must match *all* filters.") string_"options are specified, reads must match *all* filters." )concatenated_string )argument_list )call )assignment )expression_statement (for_statement (tuple_pattern (identifier_name) identifier_name (tuple_pattern (identifier_kind) identifier_kind (identifier_message) identifier_message (identifier_function) identifier_function )tuple_pattern )tuple_pattern (call (attribute (identifier_READ_FILTERS) identifier_READ_FILTERS (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_extra) identifier_extra (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_kind) identifier_kind (identifier_bool) identifier_bool )comparison_operator (block (expression_statement (assignment (subscript (identifier_extra) identifier_extra (string_"action") string_"action" )subscript (string_"store_true") string_"store_true" )assignment )expression_statement (expression_statement (assignment (subscript (identifier_extra) identifier_extra (string_"default") string_"default" )subscript (None) None )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_kind) identifier_kind (identifier_int) identifier_int )comparison_operator (block (expression_statement (assignment (subscript (identifier_extra) identifier_extra (string_"type") string_"type" )subscript (identifier_int) identifier_int )assignment )expression_statement (expression_statement (assignment (subscript (identifier_extra) identifier_extra (string_"metavar") string_"metavar" )subscript (string_"N") string_"N" )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_kind) identifier_kind (identifier_str) identifier_str )comparison_operator (block (expression_statement (assignment (subscript (identifier_extra) identifier_extra (string_"metavar") string_"metavar" )subscript (string_"STRING") string_"STRING" )assignment )expression_statement )block )elif_clause )if_statement (expression_statement (call (attribute (identifier_group) identifier_group (identifier_add_argument) identifier_add_argument )attribute (argument_list (binary_operator (string_"--") string_"--" (call (attribute (identifier_name) identifier_name (identifier_replace) identifier_replace )attribute (argument_list (string_"_") string_"_" (string_"-") string_"-" )argument_list )call )binary_operator (keyword_argument (identifier_help) identifier_help (identifier_message) identifier_message )keyword_argument (dictionary_splat (identifier_extra) identifier_extra )dictionary_splat )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Extends a commandline argument parser with arguments for specifying read sources.
(module (function_definition (function_name_enum) function_name_enum (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (attribute (identifier_self) identifier_self (identifier__schema) identifier__schema )attribute (identifier_get) identifier_get )attribute (argument_list (string_"enum") string_"enum" (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_list) identifier_list )argument_list )call )not_operator (block (raise_statement (call (identifier_SchemaError) identifier_SchemaError (argument_list (call (attribute (string_"enum value {0!r} is not a list") string_"enum value {0!r} is not a list" (identifier_format) identifier_format )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_value) identifier_value )argument_list )call (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_SchemaError) identifier_SchemaError (argument_list (call (attribute (concatenated_string (string_"enum value {0!r} does not contain any") string_"enum value {0!r} does not contain any" (string_" elements") string_" elements" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_seen) identifier_seen (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_item) identifier_item (identifier_value) identifier_value (block (if_statement (comparison_operator (identifier_item) identifier_item (identifier_seen) identifier_seen )comparison_operator (block (raise_statement (call (identifier_SchemaError) identifier_SchemaError (argument_list (call (attribute (concatenated_string (string_"enum value {0!r} contains duplicate element") string_"enum value {0!r} contains duplicate element" (string_" {1!r}") string_" {1!r}" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_value) identifier_value (identifier_item) identifier_item )argument_list )call )argument_list )call )raise_statement )block (else_clause (block (expression_statement (call (attribute (identifier_seen) identifier_seen (identifier_add) identifier_add )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Enumeration of allowed object values. The enumeration must not contain duplicates.
(module (function_definition (function_name_append_json) function_name_append_json (parameters (identifier_self) identifier_self (typed_parameter (identifier_obj) identifier_obj (type (identifier_Any) identifier_Any )type )typed_parameter (typed_default_parameter (identifier_headers) identifier_headers (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (string_'MultiMapping[str]') string_'MultiMapping[str]' )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (identifier_Payload) identifier_Payload )type (block (if_statement (comparison_operator (identifier_headers) identifier_headers (None) None )comparison_operator (block (expression_statement (assignment (identifier_headers) identifier_headers (call (identifier_CIMultiDict) identifier_CIMultiDict (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_append_payload) identifier_append_payload )attribute (argument_list (call (identifier_JsonPayload) identifier_JsonPayload (argument_list (identifier_obj) identifier_obj (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Helper to append JSON part.
(module (function_definition (function_name_select) function_name_select (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_properties) identifier_properties )list_splat_pattern (dictionary_splat_pattern (identifier_aliased_properties) identifier_aliased_properties )dictionary_splat_pattern )parameters (block (if_statement (not_operator (parenthesized_expression (boolean_operator (identifier_properties) identifier_properties (identifier_aliased_properties) identifier_aliased_properties )boolean_operator )parenthesized_expression )not_operator (block (return_statement (identifier_self) identifier_self )return_statement )block )if_statement (expression_statement (assignment (identifier_merged_properties) identifier_merged_properties (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (identifier_properties) identifier_properties (identifier_properties) identifier_properties )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_merged_properties) identifier_merged_properties (identifier_update) identifier_update )attribute (argument_list (identifier_aliased_properties) identifier_aliased_properties )argument_list )call )expression_statement (for_statement (identifier_prop_name) identifier_prop_name (parenthesized_expression (call (attribute (identifier_merged_properties) identifier_merged_properties (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )parenthesized_expression (block (if_statement (comparison_operator (identifier_prop_name) identifier_prop_name (attribute (identifier_self) identifier_self (identifier_selection) identifier_selection )attribute )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (call (attribute (string_'The property {} has already been selected') string_'The property {} has already been selected' (identifier_format) identifier_format )attribute (argument_list (identifier_prop_name) identifier_prop_name )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_new_selection) identifier_new_selection (call (attribute (attribute (identifier_self) identifier_self (identifier_selection) identifier_selection )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_new_selection) identifier_new_selection (identifier_update) identifier_update )attribute (argument_list (identifier_merged_properties) identifier_merged_properties )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__copy) identifier__copy )attribute (argument_list (keyword_argument (identifier_selection) identifier_selection (identifier_new_selection) identifier_new_selection )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Specify which properties of the dataset must be returned Property extraction is based on `JMESPath <http://jmespath.org>`_ expressions. This method returns a new Dataset narrowed down by the given selection. :param properties: JMESPath to use for the property extraction. The JMESPath string will be used as a key in the output dictionary. :param aliased_properties: Same as properties, but the output dictionary will contain the parameter name instead of the JMESPath string.
(module (function_definition (function_name_getEvoBibAsBibtex) function_name_getEvoBibAsBibtex (parameters (list_splat_pattern (identifier_keys) identifier_keys )list_splat_pattern (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_res) identifier_res (list )list )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_keys) identifier_keys (block (expression_statement (assignment (identifier_bib) identifier_bib (attribute (call (identifier_get_url) identifier_get_url (argument_list (binary_operator (string_"http://bibliography.lingpy.org/raw.php?key=") string_"http://bibliography.lingpy.org/raw.php?key=" (identifier_key) identifier_key )binary_operator (keyword_argument (identifier_log) identifier_log (call (attribute (identifier_kw) identifier_kw (identifier_get) identifier_get )attribute (argument_list (string_'log') string_'log' )argument_list )call )keyword_argument )argument_list )call (identifier_text) identifier_text )attribute )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_res) identifier_res (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'@') string_'@' (subscript (call (attribute (subscript (call (attribute (identifier_bib) identifier_bib (identifier_split) identifier_split )attribute (argument_list (string_'@') string_'@' )argument_list )call (integer_1) integer_1 )subscript (identifier_split) identifier_split )attribute (argument_list (string_'</pre>') string_'</pre>' )argument_list )call (integer_0) integer_0 )subscript )binary_operator )argument_list )call )expression_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (expression_statement (call (attribute (identifier_res) identifier_res (identifier_append) identifier_append )attribute (argument_list (binary_operator (binary_operator (string_'@misc{') string_'@misc{' (identifier_key) identifier_key )binary_operator (string_',\nNote={missing source}\n\n}') string_',\nNote={missing source}\n\n}' )binary_operator )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement (return_statement (call (attribute (string_'\n\n') string_'\n\n' (identifier_join) identifier_join )attribute (argument_list (identifier_res) identifier_res )argument_list )call )return_statement )block )function_definition )module
Download bibtex format and parse it from EvoBib
(module (function_definition (function_name__charInfo) function_name__charInfo (parameters (identifier_self) identifier_self (identifier_point) identifier_point (identifier_padding) identifier_padding )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (call (attribute (string_'{0:0>4X} ') string_'{0:0>4X} ' (identifier_format) identifier_format )attribute (argument_list (identifier_point) identifier_point )argument_list )call (identifier_rjust) identifier_rjust )attribute (argument_list (identifier_padding) identifier_padding )argument_list )call (call (attribute (identifier_ud) identifier_ud (identifier_name) identifier_name )attribute (argument_list (call (identifier_chr) identifier_chr (argument_list (identifier_point) identifier_point )argument_list )call (call (attribute (string_'<code point {0:0>4X}>') string_'<code point {0:0>4X}>' (identifier_format) identifier_format )attribute (argument_list (identifier_point) identifier_point )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Displays character info.
(module (function_definition (function_name_get_recursive_subclasses) function_name_get_recursive_subclasses (parameters (identifier_cls) identifier_cls )parameters (block (return_statement (binary_operator (call (attribute (identifier_cls) identifier_cls (identifier___subclasses__) identifier___subclasses__ )attribute (argument_list )argument_list )call (list_comprehension (identifier_g) identifier_g (for_in_clause (identifier_s) identifier_s (call (attribute (identifier_cls) identifier_cls (identifier___subclasses__) identifier___subclasses__ )attribute (argument_list )argument_list )call )for_in_clause (for_in_clause (identifier_g) identifier_g (call (identifier_get_recursive_subclasses) identifier_get_recursive_subclasses (argument_list (identifier_s) identifier_s )argument_list )call )for_in_clause )list_comprehension )binary_operator )return_statement )block )function_definition )module
Return list of all subclasses for a class, including subclasses of direct subclasses
(module (function_definition (function_name_fit_transform) function_name_fit_transform (parameters (identifier_self) identifier_self (identifier_input) identifier_input (dictionary_splat_pattern (identifier_fit_kwargs) identifier_fit_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_fit) identifier_fit )attribute (argument_list (identifier_input) identifier_input (dictionary_splat (identifier_fit_kwargs) identifier_fit_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (assignment (identifier_X) identifier_X (call (attribute (identifier_self) identifier_self (identifier_transform) identifier_transform )attribute (argument_list (identifier_input) identifier_input )argument_list )call )assignment )expression_statement (return_statement (identifier_X) identifier_X )return_statement )block )function_definition )module
Execute fit and transform in sequence.
(module (function_definition (function_name_cybox_valueset_fact_handler) function_name_cybox_valueset_fact_handler (parameters (identifier_self) identifier_self (identifier_enrichment) identifier_enrichment (identifier_fact) identifier_fact (identifier_attr_info) identifier_attr_info (identifier_add_fact_kargs) identifier_add_fact_kargs )parameters (block (expression_statement (assignment (identifier_value_list) identifier_value_list (call (attribute (subscript (subscript (identifier_attr_info) identifier_attr_info (string_'value_set') string_'value_set' )subscript (subscript (identifier_fact) identifier_fact (string_'node_id') string_'node_id' )subscript )subscript (identifier_split) identifier_split )attribute (argument_list (string_",") string_"," )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value_list) identifier_value_list (call (identifier_map) identifier_map (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (call (attribute (identifier_x) identifier_x (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )lambda (identifier_value_list) identifier_value_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_add_fact_kargs) identifier_add_fact_kargs (string_'values') string_'values' )subscript (identifier_value_list) identifier_value_list )assignment )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Handler for dealing with 'value_set' values. Unfortunately, CybOX et al. sometimes use comma-separated value lists rather than an XML structure that can contain several values. This handler is called for elements concerning a value-set such as the following example:: <URIObj:Value condition="IsInSet" value_set="www.sample1.com/index.html, sample2.com/login.html, dev.sample3.com/index/kb.html" datatype="AnyURI"/>
(module (function_definition (function_name_update_wrapper) function_name_update_wrapper (parameters (identifier_self) identifier_self (identifier_process_list) identifier_process_list )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_count) identifier_set_count )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_process_list) identifier_process_list )argument_list )call )argument_list )call )expression_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_should_update) identifier_should_update )attribute (argument_list )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_update) identifier_update )attribute (argument_list (identifier_process_list) identifier_process_list )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_result) identifier_result )attribute (argument_list )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Wrapper for the children update
(module (function_definition (function_name_index) function_name_index (parameters (identifier_obj) identifier_obj (default_parameter (identifier_index) identifier_index (identifier_INDEX_NAME) identifier_INDEX_NAME )default_parameter (default_parameter (identifier_doc_type) identifier_doc_type (identifier_DOC_TYPE) identifier_DOC_TYPE )default_parameter )parameters (block (expression_statement (assignment (identifier_doc) identifier_doc (call (identifier_to_dict) identifier_to_dict (argument_list (identifier_obj) identifier_obj )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_doc) identifier_doc (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_id) identifier_id (call (attribute (identifier_doc) identifier_doc (identifier_pop) identifier_pop )attribute (argument_list (string_'id') string_'id' )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_es_conn) identifier_es_conn (identifier_index) identifier_index )attribute (argument_list (identifier_index) identifier_index (identifier_doc_type) identifier_doc_type (identifier_doc) identifier_doc (keyword_argument (identifier_id) identifier_id (identifier_id) identifier_id )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Index the given document. https://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.Elasticsearch.index https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html
(module (function_definition (function_name_upload) function_name_upload (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename (default_parameter (identifier_directory) identifier_directory (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_filename) identifier_filename (call (identifier_eval_path) identifier_eval_path (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_directory) identifier_directory (None) None )comparison_operator (block (expression_statement (assignment (identifier_directory) identifier_directory (attribute (identifier_self) identifier_self (identifier_downloads_directory) identifier_downloads_directory )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_res1) identifier_res1 (call (attribute (identifier_self) identifier_self (identifier__req_upload) identifier__req_upload )attribute (argument_list (identifier_filename) identifier_filename (identifier_directory) identifier_directory )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data1) identifier_data1 (subscript (identifier_res1) identifier_res1 (string_'data') string_'data' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_file_id) identifier_file_id (subscript (identifier_data1) identifier_data1 (string_'file_id') string_'file_id' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_res2) identifier_res2 (call (attribute (identifier_self) identifier_self (identifier__req_file) identifier__req_file )attribute (argument_list (identifier_file_id) identifier_file_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data2) identifier_data2 (subscript (subscript (identifier_res2) identifier_res2 (string_'data') string_'data' )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_data2) identifier_data2 (identifier_update) identifier_update )attribute (argument_list (dictionary_splat (identifier_data1) identifier_data1 )dictionary_splat )argument_list )call )expression_statement (return_statement (call (identifier__instantiate_uploaded_file) identifier__instantiate_uploaded_file (argument_list (identifier_self) identifier_self (identifier_data2) identifier_data2 )argument_list )call )return_statement )block )function_definition )module
Upload a file ``filename`` to ``directory`` :param str filename: path to the file to upload :param directory: destionation :class:`.Directory`, defaults to :attribute:`.API.downloads_directory` if None :return: the uploaded file :rtype: :class:`.File`
(module (function_definition (function_name_modifyInPlace) function_name_modifyInPlace (parameters (identifier_self) identifier_self (keyword_separator )keyword_separator (default_parameter (identifier_sort) identifier_sort (None) None )default_parameter (default_parameter (identifier_purge) identifier_purge (False) False )default_parameter (default_parameter (identifier_done) identifier_done (None) None )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (call (attribute (identifier_self) identifier_self (identifier_modify) identifier_modify )attribute (argument_list (keyword_argument (identifier_sort) identifier_sort (identifier_sort) identifier_sort )keyword_argument (keyword_argument (identifier_purge) identifier_purge (identifier_purge) identifier_purge )keyword_argument (keyword_argument (identifier_done) identifier_done (identifier_done) identifier_done )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
Like Model.modify, but changes existing database instead of returning a new one.
(module (function_definition (function_name_apply) function_name_apply (parameters (identifier_coro) identifier_coro (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (expression_statement (call (identifier_assert_corofunction) identifier_assert_corofunction (argument_list (keyword_argument (identifier_coro) identifier_coro (identifier_coro) identifier_coro )keyword_argument )argument_list )call )expression_statement (decorated_definition (decorator (attribute (identifier_asyncio) identifier_asyncio (identifier_coroutine) identifier_coroutine )attribute )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (list_splat_pattern (identifier__args) identifier__args )list_splat_pattern (dictionary_splat_pattern (identifier__kw) identifier__kw )dictionary_splat_pattern )parameters (block (return_statement (parenthesized_expression (yield (call (identifier_coro) identifier_coro (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call )yield )parenthesized_expression )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
Creates a continuation coroutine function with some arguments already applied. Useful as a shorthand when combined with other control flow functions. Any arguments passed to the returned function are added to the arguments originally passed to apply. This is similar to `paco.partial()`. This function can be used as decorator. arguments: coro (coroutinefunction): coroutine function to wrap. *args (mixed): mixed variadic arguments for partial application. *kwargs (mixed): mixed variadic keyword arguments for partial application. Raises: TypeError: if coro argument is not a coroutine function. Returns: coroutinefunction: wrapped coroutine function. Usage:: async def hello(name, mark='!'): print('Hello, {name}{mark}'.format(name=name, mark=mark)) hello_mike = paco.apply(hello, 'Mike') await hello_mike() # => Hello, Mike! hello_mike = paco.apply(hello, 'Mike', mark='?') await hello_mike() # => Hello, Mike?
(module (function_definition (function_name_document_create) function_name_document_create (parameters (identifier_index) identifier_index (identifier_doc_type) identifier_doc_type (default_parameter (identifier_body) identifier_body (None) None )default_parameter (default_parameter (identifier_id) identifier_id (None) None )default_parameter (default_parameter (identifier_hosts) identifier_hosts (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter (default_parameter (identifier_source) identifier_source (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_es) identifier_es (call (identifier__get_instance) identifier__get_instance (argument_list (identifier_hosts) identifier_hosts (identifier_profile) identifier_profile )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_source) identifier_source (identifier_body) identifier_body )boolean_operator (block (expression_statement (assignment (identifier_message) identifier_message (string_'Either body or source should be specified but not both.') string_'Either body or source should be specified but not both.' )assignment )expression_statement (raise_statement (call (identifier_SaltInvocationError) identifier_SaltInvocationError (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_source) identifier_source (block (expression_statement (assignment (identifier_body) identifier_body (call (subscript (identifier___salt__) identifier___salt__ (string_'cp.get_file_str') string_'cp.get_file_str' )subscript (argument_list (identifier_source) identifier_source (keyword_argument (identifier_saltenv) identifier_saltenv (call (attribute (identifier___opts__) identifier___opts__ (identifier_get) identifier_get )attribute (argument_list (string_'saltenv') string_'saltenv' (string_'base') string_'base' )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (try_statement (block (return_statement (call (attribute (identifier_es) identifier_es (identifier_index) identifier_index )attribute (argument_list (keyword_argument (identifier_index) identifier_index (identifier_index) identifier_index )keyword_argument (keyword_argument (identifier_doc_type) identifier_doc_type (identifier_doc_type) identifier_doc_type )keyword_argument (keyword_argument (identifier_body) identifier_body (identifier_body) identifier_body )keyword_argument (keyword_argument (identifier_id) identifier_id (identifier_id) identifier_id )keyword_argument )argument_list )call )return_statement )block (except_clause (as_pattern (attribute (identifier_elasticsearch) identifier_elasticsearch (identifier_TransportError) identifier_TransportError )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (call (attribute (string_"Cannot create document in index {0}, server returned code {1} with message {2}") string_"Cannot create document in index {0}, server returned code {1} with message {2}" (identifier_format) identifier_format )attribute (argument_list (identifier_index) identifier_index (attribute (identifier_e) identifier_e (identifier_status_code) identifier_status_code )attribute (attribute (identifier_e) identifier_e (identifier_error) identifier_error )attribute )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Create a document in a specified index index Index name where the document should reside doc_type Type of the document body Document to store source URL of file specifying document to store. Cannot be used in combination with ``body``. id Optional unique document identifier for specified doc_type (empty for random) CLI example:: salt myminion elasticsearch.document_create testindex doctype1 '{}'
(module (function_definition (function_name_max_enrichment) function_name_max_enrichment (parameters (identifier_fg_vals) identifier_fg_vals (identifier_bg_vals) identifier_bg_vals (default_parameter (identifier_minbg) identifier_minbg (integer_2) integer_2 )default_parameter )parameters (block (expression_statement (assignment (identifier_scores) identifier_scores (call (attribute (identifier_np) identifier_np (identifier_hstack) identifier_hstack )attribute (argument_list (tuple (identifier_fg_vals) identifier_fg_vals (identifier_bg_vals) identifier_bg_vals )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_idx) identifier_idx (call (attribute (identifier_np) identifier_np (identifier_argsort) identifier_argsort )attribute (argument_list (identifier_scores) identifier_scores )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_np) identifier_np (identifier_hstack) identifier_hstack )attribute (argument_list (tuple (call (attribute (identifier_np) identifier_np (identifier_ones) identifier_ones )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_fg_vals) identifier_fg_vals )argument_list )call )argument_list )call (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_bg_vals) identifier_bg_vals )argument_list )call )argument_list )call )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_xsort) identifier_xsort (subscript (identifier_x) identifier_x (identifier_idx) identifier_idx )subscript )assignment )expression_statement (expression_statement (assignment (identifier_l_fg) identifier_l_fg (call (identifier_len) identifier_len (argument_list (identifier_fg_vals) identifier_fg_vals )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_l_bg) identifier_l_bg (call (identifier_len) identifier_len (argument_list (identifier_bg_vals) identifier_bg_vals )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_m) identifier_m (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_scores) identifier_scores )argument_list )call (integer_0) integer_0 (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call (block (expression_statement (assignment (identifier_bgcount) identifier_bgcount (call (identifier_float) identifier_float (argument_list (call (identifier_len) identifier_len (argument_list (subscript (subscript (identifier_xsort) identifier_xsort (slice (identifier_i) identifier_i (colon) colon )slice )subscript (comparison_operator (subscript (identifier_xsort) identifier_xsort (slice (identifier_i) identifier_i (colon) colon )slice )subscript (integer_0) integer_0 )comparison_operator )subscript )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_bgcount) identifier_bgcount (identifier_minbg) identifier_minbg )comparison_operator (block (expression_statement (assignment (identifier_enr) identifier_enr (binary_operator (parenthesized_expression (binary_operator (call (identifier_len) identifier_len (argument_list (subscript (subscript (identifier_xsort) identifier_xsort (slice (identifier_i) identifier_i (colon) colon )slice )subscript (comparison_operator (subscript (identifier_xsort) identifier_xsort (slice (identifier_i) identifier_i (colon) colon )slice )subscript (integer_1) integer_1 )comparison_operator )subscript )argument_list )call (identifier_l_fg) identifier_l_fg )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (identifier_bgcount) identifier_bgcount (identifier_l_bg) identifier_l_bg )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_enr) identifier_enr (identifier_m) identifier_m )comparison_operator (block (expression_statement (assignment (identifier_m) identifier_m (identifier_enr) identifier_enr )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (subscript (identifier_scores) identifier_scores (subscript (identifier_idx) identifier_idx (identifier_i) identifier_i )subscript )subscript )assignment )expression_statement )block )if_statement )block )if_statement )block )for_statement (return_statement (identifier_m) identifier_m )return_statement )block )function_definition )module
Computes the maximum enrichment. Parameters ---------- fg_vals : array_like The list of values for the positive set. bg_vals : array_like The list of values for the negative set. minbg : int, optional Minimum number of matches in background. The default is 2. Returns ------- enrichment : float Maximum enrichment.
(module (function_definition (function_name__resolve_image) function_name__resolve_image (parameters (identifier_ret) identifier_ret (identifier_image) identifier_image (identifier_client_timeout) identifier_client_timeout )parameters (block (expression_statement (assignment (identifier_image_id) identifier_image_id (call (subscript (identifier___salt__) identifier___salt__ (string_'docker.resolve_image_id') string_'docker.resolve_image_id' )subscript (argument_list (identifier_image) identifier_image )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_image_id) identifier_image_id (False) False )comparison_operator (block (if_statement (not_operator (subscript (identifier___opts__) identifier___opts__ (string_'test') string_'test' )subscript )not_operator (block (try_statement (block (expression_statement (assignment (identifier_pull_result) identifier_pull_result (call (subscript (identifier___salt__) identifier___salt__ (string_'docker.pull') string_'docker.pull' )subscript (argument_list (identifier_image) identifier_image (keyword_argument (identifier_client_timeout) identifier_client_timeout (identifier_client_timeout) identifier_client_timeout )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (call (attribute (string_'Failed to pull {0}: {1}') string_'Failed to pull {0}: {1}' (identifier_format) identifier_format )attribute (argument_list (identifier_image) identifier_image (identifier_exc) identifier_exc )argument_list )call )argument_list )call )raise_statement )block )except_clause (else_clause (block (expression_statement (assignment (subscript (subscript (identifier_ret) identifier_ret (string_'changes') string_'changes' )subscript (string_'image') string_'image' )subscript (identifier_pull_result) identifier_pull_result )assignment )expression_statement (expression_statement (assignment (identifier_image_id) identifier_image_id (call (subscript (identifier___salt__) identifier___salt__ (string_'docker.resolve_image_id') string_'docker.resolve_image_id' )subscript (argument_list (identifier_image) identifier_image )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_image_id) identifier_image_id (False) False )comparison_operator (block (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (call (attribute (concatenated_string (string_'Image \'{0}\' not present despite a docker pull ') string_'Image \'{0}\' not present despite a docker pull ' (string_'raising no errors') string_'raising no errors' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_image) identifier_image )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )else_clause )try_statement )block )if_statement )block )if_statement (return_statement (identifier_image_id) identifier_image_id )return_statement )block )function_definition )module
Resolve the image ID and pull the image if necessary
(module (function_definition (function_name_create) function_name_create (parameters (identifier_self) identifier_self (default_parameter (identifier_friendly_name) identifier_friendly_name (attribute (identifier_values) identifier_values (identifier_unset) identifier_unset )attribute )default_parameter (default_parameter (identifier_domain_name) identifier_domain_name (attribute (identifier_values) identifier_values (identifier_unset) identifier_unset )attribute )default_parameter (default_parameter (identifier_disaster_recovery_url) identifier_disaster_recovery_url (attribute (identifier_values) identifier_values (identifier_unset) identifier_unset )attribute )default_parameter (default_parameter (identifier_disaster_recovery_method) identifier_disaster_recovery_method (attribute (identifier_values) identifier_values (identifier_unset) identifier_unset )attribute )default_parameter (default_parameter (identifier_recording) identifier_recording (attribute (identifier_values) identifier_values (identifier_unset) identifier_unset )attribute )default_parameter (default_parameter (identifier_secure) identifier_secure (attribute (identifier_values) identifier_values (identifier_unset) identifier_unset )attribute )default_parameter (default_parameter (identifier_cnam_lookup_enabled) identifier_cnam_lookup_enabled (attribute (identifier_values) identifier_values (identifier_unset) identifier_unset )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_values) identifier_values (identifier_of) identifier_of )attribute (argument_list (dictionary (pair (string_'FriendlyName') string_'FriendlyName' (identifier_friendly_name) identifier_friendly_name )pair (pair (string_'DomainName') string_'DomainName' (identifier_domain_name) identifier_domain_name )pair (pair (string_'DisasterRecoveryUrl') string_'DisasterRecoveryUrl' (identifier_disaster_recovery_url) identifier_disaster_recovery_url )pair (pair (string_'DisasterRecoveryMethod') string_'DisasterRecoveryMethod' (identifier_disaster_recovery_method) identifier_disaster_recovery_method )pair (pair (string_'Recording') string_'Recording' (identifier_recording) identifier_recording )pair (pair (string_'Secure') string_'Secure' (identifier_secure) identifier_secure )pair (pair (string_'CnamLookupEnabled') string_'CnamLookupEnabled' (identifier_cnam_lookup_enabled) identifier_cnam_lookup_enabled )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_create) identifier_create )attribute (argument_list (string_'POST') string_'POST' (attribute (identifier_self) identifier_self (identifier__uri) identifier__uri )attribute (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_TrunkInstance) identifier_TrunkInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload )argument_list )call )return_statement )block )function_definition )module
Create a new TrunkInstance :param unicode friendly_name: A string to describe the resource :param unicode domain_name: The unique address you reserve on Twilio to which you route your SIP traffic :param unicode disaster_recovery_url: The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL :param unicode disaster_recovery_method: The HTTP method we should use to call the disaster_recovery_url :param TrunkInstance.RecordingSetting recording: The recording settings for the trunk :param bool secure: Whether Secure Trunking is enabled for the trunk :param bool cnam_lookup_enabled: Whether Caller ID Name (CNAM) lookup should be enabled for the trunk :returns: Newly created TrunkInstance :rtype: twilio.rest.trunking.v1.trunk.TrunkInstance
(module (function_definition (function_name__fulfills_version_string) function_name__fulfills_version_string (parameters (identifier_installed_versions) identifier_installed_versions (identifier_version_conditions_string) identifier_version_conditions_string (default_parameter (identifier_ignore_epoch) identifier_ignore_epoch (False) False )default_parameter (default_parameter (identifier_allow_updates) identifier_allow_updates (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_version_conditions) identifier_version_conditions (call (identifier__parse_version_string) identifier__parse_version_string (argument_list (identifier_version_conditions_string) identifier_version_conditions_string )argument_list )call )assignment )expression_statement (for_statement (identifier_installed_version) identifier_installed_version (identifier_installed_versions) identifier_installed_versions (block (expression_statement (assignment (identifier_fullfills_all) identifier_fullfills_all (True) True )assignment )expression_statement (for_statement (pattern_list (identifier_operator) identifier_operator (identifier_version_string) identifier_version_string )pattern_list (identifier_version_conditions) identifier_version_conditions (block (if_statement (boolean_operator (boolean_operator (identifier_allow_updates) identifier_allow_updates (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_version_conditions) identifier_version_conditions )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator (comparison_operator (identifier_operator) identifier_operator (string_'==') string_'==' )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_operator) identifier_operator (string_'>=') string_'>=' )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_fullfills_all) identifier_fullfills_all (boolean_operator (identifier_fullfills_all) identifier_fullfills_all (call (identifier__fulfills_version_spec) identifier__fulfills_version_spec (argument_list (list (identifier_installed_version) identifier_installed_version )list (identifier_operator) identifier_operator (identifier_version_string) identifier_version_string (keyword_argument (identifier_ignore_epoch) identifier_ignore_epoch (identifier_ignore_epoch) identifier_ignore_epoch )keyword_argument )argument_list )call )boolean_operator )assignment )expression_statement )block )for_statement (if_statement (identifier_fullfills_all) identifier_fullfills_all (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Returns True if any of the installed versions match the specified version conditions, otherwise returns False. installed_versions The installed versions version_conditions_string The string containing all version conditions. E.G. 1.2.3-4 >=1.2.3-4 >=1.2.3-4, <2.3.4-5 >=1.2.3-4, <2.3.4-5, !=1.2.4-1 ignore_epoch : False When a package version contains an non-zero epoch (e.g. ``1:3.14.159-2.el7``, and a specific version of a package is desired, set this option to ``True`` to ignore the epoch when comparing versions. allow_updates : False Allow the package to be updated outside Salt's control (e.g. auto updates on Windows). This means a package on the Minion can have a newer version than the latest available in the repository without enforcing a re-installation of the package. (Only applicable if only one strict version condition is specified E.G. version: 2.0.6~ubuntu3)
(module (function_definition (function_name_map_nested) function_name_map_nested (parameters (identifier_function) identifier_function (identifier_data_struct) identifier_data_struct (default_parameter (identifier_dict_only) identifier_dict_only (False) False )default_parameter (default_parameter (identifier_map_tuple) identifier_map_tuple (False) False )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data_struct) identifier_data_struct (identifier_dict) identifier_dict )argument_list )call (block (return_statement (dictionary_comprehension (pair (identifier_k) identifier_k (call (identifier_map_nested) identifier_map_nested (argument_list (identifier_function) identifier_function (identifier_v) identifier_v (identifier_dict_only) identifier_dict_only (identifier_map_tuple) identifier_map_tuple )argument_list )call )pair (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_data_struct) identifier_data_struct (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )return_statement )block (elif_clause (not_operator (identifier_dict_only) identifier_dict_only )not_operator (block (expression_statement (assignment (identifier_types) identifier_types (list (identifier_list) identifier_list )list )assignment )expression_statement (if_statement (identifier_map_tuple) identifier_map_tuple (block (expression_statement (call (attribute (identifier_types) identifier_types (identifier_append) identifier_append )attribute (argument_list (identifier_tuple) identifier_tuple )argument_list )call )expression_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data_struct) identifier_data_struct (call (identifier_tuple) identifier_tuple (argument_list (identifier_types) identifier_types )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_mapped) identifier_mapped (list_comprehension (call (identifier_map_nested) identifier_map_nested (argument_list (identifier_function) identifier_function (identifier_v) identifier_v (identifier_dict_only) identifier_dict_only (identifier_map_tuple) identifier_map_tuple )argument_list )call (for_in_clause (identifier_v) identifier_v (identifier_data_struct) identifier_data_struct )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data_struct) identifier_data_struct (identifier_list) identifier_list )argument_list )call (block (return_statement (identifier_mapped) identifier_mapped )return_statement )block (else_clause (block (return_statement (call (identifier_tuple) identifier_tuple (argument_list (identifier_mapped) identifier_mapped )argument_list )call )return_statement )block )else_clause )if_statement )block )if_statement )block )elif_clause )if_statement (return_statement (call (identifier_function) identifier_function (argument_list (identifier_data_struct) identifier_data_struct )argument_list )call )return_statement )block )function_definition )module
Apply a function recursively to each element of a nested data struct.
(module (function_definition (function_name_GetAnalyzers) function_name_GetAnalyzers (parameters (identifier_cls) identifier_cls )parameters (block (for_statement (pattern_list (identifier_analyzer_name) identifier_analyzer_name (identifier_analyzer_class) identifier_analyzer_class )pattern_list (call (identifier_iter) identifier_iter (argument_list (call (attribute (attribute (identifier_cls) identifier_cls (identifier__analyzer_classes) identifier__analyzer_classes )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call (block (expression_statement (yield (expression_list (identifier_analyzer_name) identifier_analyzer_name (identifier_analyzer_class) identifier_analyzer_class )expression_list )yield )expression_statement )block )for_statement )block )function_definition )module
Retrieves the registered analyzers. Yields: tuple: containing: str: the uniquely identifying name of the analyzer type: the analyzer class.
(module (function_definition (function_name_initialise) function_name_initialise (parameters )parameters (block (global_statement (identifier_settings) identifier_settings (identifier_project_settings) identifier_project_settings )global_statement (expression_statement (assignment (identifier_settings) identifier_settings (call (attribute (identifier_Changes) identifier_Changes (identifier_load) identifier_load )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_project_settings) identifier_project_settings (call (attribute (identifier_Project) identifier_Project (identifier_load) identifier_load )attribute (argument_list (call (identifier_GitHubRepository) identifier_GitHubRepository (argument_list (keyword_argument (identifier_auth_token) identifier_auth_token (attribute (identifier_settings) identifier_settings (identifier_auth_token) identifier_auth_token )attribute )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement )block )function_definition )module
Detects, prompts and initialises the project. Stores project and tool configuration in the `changes` module.
(module (function_definition (function_name_full_size) function_name_full_size (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_dragpos) identifier_dragpos )attribute (call (attribute (identifier_wx) identifier_wx (identifier_Point) identifier_Point )attribute (argument_list (integer_0) integer_0 (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_zoom) identifier_zoom )attribute (float_1.0) float_1.0 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_need_redraw) identifier_need_redraw )attribute (True) True )assignment )expression_statement )block )function_definition )module
show image at full size