sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_min_count) function_name_min_count (parameters (identifier_self) identifier_self (default_parameter (identifier_n) identifier_n (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_word_count) identifier_word_count (dictionary_comprehension (pair (identifier_w) identifier_w (identifier_c) identifier_c )pair (for_in_clause (pattern_list (identifier_w) identifier_w (identifier_c) identifier_c )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (attribute (identifier_self) identifier_self (identifier_word_count) identifier_word_count )attribute )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_c) identifier_c (identifier_n) identifier_n )comparison_operator )if_clause )dictionary_comprehension )assignment )expression_statement (return_statement (call (identifier_CountedVocabulary) identifier_CountedVocabulary (argument_list (keyword_argument (identifier_word_count) identifier_word_count (identifier_word_count) identifier_word_count )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns a vocabulary after eliminating the words that appear < `n`. Args: n (integer): specifies the minimum word frequency allowed.
(module (function_definition (function_name_is_transition_matrix) function_name_is_transition_matrix (parameters (identifier_T) identifier_T (default_parameter (identifier_tol) identifier_tol (float_1e-10) float_1e-10 )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_T) identifier_T (identifier_ndim) identifier_ndim )attribute (integer_2) integer_2 )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (subscript (attribute (identifier_T) identifier_T (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (subscript (attribute (identifier_T) identifier_T (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_dim) identifier_dim (subscript (attribute (identifier_T) identifier_T (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_X) identifier_X (binary_operator (call (attribute (identifier_np) identifier_np (identifier_abs) identifier_abs )attribute (argument_list (identifier_T) identifier_T )argument_list )call (identifier_T) identifier_T )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (identifier_T) identifier_T (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (boolean_operator (comparison_operator (call (attribute (call (attribute (identifier_np) identifier_np (identifier_abs) identifier_abs )attribute (argument_list (binary_operator (identifier_x) identifier_x (call (attribute (identifier_np) identifier_np (identifier_ones) identifier_ones )attribute (argument_list (identifier_dim) identifier_dim )argument_list )call )binary_operator )argument_list )call (identifier_max) identifier_max )attribute (argument_list )argument_list )call (binary_operator (identifier_dim) identifier_dim (identifier_tol) identifier_tol )binary_operator )comparison_operator (comparison_operator (call (attribute (identifier_X) identifier_X (identifier_max) identifier_max )attribute (argument_list )argument_list )call (binary_operator (float_2.0) float_2.0 (identifier_tol) identifier_tol )binary_operator )comparison_operator )boolean_operator )return_statement )block )function_definition )module
Tests whether T is a transition matrix Parameters ---------- T : ndarray shape=(n, n) matrix to test tol : float tolerance to check with Returns ------- Truth value : bool True, if all elements are in interval [0, 1] and each row of T sums up to 1. False, otherwise
(module (function_definition (function_name_InteractiveShell) function_name_InteractiveShell (parameters (identifier_self) identifier_self (default_parameter (identifier_cmd) identifier_cmd (None) None )default_parameter (default_parameter (identifier_strip_cmd) identifier_strip_cmd (True) True )default_parameter (default_parameter (identifier_delim) identifier_delim (None) None )default_parameter (default_parameter (identifier_strip_delim) identifier_strip_delim (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_self) identifier_self (identifier__get_service_connection) identifier__get_service_connection )attribute (argument_list (string_b'shell:') string_b'shell:' )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_protocol_handler) identifier_protocol_handler )attribute (identifier_InteractiveShellCommand) identifier_InteractiveShellCommand )attribute (argument_list (identifier_conn) identifier_conn (keyword_argument (identifier_cmd) identifier_cmd (identifier_cmd) identifier_cmd )keyword_argument (keyword_argument (identifier_strip_cmd) identifier_strip_cmd (identifier_strip_cmd) identifier_strip_cmd )keyword_argument (keyword_argument (identifier_delim) identifier_delim (identifier_delim) identifier_delim )keyword_argument (keyword_argument (identifier_strip_delim) identifier_strip_delim (identifier_strip_delim) identifier_strip_delim )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get stdout from the currently open interactive shell and optionally run a command on the device, returning all output. Args: cmd: Optional. Command to run on the target. strip_cmd: Optional (default True). Strip command name from stdout. delim: Optional. Delimiter to look for in the output to know when to stop expecting more output (usually the shell prompt) strip_delim: Optional (default True): Strip the provided delimiter from the output Returns: The stdout from the shell command.
(module (function_definition (function_name__expire) function_name__expire (parameters (identifier_self) identifier_self )parameters (block (delete_statement (subscript (attribute (attribute (identifier_self) identifier_self (identifier_map) identifier_map )attribute (identifier_addr) identifier_addr )attribute (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )subscript )delete_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_map) identifier_map )attribute (identifier_notify) identifier_notify )attribute (argument_list (string_"addrmap_expired") string_"addrmap_expired" (list_splat (list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )list )list_splat (dictionary_splat (dictionary )dictionary )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
callback done via callLater
(module (function_definition (function_name_apply) function_name_apply (parameters (identifier_self) identifier_self (default_parameter (identifier_reboot) identifier_reboot (False) False )default_parameter )parameters (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (identifier_use_virtual_addresses) identifier_use_virtual_addresses )attribute (True) True )assignment )expression_statement (expression_statement (assignment (attribute (attribute (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (identifier_manage) identifier_manage )attribute (identifier_manage) identifier_manage )attribute (True) True )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (identifier_mode) identifier_mode )attribute (string_'new') string_'new' )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (identifier_init_boot) identifier_init_boot )attribute (identifier_reboot) identifier_reboot )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_set_profile) identifier_set_profile )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (identifier_get_json) identifier_get_json )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Apply the configuration to iRMC.
(module (function_definition (function_name_format_field) function_name_format_field (parameters (identifier_self) identifier_self (identifier_field) identifier_field )parameters (block (if_statement (comparison_operator (identifier_field) identifier_field (None) None )comparison_operator (block (return_statement (string_"NULL") string_"NULL" )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_TypeError) identifier_TypeError )argument_list )call (block (return_statement (string_"TypeError") string_"TypeError" )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_Decimal) identifier_Decimal )argument_list )call (block (if_statement (comparison_operator (binary_operator (identifier_field) identifier_field (integer_1) integer_1 )binary_operator (integer_0) integer_0 )comparison_operator (block (return_statement (call (identifier_str) identifier_str (argument_list (call (identifier_int) identifier_int (argument_list (identifier_field) identifier_field )argument_list )call )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_str) identifier_str (argument_list (call (identifier_float) identifier_float (argument_list (identifier_field) identifier_field )argument_list )call )argument_list )call )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_set) identifier_set )argument_list )call (block (return_statement (binary_operator (binary_operator (string_"(") string_"(" (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (attribute (identifier_self) identifier_self (identifier_format_field) identifier_format_field )attribute (argument_list (identifier_v) identifier_v )argument_list )call (for_in_clause (identifier_v) identifier_v (identifier_field) identifier_field )for_in_clause )list_comprehension )argument_list )call )binary_operator (string_")") string_")" )binary_operator )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_datetime) identifier_datetime )argument_list )call (block (return_statement (call (attribute (identifier_field) identifier_field (identifier_isoformat) identifier_isoformat )attribute (argument_list )argument_list )call )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_timedelta) identifier_timedelta )argument_list )call (block (expression_statement (assignment (identifier_rd) identifier_rd (call (identifier_relativedelta) identifier_relativedelta (argument_list (keyword_argument (identifier_seconds) identifier_seconds (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_field) identifier_field (identifier_total_seconds) identifier_total_seconds )attribute (argument_list )argument_list )call )argument_list )call )keyword_argument (keyword_argument (identifier_microseconds) identifier_microseconds (attribute (identifier_field) identifier_field (identifier_microseconds) identifier_microseconds )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_delta_to_str) identifier_delta_to_str (argument_list (identifier_rd) identifier_rd )argument_list )call )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_Binary) identifier_Binary )argument_list )call (block (return_statement (binary_operator (string_"<Binary %d>") string_"<Binary %d>" (call (identifier_len) identifier_len (argument_list (attribute (identifier_field) identifier_field (identifier_value) identifier_value )attribute )argument_list )call )binary_operator )return_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_pretty) identifier_pretty (call (identifier_repr) identifier_repr (argument_list (identifier_field) identifier_field )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_pretty) identifier_pretty (identifier_startswith) identifier_startswith )attribute (argument_list (string_"u'") string_"u'" )argument_list )call (block (return_statement (subscript (identifier_pretty) identifier_pretty (slice (integer_1) integer_1 (colon) colon )slice )subscript )return_statement )block )if_statement (return_statement (identifier_pretty) identifier_pretty )return_statement )block )function_definition )module
Format a single Dynamo value
(module (function_definition (function_name_fit_transform) function_name_fit_transform (parameters (identifier_self) identifier_self (identifier_X) identifier_X (default_parameter (identifier_y) identifier_y (None) None )default_parameter (dictionary_splat_pattern (identifier_fit_params) identifier_fit_params )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_y) identifier_y (call (identifier_column_or_1d) identifier_column_or_1d (argument_list (identifier_X) identifier_X (keyword_argument (identifier_warn) identifier_warn (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__check_numpy_unicode_bug) identifier__check_numpy_unicode_bug (argument_list (identifier_X) identifier_X )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (attribute (identifier_self) identifier_self (identifier_classes_) identifier_classes_ )attribute (identifier_X) identifier_X )pattern_list (call (attribute (identifier_np) identifier_np (identifier_unique) identifier_unique )attribute (argument_list (identifier_X) identifier_X (keyword_argument (identifier_return_inverse) identifier_return_inverse (True) True )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_X) identifier_X )return_statement )block )function_definition )module
Fit label encoder and return encoded labels Parameters ---------- y : array-like of shape [n_samples] Target values. Returns ------- y : array-like of shape [n_samples]
(module (function_definition (function_name_generate_hypergraph) function_name_generate_hypergraph (parameters (identifier_num_nodes) identifier_num_nodes (identifier_num_edges) identifier_num_edges (default_parameter (identifier_r) identifier_r (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_random_graph) identifier_random_graph (call (identifier_hypergraph) identifier_hypergraph (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_nodes) identifier_nodes (call (identifier_list) identifier_list (argument_list (call (identifier_map) identifier_map (argument_list (identifier_str) identifier_str (call (identifier_list) identifier_list (argument_list (call (identifier_range) identifier_range (argument_list (identifier_num_nodes) identifier_num_nodes )argument_list )call )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_random_graph) identifier_random_graph (identifier_add_nodes) identifier_add_nodes )attribute (argument_list (identifier_nodes) identifier_nodes )argument_list )call )expression_statement (expression_statement (assignment (identifier_edges) identifier_edges (call (identifier_list) identifier_list (argument_list (call (identifier_map) identifier_map (argument_list (identifier_str) identifier_str (call (identifier_list) identifier_list (argument_list (call (identifier_range) identifier_range (argument_list (identifier_num_nodes) identifier_num_nodes (binary_operator (identifier_num_nodes) identifier_num_nodes (identifier_num_edges) identifier_num_edges )binary_operator )argument_list )call )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_random_graph) identifier_random_graph (identifier_add_hyperedges) identifier_add_hyperedges )attribute (argument_list (identifier_edges) identifier_edges )argument_list )call )expression_statement (if_statement (comparison_operator (integer_0) integer_0 (identifier_r) identifier_r )comparison_operator (block (for_statement (identifier_e) identifier_e (identifier_edges) identifier_edges (block (for_statement (identifier_n) identifier_n (identifier_nodes) identifier_nodes (block (if_statement (call (identifier_choice) identifier_choice (argument_list (list (True) True (False) False )list )argument_list )call (block (expression_statement (call (attribute (identifier_random_graph) identifier_random_graph (identifier_link) identifier_link )attribute (argument_list (identifier_n) identifier_n (identifier_e) identifier_e )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement )block (else_clause (block (for_statement (identifier_e) identifier_e (identifier_edges) identifier_edges (block (expression_statement (call (identifier_shuffle) identifier_shuffle (argument_list (identifier_nodes) identifier_nodes )argument_list )call )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_r) identifier_r )argument_list )call (block (expression_statement (call (attribute (identifier_random_graph) identifier_random_graph (identifier_link) identifier_link )attribute (argument_list (subscript (identifier_nodes) identifier_nodes (identifier_i) identifier_i )subscript (identifier_e) identifier_e )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )else_clause )if_statement (return_statement (identifier_random_graph) identifier_random_graph )return_statement )block )function_definition )module
Create a random hyper graph. @type num_nodes: number @param num_nodes: Number of nodes. @type num_edges: number @param num_edges: Number of edges. @type r: number @param r: Uniform edges of size r.
(module (function_definition (function_name_updateDynamics) function_name_updateDynamics (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_history_vars_string) identifier_history_vars_string (string_'') string_'' )assignment )expression_statement (expression_statement (assignment (identifier_arg_names) identifier_arg_names (call (identifier_list) identifier_list (argument_list (call (identifier_getArgNames) identifier_getArgNames (argument_list (attribute (identifier_self) identifier_self (identifier_calcDynamics) identifier_calcDynamics )attribute )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'self') string_'self' (identifier_arg_names) identifier_arg_names )comparison_operator (block (expression_statement (call (attribute (identifier_arg_names) identifier_arg_names (identifier_remove) identifier_remove )attribute (argument_list (string_'self') string_'self' )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_name) identifier_name (identifier_arg_names) identifier_arg_names (block (expression_statement (augmented_assignment (identifier_history_vars_string) identifier_history_vars_string (binary_operator (binary_operator (binary_operator (binary_operator (string_' \'') string_' \'' (identifier_name) identifier_name )binary_operator (string_'\' : self.') string_'\' : self.' )binary_operator (identifier_name) identifier_name )binary_operator (string_'_hist,') string_'_hist,' )binary_operator )augmented_assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_update_dict) identifier_update_dict (call (identifier_eval) identifier_eval (argument_list (binary_operator (binary_operator (string_'{') string_'{' (identifier_history_vars_string) identifier_history_vars_string )binary_operator (string_'}') string_'}' )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dynamics) identifier_dynamics (call (attribute (identifier_self) identifier_self (identifier_calcDynamics) identifier_calcDynamics )attribute (argument_list (dictionary_splat (identifier_update_dict) identifier_update_dict )dictionary_splat )argument_list )call )assignment )expression_statement (for_statement (identifier_var_name) identifier_var_name (attribute (identifier_self) identifier_self (identifier_dyn_vars) identifier_dyn_vars )attribute (block (expression_statement (assignment (identifier_this_obj) identifier_this_obj (call (identifier_getattr) identifier_getattr (argument_list (identifier_dynamics) identifier_dynamics (identifier_var_name) identifier_var_name )argument_list )call )assignment )expression_statement (for_statement (identifier_this_type) identifier_this_type (attribute (identifier_self) identifier_self (identifier_agents) identifier_agents )attribute (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_this_type) identifier_this_type (identifier_var_name) identifier_var_name (identifier_this_obj) identifier_this_obj )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_dynamics) identifier_dynamics )return_statement )block )function_definition )module
Calculates a new "aggregate dynamic rule" using the history of variables named in track_vars, and distributes this rule to AgentTypes in agents. Parameters ---------- none Returns ------- dynamics : instance The new "aggregate dynamic rule" that agents believe in and act on. Should have attributes named in dyn_vars.
(module (function_definition (function_name_stop_condition) function_name_stop_condition (parameters (identifier_self) identifier_self (identifier_condition) identifier_condition )parameters (block (for_statement (identifier_cond_format) identifier_cond_format (attribute (identifier_self) identifier_self (identifier__known_conditions) identifier__known_conditions )attribute (block (try_statement (block (expression_statement (assignment (identifier_cond) identifier_cond (call (attribute (identifier_cond_format) identifier_cond_format (identifier_FromString) identifier_FromString )attribute (argument_list (identifier_condition) identifier_condition )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_stop_conditions) identifier_stop_conditions )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_cond) identifier_cond )argument_list )call )expression_statement (return_statement )return_statement )block (except_clause (identifier_ArgumentError) identifier_ArgumentError (block (continue_statement )continue_statement )block )except_clause )try_statement )block )for_statement (raise_statement (call (identifier_ArgumentError) identifier_ArgumentError (argument_list (string_"Stop condition could not be processed by any known StopCondition type") string_"Stop condition could not be processed by any known StopCondition type" (keyword_argument (identifier_condition) identifier_condition (identifier_condition) identifier_condition )keyword_argument (keyword_argument (identifier_suggestion) identifier_suggestion (string_"It may be mistyped or otherwise invalid.") string_"It may be mistyped or otherwise invalid." )keyword_argument )argument_list )call )raise_statement )block )function_definition )module
Add a stop condition to this simulation. Stop conditions are specified as strings and parsed into the appropriate internal structures. Args: condition (str): a string description of the stop condition
(module (function_definition (function_name__get_jar_fp) function_name__get_jar_fp (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__command) identifier__command )attribute )argument_list )call (block (return_statement (attribute (identifier_self) identifier_self (identifier__command) identifier__command )attribute )return_statement )block (elif_clause (comparison_operator (string_'RDP_JAR_PATH') string_'RDP_JAR_PATH' (identifier_environ) identifier_environ )comparison_operator (block (return_statement (call (identifier_getenv) identifier_getenv (argument_list (string_'RDP_JAR_PATH') string_'RDP_JAR_PATH' )argument_list )call )return_statement )block )elif_clause (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns the full path to the JAR file. If the JAR file cannot be found in the current directory and the environment variable RDP_JAR_PATH is not set, returns None.
(module (function_definition (function_name__get_lb) function_name__get_lb (parameters (identifier_self) identifier_self (identifier_lb_or_id) identifier_lb_or_id )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_lb_or_id) identifier_lb_or_id (identifier_CloudLoadBalancer) identifier_CloudLoadBalancer )argument_list )call (block (expression_statement (assignment (identifier_ret) identifier_ret (identifier_lb_or_id) identifier_lb_or_id )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (identifier_lb_or_id) identifier_lb_or_id )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Accepts either a loadbalancer or the ID of a loadbalancer, and returns the CloudLoadBalancer instance.
(module (function_definition (function_name_IsFile) function_name_IsFile (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__stat_object) identifier__stat_object )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__stat_object) identifier__stat_object )attribute (call (attribute (identifier_self) identifier_self (identifier__GetStat) identifier__GetStat )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__stat_object) identifier__stat_object )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_entry_type) identifier_entry_type )attribute (attribute (attribute (identifier_self) identifier_self (identifier__stat_object) identifier__stat_object )attribute (identifier_type) identifier_type )attribute )assignment )expression_statement )block )if_statement (return_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_entry_type) identifier_entry_type )attribute (attribute (identifier_definitions) identifier_definitions (identifier_FILE_ENTRY_TYPE_FILE) identifier_FILE_ENTRY_TYPE_FILE )attribute )comparison_operator )return_statement )block )function_definition )module
Determines if the file entry is a file. Returns: bool: True if the file entry is a file.
(module (function_definition (function_name_update_utxoset) function_name_update_utxoset (parameters (identifier_self) identifier_self (identifier_transaction) identifier_transaction )parameters (block (expression_statement (assignment (identifier_spent_outputs) identifier_spent_outputs (list_comprehension (identifier_spent_output) identifier_spent_output (for_in_clause (identifier_spent_output) identifier_spent_output (attribute (identifier_transaction) identifier_transaction (identifier_spent_outputs) identifier_spent_outputs )attribute )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (identifier_spent_outputs) identifier_spent_outputs (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_delete_unspent_outputs) identifier_delete_unspent_outputs )attribute (argument_list (list_splat (identifier_spent_outputs) identifier_spent_outputs )list_splat )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_store_unspent_outputs) identifier_store_unspent_outputs )attribute (argument_list (list_splat (list_comprehension (call (attribute (identifier_utxo) identifier_utxo (identifier__asdict) identifier__asdict )attribute (argument_list )argument_list )call (for_in_clause (identifier_utxo) identifier_utxo (attribute (identifier_transaction) identifier_transaction (identifier_unspent_outputs) identifier_unspent_outputs )attribute )for_in_clause )list_comprehension )list_splat )argument_list )call )expression_statement )block )function_definition )module
Update the UTXO set given ``transaction``. That is, remove the outputs that the given ``transaction`` spends, and add the outputs that the given ``transaction`` creates. Args: transaction (:obj:`~bigchaindb.models.Transaction`): A new transaction incoming into the system for which the UTXO set needs to be updated.
(module (function_definition (function_name_score) function_name_score (parameters (identifier_ID) identifier_ID (identifier_sign) identifier_sign (identifier_lon) identifier_lon )parameters (block (expression_statement (assignment (identifier_info) identifier_info (call (identifier_getInfo) identifier_getInfo (argument_list (identifier_sign) identifier_sign (identifier_lon) identifier_lon )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dignities) identifier_dignities (list_comprehension (identifier_dign) identifier_dign (for_in_clause (tuple_pattern (identifier_dign) identifier_dign (identifier_objID) identifier_objID )tuple_pattern (call (attribute (identifier_info) identifier_info (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_objID) identifier_objID (identifier_ID) identifier_ID )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (return_statement (call (identifier_sum) identifier_sum (argument_list (list_comprehension (subscript (identifier_SCORES) identifier_SCORES (identifier_dign) identifier_dign )subscript (for_in_clause (identifier_dign) identifier_dign (identifier_dignities) identifier_dignities )for_in_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Returns the score of an object on a sign and longitude.
(module (function_definition (function_name_phrase_replace) function_name_phrase_replace (parameters (identifier_self) identifier_self (identifier_replace_dict) identifier_replace_dict )parameters (block (function_definition (function_name_r) function_name_r (parameters (identifier_tokens) identifier_tokens )parameters (block (expression_statement (assignment (identifier_text) identifier_text (binary_operator (string_' ') string_' ' (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_tokens) identifier_tokens )argument_list )call )binary_operator )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_replace_dict) identifier_replace_dict (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_text) identifier_text (identifier_replace) identifier_replace )attribute (argument_list (binary_operator (binary_operator (string_" ") string_" " (identifier_k) identifier_k )binary_operator (string_" ") string_" " )binary_operator (binary_operator (binary_operator (string_" ") string_" " (identifier_v) identifier_v )binary_operator (string_" ") string_" " )binary_operator )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (call (attribute (identifier_text) identifier_text (identifier_split) identifier_split )attribute (argument_list )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_stems) identifier_stems )attribute (call (identifier_list) identifier_list (argument_list (call (identifier_map) identifier_map (argument_list (identifier_r) identifier_r (attribute (identifier_self) identifier_self (identifier_stems) identifier_stems )attribute )argument_list )call )argument_list )call )assignment )expression_statement )block )function_definition )module
Replace phrases with single token, mapping defined in replace_dict
(module (function_definition (function_name_add_f77_to_env) function_name_add_f77_to_env (parameters (identifier_env) identifier_env )parameters (block (try_statement (block (expression_statement (assignment (identifier_F77Suffixes) identifier_F77Suffixes (subscript (identifier_env) identifier_env (string_'F77FILESUFFIXES') string_'F77FILESUFFIXES' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_F77Suffixes) identifier_F77Suffixes (list (string_'.f77') string_'.f77' )list )assignment )expression_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_F77PPSuffixes) identifier_F77PPSuffixes (subscript (identifier_env) identifier_env (string_'F77PPFILESUFFIXES') string_'F77PPFILESUFFIXES' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_F77PPSuffixes) identifier_F77PPSuffixes (list )list )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (identifier_DialectAddToEnv) identifier_DialectAddToEnv (argument_list (identifier_env) identifier_env (string_"F77") string_"F77" (identifier_F77Suffixes) identifier_F77Suffixes (identifier_F77PPSuffixes) identifier_F77PPSuffixes )argument_list )call )expression_statement )block )function_definition )module
Add Builders and construction variables for f77 to an Environment.
(module (function_definition (function_name_run_id) function_name_run_id (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_s1) identifier_s1 (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_'(.)([A-Z][a-z]+)') string_'(.)([A-Z][a-z]+)' (string_r'\1_\2') string_r'\1_\2' (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_'([a-z0-9])([A-Z])') string_'([a-z0-9])([A-Z])' (string_r'\1_\2') string_r'\1_\2' (identifier_s1) identifier_s1 )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Run name without whitespace
(module (function_definition (function_name_logon) function_name_logon (parameters )parameters (block (expression_statement (assignment (identifier_session) identifier_session (call (attribute (identifier_requests) identifier_requests (identifier_session) identifier_session )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (dictionary (pair (string_"jsonrpc") string_"jsonrpc" (string_"2.0") string_"2.0" )pair (pair (string_"id") string_"id" (string_"ID0") string_"ID0" )pair (pair (string_"method") string_"method" (string_"login") string_"login" )pair (pair (string_"params") string_"params" (list (subscript (identifier_DETAILS) identifier_DETAILS (string_'username') string_'username' )subscript (subscript (identifier_DETAILS) identifier_DETAILS (string_'password') string_'password' )subscript (subscript (identifier_DETAILS) identifier_DETAILS (string_'auth') string_'auth' )subscript (True) True )list )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_logon_response) identifier_logon_response (call (attribute (identifier_session) identifier_session (identifier_post) identifier_post )attribute (argument_list (subscript (identifier_DETAILS) identifier_DETAILS (string_'url') string_'url' )subscript (keyword_argument (identifier_data) identifier_data (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_payload) identifier_payload )argument_list )call )keyword_argument (keyword_argument (identifier_verify) identifier_verify (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_logon_response) identifier_logon_response (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (string_"Error logging into proxy. HTTP Error code: %s") string_"Error logging into proxy. HTTP Error code: %s" (attribute (identifier_logon_response) identifier_logon_response (identifier_status_code) identifier_status_code )attribute )argument_list )call )expression_statement (raise_statement (call (attribute (attribute (identifier_salt) identifier_salt (identifier_exceptions) identifier_exceptions )attribute (identifier_CommandExecutionError) identifier_CommandExecutionError )attribute (argument_list (string_"Did not receive a valid response from host.") string_"Did not receive a valid response from host." )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_cookies) identifier_cookies (dictionary (pair (string_'sslng_csrf_token') string_'sslng_csrf_token' (subscript (attribute (identifier_logon_response) identifier_logon_response (identifier_cookies) identifier_cookies )attribute (string_'sslng_csrf_token') string_'sslng_csrf_token' )subscript )pair (pair (string_'sslng_session_id') string_'sslng_session_id' (subscript (attribute (identifier_logon_response) identifier_logon_response (identifier_cookies) identifier_cookies )attribute (string_'sslng_session_id') string_'sslng_session_id' )subscript )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_csrf_token) identifier_csrf_token (subscript (attribute (identifier_logon_response) identifier_logon_response (identifier_cookies) identifier_cookies )attribute (string_'sslng_csrf_token') string_'sslng_csrf_token' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (string_"Unable to authentication to the bluecoat_sslv proxy.") string_"Unable to authentication to the bluecoat_sslv proxy." )argument_list )call )expression_statement (raise_statement (call (attribute (attribute (identifier_salt) identifier_salt (identifier_exceptions) identifier_exceptions )attribute (identifier_CommandExecutionError) identifier_CommandExecutionError )attribute (argument_list (string_"Did not receive a valid response from host.") string_"Did not receive a valid response from host." )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (expression_list (identifier_session) identifier_session (identifier_cookies) identifier_cookies (identifier_csrf_token) identifier_csrf_token )expression_list )return_statement )block )function_definition )module
Logs into the bluecoat_sslv device and returns the session cookies.
(module (function_definition (function_name_percentile) function_name_percentile (parameters (default_parameter (identifier_values) identifier_values (None) None )default_parameter (default_parameter (identifier_percentile) identifier_percentile (None) None )default_parameter )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_values) identifier_values (list (None) None (call (identifier_tuple) identifier_tuple (argument_list )argument_list )call (list )list )list )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_values) identifier_values )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_InsufficientData) identifier_InsufficientData (argument_list (call (attribute (string_"Expected a sequence of at least 1 integers, got {0!r}") string_"Expected a sequence of at least 1 integers, got {0!r}" (identifier_format) identifier_format )attribute (argument_list (identifier_values) identifier_values )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_percentile) identifier_percentile (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Expected a percentile choice, got {0}") string_"Expected a percentile choice, got {0}" (identifier_format) identifier_format )attribute (argument_list (identifier_percentile) identifier_percentile )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_sorted_values) identifier_sorted_values (call (identifier_sorted) identifier_sorted (argument_list (identifier_values) identifier_values )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rank) identifier_rank (binary_operator (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_values) identifier_values )argument_list )call (identifier_percentile) identifier_percentile )binary_operator (integer_100) integer_100 )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_rank) identifier_rank (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_index) identifier_index (binary_operator (identifier_rank) identifier_rank (integer_1) integer_1 )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_index) identifier_index (integer_0) integer_0 )comparison_operator (block (return_statement (subscript (identifier_sorted_values) identifier_sorted_values (integer_0) integer_0 )subscript )return_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (identifier_index) identifier_index (identifier_rank) identifier_rank )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (binary_operator (identifier_index) identifier_index (integer_1) integer_1 )binary_operator (integer_0) integer_0 )comparison_operator (block (return_statement (subscript (identifier_sorted_values) identifier_sorted_values (call (identifier_int) identifier_int (argument_list (identifier_index) identifier_index )argument_list )call )subscript )return_statement )block (else_clause (block (expression_statement (assignment (identifier_fractional) identifier_fractional (binary_operator (identifier_index) identifier_index (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_integer) identifier_integer (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_index) identifier_index (identifier_fractional) identifier_fractional )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lower) identifier_lower (subscript (identifier_sorted_values) identifier_sorted_values (identifier_integer) identifier_integer )subscript )assignment )expression_statement (expression_statement (assignment (identifier_higher) identifier_higher (subscript (identifier_sorted_values) identifier_sorted_values (binary_operator (identifier_integer) identifier_integer (integer_1) integer_1 )binary_operator )subscript )assignment )expression_statement (return_statement (binary_operator (identifier_lower) identifier_lower (binary_operator (identifier_fractional) identifier_fractional (parenthesized_expression (binary_operator (identifier_higher) identifier_higher (identifier_lower) identifier_lower )binary_operator )parenthesized_expression )binary_operator )binary_operator )return_statement )block )else_clause )if_statement )block )function_definition )module
Calculates a simplified weighted average percentile
(module (function_definition (function_name_validate_type) function_name_validate_type (parameters (identifier_prop) identifier_prop (identifier_value) identifier_value (identifier_expected) identifier_expected )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_expected) identifier_expected )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (identifier__validation_error) identifier__validation_error (argument_list (identifier_prop) identifier_prop (attribute (call (identifier_type) identifier_type (argument_list (identifier_value) identifier_value )argument_list )call (identifier___name__) identifier___name__ )attribute (None) None (identifier_expected) identifier_expected )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Default validation for all types
(module (function_definition (function_name_structs2pandas) function_name_structs2pandas (parameters (identifier_structs) identifier_structs )parameters (block (try_statement (block (import_statement (dotted_name (identifier_pandas) identifier_pandas )dotted_name )import_statement (expression_statement (assignment (identifier_records) identifier_records (call (identifier_list) identifier_list (argument_list (call (identifier_structs2records) identifier_structs2records (argument_list (identifier_structs) identifier_structs )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_df) identifier_df (call (attribute (attribute (identifier_pandas) identifier_pandas (identifier_DataFrame) identifier_DataFrame )attribute (identifier_from_records) identifier_from_records )attribute (argument_list (identifier_records) identifier_records )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'id') string_'id' (identifier_df) identifier_df )comparison_operator (block (expression_statement (assignment (subscript (identifier_df) identifier_df (string_"id") string_"id" )subscript (call (attribute (subscript (identifier_df) identifier_df (string_"id") string_"id" )subscript (identifier_apply) identifier_apply )attribute (argument_list (attribute (identifier_str) identifier_str (identifier_rstrip) identifier_rstrip )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_df) identifier_df )return_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (return_statement (identifier_structs) identifier_structs )return_statement )block )except_clause )try_statement )block )function_definition )module
convert ctypes structure or structure array to pandas data frame
(module (function_definition (function_name__influxdb_url) function_name__influxdb_url (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_"{0}/db/{1}/series") string_"{0}/db/{1}/series" (identifier_format) identifier_format )attribute (argument_list (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_influxdb) identifier_influxdb )attribute (identifier_url) identifier_url )attribute (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'/') string_'/' )argument_list )call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_dbname) identifier_dbname )attribute )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (attribute (attribute (identifier_self) identifier_self (identifier_influxdb) identifier_influxdb )attribute (identifier_user) identifier_user )attribute (attribute (attribute (identifier_self) identifier_self (identifier_influxdb) identifier_influxdb )attribute (identifier_password) identifier_password )attribute )boolean_operator (block (expression_statement (augmented_assignment (identifier_url) identifier_url (call (attribute (string_"?u={0}&p={1}") string_"?u={0}&p={1}" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_influxdb) identifier_influxdb )attribute (identifier_user) identifier_user )attribute (attribute (attribute (identifier_self) identifier_self (identifier_influxdb) identifier_influxdb )attribute (identifier_password) identifier_password )attribute )argument_list )call )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_url) identifier_url )return_statement )block )function_definition )module
Return REST API URL to access time series.
(module (function_definition (function_name_Bmatrix) function_name_Bmatrix (parameters (identifier_C) identifier_C )parameters (block (expression_statement (assignment (pattern_list (identifier_L) identifier_L (identifier_Q) identifier_Q )pattern_list (call (identifier_eigh) identifier_eigh (argument_list (identifier_C) identifier_C )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_minL) identifier_minL (binary_operator (float_1e-9) float_1e-9 (subscript (identifier_L) identifier_L (unary_operator (integer_1) integer_1 )unary_operator )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_L) identifier_L (comparison_operator (identifier_L) identifier_L (identifier_minL) identifier_minL )comparison_operator )subscript (identifier_minL) identifier_minL )assignment )expression_statement (expression_statement (assignment (identifier_S) identifier_S (call (attribute (identifier_np) identifier_np (identifier_diag) identifier_diag )attribute (argument_list (binary_operator (integer_1) integer_1 (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (identifier_L) identifier_L )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_B) identifier_B (call (attribute (identifier_Q) identifier_Q (identifier_dot) identifier_dot )attribute (argument_list (identifier_S) identifier_S )argument_list )call )assignment )expression_statement (return_statement (identifier_B) identifier_B )return_statement )block )function_definition )module
Calculate a matrix which is effectively the square root of the correlation matrix C Parameters ---------- C : 2d array A covariance matrix Returns ------- B : 2d array A matrix B such the B.dot(B') = inv(C)
(module (function_definition (function_name_get_comments) function_name_get_comments (parameters (identifier_self) identifier_self (default_parameter (identifier_sharekey) identifier_sharekey (None) None )default_parameter )parameters (block (if_statement (not_operator (identifier_sharekey) identifier_sharekey )not_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (concatenated_string (string_"You must specify a sharekey of the file you") string_"You must specify a sharekey of the file you" (string_"want to 'like'.") string_"want to 'like'." )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_endpoint) identifier_endpoint (call (attribute (string_'/api/sharedfile/{0}/comments') string_'/api/sharedfile/{0}/comments' (identifier_format) identifier_format )attribute (argument_list (identifier_sharekey) identifier_sharekey )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier__make_request) identifier__make_request )attribute (argument_list (string_"GET") string_"GET" (keyword_argument (identifier_endpoint) identifier_endpoint (identifier_endpoint) identifier_endpoint )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (call (attribute (identifier_Comment) identifier_Comment (identifier_NewFromJSON) identifier_NewFromJSON )attribute (argument_list (identifier_c) identifier_c )argument_list )call (for_in_clause (identifier_c) identifier_c (subscript (identifier_data) identifier_data (string_'comments') string_'comments' )subscript )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Retrieve comments on a SharedFile Args: sharekey (str): Sharekey for the file from which you want to return the set of comments. Returns: List of Comment objects.
(module (function_definition (function_name_dependencies_as_list) function_name_dependencies_as_list (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_dependencies) identifier_dependencies (list )list )assignment )expression_statement (for_statement (identifier_dependency) identifier_dependency (attribute (identifier_self) identifier_self (identifier_dependencies) identifier_dependencies )attribute (block (expression_statement (call (attribute (identifier_dependencies) identifier_dependencies (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_dependency) identifier_dependency (identifier_name) identifier_name )attribute )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_dependencies) identifier_dependencies )return_statement )block )function_definition )module
Returns a list of dependency names.
(module (function_definition (function_name_get_gains_losses) function_name_get_gains_losses (parameters (identifier_changes) identifier_changes )parameters (block (expression_statement (assignment (identifier_res) identifier_res (dictionary (pair (string_'gains') string_'gains' (list )list )pair (pair (string_'losses') string_'losses' (list )list )pair )dictionary )assignment )expression_statement (for_statement (identifier_change) identifier_change (identifier_changes) identifier_changes (block (if_statement (comparison_operator (identifier_change) identifier_change (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (subscript (identifier_res) identifier_res (string_'gains') string_'gains' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_change) identifier_change )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (subscript (identifier_res) identifier_res (string_'losses') string_'losses' )subscript (identifier_append) identifier_append )attribute (argument_list (binary_operator (identifier_change) identifier_change (unary_operator (integer_1) integer_1 )unary_operator )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'Gains: {0}') string_'Gains: {0}' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_res) identifier_res (string_'gains') string_'gains' )subscript )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'Losses: {0}') string_'Losses: {0}' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_res) identifier_res (string_'losses') string_'losses' )subscript )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Categorizes changes into gains and losses Args: changes: List of floats of price changes between entries in JSON. Returns: Dict of changes with keys 'gains' and 'losses'. All values are positive.
(module (function_definition (function_name_urlretrieve) function_name_urlretrieve (parameters (identifier_url) identifier_url (identifier_dest) identifier_dest (default_parameter (identifier_write_mode) identifier_write_mode (string_"w") string_"w" )default_parameter )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_urllib2) identifier_urllib2 (identifier_urlopen) identifier_urlopen )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_mkdir_recursive) identifier_mkdir_recursive (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_dest) identifier_dest )argument_list )call )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_dest) identifier_dest (identifier_write_mode) identifier_write_mode )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_response) identifier_response (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
save a file to disk from a given url
(module (function_definition (function_name_upload) function_name_upload (parameters (identifier_client) identifier_client (identifier_source_dir) identifier_source_dir )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'') string_'' )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'upload store listings') string_'upload store listings' )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'---------------------') string_'---------------------' )argument_list )call )expression_statement (expression_statement (assignment (identifier_listings_folder) identifier_listings_folder (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_source_dir) identifier_source_dir (string_'listings') string_'listings' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_langfolders) identifier_langfolders (call (identifier_filter) identifier_filter (argument_list (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (call (identifier_list_dir_abspath) identifier_list_dir_abspath (argument_list (identifier_listings_folder) identifier_listings_folder )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (identifier_language_dir) identifier_language_dir (identifier_langfolders) identifier_langfolders (block (expression_statement (assignment (identifier_language) identifier_language (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_language_dir) identifier_language_dir )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_language_dir) identifier_language_dir (string_'listing.json') string_'listing.json' )argument_list )call )argument_list )call (as_pattern_target (identifier_listings_file) identifier_listings_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_listing) identifier_listing (call (attribute (identifier_json) identifier_json (identifier_load) identifier_load )attribute (argument_list (identifier_listings_file) identifier_listings_file )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (assignment (identifier_listing_response) identifier_listing_response (call (attribute (identifier_client) identifier_client (identifier_update) identifier_update )attribute (argument_list (string_'listings') string_'listings' (keyword_argument (identifier_language) identifier_language (identifier_language) identifier_language )keyword_argument (keyword_argument (identifier_body) identifier_body (identifier_listing) identifier_listing )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_' Listing for language %s was updated.') string_' Listing for language %s was updated.' (subscript (identifier_listing_response) identifier_listing_response (string_'language') string_'language' )subscript )binary_operator )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Upload listing files in source_dir. folder herachy.
(module (function_definition (function_name_from_coffeescript) function_name_from_coffeescript (parameters (identifier_cls) identifier_cls (identifier_func) identifier_func (identifier_v_func) identifier_v_func (default_parameter (identifier_args) identifier_args (dictionary )dictionary )default_parameter )parameters (block (expression_statement (assignment (identifier_compiled) identifier_compiled (call (identifier_nodejs_compile) identifier_nodejs_compile (argument_list (identifier_func) identifier_func (keyword_argument (identifier_lang) identifier_lang (string_"coffeescript") string_"coffeescript" )keyword_argument (keyword_argument (identifier_file) identifier_file (string_"???") string_"???" )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_"error") string_"error" (identifier_compiled) identifier_compiled )comparison_operator (block (raise_statement (call (identifier_CompilationError) identifier_CompilationError (argument_list (attribute (identifier_compiled) identifier_compiled (identifier_error) identifier_error )attribute )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_v_compiled) identifier_v_compiled (call (identifier_nodejs_compile) identifier_nodejs_compile (argument_list (identifier_v_func) identifier_v_func (keyword_argument (identifier_lang) identifier_lang (string_"coffeescript") string_"coffeescript" )keyword_argument (keyword_argument (identifier_file) identifier_file (string_"???") string_"???" )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_"error") string_"error" (identifier_v_compiled) identifier_v_compiled )comparison_operator (block (raise_statement (call (identifier_CompilationError) identifier_CompilationError (argument_list (attribute (identifier_v_compiled) identifier_v_compiled (identifier_error) identifier_error )attribute )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (keyword_argument (identifier_func) identifier_func (attribute (identifier_compiled) identifier_compiled (identifier_code) identifier_code )attribute )keyword_argument (keyword_argument (identifier_v_func) identifier_v_func (attribute (identifier_v_compiled) identifier_v_compiled (identifier_code) identifier_code )attribute )keyword_argument (keyword_argument (identifier_args) identifier_args (identifier_args) identifier_args )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create a ``CustomJSTransform`` instance from a pair of CoffeeScript snippets. The function bodies are translated to JavaScript functions using node and therefore require return statements. The ``func`` snippet namespace will contain the variable ``x`` (the untransformed value) at render time. The ``v_func`` snippet namespace will contain the variable ``xs`` (the untransformed vector) at render time. Example: .. code-block:: coffeescript func = "return Math.cos(x)" v_func = "return [Math.cos(x) for x in xs]" transform = CustomJSTransform.from_coffeescript(func, v_func) Args: func (str) : a coffeescript snippet to transform a single ``x`` value v_func (str) : a coffeescript snippet function to transform a vector ``xs`` Returns: CustomJSTransform
(module (function_definition (function_name_copy) function_name_copy (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_doppel) identifier_doppel (call (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call (argument_list (attribute (identifier_self) identifier_self (identifier_unpack) identifier_unpack )attribute (attribute (identifier_self) identifier_self (identifier_apply) identifier_apply )attribute (attribute (identifier_self) identifier_self (identifier_collect) identifier_collect )attribute (attribute (identifier_self) identifier_self (identifier_reduce) identifier_reduce )attribute (keyword_argument (identifier_apply_empty_slots) identifier_apply_empty_slots (attribute (identifier_self) identifier_self (identifier_apply_empty_slots) identifier_apply_empty_slots )attribute )keyword_argument (keyword_argument (identifier_extraneous) identifier_extraneous (attribute (identifier_self) identifier_self (identifier_extraneous) identifier_extraneous )attribute )keyword_argument (keyword_argument (identifier_ignore_empty_string) identifier_ignore_empty_string (attribute (identifier_self) identifier_self (identifier_ignore_empty_string) identifier_ignore_empty_string )attribute )keyword_argument (keyword_argument (identifier_ignore_none) identifier_ignore_none (attribute (identifier_self) identifier_self (identifier_ignore_none) identifier_ignore_none )attribute )keyword_argument (keyword_argument (identifier_visit_filter) identifier_visit_filter (attribute (identifier_self) identifier_self (identifier_visit_filter) identifier_visit_filter )attribute )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_cue) identifier_cue )attribute (block (expression_statement (call (attribute (identifier_doppel) identifier_doppel (identifier_push) identifier_push )attribute (argument_list (identifier_x) identifier_x )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_doppel) identifier_doppel (identifier_seen) identifier_seen )attribute (attribute (identifier_self) identifier_self (identifier_seen) identifier_seen )attribute )assignment )expression_statement (return_statement (identifier_doppel) identifier_doppel )return_statement )block )function_definition )module
Be sure to implement this method when sub-classing, otherwise you will lose any specialization context.
(module (function_definition (function_name__related) function_name__related (parameters (identifier_self) identifier_self (identifier_concept) identifier_concept )parameters (block (return_statement (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (call (attribute (identifier_concept) identifier_concept (identifier_hypernyms) identifier_hypernyms )attribute (argument_list )argument_list )call (line_continuation_\) line_continuation_\ (call (attribute (identifier_concept) identifier_concept (identifier_hyponyms) identifier_hyponyms )attribute (argument_list )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_concept) identifier_concept (identifier_member_meronyms) identifier_member_meronyms )attribute (argument_list )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_concept) identifier_concept (identifier_substance_meronyms) identifier_substance_meronyms )attribute (argument_list )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_concept) identifier_concept (identifier_part_meronyms) identifier_part_meronyms )attribute (argument_list )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_concept) identifier_concept (identifier_member_holonyms) identifier_member_holonyms )attribute (argument_list )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_concept) identifier_concept (identifier_substance_holonyms) identifier_substance_holonyms )attribute (argument_list )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_concept) identifier_concept (identifier_part_holonyms) identifier_part_holonyms )attribute (argument_list )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_concept) identifier_concept (identifier_attributes) identifier_attributes )attribute (argument_list )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_concept) identifier_concept (identifier_also_sees) identifier_also_sees )attribute (argument_list )argument_list )call )binary_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_concept) identifier_concept (identifier_similar_tos) identifier_similar_tos )attribute (argument_list )argument_list )call )binary_operator )return_statement )block )function_definition )module
Returns related concepts for a concept.
(module (function_definition (function_name_update_team) function_name_update_team (parameters (identifier_self) identifier_self (identifier_slug) identifier_slug )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__org) identifier__org )attribute (block (if_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier__org) identifier__org )attribute (identifier_has_team) identifier_has_team )attribute (argument_list (identifier_slug) identifier_slug )argument_list )call )not_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__org) identifier__org )attribute (identifier_update) identifier_update )attribute (argument_list )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__org) identifier__org )attribute (identifier_update_team) identifier_update_team )attribute (argument_list (identifier_slug) identifier_slug )argument_list )call )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Trigger update and cache invalidation for the team identified by the given `slug`, if any. Returns `True` if the update was successful, `False` otherwise. :param slug: GitHub 'slug' name for the team to be updated.
(module (function_definition (function_name_get_right_word) function_name_get_right_word (parameters (identifier_self) identifier_self (default_parameter (identifier_cursor) identifier_cursor (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_cursor) identifier_cursor (None) None )comparison_operator (block (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (attribute (identifier_self) identifier_self (identifier__editor) identifier__editor )attribute (identifier_textCursor) identifier_textCursor )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_movePosition) identifier_movePosition )attribute (argument_list (attribute (attribute (identifier_QtGui) identifier_QtGui (identifier_QTextCursor) identifier_QTextCursor )attribute (identifier_WordRight) identifier_WordRight )attribute (attribute (attribute (identifier_QtGui) identifier_QtGui (identifier_QTextCursor) identifier_QTextCursor )attribute (identifier_KeepAnchor) identifier_KeepAnchor )attribute )argument_list )call )expression_statement (return_statement (call (attribute (call (attribute (identifier_cursor) identifier_cursor (identifier_selectedText) identifier_selectedText )attribute (argument_list )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Gets the character on the right of the text cursor. :param cursor: QTextCursor where the search will start. :return: The word that is on the right of the text cursor.
(module (function_definition (function_name_run) function_name_run (parameters (identifier_self) identifier_self (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_jlink) identifier_jlink (call (attribute (identifier_self) identifier_self (identifier_create_jlink) identifier_create_jlink )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_args) identifier_args (identifier_downgrade) identifier_downgrade )attribute (block (if_statement (not_operator (call (attribute (identifier_jlink) identifier_jlink (identifier_firmware_newer) identifier_firmware_newer )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'DLL firmware is not older than J-Link firmware.') string_'DLL firmware is not older than J-Link firmware.' )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_jlink) identifier_jlink (identifier_invalidate_firmware) identifier_invalidate_firmware )attribute (argument_list )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_jlink) identifier_jlink (identifier_update_firmware) identifier_update_firmware )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_pylink) identifier_pylink (identifier_JLinkException) identifier_JLinkException )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_jlink) identifier_jlink (call (attribute (identifier_self) identifier_self (identifier_create_jlink) identifier_create_jlink )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'Firmware Downgraded: %s') string_'Firmware Downgraded: %s' (attribute (identifier_jlink) identifier_jlink (identifier_firmware_version) identifier_firmware_version )attribute )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block (elif_clause (attribute (identifier_args) identifier_args (identifier_upgrade) identifier_upgrade )attribute (block (if_statement (not_operator (call (attribute (identifier_jlink) identifier_jlink (identifier_firmware_outdated) identifier_firmware_outdated )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'DLL firmware is not newer than J-Link firmware.') string_'DLL firmware is not newer than J-Link firmware.' )argument_list )call )expression_statement )block (else_clause (block (try_statement (block (expression_statement (call (attribute (identifier_jlink) identifier_jlink (identifier_update_firmware) identifier_update_firmware )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_pylink) identifier_pylink (identifier_JLinkException) identifier_JLinkException )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_jlink) identifier_jlink (call (attribute (identifier_self) identifier_self (identifier_create_jlink) identifier_create_jlink )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'Firmware Updated: %s') string_'Firmware Updated: %s' (attribute (identifier_jlink) identifier_jlink (identifier_firmware_version) identifier_firmware_version )attribute )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )elif_clause )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Runs the firmware command. Args: self (FirmwareCommand): the ``FirmwareCommand`` instance args (Namespace): arguments to parse Returns: ``None``
(module (function_definition (function_name_max_zoom) function_name_max_zoom (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_zoom_levels) identifier_zoom_levels (list_comprehension (attribute (identifier_map_layer) identifier_map_layer (identifier_max_zoom) identifier_max_zoom )attribute (for_in_clause (identifier_map_layer) identifier_map_layer (attribute (identifier_self) identifier_self (identifier_layers) identifier_layers )attribute )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (call (identifier_max) identifier_max (argument_list (identifier_zoom_levels) identifier_zoom_levels )argument_list )call )return_statement )block )function_definition )module
Get the maximal zoom level of all layers. Returns: int: the maximum of all zoom levels of all layers Raises: ValueError: if no layers exist
(module (function_definition (function_name__cancel_payloads) function_name__cancel_payloads (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_task) identifier_task (attribute (identifier_self) identifier_self (identifier__tasks) identifier__tasks )attribute (block (expression_statement (call (attribute (identifier_task) identifier_task (identifier_cancel) identifier_cancel )attribute (argument_list )argument_list )call )expression_statement (expression_statement (await (call (attribute (identifier_asyncio) identifier_asyncio (identifier_sleep) identifier_sleep )attribute (argument_list (integer_0) integer_0 )argument_list )call )await )expression_statement )block )for_statement (for_statement (identifier_task) identifier_task (attribute (identifier_self) identifier_self (identifier__tasks) identifier__tasks )attribute (block (while_statement (not_operator (call (attribute (identifier_task) identifier_task (identifier_done) identifier_done )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (await (call (attribute (identifier_asyncio) identifier_asyncio (identifier_sleep) identifier_sleep )attribute (argument_list (float_0.1) float_0.1 )argument_list )call )await )expression_statement (expression_statement (call (attribute (identifier_task) identifier_task (identifier_cancel) identifier_cancel )attribute (argument_list )argument_list )call )expression_statement )block )while_statement )block )for_statement )block )function_definition )module
Cancel all remaining payloads
(module (function_definition (function_name_ensure_float_vector) function_name_ensure_float_vector (parameters (identifier_F) identifier_F (default_parameter (identifier_require_order) identifier_require_order (False) False )default_parameter )parameters (block (if_statement (call (identifier_is_float_vector) identifier_is_float_vector (argument_list (identifier_F) identifier_F )argument_list )call (block (return_statement (identifier_F) identifier_F )return_statement )block (elif_clause (call (identifier_is_float) identifier_is_float (argument_list (identifier_F) identifier_F )argument_list )call (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list (identifier_F) identifier_F )list )argument_list )call )return_statement )block )elif_clause (elif_clause (call (identifier_is_iterable_of_float) identifier_is_iterable_of_float (argument_list (identifier_F) identifier_F )argument_list )call (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_F) identifier_F )argument_list )call )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_F) identifier_F (identifier_set) identifier_set )argument_list )call (block (if_statement (identifier_require_order) identifier_require_order (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'Argument is an unordered set, but I require an ordered array of floats') string_'Argument is an unordered set, but I require an ordered array of floats' )argument_list )call )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_lF) identifier_lF (call (identifier_list) identifier_list (argument_list (identifier_F) identifier_F )argument_list )call )assignment )expression_statement (if_statement (call (identifier_is_list_of_float) identifier_is_list_of_float (argument_list (identifier_lF) identifier_lF )argument_list )call (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_lF) identifier_lF )argument_list )call )return_statement )block )if_statement )block )else_clause )if_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'Argument is not of a type that is convertible to an array of floats.') string_'Argument is not of a type that is convertible to an array of floats.' )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Ensures that F is a numpy array of floats If F is already a numpy array of floats, F is returned (no copied!) Otherwise, checks if the argument can be converted to an array of floats and does that. Parameters ---------- F: float, or iterable of float require_order : bool If False (default), an unordered set is accepted. If True, a set is not accepted. Returns ------- arr : ndarray(n) numpy array with the floats contained in the argument
(module (function_definition (function_name_moveto) function_name_moveto (parameters (identifier_self) identifier_self (identifier_x) identifier_x (identifier_y) identifier_y (default_parameter (identifier_scale) identifier_scale (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (identifier_set) identifier_set )attribute (argument_list (string_"transform") string_"transform" (binary_operator (string_"translate(%s, %s) scale(%s) %s") string_"translate(%s, %s) scale(%s) %s" (tuple (identifier_x) identifier_x (identifier_y) identifier_y (identifier_scale) identifier_scale (boolean_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (identifier_get) identifier_get )attribute (argument_list (string_"transform") string_"transform" )argument_list )call (string_'') string_'' )boolean_operator )tuple )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Move and scale element. Parameters ---------- x, y : float displacement in x and y coordinates in user units ('px'). scale : float scaling factor. To scale down scale < 1, scale up scale > 1. For no scaling scale = 1.
(module (function_definition (function_name_custom_objective) function_name_custom_objective (parameters (identifier_self) identifier_self (identifier_objective_function) identifier_objective_function (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_sco) identifier_sco (identifier_minimize) identifier_minimize )attribute (argument_list (identifier_objective_function) identifier_objective_function (keyword_argument (identifier_x0) identifier_x0 (attribute (identifier_self) identifier_self (identifier_initial_guess) identifier_initial_guess )attribute )keyword_argument (keyword_argument (identifier_args) identifier_args (identifier_args) identifier_args )keyword_argument (keyword_argument (identifier_method) identifier_method (string_"SLSQP") string_"SLSQP" )keyword_argument (keyword_argument (identifier_bounds) identifier_bounds (attribute (identifier_self) identifier_self (identifier_bounds) identifier_bounds )attribute )keyword_argument (keyword_argument (identifier_constraints) identifier_constraints (attribute (identifier_self) identifier_self (identifier_constraints) identifier_constraints )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_weights) identifier_weights )attribute (subscript (identifier_result) identifier_result (string_"x") string_"x" )subscript )assignment )expression_statement (return_statement (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (attribute (identifier_self) identifier_self (identifier_tickers) identifier_tickers )attribute (attribute (identifier_self) identifier_self (identifier_weights) identifier_weights )attribute )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Optimise some objective function. While an implicit requirement is that the function can be optimised via a quadratic optimiser, this is not enforced. Thus there is a decent chance of silent failure. :param objective_function: function which maps (weight, args) -> cost :type objective_function: function with signature (np.ndarray, args) -> float :return: asset weights that optimise the custom objective :rtype: dict
(module (function_definition (function_name_extract_fields) function_name_extract_fields (parameters (identifier_cls) identifier_cls (identifier_schema) identifier_schema )parameters (block (for_statement (identifier_part) identifier_part (call (attribute (attribute (identifier_parse) identifier_parse (identifier_PARSE_RE) identifier_PARSE_RE )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_schema) identifier_schema )argument_list )call (block (if_statement (boolean_operator (boolean_operator (not_operator (identifier_part) identifier_part )not_operator (comparison_operator (identifier_part) identifier_part (string_'{{') string_'{{' )comparison_operator )boolean_operator (comparison_operator (identifier_part) identifier_part (string_'}}') string_'}}' )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block (elif_clause (comparison_operator (subscript (identifier_part) identifier_part (integer_0) integer_0 )subscript (string_'{') string_'{' )comparison_operator (block (expression_statement (yield (call (attribute (identifier_cls) identifier_cls (identifier_parse) identifier_parse )attribute (argument_list (identifier_part) identifier_part )argument_list )call )yield )expression_statement )block )elif_clause )if_statement )block )for_statement )block )function_definition )module
Extract fields in a parse expression schema. :param schema: Parse expression schema/format to use (as string). :return: Generator for fields in schema (as Field objects).
(module (function_definition (function_name_dummynum) function_name_dummynum (parameters (identifier_character) identifier_character (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_num) identifier_num (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_nodename) identifier_nodename (attribute (identifier_character) identifier_character (identifier_node) identifier_node )attribute (block (expression_statement (assignment (identifier_nodename) identifier_nodename (call (identifier_str) identifier_str (argument_list (identifier_nodename) identifier_nodename )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_nodename) identifier_nodename (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_name) identifier_name )argument_list )call )not_operator (block (continue_statement )continue_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_nodenum) identifier_nodenum (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_nodename) identifier_nodename (identifier_lstrip) identifier_lstrip )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (continue_statement )continue_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_num) identifier_num (call (identifier_max) identifier_max (argument_list (tuple (identifier_nodenum) identifier_nodenum (identifier_num) identifier_num )tuple )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_num) identifier_num )return_statement )block )function_definition )module
Count how many nodes there already are in the character whose name starts the same.
(module (function_definition (function_name_remove_stage_from_deployed_values) function_name_remove_stage_from_deployed_values (parameters (identifier_key) identifier_key (identifier_filename) identifier_filename )parameters (block (expression_statement (assignment (identifier_final_values) identifier_final_values (dictionary )dictionary )assignment )expression_statement (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_final_values) identifier_final_values (call (attribute (identifier_json) identifier_json (identifier_load) identifier_load )attribute (argument_list (identifier_f) identifier_f )argument_list )call )assignment )expression_statement )block )with_statement )block (except_clause (identifier_IOError) identifier_IOError (block (return_statement )return_statement )block )except_clause )try_statement (try_statement (block (delete_statement (subscript (identifier_final_values) identifier_final_values (identifier_key) identifier_key )subscript )delete_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'wb') string_'wb' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier_serialize_to_json) identifier_serialize_to_json (argument_list (identifier_final_values) identifier_final_values )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_data) identifier_data (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )expression_statement )block )with_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
Delete a top level key from the deployed JSON file.
(module (function_definition (function_name_install) function_name_install (parameters )parameters (block (expression_statement (assignment (identifier_ceph_dir) identifier_ceph_dir (string_"/etc/ceph") string_"/etc/ceph" )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_ceph_dir) identifier_ceph_dir )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_mkdir) identifier_mkdir )attribute (argument_list (identifier_ceph_dir) identifier_ceph_dir )argument_list )call )expression_statement )block )if_statement (expression_statement (call (identifier_apt_install) identifier_apt_install (argument_list (string_'ceph-common') string_'ceph-common' (keyword_argument (identifier_fatal) identifier_fatal (True) True )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Basic Ceph client installation.
(module (function_definition (function_name__print_pgfplot_libs_message) function_name__print_pgfplot_libs_message (parameters (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_pgfplotslibs) identifier_pgfplotslibs (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (call (identifier_list) identifier_list (argument_list (subscript (identifier_data) identifier_data (string_"pgfplots libs") string_"pgfplots libs" )subscript )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tikzlibs) identifier_tikzlibs (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (call (identifier_list) identifier_list (argument_list (subscript (identifier_data) identifier_data (string_"tikz libs") string_"tikz libs" )subscript )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (integer_70) integer_70 (string_"=") string_"=" )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Please add the following lines to your LaTeX preamble:\n") string_"Please add the following lines to your LaTeX preamble:\n" )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"\\usepackage[utf8]{inputenc}") string_"\\usepackage[utf8]{inputenc}" )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"\\usepackage{fontspec} % This line only for XeLaTeX and LuaLaTeX") string_"\\usepackage{fontspec} % This line only for XeLaTeX and LuaLaTeX" )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"\\usepackage{pgfplots}") string_"\\usepackage{pgfplots}" )argument_list )call )expression_statement (if_statement (identifier_tikzlibs) identifier_tikzlibs (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (binary_operator (string_"\\usetikzlibrary{") string_"\\usetikzlibrary{" (identifier_tikzlibs) identifier_tikzlibs )binary_operator (string_"}") string_"}" )binary_operator )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_pgfplotslibs) identifier_pgfplotslibs (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (binary_operator (string_"\\usepgfplotslibrary{") string_"\\usepgfplotslibrary{" (identifier_pgfplotslibs) identifier_pgfplotslibs )binary_operator (string_"}") string_"}" )binary_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (integer_70) integer_70 (string_"=") string_"=" )binary_operator )argument_list )call )expression_statement (return_statement )return_statement )block )function_definition )module
Prints message to screen indicating the use of PGFPlots and its libraries.
(module (function_definition (function_name_get_signing_policy) function_name_get_signing_policy (parameters (identifier_signing_policy_name) identifier_signing_policy_name )parameters (block (expression_statement (assignment (identifier_signing_policy) identifier_signing_policy (call (identifier__get_signing_policy) identifier__get_signing_policy (argument_list (identifier_signing_policy_name) identifier_signing_policy_name )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_signing_policy) identifier_signing_policy )not_operator (block (return_statement (call (attribute (string_'Signing policy {0} does not exist.') string_'Signing policy {0} does not exist.' (identifier_format) identifier_format )attribute (argument_list (identifier_signing_policy_name) identifier_signing_policy_name )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_signing_policy) identifier_signing_policy (identifier_list) identifier_list )argument_list )call (block (expression_statement (assignment (identifier_dict_) identifier_dict_ (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_item) identifier_item (identifier_signing_policy) identifier_signing_policy (block (expression_statement (call (attribute (identifier_dict_) identifier_dict_ (identifier_update) identifier_update )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_signing_policy) identifier_signing_policy (identifier_dict_) identifier_dict_ )assignment )expression_statement )block )if_statement (try_statement (block (delete_statement (subscript (identifier_signing_policy) identifier_signing_policy (string_'signing_private_key') string_'signing_private_key' )subscript )delete_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (subscript (identifier_signing_policy) identifier_signing_policy (string_'signing_cert') string_'signing_cert' )subscript (call (identifier_get_pem_entry) identifier_get_pem_entry (argument_list (subscript (identifier_signing_policy) identifier_signing_policy (string_'signing_cert') string_'signing_cert' )subscript (string_'CERTIFICATE') string_'CERTIFICATE' )argument_list )call )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Unable to get "certificate" PEM entry') string_'Unable to get "certificate" PEM entry' )argument_list )call )expression_statement )block )except_clause )try_statement (return_statement (identifier_signing_policy) identifier_signing_policy )return_statement )block )function_definition )module
Returns the details of a names signing policy, including the text of the public key that will be used to sign it. Does not return the private key. CLI Example: .. code-block:: bash salt '*' x509.get_signing_policy www
(module (function_definition (function_name_get_computers) function_name_get_computers (parameters (identifier_self) identifier_self (default_parameter (identifier_filterTerm) identifier_filterTerm (None) None )default_parameter (default_parameter (identifier_domain) identifier_domain (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_cur) identifier_cur (call (attribute (attribute (identifier_self) identifier_self (identifier_conn) identifier_conn )attribute (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_is_computer_valid) identifier_is_computer_valid )attribute (argument_list (identifier_filterTerm) identifier_filterTerm )argument_list )call (block (expression_statement (call (attribute (identifier_cur) identifier_cur (identifier_execute) identifier_execute )attribute (argument_list (string_"SELECT * FROM computers WHERE id=? LIMIT 1") string_"SELECT * FROM computers WHERE id=? LIMIT 1" (list (identifier_filterTerm) identifier_filterTerm )list )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_filterTerm) identifier_filterTerm (string_'dc') string_'dc' )comparison_operator (block (if_statement (identifier_domain) identifier_domain (block (expression_statement (call (attribute (identifier_cur) identifier_cur (identifier_execute) identifier_execute )attribute (argument_list (string_"SELECT * FROM computers WHERE dc=1 AND LOWER(domain)=LOWER(?)") string_"SELECT * FROM computers WHERE dc=1 AND LOWER(domain)=LOWER(?)" (list (identifier_domain) identifier_domain )list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_cur) identifier_cur (identifier_execute) identifier_execute )attribute (argument_list (string_"SELECT * FROM computers WHERE dc=1") string_"SELECT * FROM computers WHERE dc=1" )argument_list )call )expression_statement )block )else_clause )if_statement )block )elif_clause (elif_clause (boolean_operator (identifier_filterTerm) identifier_filterTerm (comparison_operator (identifier_filterTerm) identifier_filterTerm (string_"") string_"" )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_cur) identifier_cur (identifier_execute) identifier_execute )attribute (argument_list (string_"SELECT * FROM computers WHERE ip LIKE ? OR LOWER(hostname) LIKE LOWER(?)") string_"SELECT * FROM computers WHERE ip LIKE ? OR LOWER(hostname) LIKE LOWER(?)" (list (call (attribute (string_'%{}%') string_'%{}%' (identifier_format) identifier_format )attribute (argument_list (identifier_filterTerm) identifier_filterTerm )argument_list )call (call (attribute (string_'%{}%') string_'%{}%' (identifier_format) identifier_format )attribute (argument_list (identifier_filterTerm) identifier_filterTerm )argument_list )call )list )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_cur) identifier_cur (identifier_execute) identifier_execute )attribute (argument_list (string_"SELECT * FROM computers") string_"SELECT * FROM computers" )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_results) identifier_results (call (attribute (identifier_cur) identifier_cur (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cur) identifier_cur (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Return hosts from the database.
(module (function_definition (function_name_getConstraints) function_name_getConstraints (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_constraints) identifier_constraints (call (identifier_lock_and_call) identifier_lock_and_call (argument_list (lambda (call (attribute (attribute (identifier_self) identifier_self (identifier__impl) identifier__impl )attribute (identifier_getConstraints) identifier_getConstraints )attribute (argument_list )argument_list )call )lambda (attribute (identifier_self) identifier_self (identifier__lock) identifier__lock )attribute )argument_list )call )assignment )expression_statement (return_statement (call (identifier_EntityMap) identifier_EntityMap (argument_list (identifier_constraints) identifier_constraints (identifier_Constraint) identifier_Constraint )argument_list )call )return_statement )block )function_definition )module
Get all the constraints declared.
(module (function_definition (function_name_end_of_directory) function_name_end_of_directory (parameters (identifier_self) identifier_self (default_parameter (identifier_succeeded) identifier_succeeded (True) True )default_parameter (default_parameter (identifier_update_listing) identifier_update_listing (False) False )default_parameter (default_parameter (identifier_cache_to_disc) identifier_cache_to_disc (True) True )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__update_listing) identifier__update_listing )attribute (identifier_update_listing) identifier_update_listing )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__end_of_directory) identifier__end_of_directory )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__end_of_directory) identifier__end_of_directory )attribute (True) True )assignment )expression_statement (return_statement (call (attribute (identifier_xbmcplugin) identifier_xbmcplugin (identifier_endOfDirectory) identifier_endOfDirectory )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (identifier_succeeded) identifier_succeeded (identifier_update_listing) identifier_update_listing (identifier_cache_to_disc) identifier_cache_to_disc )argument_list )call )return_statement )block )if_statement (assert_statement (False) False (string_'Already called endOfDirectory.') string_'Already called endOfDirectory.' )assert_statement )block )function_definition )module
Wrapper for xbmcplugin.endOfDirectory. Records state in self._end_of_directory. Typically it is not necessary to call this method directly, as calling :meth:`~xbmcswift2.Plugin.finish` will call this method.
(module (function_definition (function_name_new_port) function_name_new_port (parameters )parameters (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_socket) identifier_socket (identifier_socket) identifier_socket )attribute (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_INET) identifier_AF_INET )attribute (attribute (identifier_socket) identifier_socket (identifier_SOCK_STREAM) identifier_SOCK_STREAM )attribute (attribute (identifier_socket) identifier_socket (identifier_IPPROTO_TCP) identifier_IPPROTO_TCP )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_12042) integer_12042 (integer_16042) integer_16042 )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_s) identifier_s (identifier_bind) identifier_bind )attribute (argument_list (tuple (string_'127.0.0.1') string_'127.0.0.1' (identifier_i) identifier_i )tuple )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_s) identifier_s (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_i) identifier_i )return_statement )block (except_clause (attribute (identifier_socket) identifier_socket (identifier_error) identifier_error )attribute (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_'No local port available') string_'No local port available' )argument_list )call )raise_statement )block )function_definition )module
Find a free local port and allocate it
(module (function_definition (function_name_set_parameter_vector) function_name_set_parameter_vector (parameters (identifier_self) identifier_self (identifier_vector) identifier_vector (default_parameter (identifier_include_frozen) identifier_include_frozen (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_v) identifier_v (attribute (identifier_self) identifier_self (identifier_parameter_vector) identifier_parameter_vector )attribute )assignment )expression_statement (if_statement (identifier_include_frozen) identifier_include_frozen (block (expression_statement (assignment (subscript (identifier_v) identifier_v (slice (colon) colon )slice )subscript (identifier_vector) identifier_vector )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_v) identifier_v (attribute (identifier_self) identifier_self (identifier_unfrozen_mask) identifier_unfrozen_mask )attribute )subscript (identifier_vector) identifier_vector )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_parameter_vector) identifier_parameter_vector )attribute (identifier_v) identifier_v )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_dirty) identifier_dirty )attribute (True) True )assignment )expression_statement )block )function_definition )module
Set the parameter values to the given vector Args: vector (array[vector_size] or array[full_size]): The target parameter vector. This must be in the same order as ``parameter_names`` and it should only include frozen parameters if ``include_frozen`` is ``True``. include_frozen (Optional[bool]): Should the frozen parameters be included in the returned value? (default: ``False``)
(module (function_definition (function_name_printmp) function_name_printmp (parameters (identifier_msg) identifier_msg )parameters (block (expression_statement (assignment (identifier_filler) identifier_filler (binary_operator (parenthesized_expression (binary_operator (integer_80) integer_80 (call (identifier_len) identifier_len (argument_list (identifier_msg) identifier_msg )argument_list )call )binary_operator )parenthesized_expression (string_' ') string_' ' )binary_operator )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (identifier_msg) identifier_msg (identifier_filler) identifier_filler )binary_operator (keyword_argument (identifier_end) identifier_end (string_'\r') string_'\r' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Print temporarily, until next print overrides it.
(module (function_definition (function_name_remove_zero_normals) function_name_remove_zero_normals (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_points_of_interest) identifier_points_of_interest (subscript (call (attribute (identifier_np) identifier_np (identifier_where) identifier_where )attribute (argument_list (comparison_operator (call (attribute (attribute (identifier_np) identifier_np (identifier_linalg) identifier_linalg )attribute (identifier_norm) identifier_norm )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call (float_0.0) float_0.0 )comparison_operator )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute (subscript (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute (slice (colon) colon )slice (identifier_points_of_interest) identifier_points_of_interest )subscript )assignment )expression_statement )block )function_definition )module
Removes normal vectors with a zero magnitude. Note ---- This returns nothing and updates the NormalCloud in-place.
(module (function_definition (function_name_get_model) function_name_get_model (parameters (identifier_name) identifier_name (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_models) identifier_models (dictionary (pair (string_'resnet18_v1') string_'resnet18_v1' (identifier_resnet18_v1) identifier_resnet18_v1 )pair (pair (string_'resnet34_v1') string_'resnet34_v1' (identifier_resnet34_v1) identifier_resnet34_v1 )pair (pair (string_'resnet50_v1') string_'resnet50_v1' (identifier_resnet50_v1) identifier_resnet50_v1 )pair (pair (string_'resnet101_v1') string_'resnet101_v1' (identifier_resnet101_v1) identifier_resnet101_v1 )pair (pair (string_'resnet152_v1') string_'resnet152_v1' (identifier_resnet152_v1) identifier_resnet152_v1 )pair (pair (string_'resnet18_v2') string_'resnet18_v2' (identifier_resnet18_v2) identifier_resnet18_v2 )pair (pair (string_'resnet34_v2') string_'resnet34_v2' (identifier_resnet34_v2) identifier_resnet34_v2 )pair (pair (string_'resnet50_v2') string_'resnet50_v2' (identifier_resnet50_v2) identifier_resnet50_v2 )pair (pair (string_'resnet101_v2') string_'resnet101_v2' (identifier_resnet101_v2) identifier_resnet101_v2 )pair (pair (string_'resnet152_v2') string_'resnet152_v2' (identifier_resnet152_v2) identifier_resnet152_v2 )pair (pair (string_'vgg11') string_'vgg11' (identifier_vgg11) identifier_vgg11 )pair (pair (string_'vgg13') string_'vgg13' (identifier_vgg13) identifier_vgg13 )pair (pair (string_'vgg16') string_'vgg16' (identifier_vgg16) identifier_vgg16 )pair (pair (string_'vgg19') string_'vgg19' (identifier_vgg19) identifier_vgg19 )pair (pair (string_'vgg11_bn') string_'vgg11_bn' (identifier_vgg11_bn) identifier_vgg11_bn )pair (pair (string_'vgg13_bn') string_'vgg13_bn' (identifier_vgg13_bn) identifier_vgg13_bn )pair (pair (string_'vgg16_bn') string_'vgg16_bn' (identifier_vgg16_bn) identifier_vgg16_bn )pair (pair (string_'vgg19_bn') string_'vgg19_bn' (identifier_vgg19_bn) identifier_vgg19_bn )pair (pair (string_'alexnet') string_'alexnet' (identifier_alexnet) identifier_alexnet )pair (pair (string_'densenet121') string_'densenet121' (identifier_densenet121) identifier_densenet121 )pair (pair (string_'densenet161') string_'densenet161' (identifier_densenet161) identifier_densenet161 )pair (pair (string_'densenet169') string_'densenet169' (identifier_densenet169) identifier_densenet169 )pair (pair (string_'densenet201') string_'densenet201' (identifier_densenet201) identifier_densenet201 )pair (pair (string_'squeezenet1.0') string_'squeezenet1.0' (identifier_squeezenet1_0) identifier_squeezenet1_0 )pair (pair (string_'squeezenet1.1') string_'squeezenet1.1' (identifier_squeezenet1_1) identifier_squeezenet1_1 )pair (pair (string_'inceptionv3') string_'inceptionv3' (identifier_inception_v3) identifier_inception_v3 )pair (pair (string_'mobilenet1.0') string_'mobilenet1.0' (identifier_mobilenet1_0) identifier_mobilenet1_0 )pair (pair (string_'mobilenet0.75') string_'mobilenet0.75' (identifier_mobilenet0_75) identifier_mobilenet0_75 )pair (pair (string_'mobilenet0.5') string_'mobilenet0.5' (identifier_mobilenet0_5) identifier_mobilenet0_5 )pair (pair (string_'mobilenet0.25') string_'mobilenet0.25' (identifier_mobilenet0_25) identifier_mobilenet0_25 )pair (pair (string_'mobilenetv2_1.0') string_'mobilenetv2_1.0' (identifier_mobilenet_v2_1_0) identifier_mobilenet_v2_1_0 )pair (pair (string_'mobilenetv2_0.75') string_'mobilenetv2_0.75' (identifier_mobilenet_v2_0_75) identifier_mobilenet_v2_0_75 )pair (pair (string_'mobilenetv2_0.5') string_'mobilenetv2_0.5' (identifier_mobilenet_v2_0_5) identifier_mobilenet_v2_0_5 )pair (pair (string_'mobilenetv2_0.25') string_'mobilenetv2_0.25' (identifier_mobilenet_v2_0_25) identifier_mobilenet_v2_0_25 )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_name) identifier_name (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_name) identifier_name (identifier_models) identifier_models )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'Model %s is not supported. Available options are\n\t%s') string_'Model %s is not supported. Available options are\n\t%s' (tuple (identifier_name) identifier_name (call (attribute (string_'\n\t') string_'\n\t' (identifier_join) identifier_join )attribute (argument_list (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_models) identifier_models (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (call (subscript (identifier_models) identifier_models (identifier_name) identifier_name )subscript (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Returns a pre-defined model by name Parameters ---------- name : str Name of the model. pretrained : bool Whether to load the pretrained weights for model. classes : int Number of classes for the output layer. ctx : Context, default CPU The context in which to load the pretrained weights. root : str, default '$MXNET_HOME/models' Location for keeping the model parameters. Returns ------- HybridBlock The model.
(module (function_definition (function_name__agate_to_schema) function_name__agate_to_schema (parameters (identifier_self) identifier_self (identifier_agate_table) identifier_agate_table (identifier_column_override) identifier_column_override )parameters (block (expression_statement (assignment (identifier_bq_schema) identifier_bq_schema (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_idx) identifier_idx (identifier_col_name) identifier_col_name )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_agate_table) identifier_agate_table (identifier_column_names) identifier_column_names )attribute )argument_list )call (block (expression_statement (assignment (identifier_inferred_type) identifier_inferred_type (call (attribute (identifier_self) identifier_self (identifier_convert_agate_type) identifier_convert_agate_type )attribute (argument_list (identifier_agate_table) identifier_agate_table (identifier_idx) identifier_idx )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_type_) identifier_type_ (call (attribute (identifier_column_override) identifier_column_override (identifier_get) identifier_get )attribute (argument_list (identifier_col_name) identifier_col_name (identifier_inferred_type) identifier_inferred_type )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_bq_schema) identifier_bq_schema (identifier_append) identifier_append )attribute (argument_list (call (attribute (attribute (attribute (identifier_google) identifier_google (identifier_cloud) identifier_cloud )attribute (identifier_bigquery) identifier_bigquery )attribute (identifier_SchemaField) identifier_SchemaField )attribute (argument_list (identifier_col_name) identifier_col_name (identifier_type_) identifier_type_ )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_bq_schema) identifier_bq_schema )return_statement )block )function_definition )module
Convert agate.Table with column names to a list of bigquery schemas.
(module (function_definition (function_name_tag_syntax_maltparser) function_name_tag_syntax_maltparser (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier___syntactic_parser) identifier___syntactic_parser )attribute )not_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier___syntactic_parser) identifier___syntactic_parser )attribute (identifier_MaltParser) identifier_MaltParser )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___syntactic_parser) identifier___syntactic_parser )attribute (call (identifier_MaltParser) identifier_MaltParser (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_tag_syntax) identifier_tag_syntax )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Changes default syntactic parser to MaltParser, performs syntactic analysis, and stores the results in the layer named LAYER_CONLL.
(module (function_definition (function_name_read_until) function_name_read_until (parameters (identifier_self) identifier_self (identifier_expected_commands) identifier_expected_commands (identifier_timeout) identifier_timeout )parameters (block (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (identifier_timeouts) identifier_timeouts (identifier_loop_until_timeout_or_valid) identifier_loop_until_timeout_or_valid )attribute (argument_list (identifier_timeout) identifier_timeout (lambda (call (attribute (identifier_self) identifier_self (identifier_read_message) identifier_read_message )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call )lambda (lambda (lambda_parameters (identifier_m) identifier_m )lambda_parameters (comparison_operator (attribute (identifier_m) identifier_m (identifier_command) identifier_command )attribute (identifier_expected_commands) identifier_expected_commands )comparison_operator )lambda (integer_0) integer_0 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_msg) identifier_msg (identifier_command) identifier_command )attribute (identifier_expected_commands) identifier_expected_commands )comparison_operator (block (raise_statement (call (attribute (identifier_usb_exceptions) identifier_usb_exceptions (identifier_AdbTimeoutError) identifier_AdbTimeoutError )attribute (argument_list (string_'Timed out establishing connection, waiting for: %s') string_'Timed out establishing connection, waiting for: %s' (identifier_expected_commands) identifier_expected_commands )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_msg) identifier_msg )return_statement )block )function_definition )module
Read AdbMessages from this transport until we get an expected command. The ADB protocol specifies that before a successful CNXN handshake, any other packets must be ignored, so this method provides the ability to ignore unwanted commands. It's primarily used during the initial connection to the device. See Read() for more details, including more exceptions that may be raised. Args: expected_commands: Iterable of expected command responses, like ('CNXN', 'AUTH'). timeout: timeouts.PolledTimeout object to use for timeout. Returns: The ADB message received that matched one of expected_commands. Raises: AdbProtocolError: If timeout expires between reads, this can happen if we are getting spammed with unexpected commands.
(module (function_definition (function_name_match_route) function_name_match_route (parameters (identifier_self) identifier_self (identifier_reqpath) identifier_reqpath )parameters (block (expression_statement (assignment (identifier_route_dicts) identifier_route_dicts (subscript (list_comprehension (identifier_routes) identifier_routes (for_in_clause (pattern_list (identifier__) identifier__ (identifier_routes) identifier_routes )pattern_list (call (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_api) identifier_api )attribute (identifier_http) identifier_http )attribute (identifier_routes) identifier_routes )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_routes) identifier_routes (list_comprehension (identifier_route) identifier_route (for_in_clause (pattern_list (identifier_route) identifier_route (identifier__) identifier__ )pattern_list (call (attribute (identifier_route_dicts) identifier_route_dicts (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (identifier_reqpath) identifier_reqpath (identifier_routes) identifier_routes )comparison_operator (block (return_statement (identifier_reqpath) identifier_reqpath )return_statement )block )if_statement (for_statement (identifier_route) identifier_route (identifier_routes) identifier_routes (block (if_statement (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (binary_operator (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_r'/{[^{}]+}') string_r'/{[^{}]+}' (string_'/\w+') string_'/\w+' (identifier_route) identifier_route )argument_list )call (string_'$') string_'$' )binary_operator (identifier_reqpath) identifier_reqpath )argument_list )call (block (return_statement (identifier_route) identifier_route )return_statement )block )if_statement )block )for_statement (return_statement (identifier_reqpath) identifier_reqpath )return_statement )block )function_definition )module
match a request with parameter to it's corresponding route
(module (function_definition (function_name_providerIsAuthoritative) function_name_providerIsAuthoritative (parameters (identifier_providerID) identifier_providerID (identifier_canonicalID) identifier_canonicalID )parameters (block (expression_statement (assignment (identifier_lastbang) identifier_lastbang (call (attribute (identifier_canonicalID) identifier_canonicalID (identifier_rindex) identifier_rindex )attribute (argument_list (string_'!') string_'!' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parent) identifier_parent (subscript (identifier_canonicalID) identifier_canonicalID (slice (colon) colon (identifier_lastbang) identifier_lastbang )slice )subscript )assignment )expression_statement (return_statement (comparison_operator (identifier_parent) identifier_parent (identifier_providerID) identifier_providerID )comparison_operator )return_statement )block )function_definition )module
Is this provider ID authoritative for this XRI? @returntype: bool
(module (function_definition (function_name_iflatten) function_name_iflatten (parameters (identifier_L) identifier_L )parameters (block (for_statement (identifier_sublist) identifier_sublist (identifier_L) identifier_L (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_sublist) identifier_sublist (string_'__iter__') string_'__iter__' )argument_list )call (block (for_statement (identifier_item) identifier_item (call (identifier_iflatten) identifier_iflatten (argument_list (identifier_sublist) identifier_sublist )argument_list )call (block (expression_statement (yield (identifier_item) identifier_item )yield )expression_statement )block )for_statement )block (else_clause (block (expression_statement (yield (identifier_sublist) identifier_sublist )yield )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Iterative flatten.
(module (function_definition (function_name_coders) function_name_coders (parameters (identifier_self) identifier_self )parameters (block (return_statement (tuple (identifier_PrimitiveTypeCoder) identifier_PrimitiveTypeCoder (identifier_TensorFlowCoder) identifier_TensorFlowCoder (identifier_FunctionCoder) identifier_FunctionCoder (identifier_ListCoder) identifier_ListCoder (identifier_DictCoder) identifier_DictCoder (identifier_SliceCoder) identifier_SliceCoder (identifier_ParameterCoder) identifier_ParameterCoder (identifier_ParamListCoder) identifier_ParamListCoder (identifier_ParameterizedCoder) identifier_ParameterizedCoder (identifier_TransformCoder) identifier_TransformCoder (identifier_PriorCoder) identifier_PriorCoder )tuple )return_statement )block )function_definition )module
List of default supported coders. First coder in the list has higher priority.
(module (function_definition (function_name_visit_GpxModel) function_name_visit_GpxModel (parameters (identifier_self) identifier_self (identifier_gpx_model) identifier_gpx_model (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_result) identifier_result (call (identifier_OrderedDict) identifier_OrderedDict (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_put_scalar) identifier_put_scalar (lambda (lambda_parameters (identifier_name) identifier_name (default_parameter (identifier_json_name) identifier_json_name (None) None )default_parameter )lambda_parameters (call (attribute (identifier_self) identifier_self (identifier_optional_attribute_scalar) identifier_optional_attribute_scalar )attribute (argument_list (identifier_result) identifier_result (identifier_gpx_model) identifier_gpx_model (identifier_name) identifier_name (identifier_json_name) identifier_json_name )argument_list )call )lambda )assignment )expression_statement (expression_statement (assignment (identifier_put_list) identifier_put_list (lambda (lambda_parameters (identifier_name) identifier_name (default_parameter (identifier_json_name) identifier_json_name (None) None )default_parameter )lambda_parameters (call (attribute (identifier_self) identifier_self (identifier_optional_attribute_list) identifier_optional_attribute_list )attribute (argument_list (identifier_result) identifier_result (identifier_gpx_model) identifier_gpx_model (identifier_name) identifier_name (identifier_json_name) identifier_json_name )argument_list )call )lambda )assignment )expression_statement (expression_statement (call (identifier_put_scalar) identifier_put_scalar (argument_list (string_'creator') string_'creator' )argument_list )call )expression_statement (expression_statement (call (identifier_put_scalar) identifier_put_scalar (argument_list (string_'metadata') string_'metadata' )argument_list )call )expression_statement (expression_statement (call (identifier_put_list) identifier_put_list (argument_list (string_'waypoints') string_'waypoints' )argument_list )call )expression_statement (expression_statement (call (identifier_put_list) identifier_put_list (argument_list (string_'routes') string_'routes' )argument_list )call )expression_statement (expression_statement (call (identifier_put_list) identifier_put_list (argument_list (string_'tracks') string_'tracks' )argument_list )call )expression_statement (expression_statement (call (identifier_put_list) identifier_put_list (argument_list (string_'extensions') string_'extensions' )argument_list )call )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Render a GPXModel as a single JSON structure.
(module (function_definition (function_name_get_execution) function_name_get_execution (parameters (identifier_self) identifier_self (identifier_id_execution) identifier_id_execution (default_parameter (identifier_access_token) identifier_access_token (None) None )default_parameter (default_parameter (identifier_user_id) identifier_user_id (None) None )default_parameter )parameters (block (if_statement (identifier_access_token) identifier_access_token (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_req) identifier_req )attribute (identifier_credential) identifier_credential )attribute (identifier_set_token) identifier_set_token )attribute (argument_list (identifier_access_token) identifier_access_token )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_user_id) identifier_user_id (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_req) identifier_req )attribute (identifier_credential) identifier_credential )attribute (identifier_set_user_id) identifier_set_user_id )attribute (argument_list (identifier_user_id) identifier_user_id )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_check_credentials) identifier_check_credentials )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (identifier_CredentialsError) identifier_CredentialsError (argument_list (string_'credentials invalid') string_'credentials invalid' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_execution) identifier_execution (call (attribute (attribute (identifier_self) identifier_self (identifier_req) identifier_req )attribute (identifier_get) identifier_get )attribute (argument_list (binary_operator (string_'/Executions/') string_'/Executions/' (identifier_id_execution) identifier_id_execution )binary_operator )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_"codeId") string_"codeId" (identifier_execution) identifier_execution )comparison_operator (block (expression_statement (assignment (subscript (identifier_execution) identifier_execution (string_'code') string_'code' )subscript (call (attribute (identifier_self) identifier_self (identifier_get_code) identifier_get_code )attribute (argument_list (subscript (identifier_execution) identifier_execution (string_"codeId") string_"codeId" )subscript )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_execution) identifier_execution )return_statement )block )function_definition )module
Get a execution, by its id
(module (function_definition (function_name_lint) function_name_lint (parameters (default_parameter (identifier_fmt) identifier_fmt (string_'colorized') string_'colorized' )default_parameter )parameters (block (if_statement (comparison_operator (identifier_fmt) identifier_fmt (string_'html') string_'html' )comparison_operator (block (expression_statement (assignment (identifier_outfile) identifier_outfile (string_'pylint_report.html') string_'pylint_report.html' )assignment )expression_statement (expression_statement (call (identifier_local) identifier_local (argument_list (binary_operator (string_'pylint -f %s davies > %s || true') string_'pylint -f %s davies > %s || true' (tuple (identifier_fmt) identifier_fmt (identifier_outfile) identifier_outfile )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_local) identifier_local (argument_list (binary_operator (string_'open %s') string_'open %s' (identifier_outfile) identifier_outfile )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_local) identifier_local (argument_list (binary_operator (string_'pylint -f %s davies || true') string_'pylint -f %s davies || true' (identifier_fmt) identifier_fmt )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Run verbose PyLint on source. Optionally specify fmt=html for HTML output.
(module (function_definition (function_name_getconnections) function_name_getconnections (parameters (identifier_self) identifier_self (default_parameter (identifier_vhost) identifier_vhost (None) None )default_parameter )parameters (block (expression_statement (string_"Return accepted connections, optionally filtered by vhost") string_"Return accepted connections, optionally filtered by vhost" )expression_statement (if_statement (comparison_operator (identifier_vhost) identifier_vhost (None) None )comparison_operator (block (return_statement (call (identifier_list) identifier_list (argument_list (attribute (identifier_self) identifier_self (identifier_managed_connections) identifier_managed_connections )attribute )argument_list )call )return_statement )block (else_clause (block (return_statement (list_comprehension (identifier_c) identifier_c (for_in_clause (identifier_c) identifier_c (attribute (identifier_self) identifier_self (identifier_managed_connections) identifier_managed_connections )attribute )for_in_clause (if_clause (comparison_operator (attribute (attribute (identifier_c) identifier_c (identifier_protocol) identifier_protocol )attribute (identifier_vhost) identifier_vhost )attribute (identifier_vhost) identifier_vhost )comparison_operator )if_clause )list_comprehension )return_statement )block )else_clause )if_statement )block )function_definition )module
Return accepted connections, optionally filtered by vhost
(module (function_definition (function_name__select_default_algorithm) function_name__select_default_algorithm (parameters (identifier_analysis) identifier_analysis )parameters (block (if_statement (boolean_operator (not_operator (identifier_analysis) identifier_analysis )not_operator (comparison_operator (identifier_analysis) identifier_analysis (string_"Standard") string_"Standard" )comparison_operator )boolean_operator (block (return_statement (expression_list (string_"Standard") string_"Standard" (dictionary (pair (string_"aligner") string_"aligner" (string_"bwa") string_"bwa" )pair (pair (string_"platform") string_"platform" (string_"illumina") string_"illumina" )pair (pair (string_"quality_format") string_"quality_format" (string_"Standard") string_"Standard" )pair (pair (string_"recalibrate") string_"recalibrate" (False) False )pair (pair (string_"realign") string_"realign" (False) False )pair (pair (string_"mark_duplicates") string_"mark_duplicates" (True) True )pair (pair (string_"variantcaller") string_"variantcaller" (False) False )pair )dictionary )expression_list )return_statement )block (elif_clause (comparison_operator (string_"variant") string_"variant" (identifier_analysis) identifier_analysis )comparison_operator (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_config) identifier_config (identifier__) identifier__ )pattern_list (call (attribute (identifier_template) identifier_template (identifier_name_to_config) identifier_name_to_config )attribute (argument_list (identifier_analysis) identifier_analysis )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (assignment (pattern_list (identifier_config) identifier_config (identifier__) identifier__ )pattern_list (call (attribute (identifier_template) identifier_template (identifier_name_to_config) identifier_name_to_config )attribute (argument_list (string_"freebayes-variant") string_"freebayes-variant" )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (return_statement (expression_list (string_"variant") string_"variant" (subscript (subscript (subscript (identifier_config) identifier_config (string_"details") string_"details" )subscript (integer_0) integer_0 )subscript (string_"algorithm") string_"algorithm" )subscript )expression_list )return_statement )block )elif_clause (else_clause (block (return_statement (expression_list (identifier_analysis) identifier_analysis (dictionary )dictionary )expression_list )return_statement )block )else_clause )if_statement )block )function_definition )module
Provide default algorithm sections from templates or standard
(module (function_definition (function_name_get_config_load_path) function_name_get_config_load_path (parameters (default_parameter (identifier_conf_path) identifier_conf_path (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_conf_path) identifier_conf_path (None) None )comparison_operator (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (string_'andes.conf') string_'andes.conf' )argument_list )call (block (expression_statement (assignment (identifier_conf_path) identifier_conf_path (string_'andes.conf') string_'andes.conf' )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_home_dir) identifier_home_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (string_'~') string_'~' )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_home_dir) identifier_home_dir (string_'.andes') string_'.andes' (string_'andes.conf') string_'andes.conf' )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_conf_path) identifier_conf_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_home_dir) identifier_home_dir (string_'.andes') string_'.andes' (string_'andes.conf') string_'andes.conf' )argument_list )call )assignment )expression_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (identifier_conf_path) identifier_conf_path (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'Found config file at {}.') string_'Found config file at {}.' (identifier_format) identifier_format )attribute (argument_list (identifier_conf_path) identifier_conf_path )argument_list )call )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_conf_path) identifier_conf_path )return_statement )block )function_definition )module
Return config file load path Priority: 1. conf_path 2. current directory 3. home directory Parameters ---------- conf_path Returns -------
(module (function_definition (function_name_badge_width) function_name_badge_width (parameters (identifier_self) identifier_self )parameters (block (return_statement (binary_operator (binary_operator (call (attribute (identifier_self) identifier_self (identifier_get_text_width) identifier_get_text_width )attribute (argument_list (binary_operator (string_' ') string_' ' (binary_operator (string_' ') string_' ' (call (identifier_int) identifier_int (argument_list (binary_operator (call (identifier_float) identifier_float (argument_list (attribute (identifier_self) identifier_self (identifier_num_padding_chars) identifier_num_padding_chars )attribute )argument_list )call (float_2.0) float_2.0 )binary_operator )argument_list )call )binary_operator )binary_operator )argument_list )call (line_continuation_\) line_continuation_\ (attribute (identifier_self) identifier_self (identifier_label_width) identifier_label_width )attribute )binary_operator (attribute (identifier_self) identifier_self (identifier_value_width) identifier_value_width )attribute )binary_operator )return_statement )block )function_definition )module
The total width of badge. >>> badge = Badge('pylint', '5', font_name='DejaVu Sans,Verdana,Geneva,sans-serif', ... font_size=11) >>> badge.badge_width 91
(module (function_definition (function_name___folder_size) function_name___folder_size (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_f) identifier_f (call (identifier_scandir) identifier_scandir (argument_list (identifier_path) identifier_path )argument_list )call (block (if_statement (boolean_operator (call (attribute (identifier_f) identifier_f (identifier_is_dir) identifier_is_dir )attribute (argument_list )argument_list )call (parenthesized_expression (boolean_operator (comparison_operator (attribute (identifier_f) identifier_f (identifier_name) identifier_name )attribute (string_'.') string_'.' )comparison_operator (comparison_operator (attribute (identifier_f) identifier_f (identifier_name) identifier_name )attribute (string_'..') string_'..' )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (expression_statement (augmented_assignment (identifier_ret) identifier_ret (call (attribute (identifier_self) identifier_self (identifier___folder_size) identifier___folder_size )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_path) identifier_path (attribute (identifier_f) identifier_f (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )augmented_assignment )expression_statement )block (else_clause (block (try_statement (block (expression_statement (augmented_assignment (identifier_ret) identifier_ret (attribute (call (attribute (identifier_f) identifier_f (identifier_stat) identifier_stat )attribute (argument_list )argument_list )call (identifier_st_size) identifier_st_size )attribute )augmented_assignment )expression_statement )block (except_clause (identifier_OSError) identifier_OSError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Return the size of the directory given by path path: <string>
(module (function_definition (function_name_listen) function_name_listen (parameters (identifier_cls) identifier_cls (identifier_event) identifier_event (identifier_func) identifier_func )parameters (block (expression_statement (call (attribute (call (identifier_signal) identifier_signal (argument_list (identifier_event) identifier_event )argument_list )call (identifier_connect) identifier_connect )attribute (argument_list (identifier_func) identifier_func (keyword_argument (identifier_sender) identifier_sender (identifier_cls) identifier_cls )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Add a callback for a signal against the class
(module (function_definition (function_name_get_forecast) function_name_get_forecast (parameters (identifier_self) identifier_self (identifier_latitude) identifier_latitude (identifier_longitude) identifier_longitude )parameters (block (expression_statement (assignment (identifier_reply) identifier_reply (call (attribute (identifier_self) identifier_self (identifier_http_get) identifier_http_get )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_url_builder) identifier_url_builder )attribute (argument_list (identifier_latitude) identifier_latitude (identifier_longitude) identifier_longitude )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_forecast) identifier_forecast )attribute (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_reply) identifier_reply )argument_list )call )assignment )expression_statement (for_statement (identifier_item) identifier_item (call (attribute (attribute (identifier_self) identifier_self (identifier_forecast) identifier_forecast )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_item) identifier_item (subscript (attribute (identifier_self) identifier_self (identifier_forecast) identifier_forecast )attribute (identifier_item) identifier_item )subscript )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Gets the weather data from darksky api and stores it in the respective dictionaries if available. This function should be used to fetch weather information.
(module (function_definition (function_name_load_configuration_from_file) function_name_load_configuration_from_file (parameters (identifier_directory) identifier_directory (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_args) identifier_args (call (attribute (identifier_copy) identifier_copy (identifier_copy) identifier_copy )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_directory_or_file) identifier_directory_or_file (identifier_directory) identifier_directory )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_args) identifier_args (identifier_config) identifier_config )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_directory_or_file) identifier_directory_or_file (attribute (identifier_args) identifier_args (identifier_config) identifier_config )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_options) identifier_options (call (identifier__get_options) identifier__get_options (argument_list (identifier_directory_or_file) identifier_directory_or_file (keyword_argument (identifier_debug) identifier_debug (attribute (identifier_args) identifier_args (identifier_debug) identifier_debug )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_args) identifier_args (identifier_report) identifier_report )attribute (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (string_'report') string_'report' (attribute (identifier_args) identifier_args (identifier_report) identifier_report )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_threshold_dictionary) identifier_threshold_dictionary (attribute (attribute (attribute (identifier_docutils) identifier_docutils (identifier_frontend) identifier_frontend )attribute (identifier_OptionParser) identifier_OptionParser )attribute (identifier_thresholds) identifier_thresholds )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_args) identifier_args (identifier_report) identifier_report )attribute (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_threshold_dictionary) identifier_threshold_dictionary (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_args) identifier_args (identifier_report) identifier_report )attribute (attribute (identifier_args) identifier_args (identifier_report) identifier_report )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_args) identifier_args (identifier_ignore_language) identifier_ignore_language )attribute (call (identifier_get_and_split) identifier_get_and_split (argument_list (identifier_options) identifier_options (string_'ignore_language') string_'ignore_language' (attribute (identifier_args) identifier_args (identifier_ignore_language) identifier_ignore_language )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_args) identifier_args (identifier_ignore_messages) identifier_ignore_messages )attribute (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (string_'ignore_messages') string_'ignore_messages' (attribute (identifier_args) identifier_args (identifier_ignore_messages) identifier_ignore_messages )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_args) identifier_args (identifier_ignore_directives) identifier_ignore_directives )attribute (call (identifier_get_and_split) identifier_get_and_split (argument_list (identifier_options) identifier_options (string_'ignore_directives') string_'ignore_directives' (attribute (identifier_args) identifier_args (identifier_ignore_directives) identifier_ignore_directives )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_args) identifier_args (identifier_ignore_substitutions) identifier_ignore_substitutions )attribute (call (identifier_get_and_split) identifier_get_and_split (argument_list (identifier_options) identifier_options (string_'ignore_substitutions') string_'ignore_substitutions' (attribute (identifier_args) identifier_args (identifier_ignore_substitutions) identifier_ignore_substitutions )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_args) identifier_args (identifier_ignore_roles) identifier_ignore_roles )attribute (call (identifier_get_and_split) identifier_get_and_split (argument_list (identifier_options) identifier_options (string_'ignore_roles') string_'ignore_roles' (attribute (identifier_args) identifier_args (identifier_ignore_roles) identifier_ignore_roles )attribute )argument_list )call )assignment )expression_statement (return_statement (identifier_args) identifier_args )return_statement )block )function_definition )module
Return new ``args`` with configuration loaded from file.
(module (function_definition (function_name_mda_count) function_name_mda_count (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_open) identifier_open )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_mda) identifier_mda (call (identifier_lvm_pv_get_mda_count) identifier_lvm_pv_get_mda_count (argument_list (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_mda) identifier_mda )return_statement )block )function_definition )module
Returns the physical volume mda count.
(module (function_definition (function_name__check) function_name__check (parameters (identifier_self) identifier_self )parameters (block (import_statement (dotted_name (identifier_time) identifier_time )dotted_name )import_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_expires_in) identifier_expires_in )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_authenticated) identifier_authenticated )attribute (None) None )comparison_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_current) identifier_current (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_expire_time) identifier_expire_time (binary_operator (attribute (identifier_self) identifier_self (identifier_authenticated) identifier_authenticated )attribute (attribute (identifier_self) identifier_self (identifier_expires_in) identifier_expires_in )attribute )binary_operator )assignment )expression_statement (return_statement (comparison_operator (identifier_expire_time) identifier_expire_time (identifier_current) identifier_current )comparison_operator )return_statement )block )function_definition )module
Check if the access token is expired or not.
(module (function_definition (function_name__check_unit) function_name__check_unit (parameters (identifier_new_unit) identifier_new_unit (identifier_old_unit) identifier_old_unit )parameters (block (try_statement (block (expression_statement (attribute (identifier_new_unit) identifier_new_unit (identifier_physical_type) identifier_physical_type )attribute )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (raise_statement (call (identifier_UnitMismatch) identifier_UnitMismatch (argument_list (binary_operator (string_"The provided unit (%s) has no physical type. Was expecting a unit for %s") string_"The provided unit (%s) has no physical type. Was expecting a unit for %s" (tuple (identifier_new_unit) identifier_new_unit (attribute (identifier_old_unit) identifier_old_unit (identifier_physical_type) identifier_physical_type )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (comparison_operator (attribute (identifier_new_unit) identifier_new_unit (identifier_physical_type) identifier_physical_type )attribute (attribute (identifier_old_unit) identifier_old_unit (identifier_physical_type) identifier_physical_type )attribute )comparison_operator (block (raise_statement (call (identifier_UnitMismatch) identifier_UnitMismatch (argument_list (binary_operator (string_"Physical type mismatch: you provided a unit for %s instead of a unit for %s") string_"Physical type mismatch: you provided a unit for %s instead of a unit for %s" (tuple (attribute (identifier_new_unit) identifier_new_unit (identifier_physical_type) identifier_physical_type )attribute (attribute (identifier_old_unit) identifier_old_unit (identifier_physical_type) identifier_physical_type )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Check that the new unit is compatible with the old unit for the quantity described by variable_name :param new_unit: instance of astropy.units.Unit :param old_unit: instance of astropy.units.Unit :return: nothin
(module (function_definition (function_name_get_trips) function_name_get_trips (parameters (identifier_self) identifier_self (identifier_authentication_info) identifier_authentication_info (identifier_start) identifier_start (identifier_end) identifier_end )parameters (block (import_statement (dotted_name (identifier_requests) identifier_requests )dotted_name )import_statement (if_statement (parenthesized_expression (boolean_operator (comparison_operator (identifier_authentication_info) identifier_authentication_info (None) None )comparison_operator (not_operator (call (attribute (identifier_authentication_info) identifier_authentication_info (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call )not_operator )boolean_operator )parenthesized_expression (block (return_statement (list )list )return_statement )block )if_statement (expression_statement (assignment (identifier_data_url) identifier_data_url (string_"https://api.ritassist.nl/api/trips/GetTrips") string_"https://api.ritassist.nl/api/trips/GetTrips" )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (string_f"?equipmentId={self.identifier}&from={start}&to={end}&extendedInfo=True") string_f"?equipmentId={self.identifier}&from={start}&to={end}&extendedInfo=True" )assignment )expression_statement (expression_statement (assignment (identifier_header) identifier_header (call (attribute (identifier_authentication_info) identifier_authentication_info (identifier_create_header) identifier_create_header )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (binary_operator (identifier_data_url) identifier_data_url (identifier_query) identifier_query )binary_operator (keyword_argument (identifier_headers) identifier_headers (identifier_header) identifier_header )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_trips) identifier_trips (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (for_statement (identifier_trip_json) identifier_trip_json (identifier_trips) identifier_trips (block (expression_statement (assignment (identifier_trip) identifier_trip (call (identifier_Trip) identifier_Trip (argument_list (identifier_trip_json) identifier_trip_json )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (identifier_trip) identifier_trip )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Get trips for this device between start and end.
(module (function_definition (function_name_block_comment) function_name_block_comment (parameters (identifier_solver) identifier_solver (identifier_start) identifier_start (identifier_end) identifier_end )parameters (block (expression_statement (assignment (pattern_list (identifier_text) identifier_text (identifier_pos) identifier_pos )pattern_list (attribute (identifier_solver) identifier_solver (identifier_parse_state) identifier_parse_state )attribute )assignment )expression_statement (expression_statement (assignment (identifier_length) identifier_length (call (identifier_len) identifier_len (argument_list (identifier_text) identifier_text )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_startlen) identifier_startlen (call (identifier_len) identifier_len (argument_list (identifier_start) identifier_start )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_endlen) identifier_endlen (call (identifier_len) identifier_len (argument_list (identifier_end) identifier_end )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_pos) identifier_pos (identifier_length) identifier_length )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (not_operator (call (attribute (subscript (identifier_text) identifier_text (slice (identifier_pos) identifier_pos (colon) colon )slice )subscript (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_start) identifier_start )argument_list )call )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_level) identifier_level (integer_1) integer_1 )assignment )expression_statement (expression_statement (assignment (identifier_p) identifier_p (binary_operator (identifier_pos) identifier_pos (integer_1) integer_1 )binary_operator )assignment )expression_statement (while_statement (comparison_operator (identifier_p) identifier_p (identifier_length) identifier_length )comparison_operator (block (if_statement (call (attribute (subscript (identifier_text) identifier_text (slice (identifier_p) identifier_p (colon) colon )slice )subscript (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_end) identifier_end )argument_list )call (block (expression_statement (augmented_assignment (identifier_level) identifier_level (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_p) identifier_p (identifier_endlen) identifier_endlen )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_level) identifier_level (integer_0) integer_0 )comparison_operator (block (break_statement )break_statement )block )if_statement )block (elif_clause (call (attribute (subscript (identifier_text) identifier_text (slice (identifier_p) identifier_p (colon) colon )slice )subscript (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_start) identifier_start )argument_list )call (block (expression_statement (augmented_assignment (identifier_level) identifier_level (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_p) identifier_p (identifier_startlen) identifier_startlen )augmented_assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (augmented_assignment (identifier_p) identifier_p (integer_1) integer_1 )augmented_assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (return_statement )return_statement )block )else_clause )while_statement (expression_statement (assignment (attribute (identifier_solver) identifier_solver (identifier_parse_state) identifier_parse_state )attribute (expression_list (identifier_text) identifier_text (identifier_p) identifier_p )expression_list )assignment )expression_statement (expression_statement (yield (expression_list (identifier_cont) identifier_cont (subscript (identifier_text) identifier_text (slice (identifier_pos) identifier_pos (colon) colon (identifier_p) identifier_p )slice )subscript )expression_list )yield )expression_statement (expression_statement (assignment (attribute (identifier_solver) identifier_solver (identifier_parse_state) identifier_parse_state )attribute (expression_list (identifier_text) identifier_text (identifier_pos) identifier_pos )expression_list )assignment )expression_statement )block )function_definition )module
embedable block comment
(module (function_definition (function_name_register_hit_type) function_name_register_hit_type (parameters (identifier_self) identifier_self (identifier_title) identifier_title (identifier_description) identifier_description (identifier_reward) identifier_reward (identifier_duration_hours) identifier_duration_hours (identifier_keywords) identifier_keywords (identifier_qualifications) identifier_qualifications )parameters (block (expression_statement (assignment (identifier_reward) identifier_reward (call (identifier_str) identifier_str (argument_list (identifier_reward) identifier_reward )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_duration_secs) identifier_duration_secs (call (identifier_int) identifier_int (argument_list (call (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_hours) identifier_hours (identifier_duration_hours) identifier_duration_hours )keyword_argument )argument_list )call (identifier_total_seconds) identifier_total_seconds )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_hit_type) identifier_hit_type (call (attribute (attribute (identifier_self) identifier_self (identifier_mturk) identifier_mturk )attribute (identifier_create_hit_type) identifier_create_hit_type )attribute (argument_list (keyword_argument (identifier_Title) identifier_Title (identifier_title) identifier_title )keyword_argument (keyword_argument (identifier_Description) identifier_Description (identifier_description) identifier_description )keyword_argument (keyword_argument (identifier_Reward) identifier_Reward (identifier_reward) identifier_reward )keyword_argument (keyword_argument (identifier_AssignmentDurationInSeconds) identifier_AssignmentDurationInSeconds (identifier_duration_secs) identifier_duration_secs )keyword_argument (keyword_argument (identifier_Keywords) identifier_Keywords (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (identifier_keywords) identifier_keywords )argument_list )call )keyword_argument (keyword_argument (identifier_AutoApprovalDelayInSeconds) identifier_AutoApprovalDelayInSeconds (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_QualificationRequirements) identifier_QualificationRequirements (identifier_qualifications) identifier_qualifications )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_hit_type) identifier_hit_type (string_"HITTypeId") string_"HITTypeId" )subscript )return_statement )block )function_definition )module
Register HIT Type for this HIT and return the type's ID, which is required for creating a HIT.
(module (function_definition (function_name_delete_leaderboard_named) function_name_delete_leaderboard_named (parameters (identifier_self) identifier_self (identifier_leaderboard_name) identifier_leaderboard_name )parameters (block (expression_statement (assignment (identifier_pipeline) identifier_pipeline (call (attribute (attribute (identifier_self) identifier_self (identifier_redis_connection) identifier_redis_connection )attribute (identifier_pipeline) identifier_pipeline )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_pipeline) identifier_pipeline (identifier_delete) identifier_delete )attribute (argument_list (identifier_leaderboard_name) identifier_leaderboard_name )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_pipeline) identifier_pipeline (identifier_delete) identifier_delete )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__member_data_key) identifier__member_data_key )attribute (argument_list (identifier_leaderboard_name) identifier_leaderboard_name )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_pipeline) identifier_pipeline (identifier_delete) identifier_delete )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__ties_leaderboard_key) identifier__ties_leaderboard_key )attribute (argument_list (identifier_leaderboard_name) identifier_leaderboard_name )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_pipeline) identifier_pipeline (identifier_execute) identifier_execute )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Delete the named leaderboard. @param leaderboard_name [String] Name of the leaderboard.
(module (function_definition (function_name_get_dir_meta) function_name_get_dir_meta (parameters (identifier_fp) identifier_fp (identifier_atts) identifier_atts )parameters (block (expression_statement (call (attribute (identifier_atts) identifier_atts (identifier_reverse) identifier_reverse )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_dirname) identifier_dirname (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_fp) identifier_fp )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_meta) identifier_meta (call (attribute (identifier_dirname) identifier_dirname (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (dictionary )dictionary )assignment )expression_statement (try_statement (block (for_statement (identifier_key) identifier_key (identifier_atts) identifier_atts (block (expression_statement (assignment (subscript (identifier_res) identifier_res (identifier_key) identifier_key )subscript (call (attribute (identifier_meta) identifier_meta (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement )block )for_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (raise_statement (call (identifier_PathError) identifier_PathError (argument_list (identifier_dirname) identifier_dirname )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Pop path information and map to supplied atts
(module (function_definition (function_name_normalizeToTag) function_name_normalizeToTag (parameters (identifier_val) identifier_val )parameters (block (try_statement (block (expression_statement (assignment (identifier_val) identifier_val (call (attribute (identifier_val) identifier_val (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (call (attribute (string_"{} is not a tag or name string") string_"{} is not a tag or name string" (identifier_format) identifier_format )attribute (argument_list (identifier_val) identifier_val )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_val) identifier_val (identifier_tagsAndNameSetUpper) identifier_tagsAndNameSetUpper )comparison_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (call (attribute (string_"{} is not a tag or name string") string_"{} is not a tag or name string" (identifier_format) identifier_format )attribute (argument_list (identifier_val) identifier_val )argument_list )call )argument_list )call )raise_statement )block (else_clause (block (try_statement (block (return_statement (subscript (identifier_fullToTagDictUpper) identifier_fullToTagDictUpper (identifier_val) identifier_val )subscript )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (identifier_val) identifier_val )return_statement )block )except_clause )try_statement )block )else_clause )if_statement )block )function_definition )module
Converts tags or full names to 2 character tags, case insensitive # Parameters _val_: `str` > A two character string giving the tag or its full name # Returns `str` > The short name of _val_
(module (function_definition (function_name_numRegisteredForRole) function_name_numRegisteredForRole (parameters (identifier_self) identifier_self (identifier_role) identifier_role (default_parameter (identifier_includeTemporaryRegs) identifier_includeTemporaryRegs (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_count) identifier_count (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_eventregistration_set) identifier_eventregistration_set )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_cancelled) identifier_cancelled (False) False )keyword_argument (keyword_argument (identifier_dropIn) identifier_dropIn (False) False )keyword_argument (keyword_argument (identifier_role) identifier_role (identifier_role) identifier_role )keyword_argument )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_includeTemporaryRegs) identifier_includeTemporaryRegs (block (expression_statement (augmented_assignment (identifier_count) identifier_count (call (attribute (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_temporaryeventregistration_set) identifier_temporaryeventregistration_set )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_dropIn) identifier_dropIn (False) False )keyword_argument (keyword_argument (identifier_role) identifier_role (identifier_role) identifier_role )keyword_argument )argument_list )call (identifier_exclude) identifier_exclude )attribute (argument_list (keyword_argument (identifier_registration__expirationDate__lte) identifier_registration__expirationDate__lte (call (attribute (identifier_timezone) identifier_timezone (identifier_now) identifier_now )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_count) identifier_count )return_statement )block )function_definition )module
Accepts a DanceRole object and returns the number of registrations of that role.
(module (function_definition (function_name__cb_inform_interface_change) function_name__cb_inform_interface_change (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_'cb_inform_interface_change(%s)') string_'cb_inform_interface_change(%s)' (identifier_msg) identifier_msg )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__interface_changed) identifier__interface_changed )attribute (identifier_set) identifier_set )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Update the sensors and requests available.
(module (function_definition (function_name_filterlet) function_name_filterlet (parameters (default_parameter (identifier_function) identifier_function (identifier_bool) identifier_bool )default_parameter (default_parameter (identifier_iterable) identifier_iterable (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_iterable) identifier_iterable (None) None )comparison_operator (block (return_statement (call (identifier__filterlet) identifier__filterlet (argument_list (keyword_argument (identifier_function) identifier_function (identifier_function) identifier_function )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_iterlet) identifier_iterlet (generator_expression (identifier_elem) identifier_elem (for_in_clause (identifier_elem) identifier_elem (identifier_iterable) identifier_iterable )for_in_clause (if_clause (call (identifier_function) identifier_function (argument_list (identifier_elem) identifier_elem )argument_list )call )if_clause )generator_expression )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Filter chunks of data from an iterable or a chain :param function: callable selecting valid elements :type function: callable :param iterable: object providing chunks via iteration :type iterable: iterable or None For any chunk in ``iterable`` or the chain, it is passed on only if ``function(chunk)`` returns true. .. code:: chain = iterlet(range(10)) >> filterlet(lambda chunk: chunk % 2 == 0) for value in chain: print(value) # prints 0, 2, 4, 6, 8
(module (function_definition (function_name_benchmark_forward) function_name_benchmark_forward (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__setup) identifier__setup )attribute (argument_list )argument_list )call )expression_statement (function_definition (function_name_f) function_name_f (parameters )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__forward) identifier__forward )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mod_ext) identifier_mod_ext )attribute (identifier_synchronize) identifier_synchronize )attribute (argument_list (dictionary_splat (attribute (identifier_self) identifier_self (identifier_ext_kwargs) identifier_ext_kwargs )attribute )dictionary_splat )argument_list )call )expression_statement )block )function_definition (expression_statement (call (identifier_f) identifier_f (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_forward_stat) identifier_forward_stat )attribute (call (attribute (identifier_self) identifier_self (identifier__calc_benchmark_stat) identifier__calc_benchmark_stat )attribute (argument_list (identifier_f) identifier_f )argument_list )call )assignment )expression_statement )block )function_definition )module
Benchmark forward execution.
(module (function_definition (function_name_emphasis) function_name_emphasis (parameters (identifier_node) identifier_node )parameters (block (expression_statement (assignment (identifier_o) identifier_o (call (attribute (identifier_nodes) identifier_nodes (identifier_emphasis) identifier_emphasis )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_n) identifier_n (call (identifier_MarkDown) identifier_MarkDown (argument_list (identifier_node) identifier_node )argument_list )call (block (expression_statement (augmented_assignment (identifier_o) identifier_o (identifier_n) identifier_n )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_o) identifier_o )return_statement )block )function_definition )module
An italicized section
(module (function_definition (function_name_cube) function_name_cube (parameters (identifier_data) identifier_data (default_parameter (identifier_xcoords) identifier_xcoords (None) None )default_parameter (default_parameter (identifier_ycoords) identifier_ycoords (None) None )default_parameter (default_parameter (identifier_chcoords) identifier_chcoords (None) None )default_parameter (default_parameter (identifier_scalarcoords) identifier_scalarcoords (None) None )default_parameter (default_parameter (identifier_datacoords) identifier_datacoords (None) None )default_parameter (default_parameter (identifier_attrs) identifier_attrs (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_cube) identifier_cube (call (attribute (identifier_xr) identifier_xr (identifier_DataArray) identifier_DataArray )attribute (argument_list (identifier_data) identifier_data (keyword_argument (identifier_dims) identifier_dims (tuple (string_'x') string_'x' (string_'y') string_'y' (string_'ch') string_'ch' )tuple )keyword_argument (keyword_argument (identifier_attrs) identifier_attrs (identifier_attrs) identifier_attrs )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_cube) identifier_cube (identifier_dcc) identifier_dcc )attribute (identifier__initcoords) identifier__initcoords )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_xcoords) identifier_xcoords (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_cube) identifier_cube (identifier_coords) identifier_coords )attribute (identifier_update) identifier_update )attribute (argument_list (dictionary_comprehension (pair (identifier_key) identifier_key (tuple (string_'x') string_'x' (subscript (identifier_xcoords) identifier_xcoords (identifier_key) identifier_key )subscript )tuple )pair (for_in_clause (identifier_key) identifier_key (identifier_xcoords) identifier_xcoords )for_in_clause )dictionary_comprehension )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_ycoords) identifier_ycoords (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_cube) identifier_cube (identifier_coords) identifier_coords )attribute (identifier_update) identifier_update )attribute (argument_list (dictionary_comprehension (pair (identifier_key) identifier_key (tuple (string_'y') string_'y' (subscript (identifier_ycoords) identifier_ycoords (identifier_key) identifier_key )subscript )tuple )pair (for_in_clause (identifier_key) identifier_key (identifier_ycoords) identifier_ycoords )for_in_clause )dictionary_comprehension )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_chcoords) identifier_chcoords (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_cube) identifier_cube (identifier_coords) identifier_coords )attribute (identifier_update) identifier_update )attribute (argument_list (dictionary_comprehension (pair (identifier_key) identifier_key (tuple (string_'ch') string_'ch' (subscript (identifier_chcoords) identifier_chcoords (identifier_key) identifier_key )subscript )tuple )pair (for_in_clause (identifier_key) identifier_key (identifier_chcoords) identifier_chcoords )for_in_clause )dictionary_comprehension )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_datacoords) identifier_datacoords (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_cube) identifier_cube (identifier_coords) identifier_coords )attribute (identifier_update) identifier_update )attribute (argument_list (dictionary_comprehension (pair (identifier_key) identifier_key (tuple (tuple (string_'x') string_'x' (string_'y') string_'y' (string_'ch') string_'ch' )tuple (subscript (identifier_datacoords) identifier_datacoords (identifier_key) identifier_key )subscript )tuple )pair (for_in_clause (identifier_key) identifier_key (identifier_datacoords) identifier_datacoords )for_in_clause )dictionary_comprehension )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_scalarcoords) identifier_scalarcoords (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_cube) identifier_cube (identifier_coords) identifier_coords )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_scalarcoords) identifier_scalarcoords )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_cube) identifier_cube )return_statement )block )function_definition )module
Create a cube as an instance of xarray.DataArray with Decode accessor. Args: data (numpy.ndarray): 3D (x x y x channel) array. xcoords (dict, optional): Dictionary of arrays that label x axis. ycoords (dict, optional): Dictionary of arrays that label y axis. chcoords (dict, optional): Dictionary of arrays that label channel axis. scalarcoords (dict, optional): Dictionary of values that don't label any axes (point-like). datacoords (dict, optional): Dictionary of arrays that label x, y, and channel axes. attrs (dict, optional): Dictionary of attributes to add to the instance. name (str, optional): String that names the instance. Returns: decode cube (decode.cube): Decode cube.
(module (function_definition (function_name_call) function_name_call (parameters (identifier_self) identifier_self (identifier_method) identifier_method (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (try_statement (block (expression_statement (assignment (identifier_response) identifier_response (call (call (identifier_getattr) identifier_getattr (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_service) identifier_service )attribute (identifier_method) identifier_method )argument_list )call (argument_list (list_splat (identifier_args) identifier_args )list_splat )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (tuple (identifier_URLError) identifier_URLError (identifier_SSLError) identifier_SSLError )tuple (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (string_'Failed to connect to responsys service') string_'Failed to connect to responsys service' )argument_list )call )expression_statement (raise_statement (call (identifier_ConnectError) identifier_ConnectError (argument_list (string_"Request to service timed out") string_"Request to service timed out" )argument_list )call )raise_statement )block )except_clause (except_clause (as_pattern (identifier_WebFault) identifier_WebFault (as_pattern_target (identifier_web_fault) identifier_web_fault )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_fault_name) identifier_fault_name (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_web_fault) identifier_web_fault (identifier_fault) identifier_fault )attribute (string_'faultstring') string_'faultstring' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_error) identifier_error (call (identifier_str) identifier_str (argument_list (attribute (attribute (identifier_web_fault) identifier_web_fault (identifier_fault) identifier_fault )attribute (identifier_detail) identifier_detail )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_fault_name) identifier_fault_name (string_'TableFault') string_'TableFault' )comparison_operator (block (raise_statement (call (identifier_TableFault) identifier_TableFault (argument_list (identifier_error) identifier_error )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_fault_name) identifier_fault_name (string_'ListFault') string_'ListFault' )comparison_operator (block (raise_statement (call (identifier_ListFault) identifier_ListFault (argument_list (identifier_error) identifier_error )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_fault_name) identifier_fault_name (string_'API_LIMIT_EXCEEDED') string_'API_LIMIT_EXCEEDED' )comparison_operator (block (raise_statement (call (identifier_ApiLimitError) identifier_ApiLimitError (argument_list (identifier_error) identifier_error )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_fault_name) identifier_fault_name (string_'AccountFault') string_'AccountFault' )comparison_operator (block (raise_statement (call (identifier_AccountFault) identifier_AccountFault (argument_list (identifier_error) identifier_error )argument_list )call )raise_statement )block )if_statement (raise_statement (call (identifier_ServiceError) identifier_ServiceError (argument_list (attribute (identifier_web_fault) identifier_web_fault (identifier_fault) identifier_fault )attribute (attribute (identifier_web_fault) identifier_web_fault (identifier_document) identifier_document )attribute )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Calls the service method defined with the arguments provided
(module (function_definition (function_name_success_rate) function_name_success_rate (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_successes) identifier_successes )attribute (attribute (identifier_self) identifier_self (identifier_fails) identifier_fails )attribute )binary_operator (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_success_rate) identifier_success_rate (integer_0) integer_0 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_total_attempts) identifier_total_attempts (binary_operator (attribute (identifier_self) identifier_self (identifier_successes) identifier_successes )attribute (attribute (identifier_self) identifier_self (identifier_fails) identifier_fails )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_success_rate) identifier_success_rate (parenthesized_expression (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_successes) identifier_successes )attribute (integer_100) integer_100 )binary_operator (identifier_total_attempts) identifier_total_attempts )binary_operator )parenthesized_expression )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_success_rate) identifier_success_rate )return_statement )block )function_definition )module
Returns a float with the rate of success from all the logged results.
(module (function_definition (function_name___populate_archive_files) function_name___populate_archive_files (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_archive_files) identifier_archive_files )attribute (list )list )assignment )expression_statement (for_statement (identifier__ptr) identifier__ptr (call (attribute (identifier__bfd) identifier__bfd (identifier_archive_list_files) identifier_archive_list_files )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__ptr) identifier__ptr )attribute )argument_list )call (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_archive_files) identifier_archive_files )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_Bfd) identifier_Bfd (argument_list (identifier__ptr) identifier__ptr )argument_list )call )argument_list )call )expression_statement )block (except_clause (identifier_BfdException) identifier_BfdException (identifier_err) identifier_err (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement )block )function_definition )module
Store the list of files inside an archive file.
(module (function_definition (function_name_domain_unblock) function_name_domain_unblock (parameters (identifier_self) identifier_self (default_parameter (identifier_domain) identifier_domain (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_self) identifier_self (identifier___generate_params) identifier___generate_params )attribute (argument_list (call (identifier_locals) identifier_locals (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___api_request) identifier___api_request )attribute (argument_list (string_'DELETE') string_'DELETE' (string_'/api/v1/domain_blocks') string_'/api/v1/domain_blocks' (identifier_params) identifier_params )argument_list )call )expression_statement )block )function_definition )module
Remove a domain block for the logged-in user.
(module (function_definition (function_name_get_max_distance_from_start) function_name_get_max_distance_from_start (parameters (identifier_latlon_track) identifier_latlon_track )parameters (block (expression_statement (assignment (identifier_latlon_list) identifier_latlon_list (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_idx) identifier_idx (identifier_point) identifier_point )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_latlon_track) identifier_latlon_track )argument_list )call (block (expression_statement (assignment (identifier_lat) identifier_lat (subscript (subscript (identifier_latlon_track) identifier_latlon_track (identifier_idx) identifier_idx )subscript (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_lon) identifier_lon (subscript (subscript (identifier_latlon_track) identifier_latlon_track (identifier_idx) identifier_idx )subscript (integer_2) integer_2 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_alt) identifier_alt (subscript (subscript (identifier_latlon_track) identifier_latlon_track (identifier_idx) identifier_idx )subscript (integer_3) integer_3 )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_latlon_list) identifier_latlon_list (identifier_append) identifier_append )attribute (argument_list (list (identifier_lat) identifier_lat (identifier_lon) identifier_lon (identifier_alt) identifier_alt )list )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_start_position) identifier_start_position (subscript (identifier_latlon_list) identifier_latlon_list (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_max_distance) identifier_max_distance (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_position) identifier_position (identifier_latlon_list) identifier_latlon_list (block (expression_statement (assignment (identifier_distance) identifier_distance (call (identifier_gps_distance) identifier_gps_distance (argument_list (identifier_start_position) identifier_start_position (identifier_position) identifier_position )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_distance) identifier_distance (identifier_max_distance) identifier_max_distance )comparison_operator (block (expression_statement (assignment (identifier_max_distance) identifier_max_distance (identifier_distance) identifier_distance )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_max_distance) identifier_max_distance )return_statement )block )function_definition )module
Returns the radius of an entire GPS track. Used to calculate whether or not the entire sequence was just stationary video Takes a sequence of points as input
(module (function_definition (function_name__get_url) function_name__get_url (parameters (identifier_cls) identifier_cls (typed_parameter (identifier_administration_id) identifier_administration_id (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_resource_path) identifier_resource_path (type (identifier_str) identifier_str )type )typed_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (identifier_urljoin) identifier_urljoin (argument_list (attribute (identifier_cls) identifier_cls (identifier_base_url) identifier_base_url )attribute (binary_operator (string_'%s/') string_'%s/' (attribute (identifier_cls) identifier_cls (identifier_version) identifier_version )attribute )binary_operator )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_administration_id) identifier_administration_id (None) None )comparison_operator (block (expression_statement (assignment (identifier_url) identifier_url (call (identifier_urljoin) identifier_urljoin (argument_list (identifier_url) identifier_url (binary_operator (string_'%s/') string_'%s/' (identifier_administration_id) identifier_administration_id )binary_operator )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (call (identifier_urljoin) identifier_urljoin (argument_list (identifier_url) identifier_url (binary_operator (string_'%s.json') string_'%s.json' (identifier_resource_path) identifier_resource_path )binary_operator )argument_list )call )assignment )expression_statement (return_statement (identifier_url) identifier_url )return_statement )block )function_definition )module
Builds the URL to the API endpoint specified by the given parameters. :param administration_id: The ID of the administration (may be None). :param resource_path: The path to the resource. :return: The absolute URL to the endpoint.
(module (function_definition (function_name_sum) function_name_sum (parameters (identifier_self) identifier_self (default_parameter (identifier_only_valid) identifier_only_valid (True) True )default_parameter )parameters (type (identifier_ErrorValue) identifier_ErrorValue )type (block (if_statement (not_operator (identifier_only_valid) identifier_only_valid )not_operator (block (expression_statement (assignment (identifier_mask) identifier_mask (integer_1) integer_1 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_mask) identifier_mask (attribute (identifier_self) identifier_self (identifier_mask) identifier_mask )attribute )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_ErrorValue) identifier_ErrorValue (argument_list (call (attribute (parenthesized_expression (binary_operator (attribute (identifier_self) identifier_self (identifier_intensity) identifier_intensity )attribute (identifier_mask) identifier_mask )binary_operator )parenthesized_expression (identifier_sum) identifier_sum )attribute (argument_list )argument_list )call (binary_operator (call (attribute (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (identifier_mask) identifier_mask )binary_operator )parenthesized_expression (integer_2) integer_2 )binary_operator )parenthesized_expression (identifier_sum) identifier_sum )attribute (argument_list )argument_list )call (float_0.5) float_0.5 )binary_operator )argument_list )call )return_statement )block )function_definition )module
Calculate the sum of pixels, not counting the masked ones if only_valid is True.
(module (function_definition (function_name_getNextSample) function_name_getNextSample (parameters (identifier_self) identifier_self (identifier_V) identifier_V )parameters (block (expression_statement (assignment (pattern_list (identifier_W) identifier_W (identifier_WProb) identifier_WProb )pattern_list (call (attribute (identifier_self) identifier_self (identifier_drawRankingPlakettLuce) identifier_drawRankingPlakettLuce )attribute (argument_list (identifier_V) identifier_V )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_VProb) identifier_VProb (call (attribute (identifier_self) identifier_self (identifier_calcProbOfVFromW) identifier_calcProbOfVFromW )attribute (argument_list (identifier_V) identifier_V (identifier_W) identifier_W )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_acceptanceRatio) identifier_acceptanceRatio (call (attribute (identifier_self) identifier_self (identifier_calcAcceptanceRatio) identifier_calcAcceptanceRatio )attribute (argument_list (identifier_V) identifier_V (identifier_W) identifier_W )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_prob) identifier_prob (call (identifier_min) identifier_min (argument_list (float_1.0) float_1.0 (binary_operator (identifier_acceptanceRatio) identifier_acceptanceRatio (parenthesized_expression (binary_operator (identifier_VProb) identifier_VProb (identifier_WProb) identifier_WProb )binary_operator )parenthesized_expression )binary_operator )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_random) identifier_random (identifier_random) identifier_random )attribute (argument_list )argument_list )call (identifier_prob) identifier_prob )comparison_operator (block (expression_statement (assignment (identifier_V) identifier_V (identifier_W) identifier_W )assignment )expression_statement )block )if_statement (return_statement (identifier_V) identifier_V )return_statement )block )function_definition )module
Given a ranking over the candidates, generate a new ranking by assigning each candidate at position i a Plakett-Luce weight of phi^i and draw a new ranking. :ivar list<int> V: Contains integer representations of each candidate in order of their ranking in a vote, from first to last.
(module (function_definition (function_name_sync) function_name_sync (parameters (default_parameter (identifier_remote) identifier_remote (string_'origin') string_'origin' )default_parameter (default_parameter (identifier_branch) identifier_branch (string_'master') string_'master' )default_parameter )parameters (block (expression_statement (call (identifier_pull) identifier_pull (argument_list (identifier_branch) identifier_branch (identifier_remote) identifier_remote )argument_list )call )expression_statement (expression_statement (call (identifier_push) identifier_push (argument_list (identifier_branch) identifier_branch (identifier_remote) identifier_remote )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (identifier_cyan) identifier_cyan (argument_list (string_"Git Synced!") string_"Git Synced!" )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
git pull and push commit
(module (function_definition (function_name_cmd_list_identities) function_name_cmd_list_identities (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_identities) identifier_identities (call (attribute (identifier_self) identifier_self (identifier__get_available_identities) identifier__get_available_identities )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Available identities:') string_'Available identities:' )argument_list )call )expression_statement (for_statement (identifier_x) identifier_x (identifier_identities) identifier_identities (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_' - {}') string_' - {}' (identifier_format) identifier_format )attribute (argument_list (identifier_x) identifier_x )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
List the available identities to use for signing.
(module (function_definition (function_name_squeeze) function_name_squeeze (parameters (identifier_self) identifier_self (default_parameter (identifier_axis) identifier_axis (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_axis) identifier_axis (parenthesized_expression (conditional_expression (attribute (identifier_self) identifier_self (identifier__AXIS_NAMES) identifier__AXIS_NAMES )attribute (comparison_operator (identifier_axis) identifier_axis (None) None )comparison_operator (tuple (call (attribute (identifier_self) identifier_self (identifier__get_axis_number) identifier__get_axis_number )attribute (argument_list (identifier_axis) identifier_axis )argument_list )call )tuple )conditional_expression )parenthesized_expression )assignment )expression_statement (try_statement (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_iloc) identifier_iloc )attribute (call (identifier_tuple) identifier_tuple (generator_expression (conditional_expression (integer_0) integer_0 (boolean_operator (comparison_operator (identifier_i) identifier_i (identifier_axis) identifier_axis )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_a) identifier_a )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator (call (identifier_slice) identifier_slice (argument_list (None) None )argument_list )call )conditional_expression (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_a) identifier_a )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_axes) identifier_axes )attribute )argument_list )call )for_in_clause )generator_expression )call )subscript )return_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (identifier_self) identifier_self )return_statement )block )except_clause )try_statement )block )function_definition )module
Squeeze 1 dimensional axis objects into scalars. Series or DataFrames with a single element are squeezed to a scalar. DataFrames with a single column or a single row are squeezed to a Series. Otherwise the object is unchanged. This method is most useful when you don't know if your object is a Series or DataFrame, but you do know it has just a single column. In that case you can safely call `squeeze` to ensure you have a Series. Parameters ---------- axis : {0 or 'index', 1 or 'columns', None}, default None A specific axis to squeeze. By default, all length-1 axes are squeezed. .. versionadded:: 0.20.0 Returns ------- DataFrame, Series, or scalar The projection after squeezing `axis` or all the axes. See Also -------- Series.iloc : Integer-location based indexing for selecting scalars. DataFrame.iloc : Integer-location based indexing for selecting Series. Series.to_frame : Inverse of DataFrame.squeeze for a single-column DataFrame. Examples -------- >>> primes = pd.Series([2, 3, 5, 7]) Slicing might produce a Series with a single value: >>> even_primes = primes[primes % 2 == 0] >>> even_primes 0 2 dtype: int64 >>> even_primes.squeeze() 2 Squeezing objects with more than one value in every axis does nothing: >>> odd_primes = primes[primes % 2 == 1] >>> odd_primes 1 3 2 5 3 7 dtype: int64 >>> odd_primes.squeeze() 1 3 2 5 3 7 dtype: int64 Squeezing is even more effective when used with DataFrames. >>> df = pd.DataFrame([[1, 2], [3, 4]], columns=['a', 'b']) >>> df a b 0 1 2 1 3 4 Slicing a single column will produce a DataFrame with the columns having only one value: >>> df_a = df[['a']] >>> df_a a 0 1 1 3 So the columns can be squeezed down, resulting in a Series: >>> df_a.squeeze('columns') 0 1 1 3 Name: a, dtype: int64 Slicing a single row from a single column will produce a single scalar DataFrame: >>> df_0a = df.loc[df.index < 1, ['a']] >>> df_0a a 0 1 Squeezing the rows produces a single scalar Series: >>> df_0a.squeeze('rows') a 1 Name: 0, dtype: int64 Squeezing all axes wil project directly into a scalar: >>> df_0a.squeeze() 1
(module (function_definition (function_name_is_deletion) function_name_is_deletion (parameters (identifier_reference_bases) identifier_reference_bases (identifier_alternate_bases) identifier_alternate_bases )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_alternate_bases) identifier_alternate_bases )argument_list )call (integer_1) integer_1 )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (call (identifier_is_indel) identifier_is_indel (argument_list (identifier_reference_bases) identifier_reference_bases (identifier_alternate_bases) identifier_alternate_bases )argument_list )call (block (expression_statement (assignment (identifier_alt_allele) identifier_alt_allele (subscript (identifier_alternate_bases) identifier_alternate_bases (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_alt_allele) identifier_alt_allele (None) None )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_reference_bases) identifier_reference_bases )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_alt_allele) identifier_alt_allele )argument_list )call )comparison_operator (block (return_statement (True) True )return_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )function_definition )module
Return whether or not the INDEL is a deletion
(module (function_definition (function_name_show_help) function_name_show_help (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_main_stacked_widget) identifier_main_stacked_widget )attribute (identifier_setCurrentIndex) identifier_setCurrentIndex )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (assignment (identifier_header) identifier_header (call (identifier_html_header) identifier_html_header (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_footer) identifier_footer (call (identifier_html_footer) identifier_html_footer (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_string) identifier_string (identifier_header) identifier_header )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (identifier_impact_report_help) identifier_impact_report_help (argument_list )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_string) identifier_string (call (attribute (identifier_message) identifier_message (identifier_to_html) identifier_to_html )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_string) identifier_string (identifier_footer) identifier_footer )augmented_assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_help_web_view) identifier_help_web_view )attribute (identifier_setHtml) identifier_setHtml )attribute (argument_list (identifier_string) identifier_string )argument_list )call )expression_statement )block )function_definition )module
Show usage info to the user. .. versionadded: 4.3.0