sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_read_partition) function_name_read_partition (parameters (identifier_self) identifier_self (identifier_i) identifier_i )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__load_metadata) identifier__load_metadata )attribute (argument_list )argument_list )call )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_i) identifier_i (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_npartitions) identifier_npartitions )attribute )comparison_operator )boolean_operator (block (raise_statement (call (identifier_IndexError) identifier_IndexError (argument_list (binary_operator (string_'%d is out of range') string_'%d is out of range' (identifier_i) identifier_i )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__get_partition) identifier__get_partition )attribute (argument_list (identifier_i) identifier_i )argument_list )call )return_statement )block )function_definition )module
Return a part of the data corresponding to i-th partition. By default, assumes i should be an integer between zero and npartitions; override for more complex indexing schemes.
(module (function_definition (function_name_backward) function_name_backward (parameters (identifier_self) identifier_self (default_parameter (identifier_speed) identifier_speed (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_left_motor) identifier_left_motor )attribute (identifier_backward) identifier_backward )attribute (argument_list (identifier_speed) identifier_speed )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_right_motor) identifier_right_motor )attribute (identifier_backward) identifier_backward )attribute (argument_list (identifier_speed) identifier_speed )argument_list )call )expression_statement )block )function_definition )module
Drive the robot backward by running both motors backward. :param float speed: Speed at which to drive the motors, as a value between 0 (stopped) and 1 (full speed). The default is 1.
(module (function_definition (function_name_stop) function_name_stop (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (tuple (attribute (identifier_Status) identifier_Status (identifier_stopping) identifier_stopping )attribute (attribute (identifier_Status) identifier_Status (identifier_stopped) identifier_stopped )attribute )tuple )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"{} is already {}") string_"{} is already {}" (identifier_format) identifier_format )attribute (argument_list (identifier_self) identifier_self (attribute (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (attribute (identifier_Status) identifier_Status (identifier_stopping) identifier_stopping )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_onStopping) identifier_onStopping )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (attribute (identifier_Status) identifier_Status (identifier_stopped) identifier_stopped )attribute )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Set the status to Status.stopping and also call `onStopping` with the provided args and kwargs.
(module (function_definition (function_name_url) function_name_url (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_is_public) identifier_is_public )attribute (block (return_statement (call (attribute (string_'{0}/{1}/{2}') string_'{0}/{1}/{2}' (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_bucket) identifier_bucket )attribute (identifier__boto_s3) identifier__boto_s3 )attribute (identifier_meta) identifier_meta )attribute (identifier_client) identifier_client )attribute (identifier_meta) identifier_meta )attribute (identifier_endpoint_url) identifier_endpoint_url )attribute (attribute (attribute (identifier_self) identifier_self (identifier_bucket) identifier_bucket )attribute (identifier_name) identifier_name )attribute (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )return_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'{0!r} does not have the public-read ACL set. ') string_'{0!r} does not have the public-read ACL set. ' (string_'Use the make_public() method to allow for ') string_'Use the make_public() method to allow for ' (string_'public URL sharing.') string_'public URL sharing.' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Returns the public URL for the given key.
(module (function_definition (function_name__full_like_variable) function_name__full_like_variable (parameters (identifier_other) identifier_other (identifier_fill_value) identifier_fill_value (typed_default_parameter (identifier_dtype) identifier_dtype (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_str) identifier_str )type (type (attribute (identifier_np) identifier_np (identifier_dtype) identifier_dtype )attribute )type (type (None) None )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_variable) identifier_variable )dotted_name )relative_import (dotted_name (identifier_Variable) identifier_Variable )dotted_name )import_from_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_other) identifier_other (identifier_data) identifier_data )attribute (identifier_dask_array_type) identifier_dask_array_type )argument_list )call (block (import_statement (dotted_name (identifier_dask) identifier_dask (identifier_array) identifier_array )dotted_name )import_statement (if_statement (comparison_operator (identifier_dtype) identifier_dtype (None) None )comparison_operator (block (expression_statement (assignment (identifier_dtype) identifier_dtype (attribute (identifier_other) identifier_other (identifier_dtype) identifier_dtype )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (attribute (identifier_dask) identifier_dask (identifier_array) identifier_array )attribute (identifier_full) identifier_full )attribute (argument_list (attribute (identifier_other) identifier_other (identifier_shape) identifier_shape )attribute (identifier_fill_value) identifier_fill_value (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument (keyword_argument (identifier_chunks) identifier_chunks (attribute (attribute (identifier_other) identifier_other (identifier_data) identifier_data )attribute (identifier_chunks) identifier_chunks )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_np) identifier_np (identifier_full_like) identifier_full_like )attribute (argument_list (identifier_other) identifier_other (identifier_fill_value) identifier_fill_value (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_Variable) identifier_Variable (argument_list (keyword_argument (identifier_dims) identifier_dims (attribute (identifier_other) identifier_other (identifier_dims) identifier_dims )attribute )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_attrs) identifier_attrs (attribute (identifier_other) identifier_other (identifier_attrs) identifier_attrs )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Inner function of full_like, where other must be a variable
(module (function_definition (function_name_loadBatch) function_name_loadBatch (parameters (identifier_self) identifier_self (identifier_records) identifier_records )parameters (block (try_statement (block (expression_statement (assignment (identifier_curr_batch) identifier_curr_batch (subscript (identifier_records) identifier_records (slice (colon) colon (call (attribute (identifier_self) identifier_self (identifier_batchSize) identifier_batchSize )attribute (argument_list )argument_list )call )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_next_batch) identifier_next_batch (subscript (identifier_records) identifier_records (slice (call (attribute (identifier_self) identifier_self (identifier_batchSize) identifier_batchSize )attribute (argument_list )argument_list )call (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_curr_records) identifier_curr_records (call (identifier_list) identifier_list (argument_list (identifier_curr_batch) identifier_curr_batch )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__preloadColumns) identifier__preloadColumns )attribute (block (for_statement (identifier_record) identifier_record (identifier_curr_records) identifier_curr_records (block (expression_statement (call (attribute (identifier_record) identifier_record (identifier_recordValues) identifier_recordValues )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__preloadColumns) identifier__preloadColumns )attribute )argument_list )call )expression_statement )block )for_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_curr_records) identifier_curr_records )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_batchSize) identifier_batchSize )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_loadedRecords) identifier_loadedRecords )attribute (identifier_object) identifier_object (identifier_object) identifier_object )subscript (identifier_emit) identifier_emit )attribute (argument_list (identifier_curr_records) identifier_curr_records (identifier_next_batch) identifier_next_batch )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_loadedRecords) identifier_loadedRecords )attribute (identifier_object) identifier_object )subscript (identifier_emit) identifier_emit )attribute (argument_list (identifier_curr_records) identifier_curr_records )argument_list )call )expression_statement )block )else_clause )if_statement )block (except_clause (identifier_ConnectionLostError) identifier_ConnectionLostError (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_connectionLost) identifier_connectionLost )attribute (identifier_emit) identifier_emit )attribute (argument_list )argument_list )call )expression_statement )block )except_clause (except_clause (identifier_Interruption) identifier_Interruption (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
Loads the records for this instance in a batched mode.
(module (function_definition (function_name_get_graph_data) function_name_get_graph_data (parameters (identifier_self) identifier_self (identifier_graph) identifier_graph (identifier_benchmark) identifier_benchmark )parameters (block (if_statement (call (attribute (identifier_benchmark) identifier_benchmark (identifier_get) identifier_get )attribute (argument_list (string_'params') string_'params' )argument_list )call (block (expression_statement (assignment (identifier_param_iter) identifier_param_iter (call (identifier_enumerate) identifier_enumerate (argument_list (call (identifier_zip) identifier_zip (argument_list (call (attribute (identifier_itertools) identifier_itertools (identifier_product) identifier_product )attribute (argument_list (list_splat (subscript (identifier_benchmark) identifier_benchmark (string_'params') string_'params' )subscript )list_splat )argument_list )call (call (attribute (identifier_graph) identifier_graph (identifier_get_steps) identifier_get_steps )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_param_iter) identifier_param_iter (list (tuple (None) None (tuple (None) None (call (attribute (identifier_graph) identifier_graph (identifier_get_steps) identifier_get_steps )attribute (argument_list )argument_list )call )tuple )tuple )list )assignment )expression_statement )block )else_clause )if_statement (for_statement (pattern_list (identifier_j) identifier_j (tuple_pattern (identifier_param) identifier_param (identifier_steps) identifier_steps )tuple_pattern )pattern_list (identifier_param_iter) identifier_param_iter (block (if_statement (comparison_operator (identifier_param) identifier_param (None) None )comparison_operator (block (expression_statement (assignment (identifier_entry_name) identifier_entry_name (subscript (identifier_benchmark) identifier_benchmark (string_'name') string_'name' )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_entry_name) identifier_entry_name (binary_operator (subscript (identifier_benchmark) identifier_benchmark (string_'name') string_'name' )subscript (call (attribute (string_'({0})') string_'({0})' (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_param) identifier_param )argument_list )call )argument_list )call )binary_operator )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_start_revision) identifier_start_revision (call (attribute (identifier_self) identifier_self (identifier__get_start_revision) identifier__get_start_revision )attribute (argument_list (identifier_graph) identifier_graph (identifier_benchmark) identifier_benchmark (identifier_entry_name) identifier_entry_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_threshold) identifier_threshold (call (attribute (identifier_self) identifier_self (identifier__get_threshold) identifier__get_threshold )attribute (argument_list (identifier_graph) identifier_graph (identifier_benchmark) identifier_benchmark (identifier_entry_name) identifier_entry_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_start_revision) identifier_start_revision (None) None )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_steps) identifier_steps (list_comprehension (identifier_step) identifier_step (for_in_clause (identifier_step) identifier_step (identifier_steps) identifier_steps )for_in_clause (if_clause (comparison_operator (subscript (identifier_step) identifier_step (integer_1) integer_1 )subscript (identifier_start_revision) identifier_start_revision )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (expression_statement (yield (expression_list (identifier_j) identifier_j (identifier_entry_name) identifier_entry_name (identifier_steps) identifier_steps (identifier_threshold) identifier_threshold )expression_list )yield )expression_statement )block )for_statement )block )function_definition )module
Iterator over graph data sets Yields ------ param_idx Flat index to parameter permutations for parameterized benchmarks. None if benchmark is not parameterized. entry_name Name for the data set. If benchmark is non-parameterized, this is the benchmark name. steps Steps to consider in regression detection. threshold User-specified threshold for regression detection.
(module (function_definition (function_name_registration_id_chunks) function_name_registration_id_chunks (parameters (identifier_self) identifier_self (identifier_registration_ids) identifier_registration_ids )parameters (block (try_statement (block (expression_statement (identifier_xrange) identifier_xrange )expression_statement )block (except_clause (identifier_NameError) identifier_NameError (block (expression_statement (assignment (identifier_xrange) identifier_xrange (identifier_range) identifier_range )assignment )expression_statement )block )except_clause )try_statement (for_statement (identifier_i) identifier_i (call (identifier_xrange) identifier_xrange (argument_list (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_registration_ids) identifier_registration_ids )argument_list )call (attribute (identifier_self) identifier_self (identifier_FCM_MAX_RECIPIENTS) identifier_FCM_MAX_RECIPIENTS )attribute )argument_list )call (block (expression_statement (yield (subscript (identifier_registration_ids) identifier_registration_ids (slice (identifier_i) identifier_i (colon) colon (binary_operator (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_FCM_MAX_RECIPIENTS) identifier_FCM_MAX_RECIPIENTS )attribute )binary_operator )slice )subscript )yield )expression_statement )block )for_statement )block )function_definition )module
Splits registration ids in several lists of max 1000 registration ids per list Args: registration_ids (list): FCM device registration ID Yields: generator: list including lists with registration ids
(module (function_definition (function_name_to_dict) function_name_to_dict (parameters (identifier_obj) identifier_obj (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (call (identifier_is_model) identifier_is_model (argument_list (attribute (identifier_obj) identifier_obj (identifier___class__) identifier___class__ )attribute )argument_list )call (block (return_statement (call (identifier_related_obj_to_dict) identifier_related_obj_to_dict (argument_list (identifier_obj) identifier_obj (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (else_clause (block (return_statement (identifier_obj) identifier_obj )return_statement )block )else_clause )if_statement )block )function_definition )module
Convert an object into dictionary. Uses singledispatch to allow for clean extensions for custom class types. Reference: https://pypi.python.org/pypi/singledispatch :param obj: object instance :param kwargs: keyword arguments such as suppress_private_attr, suppress_empty_values, dict_factory :return: converted dictionary.
(module (function_definition (function_name_merge_asof) function_name_merge_asof (parameters (identifier_left) identifier_left (identifier_right) identifier_right (default_parameter (identifier_on) identifier_on (None) None )default_parameter (default_parameter (identifier_left_on) identifier_left_on (None) None )default_parameter (default_parameter (identifier_right_on) identifier_right_on (None) None )default_parameter (default_parameter (identifier_left_index) identifier_left_index (False) False )default_parameter (default_parameter (identifier_right_index) identifier_right_index (False) False )default_parameter (default_parameter (identifier_by) identifier_by (None) None )default_parameter (default_parameter (identifier_left_by) identifier_left_by (None) None )default_parameter (default_parameter (identifier_right_by) identifier_right_by (None) None )default_parameter (default_parameter (identifier_suffixes) identifier_suffixes (tuple (string_'_x') string_'_x' (string_'_y') string_'_y' )tuple )default_parameter (default_parameter (identifier_tolerance) identifier_tolerance (None) None )default_parameter (default_parameter (identifier_allow_exact_matches) identifier_allow_exact_matches (True) True )default_parameter (default_parameter (identifier_direction) identifier_direction (string_'backward') string_'backward' )default_parameter )parameters (block (expression_statement (assignment (identifier_op) identifier_op (call (identifier__AsOfMerge) identifier__AsOfMerge (argument_list (identifier_left) identifier_left (identifier_right) identifier_right (keyword_argument (identifier_on) identifier_on (identifier_on) identifier_on )keyword_argument (keyword_argument (identifier_left_on) identifier_left_on (identifier_left_on) identifier_left_on )keyword_argument (keyword_argument (identifier_right_on) identifier_right_on (identifier_right_on) identifier_right_on )keyword_argument (keyword_argument (identifier_left_index) identifier_left_index (identifier_left_index) identifier_left_index )keyword_argument (keyword_argument (identifier_right_index) identifier_right_index (identifier_right_index) identifier_right_index )keyword_argument (keyword_argument (identifier_by) identifier_by (identifier_by) identifier_by )keyword_argument (keyword_argument (identifier_left_by) identifier_left_by (identifier_left_by) identifier_left_by )keyword_argument (keyword_argument (identifier_right_by) identifier_right_by (identifier_right_by) identifier_right_by )keyword_argument (keyword_argument (identifier_suffixes) identifier_suffixes (identifier_suffixes) identifier_suffixes )keyword_argument (keyword_argument (identifier_how) identifier_how (string_'asof') string_'asof' )keyword_argument (keyword_argument (identifier_tolerance) identifier_tolerance (identifier_tolerance) identifier_tolerance )keyword_argument (keyword_argument (identifier_allow_exact_matches) identifier_allow_exact_matches (identifier_allow_exact_matches) identifier_allow_exact_matches )keyword_argument (keyword_argument (identifier_direction) identifier_direction (identifier_direction) identifier_direction )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_op) identifier_op (identifier_get_result) identifier_get_result )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Perform an asof merge. This is similar to a left-join except that we match on nearest key rather than equal keys. Both DataFrames must be sorted by the key. For each row in the left DataFrame: - A "backward" search selects the last row in the right DataFrame whose 'on' key is less than or equal to the left's key. - A "forward" search selects the first row in the right DataFrame whose 'on' key is greater than or equal to the left's key. - A "nearest" search selects the row in the right DataFrame whose 'on' key is closest in absolute distance to the left's key. The default is "backward" and is compatible in versions below 0.20.0. The direction parameter was added in version 0.20.0 and introduces "forward" and "nearest". Optionally match on equivalent keys with 'by' before searching with 'on'. .. versionadded:: 0.19.0 Parameters ---------- left : DataFrame right : DataFrame on : label Field name to join on. Must be found in both DataFrames. The data MUST be ordered. Furthermore this must be a numeric column, such as datetimelike, integer, or float. On or left_on/right_on must be given. left_on : label Field name to join on in left DataFrame. right_on : label Field name to join on in right DataFrame. left_index : boolean Use the index of the left DataFrame as the join key. .. versionadded:: 0.19.2 right_index : boolean Use the index of the right DataFrame as the join key. .. versionadded:: 0.19.2 by : column name or list of column names Match on these columns before performing merge operation. left_by : column name Field names to match on in the left DataFrame. .. versionadded:: 0.19.2 right_by : column name Field names to match on in the right DataFrame. .. versionadded:: 0.19.2 suffixes : 2-length sequence (tuple, list, ...) Suffix to apply to overlapping column names in the left and right side, respectively. tolerance : integer or Timedelta, optional, default None Select asof tolerance within this range; must be compatible with the merge index. allow_exact_matches : boolean, default True - If True, allow matching with the same 'on' value (i.e. less-than-or-equal-to / greater-than-or-equal-to) - If False, don't match the same 'on' value (i.e., strictly less-than / strictly greater-than) direction : 'backward' (default), 'forward', or 'nearest' Whether to search for prior, subsequent, or closest matches. .. versionadded:: 0.20.0 Returns ------- merged : DataFrame See Also -------- merge merge_ordered Examples -------- >>> left = pd.DataFrame({'a': [1, 5, 10], 'left_val': ['a', 'b', 'c']}) >>> left a left_val 0 1 a 1 5 b 2 10 c >>> right = pd.DataFrame({'a': [1, 2, 3, 6, 7], ... 'right_val': [1, 2, 3, 6, 7]}) >>> right a right_val 0 1 1 1 2 2 2 3 3 3 6 6 4 7 7 >>> pd.merge_asof(left, right, on='a') a left_val right_val 0 1 a 1 1 5 b 3 2 10 c 7 >>> pd.merge_asof(left, right, on='a', allow_exact_matches=False) a left_val right_val 0 1 a NaN 1 5 b 3.0 2 10 c 7.0 >>> pd.merge_asof(left, right, on='a', direction='forward') a left_val right_val 0 1 a 1.0 1 5 b 6.0 2 10 c NaN >>> pd.merge_asof(left, right, on='a', direction='nearest') a left_val right_val 0 1 a 1 1 5 b 6 2 10 c 7 We can use indexed DataFrames as well. >>> left = pd.DataFrame({'left_val': ['a', 'b', 'c']}, index=[1, 5, 10]) >>> left left_val 1 a 5 b 10 c >>> right = pd.DataFrame({'right_val': [1, 2, 3, 6, 7]}, ... index=[1, 2, 3, 6, 7]) >>> right right_val 1 1 2 2 3 3 6 6 7 7 >>> pd.merge_asof(left, right, left_index=True, right_index=True) left_val right_val 1 a 1 5 b 3 10 c 7 Here is a real-world times-series example >>> quotes time ticker bid ask 0 2016-05-25 13:30:00.023 GOOG 720.50 720.93 1 2016-05-25 13:30:00.023 MSFT 51.95 51.96 2 2016-05-25 13:30:00.030 MSFT 51.97 51.98 3 2016-05-25 13:30:00.041 MSFT 51.99 52.00 4 2016-05-25 13:30:00.048 GOOG 720.50 720.93 5 2016-05-25 13:30:00.049 AAPL 97.99 98.01 6 2016-05-25 13:30:00.072 GOOG 720.50 720.88 7 2016-05-25 13:30:00.075 MSFT 52.01 52.03 >>> trades time ticker price quantity 0 2016-05-25 13:30:00.023 MSFT 51.95 75 1 2016-05-25 13:30:00.038 MSFT 51.95 155 2 2016-05-25 13:30:00.048 GOOG 720.77 100 3 2016-05-25 13:30:00.048 GOOG 720.92 100 4 2016-05-25 13:30:00.048 AAPL 98.00 100 By default we are taking the asof of the quotes >>> pd.merge_asof(trades, quotes, ... on='time', ... by='ticker') time ticker price quantity bid ask 0 2016-05-25 13:30:00.023 MSFT 51.95 75 51.95 51.96 1 2016-05-25 13:30:00.038 MSFT 51.95 155 51.97 51.98 2 2016-05-25 13:30:00.048 GOOG 720.77 100 720.50 720.93 3 2016-05-25 13:30:00.048 GOOG 720.92 100 720.50 720.93 4 2016-05-25 13:30:00.048 AAPL 98.00 100 NaN NaN We only asof within 2ms between the quote time and the trade time >>> pd.merge_asof(trades, quotes, ... on='time', ... by='ticker', ... tolerance=pd.Timedelta('2ms')) time ticker price quantity bid ask 0 2016-05-25 13:30:00.023 MSFT 51.95 75 51.95 51.96 1 2016-05-25 13:30:00.038 MSFT 51.95 155 NaN NaN 2 2016-05-25 13:30:00.048 GOOG 720.77 100 720.50 720.93 3 2016-05-25 13:30:00.048 GOOG 720.92 100 720.50 720.93 4 2016-05-25 13:30:00.048 AAPL 98.00 100 NaN NaN We only asof within 10ms between the quote time and the trade time and we exclude exact matches on time. However *prior* data will propagate forward >>> pd.merge_asof(trades, quotes, ... on='time', ... by='ticker', ... tolerance=pd.Timedelta('10ms'), ... allow_exact_matches=False) time ticker price quantity bid ask 0 2016-05-25 13:30:00.023 MSFT 51.95 75 NaN NaN 1 2016-05-25 13:30:00.038 MSFT 51.95 155 51.97 51.98 2 2016-05-25 13:30:00.048 GOOG 720.77 100 NaN NaN 3 2016-05-25 13:30:00.048 GOOG 720.92 100 NaN NaN 4 2016-05-25 13:30:00.048 AAPL 98.00 100 NaN NaN
(module (function_definition (function_name_python_sidebar_navigation) function_name_python_sidebar_navigation (parameters (identifier_python_input) identifier_python_input )parameters (block (function_definition (function_name_get_text_fragments) function_name_get_text_fragments (parameters )parameters (block (expression_statement (assignment (identifier_tokens) identifier_tokens (list )list )assignment )expression_statement (expression_statement (call (attribute (identifier_tokens) identifier_tokens (identifier_extend) identifier_extend )attribute (argument_list (list (tuple (string_'class:sidebar') string_'class:sidebar' (string_' ') string_' ' )tuple (tuple (string_'class:sidebar.key') string_'class:sidebar.key' (string_'[Arrows]') string_'[Arrows]' )tuple (tuple (string_'class:sidebar') string_'class:sidebar' (string_' ') string_' ' )tuple (tuple (string_'class:sidebar.description') string_'class:sidebar.description' (string_'Navigate') string_'Navigate' )tuple (tuple (string_'class:sidebar') string_'class:sidebar' (string_' ') string_' ' )tuple (tuple (string_'class:sidebar.key') string_'class:sidebar.key' (string_'[Enter]') string_'[Enter]' )tuple (tuple (string_'class:sidebar') string_'class:sidebar' (string_' ') string_' ' )tuple (tuple (string_'class:sidebar.description') string_'class:sidebar.description' (string_'Hide menu') string_'Hide menu' )tuple )list )argument_list )call )expression_statement (return_statement (identifier_tokens) identifier_tokens )return_statement )block )function_definition (return_statement (call (identifier_Window) identifier_Window (argument_list (call (identifier_FormattedTextControl) identifier_FormattedTextControl (argument_list (identifier_get_text_fragments) identifier_get_text_fragments )argument_list )call (keyword_argument (identifier_style) identifier_style (string_'class:sidebar') string_'class:sidebar' )keyword_argument (keyword_argument (identifier_width) identifier_width (call (attribute (identifier_Dimension) identifier_Dimension (identifier_exact) identifier_exact )attribute (argument_list (integer_43) integer_43 )argument_list )call )keyword_argument (keyword_argument (identifier_height) identifier_height (call (attribute (identifier_Dimension) identifier_Dimension (identifier_exact) identifier_exact )attribute (argument_list (integer_1) integer_1 )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create the `Layout` showing the navigation information for the sidebar.
(module (function_definition (function_name_anchor_stream) function_name_anchor_stream (parameters (identifier_self) identifier_self (identifier_stream_id) identifier_stream_id (default_parameter (identifier_converter) identifier_converter (string_"rtc") string_"rtc" )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_converter) identifier_converter (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_converter) identifier_converter (call (attribute (attribute (identifier_self) identifier_self (identifier__known_converters) identifier__known_converters )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_converter) identifier_converter )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_converter) identifier_converter (None) None )comparison_operator (block (raise_statement (call (identifier_ArgumentError) identifier_ArgumentError (argument_list (binary_operator (string_"Unknown anchor converter string: %s") string_"Unknown anchor converter string: %s" (identifier_converter) identifier_converter )binary_operator (keyword_argument (identifier_known_converters) identifier_known_converters (call (identifier_list) identifier_list (argument_list (attribute (identifier_self) identifier_self (identifier__known_converters) identifier__known_converters )attribute )argument_list )call )keyword_argument )argument_list )call )raise_statement )block )if_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__anchor_streams) identifier__anchor_streams )attribute (identifier_stream_id) identifier_stream_id )subscript (identifier_converter) identifier_converter )assignment )expression_statement )block )function_definition )module
Mark a stream as containing anchor points.
(module (function_definition (function_name_to_embedded) function_name_to_embedded (parameters (default_parameter (identifier_pool_id) identifier_pool_id (None) None )default_parameter (default_parameter (identifier_is_thin_enabled) identifier_is_thin_enabled (None) None )default_parameter (default_parameter (identifier_is_deduplication_enabled) identifier_is_deduplication_enabled (None) None )default_parameter (default_parameter (identifier_is_compression_enabled) identifier_is_compression_enabled (None) None )default_parameter (default_parameter (identifier_is_backup_only) identifier_is_backup_only (None) None )default_parameter (default_parameter (identifier_size) identifier_size (None) None )default_parameter (default_parameter (identifier_tiering_policy) identifier_tiering_policy (None) None )default_parameter (default_parameter (identifier_request_id) identifier_request_id (None) None )default_parameter (default_parameter (identifier_src_id) identifier_src_id (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_default_sp) identifier_default_sp (None) None )default_parameter (default_parameter (identifier_replication_resource_type) identifier_replication_resource_type (None) None )default_parameter )parameters (block (return_statement (dictionary (pair (string_'poolId') string_'poolId' (identifier_pool_id) identifier_pool_id )pair (pair (string_'isThinEnabled') string_'isThinEnabled' (identifier_is_thin_enabled) identifier_is_thin_enabled )pair (pair (string_'isDeduplicationEnabled') string_'isDeduplicationEnabled' (identifier_is_deduplication_enabled) identifier_is_deduplication_enabled )pair (pair (string_'isCompressionEnabled') string_'isCompressionEnabled' (identifier_is_compression_enabled) identifier_is_compression_enabled )pair (pair (string_'isBackupOnly') string_'isBackupOnly' (identifier_is_backup_only) identifier_is_backup_only )pair (pair (string_'size') string_'size' (identifier_size) identifier_size )pair (pair (string_'tieringPolicy') string_'tieringPolicy' (identifier_tiering_policy) identifier_tiering_policy )pair (pair (string_'requestId') string_'requestId' (identifier_request_id) identifier_request_id )pair (pair (string_'srcId') string_'srcId' (identifier_src_id) identifier_src_id )pair (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'defaultSP') string_'defaultSP' (identifier_default_sp) identifier_default_sp )pair (pair (string_'replicationResourceType') string_'replicationResourceType' (identifier_replication_resource_type) identifier_replication_resource_type )pair )dictionary )return_statement )block )function_definition )module
Constructs an embeded object of `UnityResourceConfig`. :param pool_id: storage pool of the resource. :param is_thin_enabled: is thin type or not. :param is_deduplication_enabled: is deduplication enabled or not. :param is_compression_enabled: is in-line compression (ILC) enabled or not. :param is_backup_only: is backup only or not. :param size: size of the resource. :param tiering_policy: `TieringPolicyEnum` value. Tiering policy for the resource. :param request_id: unique request ID for the configuration. :param src_id: storage resource if it already exists. :param name: name of the storage resource. :param default_sp: `NodeEnum` value. Default storage processor for the resource. :param replication_resource_type: `ReplicationEndpointResourceTypeEnum` value. Replication resource type. :return:
(module (function_definition (function_name_initialise_loggers) function_name_initialise_loggers (parameters (identifier_names) identifier_names (default_parameter (identifier_log_level) identifier_log_level (attribute (identifier__builtin_logging) identifier__builtin_logging (identifier_WARNING) identifier_WARNING )attribute )default_parameter (default_parameter (identifier_handler_class) identifier_handler_class (identifier_SplitStreamHandler) identifier_SplitStreamHandler )default_parameter )parameters (block (expression_statement (assignment (identifier_frmttr) identifier_frmttr (call (identifier_get_formatter) identifier_get_formatter (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_name) identifier_name (identifier_names) identifier_names (block (expression_statement (assignment (identifier_logr) identifier_logr (call (attribute (identifier__builtin_logging) identifier__builtin_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_handler) identifier_handler (call (identifier_handler_class) identifier_handler_class (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_handler) identifier_handler (identifier_setFormatter) identifier_setFormatter )attribute (argument_list (identifier_frmttr) identifier_frmttr )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logr) identifier_logr (identifier_addHandler) identifier_addHandler )attribute (argument_list (identifier_handler) identifier_handler )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logr) identifier_logr (identifier_setLevel) identifier_setLevel )attribute (argument_list (identifier_log_level) identifier_log_level )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Initialises specified loggers to generate output at the specified logging level. If the specified named loggers do not exist, they are created. :type names: :obj:`list` of :obj:`str` :param names: List of logger names. :type log_level: :obj:`int` :param log_level: Log level for messages, typically one of :obj:`logging.DEBUG`, :obj:`logging.INFO`, :obj:`logging.WARN`, :obj:`logging.ERROR` or :obj:`logging.CRITICAL`. See :ref:`levels`. :type handler_class: One of the :obj:`logging.handlers` classes. :param handler_class: The handler class for output of log messages, for example :obj:`SplitStreamHandler` or :obj:`logging.StreamHandler`. Example:: >>> from array_split import logging >>> logging.initialise_loggers(["my_logger",], log_level=logging.INFO) >>> logger = logging.getLogger("my_logger") >>> logger.info("This is info logging.") 16:35:09|ARRSPLT| This is info logging. >>> logger.debug("Not logged at logging.INFO level.") >>>
(module (function_definition (function_name__get_callback_context) function_name__get_callback_context (parameters (identifier_env) identifier_env )parameters (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_env) identifier_env (identifier_model) identifier_model )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_env) identifier_env (identifier_cvfolds) identifier_cvfolds )attribute (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_context) identifier_context (string_'train') string_'train' )assignment )expression_statement )block (elif_clause (boolean_operator (comparison_operator (attribute (identifier_env) identifier_env (identifier_model) identifier_model )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_env) identifier_env (identifier_cvfolds) identifier_cvfolds )attribute (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_context) identifier_context (string_'cv') string_'cv' )assignment )expression_statement )block )elif_clause )if_statement (return_statement (identifier_context) identifier_context )return_statement )block )function_definition )module
return whether the current callback context is cv or train
(module (function_definition (function_name_date_range) function_name_date_range (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_days) identifier_days (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_days) identifier_days )attribute )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (call (identifier_exit_after_echo) identifier_exit_after_echo (argument_list (identifier_QUERY_DAYS_INVALID) identifier_QUERY_DAYS_INVALID )argument_list )call )expression_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_days) identifier_days (integer_1) integer_1 )comparison_operator (block (expression_statement (call (identifier_exit_after_echo) identifier_exit_after_echo (argument_list (identifier_QUERY_DAYS_INVALID) identifier_QUERY_DAYS_INVALID )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_start) identifier_start (call (attribute (identifier_datetime) identifier_datetime (identifier_today) identifier_today )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_end) identifier_end (binary_operator (identifier_start) identifier_start (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_days) identifier_days (identifier_days) identifier_days )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement (return_statement (tuple (call (attribute (identifier_datetime) identifier_datetime (identifier_strftime) identifier_strftime )attribute (argument_list (identifier_start) identifier_start (string_'%Y-%m-%d') string_'%Y-%m-%d' )argument_list )call (call (attribute (identifier_datetime) identifier_datetime (identifier_strftime) identifier_strftime )attribute (argument_list (identifier_end) identifier_end (string_'%Y-%m-%d') string_'%Y-%m-%d' )argument_list )call )tuple )return_statement )block )function_definition )module
Generate date range according to the `days` user input.
(module (function_definition (function_name_stop_workflow) function_name_stop_workflow (parameters (identifier_config) identifier_config (keyword_separator )keyword_separator (default_parameter (identifier_names) identifier_names (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_jobs) identifier_jobs (call (identifier_list_jobs) identifier_list_jobs (argument_list (identifier_config) identifier_config (keyword_argument (identifier_filter_by_type) identifier_filter_by_type (attribute (identifier_JobType) identifier_JobType (identifier_Workflow) identifier_Workflow )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_names) identifier_names (None) None )comparison_operator (block (expression_statement (assignment (identifier_filtered_jobs) identifier_filtered_jobs (list )list )assignment )expression_statement (for_statement (identifier_job) identifier_job (identifier_jobs) identifier_jobs (block (if_statement (boolean_operator (boolean_operator (parenthesized_expression (comparison_operator (attribute (identifier_job) identifier_job (identifier_id) identifier_id )attribute (identifier_names) identifier_names )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (attribute (identifier_job) identifier_job (identifier_name) identifier_name )attribute (identifier_names) identifier_names )comparison_operator )parenthesized_expression )boolean_operator (parenthesized_expression (comparison_operator (attribute (identifier_job) identifier_job (identifier_workflow_id) identifier_workflow_id )attribute (identifier_names) identifier_names )comparison_operator )parenthesized_expression )boolean_operator (block (expression_statement (call (attribute (identifier_filtered_jobs) identifier_filtered_jobs (identifier_append) identifier_append )attribute (argument_list (identifier_job) identifier_job )argument_list )call )expression_statement )block )if_statement )block )for_statement )block (else_clause (block (expression_statement (assignment (identifier_filtered_jobs) identifier_filtered_jobs (identifier_jobs) identifier_jobs )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_success) identifier_success (list )list )assignment )expression_statement (expression_statement (assignment (identifier_failed) identifier_failed (list )list )assignment )expression_statement (for_statement (identifier_job) identifier_job (identifier_filtered_jobs) identifier_filtered_jobs (block (expression_statement (assignment (identifier_client) identifier_client (call (identifier_Client) identifier_Client (argument_list (call (identifier_SignalConnection) identifier_SignalConnection (argument_list (dictionary_splat (attribute (identifier_config) identifier_config (identifier_signal) identifier_signal )attribute )dictionary_splat (keyword_argument (identifier_auto_connect) identifier_auto_connect (True) True )keyword_argument )argument_list )call (keyword_argument (identifier_request_key) identifier_request_key (attribute (identifier_job) identifier_job (identifier_workflow_id) identifier_workflow_id )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (attribute (call (attribute (identifier_client) identifier_client (identifier_send) identifier_send )attribute (argument_list (call (identifier_Request) identifier_Request (argument_list (keyword_argument (identifier_action) identifier_action (string_'stop_workflow') string_'stop_workflow' )keyword_argument )argument_list )call )argument_list )call (identifier_success) identifier_success )attribute (block (expression_statement (call (attribute (identifier_success) identifier_success (identifier_append) identifier_append )attribute (argument_list (identifier_job) identifier_job )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_failed) identifier_failed (identifier_append) identifier_append )attribute (argument_list (identifier_job) identifier_job )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (expression_list (identifier_success) identifier_success (identifier_failed) identifier_failed )expression_list )return_statement )block )function_definition )module
Stop one or more workflows. Args: config (Config): Reference to the configuration object from which the settings for the workflow are retrieved. names (list): List of workflow names, workflow ids or workflow job ids for the workflows that should be stopped. If all workflows should be stopped, set it to None. Returns: tuple: A tuple of the workflow jobs that were successfully stopped and the ones that could not be stopped.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_key) identifier_key (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_memcached) identifier_memcached )attribute (identifier_get_conn) identifier_get_conn )attribute (argument_list (identifier_profile) identifier_profile )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_memcached) identifier_memcached )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_conn) identifier_conn (identifier_key) identifier_key )argument_list )call )return_statement )block )function_definition )module
Get a value from memcached
(module (function_definition (function_name_classify_coincident) function_name_classify_coincident (parameters (identifier_st_vals) identifier_st_vals (identifier_coincident) identifier_coincident )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (not_operator (identifier_coincident) identifier_coincident )not_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (subscript (identifier_st_vals) identifier_st_vals (integer_0) integer_0 (integer_0) integer_0 )subscript (subscript (identifier_st_vals) identifier_st_vals (integer_0) integer_0 (integer_1) integer_1 )subscript )comparison_operator (comparison_operator (subscript (identifier_st_vals) identifier_st_vals (integer_1) integer_1 (integer_0) integer_0 )subscript (subscript (identifier_st_vals) identifier_st_vals (integer_1) integer_1 (integer_1) integer_1 )subscript )comparison_operator )boolean_operator (block (return_statement (identifier_UNUSED_T) identifier_UNUSED_T )return_statement )block (else_clause (block (return_statement (attribute (identifier_CLASSIFICATION_T) identifier_CLASSIFICATION_T (identifier_COINCIDENT) identifier_COINCIDENT )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
r"""Determine if coincident parameters are "unused". .. note:: This is a helper for :func:`surface_intersections`. In the case that ``coincident`` is :data:`True`, then we'll have two sets of parameters :math:`(s_1, t_1)` and :math:`(s_2, t_2)`. If one of :math:`s1 < s2` or :math:`t1 < t2` is not satisfied, the coincident segments will be moving in opposite directions, hence don't define an interior of an intersection. .. warning:: In the "coincident" case, this assumes, but doesn't check, that ``st_vals`` is ``2 x 2``. Args: st_vals (numpy.ndarray): ``2 X N`` array of intersection parameters. coincident (bool): Flag indicating if the intersections are the endpoints of coincident segments of two curves. Returns: Optional[.IntersectionClassification]: The classification of the intersections.
(module (function_definition (function_name_reset) function_name_reset (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_resync_period) identifier_resync_period )attribute (integer_0) integer_0 )comparison_operator (comparison_operator (binary_operator (parenthesized_expression (binary_operator (attribute (identifier_self) identifier_self (identifier_resets) identifier_resets )attribute (integer_1) integer_1 )binary_operator )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_resync_period) identifier_resync_period )attribute )binary_operator (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__exit_resync) identifier__exit_resync )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (while_statement (not_operator (attribute (identifier_self) identifier_self (identifier_done) identifier_done )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_done) identifier_done )attribute (call (attribute (identifier_self) identifier_self (identifier__quit_episode) identifier__quit_episode )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_done) identifier_done )attribute )not_operator (block (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (float_0.1) float_0.1 )argument_list )call )expression_statement )block )if_statement )block )while_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__start_up) identifier__start_up )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
gym api reset
(module (function_definition (function_name_write) function_name_write (parameters (identifier_name) identifier_name (identifier_keyword) identifier_keyword (identifier_domain) identifier_domain (identifier_citation) identifier_citation (identifier_author) identifier_author (identifier_description) identifier_description (identifier_species) identifier_species (identifier_version) identifier_version (identifier_contact) identifier_contact (identifier_licenses) identifier_licenses (identifier_values) identifier_values (identifier_functions) identifier_functions (identifier_output) identifier_output (identifier_value_prefix) identifier_value_prefix )parameters (block (expression_statement (call (identifier_write_namespace) identifier_write_namespace (argument_list (identifier_name) identifier_name (identifier_keyword) identifier_keyword (identifier_domain) identifier_domain (identifier_author) identifier_author (identifier_citation) identifier_citation (identifier_values) identifier_values (keyword_argument (identifier_namespace_description) identifier_namespace_description (identifier_description) identifier_description )keyword_argument (keyword_argument (identifier_namespace_species) identifier_namespace_species (identifier_species) identifier_species )keyword_argument (keyword_argument (identifier_namespace_version) identifier_namespace_version (identifier_version) identifier_version )keyword_argument (keyword_argument (identifier_author_contact) identifier_author_contact (identifier_contact) identifier_contact )keyword_argument (keyword_argument (identifier_author_copyright) identifier_author_copyright (identifier_licenses) identifier_licenses )keyword_argument (keyword_argument (identifier_functions) identifier_functions (identifier_functions) identifier_functions )keyword_argument (keyword_argument (identifier_file) identifier_file (identifier_output) identifier_output )keyword_argument (keyword_argument (identifier_value_prefix) identifier_value_prefix (identifier_value_prefix) identifier_value_prefix )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Build a namespace from items.
(module (function_definition (function_name_get_logfile_path) function_name_get_logfile_path (parameters (identifier_working_dir) identifier_working_dir )parameters (block (expression_statement (assignment (identifier_logfile_filename) identifier_logfile_filename (binary_operator (call (attribute (identifier_virtualchain_hooks) identifier_virtualchain_hooks (identifier_get_virtual_chain_name) identifier_get_virtual_chain_name )attribute (argument_list )argument_list )call (string_".log") string_".log" )binary_operator )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_working_dir) identifier_working_dir (identifier_logfile_filename) identifier_logfile_filename )argument_list )call )return_statement )block )function_definition )module
Get the logfile path for our service endpoint.
(module (function_definition (function_name_is_monotonic) function_name_is_monotonic (parameters (identifier_full_list) identifier_full_list )parameters (block (expression_statement (assignment (identifier_prev_elements) identifier_prev_elements (call (identifier_set) identifier_set (argument_list (set (subscript (identifier_full_list) identifier_full_list (integer_0) integer_0 )subscript )set )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_prev_item) identifier_prev_item (subscript (identifier_full_list) identifier_full_list (integer_0) integer_0 )subscript )assignment )expression_statement (for_statement (identifier_item) identifier_item (identifier_full_list) identifier_full_list (block (if_statement (comparison_operator (identifier_item) identifier_item (identifier_prev_item) identifier_prev_item )comparison_operator (block (if_statement (comparison_operator (identifier_item) identifier_item (identifier_prev_elements) identifier_prev_elements )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_prev_item) identifier_prev_item (identifier_item) identifier_item )assignment )expression_statement (expression_statement (call (attribute (identifier_prev_elements) identifier_prev_elements (identifier_add) identifier_add )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (True) True )return_statement )block )function_definition )module
Determine whether elements in a list are monotonic. ie. unique elements are clustered together. ie. [5,5,3,4] is, [5,3,5] is not.
(module (function_definition (function_name_reload) function_name_reload (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_other) identifier_other (call (attribute (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (keyword_argument (identifier_service) identifier_service (attribute (identifier_self) identifier_self (identifier_service) identifier_service )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_request_count) identifier_request_count )attribute (attribute (identifier_other) identifier_other (identifier_request_count) identifier_request_count )attribute )assignment )expression_statement )block )function_definition )module
reload self from self.service
(module (function_definition (function_name_get_current_shutit_pexpect_session) function_name_get_current_shutit_pexpect_session (parameters (identifier_self) identifier_self (default_parameter (identifier_note) identifier_note (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_handle_note) identifier_handle_note )attribute (argument_list (identifier_note) identifier_note )argument_list )call )expression_statement (expression_statement (assignment (identifier_res) identifier_res (attribute (identifier_self) identifier_self (identifier_current_shutit_pexpect_session) identifier_current_shutit_pexpect_session )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_handle_note_after) identifier_handle_note_after )attribute (argument_list (identifier_note) identifier_note )argument_list )call )expression_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Returns the currently-set default pexpect child. @return: default shutit pexpect child object
(module (function_definition (function_name_get_genus_type_metadata) function_name_get_genus_type_metadata (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_metadata) identifier_metadata (call (identifier_dict) identifier_dict (argument_list (subscript (attribute (identifier_self) identifier_self (identifier__mdata) identifier__mdata )attribute (string_'genus_type') string_'genus_type' )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_metadata) identifier_metadata (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'existing_string_values') string_'existing_string_values' (subscript (attribute (identifier_self) identifier_self (identifier__my_map) identifier__my_map )attribute (string_'genusTypeId') string_'genusTypeId' )subscript )pair )dictionary )argument_list )call )expression_statement (return_statement (call (identifier_Metadata) identifier_Metadata (argument_list (dictionary_splat (identifier_metadata) identifier_metadata )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Gets the metadata for a genus type. return: (osid.Metadata) - metadata for the genus *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_delete_user_template) function_name_delete_user_template (parameters (identifier_self) identifier_self (default_parameter (identifier_uid) identifier_uid (integer_0) integer_0 )default_parameter (default_parameter (identifier_temp_id) identifier_temp_id (integer_0) integer_0 )default_parameter (default_parameter (identifier_user_id) identifier_user_id (string_'') string_'' )default_parameter )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_tcp) identifier_tcp )attribute (identifier_user_id) identifier_user_id )boolean_operator (block (expression_statement (assignment (identifier_command) identifier_command (integer_134) integer_134 )assignment )expression_statement (expression_statement (assignment (identifier_command_string) identifier_command_string (call (identifier_pack) identifier_pack (argument_list (string_'<24sB') string_'<24sB' (call (identifier_str) identifier_str (argument_list (identifier_user_id) identifier_user_id )argument_list )call (identifier_temp_id) identifier_temp_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cmd_response) identifier_cmd_response (call (attribute (identifier_self) identifier_self (identifier___send_command) identifier___send_command )attribute (argument_list (identifier_command) identifier_command (identifier_command_string) identifier_command_string )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_cmd_response) identifier_cmd_response (identifier_get) identifier_get )attribute (argument_list (string_'status') string_'status' )argument_list )call (block (return_statement (True) True )return_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )if_statement (if_statement (not_operator (identifier_uid) identifier_uid )not_operator (block (expression_statement (assignment (identifier_users) identifier_users (call (attribute (identifier_self) identifier_self (identifier_get_users) identifier_get_users )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_users) identifier_users (call (identifier_list) identifier_list (argument_list (call (identifier_filter) identifier_filter (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (comparison_operator (attribute (identifier_x) identifier_x (identifier_user_id) identifier_user_id )attribute (call (identifier_str) identifier_str (argument_list (identifier_user_id) identifier_user_id )argument_list )call )comparison_operator )lambda (identifier_users) identifier_users )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_users) identifier_users )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_uid) identifier_uid (attribute (subscript (identifier_users) identifier_users (integer_0) integer_0 )subscript (identifier_uid) identifier_uid )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_command) identifier_command (attribute (identifier_const) identifier_const (identifier_CMD_DELETE_USERTEMP) identifier_CMD_DELETE_USERTEMP )attribute )assignment )expression_statement (expression_statement (assignment (identifier_command_string) identifier_command_string (call (identifier_pack) identifier_pack (argument_list (string_'hb') string_'hb' (identifier_uid) identifier_uid (identifier_temp_id) identifier_temp_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cmd_response) identifier_cmd_response (call (attribute (identifier_self) identifier_self (identifier___send_command) identifier___send_command )attribute (argument_list (identifier_command) identifier_command (identifier_command_string) identifier_command_string )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_cmd_response) identifier_cmd_response (identifier_get) identifier_get )attribute (argument_list (string_'status') string_'status' )argument_list )call (block (return_statement (True) True )return_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )function_definition )module
Delete specific template :param uid: user ID that are generated from device :param user_id: your own user ID :return: bool
(module (function_definition (function_name_convert_response) function_name_convert_response (parameters (identifier_allocate_quota_response) identifier_allocate_quota_response (identifier_project_id) identifier_project_id )parameters (block (if_statement (boolean_operator (not_operator (identifier_allocate_quota_response) identifier_allocate_quota_response )not_operator (not_operator (attribute (identifier_allocate_quota_response) identifier_allocate_quota_response (identifier_allocateErrors) identifier_allocateErrors )attribute )not_operator )boolean_operator (block (return_statement (identifier__IS_OK) identifier__IS_OK )return_statement )block )if_statement (expression_statement (assignment (identifier_theError) identifier_theError (subscript (attribute (identifier_allocate_quota_response) identifier_allocate_quota_response (identifier_allocateErrors) identifier_allocateErrors )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_error_tuple) identifier_error_tuple (call (attribute (identifier__QUOTA_ERROR_CONVERSION) identifier__QUOTA_ERROR_CONVERSION (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_theError) identifier_theError (identifier_code) identifier_code )attribute (identifier__IS_UNKNOWN) identifier__IS_UNKNOWN )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (subscript (identifier_error_tuple) identifier_error_tuple (integer_1) integer_1 )subscript (identifier_find) identifier_find )attribute (argument_list (string_u'{') string_u'{' )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (return_statement (identifier_error_tuple) identifier_error_tuple )return_statement )block )if_statement (expression_statement (assignment (identifier_updated_msg) identifier_updated_msg (call (attribute (subscript (identifier_error_tuple) identifier_error_tuple (integer_1) integer_1 )subscript (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_project_id) identifier_project_id (identifier_project_id) identifier_project_id )keyword_argument (keyword_argument (identifier_detail) identifier_detail (boolean_operator (attribute (identifier_theError) identifier_theError (identifier_description) identifier_description )attribute (string_u'') string_u'' )boolean_operator )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (expression_list (subscript (identifier_error_tuple) identifier_error_tuple (integer_0) integer_0 )subscript (identifier_updated_msg) identifier_updated_msg )expression_list )return_statement )block )function_definition )module
Computes a http status code and message `AllocateQuotaResponse` The return value a tuple (code, message) where code: is the http status code message: is the message to return Args: allocate_quota_response (:class:`endpoints_management.gen.servicecontrol_v1_messages.AllocateQuotaResponse`): the response from calling an api Returns: tuple(code, message)
(module (function_definition (function_name_config_changed) function_name_config_changed (parameters (default_parameter (identifier_inherit_napalm_device) identifier_inherit_napalm_device (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_is_config_changed) identifier_is_config_changed (False) False )assignment )expression_statement (expression_statement (assignment (identifier_reason) identifier_reason (string_'') string_'' )assignment )expression_statement (expression_statement (assignment (identifier_try_compare) identifier_try_compare (call (identifier_compare_config) identifier_compare_config (argument_list (keyword_argument (identifier_inherit_napalm_device) identifier_inherit_napalm_device (identifier_napalm_device) identifier_napalm_device )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_try_compare) identifier_try_compare (identifier_get) identifier_get )attribute (argument_list (string_'result') string_'result' )argument_list )call (block (if_statement (call (attribute (identifier_try_compare) identifier_try_compare (identifier_get) identifier_get )attribute (argument_list (string_'out') string_'out' )argument_list )call (block (expression_statement (assignment (identifier_is_config_changed) identifier_is_config_changed (True) True )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_reason) identifier_reason (string_'Configuration was not changed on the device.') string_'Configuration was not changed on the device.' )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_reason) identifier_reason (call (attribute (identifier_try_compare) identifier_try_compare (identifier_get) identifier_get )attribute (argument_list (string_'comment') string_'comment' )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_is_config_changed) identifier_is_config_changed (identifier_reason) identifier_reason )expression_list )return_statement )block )function_definition )module
Will prompt if the configuration has been changed. :return: A tuple with a boolean that specifies if the config was changed on the device.\ And a string that provides more details of the reason why the configuration was not changed. CLI Example: .. code-block:: bash salt '*' net.config_changed
(module (function_definition (function_name_get_archive_type) function_name_get_archive_type (parameters (identifier_path) identifier_path )parameters (block (if_statement (not_operator (call (identifier_is_directory_archive) identifier_is_directory_archive (argument_list (identifier_path) identifier_path )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_'Unable to determine the type of archive at path: %s') string_'Unable to determine the type of archive at path: %s' (identifier_path) identifier_path )binary_operator )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_ini_path) identifier_ini_path (call (attribute (string_'/') string_'/' (identifier_join) identifier_join )attribute (argument_list (list (call (identifier__convert_slashes) identifier__convert_slashes (argument_list (identifier_path) identifier_path )argument_list )call (string_'dir_archive.ini') string_'dir_archive.ini' )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parser) identifier_parser (call (attribute (identifier__ConfigParser) identifier__ConfigParser (identifier_SafeConfigParser) identifier_SafeConfigParser )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_read) identifier_read )attribute (argument_list (identifier_ini_path) identifier_ini_path )argument_list )call )expression_statement (expression_statement (assignment (identifier_contents) identifier_contents (call (attribute (identifier_parser) identifier_parser (identifier_get) identifier_get )attribute (argument_list (string_'metadata') string_'metadata' (string_'contents') string_'contents' )argument_list )call )assignment )expression_statement (return_statement (identifier_contents) identifier_contents )return_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_'Unable to determine type of archive for path: %s') string_'Unable to determine type of archive for path: %s' (identifier_path) identifier_path )binary_operator (identifier_e) identifier_e )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Returns the contents type for the provided archive path. Parameters ---------- path : string Directory to evaluate. Returns ------- Returns a string of: sframe, sgraph, raises TypeError for anything else
(module (function_definition (function_name_quantile_turnover) function_name_quantile_turnover (parameters (identifier_quantile_factor) identifier_quantile_factor (identifier_quantile) identifier_quantile (default_parameter (identifier_period) identifier_period (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_quant_names) identifier_quant_names (subscript (identifier_quantile_factor) identifier_quantile_factor (comparison_operator (identifier_quantile_factor) identifier_quantile_factor (identifier_quantile) identifier_quantile )comparison_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_quant_name_sets) identifier_quant_name_sets (call (attribute (call (attribute (identifier_quant_names) identifier_quant_names (identifier_groupby) identifier_groupby )attribute (argument_list (keyword_argument (identifier_level) identifier_level (list (string_'date') string_'date' )list )keyword_argument )argument_list )call (identifier_apply) identifier_apply )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (call (identifier_set) identifier_set (argument_list (call (attribute (attribute (identifier_x) identifier_x (identifier_index) identifier_index )attribute (identifier_get_level_values) identifier_get_level_values )attribute (argument_list (string_'asset') string_'asset' )argument_list )call )argument_list )call )lambda )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_period) identifier_period (identifier_int) identifier_int )argument_list )call (block (expression_statement (assignment (identifier_name_shifted) identifier_name_shifted (call (attribute (identifier_quant_name_sets) identifier_quant_name_sets (identifier_shift) identifier_shift )attribute (argument_list (identifier_period) identifier_period )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_shifted_idx) identifier_shifted_idx (call (attribute (identifier_utils) identifier_utils (identifier_add_custom_calendar_timedelta) identifier_add_custom_calendar_timedelta )attribute (argument_list (attribute (identifier_quant_name_sets) identifier_quant_name_sets (identifier_index) identifier_index )attribute (unary_operator (call (attribute (identifier_pd) identifier_pd (identifier_Timedelta) identifier_Timedelta )attribute (argument_list (identifier_period) identifier_period )argument_list )call )unary_operator (attribute (subscript (attribute (attribute (identifier_quantile_factor) identifier_quantile_factor (identifier_index) identifier_index )attribute (identifier_levels) identifier_levels )attribute (integer_0) integer_0 )subscript (identifier_freq) identifier_freq )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_name_shifted) identifier_name_shifted (call (attribute (identifier_quant_name_sets) identifier_quant_name_sets (identifier_reindex) identifier_reindex )attribute (argument_list (identifier_shifted_idx) identifier_shifted_idx )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_name_shifted) identifier_name_shifted (identifier_index) identifier_index )attribute (attribute (identifier_quant_name_sets) identifier_quant_name_sets (identifier_index) identifier_index )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_new_names) identifier_new_names (call (attribute (parenthesized_expression (binary_operator (identifier_quant_name_sets) identifier_quant_name_sets (identifier_name_shifted) identifier_name_shifted )binary_operator )parenthesized_expression (identifier_dropna) identifier_dropna )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_quant_turnover) identifier_quant_turnover (binary_operator (call (attribute (identifier_new_names) identifier_new_names (identifier_apply) identifier_apply )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (call (identifier_len) identifier_len (argument_list (identifier_x) identifier_x )argument_list )call )lambda )argument_list )call (call (attribute (identifier_quant_name_sets) identifier_quant_name_sets (identifier_apply) identifier_apply )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (call (identifier_len) identifier_len (argument_list (identifier_x) identifier_x )argument_list )call )lambda )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_quant_turnover) identifier_quant_turnover (identifier_name) identifier_name )attribute (identifier_quantile) identifier_quantile )assignment )expression_statement (return_statement (identifier_quant_turnover) identifier_quant_turnover )return_statement )block )function_definition )module
Computes the proportion of names in a factor quantile that were not in that quantile in the previous period. Parameters ---------- quantile_factor : pd.Series DataFrame with date, asset and factor quantile. quantile : int Quantile on which to perform turnover analysis. period: string or int, optional Period over which to calculate the turnover. If it is a string it must follow pandas.Timedelta constructor format (e.g. '1 days', '1D', '30m', '3h', '1D1h', etc). Returns ------- quant_turnover : pd.Series Period by period turnover for that quantile.
(module (function_definition (function_name_HasStorage) function_name_HasStorage (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_neo) identifier_neo (identifier_Core) identifier_Core (identifier_State) identifier_State (identifier_ContractState) identifier_ContractState )dotted_name (dotted_name (identifier_ContractPropertyState) identifier_ContractPropertyState )dotted_name )import_from_statement (return_statement (comparison_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_ContractProperties) identifier_ContractProperties )attribute (attribute (identifier_ContractPropertyState) identifier_ContractPropertyState (identifier_HasStorage) identifier_HasStorage )attribute )binary_operator (integer_0) integer_0 )comparison_operator )return_statement )block )function_definition )module
Flag indicating if storage is available. Returns: bool: True if available. False otherwise.
(module (function_definition (function_name__set_rock_ridge) function_name__set_rock_ridge (parameters (identifier_self) identifier_self (identifier_rr) identifier_rr )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_rock_ridge) identifier_rock_ridge )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rock_ridge) identifier_rock_ridge )attribute (identifier_rr) identifier_rr )assignment )expression_statement )block (else_clause (block (for_statement (identifier_ver) identifier_ver (list (string_'1.09') string_'1.09' (string_'1.10') string_'1.10' (string_'1.12') string_'1.12' )list (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_rock_ridge) identifier_rock_ridge )attribute (identifier_ver) identifier_ver )comparison_operator (block (if_statement (boolean_operator (identifier_rr) identifier_rr (comparison_operator (identifier_rr) identifier_rr (identifier_ver) identifier_ver )comparison_operator )boolean_operator (block (raise_statement (call (attribute (identifier_pycdlibexception) identifier_pycdlibexception (identifier_PyCdlibInvalidISO) identifier_PyCdlibInvalidISO )attribute (argument_list (string_'Inconsistent Rock Ridge versions on the ISO!') string_'Inconsistent Rock Ridge versions on the ISO!' )argument_list )call )raise_statement )block )if_statement )block )if_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
An internal method to set the Rock Ridge version of the ISO given the Rock Ridge version of the previous entry. Parameters: rr - The version of rr from the last directory record. Returns: Nothing.
(module (function_definition (function_name_read_file) function_name_read_file (parameters (identifier_path) identifier_path )parameters (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isabs) identifier_isabs )attribute (argument_list (identifier_path) identifier_path )argument_list )call (block (with_statement (with_clause (with_item (call (identifier_wrap_file_exceptions) identifier_wrap_file_exceptions (argument_list )argument_list )call )with_item )with_clause (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_stream) identifier_stream )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (call (attribute (identifier_stream) identifier_stream (identifier_read) identifier_read )attribute (argument_list )argument_list )call )return_statement )block )with_statement )block )with_statement )block )if_statement (with_statement (with_clause (with_item (call (identifier_wrap_file_exceptions) identifier_wrap_file_exceptions (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_stream) identifier_stream (call (attribute (identifier_ca_storage) identifier_ca_storage (identifier_open) identifier_open )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement )block )with_statement (try_statement (block (return_statement (call (attribute (identifier_stream) identifier_stream (identifier_read) identifier_read )attribute (argument_list )argument_list )call )return_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_stream) identifier_stream (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Read the file from the given path. If ``path`` is an absolute path, reads a file from the local filesystem. For relative paths, read the file using the storage backend configured using :ref:`CA_FILE_STORAGE <settings-ca-file-storage>`.
(module (function_definition (function_name_getAWSAccountID) function_name_getAWSAccountID (parameters )parameters (block (expression_statement (assignment (identifier_link) identifier_link (string_"http://169.254.169.254/latest/dynamic/instance-identity/document") string_"http://169.254.169.254/latest/dynamic/instance-identity/document" )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_urllib2) identifier_urllib2 (identifier_urlopen) identifier_urlopen )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_link) identifier_link )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (integer_5) integer_5 )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_urllib2) identifier_urllib2 (identifier_URLError) identifier_URLError )attribute (block (return_statement (string_'0') string_'0' )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_jsonData) identifier_jsonData (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (call (attribute (identifier_conn) identifier_conn (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_jsonData) identifier_jsonData (string_'accountId') string_'accountId' )subscript )return_statement )block )function_definition )module
Print an instance's AWS account number or 0 when not in EC2
(module (function_definition (function_name___clear_covers) function_name___clear_covers (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_n) identifier_n )attribute )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_row_covered) identifier_row_covered )attribute (identifier_i) identifier_i )subscript (False) False )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_col_covered) identifier_col_covered )attribute (identifier_i) identifier_i )subscript (False) False )assignment )expression_statement )block )for_statement )block )function_definition )module
Clear all covered matrix cells
(module (function_definition (function_name_ngettext) function_name_ngettext (parameters (identifier_self) identifier_self (identifier_singular) identifier_singular (identifier_plural) identifier_plural (identifier_num) identifier_num (default_parameter (identifier_domain) identifier_domain (None) None )default_parameter (dictionary_splat_pattern (identifier_variables) identifier_variables )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_variables) identifier_variables (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'num') string_'num' (identifier_num) identifier_num )argument_list )call )expression_statement (expression_statement (assignment (identifier_t) identifier_t (call (attribute (identifier_self) identifier_self (identifier_get_translations) identifier_get_translations )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call )assignment )expression_statement (return_statement (binary_operator (call (attribute (identifier_t) identifier_t (identifier_ungettext) identifier_ungettext )attribute (argument_list (identifier_singular) identifier_singular (identifier_plural) identifier_plural (identifier_num) identifier_num )argument_list )call (identifier_variables) identifier_variables )binary_operator )return_statement )block )function_definition )module
Translate a string wity the current locale. The `num` parameter is used to dispatch between singular and various plural forms of the message.
(module (function_definition (function_name_headloss_rect) function_name_headloss_rect (parameters (identifier_FlowRate) identifier_FlowRate (identifier_Width) identifier_Width (identifier_DistCenter) identifier_DistCenter (identifier_Length) identifier_Length (identifier_KMinor) identifier_KMinor (identifier_Nu) identifier_Nu (identifier_PipeRough) identifier_PipeRough (identifier_openchannel) identifier_openchannel )parameters (block (return_statement (parenthesized_expression (binary_operator (attribute (call (identifier_headloss_exp_rect) identifier_headloss_exp_rect (argument_list (identifier_FlowRate) identifier_FlowRate (identifier_Width) identifier_Width (identifier_DistCenter) identifier_DistCenter (identifier_KMinor) identifier_KMinor )argument_list )call (identifier_magnitude) identifier_magnitude )attribute (attribute (call (identifier_headloss_fric_rect) identifier_headloss_fric_rect (argument_list (identifier_FlowRate) identifier_FlowRate (identifier_Width) identifier_Width (identifier_DistCenter) identifier_DistCenter (identifier_Length) identifier_Length (identifier_Nu) identifier_Nu (identifier_PipeRough) identifier_PipeRough (identifier_openchannel) identifier_openchannel )argument_list )call (identifier_magnitude) identifier_magnitude )attribute )binary_operator )parenthesized_expression )return_statement )block )function_definition )module
Return the total head loss in a rectangular channel. Total head loss is a combination of the major and minor losses. This equation applies to both laminar and turbulent flows.
(module (function_definition (function_name__parse_error_message) function_name__parse_error_message (parameters (identifier_self) identifier_self (identifier_message) identifier_message )parameters (block (expression_statement (assignment (identifier_msg) identifier_msg (subscript (subscript (identifier_message) identifier_message (string_'error') string_'error' )subscript (string_'message') string_'message' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (subscript (subscript (identifier_message) identifier_message (string_'error') string_'error' )subscript (string_'code') string_'code' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_err) identifier_err (None) None )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (None) None )assignment )expression_statement (if_statement (comparison_operator (string_'data') string_'data' (subscript (identifier_message) identifier_message (string_'error') string_'error' )subscript )comparison_operator (block (expression_statement (assignment (identifier_err) identifier_err (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (subscript (subscript (subscript (subscript (identifier_message) identifier_message (string_'error') string_'error' )subscript (string_'data') string_'data' )subscript (unary_operator (integer_1) integer_1 )unary_operator )subscript (string_'errors') string_'errors' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (subscript (subscript (identifier_message) identifier_message (string_'error') string_'error' )subscript (string_'data') string_'data' )subscript )assignment )expression_statement )block )if_statement (return_statement (expression_list (identifier_code) identifier_code (identifier_msg) identifier_msg (identifier_err) identifier_err (identifier_out) identifier_out )expression_list )return_statement )block )function_definition )module
Parses the eAPI failure response message This method accepts an eAPI failure message and parses the necesary parts in order to generate a CommandError. Args: message (str): The error message to parse Returns: tuple: A tuple that consists of the following: * code: The error code specified in the failure message * message: The error text specified in the failure message * error: The error text from the command that generated the error (the last command that ran) * output: A list of all output from all commands
(module (function_definition (function_name_on_api_error) function_name_on_api_error (parameters (identifier_self) identifier_self (default_parameter (identifier_error_status) identifier_error_status (None) None )default_parameter (default_parameter (identifier_message) identifier_message (None) None )default_parameter (default_parameter (identifier_event_origin) identifier_event_origin (None) None )default_parameter )parameters (block (if_statement (comparison_operator (call (attribute (subscript (attribute (identifier_message) identifier_message (identifier_meta) identifier_meta )attribute (string_"error") string_"error" )subscript (identifier_find) identifier_find )attribute (argument_list (string_"Widget instance not found on server") string_"Widget instance not found on server" )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (assignment (subscript (identifier_error_status) identifier_error_status (string_"retry") string_"retry" )subscript (True) True )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_comm) identifier_comm )attribute (identifier_attach_remote) identifier_attach_remote )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute (attribute (identifier_self) identifier_self (identifier_remote_name) identifier_remote_name )attribute (keyword_argument (identifier_remote_name) identifier_remote_name (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )keyword_argument (dictionary_splat (attribute (identifier_self) identifier_self (identifier_init_kwargs) identifier_init_kwargs )attribute )dictionary_splat )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
API error handling
(module (function_definition (function_name_requires_refcount) function_name_requires_refcount (parameters (identifier_cls) identifier_cls (identifier_func) identifier_func )parameters (block (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_func) identifier_func )argument_list )call )decorator (function_definition (function_name_requires_active_handle) function_name_requires_active_handle (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (call (attribute (identifier_cls) identifier_cls (identifier_refcount) identifier_refcount )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_NoHandleException) identifier_NoHandleException (argument_list )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_func) identifier_func (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )decorated_definition (return_statement (identifier_requires_active_handle) identifier_requires_active_handle )return_statement )block )function_definition )module
The ``requires_refcount`` decorator adds a check prior to call ``func`` to verify that there is an active handle. if there is no such handle, a ``NoHandleException`` exception is thrown.
(module (function_definition (function_name_process_params) function_name_process_params (parameters (identifier_mod_id) identifier_mod_id (identifier_params) identifier_params (identifier_type_params) identifier_type_params )parameters (block (expression_statement (assignment (identifier_res) identifier_res (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_param_name) identifier_param_name (identifier_param_info) identifier_param_info )pattern_list (call (attribute (identifier_type_params) identifier_type_params (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_val) identifier_val (call (attribute (identifier_params) identifier_params (identifier_get) identifier_get )attribute (argument_list (identifier_param_name) identifier_param_name (call (attribute (identifier_param_info) identifier_param_info (identifier_get) identifier_get )attribute (argument_list (string_"default") string_"default" (None) None )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_val) identifier_val (None) None )comparison_operator (block (expression_statement (assignment (identifier_param_res) identifier_param_res (call (identifier_dict) identifier_dict (argument_list (identifier_param_info) identifier_param_info )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_param_res) identifier_param_res (string_"value") string_"value" )subscript (identifier_val) identifier_val )assignment )expression_statement (expression_statement (assignment (subscript (identifier_res) identifier_res (identifier_param_name) identifier_param_name )subscript (identifier_param_res) identifier_param_res )assignment )expression_statement )block (elif_clause (call (attribute (identifier_type_params) identifier_type_params (identifier_get) identifier_get )attribute (argument_list (string_"required") string_"required" (False) False )argument_list )call (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'Required parameter "{}" is not defined for module ') string_'Required parameter "{}" is not defined for module ' (string_'"{}"') string_'"{}"' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_param_name) identifier_param_name (identifier_mod_id) identifier_mod_id )argument_list )call )argument_list )call )raise_statement )block )elif_clause )if_statement )block )for_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Takes as input a dictionary of parameters defined on a module and the information about the required parameters defined on the corresponding module type. Validatates that are required parameters were supplied and fills any missing parameters with their default values from the module type. Returns a nested dictionary of the same format as the `type_params` but with an additional key `value` on each inner dictionary that gives the value of that parameter for this specific module
(module (function_definition (function_name_knx_to_time) function_name_knx_to_time (parameters (identifier_knxdata) identifier_knxdata )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_knxdata) identifier_knxdata )argument_list )call (integer_3) integer_3 )comparison_operator (block (raise_statement (call (identifier_KNXException) identifier_KNXException (argument_list (string_"Can only convert a 3 Byte object to time") string_"Can only convert a 3 Byte object to time" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_dow) identifier_dow (binary_operator (subscript (identifier_knxdata) identifier_knxdata (integer_0) integer_0 )subscript (integer_5) integer_5 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (identifier_time) identifier_time (argument_list (binary_operator (subscript (identifier_knxdata) identifier_knxdata (integer_0) integer_0 )subscript (integer_0x1f) integer_0x1f )binary_operator (subscript (identifier_knxdata) identifier_knxdata (integer_1) integer_1 )subscript (subscript (identifier_knxdata) identifier_knxdata (integer_2) integer_2 )subscript )argument_list )call )assignment )expression_statement (return_statement (list (identifier_res) identifier_res (identifier_dow) identifier_dow )list )return_statement )block )function_definition )module
Converts a KNX time to a tuple of a time object and the day of week
(module (function_definition (function_name_construct_rest_of_worlds_mapping) function_name_construct_rest_of_worlds_mapping (parameters (identifier_self) identifier_self (identifier_excluded) identifier_excluded (default_parameter (identifier_fp) identifier_fp (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_metadata) identifier_metadata (dictionary (pair (string_'filename') string_'filename' (string_'faces.gpkg') string_'faces.gpkg' )pair (pair (string_'field') string_'field' (string_'id') string_'id' )pair (pair (string_'sha256') string_'sha256' (call (identifier_sha256) identifier_sha256 (argument_list (attribute (identifier_self) identifier_self (identifier_faces_fp) identifier_faces_fp )attribute )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_locations) identifier_locations )pattern_list (call (attribute (identifier_excluded) identifier_excluded (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (identifier_location) identifier_location (identifier_locations) identifier_locations (block (assert_statement (comparison_operator (identifier_location) identifier_location (attribute (identifier_self) identifier_self (identifier_locations) identifier_locations )attribute )comparison_operator (call (attribute (string_"Can't find location {}") string_"Can't find location {}" (identifier_format) identifier_format )attribute (argument_list (identifier_location) identifier_location )argument_list )call )assert_statement )block )for_statement (expression_statement (assignment (identifier_included) identifier_included (call (attribute (attribute (identifier_self) identifier_self (identifier_all_faces) identifier_all_faces )attribute (identifier_difference) identifier_difference )attribute (argument_list (set_comprehension (identifier_face) identifier_face (for_in_clause (identifier_loc) identifier_loc (identifier_locations) identifier_locations )for_in_clause (for_in_clause (identifier_face) identifier_face (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_loc) identifier_loc )subscript )for_in_clause )set_comprehension )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_key) identifier_key (call (identifier_sorted) identifier_sorted (argument_list (identifier_included) identifier_included )argument_list )call )tuple )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_obj) identifier_obj (dictionary (pair (string_'data') string_'data' (identifier_data) identifier_data )pair (pair (string_'metadata') string_'metadata' (identifier_metadata) identifier_metadata )pair )dictionary )assignment )expression_statement (if_statement (identifier_fp) identifier_fp (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_fp) identifier_fp (string_"w") string_"w" )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_json) identifier_json (identifier_dump) identifier_dump )attribute (argument_list (identifier_obj) identifier_obj (identifier_f) identifier_f (keyword_argument (identifier_indent) identifier_indent (integer_2) integer_2 )keyword_argument )argument_list )call )expression_statement )block )with_statement )block (else_clause (block (return_statement (identifier_obj) identifier_obj )return_statement )block )else_clause )if_statement )block )function_definition )module
Construct topo mapping file for ``excluded``. ``excluded`` must be a **dictionary** of {"rest-of-world label": ["names", "of", "excluded", "locations"]}``. Topo mapping has the data format: .. code-block:: python { 'data': [ ['location label', ['topo face integer ids']], ], 'metadata': { 'filename': 'name of face definitions file', 'field': 'field with uniquely identifies the fields in ``filename``', 'sha256': 'SHA 256 hash of ``filename``' } }
(module (function_definition (function_name_load) function_name_load (parameters (identifier_fp) identifier_fp (default_parameter (identifier_encode_nominal) identifier_encode_nominal (False) False )default_parameter (default_parameter (identifier_return_type) identifier_return_type (identifier_DENSE) identifier_DENSE )default_parameter )parameters (block (expression_statement (assignment (identifier_decoder) identifier_decoder (call (identifier_ArffDecoder) identifier_ArffDecoder (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_decoder) identifier_decoder (identifier_decode) identifier_decode )attribute (argument_list (identifier_fp) identifier_fp (keyword_argument (identifier_encode_nominal) identifier_encode_nominal (identifier_encode_nominal) identifier_encode_nominal )keyword_argument (keyword_argument (identifier_return_type) identifier_return_type (identifier_return_type) identifier_return_type )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Load a file-like object containing the ARFF document and convert it into a Python object. :param fp: a file-like object. :param encode_nominal: boolean, if True perform a label encoding while reading the .arff file. :param return_type: determines the data structure used to store the dataset. Can be one of `arff.DENSE`, `arff.COO`, `arff.LOD`, `arff.DENSE_GEN` or `arff.LOD_GEN`. Consult the sections on `working with sparse data`_ and `loading progressively`_. :return: a dictionary.
(module (function_definition (function_name_normalize) function_name_normalize (parameters (identifier_self) identifier_self (identifier_text) identifier_text (default_parameter (identifier_cleaned) identifier_cleaned (False) False )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (not_operator (identifier_cleaned) identifier_cleaned )not_operator (block (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_self) identifier_self (identifier_clean) identifier_clean )attribute (argument_list (identifier_text) identifier_text (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (identifier_ensure_list) identifier_ensure_list (argument_list (identifier_text) identifier_text )argument_list )call )return_statement )block )function_definition )module
Create a represenation ideal for comparisons, but not to be shown to the user.
(module (function_definition (function_name_translate) function_name_translate (parameters (identifier_root_list) identifier_root_list (default_parameter (identifier_use_bag_semantics) identifier_use_bag_semantics (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_translator) identifier_translator (parenthesized_expression (conditional_expression (call (identifier_Translator) identifier_Translator (argument_list )argument_list )call (identifier_use_bag_semantics) identifier_use_bag_semantics (call (identifier_SetTranslator) identifier_SetTranslator (argument_list )argument_list )call )conditional_expression )parenthesized_expression )assignment )expression_statement (return_statement (list_comprehension (call (attribute (call (attribute (identifier_translator) identifier_translator (identifier_translate) identifier_translate )attribute (argument_list (identifier_root) identifier_root )argument_list )call (identifier_to_sql) identifier_to_sql )attribute (argument_list )argument_list )call (for_in_clause (identifier_root) identifier_root (identifier_root_list) identifier_root_list )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Translate a list of relational algebra trees into SQL statements. :param root_list: a list of tree roots :param use_bag_semantics: flag for using relational algebra bag semantics :return: a list of SQL statements
(module (function_definition (function_name_toString) function_name_toString (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_slist) identifier_slist (call (attribute (identifier_self) identifier_self (identifier_toList) identifier_toList )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_string) identifier_string (call (attribute (identifier_angle) identifier_angle (identifier_slistStr) identifier_slistStr )attribute (argument_list (identifier_slist) identifier_slist )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (identifier_string) identifier_string (comparison_operator (subscript (identifier_slist) identifier_slist (integer_0) integer_0 )subscript (string_'-') string_'-' )comparison_operator (subscript (identifier_string) identifier_string (slice (integer_1) integer_1 (colon) colon )slice )subscript )conditional_expression )return_statement )block )function_definition )module
Returns time as string.
(module (function_definition (function_name_login) function_name_login (parameters (identifier_self) identifier_self (default_parameter (identifier_username) identifier_username (string_'0000') string_'0000' )default_parameter (default_parameter (identifier_userid) identifier_userid (integer_0) integer_0 )default_parameter (default_parameter (identifier_password) identifier_password (None) None )default_parameter )parameters (block (if_statement (boolean_operator (identifier_password) identifier_password (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_password) identifier_password )argument_list )call (integer_20) integer_20 )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_error) identifier_error )attribute (argument_list (string_'password longer than 20 characters received') string_'password longer than 20 characters received' )argument_list )call )expression_statement (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_'password longer than 20 characters, login failed') string_'password longer than 20 characters, login failed' )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send) identifier_send )attribute (argument_list (call (identifier_C1218LogonRequest) identifier_C1218LogonRequest (argument_list (identifier_username) identifier_username (identifier_userid) identifier_userid )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier_recv) identifier_recv )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_data) identifier_data (string_b'\x00') string_b'\x00' )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_warning) identifier_warning )attribute (argument_list (string_'login failed, username and user id rejected') string_'login failed, username and user id rejected' )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (identifier_password) identifier_password (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send) identifier_send )attribute (argument_list (call (identifier_C1218SecurityRequest) identifier_C1218SecurityRequest (argument_list (identifier_password) identifier_password )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier_recv) identifier_recv )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_data) identifier_data (string_b'\x00') string_b'\x00' )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_warning) identifier_warning )attribute (argument_list (string_'login failed, password rejected') string_'login failed, password rejected' )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_logged_in) identifier_logged_in )attribute (True) True )assignment )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Log into the connected device. :param str username: the username to log in with (len(username) <= 10) :param int userid: the userid to log in with (0x0000 <= userid <= 0xffff) :param str password: password to log in with (len(password) <= 20) :rtype: bool
(module (function_definition (function_name_update_from_dict) function_name_update_from_dict (parameters (identifier_self) identifier_self (identifier_dct) identifier_dct )parameters (block (if_statement (not_operator (identifier_dct) identifier_dct )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_all_props) identifier_all_props (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier_CONFIG_PROPERTIES) identifier_CONFIG_PROPERTIES )attribute )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_dct) identifier_dct )argument_list )call (block (expression_statement (assignment (identifier_attr_config) identifier_attr_config (call (attribute (identifier_all_props) identifier_all_props (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (if_statement (identifier_attr_config) identifier_attr_config (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_default_from_dict) identifier_update_default_from_dict )attribute (argument_list (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Updates this configuration object from a dictionary. See :meth:`ConfigurationObject.update` for details. :param dct: Values to update the ConfigurationObject with. :type dct: dict
(module (function_definition (function_name_node_transmissions) function_name_node_transmissions (parameters (identifier_node_id) identifier_node_id )parameters (block (expression_statement (assignment (identifier_exp) identifier_exp (call (identifier_Experiment) identifier_Experiment (argument_list (identifier_session) identifier_session )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_direction) identifier_direction (call (identifier_request_parameter) identifier_request_parameter (argument_list (keyword_argument (identifier_parameter) identifier_parameter (string_"direction") string_"direction" )keyword_argument (keyword_argument (identifier_default) identifier_default (string_"incoming") string_"incoming" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_status) identifier_status (call (identifier_request_parameter) identifier_request_parameter (argument_list (keyword_argument (identifier_parameter) identifier_parameter (string_"status") string_"status" )keyword_argument (keyword_argument (identifier_default) identifier_default (string_"all") string_"all" )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_x) identifier_x (list (identifier_direction) identifier_direction (identifier_status) identifier_status )list (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_x) identifier_x )argument_list )call (identifier_Response) identifier_Response )comparison_operator (block (return_statement (identifier_x) identifier_x )return_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_node) identifier_node (call (attribute (attribute (attribute (identifier_models) identifier_models (identifier_Node) identifier_Node )attribute (identifier_query) identifier_query )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_node_id) identifier_node_id )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_node) identifier_node (None) None )comparison_operator (block (return_statement (call (identifier_error_response) identifier_error_response (argument_list (keyword_argument (identifier_error_type) identifier_error_type (string_"/node/transmissions, node does not exist") string_"/node/transmissions, node does not exist" )keyword_argument )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_transmissions) identifier_transmissions (call (attribute (identifier_node) identifier_node (identifier_transmissions) identifier_transmissions )attribute (argument_list (keyword_argument (identifier_direction) identifier_direction (identifier_direction) identifier_direction )keyword_argument (keyword_argument (identifier_status) identifier_status (identifier_status) identifier_status )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (if_statement (boolean_operator (comparison_operator (identifier_direction) identifier_direction (list (string_"incoming") string_"incoming" (string_"all") string_"all" )list )comparison_operator (comparison_operator (identifier_status) identifier_status (list (string_"pending") string_"pending" (string_"all") string_"all" )list )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_node) identifier_node (identifier_receive) identifier_receive )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_session) identifier_session (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_exp) identifier_exp (identifier_transmission_get_request) identifier_transmission_get_request )attribute (argument_list (keyword_argument (identifier_node) identifier_node (identifier_node) identifier_node )keyword_argument (keyword_argument (identifier_transmissions) identifier_transmissions (identifier_transmissions) identifier_transmissions )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_session) identifier_session (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (call (identifier_error_response) identifier_error_response (argument_list (keyword_argument (identifier_error_type) identifier_error_type (string_"/node/transmissions GET server error") string_"/node/transmissions GET server error" )keyword_argument (keyword_argument (identifier_status) identifier_status (integer_403) integer_403 )keyword_argument (keyword_argument (identifier_participant) identifier_participant (attribute (identifier_node) identifier_node (identifier_participant) identifier_participant )attribute )keyword_argument )argument_list )call )return_statement )block )except_clause )try_statement (return_statement (call (identifier_success_response) identifier_success_response (argument_list (keyword_argument (identifier_transmissions) identifier_transmissions (list_comprehension (call (attribute (identifier_t) identifier_t (identifier___json__) identifier___json__ )attribute (argument_list )argument_list )call (for_in_clause (identifier_t) identifier_t (identifier_transmissions) identifier_transmissions )for_in_clause )list_comprehension )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get all the transmissions of a node. The node id must be specified in the url. You can also pass direction (to/from/all) or status (all/pending/received) as arguments.
(module (function_definition (function_name__parse_common_paths_file) function_name__parse_common_paths_file (parameters (identifier_project_path) identifier_project_path )parameters (block (expression_statement (assignment (identifier_common_paths_file) identifier_common_paths_file (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_project_path) identifier_project_path (string_'common_paths.xml') string_'common_paths.xml' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tree) identifier_tree (call (attribute (identifier_etree) identifier_etree (identifier_parse) identifier_parse )attribute (argument_list (identifier_common_paths_file) identifier_common_paths_file )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_paths) identifier_paths (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_path_vars) identifier_path_vars (list (string_'basedata') string_'basedata' (string_'scheme') string_'scheme' (string_'style') string_'style' (string_'style') string_'style' (string_'customization') string_'customization' (string_'markable') string_'markable' )list )assignment )expression_statement (for_statement (identifier_path_var) identifier_path_var (identifier_path_vars) identifier_path_vars (block (expression_statement (assignment (identifier_specific_path) identifier_specific_path (attribute (call (attribute (identifier_tree) identifier_tree (identifier_find) identifier_find )attribute (argument_list (call (attribute (string_'//{}_path') string_'//{}_path' (identifier_format) identifier_format )attribute (argument_list (identifier_path_var) identifier_path_var )argument_list )call )argument_list )call (identifier_text) identifier_text )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_paths) identifier_paths (identifier_path_var) identifier_path_var )subscript (conditional_expression (identifier_specific_path) identifier_specific_path (identifier_specific_path) identifier_specific_path (identifier_project_path) identifier_project_path )conditional_expression )assignment )expression_statement )block )for_statement (expression_statement (assignment (subscript (identifier_paths) identifier_paths (string_'project_path') string_'project_path' )subscript (identifier_project_path) identifier_project_path )assignment )expression_statement (expression_statement (assignment (identifier_annotations) identifier_annotations (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_level) identifier_level (call (attribute (identifier_tree) identifier_tree (identifier_iterfind) identifier_iterfind )attribute (argument_list (string_'//level') string_'//level' )argument_list )call (block (expression_statement (assignment (subscript (identifier_annotations) identifier_annotations (subscript (attribute (identifier_level) identifier_level (identifier_attrib) identifier_attrib )attribute (string_'name') string_'name' )subscript )subscript (dictionary (pair (string_'schemefile') string_'schemefile' (subscript (attribute (identifier_level) identifier_level (identifier_attrib) identifier_attrib )attribute (string_'schemefile') string_'schemefile' )subscript )pair (pair (string_'customization_file') string_'customization_file' (subscript (attribute (identifier_level) identifier_level (identifier_attrib) identifier_attrib )attribute (string_'customization_file') string_'customization_file' )subscript )pair (pair (string_'file_extension') string_'file_extension' (subscript (attribute (identifier_level) identifier_level (identifier_text) identifier_text )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )pair )dictionary )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_stylesheet) identifier_stylesheet (attribute (call (attribute (identifier_tree) identifier_tree (identifier_find) identifier_find )attribute (argument_list (string_'//stylesheet') string_'//stylesheet' )argument_list )call (identifier_text) identifier_text )attribute )assignment )expression_statement (return_statement (expression_list (identifier_paths) identifier_paths (identifier_annotations) identifier_annotations (identifier_stylesheet) identifier_stylesheet )expression_list )return_statement )block )function_definition )module
Parses a common_paths.xml file and returns a dictionary of paths, a dictionary of annotation level descriptions and the filename of the style file. Parameters ---------- project_path : str path to the root directory of the MMAX project Returns ------- paths : dict maps from MMAX file types (str, e.g. 'basedata' or 'markable') to the relative path (str) containing files of this type annotations : dict maps from MMAX annotation level names (str, e.g. 'sentence', 'primmark') to a dict of features. The features are: 'schemefile' (maps to a file), 'customization_file' (ditto) and 'file_extension' (maps to the file name ending used for all annotations files of this level) stylefile : str name of the (default) style file used in this MMAX project
(module (function_definition (function_name_acquire_auth_token_ticket) function_name_acquire_auth_token_ticket (parameters (identifier_self) identifier_self (default_parameter (identifier_headers) identifier_headers (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (string_'[CAS] Acquiring Auth token ticket') string_'[CAS] Acquiring Auth token ticket' )argument_list )call )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__get_auth_token_tickets_url) identifier__get_auth_token_tickets_url )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_self) identifier_self (identifier__perform_post) identifier__perform_post )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_auth_token_ticket) identifier_auth_token_ticket (subscript (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_text) identifier_text )argument_list )call (string_'ticket') string_'ticket' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'[CAS] Acquire Auth token ticket: {}') string_'[CAS] Acquire Auth token ticket: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_auth_token_ticket) identifier_auth_token_ticket )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_auth_token_ticket) identifier_auth_token_ticket )return_statement )block )function_definition )module
Acquire an auth token from the CAS server.
(module (function_definition (function_name_start_centroid_distance) function_name_start_centroid_distance (parameters (identifier_item_a) identifier_item_a (identifier_item_b) identifier_item_b (identifier_max_value) identifier_max_value )parameters (block (expression_statement (assignment (identifier_start_a) identifier_start_a (call (attribute (identifier_item_a) identifier_item_a (identifier_center_of_mass) identifier_center_of_mass )attribute (argument_list (subscript (attribute (identifier_item_a) identifier_item_a (identifier_times) identifier_times )attribute (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_start_b) identifier_start_b (call (attribute (identifier_item_b) identifier_item_b (identifier_center_of_mass) identifier_center_of_mass )attribute (argument_list (subscript (attribute (identifier_item_b) identifier_item_b (identifier_times) identifier_times )attribute (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_start_distance) identifier_start_distance (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (binary_operator (parenthesized_expression (binary_operator (subscript (identifier_start_a) identifier_start_a (integer_0) integer_0 )subscript (subscript (identifier_start_b) identifier_start_b (integer_0) integer_0 )subscript )binary_operator )parenthesized_expression (integer_2) integer_2 )binary_operator (binary_operator (parenthesized_expression (binary_operator (subscript (identifier_start_a) identifier_start_a (integer_1) integer_1 )subscript (subscript (identifier_start_b) identifier_start_b (integer_1) integer_1 )subscript )binary_operator )parenthesized_expression (integer_2) integer_2 )binary_operator )binary_operator )argument_list )call )assignment )expression_statement (return_statement (binary_operator (call (attribute (identifier_np) identifier_np (identifier_minimum) identifier_minimum )attribute (argument_list (identifier_start_distance) identifier_start_distance (identifier_max_value) identifier_max_value )argument_list )call (call (identifier_float) identifier_float (argument_list (identifier_max_value) identifier_max_value )argument_list )call )binary_operator )return_statement )block )function_definition )module
Distance between the centroids of the first step in each object. Args: item_a: STObject from the first set in TrackMatcher item_b: STObject from the second set in TrackMatcher max_value: Maximum distance value used as scaling value and upper constraint. Returns: Distance value between 0 and 1.
(module (function_definition (function_name_invocation) function_name_invocation (parameters )parameters (block (expression_statement (assignment (identifier_cmdargs) identifier_cmdargs (binary_operator (list (attribute (identifier_sys) identifier_sys (identifier_executable) identifier_executable )attribute )list (subscript (attribute (identifier_sys) identifier_sys (identifier_argv) identifier_argv )attribute (slice (colon) colon )slice )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_invocation) identifier_invocation (call (attribute (string_" ") string_" " (identifier_join) identifier_join )attribute (generator_expression (call (attribute (identifier_shlex) identifier_shlex (identifier_quote) identifier_quote )attribute (argument_list (identifier_s) identifier_s )argument_list )call (for_in_clause (identifier_s) identifier_s (identifier_cmdargs) identifier_cmdargs )for_in_clause )generator_expression )call )assignment )expression_statement (return_statement (identifier_invocation) identifier_invocation )return_statement )block )function_definition )module
reconstructs the invocation for this python program
(module (function_definition (function_name_get_logs) function_name_get_logs (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_folder) identifier_folder (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_pcfg) identifier_pcfg )attribute (string_'log_file') string_'log_file' )subscript )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_path) identifier_path (identifier_dir) identifier_dir (identifier_files) identifier_files )pattern_list (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_folder) identifier_folder )argument_list )call (block (for_statement (identifier_file) identifier_file (identifier_files) identifier_files (block (if_statement (comparison_operator (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_file) identifier_file )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript (string_'.log') string_'.log' )comparison_operator (block (expression_statement (yield (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_path) identifier_path (identifier_file) identifier_file )argument_list )call )yield )expression_statement )block )if_statement )block )for_statement )block )for_statement )block )function_definition )module
returns logs from disk, requires .log extenstion
(module (function_definition (function_name___query_options) function_name___query_options (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_options) identifier_options (integer_0) integer_0 )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier___tailable) identifier___tailable )attribute (block (expression_statement (augmented_assignment (identifier_options) identifier_options (subscript (identifier__QUERY_OPTIONS) identifier__QUERY_OPTIONS (string_"tailable_cursor") string_"tailable_cursor" )subscript )augmented_assignment )expression_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier___slave_okay) identifier___slave_okay )attribute (attribute (attribute (identifier_self) identifier_self (identifier___pool) identifier___pool )attribute (identifier__slave_okay) identifier__slave_okay )attribute )boolean_operator (block (expression_statement (augmented_assignment (identifier_options) identifier_options (subscript (identifier__QUERY_OPTIONS) identifier__QUERY_OPTIONS (string_"slave_okay") string_"slave_okay" )subscript )augmented_assignment )expression_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier___timeout) identifier___timeout )attribute )not_operator (block (expression_statement (augmented_assignment (identifier_options) identifier_options (subscript (identifier__QUERY_OPTIONS) identifier__QUERY_OPTIONS (string_"no_timeout") string_"no_timeout" )subscript )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_options) identifier_options )return_statement )block )function_definition )module
Get the query options string to use for this query.
(module (function_definition (function_name_project_with_metadata) function_name_project_with_metadata (parameters (identifier_self) identifier_self (identifier_term_doc_mat) identifier_term_doc_mat (default_parameter (identifier_x_dim) identifier_x_dim (integer_0) integer_0 )default_parameter (default_parameter (identifier_y_dim) identifier_y_dim (integer_1) integer_1 )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__project_category_corpus) identifier__project_category_corpus )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__get_category_metadata_corpus_and_replace_terms) identifier__get_category_metadata_corpus_and_replace_terms )attribute (argument_list (identifier_term_doc_mat) identifier_term_doc_mat )argument_list )call (identifier_x_dim) identifier_x_dim (identifier_y_dim) identifier_y_dim )argument_list )call )return_statement )block )function_definition )module
Returns a projection of the :param term_doc_mat: a TermDocMatrix :return: CategoryProjection
(module (function_definition (function_name_run_subprocess) function_name_run_subprocess (parameters (identifier_command) identifier_command (default_parameter (identifier_return_code) identifier_return_code (False) False )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_use_kwargs) identifier_use_kwargs (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_stderr) identifier_stderr (attribute (identifier_subprocess) identifier_subprocess (identifier_PIPE) identifier_PIPE )attribute )keyword_argument (keyword_argument (identifier_stdout) identifier_stdout (attribute (identifier_subprocess) identifier_subprocess (identifier_PIPE) identifier_PIPE )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_use_kwargs) identifier_use_kwargs (identifier_update) identifier_update )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement (expression_statement (assignment (identifier_p) identifier_p (call (attribute (identifier_subprocess) identifier_subprocess (identifier_Popen) identifier_Popen )attribute (argument_list (identifier_command) identifier_command (dictionary_splat (identifier_use_kwargs) identifier_use_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (call (attribute (identifier_p) identifier_p (identifier_communicate) identifier_communicate )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (list_comprehension (conditional_expression (string_'') string_'' (comparison_operator (identifier_s) identifier_s (None) None )comparison_operator (identifier_s) identifier_s )conditional_expression (for_in_clause (identifier_s) identifier_s (identifier_output) identifier_output )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (list_comprehension (conditional_expression (call (attribute (identifier_s) identifier_s (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_s) identifier_s (identifier_bytes) identifier_bytes )argument_list )call (identifier_s) identifier_s )conditional_expression (for_in_clause (identifier_s) identifier_s (identifier_output) identifier_output )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (call (identifier_tuple) identifier_tuple (argument_list (identifier_output) identifier_output )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_return_code) identifier_return_code )not_operator (attribute (identifier_p) identifier_p (identifier_returncode) identifier_returncode )attribute )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (subscript (identifier_output) identifier_output (integer_0) integer_0 )subscript )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (subscript (identifier_output) identifier_output (integer_1) integer_1 )subscript )argument_list )call )expression_statement (expression_statement (assignment (identifier_err_fun) identifier_err_fun (attribute (attribute (identifier_subprocess) identifier_subprocess (identifier_CalledProcessError) identifier_CalledProcessError )attribute (identifier___init__) identifier___init__ )attribute )assignment )expression_statement (if_statement (comparison_operator (string_'output') string_'output' (attribute (call (attribute (identifier_inspect) identifier_inspect (identifier_getargspec) identifier_getargspec )attribute (argument_list (identifier_err_fun) identifier_err_fun )argument_list )call (identifier_args) identifier_args )attribute )comparison_operator (block (raise_statement (call (attribute (identifier_subprocess) identifier_subprocess (identifier_CalledProcessError) identifier_CalledProcessError )attribute (argument_list (attribute (identifier_p) identifier_p (identifier_returncode) identifier_returncode )attribute (identifier_command) identifier_command (identifier_output) identifier_output )argument_list )call )raise_statement )block (else_clause (block (raise_statement (call (attribute (identifier_subprocess) identifier_subprocess (identifier_CalledProcessError) identifier_CalledProcessError )attribute (argument_list (attribute (identifier_p) identifier_p (identifier_returncode) identifier_returncode )attribute (identifier_command) identifier_command )argument_list )call )raise_statement )block )else_clause )if_statement )block )if_statement (if_statement (identifier_return_code) identifier_return_code (block (expression_statement (assignment (identifier_output) identifier_output (binary_operator (identifier_output) identifier_output (tuple (attribute (identifier_p) identifier_p (identifier_returncode) identifier_returncode )attribute )tuple )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Run command using subprocess.Popen Run command and wait for command to complete. If the return code was zero then return, otherwise raise CalledProcessError. By default, this will also add stdout= and stderr=subproces.PIPE to the call to Popen to suppress printing to the terminal. Parameters ---------- command : list of str Command to run as subprocess (see subprocess.Popen documentation). return_code : bool If True, the returncode will be returned, and no error checking will be performed (so this function should always return without error). **kwargs : dict Additional kwargs to pass to ``subprocess.Popen``. Returns ------- stdout : str Stdout returned by the process. stderr : str Stderr returned by the process. code : int The command exit code. Only returned if ``return_code`` is True.
(module (function_definition (function_name_init_db) function_name_init_db (parameters )parameters (block (import_statement (dotted_name (identifier_reana_db) identifier_reana_db (identifier_models) identifier_models )dotted_name )import_statement (if_statement (not_operator (call (identifier_database_exists) identifier_database_exists (argument_list (attribute (identifier_engine) identifier_engine (identifier_url) identifier_url )attribute )argument_list )call )not_operator (block (expression_statement (call (identifier_create_database) identifier_create_database (argument_list (attribute (identifier_engine) identifier_engine (identifier_url) identifier_url )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_Base) identifier_Base (identifier_metadata) identifier_metadata )attribute (identifier_create_all) identifier_create_all )attribute (argument_list (keyword_argument (identifier_bind) identifier_bind (identifier_engine) identifier_engine )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Initialize the DB.
(module (function_definition (function_name__reset) function_name__reset (parameters (identifier_cls) identifier_cls )parameters (block (if_statement (comparison_operator (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call (attribute (identifier_cls) identifier_cls (identifier__cls_pid) identifier__cls_pid )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__cls_pid) identifier__cls_pid )attribute (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_cls) identifier_cls (identifier__cls_instances_by_target) identifier__cls_instances_by_target )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_cls) identifier_cls (identifier__cls_thread_by_target) identifier__cls_thread_by_target )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
If we have forked since the watch dictionaries were initialized, all that has is garbage, so clear it.
(module (function_definition (function_name_update_cache) function_name_update_cache (parameters (identifier_from_currency) identifier_from_currency (identifier_to_currency) identifier_to_currency )parameters (block (if_statement (comparison_operator (call (identifier_check_update) identifier_check_update (argument_list (identifier_from_currency) identifier_from_currency (identifier_to_currency) identifier_to_currency )argument_list )call (True) True )comparison_operator (block (expression_statement (assignment (subscript (subscript (subscript (identifier_ccache) identifier_ccache (identifier_from_currency) identifier_from_currency )subscript (identifier_to_currency) identifier_to_currency )subscript (string_'value') string_'value' )subscript (call (identifier_convert_using_api) identifier_convert_using_api (argument_list (identifier_from_currency) identifier_from_currency (identifier_to_currency) identifier_to_currency )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (subscript (subscript (identifier_ccache) identifier_ccache (identifier_from_currency) identifier_from_currency )subscript (identifier_to_currency) identifier_to_currency )subscript (string_'last_update') string_'last_update' )subscript (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cache) identifier_cache (identifier_write) identifier_write )attribute (argument_list (identifier_ccache) identifier_ccache )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
update from_currency to_currency pair in cache if last update for that pair is over 30 minutes ago by request API info
(module (function_definition (function_name_createPopulationFile) function_name_createPopulationFile (parameters (identifier_inputFiles) identifier_inputFiles (identifier_labels) identifier_labels (identifier_outputFileName) identifier_outputFileName )parameters (block (expression_statement (assignment (identifier_outputFile) identifier_outputFile (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_outputFile) identifier_outputFile (call (identifier_open) identifier_open (argument_list (identifier_outputFileName) identifier_outputFileName (string_'w') string_'w' )argument_list )call )assignment )expression_statement )block (except_clause (identifier_IOError) identifier_IOError (block (expression_statement (assignment (identifier_msg) identifier_msg (string_"%(outputFileName)s: can't write file") string_"%(outputFileName)s: can't write file" )assignment )expression_statement (raise_statement (call (identifier_ProgramError) identifier_ProgramError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )except_clause )try_statement (for_statement (identifier_i) identifier_i (call (identifier_xrange) identifier_xrange (argument_list (call (identifier_len) identifier_len (argument_list (identifier_inputFiles) identifier_inputFiles )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_fileName) identifier_fileName (subscript (identifier_inputFiles) identifier_inputFiles (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (identifier_label) identifier_label (subscript (identifier_labels) identifier_labels (identifier_i) identifier_i )subscript )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_inputFile) identifier_inputFile )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_line) identifier_line (identifier_inputFile) identifier_inputFile (block (expression_statement (assignment (identifier_row) identifier_row (call (attribute (call (attribute (identifier_line) identifier_line (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_"\r\n") string_"\r\n" )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_" ") string_" " )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_famID) identifier_famID (subscript (identifier_row) identifier_row (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_indID) identifier_indID (subscript (identifier_row) identifier_row (integer_1) integer_1 )subscript )assignment )expression_statement (print_statement (chevron (identifier_outputFile) identifier_outputFile )chevron (call (attribute (string_"\t") string_"\t" (identifier_join) identifier_join )attribute (argument_list (list (identifier_famID) identifier_famID (identifier_indID) identifier_indID (identifier_label) identifier_label )list )argument_list )call )print_statement )block )for_statement )block )with_statement )block (except_clause (identifier_IOError) identifier_IOError (block (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (string_"%(fileName)s: no such file") string_"%(fileName)s: no such file" (call (identifier_locals) identifier_locals (argument_list )argument_list )call )binary_operator )assignment )expression_statement (raise_statement (call (identifier_ProgramError) identifier_ProgramError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )except_clause )try_statement )block )for_statement (expression_statement (call (attribute (identifier_outputFile) identifier_outputFile (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Creates a population file. :param inputFiles: the list of input files. :param labels: the list of labels (corresponding to the input files). :param outputFileName: the name of the output file. :type inputFiles: list :type labels: list :type outputFileName: str The ``inputFiles`` is in reality a list of ``tfam`` files composed of samples. For each of those ``tfam`` files, there is a label associated with it (representing the name of the population). The output file consists of one row per sample, with the following three columns: the family ID, the individual ID and the population of each sample.
(module (function_definition (function_name_run_timed) function_name_run_timed (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (for_statement (identifier_key) identifier_key (identifier_kwargs) identifier_kwargs (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key (subscript (identifier_kwargs) identifier_kwargs (identifier_key) identifier_key )subscript )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_command) identifier_command )attribute (attribute (identifier_self) identifier_self (identifier_COMMAND_RUN_TIMED) identifier_COMMAND_RUN_TIMED )attribute )assignment )expression_statement )block )function_definition )module
Run the motor for the amount of time specified in `time_sp` and then stop the motor using the action specified by `stop_action`.
(module (function_definition (function_name_check_ellipsis) function_name_check_ellipsis (parameters (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_err) identifier_err (string_"typography.symbols.ellipsis") string_"typography.symbols.ellipsis" )assignment )expression_statement (expression_statement (assignment (identifier_msg) identifier_msg (string_u"'...' is an approximation, use the ellipsis symbol '…'.") string_u"'...' is an approximation, use the ellipsis symbol '…'." )assignment )expression_statement (expression_statement (assignment (identifier_regex) identifier_regex (string_"\.\.\.") string_"\.\.\." )assignment )expression_statement (return_statement (call (identifier_existence_check) identifier_existence_check (argument_list (identifier_text) identifier_text (list (identifier_regex) identifier_regex )list (identifier_err) identifier_err (identifier_msg) identifier_msg (keyword_argument (identifier_max_errors) identifier_max_errors (integer_3) integer_3 )keyword_argument (keyword_argument (identifier_require_padding) identifier_require_padding (False) False )keyword_argument (keyword_argument (identifier_offset) identifier_offset (integer_0) integer_0 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Use an ellipsis instead of three dots.
(module (function_definition (function_name_cli) function_name_cli (parameters (identifier_out_fmt) identifier_out_fmt (identifier_input) identifier_input (identifier_output) identifier_output )parameters (block (expression_statement (assignment (identifier__input) identifier__input (call (identifier_StringIO) identifier_StringIO (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_l) identifier_l (identifier_input) identifier_input (block (try_statement (block (expression_statement (call (attribute (identifier__input) identifier__input (identifier_write) identifier_write )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_l) identifier_l )argument_list )call )argument_list )call )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (call (attribute (identifier__input) identifier__input (identifier_write) identifier_write )attribute (argument_list (call (identifier_bytes) identifier_bytes (argument_list (identifier_l) identifier_l (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement (expression_statement (assignment (identifier__input) identifier__input (call (attribute (identifier_seria) identifier_seria (identifier_load) identifier_load )attribute (argument_list (identifier__input) identifier__input )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier__out) identifier__out (parenthesized_expression (call (attribute (identifier__input) identifier__input (identifier_dump) identifier_dump )attribute (argument_list (identifier_out_fmt) identifier_out_fmt )argument_list )call )parenthesized_expression )assignment )expression_statement (expression_statement (call (attribute (identifier_output) identifier_output (identifier_write) identifier_write )attribute (argument_list (identifier__out) identifier__out )argument_list )call )expression_statement )block )function_definition )module
Converts text.
(module (function_definition (function_name__node_name) function_name__node_name (parameters (identifier_self) identifier_self (identifier_concept) identifier_concept )parameters (block (if_statement (parenthesized_expression (boolean_operator (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_grounding_threshold) identifier_grounding_threshold )attribute (None) None )comparison_operator (subscript (attribute (identifier_concept) identifier_concept (identifier_db_refs) identifier_db_refs )attribute (attribute (identifier_self) identifier_self (identifier_grounding_ontology) identifier_grounding_ontology )attribute )subscript )boolean_operator (parenthesized_expression (comparison_operator (subscript (subscript (subscript (attribute (identifier_concept) identifier_concept (identifier_db_refs) identifier_db_refs )attribute (attribute (identifier_self) identifier_self (identifier_grounding_ontology) identifier_grounding_ontology )attribute )subscript (integer_0) integer_0 )subscript (integer_1) integer_1 )subscript (attribute (identifier_self) identifier_self (identifier_grounding_threshold) identifier_grounding_threshold )attribute )comparison_operator )parenthesized_expression )boolean_operator )parenthesized_expression (block (expression_statement (assignment (identifier_entry) identifier_entry (subscript (subscript (subscript (attribute (identifier_concept) identifier_concept (identifier_db_refs) identifier_db_refs )attribute (attribute (identifier_self) identifier_self (identifier_grounding_ontology) identifier_grounding_ontology )attribute )subscript (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (call (attribute (call (attribute (subscript (call (attribute (identifier_entry) identifier_entry (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_replace) identifier_replace )attribute (argument_list (string_'_') string_'_' (string_' ') string_' ' )argument_list )call (identifier_capitalize) identifier_capitalize )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (attribute (identifier_concept) identifier_concept (identifier_name) identifier_name )attribute (identifier_capitalize) identifier_capitalize )attribute (argument_list )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Return a standardized name for a node given a Concept.
(module (function_definition (function_name_extract_archive) function_name_extract_archive (parameters (identifier_filepath) identifier_filepath )parameters (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Archive already extracted. Viewing from {}...") string_"Archive already extracted. Viewing from {}..." (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_path) identifier_path )return_statement )block (elif_clause (not_operator (call (attribute (identifier_zipfile) identifier_zipfile (identifier_is_zipfile) identifier_is_zipfile )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (string_"{} is not a zipfile") string_"{} is not a zipfile" (identifier_format) identifier_format )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )argument_list )call )raise_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_archive_sha) identifier_archive_sha (call (identifier_SHA1_file) identifier_SHA1_file (argument_list (keyword_argument (identifier_filepath) identifier_filepath (identifier_filepath) identifier_filepath )keyword_argument (keyword_argument (identifier_extra) identifier_extra (call (identifier_to_bytes) identifier_to_bytes (argument_list (attribute (identifier_slackviewer) identifier_slackviewer (identifier___version__) identifier___version__ )attribute )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_extracted_path) identifier_extracted_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_SLACKVIEWER_TEMP_PATH) identifier_SLACKVIEWER_TEMP_PATH (identifier_archive_sha) identifier_archive_sha )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_extracted_path) identifier_extracted_path )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"{} already exists") string_"{} already exists" (identifier_format) identifier_format )attribute (argument_list (identifier_extracted_path) identifier_extracted_path )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_zipfile) identifier_zipfile (identifier_ZipFile) identifier_ZipFile )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call (as_pattern_target (identifier_zip) identifier_zip )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"{} extracting to {}...") string_"{} extracting to {}..." (identifier_format) identifier_format )attribute (argument_list (identifier_filepath) identifier_filepath (identifier_extracted_path) identifier_extracted_path )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_zip) identifier_zip (identifier_extractall) identifier_extractall )attribute (argument_list (keyword_argument (identifier_path) identifier_path (identifier_extracted_path) identifier_extracted_path )keyword_argument )argument_list )call )expression_statement )block )with_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"{} extracted to {}") string_"{} extracted to {}" (identifier_format) identifier_format )attribute (argument_list (identifier_filepath) identifier_filepath (identifier_extracted_path) identifier_extracted_path )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_create_archive_info) identifier_create_archive_info (argument_list (identifier_filepath) identifier_filepath (identifier_extracted_path) identifier_extracted_path (identifier_archive_sha) identifier_archive_sha )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_extracted_path) identifier_extracted_path )return_statement )block )function_definition )module
Returns the path of the archive :param str filepath: Path to file to extract or read :return: path of the archive :rtype: str
(module (function_definition (function_name_description) function_name_description (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_e) identifier_e (identifier_self) identifier_self (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_e) identifier_e (identifier_Description) identifier_Description )argument_list )call (block (return_statement (attribute (identifier_e) identifier_e (identifier_value) identifier_value )attribute )return_statement )block )if_statement )block )for_statement (raise_statement (identifier_NoSuchAnnotation) identifier_NoSuchAnnotation )raise_statement )block )function_definition )module
Obtain the description associated with the element. Raises: :class:`NoSuchAnnotation` if there is no associated description.
(module (function_definition (function_name_send_audio_packet) function_name_send_audio_packet (parameters (identifier_self) identifier_self (identifier_data) identifier_data (keyword_separator )keyword_separator (default_parameter (identifier_encode) identifier_encode (True) True )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_checked_add) identifier_checked_add )attribute (argument_list (string_'sequence') string_'sequence' (integer_1) integer_1 (integer_65535) integer_65535 )argument_list )call )expression_statement (if_statement (identifier_encode) identifier_encode (block (expression_statement (assignment (identifier_encoded_data) identifier_encoded_data (call (attribute (attribute (identifier_self) identifier_self (identifier_encoder) identifier_encoder )attribute (identifier_encode) identifier_encode )attribute (argument_list (identifier_data) identifier_data (attribute (attribute (identifier_self) identifier_self (identifier_encoder) identifier_encoder )attribute (identifier_SAMPLES_PER_FRAME) identifier_SAMPLES_PER_FRAME )attribute )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_encoded_data) identifier_encoded_data (identifier_data) identifier_data )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_packet) identifier_packet (call (attribute (identifier_self) identifier_self (identifier__get_voice_packet) identifier__get_voice_packet )attribute (argument_list (identifier_encoded_data) identifier_encoded_data )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_socket) identifier_socket )attribute (identifier_sendto) identifier_sendto )attribute (argument_list (identifier_packet) identifier_packet (tuple (attribute (identifier_self) identifier_self (identifier_endpoint_ip) identifier_endpoint_ip )attribute (attribute (identifier_self) identifier_self (identifier_voice_port) identifier_voice_port )attribute )tuple )argument_list )call )expression_statement )block (except_clause (identifier_BlockingIOError) identifier_BlockingIOError (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (string_'A packet has been dropped (seq: %s, timestamp: %s)') string_'A packet has been dropped (seq: %s, timestamp: %s)' (attribute (identifier_self) identifier_self (identifier_sequence) identifier_sequence )attribute (attribute (identifier_self) identifier_self (identifier_timestamp) identifier_timestamp )attribute )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_checked_add) identifier_checked_add )attribute (argument_list (string_'timestamp') string_'timestamp' (attribute (attribute (identifier_self) identifier_self (identifier_encoder) identifier_encoder )attribute (identifier_SAMPLES_PER_FRAME) identifier_SAMPLES_PER_FRAME )attribute (integer_4294967295) integer_4294967295 )argument_list )call )expression_statement )block )function_definition )module
Sends an audio packet composed of the data. You must be connected to play audio. Parameters ---------- data: bytes The :term:`py:bytes-like object` denoting PCM or Opus voice data. encode: bool Indicates if ``data`` should be encoded into Opus. Raises ------- ClientException You are not connected. OpusError Encoding the data failed.
(module (function_definition (function_name_infer_location) function_name_infer_location (parameters (identifier_self) identifier_self (identifier_location_query) identifier_location_query (identifier_max_distance) identifier_max_distance (identifier_google_key) identifier_google_key (identifier_foursquare_client_id) identifier_foursquare_client_id (identifier_foursquare_client_secret) identifier_foursquare_client_secret (identifier_limit) identifier_limit )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_location_from) identifier_location_from )attribute (call (identifier_infer_location) identifier_infer_location (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_points) identifier_points )attribute (integer_0) integer_0 )subscript (identifier_location_query) identifier_location_query (identifier_max_distance) identifier_max_distance (identifier_google_key) identifier_google_key (identifier_foursquare_client_id) identifier_foursquare_client_id (identifier_foursquare_client_secret) identifier_foursquare_client_secret (identifier_limit) identifier_limit )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_location_to) identifier_location_to )attribute (call (identifier_infer_location) identifier_infer_location (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_points) identifier_points )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_location_query) identifier_location_query (identifier_max_distance) identifier_max_distance (identifier_google_key) identifier_google_key (identifier_foursquare_client_id) identifier_foursquare_client_id (identifier_foursquare_client_secret) identifier_foursquare_client_secret (identifier_limit) identifier_limit )argument_list )call )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
In-place location inferring See infer_location function Args: Returns: :obj:`Segment`: self
(module (function_definition (function_name_drop_primary_key) function_name_drop_primary_key (parameters (identifier_self) identifier_self (identifier_table) identifier_table )parameters (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_get_primary_key) identifier_get_primary_key )attribute (argument_list (identifier_table) identifier_table )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_execute) identifier_execute )attribute (argument_list (call (attribute (string_'ALTER TABLE {0} DROP PRIMARY KEY') string_'ALTER TABLE {0} DROP PRIMARY KEY' (identifier_format) identifier_format )attribute (argument_list (call (identifier_wrap) identifier_wrap (argument_list (identifier_table) identifier_table )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Drop a Primary Key constraint for a specific table.
(module (function_definition (function_name_exit_if_missing_graphviz) function_name_exit_if_missing_graphviz (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (tuple_pattern (identifier_out) identifier_out (identifier_err) identifier_err )tuple_pattern (call (attribute (identifier_utils) identifier_utils (identifier_capture_shell) identifier_capture_shell )attribute (argument_list (string_"which dot") string_"which dot" )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_"dot") string_"dot" (identifier_out) identifier_out )comparison_operator (block (expression_statement (call (attribute (identifier_ui) identifier_ui (identifier_error) identifier_error )attribute (argument_list (subscript (attribute (identifier_c) identifier_c (identifier_MESSAGES) identifier_MESSAGES )attribute (string_"dot_missing") string_"dot_missing" )subscript )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Detect the presence of the dot utility to make a png graph.
(module (function_definition (function_name_execute_command) function_name_execute_command (parameters (identifier_self) identifier_self (identifier_args) identifier_args (default_parameter (identifier_parent_environ) identifier_parent_environ (None) None )default_parameter (dictionary_splat_pattern (identifier_subprocess_kwargs) identifier_subprocess_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (identifier_parent_environ) identifier_parent_environ (tuple (None) None (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )tuple )comparison_operator (block (expression_statement (assignment (identifier_target_environ) identifier_target_environ (dictionary )dictionary )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_target_environ) identifier_target_environ (call (attribute (identifier_parent_environ) identifier_parent_environ (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_interpreter) identifier_interpreter (call (identifier_Python) identifier_Python (argument_list (keyword_argument (identifier_target_environ) identifier_target_environ (identifier_target_environ) identifier_target_environ )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_executor) identifier_executor (call (attribute (identifier_self) identifier_self (identifier__create_executor) identifier__create_executor )attribute (argument_list (identifier_interpreter) identifier_interpreter (identifier_parent_environ) identifier_parent_environ )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__execute) identifier__execute )attribute (argument_list (identifier_executor) identifier_executor )argument_list )call )expression_statement (return_statement (call (attribute (identifier_interpreter) identifier_interpreter (identifier_subprocess) identifier_subprocess )attribute (argument_list (identifier_args) identifier_args (dictionary_splat (identifier_subprocess_kwargs) identifier_subprocess_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Run a command within a resolved context. This applies the context to a python environ dict, then runs a subprocess in that namespace. This is not a fully configured subshell - shell-specific commands such as aliases will not be applied. To execute a command within a subshell instead, use execute_shell(). Warning: This runs a command in a configured environ dict only, not in a true shell. To do that, call `execute_shell` using the `command` keyword argument. Args: args: Command arguments, can be a string. parent_environ: Environment to interpret the context within, defaults to os.environ if None. subprocess_kwargs: Args to pass to subprocess.Popen. Returns: A subprocess.Popen object. Note: This does not alter the current python session.
(module (function_definition (function_name_listen) function_name_listen (parameters (identifier_self) identifier_self (typed_parameter (identifier_port) identifier_port (type (identifier_int) identifier_int )type )typed_parameter (typed_default_parameter (identifier_address) identifier_address (type (identifier_str) identifier_str )type (string_"") string_"" )typed_default_parameter )parameters (type (None) None )type (block (expression_statement (assignment (identifier_sockets) identifier_sockets (call (identifier_bind_sockets) identifier_bind_sockets (argument_list (identifier_port) identifier_port (keyword_argument (identifier_address) identifier_address (identifier_address) identifier_address )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_sockets) identifier_add_sockets )attribute (argument_list (identifier_sockets) identifier_sockets )argument_list )call )expression_statement )block )function_definition )module
Starts accepting connections on the given port. This method may be called more than once to listen on multiple ports. `listen` takes effect immediately; it is not necessary to call `TCPServer.start` afterwards. It is, however, necessary to start the `.IOLoop`.
(module (function_definition (function_name_Containers) function_name_Containers (parameters (default_parameter (identifier_vent) identifier_vent (True) True )default_parameter (default_parameter (identifier_running) identifier_running (True) True )default_parameter (default_parameter (identifier_exclude_labels) identifier_exclude_labels (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_containers) identifier_containers (list )list )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_d_client) identifier_d_client (call (attribute (identifier_docker) identifier_docker (identifier_from_env) identifier_from_env )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_vent) identifier_vent (block (expression_statement (assignment (identifier_c) identifier_c (call (attribute (attribute (identifier_d_client) identifier_d_client (identifier_containers) identifier_containers )attribute (identifier_list) identifier_list )attribute (argument_list (keyword_argument (identifier_all) identifier_all (not_operator (identifier_running) identifier_running )not_operator )keyword_argument (keyword_argument (identifier_filters) identifier_filters (dictionary (pair (string_'label') string_'label' (string_'vent') string_'vent' )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_c) identifier_c (call (attribute (attribute (identifier_d_client) identifier_d_client (identifier_containers) identifier_containers )attribute (identifier_list) identifier_list )attribute (argument_list (keyword_argument (identifier_all) identifier_all (not_operator (identifier_running) identifier_running )not_operator )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_container) identifier_container (identifier_c) identifier_c (block (expression_statement (assignment (identifier_include) identifier_include (True) True )assignment )expression_statement (if_statement (identifier_exclude_labels) identifier_exclude_labels (block (for_statement (identifier_label) identifier_label (identifier_exclude_labels) identifier_exclude_labels (block (if_statement (boolean_operator (comparison_operator (string_'vent.groups') string_'vent.groups' (attribute (identifier_container) identifier_container (identifier_labels) identifier_labels )attribute )comparison_operator (comparison_operator (identifier_label) identifier_label (subscript (attribute (identifier_container) identifier_container (identifier_labels) identifier_labels )attribute (string_'vent.groups') string_'vent.groups' )subscript )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_include) identifier_include (False) False )assignment )expression_statement )block )if_statement )block )for_statement )block )if_statement (if_statement (identifier_include) identifier_include (block (expression_statement (call (attribute (identifier_containers) identifier_containers (identifier_append) identifier_append )attribute (argument_list (tuple (attribute (identifier_container) identifier_container (identifier_name) identifier_name )attribute (attribute (identifier_container) identifier_container (identifier_status) identifier_status )attribute )tuple )argument_list )call )expression_statement )block )if_statement )block )for_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_'Docker problem ') string_'Docker problem ' (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )binary_operator )argument_list )call )expression_statement )block )except_clause )try_statement (return_statement (identifier_containers) identifier_containers )return_statement )block )function_definition )module
Get containers that are created, by default limit to vent containers that are running
(module (function_definition (function_name__read_proto_resolve) function_name__read_proto_resolve (parameters (identifier_self) identifier_self (identifier_length) identifier_length (identifier_ptype) identifier_ptype )parameters (block (if_statement (comparison_operator (identifier_ptype) identifier_ptype (string_'0800') string_'0800' )comparison_operator (block (return_statement (call (attribute (identifier_ipaddress) identifier_ipaddress (identifier_ip_address) identifier_ip_address )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__read_fileng) identifier__read_fileng )attribute (argument_list (integer_4) integer_4 )argument_list )call )argument_list )call )return_statement )block (elif_clause (comparison_operator (identifier_ptype) identifier_ptype (string_'86dd') string_'86dd' )comparison_operator (block (return_statement (call (attribute (identifier_ipaddress) identifier_ipaddress (identifier_ip_address) identifier_ip_address )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__read_fileng) identifier__read_fileng )attribute (argument_list (integer_16) integer_16 )argument_list )call )argument_list )call )return_statement )block )elif_clause (else_clause (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__read_fileng) identifier__read_fileng )attribute (argument_list (identifier_length) identifier_length )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Resolve IP address according to protocol. Positional arguments: * length -- int, protocol address length * ptype -- int, protocol type Returns: * str -- IP address
(module (function_definition (function_name_download_setuptools) function_name_download_setuptools (parameters (default_parameter (identifier_version) identifier_version (identifier_DEFAULT_VERSION) identifier_DEFAULT_VERSION )default_parameter (default_parameter (identifier_download_base) identifier_download_base (identifier_DEFAULT_URL) identifier_DEFAULT_URL )default_parameter (default_parameter (identifier_to_dir) identifier_to_dir (attribute (identifier_os) identifier_os (identifier_curdir) identifier_curdir )attribute )default_parameter (default_parameter (identifier_delay) identifier_delay (integer_15) integer_15 )default_parameter )parameters (block (expression_statement (assignment (identifier_to_dir) identifier_to_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_to_dir) identifier_to_dir )argument_list )call )assignment )expression_statement (try_statement (block (import_from_statement (dotted_name (identifier_urllib) identifier_urllib (identifier_request) identifier_request )dotted_name (dotted_name (identifier_urlopen) identifier_urlopen )dotted_name )import_from_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (import_from_statement (dotted_name (identifier_urllib2) identifier_urllib2 )dotted_name (dotted_name (identifier_urlopen) identifier_urlopen )dotted_name )import_from_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_tgz_name) identifier_tgz_name (binary_operator (string_"distribute-%s.tar.gz") string_"distribute-%s.tar.gz" (identifier_version) identifier_version )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (identifier_download_base) identifier_download_base (identifier_tgz_name) identifier_tgz_name )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_saveto) identifier_saveto (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_to_dir) identifier_to_dir (identifier_tgz_name) identifier_tgz_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_src) identifier_src (assignment (identifier_dst) identifier_dst (None) None )assignment )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_saveto) identifier_saveto )argument_list )call )not_operator (block (try_statement (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warn) identifier_warn )attribute (argument_list (string_"Downloading %s") string_"Downloading %s" (identifier_url) identifier_url )argument_list )call )expression_statement (expression_statement (assignment (identifier_src) identifier_src (call (identifier_urlopen) identifier_urlopen (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_src) identifier_src (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dst) identifier_dst (call (identifier_open) identifier_open (argument_list (identifier_saveto) identifier_saveto (string_"wb") string_"wb" )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_dst) identifier_dst (identifier_write) identifier_write )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement )block (finally_clause (block (if_statement (identifier_src) identifier_src (block (expression_statement (call (attribute (identifier_src) identifier_src (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_dst) identifier_dst (block (expression_statement (call (attribute (identifier_dst) identifier_dst (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )finally_clause )try_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_realpath) identifier_realpath )attribute (argument_list (identifier_saveto) identifier_saveto )argument_list )call )return_statement )block )function_definition )module
Download distribute from a specified location and return its filename `version` should be a valid distribute version number that is available as an egg for download under the `download_base` URL (which should end with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download attempt.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (if_statement (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier__keystore) identifier__keystore )attribute )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_rec) identifier_rec (subscript (attribute (identifier_self) identifier_self (identifier__keystore) identifier__keystore )attribute (identifier_key) identifier_key )subscript )assignment )expression_statement (if_statement (attribute (identifier_rec) identifier_rec (identifier_is_expired) identifier_is_expired )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_delete) identifier_delete )attribute (argument_list (identifier_key) identifier_key )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )if_statement (return_statement (attribute (identifier_rec) identifier_rec (identifier_value) identifier_value )attribute )return_statement )block )function_definition )module
Retrieves previously stored key from the storage :return value, stored in the storage
(module (function_definition (function_name__create_alignment_button) function_name__create_alignment_button (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_iconnames) identifier_iconnames (list (string_"AlignTop") string_"AlignTop" (string_"AlignCenter") string_"AlignCenter" (string_"AlignBottom") string_"AlignBottom" )list )assignment )expression_statement (expression_statement (assignment (identifier_bmplist) identifier_bmplist (list_comprehension (subscript (identifier_icons) identifier_icons (identifier_iconname) identifier_iconname )subscript (for_in_clause (identifier_iconname) identifier_iconname (identifier_iconnames) identifier_iconnames )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_alignment_tb) identifier_alignment_tb )attribute (call (attribute (identifier__widgets) identifier__widgets (identifier_BitmapToggleButton) identifier_BitmapToggleButton )attribute (argument_list (identifier_self) identifier_self (identifier_bmplist) identifier_bmplist )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_alignment_tb) identifier_alignment_tb )attribute (identifier_SetToolTipString) identifier_SetToolTipString )attribute (argument_list (call (identifier__) identifier__ (argument_list (string_u"Alignment") string_u"Alignment" )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_Bind) identifier_Bind )attribute (argument_list (attribute (identifier_wx) identifier_wx (identifier_EVT_BUTTON) identifier_EVT_BUTTON )attribute (attribute (identifier_self) identifier_self (identifier_OnAlignment) identifier_OnAlignment )attribute (attribute (identifier_self) identifier_self (identifier_alignment_tb) identifier_alignment_tb )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_AddControl) identifier_AddControl )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_alignment_tb) identifier_alignment_tb )attribute )argument_list )call )expression_statement )block )function_definition )module
Creates vertical alignment button
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_domain) identifier_domain (identifier_type_name) identifier_type_name (identifier_search_command) identifier_search_command )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (argument_list (identifier_domain) identifier_domain (identifier_type_name) identifier_type_name (identifier_search_command) identifier_search_command (string_'DELETE') string_'DELETE' (None) None )argument_list )call )return_statement )block )function_definition )module
Delete entry in ThreatConnect Data Store Args: domain (string): One of 'local', 'organization', or 'system'. type_name (string): This is a free form index type name. The ThreatConnect API will use this resource verbatim. search_command (string): Search command to pass to ES.
(module (function_definition (function_name_create_repo) function_name_create_repo (parameters (identifier_url) identifier_url (identifier_vcs) identifier_vcs (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (comparison_operator (identifier_vcs) identifier_vcs (string_'git') string_'git' )comparison_operator (block (return_statement (call (identifier_GitRepo) identifier_GitRepo (argument_list (identifier_url) identifier_url (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (elif_clause (comparison_operator (identifier_vcs) identifier_vcs (string_'hg') string_'hg' )comparison_operator (block (return_statement (call (identifier_MercurialRepo) identifier_MercurialRepo (argument_list (identifier_url) identifier_url (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_vcs) identifier_vcs (string_'svn') string_'svn' )comparison_operator (block (return_statement (call (identifier_SubversionRepo) identifier_SubversionRepo (argument_list (identifier_url) identifier_url (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_InvalidVCS) identifier_InvalidVCS (argument_list (binary_operator (string_'VCS %s is not a valid VCS') string_'VCS %s is not a valid VCS' (identifier_vcs) identifier_vcs )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
r"""Return a object representation of a VCS repository. :returns: instance of a repository object :rtype: :class:`libvcs.svn.SubversionRepo`, :class:`libvcs.git.GitRepo` or :class:`libvcs.hg.MercurialRepo`. Usage Example:: >>> from libvcs.shortcuts import create_repo >>> r = create_repo( ... url='https://www.github.com/you/myrepo', ... vcs='git', ... repo_dir='/tmp/myrepo') >>> r.update_repo() |myrepo| (git) Repo directory for myrepo (git) does not exist @ \ /tmp/myrepo |myrepo| (git) Cloning. |myrepo| (git) git clone https://www.github.com/tony/myrepo \ /tmp/myrepo Cloning into '/tmp/myrepo'... Checking connectivity... done. |myrepo| (git) git fetch |myrepo| (git) git pull Already up-to-date.
(module (function_definition (function_name_getIndex) function_name_getIndex (parameters (identifier_reference) identifier_reference )parameters (block (if_statement (identifier_reference) identifier_reference (block (expression_statement (assignment (identifier_reffas) identifier_reffas (identifier_reference) identifier_reference )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_parent_directory) identifier_parent_directory (call (attribute (identifier_path) identifier_path (identifier_dirname) identifier_dirname )attribute (argument_list (call (attribute (identifier_path) identifier_path (identifier_abspath) identifier_abspath )attribute (argument_list (call (attribute (identifier_path) identifier_path (identifier_dirname) identifier_dirname )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_reffas) identifier_reffas (call (attribute (identifier_path) identifier_path (identifier_join) identifier_join )attribute (argument_list (identifier_parent_directory) identifier_parent_directory (string_"reference/DNA_CS.fasta") string_"reference/DNA_CS.fasta" )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (not_operator (call (attribute (identifier_path) identifier_path (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_reffas) identifier_reffas )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (string_"Could not find reference fasta for lambda genome.") string_"Could not find reference fasta for lambda genome." )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (string_"Could not find reference fasta for lambda genome.") string_"Could not find reference fasta for lambda genome." )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_aligner) identifier_aligner (call (attribute (identifier_mp) identifier_mp (identifier_Aligner) identifier_Aligner )attribute (argument_list (identifier_reffas) identifier_reffas (keyword_argument (identifier_preset) identifier_preset (string_"map-ont") string_"map-ont" )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_aligner) identifier_aligner )not_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (string_"Failed to load/build index") string_"Failed to load/build index" )argument_list )call )expression_statement (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"ERROR: failed to load/build index") string_"ERROR: failed to load/build index" )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_aligner) identifier_aligner )return_statement )block )function_definition )module
Find the reference folder using the location of the script file Create the index, test if successful
(module (function_definition (function_name_convert_notebook) function_name_convert_notebook (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_exporter) identifier_exporter (call (attribute (attribute (attribute (identifier_nbconvert) identifier_nbconvert (identifier_exporters) identifier_exporters )attribute (identifier_python) identifier_python )attribute (identifier_PythonExporter) identifier_PythonExporter )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_relative_path) identifier_relative_path (call (attribute (identifier_self) identifier_self (identifier_convert_path) identifier_convert_path )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_file_path) identifier_file_path (call (attribute (identifier_self) identifier_self (identifier_get_path) identifier_get_path )attribute (argument_list (binary_operator (string_"%s.ipynb") string_"%s.ipynb" (identifier_relative_path) identifier_relative_path )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (subscript (call (attribute (identifier_exporter) identifier_exporter (identifier_from_filename) identifier_from_filename )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_code) identifier_write_code )attribute (argument_list (identifier_name) identifier_name (identifier_code) identifier_code )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clean_code) identifier_clean_code )attribute (argument_list (identifier_name) identifier_name (list )list )argument_list )call )expression_statement )block )function_definition )module
Converts a notebook into a python file.
(module (function_definition (function_name_handle_input) function_name_handle_input (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_timeval) identifier_update_timeval )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_events) identifier_events )attribute (list )list )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (call (attribute (identifier_self) identifier_self (identifier__get_event_key_code) identifier__get_event_key_code )attribute (argument_list (identifier_event) identifier_event )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_code) identifier_code (attribute (identifier_self) identifier_self (identifier_codes) identifier_codes )attribute )comparison_operator (block (expression_statement (assignment (identifier_new_code) identifier_new_code (subscript (attribute (identifier_self) identifier_self (identifier_codes) identifier_codes )attribute (identifier_code) identifier_code )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_new_code) identifier_new_code (integer_0) integer_0 )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_event_type) identifier_event_type (call (attribute (identifier_self) identifier_self (identifier__get_event_type) identifier__get_event_type )attribute (argument_list (identifier_event) identifier_event )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_self) identifier_self (identifier__get_key_value) identifier__get_key_value )attribute (argument_list (identifier_event) identifier_event (identifier_event_type) identifier_event_type )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_scan_event) identifier_scan_event (identifier_key_event) identifier_key_event )pattern_list (call (attribute (identifier_self) identifier_self (identifier_emulate_press) identifier_emulate_press )attribute (argument_list (identifier_new_code) identifier_new_code (identifier_code) identifier_code (identifier_value) identifier_value (attribute (identifier_self) identifier_self (identifier_timeval) identifier_timeval )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_events) identifier_events )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_scan_event) identifier_scan_event )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_events) identifier_events )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_key_event) identifier_key_event )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_events) identifier_events )attribute (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_sync_marker) identifier_sync_marker )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_timeval) identifier_timeval )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_to_pipe) identifier_write_to_pipe )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_events) identifier_events )attribute )argument_list )call )expression_statement )block )function_definition )module
Process they keyboard input.
(module (function_definition (function_name_to_html) function_name_to_html (parameters (identifier_self) identifier_self (default_parameter (identifier_show_mean) identifier_show_mean (None) None )default_parameter (default_parameter (identifier_sortable) identifier_sortable (None) None )default_parameter (default_parameter (identifier_colorize) identifier_colorize (True) True )default_parameter (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (identifier_show_mean) identifier_show_mean (None) None )comparison_operator (block (expression_statement (assignment (identifier_show_mean) identifier_show_mean (attribute (identifier_self) identifier_self (identifier_show_mean) identifier_show_mean )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_sortable) identifier_sortable (None) None )comparison_operator (block (expression_statement (assignment (identifier_sortable) identifier_sortable (attribute (identifier_self) identifier_self (identifier_sortable) identifier_sortable )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_df) identifier_df (call (attribute (identifier_self) identifier_self (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_show_mean) identifier_show_mean (block (expression_statement (call (attribute (identifier_df) identifier_df (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (string_'Mean') string_'Mean' (None) None )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_df) identifier_df (identifier_loc) identifier_loc )attribute (slice (colon) colon )slice (string_'Mean') string_'Mean' )subscript (list_comprehension (binary_operator (string_'%.3f') string_'%.3f' (call (attribute (subscript (identifier_self) identifier_self (identifier_m) identifier_m )subscript (identifier_mean) identifier_mean )attribute (argument_list )argument_list )call )binary_operator (for_in_clause (identifier_m) identifier_m (attribute (identifier_self) identifier_self (identifier_models) identifier_models )attribute )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_html) identifier_html (call (attribute (identifier_df) identifier_df (identifier_to_html) identifier_to_html )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_html) identifier_html (identifier_table_id) identifier_table_id )pattern_list (call (attribute (identifier_self) identifier_self (identifier_annotate) identifier_annotate )attribute (argument_list (identifier_df) identifier_df (identifier_html) identifier_html (identifier_show_mean) identifier_show_mean (identifier_colorize) identifier_colorize )argument_list )call )assignment )expression_statement (if_statement (identifier_sortable) identifier_sortable (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_dynamify) identifier_dynamify )attribute (argument_list (identifier_table_id) identifier_table_id )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_html) identifier_html )return_statement )block )function_definition )module
Extend Pandas built in `to_html` method for rendering a DataFrame and use it to render a ScoreMatrix.
(module (function_definition (function_name_three_digit) function_name_three_digit (parameters (identifier_number) identifier_number )parameters (block (expression_statement (assignment (identifier_number) identifier_number (call (identifier_str) identifier_str (argument_list (identifier_number) identifier_number )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_number) identifier_number )argument_list )call (integer_1) integer_1 )comparison_operator (block (return_statement (binary_operator (string_u'00%s') string_u'00%s' (identifier_number) identifier_number )binary_operator )return_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_number) identifier_number )argument_list )call (integer_2) integer_2 )comparison_operator (block (return_statement (binary_operator (string_u'0%s') string_u'0%s' (identifier_number) identifier_number )binary_operator )return_statement )block )elif_clause (else_clause (block (return_statement (identifier_number) identifier_number )return_statement )block )else_clause )if_statement )block )function_definition )module
Add 0s to inputs that their length is less than 3. :param number: The number to convert :type number: int :returns: String :example: >>> three_digit(1) '001'
(module (function_definition (function_name_disconnect) function_name_disconnect (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_all_conns) identifier_all_conns (call (identifier_chain) identifier_chain (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__available_connections) identifier__available_connections )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier__in_use_connections) identifier__in_use_connections )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (identifier_node_connections) identifier_node_connections (identifier_all_conns) identifier_all_conns (block (for_statement (identifier_connection) identifier_connection (identifier_node_connections) identifier_node_connections (block (expression_statement (call (attribute (identifier_connection) identifier_connection (identifier_disconnect) identifier_disconnect )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Nothing that requires any overwrite.
(module (function_definition (function_name_nonKeyVisibleCols) function_name_nonKeyVisibleCols (parameters (identifier_self) identifier_self )parameters (block (expression_statement (string_'All columns which are not keysList of unhidden non-key columns.') string_'All columns which are not keysList of unhidden non-key columns.' )expression_statement (return_statement (list_comprehension (identifier_c) identifier_c (for_in_clause (identifier_c) identifier_c (attribute (identifier_self) identifier_self (identifier_columns) identifier_columns )attribute )for_in_clause (if_clause (boolean_operator (not_operator (attribute (identifier_c) identifier_c (identifier_hidden) identifier_hidden )attribute )not_operator (comparison_operator (identifier_c) identifier_c (attribute (identifier_self) identifier_self (identifier_keyCols) identifier_keyCols )attribute )comparison_operator )boolean_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
All columns which are not keysList of unhidden non-key columns.
(module (function_definition (function_name_calculate_start_time) function_name_calculate_start_time (parameters (identifier_df) identifier_df )parameters (block (if_statement (comparison_operator (string_"time") string_"time" (identifier_df) identifier_df )comparison_operator (block (expression_statement (assignment (subscript (identifier_df) identifier_df (string_"time_arr") string_"time_arr" )subscript (call (attribute (identifier_pd) identifier_pd (identifier_Series) identifier_Series )attribute (argument_list (subscript (identifier_df) identifier_df (string_"time") string_"time" )subscript (keyword_argument (identifier_dtype) identifier_dtype (string_'datetime64[s]') string_'datetime64[s]' )keyword_argument )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (string_"timestamp") string_"timestamp" (identifier_df) identifier_df )comparison_operator (block (expression_statement (assignment (subscript (identifier_df) identifier_df (string_"time_arr") string_"time_arr" )subscript (call (attribute (identifier_pd) identifier_pd (identifier_Series) identifier_Series )attribute (argument_list (subscript (identifier_df) identifier_df (string_"timestamp") string_"timestamp" )subscript (keyword_argument (identifier_dtype) identifier_dtype (string_"datetime64[ns]") string_"datetime64[ns]" )keyword_argument )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (return_statement (identifier_df) identifier_df )return_statement )block )else_clause )if_statement (if_statement (comparison_operator (string_"dataset") string_"dataset" (identifier_df) identifier_df )comparison_operator (block (for_statement (identifier_dset) identifier_dset (call (attribute (subscript (identifier_df) identifier_df (string_"dataset") string_"dataset" )subscript (identifier_unique) identifier_unique )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_time_zero) identifier_time_zero (call (attribute (subscript (attribute (identifier_df) identifier_df (identifier_loc) identifier_loc )attribute (comparison_operator (subscript (identifier_df) identifier_df (string_"dataset") string_"dataset" )subscript (identifier_dset) identifier_dset )comparison_operator (string_"time_arr") string_"time_arr" )subscript (identifier_min) identifier_min )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_df) identifier_df (identifier_loc) identifier_loc )attribute (comparison_operator (subscript (identifier_df) identifier_df (string_"dataset") string_"dataset" )subscript (identifier_dset) identifier_dset )comparison_operator (string_"start_time") string_"start_time" )subscript (line_continuation_\) line_continuation_\ (binary_operator (subscript (attribute (identifier_df) identifier_df (identifier_loc) identifier_loc )attribute (comparison_operator (subscript (identifier_df) identifier_df (string_"dataset") string_"dataset" )subscript (identifier_dset) identifier_dset )comparison_operator (string_"time_arr") string_"time_arr" )subscript (identifier_time_zero) identifier_time_zero )binary_operator )assignment )expression_statement )block )for_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_df) identifier_df (string_"start_time") string_"start_time" )subscript (binary_operator (subscript (identifier_df) identifier_df (string_"time_arr") string_"time_arr" )subscript (call (attribute (subscript (identifier_df) identifier_df (string_"time_arr") string_"time_arr" )subscript (identifier_min) identifier_min )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (identifier_df) identifier_df (identifier_drop) identifier_drop )attribute (argument_list (list (string_"time") string_"time" (string_"timestamp") string_"timestamp" (string_"time_arr") string_"time_arr" )list (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_errors) identifier_errors (string_"ignore") string_"ignore" )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Calculate the star_time per read. Time data is either a "time" (in seconds, derived from summary files) or a "timestamp" (in UTC, derived from fastq_rich format) and has to be converted appropriately in a datetime format time_arr For both the time_zero is the minimal value of the time_arr, which is then used to subtract from all other times In the case of method=track (and dataset is a column in the df) then this subtraction is done per dataset
(module (function_definition (function_name_rename_variables) function_name_rename_variables (parameters (typed_parameter (identifier_expression) identifier_expression (type (identifier_Expression) identifier_Expression )type )typed_parameter (typed_parameter (identifier_renaming) identifier_renaming (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )typed_parameter )parameters (type (identifier_Expression) identifier_Expression )type (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_expression) identifier_expression (identifier_Operation) identifier_Operation )argument_list )call (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_expression) identifier_expression (string_'variable_name') string_'variable_name' )argument_list )call (block (expression_statement (assignment (identifier_variable_name) identifier_variable_name (call (attribute (identifier_renaming) identifier_renaming (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_expression) identifier_expression (identifier_variable_name) identifier_variable_name )attribute (attribute (identifier_expression) identifier_expression (identifier_variable_name) identifier_variable_name )attribute )argument_list )call )assignment )expression_statement (return_statement (call (identifier_create_operation_expression) identifier_create_operation_expression (argument_list (identifier_expression) identifier_expression (list_comprehension (call (identifier_rename_variables) identifier_rename_variables (argument_list (identifier_o) identifier_o (identifier_renaming) identifier_renaming )argument_list )call (for_in_clause (identifier_o) identifier_o (call (identifier_op_iter) identifier_op_iter (argument_list (identifier_expression) identifier_expression )argument_list )call )for_in_clause )list_comprehension (keyword_argument (identifier_variable_name) identifier_variable_name (identifier_variable_name) identifier_variable_name )keyword_argument )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_operands) identifier_operands (list_comprehension (call (identifier_rename_variables) identifier_rename_variables (argument_list (identifier_o) identifier_o (identifier_renaming) identifier_renaming )argument_list )call (for_in_clause (identifier_o) identifier_o (call (identifier_op_iter) identifier_op_iter (argument_list (identifier_expression) identifier_expression )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (call (identifier_create_operation_expression) identifier_create_operation_expression (argument_list (identifier_expression) identifier_expression (identifier_operands) identifier_operands )argument_list )call )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_expression) identifier_expression (identifier_Expression) identifier_Expression )argument_list )call (block (expression_statement (assignment (identifier_expression) identifier_expression (call (attribute (identifier_expression) identifier_expression (identifier___copy__) identifier___copy__ )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_expression) identifier_expression (identifier_variable_name) identifier_variable_name )attribute (call (attribute (identifier_renaming) identifier_renaming (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_expression) identifier_expression (identifier_variable_name) identifier_variable_name )attribute (attribute (identifier_expression) identifier_expression (identifier_variable_name) identifier_variable_name )attribute )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (return_statement (identifier_expression) identifier_expression )return_statement )block )function_definition )module
Rename the variables in the expression according to the given dictionary. Args: expression: The expression in which the variables are renamed. renaming: The renaming dictionary. Maps old variable names to new ones. Variable names not occuring in the dictionary are left unchanged. Returns: The expression with renamed variables.
(module (function_definition (function_name_merge) function_name_merge (parameters (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_OptionParser) identifier_OptionParser (argument_list (attribute (identifier_merge) identifier_merge (identifier___doc__) identifier___doc__ )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_p) identifier_p (identifier_set_outdir) identifier_set_outdir )attribute (argument_list (keyword_argument (identifier_outdir) identifier_outdir (string_"outdir") string_"outdir" )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_opts) identifier_opts (identifier_args) identifier_args )pattern_list (call (attribute (identifier_p) identifier_p (identifier_parse_args) identifier_parse_args )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (not_operator (call (attribute (identifier_p) identifier_p (identifier_print_help) identifier_print_help )attribute (argument_list )argument_list )call )not_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_folders) identifier_folders (identifier_args) identifier_args )assignment )expression_statement (expression_statement (assignment (identifier_outdir) identifier_outdir (attribute (identifier_opts) identifier_opts (identifier_outdir) identifier_outdir )attribute )assignment )expression_statement (expression_statement (call (identifier_mkdir) identifier_mkdir (argument_list (identifier_outdir) identifier_outdir )argument_list )call )expression_statement (expression_statement (assignment (identifier_files) identifier_files (call (identifier_flatten) identifier_flatten (generator_expression (call (identifier_glob) identifier_glob (argument_list (call (attribute (string_"{0}/*.*.fastq") string_"{0}/*.*.fastq" (identifier_format) identifier_format )attribute (argument_list (identifier_x) identifier_x )argument_list )call )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_folders) identifier_folders )for_in_clause )generator_expression )call )assignment )expression_statement (expression_statement (assignment (identifier_files) identifier_files (call (identifier_list) identifier_list (argument_list (identifier_files) identifier_files )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_key) identifier_key (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (subscript (call (attribute (call (attribute (identifier_op) identifier_op (identifier_basename) identifier_basename )attribute (argument_list (identifier_x) identifier_x )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." )argument_list )call (integer_0) integer_0 )subscript )lambda )assignment )expression_statement (expression_statement (call (attribute (identifier_files) identifier_files (identifier_sort) identifier_sort )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )expression_statement (for_statement (pattern_list (identifier_id) identifier_id (identifier_fns) identifier_fns )pattern_list (call (identifier_groupby) identifier_groupby (argument_list (identifier_files) identifier_files (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call (block (expression_statement (assignment (identifier_fns) identifier_fns (call (identifier_list) identifier_list (argument_list (identifier_fns) identifier_fns )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_outfile) identifier_outfile (call (attribute (identifier_op) identifier_op (identifier_join) identifier_join )attribute (argument_list (identifier_outdir) identifier_outdir (call (attribute (string_"{0}.fastq") string_"{0}.fastq" (identifier_format) identifier_format )attribute (argument_list (identifier_id) identifier_id )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (call (identifier_FileMerger) identifier_FileMerger (argument_list (identifier_fns) identifier_fns (keyword_argument (identifier_outfile) identifier_outfile (identifier_outfile) identifier_outfile )keyword_argument )argument_list )call (identifier_merge) identifier_merge )attribute (argument_list (keyword_argument (identifier_checkexists) identifier_checkexists (True) True )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
%prog merge folder1 ... Consolidate split contents in the folders. The folders can be generated by the split() process and several samples may be in separate fastq files. This program merges them.
(module (function_definition (function_name__stop_ubridge) function_name__stop_ubridge (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier__ubridge_hypervisor) identifier__ubridge_hypervisor )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__ubridge_hypervisor) identifier__ubridge_hypervisor )attribute (identifier_is_running) identifier_is_running )attribute (argument_list )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Stopping uBridge hypervisor {}:{}") string_"Stopping uBridge hypervisor {}:{}" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__ubridge_hypervisor) identifier__ubridge_hypervisor )attribute (identifier_host) identifier_host )attribute (attribute (attribute (identifier_self) identifier_self (identifier__ubridge_hypervisor) identifier__ubridge_hypervisor )attribute (identifier_port) identifier_port )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (yield (call (attribute (attribute (identifier_self) identifier_self (identifier__ubridge_hypervisor) identifier__ubridge_hypervisor )attribute (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )yield )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__ubridge_hypervisor) identifier__ubridge_hypervisor )attribute (None) None )assignment )expression_statement )block )function_definition )module
Stops uBridge.
(module (function_definition (function_name_is_deb_package_installed) function_name_is_deb_package_installed (parameters (identifier_pkg) identifier_pkg )parameters (block (with_statement (with_clause (with_item (call (identifier_settings) identifier_settings (argument_list (call (identifier_hide) identifier_hide (argument_list (string_'warnings') string_'warnings' (string_'running') string_'running' (string_'stdout') string_'stdout' (string_'stderr') string_'stderr' )argument_list )call (keyword_argument (identifier_warn_only) identifier_warn_only (True) True )keyword_argument (keyword_argument (identifier_capture) identifier_capture (True) True )keyword_argument )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_sudo) identifier_sudo (argument_list (binary_operator (string_'dpkg-query -l "%s" | grep -q ^.i') string_'dpkg-query -l "%s" | grep -q ^.i' (identifier_pkg) identifier_pkg )binary_operator )argument_list )call )assignment )expression_statement (return_statement (not_operator (call (identifier_bool) identifier_bool (argument_list (attribute (identifier_result) identifier_result (identifier_return_code) identifier_return_code )attribute )argument_list )call )not_operator )return_statement )block )with_statement )block )function_definition )module
checks if a particular deb package is installed
(module (function_definition (function_name_numbering_part) function_name_numbering_part (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_part_related_by) identifier_part_related_by )attribute (argument_list (attribute (identifier_RT) identifier_RT (identifier_NUMBERING) identifier_NUMBERING )attribute )argument_list )call )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_numbering_part) identifier_numbering_part (call (attribute (identifier_NumberingPart) identifier_NumberingPart (identifier_new) identifier_new )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_relate_to) identifier_relate_to )attribute (argument_list (identifier_numbering_part) identifier_numbering_part (attribute (identifier_RT) identifier_RT (identifier_NUMBERING) identifier_NUMBERING )attribute )argument_list )call )expression_statement (return_statement (identifier_numbering_part) identifier_numbering_part )return_statement )block )except_clause )try_statement )block )function_definition )module
A |NumberingPart| object providing access to the numbering definitions for this document. Creates an empty numbering part if one is not present.
(module (function_definition (function_name_solidangle_errorprop) function_name_solidangle_errorprop (parameters (identifier_twotheta) identifier_twotheta (identifier_dtwotheta) identifier_dtwotheta (identifier_sampletodetectordistance) identifier_sampletodetectordistance (identifier_dsampletodetectordistance) identifier_dsampletodetectordistance (default_parameter (identifier_pixelsize) identifier_pixelsize (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_SAC) identifier_SAC (call (identifier_solidangle) identifier_solidangle (argument_list (identifier_twotheta) identifier_twotheta (identifier_sampletodetectordistance) identifier_sampletodetectordistance (identifier_pixelsize) identifier_pixelsize )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_pixelsize) identifier_pixelsize (None) None )comparison_operator (block (expression_statement (assignment (identifier_pixelsize) identifier_pixelsize (integer_1) integer_1 )assignment )expression_statement )block )if_statement (return_statement (tuple (identifier_SAC) identifier_SAC (binary_operator (parenthesized_expression (binary_operator (binary_operator (identifier_sampletodetectordistance) identifier_sampletodetectordistance (binary_operator (parenthesized_expression (binary_operator (binary_operator (binary_operator (integer_4) integer_4 (binary_operator (identifier_dsampletodetectordistance) identifier_dsampletodetectordistance (integer_2) integer_2 )binary_operator )binary_operator (binary_operator (call (attribute (identifier_np) identifier_np (identifier_cos) identifier_cos )attribute (argument_list (identifier_twotheta) identifier_twotheta )argument_list )call (integer_2) integer_2 )binary_operator )binary_operator (binary_operator (binary_operator (binary_operator (integer_9) integer_9 (binary_operator (identifier_dtwotheta) identifier_dtwotheta (integer_2) integer_2 )binary_operator )binary_operator (binary_operator (identifier_sampletodetectordistance) identifier_sampletodetectordistance (integer_2) integer_2 )binary_operator )binary_operator (binary_operator (call (attribute (identifier_np) identifier_np (identifier_sin) identifier_sin )attribute (argument_list (identifier_twotheta) identifier_twotheta )argument_list )call (integer_2) integer_2 )binary_operator )binary_operator )binary_operator )parenthesized_expression (float_0.5) float_0.5 )binary_operator )binary_operator (binary_operator (call (attribute (identifier_np) identifier_np (identifier_cos) identifier_cos )attribute (argument_list (identifier_twotheta) identifier_twotheta )argument_list )call (integer_4) integer_4 )binary_operator )binary_operator )parenthesized_expression (binary_operator (identifier_pixelsize) identifier_pixelsize (integer_2) integer_2 )binary_operator )binary_operator )tuple )return_statement )block )function_definition )module
Solid-angle correction for two-dimensional SAS images with error propagation Inputs: twotheta: matrix of two-theta values dtwotheta: matrix of absolute error of two-theta values sampletodetectordistance: sample-to-detector distance dsampletodetectordistance: absolute error of sample-to-detector distance Outputs two matrices of the same shape as twotheta. The scattering intensity matrix should be multiplied by the first one. The second one is the propagated error of the first one.
(module (function_definition (function_name_process_name) function_name_process_name (parameters (typed_parameter (identifier_message) identifier_message (type (attribute (identifier_types) identifier_types (identifier_Message) identifier_Message )attribute )type )typed_parameter (typed_parameter (identifier_state) identifier_state (type (identifier_FSMContext) identifier_FSMContext )type )typed_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_state) identifier_state (identifier_proxy) identifier_proxy )attribute (argument_list )argument_list )call (as_pattern_target (identifier_data) identifier_data )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'name') string_'name' )subscript (attribute (identifier_message) identifier_message (identifier_text) identifier_text )attribute )assignment )expression_statement )block )with_statement (expression_statement (await (call (attribute (identifier_Form) identifier_Form (identifier_next) identifier_next )attribute (argument_list )argument_list )call )await )expression_statement (expression_statement (await (call (attribute (identifier_message) identifier_message (identifier_reply) identifier_reply )attribute (argument_list (string_"How old are you?") string_"How old are you?" )argument_list )call )await )expression_statement )block )function_definition )module
Process user name
(module (function_definition (function_name__update) function_name__update (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_bullet) identifier_bullet )attribute (subscript (identifier_data) identifier_data (string_'bullet') string_'bullet' )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_level) identifier_level )attribute (subscript (identifier_data) identifier_data (string_'level') string_'level' )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_text) identifier_text )attribute (call (identifier_WikiText) identifier_WikiText (argument_list (subscript (identifier_data) identifier_data (string_'text_raw') string_'text_raw' )subscript (subscript (identifier_data) identifier_data (string_'text_rendered') string_'text_rendered' )subscript )argument_list )call )assignment )expression_statement )block )function_definition )module
Update the line using the blob of json-parsed data directly from the API.
(module (function_definition (function_name_load_probe) function_name_load_probe (parameters (identifier_name) identifier_name )parameters (block (if_statement (call (attribute (identifier_op) identifier_op (identifier_exists) identifier_exists )attribute (argument_list (identifier_name) identifier_name )argument_list )call (block (expression_statement (assignment (identifier_path) identifier_path (identifier_name) identifier_name )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_curdir) identifier_curdir (call (attribute (identifier_op) identifier_op (identifier_realpath) identifier_realpath )attribute (argument_list (call (attribute (identifier_op) identifier_op (identifier_dirname) identifier_dirname )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_op) identifier_op (identifier_join) identifier_join )attribute (argument_list (identifier_curdir) identifier_curdir (call (attribute (string_'probes/{}.prb') string_'probes/{}.prb' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (not_operator (call (attribute (identifier_op) identifier_op (identifier_exists) identifier_exists )attribute (argument_list (identifier_path) identifier_path )argument_list )call )not_operator (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (call (attribute (string_"The probe `{}` cannot be found.") string_"The probe `{}` cannot be found." (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_MEA) identifier_MEA (argument_list (keyword_argument (identifier_probe) identifier_probe (call (identifier__read_python) identifier__read_python (argument_list (identifier_path) identifier_path )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Load one of the built-in probes.
(module (function_definition (function_name_release) function_name_release (parameters (identifier_self) identifier_self (default_parameter (identifier_force) identifier_force (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_D) identifier_D (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_collection) identifier_collection (call (attribute (identifier_self) identifier_self (identifier_get_collection) identifier_get_collection )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_identity) identifier_identity (call (attribute (identifier_self) identifier_self (identifier_Lock) identifier_Lock )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (comparison_operator (attribute (identifier_D) identifier_D (identifier_id) identifier_id )attribute (identifier_self) identifier_self )comparison_operator )assignment )expression_statement (if_statement (not_operator (identifier_force) identifier_force )not_operator (block (expression_statement (augmented_assignment (identifier_query) identifier_query (comparison_operator (attribute (attribute (identifier_D) identifier_D (identifier_lock) identifier_lock )attribute (identifier_instance) identifier_instance )attribute (attribute (identifier_identity) identifier_identity (identifier_instance) identifier_instance )attribute )comparison_operator )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_previous) identifier_previous (call (attribute (identifier_collection) identifier_collection (identifier_find_one_and_update) identifier_find_one_and_update )attribute (argument_list (identifier_query) identifier_query (dictionary (pair (string_'$unset') string_'$unset' (dictionary (pair (unary_operator (attribute (identifier_D) identifier_D (identifier_lock) identifier_lock )attribute )unary_operator (True) True )pair )dictionary )pair )dictionary (dictionary (pair (unary_operator (attribute (identifier_D) identifier_D (identifier_lock) identifier_lock )attribute )unary_operator (True) True )pair )dictionary )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_previous) identifier_previous (None) None )comparison_operator (block (expression_statement (assignment (identifier_lock) identifier_lock (call (identifier_getattr) identifier_getattr (argument_list (call (attribute (identifier_self) identifier_self (identifier_find_one) identifier_find_one )attribute (argument_list (identifier_self) identifier_self (keyword_argument (identifier_projection) identifier_projection (dictionary (pair (unary_operator (attribute (identifier_D) identifier_D (identifier_lock) identifier_lock )attribute )unary_operator (True) True )pair )dictionary )keyword_argument )argument_list )call (string_'lock') string_'lock' (None) None )argument_list )call )assignment )expression_statement (raise_statement (call (attribute (identifier_self) identifier_self (identifier_Locked) identifier_Locked )attribute (argument_list (string_"Unable to release lock.") string_"Unable to release lock." (identifier_lock) identifier_lock )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_lock) identifier_lock (call (attribute (attribute (identifier_self) identifier_self (identifier_Lock) identifier_Lock )attribute (identifier_from_mongo) identifier_from_mongo )attribute (argument_list (subscript (identifier_previous) identifier_previous (unary_operator (attribute (identifier_D) identifier_D (identifier_lock) identifier_lock )attribute )unary_operator )subscript )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_lock) identifier_lock (comparison_operator (attribute (identifier_lock) identifier_lock (identifier_expires) identifier_expires )attribute (attribute (identifier_identity) identifier_identity (identifier_time) identifier_time )attribute )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_lock) identifier_lock (identifier_expired) identifier_expired )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_identity) identifier_identity (identifier_released) identifier_released )attribute (argument_list (identifier_self) identifier_self (identifier_force) identifier_force )argument_list )call )expression_statement )block )function_definition )module
Release an exclusive lock on this integration task. Unless forcing, if we are not the current owners of the lock a Locked exception will be raised.