sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_view_contents) function_name_view_contents (parameters (identifier_token) identifier_token (identifier_dstore) identifier_dstore )parameters (block (try_statement (block (expression_statement (assignment (identifier_desc) identifier_desc (attribute (subscript (identifier_dstore) identifier_dstore (string_'oqparam') string_'oqparam' )subscript (identifier_description) identifier_description )attribute )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_desc) identifier_desc (string_'') string_'' )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_sorted) identifier_sorted (generator_expression (tuple (call (attribute (identifier_dstore) identifier_dstore (identifier_getsize) identifier_getsize )attribute (argument_list (identifier_key) identifier_key )argument_list )call (identifier_key) identifier_key )tuple (for_in_clause (identifier_key) identifier_key (identifier_dstore) identifier_dstore )for_in_clause )generator_expression )call )assignment )expression_statement (expression_statement (assignment (identifier_rows) identifier_rows (list_comprehension (tuple (identifier_key) identifier_key (call (identifier_humansize) identifier_humansize (argument_list (identifier_nbytes) identifier_nbytes )argument_list )call )tuple (for_in_clause (pattern_list (identifier_nbytes) identifier_nbytes (identifier_key) identifier_key )pattern_list (identifier_data) identifier_data )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_total) identifier_total (binary_operator (string_'\n%s : %s') string_'\n%s : %s' (tuple (attribute (identifier_dstore) identifier_dstore (identifier_filename) identifier_filename )attribute (call (identifier_humansize) identifier_humansize (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_getsize) identifier_getsize )attribute (argument_list (attribute (identifier_dstore) identifier_dstore (identifier_filename) identifier_filename )attribute )argument_list )call )argument_list )call )tuple )binary_operator )assignment )expression_statement (return_statement (binary_operator (call (identifier_rst_table) identifier_rst_table (argument_list (identifier_rows) identifier_rows (keyword_argument (identifier_header) identifier_header (tuple (identifier_desc) identifier_desc (string_'') string_'' )tuple )keyword_argument )argument_list )call (identifier_total) identifier_total )binary_operator )return_statement )block )function_definition )module
Returns the size of the contents of the datastore and its total size
(module (function_definition (function_name_list_instance_profiles) function_name_list_instance_profiles (parameters (default_parameter (identifier_path_prefix) identifier_path_prefix (string_'/') string_'/' )default_parameter (default_parameter (identifier_region) identifier_region (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_keyid) identifier_keyid (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_get_all_instance_profiles) identifier_get_all_instance_profiles (argument_list (identifier_path_prefix) identifier_path_prefix (identifier_region) identifier_region (identifier_key) identifier_key (identifier_keyid) identifier_keyid (identifier_profile) identifier_profile )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (subscript (identifier_i) identifier_i (string_'instance_profile_name') string_'instance_profile_name' )subscript (for_in_clause (identifier_i) identifier_i (identifier_p) identifier_p )for_in_clause )list_comprehension )return_statement )block )function_definition )module
List all IAM instance profiles, starting at the optional path. .. versionadded:: 2016.11.0 CLI Example: salt-call boto_iam.list_instance_profiles
(module (function_definition (function_name_wait_for_responses) function_name_wait_for_responses (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_thread) identifier_thread )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_COMMAND_RESPONSE_TIMEOUT_S) identifier_COMMAND_RESPONSE_TIMEOUT_S )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_running) identifier_running )attribute (False) False )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier_responses) identifier_responses )attribute )return_statement )block )function_definition )module
Block the thread and wait for the response to the given request to arrive from the VI. If no matching response is received in COMMAND_RESPONSE_TIMEOUT_S seconds, returns anyway.
(module (function_definition (function_name__is_valid_string) function_name__is_valid_string (parameters (identifier_self) identifier_self (identifier_inpt) identifier_inpt (identifier_metadata) identifier_metadata )parameters (block (if_statement (not_operator (call (identifier_is_string) identifier_is_string (argument_list (identifier_inpt) identifier_inpt )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (boolean_operator (call (attribute (identifier_metadata) identifier_metadata (identifier_get_minimum_string_length) identifier_get_minimum_string_length )attribute (argument_list )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_inpt) identifier_inpt )argument_list )call (call (attribute (identifier_metadata) identifier_metadata (identifier_get_minimum_string_length) identifier_get_minimum_string_length )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (return_statement (False) False )return_statement )block (elif_clause (boolean_operator (call (attribute (identifier_metadata) identifier_metadata (identifier_get_maximum_string_length) identifier_get_maximum_string_length )attribute (argument_list )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_inpt) identifier_inpt )argument_list )call (call (attribute (identifier_metadata) identifier_metadata (identifier_get_maximum_string_length) identifier_get_maximum_string_length )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (return_statement (False) False )return_statement )block )elif_clause )if_statement (if_statement (boolean_operator (call (attribute (identifier_metadata) identifier_metadata (identifier_get_string_set) identifier_get_string_set )attribute (argument_list )argument_list )call (comparison_operator (identifier_inpt) identifier_inpt (call (attribute (identifier_metadata) identifier_metadata (identifier_get_string_set) identifier_get_string_set )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (return_statement (False) False )return_statement )block (else_clause (block (return_statement (True) True )return_statement )block )else_clause )if_statement )block )function_definition )module
Checks if input is a valid string
(module (function_definition (function_name_up_threshold) function_name_up_threshold (parameters (identifier_x) identifier_x (identifier_s) identifier_s (identifier_p) identifier_p )parameters (block (if_statement (comparison_operator (binary_operator (binary_operator (float_1.0) float_1.0 (identifier_x) identifier_x )binary_operator (identifier_s) identifier_s )binary_operator (identifier_p) identifier_p )comparison_operator (block (return_statement (True) True )return_statement )block (elif_clause (comparison_operator (call (attribute (identifier_stat) identifier_stat (identifier_binom_test) identifier_binom_test )attribute (argument_list (identifier_x) identifier_x (identifier_s) identifier_s (identifier_p) identifier_p )argument_list )call (float_0.01) float_0.01 )comparison_operator (block (return_statement (True) True )return_statement )block )elif_clause )if_statement (return_statement (False) False )return_statement )block )function_definition )module
function to decide if similarity is below cutoff
(module (function_definition (function_name_re_enqueue) function_name_re_enqueue (parameters (identifier_self) identifier_self (identifier_item) identifier_item )parameters (block (if_statement (comparison_operator (string_'retries') string_'retries' (identifier_item) identifier_item )comparison_operator (block (expression_statement (assignment (identifier_retries) identifier_retries (subscript (identifier_item) identifier_item (string_'retries') string_'retries' )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_retries) identifier_retries (attribute (identifier_self) identifier_self (identifier_MAX_RETRIES) identifier_MAX_RETRIES )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warn) identifier_warn )attribute (argument_list (call (attribute (concatenated_string (string_"Failed to execute {} after {} retries, give it ") string_"Failed to execute {} after {} retries, give it " (string_" up.") string_" up." )concatenated_string (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_item) identifier_item (string_'method') string_'method' )subscript (identifier_retries) identifier_retries )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_retries) identifier_retries (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (subscript (identifier_item) identifier_item (string_'retries') string_'retries' )subscript (identifier_retries) identifier_retries )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__q) identifier__q )attribute (identifier_put_nowait) identifier_put_nowait )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_item) identifier_item (string_'retries') string_'retries' )subscript (integer_1) integer_1 )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__q) identifier__q )attribute (identifier_put_nowait) identifier_put_nowait )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Re-enqueue till reach max retries.
(module (function_definition (function_name_renames) function_name_renames (parameters (identifier_from_path) identifier_from_path (identifier_to_path) identifier_to_path (default_parameter (identifier_user) identifier_user (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_to_dir) identifier_to_dir (call (attribute (identifier_path) identifier_path (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_to_path) identifier_to_path )argument_list )call )assignment )expression_statement (if_statement (identifier_to_dir) identifier_to_dir (block (expression_statement (call (identifier_mkdir) identifier_mkdir (argument_list (identifier_to_dir) identifier_to_dir (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (call (identifier_rename) identifier_rename (argument_list (identifier_from_path) identifier_from_path (identifier_to_path) identifier_to_path (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Rename ``from_path`` to ``to_path``, creating parents as needed.
(module (function_definition (function_name_prune_cached) function_name_prune_cached (parameters (identifier_values) identifier_values )parameters (block (import_statement (dotted_name (identifier_os) identifier_os )dotted_name )import_statement (expression_statement (assignment (identifier_config_path) identifier_config_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (string_'~/.config/blockade') string_'~/.config/blockade' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_file_path) identifier_file_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_config_path) identifier_config_path (string_'cache.txt') string_'cache.txt' )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )not_operator (block (return_statement (identifier_values) identifier_values )return_statement )block )if_statement (expression_statement (assignment (identifier_cached) identifier_cached (list_comprehension (call (attribute (identifier_x) identifier_x (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_x) identifier_x (call (attribute (call (identifier_open) identifier_open (argument_list (identifier_file_path) identifier_file_path (string_'r') string_'r' )argument_list )call (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_item) identifier_item (identifier_values) identifier_values (block (expression_statement (assignment (identifier_hashed) identifier_hashed (call (identifier_hash_values) identifier_hash_values (argument_list (identifier_item) identifier_item )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_hashed) identifier_hashed (identifier_cached) identifier_cached )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_output) identifier_output (identifier_append) identifier_append )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Remove the items that have already been cached.
(module (function_definition (function_name_msquared) function_name_msquared (parameters (identifier_self) identifier_self (identifier_benchmark) identifier_benchmark (default_parameter (identifier_rf) identifier_rf (float_0.02) float_0.02 )default_parameter (default_parameter (identifier_ddof) identifier_ddof (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_rf) identifier_rf (call (attribute (identifier_self) identifier_self (identifier__validate_rf) identifier__validate_rf )attribute (argument_list (identifier_rf) identifier_rf )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_scaling) identifier_scaling (binary_operator (call (attribute (identifier_benchmark) identifier_benchmark (identifier_anlzd_stdev) identifier_anlzd_stdev )attribute (argument_list (identifier_ddof) identifier_ddof )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_anlzd_stdev) identifier_anlzd_stdev )attribute (argument_list (identifier_ddof) identifier_ddof )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_diff) identifier_diff (binary_operator (call (attribute (identifier_self) identifier_self (identifier_anlzd_ret) identifier_anlzd_ret )attribute (argument_list )argument_list )call (identifier_rf) identifier_rf )binary_operator )assignment )expression_statement (return_statement (binary_operator (identifier_rf) identifier_rf (binary_operator (identifier_diff) identifier_diff (identifier_scaling) identifier_scaling )binary_operator )binary_operator )return_statement )block )function_definition )module
M-squared, return scaled by relative total risk. A measure of what a portfolio would have returned if it had taken on the same *total* risk as the market index. [Source: CFA Institute] Parameters ---------- benchmark : {pd.Series, TSeries, 1d np.ndarray} The benchmark security to which `self` is compared. rf : {float, TSeries, pd.Series}, default 0.02 If float, this represents an *compounded annualized* risk-free rate; 2.0% is the default. If a TSeries or pd.Series, this represents a time series of periodic returns to a risk-free security. To download a risk-free rate return series using 3-month US T-bill yields, see:`pyfinance.datasets.load_rf`. ddof : int, default 0 Degrees of freedom, passed to pd.Series.std(). Returns ------- float
(module (function_definition (function_name_build_timeout_circuit) function_name_build_timeout_circuit (parameters (identifier_tor_state) identifier_tor_state (identifier_reactor) identifier_reactor (identifier_path) identifier_path (identifier_timeout) identifier_timeout (default_parameter (identifier_using_guards) identifier_using_guards (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_timed_circuit) identifier_timed_circuit (list )list )assignment )expression_statement (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_tor_state) identifier_tor_state (identifier_build_circuit) identifier_build_circuit )attribute (argument_list (keyword_argument (identifier_routers) identifier_routers (identifier_path) identifier_path )keyword_argument (keyword_argument (identifier_using_guards) identifier_using_guards (identifier_using_guards) identifier_using_guards )keyword_argument )argument_list )call )assignment )expression_statement (function_definition (function_name_get_circuit) function_name_get_circuit (parameters (identifier_c) identifier_c )parameters (block (expression_statement (call (attribute (identifier_timed_circuit) identifier_timed_circuit (identifier_append) identifier_append )attribute (argument_list (identifier_c) identifier_c )argument_list )call )expression_statement (return_statement (identifier_c) identifier_c )return_statement )block )function_definition (function_definition (function_name_trap_cancel) function_name_trap_cancel (parameters (identifier_f) identifier_f )parameters (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_trap) identifier_trap )attribute (argument_list (attribute (identifier_defer) identifier_defer (identifier_CancelledError) identifier_CancelledError )attribute )argument_list )call )expression_statement (if_statement (identifier_timed_circuit) identifier_timed_circuit (block (expression_statement (assignment (identifier_d2) identifier_d2 (call (attribute (subscript (identifier_timed_circuit) identifier_timed_circuit (integer_0) integer_0 )subscript (identifier_close) identifier_close )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_d2) identifier_d2 (call (attribute (identifier_defer) identifier_defer (identifier_succeed) identifier_succeed )attribute (argument_list (None) None )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_d2) identifier_d2 (identifier_addCallback) identifier_addCallback )attribute (argument_list (lambda (lambda_parameters (identifier__) identifier__ )lambda_parameters (call (identifier_Failure) identifier_Failure (argument_list (call (identifier_CircuitBuildTimedOutError) identifier_CircuitBuildTimedOutError (argument_list (string_"circuit build timed out") string_"circuit build timed out" )argument_list )call )argument_list )call )lambda )argument_list )call )expression_statement (return_statement (identifier_d2) identifier_d2 )return_statement )block )function_definition (expression_statement (call (attribute (identifier_d) identifier_d (identifier_addCallback) identifier_addCallback )attribute (argument_list (identifier_get_circuit) identifier_get_circuit )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_d) identifier_d (identifier_addCallback) identifier_addCallback )attribute (argument_list (lambda (lambda_parameters (identifier_circ) identifier_circ )lambda_parameters (call (attribute (identifier_circ) identifier_circ (identifier_when_built) identifier_when_built )attribute (argument_list )argument_list )call )lambda )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_d) identifier_d (identifier_addErrback) identifier_addErrback )attribute (argument_list (identifier_trap_cancel) identifier_trap_cancel )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_reactor) identifier_reactor (identifier_callLater) identifier_callLater )attribute (argument_list (identifier_timeout) identifier_timeout (attribute (identifier_d) identifier_d (identifier_cancel) identifier_cancel )attribute )argument_list )call )expression_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Build a new circuit within a timeout. CircuitBuildTimedOutError will be raised unless we receive a circuit build result (success or failure) within the `timeout` duration. :returns: a Deferred which fires when the circuit build succeeds (or fails to build).
(module (function_definition (function_name__set_combobox) function_name__set_combobox (parameters (identifier_self) identifier_self (identifier_attrname) identifier_attrname (identifier_vals) identifier_vals (default_parameter (identifier_default) identifier_default (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_combobox) identifier_combobox (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier_w) identifier_w )attribute (identifier_attrname) identifier_attrname )argument_list )call )assignment )expression_statement (for_statement (identifier_val) identifier_val (identifier_vals) identifier_vals (block (expression_statement (call (attribute (identifier_combobox) identifier_combobox (identifier_append_text) identifier_append_text )attribute (argument_list (identifier_val) identifier_val )argument_list )call )expression_statement )block )for_statement (if_statement (comparison_operator (identifier_default) identifier_default (call (identifier_len) identifier_len (argument_list (identifier_vals) identifier_vals )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_default) identifier_default (integer_0) integer_0 )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_val) identifier_val (subscript (identifier_vals) identifier_vals (identifier_default) identifier_default )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_combobox) identifier_combobox (identifier_show_text) identifier_show_text )attribute (argument_list (identifier_val) identifier_val )argument_list )call )expression_statement (return_statement (identifier_val) identifier_val )return_statement )block )function_definition )module
Populate combobox with given list.
(module (function_definition (function_name_destroy) function_name_destroy (parameters (identifier_self) identifier_self )parameters (block (while_statement (True) True (block (try_statement (block (expression_statement (assignment (identifier_client) identifier_client (call (attribute (attribute (identifier_self) identifier_self (identifier___pool) identifier___pool )attribute (identifier_popleft) identifier_popleft )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_client) identifier_client (identifier_Client) identifier_Client )argument_list )call (block (expression_statement (call (attribute (identifier_client) identifier_client (identifier_disconnect) identifier_disconnect )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (break_statement )break_statement )block )except_clause )try_statement )block )while_statement )block )function_definition )module
Disconnects all pooled client objects.
(module (function_definition (function_name_shuffle) function_name_shuffle (parameters (identifier_self) identifier_self (default_parameter (identifier_overwrite) identifier_overwrite (False) False )default_parameter )parameters (block (if_statement (identifier_overwrite) identifier_overwrite (block (expression_statement (assignment (identifier_shuffled) identifier_shuffled (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_shuffled) identifier_shuffled (call (attribute (identifier_FileAPI) identifier_FileAPI (identifier_add_ext_name) identifier_add_ext_name )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (string_"_shuffled") string_"_shuffled" )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_lines) identifier_lines (call (attribute (call (identifier_open) identifier_open (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_random) identifier_random (identifier_shuffle) identifier_shuffle )attribute (argument_list (identifier_lines) identifier_lines )argument_list )call )expression_statement (expression_statement (call (attribute (call (identifier_open) identifier_open (argument_list (identifier_shuffled) identifier_shuffled (string_"w") string_"w" )argument_list )call (identifier_writelines) identifier_writelines )attribute (argument_list (identifier_lines) identifier_lines )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (identifier_shuffled) identifier_shuffled )assignment )expression_statement )block )function_definition )module
This method creates new shuffled file.
(module (function_definition (function_name_get_templatetype) function_name_get_templatetype (parameters (identifier_type_id) identifier_type_id (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_templatetype) identifier_templatetype (call (attribute (call (attribute (call (attribute (call (attribute (attribute (identifier_db) identifier_db (identifier_DBSession) identifier_DBSession )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_TemplateType) identifier_TemplateType )argument_list )call (identifier_filter) identifier_filter )attribute (argument_list (comparison_operator (attribute (identifier_TemplateType) identifier_TemplateType (identifier_id) identifier_id )attribute (identifier_type_id) identifier_type_id )comparison_operator )argument_list )call (identifier_options) identifier_options )attribute (argument_list (call (identifier_joinedload_all) identifier_joinedload_all (argument_list (string_"typeattrs") string_"typeattrs" )argument_list )call )argument_list )call (identifier_one) identifier_one )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_templatetype) identifier_templatetype )return_statement )block )function_definition )module
Get a specific resource type by ID.
(module (function_definition (function_name__unpack_episode_title) function_name__unpack_episode_title (parameters (typed_parameter (identifier_element) identifier_element (type (attribute (identifier_ET) identifier_ET (identifier_Element) identifier_Element )attribute )type )typed_parameter )parameters (block (return_statement (call (identifier_EpisodeTitle) identifier_EpisodeTitle (argument_list (keyword_argument (identifier_title) identifier_title (attribute (identifier_element) identifier_element (identifier_text) identifier_text )attribute )keyword_argument (keyword_argument (identifier_lang) identifier_lang (call (attribute (identifier_element) identifier_element (identifier_get) identifier_get )attribute (argument_list (string_f'{XML}lang') string_f'{XML}lang' )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Unpack EpisodeTitle from title XML element.
(module (function_definition (function_name_read_ma_array) function_name_read_ma_array (parameters (identifier_self) identifier_self (identifier_infile) identifier_infile (identifier_var_name) identifier_var_name )parameters (block (expression_statement (assignment (identifier_file_obj) identifier_file_obj (call (attribute (identifier_self) identifier_self (identifier_read_cdf) identifier_read_cdf )attribute (argument_list (identifier_infile) identifier_infile )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (subscript (subscript (attribute (identifier_file_obj) identifier_file_obj (identifier_variables) identifier_variables )attribute (identifier_var_name) identifier_var_name )subscript (slice (colon) colon )slice )subscript )assignment )expression_statement (try_statement (block (import_statement (aliased_import (dotted_name (identifier_numpy) identifier_numpy )dotted_name (identifier_np) identifier_np )aliased_import )import_statement )block (except_clause (identifier_Exception) identifier_Exception (block (raise_statement (call (identifier_ImportError) identifier_ImportError (argument_list (string_"numpy is required to return masked arrays.") string_"numpy is required to return masked arrays." )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (subscript (attribute (identifier_file_obj) identifier_file_obj (identifier_variables) identifier_variables )attribute (identifier_var_name) identifier_var_name )subscript (string_"_FillValue") string_"_FillValue" )argument_list )call (block (expression_statement (assignment (identifier_fill_val) identifier_fill_val (attribute (subscript (attribute (identifier_file_obj) identifier_file_obj (identifier_variables) identifier_variables )attribute (identifier_var_name) identifier_var_name )subscript (identifier__FillValue) identifier__FillValue )attribute )assignment )expression_statement (expression_statement (assignment (identifier_retval) identifier_retval (call (attribute (attribute (identifier_np) identifier_np (identifier_ma) identifier_ma )attribute (identifier_masked_where) identifier_masked_where )attribute (argument_list (comparison_operator (identifier_data) identifier_data (identifier_fill_val) identifier_fill_val )comparison_operator (identifier_data) identifier_data )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_retval) identifier_retval (call (attribute (attribute (identifier_np) identifier_np (identifier_ma) identifier_ma )attribute (identifier_array) identifier_array )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_retval) identifier_retval )return_statement )block )function_definition )module
Create a masked array based on cdf's FillValue
(module (function_definition (function_name__find_files) function_name__find_files (parameters (typed_parameter (identifier_dirpath) identifier_dirpath (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (string_'Iterable[str]') string_'Iterable[str]' )type (block (for_statement (pattern_list (identifier_dirpath) identifier_dirpath (identifier_dirnames) identifier_dirnames (identifier_filenames) identifier_filenames )pattern_list (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_dirpath) identifier_dirpath (keyword_argument (identifier_topdown) identifier_topdown (True) True )keyword_argument (keyword_argument (identifier_followlinks) identifier_followlinks (True) True )keyword_argument )argument_list )call (block (if_statement (call (attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_dirpath) identifier_dirpath )argument_list )call (identifier_startswith) identifier_startswith )attribute (argument_list (string_'.') string_'.' )argument_list )call (block (delete_statement (subscript (identifier_dirnames) identifier_dirnames (slice (colon) colon )slice )subscript )delete_statement )block )if_statement (for_statement (identifier_filename) identifier_filename (identifier_filenames) identifier_filenames (block (expression_statement (yield (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_dirpath) identifier_dirpath (identifier_filename) identifier_filename )argument_list )call )yield )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Find files recursively. Returns a generator that yields paths in no particular order.
(module (function_definition (function_name_date_to_jd) function_name_date_to_jd (parameters (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_month) identifier_month (integer_1) integer_1 )comparison_operator (comparison_operator (identifier_month) identifier_month (integer_2) integer_2 )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_yearp) identifier_yearp (binary_operator (identifier_year) identifier_year (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_monthp) identifier_monthp (binary_operator (identifier_month) identifier_month (integer_12) integer_12 )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_yearp) identifier_yearp (identifier_year) identifier_year )assignment )expression_statement (expression_statement (assignment (identifier_monthp) identifier_monthp (identifier_month) identifier_month )assignment )expression_statement )block )else_clause )if_statement (if_statement (parenthesized_expression (boolean_operator (boolean_operator (parenthesized_expression (comparison_operator (identifier_year) identifier_year (integer_1582) integer_1582 )comparison_operator )parenthesized_expression (parenthesized_expression (boolean_operator (comparison_operator (identifier_year) identifier_year (integer_1582) integer_1582 )comparison_operator (comparison_operator (identifier_month) identifier_month (integer_10) integer_10 )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (parenthesized_expression (boolean_operator (boolean_operator (comparison_operator (identifier_year) identifier_year (integer_1582) integer_1582 )comparison_operator (comparison_operator (identifier_month) identifier_month (integer_10) integer_10 )comparison_operator )boolean_operator (comparison_operator (identifier_day) identifier_day (integer_15) integer_15 )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator )parenthesized_expression (block (expression_statement (assignment (identifier_B) identifier_B (integer_0) integer_0 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_A) identifier_A (call (attribute (identifier_math) identifier_math (identifier_trunc) identifier_trunc )attribute (argument_list (binary_operator (identifier_yearp) identifier_yearp (float_100.) float_100. )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_B) identifier_B (binary_operator (binary_operator (integer_2) integer_2 (identifier_A) identifier_A )binary_operator (call (attribute (identifier_math) identifier_math (identifier_trunc) identifier_trunc )attribute (argument_list (binary_operator (identifier_A) identifier_A (float_4.) float_4. )binary_operator )argument_list )call )binary_operator )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_yearp) identifier_yearp (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_C) identifier_C (call (attribute (identifier_math) identifier_math (identifier_trunc) identifier_trunc )attribute (argument_list (binary_operator (parenthesized_expression (binary_operator (float_365.25) float_365.25 (identifier_yearp) identifier_yearp )binary_operator )parenthesized_expression (float_0.75) float_0.75 )binary_operator )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_C) identifier_C (call (attribute (identifier_math) identifier_math (identifier_trunc) identifier_trunc )attribute (argument_list (binary_operator (float_365.25) float_365.25 (identifier_yearp) identifier_yearp )binary_operator )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_D) identifier_D (call (attribute (identifier_math) identifier_math (identifier_trunc) identifier_trunc )attribute (argument_list (binary_operator (float_30.6001) float_30.6001 (parenthesized_expression (binary_operator (identifier_monthp) identifier_monthp (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_jd) identifier_jd (binary_operator (binary_operator (binary_operator (binary_operator (identifier_B) identifier_B (identifier_C) identifier_C )binary_operator (identifier_D) identifier_D )binary_operator (identifier_day) identifier_day )binary_operator (float_1720994.5) float_1720994.5 )binary_operator )assignment )expression_statement (return_statement (identifier_jd) identifier_jd )return_statement )block )function_definition )module
Convert a date to Julian Day. Algorithm from 'Practical Astronomy with your Calculator or Spreadsheet', 4th ed., Duffet-Smith and Zwart, 2011. Parameters ---------- year : int Year as integer. Years preceding 1 A.D. should be 0 or negative. The year before 1 A.D. is 0, 10 B.C. is year -9. month : int Month as integer, Jan = 1, Feb. = 2, etc. day : float Day, may contain fractional part. Returns ------- jd : float Julian Day Examples -------- Convert 6 a.m., February 17, 1985 to Julian Day >>> date_to_jd(1985,2,17.25) 2446113.75
(module (function_definition (function_name_lex_document) function_name_lex_document (parameters (identifier_self) identifier_self (identifier_document) identifier_document )parameters (block (expression_statement (assignment (identifier_location) identifier_location (attribute (attribute (identifier_self) identifier_self (identifier_editor_buffer) identifier_editor_buffer )attribute (identifier_location) identifier_location )attribute )assignment )expression_statement (if_statement (identifier_location) identifier_location (block (if_statement (attribute (attribute (identifier_self) identifier_self (identifier_editor_buffer) identifier_editor_buffer )attribute (identifier_in_file_explorer_mode) identifier_in_file_explorer_mode )attribute (block (return_statement (call (attribute (call (identifier_PygmentsLexer) identifier_PygmentsLexer (argument_list (identifier_DirectoryListingLexer) identifier_DirectoryListingLexer (keyword_argument (identifier_sync_from_start) identifier_sync_from_start (False) False )keyword_argument )argument_list )call (identifier_lex_document) identifier_lex_document )attribute (argument_list (identifier_document) identifier_document )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (call (attribute (identifier_PygmentsLexer) identifier_PygmentsLexer (identifier_from_filename) identifier_from_filename )attribute (argument_list (identifier_location) identifier_location (keyword_argument (identifier_sync_from_start) identifier_sync_from_start (False) False )keyword_argument )argument_list )call (identifier_lex_document) identifier_lex_document )attribute (argument_list (identifier_document) identifier_document )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (call (identifier_SimpleLexer) identifier_SimpleLexer (argument_list )argument_list )call (identifier_lex_document) identifier_lex_document )attribute (argument_list (identifier_document) identifier_document )argument_list )call )return_statement )block )function_definition )module
Call the lexer and return a get_tokens_for_line function.
(module (function_definition (function_name__assemble_regulate_amount) function_name__assemble_regulate_amount (parameters (identifier_stmt) identifier_stmt )parameters (block (expression_statement (assignment (identifier_obj_str) identifier_obj_str (call (identifier__assemble_agent_str) identifier__assemble_agent_str (argument_list (attribute (identifier_stmt) identifier_stmt (identifier_obj) identifier_obj )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_stmt) identifier_stmt (identifier_subj) identifier_subj )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_subj_str) identifier_subj_str (call (identifier__assemble_agent_str) identifier__assemble_agent_str (argument_list (attribute (identifier_stmt) identifier_stmt (identifier_subj) identifier_subj )attribute )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_stmt) identifier_stmt (attribute (identifier_ist) identifier_ist (identifier_IncreaseAmount) identifier_IncreaseAmount )attribute )argument_list )call (block (expression_statement (assignment (identifier_rel_str) identifier_rel_str (string_' increases the amount of ') string_' increases the amount of ' )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_stmt) identifier_stmt (attribute (identifier_ist) identifier_ist (identifier_DecreaseAmount) identifier_DecreaseAmount )attribute )argument_list )call (block (expression_statement (assignment (identifier_rel_str) identifier_rel_str (string_' decreases the amount of ') string_' decreases the amount of ' )assignment )expression_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_stmt_str) identifier_stmt_str (binary_operator (binary_operator (identifier_subj_str) identifier_subj_str (identifier_rel_str) identifier_rel_str )binary_operator (identifier_obj_str) identifier_obj_str )binary_operator )assignment )expression_statement )block (else_clause (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_stmt) identifier_stmt (attribute (identifier_ist) identifier_ist (identifier_IncreaseAmount) identifier_IncreaseAmount )attribute )argument_list )call (block (expression_statement (assignment (identifier_stmt_str) identifier_stmt_str (binary_operator (identifier_obj_str) identifier_obj_str (string_' is produced') string_' is produced' )binary_operator )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_stmt) identifier_stmt (attribute (identifier_ist) identifier_ist (identifier_DecreaseAmount) identifier_DecreaseAmount )attribute )argument_list )call (block (expression_statement (assignment (identifier_stmt_str) identifier_stmt_str (binary_operator (identifier_obj_str) identifier_obj_str (string_' is degraded') string_' is degraded' )binary_operator )assignment )expression_statement )block )elif_clause )if_statement )block )else_clause )if_statement (return_statement (call (identifier__make_sentence) identifier__make_sentence (argument_list (identifier_stmt_str) identifier_stmt_str )argument_list )call )return_statement )block )function_definition )module
Assemble RegulateAmount statements into text.
(module (function_definition (function_name__read_hdf_columns) function_name__read_hdf_columns (parameters (identifier_path_or_buf) identifier_path_or_buf (identifier_columns) identifier_columns (identifier_num_splits) identifier_num_splits (identifier_kwargs) identifier_kwargs )parameters (block (expression_statement (assignment (identifier_df) identifier_df (call (attribute (identifier_pandas) identifier_pandas (identifier_read_hdf) identifier_read_hdf )attribute (argument_list (identifier_path_or_buf) identifier_path_or_buf (keyword_argument (identifier_columns) identifier_columns (identifier_columns) identifier_columns )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (binary_operator (call (identifier__split_result_for_readers) identifier__split_result_for_readers (argument_list (integer_0) integer_0 (identifier_num_splits) identifier_num_splits (identifier_df) identifier_df )argument_list )call (list (call (identifier_len) identifier_len (argument_list (attribute (identifier_df) identifier_df (identifier_index) identifier_index )attribute )argument_list )call )list )binary_operator )return_statement )block )function_definition )module
Use a Ray task to read columns from HDF5 into a Pandas DataFrame. Note: Ray functions are not detected by codecov (thus pragma: no cover) Args: path_or_buf: The path of the HDF5 file. columns: The list of column names to read. num_splits: The number of partitions to split the column into. Returns: A list containing the split Pandas DataFrames and the Index as the last element. If there is not `index_col` set, then we just return the length. This is used to determine the total length of the DataFrame to build a default Index.
(module (function_definition (function_name_move) function_name_move (parameters (identifier_self) identifier_self (identifier_auth) identifier_auth (identifier_resource) identifier_resource (identifier_destinationresource) identifier_destinationresource (default_parameter (identifier_options) identifier_options (dictionary (pair (string_"aliases") string_"aliases" (True) True )pair )dictionary )default_parameter (default_parameter (identifier_defer) identifier_defer (False) False )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__call) identifier__call )attribute (argument_list (string_'move') string_'move' (identifier_auth) identifier_auth (list (identifier_resource) identifier_resource (identifier_destinationresource) identifier_destinationresource (identifier_options) identifier_options )list (identifier_defer) identifier_defer )argument_list )call )return_statement )block )function_definition )module
Moves a resource from one parent client to another. Args: auth: <cik> resource: Identifed resource to be moved. destinationresource: resource of client resource is being moved to.
(module (function_definition (function_name__len_lcs) function_name__len_lcs (parameters (identifier_x) identifier_x (identifier_y) identifier_y )parameters (block (expression_statement (assignment (identifier_table) identifier_table (call (identifier__lcs) identifier__lcs (argument_list (identifier_x) identifier_x (identifier_y) identifier_y )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_n) identifier_n (identifier_m) identifier_m )pattern_list (expression_list (call (identifier_len) identifier_len (argument_list (identifier_x) identifier_x )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_y) identifier_y )argument_list )call )expression_list )assignment )expression_statement (return_statement (subscript (identifier_table) identifier_table (identifier_n) identifier_n (identifier_m) identifier_m )subscript )return_statement )block )function_definition )module
Returns the length of the Longest Common Subsequence between two seqs. Source: http://www.algorithmist.com/index.php/Longest_Common_Subsequence Args: x: sequence of words y: sequence of words Returns integer: Length of LCS between x and y
(module (function_definition (function_name_error) function_name_error (parameters (identifier_self) identifier_self (identifier_id) identifier_id (identifier_errorCode) identifier_errorCode (identifier_errorString) identifier_errorString )parameters (block (if_statement (comparison_operator (identifier_errorCode) identifier_errorCode (integer_165) integer_165 )comparison_operator (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_"TWS INFO - %s: %s\n") string_"TWS INFO - %s: %s\n" (tuple (identifier_errorCode) identifier_errorCode (identifier_errorString) identifier_errorString )tuple )binary_operator )argument_list )call )expression_statement )block (elif_clause (boolean_operator (comparison_operator (identifier_errorCode) identifier_errorCode (integer_501) integer_501 )comparison_operator (comparison_operator (identifier_errorCode) identifier_errorCode (integer_600) integer_600 )comparison_operator )boolean_operator (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_"TWS CLIENT-ERROR - %s: %s\n") string_"TWS CLIENT-ERROR - %s: %s\n" (tuple (identifier_errorCode) identifier_errorCode (identifier_errorString) identifier_errorString )tuple )binary_operator )argument_list )call )expression_statement )block )elif_clause (elif_clause (boolean_operator (comparison_operator (identifier_errorCode) identifier_errorCode (integer_100) integer_100 )comparison_operator (comparison_operator (identifier_errorCode) identifier_errorCode (integer_1100) integer_1100 )comparison_operator )boolean_operator (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_"TWS ERROR - %s: %s\n") string_"TWS ERROR - %s: %s\n" (tuple (identifier_errorCode) identifier_errorCode (identifier_errorString) identifier_errorString )tuple )binary_operator )argument_list )call )expression_statement )block )elif_clause (elif_clause (boolean_operator (comparison_operator (identifier_errorCode) identifier_errorCode (integer_1100) integer_1100 )comparison_operator (comparison_operator (identifier_errorCode) identifier_errorCode (integer_2100) integer_2100 )comparison_operator )boolean_operator (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_"TWS SYSTEM-ERROR - %s: %s\n") string_"TWS SYSTEM-ERROR - %s: %s\n" (tuple (identifier_errorCode) identifier_errorCode (identifier_errorString) identifier_errorString )tuple )binary_operator )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_errorCode) identifier_errorCode (tuple (integer_2104) integer_2104 (integer_2106) integer_2106 (integer_2108) integer_2108 )tuple )comparison_operator (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_"TWS INFO - %s: %s\n") string_"TWS INFO - %s: %s\n" (tuple (identifier_errorCode) identifier_errorCode (identifier_errorString) identifier_errorString )tuple )binary_operator )argument_list )call )expression_statement )block )elif_clause (elif_clause (boolean_operator (comparison_operator (identifier_errorCode) identifier_errorCode (integer_2100) integer_2100 )comparison_operator (comparison_operator (identifier_errorCode) identifier_errorCode (integer_2110) integer_2110 )comparison_operator )boolean_operator (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_"TWS WARNING - %s: %s\n") string_"TWS WARNING - %s: %s\n" (tuple (identifier_errorCode) identifier_errorCode (identifier_errorString) identifier_errorString )tuple )binary_operator )argument_list )call )expression_statement )block )elif_clause (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_"TWS ERROR - %s: %s\n") string_"TWS ERROR - %s: %s\n" (tuple (identifier_errorCode) identifier_errorCode (identifier_errorString) identifier_errorString )tuple )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Error during communication with TWS
(module (function_definition (function_name_html) function_name_html (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_output) identifier_output (attribute (identifier_self) identifier_self (identifier_html_preamble) identifier_html_preamble )attribute )assignment )expression_statement (expression_statement (augmented_assignment (identifier_output) identifier_output (call (attribute (identifier_self) identifier_self (identifier__repr_html_) identifier__repr_html_ )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_output) identifier_output (attribute (identifier_self) identifier_self (identifier_html_post) identifier_html_post )attribute )augmented_assignment )expression_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Gives an html representation of the assessment.
(module (function_definition (function_name_pair_list) function_name_pair_list (parameters (identifier_args) identifier_args )parameters (block (if_statement (boolean_operator (attribute (identifier_args) identifier_args (identifier_entity_type) identifier_entity_type )attribute (attribute (identifier_args) identifier_args (identifier_entity) identifier_entity )attribute )boolean_operator (block (if_statement (comparison_operator (attribute (identifier_args) identifier_args (identifier_entity_type) identifier_entity_type )attribute (string_'pair') string_'pair' )comparison_operator (block (return_statement (list (call (attribute (attribute (identifier_args) identifier_args (identifier_entity) identifier_entity )attribute (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )list )return_statement )block (elif_clause (comparison_operator (attribute (identifier_args) identifier_args (identifier_entity_type) identifier_entity_type )attribute (string_'participant') string_'participant' )comparison_operator (block (expression_statement (assignment (identifier_entities) identifier_entities (call (identifier__entity_paginator) identifier__entity_paginator (argument_list (attribute (identifier_args) identifier_args (identifier_project) identifier_project )attribute (attribute (identifier_args) identifier_args (identifier_workspace) identifier_workspace )attribute (string_'pair') string_'pair' (keyword_argument (identifier_page_size) identifier_page_size (integer_2000) integer_2000 )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (subscript (identifier_e) identifier_e (string_'name') string_'name' )subscript (for_in_clause (identifier_e) identifier_e (identifier_entities) identifier_entities )for_in_clause (if_clause (comparison_operator (subscript (subscript (subscript (identifier_e) identifier_e (string_'attributes') string_'attributes' )subscript (string_'participant') string_'participant' )subscript (string_'entityName') string_'entityName' )subscript (attribute (identifier_args) identifier_args (identifier_entity) identifier_entity )attribute )comparison_operator )if_clause )list_comprehension )return_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_fapi) identifier_fapi (identifier_get_entity) identifier_get_entity )attribute (argument_list (attribute (identifier_args) identifier_args (identifier_project) identifier_project )attribute (attribute (identifier_args) identifier_args (identifier_workspace) identifier_workspace )attribute (attribute (identifier_args) identifier_args (identifier_entity_type) identifier_entity_type )attribute (attribute (identifier_args) identifier_args (identifier_entity) identifier_entity )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_fapi) identifier_fapi (identifier__check_response_code) identifier__check_response_code )attribute (argument_list (identifier_r) identifier_r (integer_200) integer_200 )argument_list )call )expression_statement (expression_statement (assignment (identifier_pairs) identifier_pairs (subscript (subscript (subscript (call (attribute (identifier_r) identifier_r (identifier_json) identifier_json )attribute (argument_list )argument_list )call (string_'attributes') string_'attributes' )subscript (string_"pairs") string_"pairs" )subscript (string_'items') string_'items' )subscript )assignment )expression_statement (return_statement (list_comprehension (subscript (identifier_pair) identifier_pair (string_'entityName') string_'entityName' )subscript (for_in_clause (identifier_pair) identifier_pair (identifier_pairs) identifier_pairs )for_in_clause )list_comprehension )return_statement )block )if_statement (return_statement (call (identifier___get_entities) identifier___get_entities (argument_list (identifier_args) identifier_args (string_"pair") string_"pair" (keyword_argument (identifier_page_size) identifier_page_size (integer_2000) integer_2000 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
List pairs within a container.
(module (function_definition (function_name_rank) function_name_rank (parameters (identifier_items) identifier_items (default_parameter (identifier_sequence) identifier_sequence (attribute (identifier_string) identifier_string (identifier_ascii_lowercase) identifier_ascii_lowercase )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_items) identifier_items (call (identifier_set) identifier_set (argument_list (identifier_items) identifier_items )argument_list )call )assignment )expression_statement (return_statement (call (identifier_sum) identifier_sum (generator_expression (binary_operator (integer_1) integer_1 (identifier_i) identifier_i )binary_operator (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_s) identifier_s )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_sequence) identifier_sequence )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_s) identifier_s (identifier_items) identifier_items )comparison_operator )if_clause )generator_expression )call )return_statement )block )function_definition )module
Rank items from sequence in colexicographical order. >>> [rank(i) for i in ('', 'a', 'b', 'ab', 'c')] [0, 1, 2, 3, 4] >>> rank('spam') 299009
(module (function_definition (function_name__decode_image) function_name__decode_image (parameters (identifier_fobj) identifier_fobj (identifier_session) identifier_session (identifier_filename) identifier_filename )parameters (block (expression_statement (assignment (identifier_buf) identifier_buf (call (attribute (identifier_fobj) identifier_fobj (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_image) identifier_image (call (attribute (attribute (attribute (attribute (identifier_tfds) identifier_tfds (identifier_core) identifier_core )attribute (identifier_lazy_imports) identifier_lazy_imports )attribute (identifier_cv2) identifier_cv2 )attribute (identifier_imdecode) identifier_imdecode )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_fromstring) identifier_fromstring )attribute (argument_list (identifier_buf) identifier_buf (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_np) identifier_np (identifier_uint8) identifier_uint8 )attribute )keyword_argument )argument_list )call (keyword_argument (identifier_flags) identifier_flags (integer_3) integer_3 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_image) identifier_image (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_warning) identifier_warning )attribute (argument_list (string_"Image %s could not be decoded by OpenCV, falling back to TF") string_"Image %s could not be decoded by OpenCV, falling back to TF" (identifier_filename) identifier_filename )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_image) identifier_image (call (attribute (attribute (identifier_tf) identifier_tf (identifier_image) identifier_image )attribute (identifier_decode_image) identifier_decode_image )attribute (argument_list (identifier_buf) identifier_buf (keyword_argument (identifier_channels) identifier_channels (integer_3) integer_3 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_image) identifier_image (call (attribute (identifier_session) identifier_session (identifier_run) identifier_run )attribute (argument_list (identifier_image) identifier_image )argument_list )call )assignment )expression_statement )block (except_clause (attribute (attribute (identifier_tf) identifier_tf (identifier_errors) identifier_errors )attribute (identifier_InvalidArgumentError) identifier_InvalidArgumentError )attribute (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_fatal) identifier_fatal )attribute (argument_list (string_"Image %s could not be decoded by Tensorflow") string_"Image %s could not be decoded by Tensorflow" (identifier_filename) identifier_filename )argument_list )call )expression_statement )block )except_clause )try_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_image) identifier_image (identifier_shape) identifier_shape )attribute )argument_list )call (integer_4) integer_4 )comparison_operator (block (expression_statement (assignment (identifier_image) identifier_image (call (attribute (identifier_image) identifier_image (identifier_reshape) identifier_reshape )attribute (argument_list (subscript (attribute (identifier_image) identifier_image (identifier_shape) identifier_shape )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_image) identifier_image )return_statement )block )function_definition )module
Reads and decodes an image from a file object as a Numpy array. The SUN dataset contains images in several formats (despite the fact that all of them have .jpg extension). Some of them are: - BMP (RGB) - PNG (grayscale, RGBA, RGB interlaced) - JPEG (RGB) - GIF (1-frame RGB) Since TFDS assumes that all images have the same number of channels, we convert all of them to RGB. Args: fobj: File object to read from. session: TF session used to decode the images. filename: Filename of the original image in the archive. Returns: Numpy array with shape (height, width, channels).
(module (function_definition (function_name_create_perm) function_name_create_perm (parameters (identifier_self) identifier_self (default_parameter (identifier_using) identifier_using (None) None )default_parameter (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (import_from_statement (dotted_name (identifier_django) identifier_django (identifier_conf) identifier_conf )dotted_name (dotted_name (identifier_settings) identifier_settings )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_django) identifier_django (identifier_contrib) identifier_contrib (identifier_auth) identifier_auth (identifier_models) identifier_models )dotted_name (dotted_name (identifier_Permission) identifier_Permission )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_django) identifier_django (identifier_contrib) identifier_contrib (identifier_contenttypes) identifier_contenttypes (identifier_models) identifier_models )dotted_name (dotted_name (identifier_ContentType) identifier_ContentType )dotted_name )import_from_statement (expression_statement (assignment (identifier_constance_dbs) identifier_constance_dbs (call (identifier_getattr) identifier_getattr (argument_list (identifier_settings) identifier_settings (string_'CONSTANCE_DBS') string_'CONSTANCE_DBS' (None) None )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_constance_dbs) identifier_constance_dbs (None) None )comparison_operator (comparison_operator (identifier_using) identifier_using (identifier_constance_dbs) identifier_constance_dbs )comparison_operator )boolean_operator (block (return_statement )return_statement )block )if_statement (if_statement (boolean_operator (attribute (attribute (identifier_ContentType) identifier_ContentType (identifier__meta) identifier__meta )attribute (identifier_installed) identifier_installed )attribute (attribute (attribute (identifier_Permission) identifier_Permission (identifier__meta) identifier__meta )attribute (identifier_installed) identifier_installed )attribute )boolean_operator (block (expression_statement (assignment (pattern_list (identifier_content_type) identifier_content_type (identifier_created) identifier_created )pattern_list (call (attribute (call (attribute (attribute (identifier_ContentType) identifier_ContentType (identifier_objects) identifier_objects )attribute (identifier_using) identifier_using )attribute (argument_list (identifier_using) identifier_using )argument_list )call (identifier_get_or_create) identifier_get_or_create )attribute (argument_list (keyword_argument (identifier_app_label) identifier_app_label (string_'constance') string_'constance' )keyword_argument (keyword_argument (identifier_model) identifier_model (string_'config') string_'config' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_permission) identifier_permission (identifier_created) identifier_created )pattern_list (call (attribute (call (attribute (attribute (identifier_Permission) identifier_Permission (identifier_objects) identifier_objects )attribute (identifier_using) identifier_using )attribute (argument_list (identifier_using) identifier_using )argument_list )call (identifier_get_or_create) identifier_get_or_create )attribute (argument_list (keyword_argument (identifier_content_type) identifier_content_type (identifier_content_type) identifier_content_type )keyword_argument (keyword_argument (identifier_codename) identifier_codename (string_'change_config') string_'change_config' )keyword_argument (keyword_argument (identifier_defaults) identifier_defaults (dictionary (pair (string_'name') string_'name' (string_'Can change config') string_'Can change config' )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement )block )function_definition )module
Creates a fake content type and permission to be able to check for permissions
(module (function_definition (function_name__match) function_name__match (parameters (identifier_self) identifier_self (identifier_struct1) identifier_struct1 (identifier_struct2) identifier_struct2 (identifier_fu) identifier_fu (default_parameter (identifier_s1_supercell) identifier_s1_supercell (True) True )default_parameter (default_parameter (identifier_use_rms) identifier_use_rms (False) False )default_parameter (default_parameter (identifier_break_on_match) identifier_break_on_match (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_ratio) identifier_ratio (conditional_expression (identifier_fu) identifier_fu (identifier_s1_supercell) identifier_s1_supercell (binary_operator (integer_1) integer_1 (identifier_fu) identifier_fu )binary_operator )conditional_expression )assignment )expression_statement (if_statement (comparison_operator (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_struct1) identifier_struct1 )argument_list )call (identifier_ratio) identifier_ratio )binary_operator (call (identifier_len) identifier_len (argument_list (identifier_struct2) identifier_struct2 )argument_list )call )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__strict_match) identifier__strict_match )attribute (argument_list (identifier_struct1) identifier_struct1 (identifier_struct2) identifier_struct2 (identifier_fu) identifier_fu (keyword_argument (identifier_s1_supercell) identifier_s1_supercell (identifier_s1_supercell) identifier_s1_supercell )keyword_argument (keyword_argument (identifier_break_on_match) identifier_break_on_match (identifier_break_on_match) identifier_break_on_match )keyword_argument (keyword_argument (identifier_use_rms) identifier_use_rms (identifier_use_rms) identifier_use_rms )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__strict_match) identifier__strict_match )attribute (argument_list (identifier_struct2) identifier_struct2 (identifier_struct1) identifier_struct1 (identifier_fu) identifier_fu (keyword_argument (identifier_s1_supercell) identifier_s1_supercell (parenthesized_expression (not_operator (identifier_s1_supercell) identifier_s1_supercell )not_operator )parenthesized_expression )keyword_argument (keyword_argument (identifier_break_on_match) identifier_break_on_match (identifier_break_on_match) identifier_break_on_match )keyword_argument (keyword_argument (identifier_use_rms) identifier_use_rms (identifier_use_rms) identifier_use_rms )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Matches one struct onto the other
(module (function_definition (function_name_get_oldest_commit_date) function_name_get_oldest_commit_date (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_oldest_commit) identifier_oldest_commit (call (attribute (identifier_self) identifier_self (identifier_get_oldest_commit) identifier_get_oldest_commit )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_git) identifier_git )attribute (identifier_get_commit_date) identifier_get_commit_date )attribute (argument_list (identifier_oldest_commit) identifier_oldest_commit (attribute (identifier_self) identifier_self (identifier_tz_name) identifier_tz_name )attribute )argument_list )call )return_statement )block )function_definition )module
Get datetime of oldest commit involving this file :returns: Datetime of oldest commit
(module (function_definition (function_name_generate_method_deprecation_message) function_name_generate_method_deprecation_message (parameters (identifier_to_be_removed_in_version) identifier_to_be_removed_in_version (identifier_old_method_name) identifier_old_method_name (default_parameter (identifier_method_name) identifier_method_name (None) None )default_parameter (default_parameter (identifier_module_name) identifier_module_name (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (string_"Call to deprecated function '{old_method_name}'. This method will be removed in version '{version}'") string_"Call to deprecated function '{old_method_name}'. This method will be removed in version '{version}'" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_old_method_name) identifier_old_method_name (identifier_old_method_name) identifier_old_method_name )keyword_argument (keyword_argument (identifier_version) identifier_version (identifier_to_be_removed_in_version) identifier_to_be_removed_in_version )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_method_name) identifier_method_name (None) None )comparison_operator (comparison_operator (identifier_module_name) identifier_module_name (None) None )comparison_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_message) identifier_message (call (attribute (string_" Please use the '{method_name}' method on the '{module_name}' class moving forward.") string_" Please use the '{method_name}' method on the '{module_name}' class moving forward." (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_method_name) identifier_method_name (identifier_method_name) identifier_method_name )keyword_argument (keyword_argument (identifier_module_name) identifier_module_name (identifier_module_name) identifier_module_name )keyword_argument )argument_list )call )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_message) identifier_message )return_statement )block )function_definition )module
Generate a message to be used when warning about the use of deprecated methods. :param to_be_removed_in_version: Version of this module the deprecated method will be removed in. :type to_be_removed_in_version: str :param old_method_name: Deprecated method name. :type old_method_name: str :param method_name: Method intended to replace the deprecated method indicated. This method's docstrings are included in the decorated method's docstring. :type method_name: str :param module_name: Name of the module containing the new method to use. :type module_name: str :return: Full deprecation warning message for the indicated method. :rtype: str
(module (function_definition (function_name__assign_values_to_unbound_vars) function_name__assign_values_to_unbound_vars (parameters (identifier_unbound_vars) identifier_unbound_vars (identifier_unbound_var_values) identifier_unbound_var_values )parameters (block (expression_statement (assignment (identifier_context) identifier_context (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_unbound_var_values) identifier_unbound_var_values )argument_list )call (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_unbound_vars) identifier_unbound_vars )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'unexpected key: %s. Legal values are: %s') string_'unexpected key: %s. Legal values are: %s' (tuple (identifier_key) identifier_key (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_six) identifier_six (identifier_iterkeys) identifier_iterkeys )attribute (argument_list (identifier_unbound_vars) identifier_unbound_vars )argument_list )call )argument_list )call )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (identifier_context) identifier_context (subscript (identifier_unbound_vars) identifier_unbound_vars (identifier_key) identifier_key )subscript )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_unspecified) identifier_unspecified (list )list )assignment )expression_statement (for_statement (identifier_unbound_var) identifier_unbound_var (call (attribute (identifier_six) identifier_six (identifier_itervalues) identifier_itervalues )attribute (argument_list (identifier_unbound_vars) identifier_unbound_vars )argument_list )call (block (if_statement (comparison_operator (identifier_unbound_var) identifier_unbound_var (identifier_context) identifier_context )comparison_operator (block (if_statement (call (attribute (identifier_unbound_var) identifier_unbound_var (identifier_has_default) identifier_has_default )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_context) identifier_context (identifier_unbound_var) identifier_unbound_var )subscript (attribute (identifier_unbound_var) identifier_unbound_var (identifier_default) identifier_default )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_unspecified) identifier_unspecified (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_unbound_var) identifier_unbound_var (identifier_key) identifier_key )attribute )argument_list )call )expression_statement )block )else_clause )if_statement )block )if_statement )block )for_statement (if_statement (identifier_unspecified) identifier_unspecified (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'Unspecified keys: %s') string_'Unspecified keys: %s' (identifier_unspecified) identifier_unspecified )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_context) identifier_context )return_statement )block )function_definition )module
Assigns values to the vars and raises ValueError if one is missing.
(module (function_definition (function_name__load_config) function_name__load_config (parameters (identifier_configfile) identifier_configfile (default_parameter (identifier_section) identifier_section (None) None )default_parameter )parameters (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_configfile) identifier_configfile )argument_list )call (block (expression_statement (assignment (identifier_config) identifier_config (call (identifier_read_config) identifier_read_config (argument_list (identifier_configfile) identifier_configfile )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_section) identifier_section (None) None )comparison_operator (block (if_statement (comparison_operator (identifier_section) identifier_section (identifier_config) identifier_config )comparison_operator (block (return_statement (subscript (attribute (identifier_config) identifier_config (identifier__sections) identifier__sections )attribute (identifier_section) identifier_section )subscript )return_statement )block (else_clause (block (expression_statement (call (attribute (identifier_bot) identifier_bot (identifier_warning) identifier_warning )attribute (argument_list (binary_operator (string_'%s not found in %s') string_'%s not found in %s' (tuple (identifier_section) identifier_section (identifier_configfile) identifier_configfile )tuple )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )if_statement (return_statement (identifier_config) identifier_config )return_statement )block )if_statement )block )function_definition )module
general function to load and return a configuration given a helper name. This function is used for both the user config and global help me config files.
(module (function_definition (function_name_make_valid_string) function_name_make_valid_string (parameters (identifier_self) identifier_self (default_parameter (identifier_string) identifier_string (string_'') string_'' )default_parameter )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_valid_str) identifier_is_valid_str )attribute (argument_list (identifier_string) identifier_string )argument_list )call )not_operator (block (if_statement (boolean_operator (comparison_operator (identifier_string) identifier_string (attribute (identifier_self) identifier_self (identifier_val_map) identifier_val_map )attribute )comparison_operator (not_operator (attribute (identifier_self) identifier_self (identifier_allow_dups) identifier_allow_dups )attribute )not_operator )boolean_operator (block (raise_statement (call (identifier_IndexError) identifier_IndexError (argument_list (call (attribute (string_"Value {} has already been given to the sanitizer") string_"Value {} has already been given to the sanitizer" (identifier_format) identifier_format )attribute (argument_list (identifier_string) identifier_string )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_internal_name) identifier_internal_name (call (attribute (call (identifier_super) identifier_super (argument_list (identifier__NameSanitizer) identifier__NameSanitizer (identifier_self) identifier_self )argument_list )call (identifier_make_valid_string) identifier_make_valid_string )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_val_map) identifier_val_map )attribute (identifier_string) identifier_string )subscript (identifier_internal_name) identifier_internal_name )assignment )expression_statement (return_statement (identifier_internal_name) identifier_internal_name )return_statement )block (else_clause (block (if_statement (attribute (identifier_self) identifier_self (identifier_map_valid) identifier_map_valid )attribute (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_val_map) identifier_val_map )attribute (identifier_string) identifier_string )subscript (identifier_string) identifier_string )assignment )expression_statement )block )if_statement (return_statement (identifier_string) identifier_string )return_statement )block )else_clause )if_statement )block )function_definition )module
Inputting a value for the first time
(module (function_definition (function_name_unpack_types) function_name_unpack_types (parameters (identifier_types) identifier_types (identifier_args) identifier_args (identifier_argnames) identifier_argnames (identifier_major) identifier_major )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_types) identifier_types )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_multiple) identifier_multiple (attribute (subscript (identifier_types) identifier_types (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier__multiple) identifier__multiple )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_multiple) identifier_multiple (False) False )assignment )expression_statement )block )else_clause )if_statement (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_types) identifier_types )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call )comparison_operator (not_operator (identifier_multiple) identifier_multiple )not_operator )boolean_operator (block (raise_statement (call (identifier_FailReply) identifier_FailReply (argument_list (string_"Too many parameters given.") string_"Too many parameters given." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_params) identifier_params (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_kattype) identifier_kattype )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_types) identifier_types )argument_list )call (block (expression_statement (assignment (identifier_name) identifier_name (string_"") string_"" )assignment )expression_statement (if_statement (comparison_operator (identifier_i) identifier_i (call (identifier_len) identifier_len (argument_list (identifier_argnames) identifier_argnames )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_name) identifier_name (subscript (identifier_argnames) identifier_argnames (identifier_i) identifier_i )subscript )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_params) identifier_params (identifier_append) identifier_append )attribute (argument_list (call (identifier_Parameter) identifier_Parameter (argument_list (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator (identifier_name) identifier_name (identifier_kattype) identifier_kattype (identifier_major) identifier_major )argument_list )call )argument_list )call )expression_statement )block )for_statement (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_types) identifier_types )argument_list )call )comparison_operator (identifier_multiple) identifier_multiple )boolean_operator (block (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_types) identifier_types )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_params) identifier_params (identifier_append) identifier_append )attribute (argument_list (call (identifier_Parameter) identifier_Parameter (argument_list (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator (identifier_name) identifier_name (identifier_kattype) identifier_kattype (identifier_major) identifier_major )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (call (identifier_map) identifier_map (argument_list (lambda (lambda_parameters (identifier_param) identifier_param (identifier_arg) identifier_arg )lambda_parameters (call (attribute (identifier_param) identifier_param (identifier_unpack) identifier_unpack )attribute (argument_list (identifier_arg) identifier_arg )argument_list )call )lambda (identifier_params) identifier_params (identifier_args) identifier_args )argument_list )call )return_statement )block )function_definition )module
Parse arguments according to types list. Parameters ---------- types : list of kattypes The types of the arguments (in order). args : list of strings The arguments to parse. argnames : list of strings The names of the arguments. major : integer Major version of KATCP to use when packing types
(module (function_definition (function_name_get_match_details) function_name_get_match_details (parameters (identifier_self) identifier_self (default_parameter (identifier_match_id) identifier_match_id (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (string_'match_id') string_'match_id' (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'match_id') string_'match_id' )subscript (identifier_match_id) identifier_match_id )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier___build_url) identifier___build_url )attribute (argument_list (attribute (identifier_urls) identifier_urls (identifier_GET_MATCH_DETAILS) identifier_GET_MATCH_DETAILS )attribute (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_req) identifier_req (call (attribute (identifier_self) identifier_self (identifier_executor) identifier_executor )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'URL: {0}') string_'URL: {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_url) identifier_url )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier___check_http_err) identifier___check_http_err )attribute (argument_list (attribute (identifier_req) identifier_req (identifier_status_code) identifier_status_code )attribute )argument_list )call )not_operator (block (return_statement (call (attribute (identifier_response) identifier_response (identifier_build) identifier_build )attribute (argument_list (identifier_req) identifier_req (identifier_url) identifier_url (attribute (identifier_self) identifier_self (identifier_raw_mode) identifier_raw_mode )attribute )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Returns a dictionary containing the details for a Dota 2 match :param match_id: (int, optional) :return: dictionary of matches, see :doc:`responses </responses>`
(module (function_definition (function_name_get_client_ip) function_name_get_client_ip (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_client_ip) identifier_client_ip )attribute (block (return_statement (attribute (identifier_self) identifier_self (identifier_client_ip) identifier_client_ip )attribute )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_client) identifier_client (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_'SSH_CONNECTION') string_'SSH_CONNECTION' (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_'SSH_CLIENT') string_'SSH_CLIENT' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_client_ip) identifier_client_ip )attribute (subscript (call (attribute (identifier_client) identifier_client (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_logdebug) identifier_logdebug )attribute (argument_list (binary_operator (string_'client_ip: %s\n') string_'client_ip: %s\n' (attribute (identifier_self) identifier_self (identifier_client_ip) identifier_client_ip )attribute )binary_operator )argument_list )call )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier_client_ip) identifier_client_ip )attribute )return_statement )block (except_clause (block (raise_statement (call (identifier_SSHEnvironmentError) identifier_SSHEnvironmentError (argument_list (concatenated_string (string_'cannot identify the ssh client ') string_'cannot identify the ssh client ' (string_'IP address') string_'IP address' )concatenated_string )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Return the client IP from the environment.
(module (function_definition (function_name_apply_child_computation) function_name_apply_child_computation (parameters (identifier_self) identifier_self (typed_parameter (identifier_child_msg) identifier_child_msg (type (identifier_Message) identifier_Message )type )typed_parameter )parameters (type (string_'BaseComputation') string_'BaseComputation' )type (block (expression_statement (assignment (identifier_child_computation) identifier_child_computation (call (attribute (identifier_self) identifier_self (identifier_generate_child_computation) identifier_generate_child_computation )attribute (argument_list (identifier_child_msg) identifier_child_msg )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_child_computation) identifier_add_child_computation )attribute (argument_list (identifier_child_computation) identifier_child_computation )argument_list )call )expression_statement (return_statement (identifier_child_computation) identifier_child_computation )return_statement )block )function_definition )module
Apply the vm message ``child_msg`` as a child computation.
(module (function_definition (function_name_check) function_name_check (parameters (identifier_self) identifier_self (default_parameter (identifier_check_url) identifier_check_url (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_check_url) identifier_check_url (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_check_url) identifier_check_url )attribute (call (attribute (identifier_self) identifier_self (identifier__normalize_check_url) identifier__normalize_check_url )attribute (argument_list (identifier_check_url) identifier_check_url )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_response) identifier_response (None) None )assignment )expression_statement (expression_statement (assignment (identifier_sleeped) identifier_sleeped (float_0.0) float_0.0 )assignment )expression_statement (expression_statement (assignment (identifier_t) identifier_t (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list )argument_list )call )assignment )expression_statement (while_statement (not_operator (identifier_response) identifier_response )not_operator (block (try_statement (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_check_url) identifier_check_url )attribute (keyword_argument (identifier_verify) identifier_verify (False) False )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (attribute (attribute (identifier_requests) identifier_requests (identifier_exceptions) identifier_exceptions )attribute (identifier_ConnectionError) identifier_ConnectionError )attribute (block (if_statement (comparison_operator (identifier_sleeped) identifier_sleeped (attribute (identifier_self) identifier_self (identifier_timeout) identifier_timeout )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__kill) identifier__kill )attribute (argument_list )argument_list )call )expression_statement (raise_statement (call (identifier_LiveAndLetDieError) identifier_LiveAndLetDieError (argument_list (call (attribute (concatenated_string (string_'{0} server {1} didn\'t start in specified timeout {2} ') string_'{0} server {1} didn\'t start in specified timeout {2} ' (string_'seconds!\ncommand: {3}') string_'seconds!\ncommand: {3}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (attribute (identifier_self) identifier_self (identifier_check_url) identifier_check_url )attribute (attribute (identifier_self) identifier_self (identifier_timeout) identifier_timeout )attribute (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_create_command) identifier_create_command )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement (expression_statement (assignment (identifier_sleeped) identifier_sleeped (call (identifier__get_total_seconds) identifier__get_total_seconds (argument_list (binary_operator (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list )argument_list )call (identifier_t) identifier_t )binary_operator )argument_list )call )assignment )expression_statement )block )except_clause )try_statement )block )while_statement (return_statement (call (identifier__get_total_seconds) identifier__get_total_seconds (argument_list (binary_operator (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list )argument_list )call (identifier_t) identifier_t )binary_operator )argument_list )call )return_statement )block )function_definition )module
Checks whether a server is running. :param str check_url: URL where to check whether the server is running. Default is ``"http://{self.host}:{self.port}"``.
(module (function_definition (function_name_to_ufo_components) function_name_to_ufo_components (parameters (identifier_self) identifier_self (identifier_ufo_glyph) identifier_ufo_glyph (identifier_layer) identifier_layer )parameters (block (expression_statement (assignment (identifier_pen) identifier_pen (call (attribute (identifier_ufo_glyph) identifier_ufo_glyph (identifier_getPointPen) identifier_getPointPen )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_index) identifier_index (identifier_component) identifier_component )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_layer) identifier_layer (identifier_components) identifier_components )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_pen) identifier_pen (identifier_addComponent) identifier_addComponent )attribute (argument_list (attribute (identifier_component) identifier_component (identifier_name) identifier_name )attribute (attribute (identifier_component) identifier_component (identifier_transform) identifier_transform )attribute )argument_list )call )expression_statement (if_statement (attribute (identifier_component) identifier_component (identifier_anchor) identifier_anchor )attribute (block (if_statement (comparison_operator (identifier_COMPONENT_INFO_KEY) identifier_COMPONENT_INFO_KEY (attribute (identifier_ufo_glyph) identifier_ufo_glyph (identifier_lib) identifier_lib )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_ufo_glyph) identifier_ufo_glyph (identifier_lib) identifier_lib )attribute (identifier_COMPONENT_INFO_KEY) identifier_COMPONENT_INFO_KEY )subscript (list )list )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (attribute (identifier_ufo_glyph) identifier_ufo_glyph (identifier_lib) identifier_lib )attribute (identifier_COMPONENT_INFO_KEY) identifier_COMPONENT_INFO_KEY )subscript (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_"name") string_"name" (attribute (identifier_component) identifier_component (identifier_name) identifier_name )attribute )pair (pair (string_"index") string_"index" (identifier_index) identifier_index )pair (pair (string_"anchor") string_"anchor" (attribute (identifier_component) identifier_component (identifier_anchor) identifier_anchor )attribute )pair )dictionary )argument_list )call )expression_statement )block )if_statement )block )for_statement (for_statement (identifier_key) identifier_key (list (string_"alignment") string_"alignment" (string_"locked") string_"locked" (string_"smartComponentValues") string_"smartComponentValues" )list (block (expression_statement (assignment (identifier_values) identifier_values (list_comprehension (call (identifier_getattr) identifier_getattr (argument_list (identifier_c) identifier_c (identifier_key) identifier_key )argument_list )call (for_in_clause (identifier_c) identifier_c (attribute (identifier_layer) identifier_layer (identifier_components) identifier_components )attribute )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (call (identifier_any) identifier_any (argument_list (identifier_values) identifier_values )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_ufo_glyph) identifier_ufo_glyph (identifier_lib) identifier_lib )attribute (call (identifier__lib_key) identifier__lib_key (argument_list (identifier_key) identifier_key )argument_list )call )subscript (identifier_values) identifier_values )assignment )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Draw .glyphs components onto a pen, adding them to the parent glyph.
(module (function_definition (function_name_lock) function_name_lock (parameters (identifier_self) identifier_self (default_parameter (identifier_atime) identifier_atime (integer_30) integer_30 )default_parameter (default_parameter (identifier_ltime) identifier_ltime (integer_5) integer_5 )default_parameter (default_parameter (identifier_identifier) identifier_identifier (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_identifier) identifier_identifier (None) None )comparison_operator (block (expression_statement (assignment (identifier_identifier) identifier_identifier (call (identifier_nice_identifier) identifier_nice_identifier (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier__acquire_lock) identifier__acquire_lock )attribute (argument_list (identifier_identifier) identifier_identifier (identifier_atime) identifier_atime (identifier_ltime) identifier_ltime )argument_list )call (identifier_identifier) identifier_identifier )comparison_operator (block (raise_statement (call (identifier_LockError) identifier_LockError (argument_list (string_"could not acquire lock") string_"could not acquire lock" )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__session_lock_identifier) identifier__session_lock_identifier )attribute (identifier_identifier) identifier_identifier )assignment )expression_statement (expression_statement (yield (identifier_self) identifier_self )yield )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__release_lock) identifier__release_lock )attribute (argument_list (identifier_identifier) identifier_identifier )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__session_lock_identifier) identifier__session_lock_identifier )attribute (None) None )assignment )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Context manager to acquire the namespace global lock. This is typically used for multi-step registry operations, such as a read-modify-write sequence:: with registry.lock() as session: d = session.get('dict', 'key') del d['traceback'] session.set('dict', 'key', d) Callers may provide their own `identifier`; if they do, they must ensure that it is reasonably unique (e.g., a UUID). Using a stored worker ID that is traceable back to the lock holder is a good practice. :param int atime: maximum time (in seconds) to acquire lock :param int ltime: maximum time (in seconds) to own lock :param str identifier: worker-unique identifier for the lock
(module (function_definition (function_name_projection_to_raster_coords) function_name_projection_to_raster_coords (parameters (identifier_self) identifier_self (identifier_lat) identifier_lat (identifier_lon) identifier_lon )parameters (block (expression_statement (assignment (identifier_r_px_py) identifier_r_px_py (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list (integer_1) integer_1 (identifier_lon) identifier_lon (identifier_lat) identifier_lat )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tg) identifier_tg (call (identifier_inv) identifier_inv (argument_list (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list (list (integer_1) integer_1 (integer_0) integer_0 (integer_0) integer_0 )list (subscript (attribute (identifier_self) identifier_self (identifier_geotransform) identifier_geotransform )attribute (slice (integer_0) integer_0 (colon) colon (integer_3) integer_3 )slice )subscript (subscript (attribute (identifier_self) identifier_self (identifier_geotransform) identifier_geotransform )attribute (slice (integer_3) integer_3 (colon) colon (integer_6) integer_6 )slice )subscript )list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (subscript (call (attribute (identifier_np) identifier_np (identifier_inner) identifier_inner )attribute (argument_list (identifier_tg) identifier_tg (identifier_r_px_py) identifier_r_px_py )argument_list )call (slice (integer_1) integer_1 (colon) colon )slice )subscript )return_statement )block )function_definition )module
Returns pixel centers. See documentation for the GDAL function GetGeoTransform for details.
(module (function_definition (function_name_get_api_docs) function_name_get_api_docs (parameters (identifier_routes) identifier_routes )parameters (block (expression_statement (assignment (identifier_routes) identifier_routes (call (identifier_map) identifier_map (argument_list (identifier__get_tuple_from_route) identifier__get_tuple_from_route (identifier_routes) identifier_routes )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_documentation) identifier_documentation (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_url) identifier_url (identifier_rh) identifier_rh (identifier_methods) identifier_methods )pattern_list (call (identifier_sorted) identifier_sorted (argument_list (identifier_routes) identifier_routes (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_a) identifier_a )lambda_parameters (subscript (identifier_a) identifier_a (integer_0) integer_0 )subscript )lambda )keyword_argument )argument_list )call (block (if_statement (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_rh) identifier_rh (identifier_APIHandler) identifier_APIHandler )argument_list )call (block (expression_statement (call (attribute (identifier_documentation) identifier_documentation (identifier_append) identifier_append )attribute (argument_list (call (identifier__get_route_doc) identifier__get_route_doc (argument_list (identifier_url) identifier_url (identifier_rh) identifier_rh (identifier_methods) identifier_methods )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_documentation) identifier_documentation (parenthesized_expression (binary_operator (binary_operator (binary_operator (string_"**This documentation is automatically generated.**\n\n") string_"**This documentation is automatically generated.**\n\n" (string_"**Output schemas only represent `data` and not the full output; ") string_"**Output schemas only represent `data` and not the full output; " )binary_operator (string_"see output examples and the JSend specification.**\n") string_"see output examples and the JSend specification.**\n" )binary_operator (call (attribute (string_"\n<br>\n<br>\n") string_"\n<br>\n<br>\n" (identifier_join) identifier_join )attribute (argument_list (identifier_documentation) identifier_documentation )argument_list )call )binary_operator )parenthesized_expression )assignment )expression_statement (return_statement (identifier_documentation) identifier_documentation )return_statement )block )function_definition )module
Generates GitHub Markdown formatted API documentation using provided schemas in RequestHandler methods and their docstrings. :type routes: [(url, RequestHandler), ...] :param routes: List of routes (this is ideally all possible routes of the app) :rtype: str :returns: generated GFM-formatted documentation
(module (function_definition (function_name_create_contact) function_name_create_contact (parameters (identifier_self) identifier_self (default_parameter (identifier_email) identifier_email (None) None )default_parameter (default_parameter (identifier_first_name) identifier_first_name (None) None )default_parameter (default_parameter (identifier_last_name) identifier_last_name (None) None )default_parameter (default_parameter (identifier_phone_number) identifier_phone_number (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (dictionary )dictionary )assignment )expression_statement (if_statement (identifier_email) identifier_email (block (expression_statement (assignment (subscript (identifier_result) identifier_result (string_'email') string_'email' )subscript (identifier_email) identifier_email )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_first_name) identifier_first_name (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_result) identifier_result (string_'first_name') string_'first_name' )subscript (identifier_first_name) identifier_first_name )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_last_name) identifier_last_name (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_result) identifier_result (string_'last_name') string_'last_name' )subscript (identifier_last_name) identifier_last_name )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_phone_number) identifier_phone_number (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_result) identifier_result (string_'phone_number') string_'phone_number' )subscript (identifier_phone_number) identifier_phone_number )assignment )expression_statement )block )if_statement (return_statement (conditional_expression (identifier_result) identifier_result (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_result) identifier_result )argument_list )call (integer_0) integer_0 )comparison_operator (None) None )conditional_expression )return_statement )block )function_definition )module
Create a contant which is later passed to payment.
(module (function_definition (function_name_error) function_name_error (parameters (identifier_self) identifier_self (identifier_correlation_id) identifier_correlation_id (identifier_error) identifier_error (identifier_message) identifier_message (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__format_and_write) identifier__format_and_write )attribute (argument_list (attribute (identifier_LogLevel) identifier_LogLevel (identifier_Error) identifier_Error )attribute (identifier_correlation_id) identifier_correlation_id (identifier_error) identifier_error (identifier_message) identifier_message (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement )block )function_definition )module
Logs recoverable application error. :param correlation_id: (optional) transaction id to trace execution through call chain. :param error: an error object associated with this message. :param message: a human-readable message to log. :param args: arguments to parameterize the message. :param kwargs: arguments to parameterize the message.
(module (function_definition (function_name__check_db_exists) function_name__check_db_exists (parameters (identifier_self) identifier_self (identifier_instance) identifier_instance )parameters (block (expression_statement (assignment (pattern_list (identifier_dsn) identifier_dsn (identifier_host) identifier_host (identifier_username) identifier_username (identifier_password) identifier_password (identifier_database) identifier_database (identifier_driver) identifier_driver )pattern_list (call (attribute (identifier_self) identifier_self (identifier__get_access_info) identifier__get_access_info )attribute (argument_list (identifier_instance) identifier_instance (attribute (identifier_self) identifier_self (identifier_DEFAULT_DB_KEY) identifier_DEFAULT_DB_KEY )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_context) identifier_context (call (attribute (string_"{} - {}") string_"{} - {}" (identifier_format) identifier_format )attribute (argument_list (identifier_host) identifier_host (identifier_database) identifier_database )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_existing_databases) identifier_existing_databases )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (identifier_self) identifier_self (identifier_get_cursor) identifier_get_cursor )attribute (argument_list (identifier_instance) identifier_instance (None) None (attribute (identifier_self) identifier_self (identifier_DEFAULT_DATABASE) identifier_DEFAULT_DATABASE )attribute )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_existing_databases) identifier_existing_databases )attribute (dictionary )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_execute) identifier_execute )attribute (argument_list (identifier_DATABASE_EXISTS_QUERY) identifier_DATABASE_EXISTS_QUERY )argument_list )call )expression_statement (for_statement (identifier_row) identifier_row (identifier_cursor) identifier_cursor (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_existing_databases) identifier_existing_databases )attribute (attribute (identifier_row) identifier_row (identifier_name) identifier_name )attribute )subscript (True) True )assignment )expression_statement )block )for_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 (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"Failed to check if database {} exists: {}") string_"Failed to check if database {} exists: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_database) identifier_database (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement (return_statement (expression_list (False) False (identifier_context) identifier_context )expression_list )return_statement )block )except_clause (finally_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_close_cursor) identifier_close_cursor )attribute (argument_list (identifier_cursor) identifier_cursor )argument_list )call )expression_statement )block )finally_clause )try_statement )block )if_statement (return_statement (expression_list (comparison_operator (identifier_database) identifier_database (attribute (identifier_self) identifier_self (identifier_existing_databases) identifier_existing_databases )attribute )comparison_operator (identifier_context) identifier_context )expression_list )return_statement )block )function_definition )module
Check if the database we're targeting actually exists If not then we won't do any checks This allows the same config to be installed on many servers but fail gracefully
(module (function_definition (function_name__flip_lr) function_name__flip_lr (parameters (identifier_x) identifier_x )parameters (block (expression_statement (string_"Flip `x` horizontally.") string_"Flip `x` horizontally." )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_ImagePoints) identifier_ImagePoints )argument_list )call (block (expression_statement (augmented_assignment (subscript (attribute (attribute (identifier_x) identifier_x (identifier_flow) identifier_flow )attribute (identifier_flow) identifier_flow )attribute (ellipsis_...) ellipsis_... (integer_0) integer_0 )subscript (unary_operator (integer_1) integer_1 )unary_operator )augmented_assignment )expression_statement (return_statement (identifier_x) identifier_x )return_statement )block )if_statement (return_statement (call (identifier_tensor) identifier_tensor (argument_list (call (attribute (identifier_np) identifier_np (identifier_ascontiguousarray) identifier_ascontiguousarray )attribute (argument_list (subscript (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_x) identifier_x )argument_list )call (ellipsis_...) ellipsis_... (slice (colon) colon (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Flip `x` horizontally.
(module (function_definition (function_name_CopyAttributesFromSessionCompletion) function_name_CopyAttributesFromSessionCompletion (parameters (identifier_self) identifier_self (identifier_session_completion) identifier_session_completion )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_identifier) identifier_identifier )attribute (attribute (identifier_session_completion) identifier_session_completion (identifier_identifier) identifier_identifier )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Session identifier mismatch.') string_'Session identifier mismatch.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_aborted) identifier_aborted )attribute (attribute (identifier_session_completion) identifier_session_completion (identifier_aborted) identifier_aborted )attribute )assignment )expression_statement (if_statement (attribute (identifier_session_completion) identifier_session_completion (identifier_analysis_reports_counter) identifier_analysis_reports_counter )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_analysis_reports_counter) identifier_analysis_reports_counter )attribute (parenthesized_expression (attribute (identifier_session_completion) identifier_session_completion (identifier_analysis_reports_counter) identifier_analysis_reports_counter )attribute )parenthesized_expression )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_completion_time) identifier_completion_time )attribute (attribute (identifier_session_completion) identifier_session_completion (identifier_timestamp) identifier_timestamp )attribute )assignment )expression_statement (if_statement (attribute (identifier_session_completion) identifier_session_completion (identifier_event_labels_counter) identifier_event_labels_counter )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_event_labels_counter) identifier_event_labels_counter )attribute (attribute (identifier_session_completion) identifier_session_completion (identifier_event_labels_counter) identifier_event_labels_counter )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_session_completion) identifier_session_completion (identifier_parsers_counter) identifier_parsers_counter )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_parsers_counter) identifier_parsers_counter )attribute (attribute (identifier_session_completion) identifier_session_completion (identifier_parsers_counter) identifier_parsers_counter )attribute )assignment )expression_statement )block )if_statement )block )function_definition )module
Copies attributes from a session completion. Args: session_completion (SessionCompletion): session completion attribute container. Raises: ValueError: if the identifier of the session completion does not match that of the session.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_name) identifier_name (default_parameter (identifier_function) identifier_function (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_function) identifier_function (None) None )comparison_operator (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_function) identifier_function (attribute (identifier_Settings) identifier_Settings (identifier_FUNCTION_SETTINGS_NAME) identifier_FUNCTION_SETTINGS_NAME )attribute )argument_list )call (block (if_statement (comparison_operator (identifier_name) identifier_name (call (identifier_getattr) identifier_getattr (argument_list (identifier_function) identifier_function (attribute (identifier_Settings) identifier_Settings (identifier_FUNCTION_SETTINGS_NAME) identifier_FUNCTION_SETTINGS_NAME )attribute )argument_list )call )comparison_operator (block (return_statement (subscript (call (identifier_getattr) identifier_getattr (argument_list (identifier_function) identifier_function (attribute (identifier_Settings) identifier_Settings (identifier_FUNCTION_SETTINGS_NAME) identifier_FUNCTION_SETTINGS_NAME )attribute )argument_list )call (identifier_name) identifier_name )subscript )return_statement )block )if_statement )block )if_statement )block )if_statement (return_statement (subscript (attribute (identifier_Settings) identifier_Settings (identifier___global_setting_values) identifier___global_setting_values )attribute (identifier_name) identifier_name )subscript )return_statement )block )function_definition )module
Get a setting. `name` should be the name of the setting to look for. If the optional argument `function` is passed, this will look for a value local to the function before retrieving the global value.
(module (function_definition (function_name_identity) function_name_identity (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_dataset) identifier_dataset )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_s) identifier_s (call (identifier_object_session) identifier_object_session (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ds) identifier_ds (call (attribute (call (attribute (call (attribute (identifier_s) identifier_s (identifier_query) identifier_query )attribute (argument_list (identifier_Dataset) identifier_Dataset )argument_list )call (identifier_filter) identifier_filter )attribute (argument_list (comparison_operator (attribute (identifier_Dataset) identifier_Dataset (identifier_id_) identifier_id_ )attribute (attribute (identifier_self) identifier_self (identifier_d_id) identifier_d_id )attribute )comparison_operator )argument_list )call (identifier_one) identifier_one )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_ds) identifier_ds (attribute (identifier_self) identifier_self (identifier_dataset) identifier_dataset )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_d) identifier_d (dictionary (pair (string_'id') string_'id' (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )pair (pair (string_'vid') string_'vid' (attribute (identifier_self) identifier_self (identifier_vid) identifier_vid )attribute )pair (pair (string_'name') string_'name' (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )pair (pair (string_'vname') string_'vname' (attribute (identifier_self) identifier_self (identifier_vname) identifier_vname )attribute )pair (pair (string_'ref') string_'ref' (attribute (identifier_self) identifier_self (identifier_ref) identifier_ref )attribute )pair (pair (string_'space') string_'space' (attribute (identifier_self) identifier_self (identifier_space) identifier_space )attribute )pair (pair (string_'time') string_'time' (attribute (identifier_self) identifier_self (identifier_time) identifier_time )attribute )pair (pair (string_'table') string_'table' (attribute (identifier_self) identifier_self (identifier_table_name) identifier_table_name )attribute )pair (pair (string_'grain') string_'grain' (attribute (identifier_self) identifier_self (identifier_grain) identifier_grain )attribute )pair (pair (string_'variant') string_'variant' (attribute (identifier_self) identifier_self (identifier_variant) identifier_variant )attribute )pair (pair (string_'segment') string_'segment' (attribute (identifier_self) identifier_self (identifier_segment) identifier_segment )attribute )pair (pair (string_'format') string_'format' (conditional_expression (attribute (identifier_self) identifier_self (identifier_format) identifier_format )attribute (attribute (identifier_self) identifier_self (identifier_format) identifier_format )attribute (string_'db') string_'db' )conditional_expression )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_PartitionIdentity) identifier_PartitionIdentity (identifier_from_dict) identifier_from_dict )attribute (argument_list (call (identifier_dict) identifier_dict (argument_list (binary_operator (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_ds) identifier_ds (identifier_dict) identifier_dict )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_d) identifier_d (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call )binary_operator )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return this partition information as a PartitionId.
(module (function_definition (function_name_list_registered_stateful_ops_without_inputs) function_name_list_registered_stateful_ops_without_inputs (parameters )parameters (block (return_statement (call (identifier_set) identifier_set (argument_list (list_comprehension (identifier_name) identifier_name (for_in_clause (pattern_list (identifier_name) identifier_name (identifier_op) identifier_op )pattern_list (call (attribute (call (attribute (identifier_op_def_registry) identifier_op_def_registry (identifier_get_registered_ops) identifier_get_registered_ops )attribute (argument_list )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (boolean_operator (attribute (identifier_op) identifier_op (identifier_is_stateful) identifier_is_stateful )attribute (not_operator (attribute (identifier_op) identifier_op (identifier_input_arg) identifier_input_arg )attribute )not_operator )boolean_operator )if_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Returns set of registered stateful ops that do not expect inputs. This list is used to identify the ops to be included in the state-graph and that are subsequently fed into the apply-graphs. Returns: A set of strings.
(module (function_definition (function_name_upgradeUpload) function_name_upgradeUpload (parameters (identifier_self) identifier_self (identifier_file) identifier_file )parameters (block (expression_statement (assignment (identifier_files) identifier_files (dictionary (pair (string_'upfile') string_'upfile' (call (identifier_open) identifier_open (argument_list (identifier_file) identifier_file (string_'rb') string_'rb' )argument_list )call )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier___post_files) identifier___post_files )attribute (argument_list (string_'/upgrade/upload') string_'/upgrade/upload' (keyword_argument (identifier_files) identifier_files (identifier_files) identifier_files )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Upgrade the firmware of the miner.
(module (function_definition (function_name_write_config) function_name_write_config (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_template) identifier_template (call (attribute (identifier_util) identifier_util (identifier_render_template) identifier_render_template )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__get_config_template) identifier__get_config_template )attribute (argument_list )argument_list )call (keyword_argument (identifier_config_options) identifier_config_options (attribute (identifier_self) identifier_self (identifier_config_options) identifier_config_options )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_util) identifier_util (identifier_write_file) identifier_write_file )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_config_file) identifier_config_file )attribute (identifier_template) identifier_template )argument_list )call )expression_statement )block )function_definition )module
Writes the provisioner's config file to disk and returns None. :return: None
(module (function_definition (function_name_add_field_with_label) function_name_add_field_with_label (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_label_description) identifier_label_description (identifier_field) identifier_field )parameters (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_inputs) identifier_inputs )attribute (identifier_key) identifier_key )subscript (identifier_field) identifier_field )assignment )expression_statement (expression_statement (assignment (identifier_label) identifier_label (call (identifier_Label) identifier_Label (argument_list (identifier_label_description) identifier_label_description )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_label) identifier_label (identifier_style) identifier_style )attribute (string_'margin') string_'margin' )subscript (string_'0px 5px') string_'0px 5px' )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_label) identifier_label (identifier_style) identifier_style )attribute (string_'min-width') string_'min-width' )subscript (string_'30%') string_'30%' )assignment )expression_statement (expression_statement (assignment (identifier_container) identifier_container (call (identifier_HBox) identifier_HBox (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_container) identifier_container (identifier_style) identifier_style )attribute (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'justify-content') string_'justify-content' (string_'space-between') string_'space-between' )pair (pair (string_'overflow') string_'overflow' (string_'auto') string_'auto' )pair (pair (string_'padding') string_'padding' (string_'3px') string_'3px' )pair )dictionary )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_container) identifier_container (identifier_append) identifier_append )attribute (argument_list (identifier_label) identifier_label (keyword_argument (identifier_key) identifier_key (binary_operator (string_'lbl') string_'lbl' (identifier_key) identifier_key )binary_operator )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_container) identifier_container (identifier_append) identifier_append )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_inputs) identifier_inputs )attribute (identifier_key) identifier_key )subscript (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_container) identifier_container )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_container) identifier_container (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Adds a field to the dialog together with a descriptive label and a unique identifier. Note: You can access to the fields content calling the function GenericDialog.get_field(key). Args: key (str): The unique identifier for the field. label_description (str): The string content of the description label. field (Widget): The instance of the field Widget. It can be for example a TextInput or maybe a custom widget.
(module (function_definition (function_name_describe_api_integration) function_name_describe_api_integration (parameters (identifier_restApiId) identifier_restApiId (identifier_resourcePath) identifier_resourcePath (identifier_httpMethod) identifier_httpMethod (default_parameter (identifier_region) identifier_region (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_keyid) identifier_keyid (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_resource) identifier_resource (call (attribute (call (identifier_describe_api_resource) identifier_describe_api_resource (argument_list (identifier_restApiId) identifier_restApiId (identifier_resourcePath) identifier_resourcePath (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_keyid) identifier_keyid (identifier_keyid) identifier_keyid )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'resource') string_'resource' )argument_list )call )assignment )expression_statement (if_statement (identifier_resource) identifier_resource (block (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier__get_conn) identifier__get_conn (argument_list (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_keyid) identifier_keyid (identifier_keyid) identifier_keyid )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_integration) identifier_integration (call (attribute (identifier_conn) identifier_conn (identifier_get_integration) identifier_get_integration )attribute (argument_list (keyword_argument (identifier_restApiId) identifier_restApiId (identifier_restApiId) identifier_restApiId )keyword_argument (keyword_argument (identifier_resourceId) identifier_resourceId (subscript (identifier_resource) identifier_resource (string_'id') string_'id' )subscript )keyword_argument (keyword_argument (identifier_httpMethod) identifier_httpMethod (identifier_httpMethod) identifier_httpMethod )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_'integration') string_'integration' (call (identifier__convert_datetime_str) identifier__convert_datetime_str (argument_list (identifier_integration) identifier_integration )argument_list )call )pair )dictionary )return_statement )block )if_statement (return_statement (dictionary (pair (string_'error') string_'error' (string_'no such resource') string_'no such resource' )pair )dictionary )return_statement )block (except_clause (as_pattern (identifier_ClientError) identifier_ClientError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (return_statement (dictionary (pair (string_'error') string_'error' (call (subscript (identifier___utils__) identifier___utils__ (string_'boto3.get_error') string_'boto3.get_error' )subscript (argument_list (identifier_e) identifier_e )argument_list )call )pair )dictionary )return_statement )block )except_clause )try_statement )block )function_definition )module
Get an integration for a given method in a given API CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_integration restApiId resourcePath httpMethod
(module (function_definition (function_name_stop_tracing_process) function_name_stop_tracing_process (parameters (identifier_self) identifier_self (identifier_pid) identifier_pid )parameters (block (for_statement (identifier_thread) identifier_thread (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_system) identifier_system )attribute (identifier_get_process) identifier_get_process )attribute (argument_list (identifier_pid) identifier_pid )argument_list )call (identifier_iter_threads) identifier_iter_threads )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier___stop_tracing) identifier___stop_tracing )attribute (argument_list (identifier_thread) identifier_thread )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Stop tracing mode for all threads in the given process. @type pid: int @param pid: Global ID of process to stop tracing.
(module (function_definition (function_name_create) function_name_create (parameters (identifier_self) identifier_self (identifier_public_key) identifier_public_key (default_parameter (identifier_friendly_name) identifier_friendly_name (attribute (identifier_values) identifier_values (identifier_unset) identifier_unset )attribute )default_parameter (default_parameter (identifier_account_sid) identifier_account_sid (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_'PublicKey') string_'PublicKey' (identifier_public_key) identifier_public_key )pair (pair (string_'FriendlyName') string_'FriendlyName' (identifier_friendly_name) identifier_friendly_name )pair (pair (string_'AccountSid') string_'AccountSid' (identifier_account_sid) identifier_account_sid )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_PublicKeyInstance) identifier_PublicKeyInstance (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 PublicKeyInstance :param unicode public_key: A URL encoded representation of the public key :param unicode friendly_name: A string to describe the resource :param unicode account_sid: The Subaccount this Credential should be associated with. :returns: Newly created PublicKeyInstance :rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyInstance
(module (function_definition (function_name_select_device_by_load) function_name_select_device_by_load (parameters (default_parameter (identifier_wproc) identifier_wproc (float_0.5) float_0.5 )default_parameter (default_parameter (identifier_wmem) identifier_wmem (float_0.5) float_0.5 )default_parameter )parameters (block (expression_statement (assignment (identifier_ids) identifier_ids (call (identifier_device_by_load) identifier_device_by_load (argument_list (keyword_argument (identifier_wproc) identifier_wproc (identifier_wproc) identifier_wproc )keyword_argument (keyword_argument (identifier_wmem) identifier_wmem (identifier_wmem) identifier_wmem )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (call (attribute (attribute (identifier_cp) identifier_cp (identifier_cuda) identifier_cuda )attribute (identifier_Device) identifier_Device )attribute (argument_list (subscript (identifier_ids) identifier_ids (integer_0) integer_0 )subscript )argument_list )call (identifier_use) identifier_use )attribute (argument_list )argument_list )call )expression_statement (return_statement (subscript (identifier_ids) identifier_ids (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Set the current device for cupy as the device with the lowest weighted average of processor and memory load.
(module (function_definition (function_name_render) function_name_render (parameters (identifier_self) identifier_self )parameters (block (expression_statement (string_"Re-render Jupyter cell for batch of images.") string_"Re-render Jupyter cell for batch of images." )expression_statement (expression_statement (call (identifier_clear_output) identifier_clear_output (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_csv) identifier_write_csv )attribute (argument_list )argument_list )call )expression_statement (if_statement (boolean_operator (call (attribute (identifier_self) identifier_self (identifier_empty) identifier_empty )attribute (argument_list )argument_list )call (comparison_operator (attribute (identifier_self) identifier_self (identifier__skipped) identifier__skipped )attribute (integer_0) integer_0 )comparison_operator )boolean_operator (block (return_statement (call (identifier_display) identifier_display (argument_list (concatenated_string (string_f'No images to show :). {self._skipped} pairs were ') string_f'No images to show :). {self._skipped} pairs were ' (string_f'skipped since at least one of the images was deleted by the user.') string_f'skipped since at least one of the images was deleted by the user.' )concatenated_string )argument_list )call )return_statement )block (elif_clause (call (attribute (identifier_self) identifier_self (identifier_empty) identifier_empty )attribute (argument_list )argument_list )call (block (return_statement (call (identifier_display) identifier_display (argument_list (string_'No images to show :)') string_'No images to show :)' )argument_list )call )return_statement )block )elif_clause )if_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_batch_contains_deleted) identifier_batch_contains_deleted )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_next_batch) identifier_next_batch )attribute (argument_list (None) None )argument_list )call )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__skipped) identifier__skipped )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (call (identifier_display) identifier_display (argument_list (call (attribute (identifier_self) identifier_self (identifier_make_horizontal_box) identifier_make_horizontal_box )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_widgets) identifier_get_widgets )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__duplicates) identifier__duplicates )attribute )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_display) identifier_display (argument_list (call (attribute (identifier_self) identifier_self (identifier_make_button_widget) identifier_make_button_widget )attribute (argument_list (string_'Next Batch') string_'Next Batch' (keyword_argument (identifier_handler) identifier_handler (attribute (identifier_self) identifier_self (identifier_next_batch) identifier_next_batch )attribute )keyword_argument (keyword_argument (identifier_style) identifier_style (string_"primary") string_"primary" )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Re-render Jupyter cell for batch of images.
(module (function_definition (function_name_concatenate) function_name_concatenate (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (expression_statement (assignment (identifier_other) identifier_other (call (identifier_as_shape) identifier_as_shape (argument_list (identifier_other) identifier_other )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier__dims) identifier__dims )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_other) identifier_other (identifier_dims) identifier_dims )attribute (None) None )comparison_operator )boolean_operator (block (return_statement (call (identifier_unknown_shape) identifier_unknown_shape (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_TensorShape) identifier_TensorShape (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier__dims) identifier__dims )attribute (attribute (identifier_other) identifier_other (identifier_dims) identifier_dims )attribute )binary_operator )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns the concatenation of the dimension in `self` and `other`. *N.B.* If either `self` or `other` is completely unknown, concatenation will discard information about the other shape. In future, we might support concatenation that preserves this information for use with slicing. Args: other: Another `TensorShape`. Returns: A `TensorShape` whose dimensions are the concatenation of the dimensions in `self` and `other`.
(module (function_definition (function_name_splitlines) function_name_splitlines (parameters (identifier_self) identifier_self (default_parameter (identifier_keepends) identifier_keepends (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_lines) identifier_lines (call (attribute (identifier_self) identifier_self (identifier_split) identifier_split )attribute (argument_list (string_'\n') string_'\n' )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (list_comprehension (binary_operator (identifier_line) identifier_line (string_'\n') string_'\n' )binary_operator (for_in_clause (identifier_line) identifier_line (identifier_lines) identifier_lines )for_in_clause )list_comprehension (identifier_keepends) identifier_keepends (parenthesized_expression (conditional_expression (identifier_lines) identifier_lines (subscript (identifier_lines) identifier_lines (unary_operator (integer_1) integer_1 )unary_operator )subscript (subscript (identifier_lines) identifier_lines (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )conditional_expression )parenthesized_expression )conditional_expression )return_statement )block )function_definition )module
Return a list of lines, split on newline characters, include line boundaries, if keepends is true.
(module (function_definition (function_name_output_files) function_name_output_files (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_outs) identifier_outs (list_comprehension (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_address) identifier_address )attribute (identifier_repo) identifier_repo )attribute (attribute (attribute (identifier_self) identifier_self (identifier_address) identifier_address )attribute (identifier_path) identifier_path )attribute (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (subscript (attribute (identifier_self) identifier_self (identifier_params) identifier_params )attribute (string_'outs') string_'outs' )subscript )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_outs) identifier_outs )return_statement )block )function_definition )module
Returns list of output files from this rule, relative to buildroot. In this case it's simple (for now) - the output files are enumerated in the rule definition.
(module (function_definition (function_name_check_complicance) function_name_check_complicance (parameters (identifier_self) identifier_self )parameters (block (if_statement (parenthesized_expression (boolean_operator (boolean_operator (boolean_operator (boolean_operator (boolean_operator (call (identifier_any) identifier_any (argument_list (list_comprehension (identifier_ma) identifier_ma (for_in_clause (identifier_ma) identifier_ma (call (identifier_vars) identifier_vars (argument_list (identifier_self) identifier_self )argument_list )call )for_in_clause (if_clause (boolean_operator (call (attribute (identifier_ma) identifier_ma (identifier_startswith) identifier_startswith )attribute (argument_list (string_'media_') string_'media_' )argument_list )call (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_ma) identifier_ma )argument_list )call )boolean_operator )if_clause )list_comprehension )argument_list )call (not_operator (attribute (identifier_self) identifier_self (identifier_media_group) identifier_media_group )attribute )not_operator )boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier_media_content) identifier_media_content )attribute )not_operator )boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier_media_player) identifier_media_player )attribute )not_operator )boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier_media_peerLink) identifier_media_peerLink )attribute )not_operator )boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier_media_location) identifier_media_location )attribute )not_operator )boolean_operator )parenthesized_expression (block (raise_statement (call (identifier_AttributeError) identifier_AttributeError (argument_list (concatenated_string (string_"Using media elements requires the specification of at least ") string_"Using media elements requires the specification of at least " (string_"one of the following elements: 'media_group', ") string_"one of the following elements: 'media_group', " (string_"'media_content', 'media_player', 'media_peerLink' or ") string_"'media_content', 'media_player', 'media_peerLink' or " (string_"'media_location'.") string_"'media_location'." )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_media_player) identifier_media_player )attribute )not_operator (block (if_statement (attribute (identifier_self) identifier_self (identifier_media_content) identifier_media_content )attribute (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_media_content) identifier_media_content )attribute (identifier_list) identifier_list )argument_list )call (block (if_statement (not_operator (call (identifier_all) identifier_all (argument_list (list_comprehension (False) False (for_in_clause (identifier_mc) identifier_mc (attribute (identifier_self) identifier_self (identifier_media_content) identifier_media_content )attribute )for_in_clause (if_clause (comparison_operator (string_'url') string_'url' (attribute (identifier_mc) identifier_mc (identifier_element_attrs) identifier_element_attrs )attribute )comparison_operator )if_clause )list_comprehension )argument_list )call )not_operator (block (raise_statement (call (identifier_AttributeError) identifier_AttributeError (argument_list (concatenated_string (string_"MediaRSSItems require a media_player attribute ") string_"MediaRSSItems require a media_player attribute " (string_"if a media_content has no url set.") string_"if a media_content has no url set." )concatenated_string )argument_list )call )raise_statement )block )if_statement )block (else_clause (block (if_statement (not_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_media_content) identifier_media_content )attribute (identifier_element_attrs) identifier_element_attrs )attribute (string_'url') string_'url' )subscript )not_operator (block (raise_statement (call (identifier_AttributeError) identifier_AttributeError (argument_list (concatenated_string (string_"MediaRSSItems require a media_player attribute ") string_"MediaRSSItems require a media_player attribute " (string_"if a media_content has no url set.") string_"if a media_content has no url set." )concatenated_string )argument_list )call )raise_statement )block )if_statement )block )else_clause )if_statement (pass_statement )pass_statement )block (elif_clause (attribute (identifier_self) identifier_self (identifier_media_group) identifier_media_group )attribute (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (string_"MediaRSSItem: media_group check not implemented yet.") string_"MediaRSSItem: media_group check not implemented yet." )argument_list )call )raise_statement )block )elif_clause )if_statement )block )if_statement )block )function_definition )module
Check compliance with Media RSS Specification, Version 1.5.1. see http://www.rssboard.org/media-rss Raises AttributeError on error.
(module (function_definition (function_name_user_remove) function_name_user_remove (parameters (identifier_user) identifier_user (default_parameter (identifier_host) identifier_host (string_'localhost') string_'localhost' )default_parameter (dictionary_splat_pattern (identifier_connection_args) identifier_connection_args )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_dbc) identifier_dbc (call (identifier__connect) identifier__connect (argument_list (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_dbc) identifier_dbc (None) None )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_cur) identifier_cur (call (attribute (identifier_dbc) identifier_dbc (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_qry) identifier_qry (string_'DROP USER %(user)s@%(host)s') string_'DROP USER %(user)s@%(host)s' )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'user') string_'user' )subscript (identifier_user) identifier_user )assignment )expression_statement (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'host') string_'host' )subscript (identifier_host) identifier_host )assignment )expression_statement (try_statement (block (expression_statement (call (identifier__execute) identifier__execute (argument_list (identifier_cur) identifier_cur (identifier_qry) identifier_qry (identifier_args) identifier_args )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_MySQLdb) identifier_MySQLdb (identifier_OperationalError) identifier_OperationalError )attribute (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_err) identifier_err (call (attribute (string_'MySQL Error {0}: {1}') string_'MySQL Error {0}: {1}' (identifier_format) identifier_format )attribute (argument_list (list_splat (attribute (identifier_exc) identifier_exc (identifier_args) identifier_args )attribute )list_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier___context__) identifier___context__ (string_'mysql.error') string_'mysql.error' )subscript (identifier_err) identifier_err )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (identifier_err) identifier_err )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )except_clause )try_statement (if_statement (not_operator (call (identifier_user_exists) identifier_user_exists (argument_list (identifier_user) identifier_user (identifier_host) identifier_host (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'User \'%s\'@\'%s\' has been removed') string_'User \'%s\'@\'%s\' has been removed' (identifier_user) identifier_user (identifier_host) identifier_host )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'User \'%s\'@\'%s\' has NOT been removed') string_'User \'%s\'@\'%s\' has NOT been removed' (identifier_user) identifier_user (identifier_host) identifier_host )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )function_definition )module
Delete MySQL user CLI Example: .. code-block:: bash salt '*' mysql.user_remove frank localhost
(module (function_definition (function_name_time_to_seconds) function_name_time_to_seconds (parameters (identifier_x) identifier_x )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_time) identifier_time )argument_list )call (block (return_statement (binary_operator (parenthesized_expression (binary_operator (binary_operator (parenthesized_expression (binary_operator (binary_operator (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (attribute (identifier_x) identifier_x (identifier_hour) identifier_hour )attribute (integer_60) integer_60 )binary_operator )parenthesized_expression (attribute (identifier_x) identifier_x (identifier_minute) identifier_minute )attribute )binary_operator )parenthesized_expression (integer_60) integer_60 )binary_operator (attribute (identifier_x) identifier_x (identifier_second) identifier_second )attribute )binary_operator )parenthesized_expression (binary_operator (integer_10) integer_10 (integer_6) integer_6 )binary_operator )binary_operator (attribute (identifier_x) identifier_x (identifier_microsecond) identifier_microsecond )attribute )binary_operator )parenthesized_expression (binary_operator (integer_10) integer_10 (integer_6) integer_6 )binary_operator )binary_operator )return_statement )block )if_statement (if_statement (call (identifier_is_str) identifier_is_str (argument_list (identifier_x) identifier_x )argument_list )call (block (return_statement (identifier_x) identifier_x )return_statement )block )if_statement (return_statement (boolean_operator (identifier_x) identifier_x (call (identifier_max) identifier_max (argument_list (integer_0) integer_0 (call (identifier_min) identifier_min (argument_list (identifier_x) identifier_x (binary_operator (binary_operator (integer_24) integer_24 (integer_3600) integer_3600 )binary_operator (binary_operator (integer_10) integer_10 (unary_operator (integer_6) integer_6 )unary_operator )binary_operator )binary_operator )argument_list )call )argument_list )call )boolean_operator )return_statement )block )function_definition )module
Convert a time in a seconds sum
(module (function_definition (function_name_process_prefix) function_name_process_prefix (parameters (identifier_self) identifier_self (typed_parameter (identifier_prefix) identifier_prefix (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_Namespace) identifier_Namespace )type (type (None) None )type )type_parameter )generic_type )type (block (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_namespaces) identifier_namespaces )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_prefix) identifier_prefix )argument_list )call (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_namespaces) identifier_namespaces )attribute (identifier_prefix) identifier_prefix )subscript )return_statement )block )if_statement (expression_statement (assignment (identifier_iri) identifier_iri (type (identifier_str) identifier_str )type (call (attribute (identifier_common_namespaces) identifier_common_namespaces (identifier_get) identifier_get )attribute (argument_list (identifier_prefix) identifier_prefix )argument_list )call )assignment )expression_statement (if_statement (identifier_iri) identifier_iri (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_add_namespace) identifier_add_namespace )attribute (argument_list (identifier_prefix) identifier_prefix (identifier_iri) identifier_iri )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Add namespace to graph if it has a local match This allows qnames to be used without adding their respected namespaces if they are in the common_namespaces local dict. This is is to save a butt-ton of time trying to see what the ontology has as far as uris go. Args: prefix: prefix of the uri in the rdflib namespace to be checked if it exists in the local dict of common_namespaces. Returns: Namespace of uri if add or already exists; else None
(module (function_definition (function_name_done) function_name_done (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (attribute (identifier_scoop) identifier_scoop (identifier__control) identifier__control )attribute (identifier_execQueue) identifier_execQueue )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (attribute (identifier_scoop) identifier_scoop (identifier__control) identifier__control )attribute (identifier_execQueue) identifier_execQueue )attribute (identifier_socket) identifier_socket )attribute (identifier_sendFuture) identifier_sendFuture )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_ValueError) identifier_ValueError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (call (attribute (attribute (attribute (identifier_scoop) identifier_scoop (identifier__control) identifier__control )attribute (identifier_execQueue) identifier_execQueue )attribute (identifier_updateQueue) identifier_updateQueue )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__ended) identifier__ended )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Returns True if the call was successfully cancelled or finished running, False otherwise. This function updates the executionQueue so it receives all the awaiting message.
(module (function_definition (function_name_add_personalization) function_name_add_personalization (parameters (identifier_self) identifier_self (identifier_personalization) identifier_personalization (default_parameter (identifier_index) identifier_index (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__personalizations) identifier__personalizations )attribute (call (attribute (identifier_self) identifier_self (identifier__ensure_append) identifier__ensure_append )attribute (argument_list (identifier_personalization) identifier_personalization (attribute (identifier_self) identifier_self (identifier__personalizations) identifier__personalizations )attribute (identifier_index) identifier_index )argument_list )call )assignment )expression_statement )block )function_definition )module
Add a Personaliztion object :param personalizations: Add a Personalization object :type personalizations: Personalization :param index: The index where to add the Personalization :type index: int
(module (function_definition (function_name_generate_report) function_name_generate_report (parameters (identifier_book_url) identifier_book_url )parameters (block (expression_statement (assignment (identifier_shares_no) identifier_shares_no (None) None )assignment )expression_statement (expression_statement (assignment (identifier_avg_price) identifier_avg_price (None) None )assignment )expression_statement (expression_statement (assignment (identifier_stock_template) identifier_stock_template (call (attribute (identifier_templates) identifier_templates (identifier_load_jinja_template) identifier_load_jinja_template )attribute (argument_list (string_"stock_template.html") string_"stock_template.html" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_stock_rows) identifier_stock_rows (string_"") string_"" )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_piecash) identifier_piecash (identifier_open_book) identifier_open_book )attribute (argument_list (identifier_book_url) identifier_book_url (keyword_argument (identifier_readonly) identifier_readonly (True) True )keyword_argument (keyword_argument (identifier_open_if_lock) identifier_open_if_lock (True) True )keyword_argument )argument_list )call (as_pattern_target (identifier_book) identifier_book )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_all_stocks) identifier_all_stocks (call (attribute (identifier_portfoliovalue) identifier_portfoliovalue (identifier_get_all_stocks) identifier_get_all_stocks )attribute (argument_list (identifier_book) identifier_book )argument_list )call )assignment )expression_statement (for_statement (identifier_stock) identifier_stock (identifier_all_stocks) identifier_all_stocks (block (expression_statement (assignment (identifier_for_date) identifier_for_date (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_today) identifier_today )attribute (argument_list )argument_list )call (identifier_date) identifier_date )attribute )assignment )expression_statement (expression_statement (assignment (identifier_model) identifier_model (call (attribute (identifier_portfoliovalue) identifier_portfoliovalue (identifier_get_stock_model_from) identifier_get_stock_model_from )attribute (argument_list (identifier_book) identifier_book (identifier_stock) identifier_stock (identifier_for_date) identifier_for_date )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_stock_rows) identifier_stock_rows (call (attribute (identifier_stock_template) identifier_stock_template (identifier_render) identifier_render )attribute (argument_list (identifier_model) identifier_model )argument_list )call )augmented_assignment )expression_statement )block )for_statement )block )with_statement (expression_statement (assignment (identifier_template) identifier_template (call (attribute (identifier_templates) identifier_templates (identifier_load_jinja_template) identifier_load_jinja_template )attribute (argument_list (string_"template.html") string_"template.html" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_template) identifier_template (identifier_render) identifier_render )attribute (argument_list (dictionary_splat (call (identifier_locals) identifier_locals (argument_list )argument_list )call )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Generates an HTML report content.
(module (function_definition (function_name__all) function_name__all (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'software') string_'software' )subscript (call (attribute (identifier_self) identifier_self (identifier__software) identifier__software )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'system') string_'system' )subscript (call (attribute (identifier_self) identifier_self (identifier__system) identifier__system )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'services') string_'services' )subscript (call (attribute (identifier_self) identifier_self (identifier__services) identifier__services )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'configuration') string_'configuration' )subscript (call (attribute (identifier_self) identifier_self (identifier__configuration) identifier__configuration )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_InspectorQueryException) identifier_InspectorQueryException (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'configuration') string_'configuration' )subscript (string_'N/A') string_'N/A' )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (identifier_ex) identifier_ex )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'payload') string_'payload' )subscript (boolean_operator (call (attribute (identifier_self) identifier_self (identifier__payload) identifier__payload )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (string_'N/A') string_'N/A' )boolean_operator )assignment )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Return all the summary of the particular system.
(module (function_definition (function_name_build_from_yamlstr) function_name_build_from_yamlstr (parameters (identifier_cls) identifier_cls (identifier_yamlstr) identifier_yamlstr )parameters (block (expression_statement (assignment (identifier_top_dict) identifier_top_dict (call (attribute (identifier_yaml) identifier_yaml (identifier_safe_load) identifier_safe_load )attribute (argument_list (identifier_yamlstr) identifier_yamlstr )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_coordsys) identifier_coordsys (call (attribute (identifier_top_dict) identifier_top_dict (identifier_pop) identifier_pop )attribute (argument_list (string_'coordsys') string_'coordsys' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output_list) identifier_output_list (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_e_key) identifier_e_key (identifier_e_dict) identifier_e_dict )pattern_list (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_top_dict) identifier_top_dict (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call (block (if_statement (comparison_operator (identifier_e_key) identifier_e_key (string_'coordsys') string_'coordsys' )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_e_dict) identifier_e_dict (subscript (identifier_top_dict) identifier_top_dict (identifier_e_key) identifier_e_key )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_e_dict) identifier_e_dict (string_'coordsys') string_'coordsys' )subscript (identifier_coordsys) identifier_coordsys )assignment )expression_statement (expression_statement (augmented_assignment (identifier_output_list) identifier_output_list (call (attribute (identifier_cls) identifier_cls (identifier_build_from_energy_dict) identifier_build_from_energy_dict )attribute (argument_list (identifier_e_key) identifier_e_key (identifier_e_dict) identifier_e_dict )argument_list )call )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_output_list) identifier_output_list )return_statement )block )function_definition )module
Build a list of components from a yaml string
(module (function_definition (function_name_beam_splitter) function_name_beam_splitter (parameters (identifier_ax) identifier_ax (identifier_p0) identifier_p0 (default_parameter (identifier_size) identifier_size (float_2.54) float_2.54 )default_parameter (default_parameter (identifier_alpha) identifier_alpha (integer_0) integer_0 )default_parameter (default_parameter (identifier_format) identifier_format (None) None )default_parameter (dictionary_splat_pattern (identifier_kwds) identifier_kwds )dictionary_splat_pattern )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (comparison_operator (identifier_format) identifier_format (None) None )comparison_operator (block (expression_statement (assignment (identifier_format) identifier_format (string_'k-') string_'k-' )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_a) identifier_a (binary_operator (identifier_size) identifier_size (integer_2) integer_2 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_x0) identifier_x0 (list (identifier_a) identifier_a (unary_operator (identifier_a) identifier_a )unary_operator (unary_operator (identifier_a) identifier_a )unary_operator (identifier_a) identifier_a (identifier_a) identifier_a (unary_operator (identifier_a) identifier_a )unary_operator )list )assignment )expression_statement (expression_statement (assignment (identifier_y0) identifier_y0 (list (identifier_a) identifier_a (identifier_a) identifier_a (unary_operator (identifier_a) identifier_a )unary_operator (unary_operator (identifier_a) identifier_a )unary_operator (identifier_a) identifier_a (unary_operator (identifier_a) identifier_a )unary_operator )list )assignment )expression_statement (expression_statement (assignment (identifier_cur_list) identifier_cur_list (list (tuple (identifier_x0) identifier_x0 (identifier_y0) identifier_y0 )tuple )list )assignment )expression_statement (expression_statement (assignment (identifier_cur_list) identifier_cur_list (call (identifier_rotate_and_traslate) identifier_rotate_and_traslate (argument_list (identifier_cur_list) identifier_cur_list (identifier_alpha) identifier_alpha (identifier_p0) identifier_p0 )argument_list )call )assignment )expression_statement (for_statement (identifier_curi) identifier_curi (identifier_cur_list) identifier_cur_list (block (expression_statement (call (attribute (identifier_ax) identifier_ax (identifier_plot) identifier_plot )attribute (argument_list (subscript (identifier_curi) identifier_curi (integer_0) integer_0 )subscript (subscript (identifier_curi) identifier_curi (integer_1) integer_1 )subscript (identifier_format) identifier_format (dictionary_splat (identifier_kwds) identifier_kwds )dictionary_splat )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
r"""Draw a beam splitter.
(module (function_definition (function_name_time_stats) function_name_time_stats (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (string_'time_stats') string_'time_stats' (attribute (identifier_self) identifier_self (identifier_attributes) identifier_attributes )attribute )comparison_operator (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_attributes) identifier_attributes )attribute (string_'time_stats') string_'time_stats' )subscript )return_statement )block )if_statement (expression_statement (assignment (identifier_path) identifier_path (binary_operator (string_'%s/%s/time_stats') string_'%s/%s/time_stats' (tuple (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_path) identifier_path )attribute (call (attribute (identifier_self) identifier_self (identifier_get_id) identifier_get_id )attribute (argument_list )argument_list )call )tuple )binary_operator )assignment )expression_statement (return_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_gitlab) identifier_gitlab )attribute (identifier_http_get) identifier_http_get )attribute (argument_list (identifier_path) identifier_path (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Get time stats for the object. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabTimeTrackingError: If the time tracking update cannot be done
(module (function_definition (function_name_to_dict) function_name_to_dict (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_d) identifier_d (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_d) identifier_d (string_'start') string_'start' )subscript (call (identifier_date_to_str) identifier_date_to_str (argument_list (attribute (identifier_self) identifier_self (identifier_start) identifier_start )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_d) identifier_d (string_'end') string_'end' )subscript (call (identifier_date_to_str) identifier_date_to_str (argument_list (attribute (identifier_self) identifier_self (identifier_end) identifier_end )attribute )argument_list )call )assignment )expression_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Transform the date-range to a dict.
(module (function_definition (function_name_from_file) function_name_from_file (parameters (identifier_cls) identifier_cls (identifier_fp) identifier_fp (default_parameter (identifier_is_outlook) identifier_is_outlook (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Parsing email from file {!r}") string_"Parsing email from file {!r}" (identifier_format) identifier_format )attribute (argument_list (identifier_fp) identifier_fp )argument_list )call )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_ported_open) identifier_ported_open (argument_list (identifier_fp) identifier_fp )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_email) identifier_email (identifier_message_from_file) identifier_message_from_file )attribute (argument_list (identifier_f) identifier_f )argument_list )call )assignment )expression_statement )block )with_statement (if_statement (identifier_is_outlook) identifier_is_outlook (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Removing temp converted Outlook email {!r}") string_"Removing temp converted Outlook email {!r}" (identifier_format) identifier_format )attribute (argument_list (identifier_fp) identifier_fp )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_fp) identifier_fp )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_message) identifier_message )argument_list )call )return_statement )block )function_definition )module
Init a new object from a file path. Args: fp (string): file path of raw email is_outlook (boolean): if True is an Outlook email Returns: Instance of MailParser
(module (function_definition (function_name_query) function_name_query (parameters (identifier_self) identifier_self (identifier_query) identifier_query (default_parameter (identifier_max_results) identifier_max_results (None) None )default_parameter (default_parameter (identifier_timeout) identifier_timeout (integer_0) integer_0 )default_parameter (default_parameter (identifier_dry_run) identifier_dry_run (False) False )default_parameter (default_parameter (identifier_use_legacy_sql) identifier_use_legacy_sql (None) None )default_parameter (default_parameter (identifier_external_udf_uris) identifier_external_udf_uris (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_'Executing query: %s') string_'Executing query: %s' (identifier_query) identifier_query )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_query_data) identifier_query_data (dictionary (pair (string_'query') string_'query' (identifier_query) identifier_query )pair (pair (string_'timeoutMs') string_'timeoutMs' (binary_operator (identifier_timeout) identifier_timeout (integer_1000) integer_1000 )binary_operator )pair (pair (string_'dryRun') string_'dryRun' (identifier_dry_run) identifier_dry_run )pair (pair (string_'maxResults') string_'maxResults' (identifier_max_results) identifier_max_results )pair )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_use_legacy_sql) identifier_use_legacy_sql (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_query_data) identifier_query_data (string_'useLegacySql') string_'useLegacySql' )subscript (identifier_use_legacy_sql) identifier_use_legacy_sql )assignment )expression_statement )block )if_statement (if_statement (identifier_external_udf_uris) identifier_external_udf_uris (block (expression_statement (assignment (subscript (identifier_query_data) identifier_query_data (string_'userDefinedFunctionResources') string_'userDefinedFunctionResources' )subscript (line_continuation_\) line_continuation_\ (list_comprehension (dictionary (pair (string_'resourceUri') string_'resourceUri' (identifier_u) identifier_u )pair )dictionary (for_in_clause (identifier_u) identifier_u (identifier_external_udf_uris) identifier_external_udf_uris )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__submit_query_job) identifier__submit_query_job )attribute (argument_list (identifier_query_data) identifier_query_data )argument_list )call )return_statement )block )function_definition )module
Submit a query to BigQuery. Parameters ---------- query : str BigQuery query string max_results : int, optional The maximum number of rows to return per page of results. timeout : float, optional How long to wait for the query to complete, in seconds before the request times out and returns. dry_run : bool, optional If True, the query isn't actually run. A valid query will return an empty response, while an invalid one will return the same error message it would if it wasn't a dry run. use_legacy_sql : bool, optional. Default True. If False, the query will use BigQuery's standard SQL (https://cloud.google.com/bigquery/sql-reference/) external_udf_uris : list, optional Contains external UDF URIs. If given, URIs must be Google Cloud Storage and have .js extensions. Returns ------- tuple (job id, query results) if the query completed. If dry_run is True, job id will be None and results will be empty if the query is valid or a ``dict`` containing the response if invalid. Raises ------ BigQueryTimeoutException on timeout
(module (function_definition (function_name_from_xml) function_name_from_xml (parameters (identifier_self) identifier_self (identifier_doc) identifier_doc )parameters (block (import_statement (dotted_name (identifier_xml) identifier_xml (identifier_sax) identifier_sax )dotted_name )import_statement (expression_statement (assignment (identifier_handler) identifier_handler (call (identifier_DomainDumpParser) identifier_DomainDumpParser (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_xml) identifier_xml (identifier_sax) identifier_sax )attribute (identifier_parse) identifier_parse )attribute (argument_list (identifier_doc) identifier_doc (identifier_handler) identifier_handler )argument_list )call )expression_statement (return_statement (identifier_handler) identifier_handler )return_statement )block )function_definition )module
Load this domain based on an XML document
(module (function_definition (function_name_download) function_name_download (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_page) identifier_page )attribute (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_tree) identifier_tree )attribute (call (attribute (identifier_html) identifier_html (identifier_fromstring) identifier_fromstring )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_page) identifier_page )attribute (identifier_text) identifier_text )attribute )argument_list )call )assignment )expression_statement )block )function_definition )module
Downloads HTML from url.
(module (function_definition (function_name_notimplemented) function_name_notimplemented (parameters (identifier_func) identifier_func )parameters (block (function_definition (function_name_newfunc) function_name_newfunc (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_co) identifier_co (attribute (identifier_func) identifier_func (identifier_func_code) identifier_func_code )attribute )assignment )expression_statement (expression_statement (assignment (identifier_attrs) identifier_attrs (tuple (attribute (identifier_co) identifier_co (identifier_co_name) identifier_co_name )attribute (attribute (identifier_co) identifier_co (identifier_co_filename) identifier_co_filename )attribute (attribute (identifier_co) identifier_co (identifier_co_firstlineno) identifier_co_firstlineno )attribute )tuple )assignment )expression_statement (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (binary_operator (string_"function %s at %s:%d is not implemented") string_"function %s at %s:%d is not implemented" (identifier_attrs) identifier_attrs )binary_operator )argument_list )call )raise_statement )block )function_definition (return_statement (call (identifier_update_func_meta) identifier_update_func_meta (argument_list (identifier_newfunc) identifier_newfunc (identifier_func) identifier_func )argument_list )call )return_statement )block )function_definition )module
Raises a NotImplementedError if the function is called.
(module (function_definition (function_name__read_routes_c_v1) function_name__read_routes_c_v1 (parameters )parameters (block (function_definition (function_name__extract_ip) function_name__extract_ip (parameters (identifier_obj) identifier_obj )parameters (block (return_statement (call (identifier_inet_ntop) identifier_inet_ntop (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_INET) identifier_AF_INET )attribute (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_"<I") string_"<I" (identifier_obj) identifier_obj )argument_list )call )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (identifier_routes) identifier_routes (list )list )assignment )expression_statement (for_statement (identifier_route) identifier_route (call (identifier_GetIpForwardTable) identifier_GetIpForwardTable (argument_list )argument_list )call (block (expression_statement (assignment (identifier_ifIndex) identifier_ifIndex (subscript (identifier_route) identifier_route (string_'ForwardIfIndex') string_'ForwardIfIndex' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_dest) identifier_dest (subscript (identifier_route) identifier_route (string_'ForwardDest') string_'ForwardDest' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_netmask) identifier_netmask (subscript (identifier_route) identifier_route (string_'ForwardMask') string_'ForwardMask' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_nexthop) identifier_nexthop (call (identifier__extract_ip) identifier__extract_ip (argument_list (subscript (identifier_route) identifier_route (string_'ForwardNextHop') string_'ForwardNextHop' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_metric) identifier_metric (subscript (identifier_route) identifier_route (string_'ForwardMetric1') string_'ForwardMetric1' )subscript )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_iface) identifier_iface (call (identifier_dev_from_index) identifier_dev_from_index (argument_list (identifier_ifIndex) identifier_ifIndex )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_iface) identifier_iface (identifier_ip) identifier_ip )attribute (string_"0.0.0.0") string_"0.0.0.0" )comparison_operator (block (continue_statement )continue_statement )block )if_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (continue_statement )continue_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_ip) identifier_ip (attribute (identifier_iface) identifier_iface (identifier_ip) identifier_ip )attribute )assignment )expression_statement (expression_statement (assignment (identifier_metric) identifier_metric (binary_operator (identifier_metric) identifier_metric (attribute (identifier_iface) identifier_iface (identifier_ipv4_metric) identifier_ipv4_metric )attribute )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_routes) identifier_routes (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_dest) identifier_dest (identifier_netmask) identifier_netmask (identifier_nexthop) identifier_nexthop (identifier_iface) identifier_iface (identifier_ip) identifier_ip (identifier_metric) identifier_metric )tuple )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_routes) identifier_routes )return_statement )block )function_definition )module
Retrieve Windows routes through a GetIpForwardTable call. This is compatible with XP but won't get IPv6 routes.
(module (function_definition (function_name_zincr) function_name_zincr (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_key) identifier_key (default_parameter (identifier_amount) identifier_amount (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_amount) identifier_amount (call (identifier_get_integer) identifier_get_integer (argument_list (string_'amount') string_'amount' (identifier_amount) identifier_amount )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_execute_command) identifier_execute_command )attribute (argument_list (string_'zincr') string_'zincr' (identifier_name) identifier_name (identifier_key) identifier_key (identifier_amount) identifier_amount )argument_list )call )return_statement )block )function_definition )module
Increase the score of ``key`` in zset ``name`` by ``amount``. If no key exists, the value will be initialized as ``amount`` Like **Redis.ZINCR** :param string name: the zset name :param string key: the key name :param int amount: increments :return: the integer value of ``key`` in zset ``name`` :rtype: int >>> ssdb.zincr('zset_2', 'key1', 7) 49 >>> ssdb.zincr('zset_2', 'key2', 3) 317 >>> ssdb.zincr('zset_2', 'key_not_exists', 101) 101 >>> ssdb.zincr('zset_not_exists', 'key_not_exists', 8848) 8848
(module (function_definition (function_name_get_table) function_name_get_table (parameters (identifier_self) identifier_self (default_parameter (identifier_name) identifier_name (string_'Meta') string_'Meta' )default_parameter (default_parameter (identifier_h5loc) identifier_h5loc (string_'/meta') string_'/meta' )default_parameter )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_defaultdict) identifier_defaultdict (argument_list (identifier_list) identifier_list )argument_list )call )assignment )expression_statement (for_statement (identifier_entry) identifier_entry (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (block (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_entry) identifier_entry (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (subscript (identifier_data) identifier_data (identifier_key) identifier_key )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement )block )for_statement (expression_statement (assignment (identifier_dtypes) identifier_dtypes (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_values) identifier_values )pattern_list (call (attribute (identifier_data) identifier_data (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_max_len) identifier_max_len (call (identifier_max) identifier_max (argument_list (call (identifier_map) identifier_map (argument_list (identifier_len) identifier_len (identifier_values) identifier_values )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dtype) identifier_dtype (call (attribute (string_'S{}') string_'S{}' (identifier_format) identifier_format )attribute (argument_list (identifier_max_len) identifier_max_len )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_dtypes) identifier_dtypes (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_key) identifier_key (identifier_dtype) identifier_dtype )tuple )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_tab) identifier_tab (call (identifier_Table) identifier_Table (argument_list (identifier_data) identifier_data (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtypes) identifier_dtypes )keyword_argument (keyword_argument (identifier_h5loc) identifier_h5loc (identifier_h5loc) identifier_h5loc )keyword_argument (keyword_argument (identifier_name) identifier_name (string_'Meta') string_'Meta' )keyword_argument (keyword_argument (identifier_h5singleton) identifier_h5singleton (True) True )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_tab) identifier_tab )return_statement )block )function_definition )module
Convert metadata to a KM3Pipe Table. Returns `None` if there is no data. Each column's dtype will be set to a fixed size string (numpy.string_) with the length of the longest entry, since writing variable length strings does not fit the current scheme.
(module (function_definition (function_name_create_snmp_manager) function_name_create_snmp_manager (parameters (identifier_self) identifier_self (identifier_manager) identifier_manager (identifier_host) identifier_host (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_"host") string_"host" (identifier_host) identifier_host )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_update) identifier_update )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (argument_list (string_"POST") string_"POST" (call (attribute (string_"snmp/{0}") string_"snmp/{0}" (identifier_format) identifier_format )attribute (argument_list (identifier_manager) identifier_manager )argument_list )call (identifier_data) identifier_data )argument_list )call )return_statement )block )function_definition )module
Create an SNMP manager. :param manager: Name of manager to be created. :type manager: str :param host: IP address or DNS name of SNMP server to be used. :type host: str :param \*\*kwargs: See the REST API Guide on your array for the documentation on the request: **POST snmp/:manager** :type \*\*kwargs: optional :returns: A dictionary describing the created SNMP manager. :rtype: ResponseDict
(module (function_definition (function_name_GetGroups) function_name_GetGroups (parameters (identifier_r) identifier_r (default_parameter (identifier_bulk) identifier_bulk (False) False )default_parameter )parameters (block (if_statement (identifier_bulk) identifier_bulk (block (return_statement (call (attribute (identifier_r) identifier_r (identifier_request) identifier_request )attribute (argument_list (string_"get") string_"get" (string_"/2/groups") string_"/2/groups" (keyword_argument (identifier_query) identifier_query (dictionary (pair (string_"bulk") string_"bulk" (integer_1) integer_1 )pair )dictionary )keyword_argument )argument_list )call )return_statement )block (else_clause (block (expression_statement (assignment (identifier_groups) identifier_groups (call (attribute (identifier_r) identifier_r (identifier_request) identifier_request )attribute (argument_list (string_"get") string_"get" (string_"/2/groups") string_"/2/groups" )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_r) identifier_r (identifier_applier) identifier_applier )attribute (argument_list (call (identifier_itemgetters) identifier_itemgetters (argument_list (string_"name") string_"name" )argument_list )call (identifier_groups) identifier_groups )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Gets all node groups in the cluster. @type bulk: bool @param bulk: whether to return all information about the groups @rtype: list of dict or str @return: if bulk is true, a list of dictionaries with info about all node groups in the cluster, else a list of names of those node groups
(module (function_definition (function_name_fetch_identifier_component) function_name_fetch_identifier_component (parameters (identifier_self) identifier_self (identifier_endpoint_name) identifier_endpoint_name (identifier_identifier_data) identifier_identifier_data (default_parameter (identifier_query_params) identifier_query_params (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_query_params) identifier_query_params (None) None )comparison_operator (block (expression_statement (assignment (identifier_query_params) identifier_query_params (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_identifier_input) identifier_identifier_input (call (attribute (identifier_self) identifier_self (identifier_get_identifier_input) identifier_get_identifier_input )attribute (argument_list (identifier_identifier_data) identifier_identifier_data )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__api_client) identifier__api_client )attribute (identifier_fetch) identifier_fetch )attribute (argument_list (identifier_endpoint_name) identifier_endpoint_name (identifier_identifier_input) identifier_identifier_input (identifier_query_params) identifier_query_params )argument_list )call )return_statement )block )function_definition )module
Common method for handling parameters before passing to api_client
(module (function_definition (function_name_timethis) function_name_timethis (parameters (identifier_func) identifier_func )parameters (block (expression_statement (assignment (pattern_list (identifier_func_module) identifier_func_module (identifier_func_name) identifier_func_name )pattern_list (expression_list (attribute (identifier_func) identifier_func (identifier___module__) identifier___module__ )attribute (attribute (identifier_func) identifier_func (identifier___name__) identifier___name__ )attribute )expression_list )assignment )expression_statement (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_start) identifier_start (call (identifier__time_perf_counter) identifier__time_perf_counter (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (identifier_func) identifier_func (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_end) identifier_end (call (identifier__time_perf_counter) identifier__time_perf_counter (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'timethis : <{}.{}> : {}') string_'timethis : <{}.{}> : {}' (identifier_format) identifier_format )attribute (argument_list (identifier_func_module) identifier_func_module (identifier_func_name) identifier_func_name (binary_operator (identifier_end) identifier_end (identifier_start) identifier_start )binary_operator )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_r) identifier_r )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
A wrapper use for timeit.
(module (function_definition (function_name_find_needed_formatter) function_name_find_needed_formatter (parameters (identifier_input_format) identifier_input_format (identifier_output_format) identifier_output_format )parameters (block (expression_statement (assignment (identifier_selected_registry) identifier_selected_registry (list_comprehension (attribute (identifier_re) identifier_re (identifier_cls) identifier_cls )attribute (for_in_clause (identifier_re) identifier_re (identifier_registry) identifier_registry )for_in_clause (if_clause (comparison_operator (attribute (identifier_re) identifier_re (identifier_category) identifier_category )attribute (attribute (identifier_RegistryCategories) identifier_RegistryCategories (identifier_formatters) identifier_formatters )attribute )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_needed_formatters) identifier_needed_formatters (list )list )assignment )expression_statement (for_statement (identifier_formatter) identifier_formatter (identifier_selected_registry) identifier_selected_registry (block (expression_statement (assignment (identifier_formatter_inst) identifier_formatter_inst (call (identifier_formatter) identifier_formatter (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_input_format) identifier_input_format (attribute (identifier_formatter_inst) identifier_formatter_inst (identifier_input_formats) identifier_input_formats )attribute )comparison_operator (comparison_operator (identifier_output_format) identifier_output_format (attribute (identifier_formatter_inst) identifier_formatter_inst (identifier_output_formats) identifier_output_formats )attribute )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_needed_formatters) identifier_needed_formatters (identifier_append) identifier_append )attribute (argument_list (identifier_formatter) identifier_formatter )argument_list )call )expression_statement )block )if_statement )block )for_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_needed_formatters) identifier_needed_formatters )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (subscript (identifier_needed_formatters) identifier_needed_formatters (integer_0) integer_0 )subscript )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Find a data formatter given an input and output format input_format - needed input format. see utils.input.dataformats output_format - needed output format. see utils.input.dataformats
(module (function_definition (function_name_check_with_pep8) function_name_check_with_pep8 (parameters (identifier_source_code) identifier_source_code (default_parameter (identifier_filename) identifier_filename (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_args) identifier_args (call (identifier_get_checker_executable) identifier_get_checker_executable (argument_list (string_'pycodestyle') string_'pycodestyle' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (call (identifier_check) identifier_check (argument_list (identifier_args) identifier_args (identifier_source_code) identifier_source_code (keyword_argument (identifier_filename) identifier_filename (identifier_filename) identifier_filename )keyword_argument (keyword_argument (identifier_options) identifier_options (list (string_'-r') string_'-r' )list )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (if_statement (identifier_DEBUG_EDITOR) identifier_DEBUG_EDITOR (block (expression_statement (call (attribute (identifier_traceback) identifier_traceback (identifier_print_exc) identifier_print_exc )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )except_clause )try_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Check source code with pycodestyle
(module (function_definition (function_name_get_git_root) function_name_get_git_root (parameters (default_parameter (identifier_index) identifier_index (integer_3) integer_3 )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (identifier_get_current_path) identifier_get_current_path (argument_list (keyword_argument (identifier_index) identifier_index (identifier_index) identifier_index )keyword_argument )argument_list )call )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (identifier_git_path) identifier_git_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_path) identifier_path (string_'.git') string_'.git' )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_git_path) identifier_git_path )argument_list )call (block (return_statement (identifier_path) identifier_path )return_statement )block )if_statement (if_statement (comparison_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_path) identifier_path )argument_list )call (identifier_path) identifier_path )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"Cannot find git root") string_"Cannot find git root" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_path) identifier_path (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_path) identifier_path )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement )block )while_statement )block )function_definition )module
Get the path of the git root directory of the caller's file Raises a RuntimeError if a git repository cannot be found
(module (function_definition (function_name_create) function_name_create (parameters (identifier_self) identifier_self (identifier_table_id) identifier_table_id (identifier_schema) identifier_schema )parameters (block (import_from_statement (dotted_name (identifier_google) identifier_google (identifier_cloud) identifier_cloud (identifier_bigquery) identifier_bigquery )dotted_name (dotted_name (identifier_SchemaField) identifier_SchemaField )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_google) identifier_google (identifier_cloud) identifier_cloud (identifier_bigquery) identifier_bigquery )dotted_name (dotted_name (identifier_Table) identifier_Table )dotted_name )import_from_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_exists) identifier_exists )attribute (argument_list (identifier_table_id) identifier_table_id )argument_list )call (block (raise_statement (call (identifier_TableCreationError) identifier_TableCreationError (argument_list (call (attribute (concatenated_string (string_"Table {0} already ") string_"Table {0} already " (string_"exists") string_"exists" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_table_id) identifier_table_id )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (call (identifier__Dataset) identifier__Dataset (argument_list (attribute (identifier_self) identifier_self (identifier_project_id) identifier_project_id )attribute (keyword_argument (identifier_credentials) identifier_credentials (attribute (identifier_self) identifier_self (identifier_credentials) identifier_credentials )attribute )keyword_argument )argument_list )call (identifier_exists) identifier_exists )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_dataset_id) identifier_dataset_id )attribute )argument_list )call )not_operator (block (expression_statement (call (attribute (call (identifier__Dataset) identifier__Dataset (argument_list (attribute (identifier_self) identifier_self (identifier_project_id) identifier_project_id )attribute (keyword_argument (identifier_credentials) identifier_credentials (attribute (identifier_self) identifier_self (identifier_credentials) identifier_credentials )attribute )keyword_argument (keyword_argument (identifier_location) identifier_location (attribute (identifier_self) identifier_self (identifier_location) identifier_location )attribute )keyword_argument )argument_list )call (identifier_create) identifier_create )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_dataset_id) identifier_dataset_id )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_table_ref) identifier_table_ref (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_dataset) identifier_dataset )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_dataset_id) identifier_dataset_id )attribute )argument_list )call (identifier_table) identifier_table )attribute (argument_list (identifier_table_id) identifier_table_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_table) identifier_table (call (identifier_Table) identifier_Table (argument_list (identifier_table_ref) identifier_table_ref )argument_list )call )assignment )expression_statement (for_statement (identifier_field) identifier_field (subscript (identifier_schema) identifier_schema (string_"fields") string_"fields" )subscript (block (if_statement (comparison_operator (string_"mode") string_"mode" (identifier_field) identifier_field )comparison_operator (block (expression_statement (assignment (subscript (identifier_field) identifier_field (string_"mode") string_"mode" )subscript (string_"NULLABLE") string_"NULLABLE" )assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_table) identifier_table (identifier_schema) identifier_schema )attribute (list_comprehension (call (attribute (identifier_SchemaField) identifier_SchemaField (identifier_from_api_repr) identifier_from_api_repr )attribute (argument_list (identifier_field) identifier_field )argument_list )call (for_in_clause (identifier_field) identifier_field (subscript (identifier_schema) identifier_schema (string_"fields") string_"fields" )subscript )for_in_clause )list_comprehension )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_create_table) identifier_create_table )attribute (argument_list (identifier_table) identifier_table )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_self) identifier_self (identifier_http_error) identifier_http_error )attribute (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_process_http_error) identifier_process_http_error )attribute (argument_list (identifier_ex) identifier_ex )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Create a table in Google BigQuery given a table and schema Parameters ---------- table : str Name of table to be written schema : str Use the generate_bq_schema to generate your table schema from a dataframe.
(module (function_definition (function_name_print_details) function_name_print_details (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Title:") string_"Title:" (attribute (identifier_self) identifier_self (identifier_title) identifier_title )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Category:") string_"Category:" (attribute (identifier_self) identifier_self (identifier_category) identifier_category )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Page: ") string_"Page: " (attribute (identifier_self) identifier_self (identifier_page) identifier_page )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Size: ") string_"Size: " (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Files: ") string_"Files: " (attribute (identifier_self) identifier_self (identifier_files) identifier_files )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Age: ") string_"Age: " (attribute (identifier_self) identifier_self (identifier_age) identifier_age )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Seeds:") string_"Seeds:" (attribute (identifier_self) identifier_self (identifier_seeders) identifier_seeders )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Leechers: ") string_"Leechers: " (attribute (identifier_self) identifier_self (identifier_leechers) identifier_leechers )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Magnet: ") string_"Magnet: " (attribute (identifier_self) identifier_self (identifier_magnet) identifier_magnet )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Download: ") string_"Download: " (attribute (identifier_self) identifier_self (identifier_download) identifier_download )attribute )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Verified:") string_"Verified:" (attribute (identifier_self) identifier_self (identifier_isVerified) identifier_isVerified )attribute )argument_list )call )expression_statement )block )function_definition )module
Print torrent details
(module (function_definition (function_name_undo) function_name_undo (parameters (identifier_self) identifier_self (identifier_key_value) identifier_key_value (identifier_modifier_mask) identifier_modifier_mask )parameters (block (for_statement (pattern_list (identifier_key) identifier_key (identifier_tab) identifier_tab )pattern_list (call (attribute (attribute (call (attribute (attribute (identifier_gui_singletons) identifier_gui_singletons (identifier_main_window_controller) identifier_main_window_controller )attribute (identifier_get_controller) identifier_get_controller )attribute (argument_list (string_'states_editor_ctrl') string_'states_editor_ctrl' )argument_list )call (identifier_tabs) identifier_tabs )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (boolean_operator (comparison_operator (call (attribute (subscript (identifier_tab) identifier_tab (string_'controller') string_'controller' )subscript (identifier_get_controller) identifier_get_controller )attribute (argument_list (string_'source_ctrl') string_'source_ctrl' )argument_list )call (None) None )comparison_operator (line_continuation_\) line_continuation_\ (call (identifier_react_to_event) identifier_react_to_event (argument_list (attribute (identifier_self) identifier_self (identifier_view) identifier_view )attribute (attribute (attribute (call (attribute (subscript (identifier_tab) identifier_tab (string_'controller') string_'controller' )subscript (identifier_get_controller) identifier_get_controller )attribute (argument_list (string_'source_ctrl') string_'source_ctrl' )argument_list )call (identifier_view) identifier_view )attribute (identifier_textview) identifier_textview )attribute (tuple (identifier_key_value) identifier_key_value (identifier_modifier_mask) identifier_modifier_mask )tuple )argument_list )call )boolean_operator (line_continuation_\) line_continuation_\ (boolean_operator (comparison_operator (call (attribute (subscript (identifier_tab) identifier_tab (string_'controller') string_'controller' )subscript (identifier_get_controller) identifier_get_controller )attribute (argument_list (string_'description_ctrl') string_'description_ctrl' )argument_list )call (None) None )comparison_operator (line_continuation_\) line_continuation_\ (call (identifier_react_to_event) identifier_react_to_event (argument_list (attribute (identifier_self) identifier_self (identifier_view) identifier_view )attribute (attribute (attribute (call (attribute (subscript (identifier_tab) identifier_tab (string_'controller') string_'controller' )subscript (identifier_get_controller) identifier_get_controller )attribute (argument_list (string_'description_ctrl') string_'description_ctrl' )argument_list )call (identifier_view) identifier_view )attribute (identifier_textview) identifier_textview )attribute (tuple (identifier_key_value) identifier_key_value (identifier_modifier_mask) identifier_modifier_mask )tuple )argument_list )call )boolean_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement )block )for_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__selected_sm_model) identifier__selected_sm_model )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__selected_sm_model) identifier__selected_sm_model )attribute (identifier_history) identifier_history )attribute (identifier_undo) identifier_undo )attribute (argument_list )argument_list )call )expression_statement (return_statement (True) True )return_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Undo is not possible now as long as no state_machine is selected.") string_"Undo is not possible now as long as no state_machine is selected." )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Undo for selected state-machine if no state-source-editor is open and focused in states-editor-controller. :return: True if a undo was performed, False if focus on source-editor. :rtype: bool
(module (function_definition (function_name_run_ps) function_name_run_ps (parameters (identifier_self) identifier_self (identifier_script) identifier_script )parameters (block (expression_statement (assignment (identifier_encoded_ps) identifier_encoded_ps (call (attribute (call (identifier_b64encode) identifier_b64encode (argument_list (call (attribute (identifier_script) identifier_script (identifier_encode) identifier_encode )attribute (argument_list (string_'utf_16_le') string_'utf_16_le' )argument_list )call )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list (string_'ascii') string_'ascii' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rs) identifier_rs (call (attribute (identifier_self) identifier_self (identifier_run_cmd) identifier_run_cmd )attribute (argument_list (call (attribute (string_'powershell -encodedcommand {0}') string_'powershell -encodedcommand {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_encoded_ps) identifier_encoded_ps )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (identifier_len) identifier_len (argument_list (attribute (identifier_rs) identifier_rs (identifier_std_err) identifier_std_err )attribute )argument_list )call (block (expression_statement (assignment (attribute (identifier_rs) identifier_rs (identifier_std_err) identifier_std_err )attribute (call (attribute (identifier_self) identifier_self (identifier__clean_error_msg) identifier__clean_error_msg )attribute (argument_list (attribute (identifier_rs) identifier_rs (identifier_std_err) identifier_std_err )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_rs) identifier_rs )return_statement )block )function_definition )module
base64 encodes a Powershell script and executes the powershell encoded script command
(module (function_definition (function_name_exists) function_name_exists (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename )parameters (block (expression_statement (assignment (identifier_result) identifier_result (False) False )assignment )expression_statement (if_statement (call (identifier_is_package) identifier_is_package (argument_list (identifier_filename) identifier_filename )argument_list )call (block (expression_statement (assignment (identifier_packages) identifier_packages (call (attribute (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (string_"jss") string_"jss" )subscript (identifier_Package) identifier_Package )attribute (argument_list )argument_list )call (identifier_retrieve_all) identifier_retrieve_all )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_package) identifier_package (identifier_packages) identifier_packages (block (if_statement (comparison_operator (call (attribute (identifier_package) identifier_package (identifier_findtext) identifier_findtext )attribute (argument_list (string_"filename") string_"filename" )argument_list )call (identifier_filename) identifier_filename )comparison_operator (block (expression_statement (assignment (identifier_result) identifier_result (True) True )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement )block (else_clause (block (expression_statement (assignment (identifier_scripts) identifier_scripts (call (attribute (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (string_"jss") string_"jss" )subscript (identifier_Script) identifier_Script )attribute (argument_list )argument_list )call (identifier_retrieve_all) identifier_retrieve_all )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_script) identifier_script (identifier_scripts) identifier_scripts (block (if_statement (comparison_operator (call (attribute (identifier_script) identifier_script (identifier_findtext) identifier_findtext )attribute (argument_list (string_"filename") string_"filename" )argument_list )call (identifier_filename) identifier_filename )comparison_operator (block (expression_statement (assignment (identifier_result) identifier_result (True) True )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement )block )else_clause )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Check for the existence of a package or script. Unlike other DistributionPoint types, JDS and CDP types have no documented interface for checking whether the server and its children have a complete copy of a file. The best we can do is check for an object using the API /packages URL--JSS.Package() or /scripts and look for matches on the filename. If this is not enough, please use the alternate exists_with_casper method. For example, it's possible to create a Package object but never upload a package file, and this method will still return "True". Also, this may be slow, as it needs to retrieve the complete list of packages from the server.
(module (function_definition (function_name_set_index) function_name_set_index (parameters (identifier_self) identifier_self (identifier_index) identifier_index )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setCurrentIndex) identifier_setCurrentIndex )attribute (argument_list (identifier_index) identifier_index )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_new_root) identifier_new_root )attribute (identifier_emit) identifier_emit )attribute (argument_list (identifier_index) identifier_index )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_scrollTo) identifier_scrollTo )attribute (argument_list (identifier_index) identifier_index )argument_list )call )expression_statement )block )function_definition )module
Set the current index to the row of the given index :param index: the index to set the level to :type index: QtCore.QModelIndex :returns: None :rtype: None :raises: None
(module (function_definition (function_name__load_type_counts) function_name__load_type_counts (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_rel_path) identifier_rel_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_CLTK_DATA_DIR) identifier_CLTK_DATA_DIR (string_'old_english') string_'old_english' (string_'model') string_'model' (string_'old_english_models_cltk') string_'old_english_models_cltk' (string_'data') string_'data' (string_'oe.counts') string_'oe.counts' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_rel_path) identifier_rel_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_type_counts) identifier_type_counts )attribute (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' )argument_list )call (as_pattern_target (identifier_infile) identifier_infile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_lines) identifier_lines (call (attribute (call (attribute (identifier_infile) identifier_infile (identifier_read) identifier_read )attribute (argument_list )argument_list )call (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_lines) identifier_lines (block (expression_statement (assignment (pattern_list (identifier_count) identifier_count (identifier_word) identifier_word )pattern_list (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_type_counts) identifier_type_counts )attribute (identifier_word) identifier_word )subscript (call (identifier_int) identifier_int (argument_list (identifier_count) identifier_count )argument_list )call )assignment )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Load the table of frequency counts of word forms.
(module (function_definition (function_name__vector_pattern_uniform_op_left) function_name__vector_pattern_uniform_op_left (parameters (identifier_func) identifier_func )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name_verif) function_name_verif (parameters (identifier_self) identifier_self (identifier_patt) identifier_patt )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_patt) identifier_patt (identifier_TransversePatternUniform) identifier_TransversePatternUniform )argument_list )call (block (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__tdsphere) identifier__tdsphere )attribute (identifier_shape) identifier_shape )attribute (attribute (attribute (identifier_patt) identifier_patt (identifier__tdsphere) identifier__tdsphere )attribute (identifier_shape) identifier_shape )attribute )comparison_operator (block (return_statement (call (identifier_TransversePatternUniform) identifier_TransversePatternUniform (argument_list (call (identifier_func) identifier_func (argument_list (identifier_self) identifier_self (attribute (identifier_self) identifier_self (identifier__tdsphere) identifier__tdsphere )attribute (attribute (identifier_patt) identifier_patt (identifier__tdsphere) identifier__tdsphere )attribute )argument_list )call (call (identifier_func) identifier_func (argument_list (identifier_self) identifier_self (attribute (identifier_self) identifier_self (identifier__pdsphere) identifier__pdsphere )attribute (attribute (identifier_patt) identifier_patt (identifier__pdsphere) identifier__pdsphere )attribute )argument_list )call (keyword_argument (identifier_doublesphere) identifier_doublesphere (True) True )keyword_argument )argument_list )call )return_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (subscript (identifier_err_msg) identifier_err_msg (string_'VP_sz_msmtch') string_'VP_sz_msmtch' )subscript (line_continuation_\) line_continuation_\ (tuple (attribute (identifier_self) identifier_self (identifier_nrows) identifier_nrows )attribute (attribute (identifier_self) identifier_self (identifier_ncols) identifier_ncols )attribute (attribute (identifier_patt) identifier_patt (identifier_nrows) identifier_nrows )attribute (attribute (identifier_patt) identifier_patt (identifier_ncols) identifier_ncols )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_patt) identifier_patt (attribute (identifier_numbers) identifier_numbers (identifier_Number) identifier_Number )attribute )argument_list )call (block (return_statement (call (identifier_TransversePatternUniform) identifier_TransversePatternUniform (argument_list (call (identifier_func) identifier_func (argument_list (identifier_self) identifier_self (attribute (identifier_self) identifier_self (identifier__tdsphere) identifier__tdsphere )attribute (identifier_patt) identifier_patt )argument_list )call (call (identifier_func) identifier_func (argument_list (identifier_self) identifier_self (attribute (identifier_self) identifier_self (identifier__pdsphere) identifier__pdsphere )attribute (identifier_patt) identifier_patt )argument_list )call (keyword_argument (identifier_doublesphere) identifier_doublesphere (True) True )keyword_argument )argument_list )call )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (subscript (identifier_err_msg) identifier_err_msg (string_'no_combi_VP') string_'no_combi_VP' )subscript )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )decorated_definition (return_statement (identifier_verif) identifier_verif )return_statement )block )function_definition )module
decorator for operator overloading when VectorPatternUniform is on the left
(module (function_definition (function_name_run_sls_remove) function_name_run_sls_remove (parameters (identifier_sls_cmd) identifier_sls_cmd (identifier_env_vars) identifier_env_vars )parameters (block (expression_statement (assignment (identifier_sls_process) identifier_sls_process (call (attribute (identifier_subprocess) identifier_subprocess (identifier_Popen) identifier_Popen )attribute (argument_list (identifier_sls_cmd) identifier_sls_cmd (keyword_argument (identifier_stdout) identifier_stdout (attribute (identifier_subprocess) identifier_subprocess (identifier_PIPE) identifier_PIPE )attribute )keyword_argument (keyword_argument (identifier_env) identifier_env (identifier_env_vars) identifier_env_vars )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_stdoutdata) identifier_stdoutdata (identifier__stderrdata) identifier__stderrdata )pattern_list (call (attribute (identifier_sls_process) identifier_sls_process (identifier_communicate) identifier_communicate )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sls_return) identifier_sls_return (call (attribute (identifier_sls_process) identifier_sls_process (identifier_wait) identifier_wait )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_stdoutdata) identifier_stdoutdata )argument_list )call )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_sls_return) identifier_sls_return (integer_0) integer_0 )comparison_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_sls_return) identifier_sls_return (integer_1) integer_1 )comparison_operator (not_operator (parenthesized_expression (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_r"Stack '.*' does not exist") string_r"Stack '.*' does not exist" (identifier_stdoutdata) identifier_stdoutdata )argument_list )call )parenthesized_expression )not_operator )boolean_operator )parenthesized_expression )boolean_operator (block (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (identifier_sls_return) identifier_sls_return )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Run sls remove command.
(module (function_definition (function_name_list) function_name_list (parameters (identifier_self) identifier_self (default_parameter (identifier_full) identifier_full (False) False )default_parameter )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_is_api) identifier_is_api )attribute (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__list_api) identifier__list_api )attribute (argument_list (keyword_argument (identifier_full) identifier_full (identifier_full) identifier_full )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__list_fs) identifier__list_fs )attribute (argument_list (keyword_argument (identifier_full) identifier_full (identifier_full) identifier_full )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
List all of the bundles in the remote