sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_round) function_name_round (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y )pattern_list (attribute (identifier_self) identifier_self (identifier_anchor) identifier_anchor )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_anchor) identifier_anchor )attribute (tuple (call (attribute (identifier_normalizers) identifier_normalizers (identifier_normalizeRounding) identifier_normalizeRounding )attribute (argument_list (identifier_x) identifier_x )argument_list )call (call (attribute (identifier_normalizers) identifier_normalizers (identifier_normalizeRounding) identifier_normalizeRounding )attribute (argument_list (identifier_y) identifier_y )argument_list )call )tuple )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y )pattern_list (attribute (identifier_self) identifier_self (identifier_bcpIn) identifier_bcpIn )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_bcpIn) identifier_bcpIn )attribute (tuple (call (attribute (identifier_normalizers) identifier_normalizers (identifier_normalizeRounding) identifier_normalizeRounding )attribute (argument_list (identifier_x) identifier_x )argument_list )call (call (attribute (identifier_normalizers) identifier_normalizers (identifier_normalizeRounding) identifier_normalizeRounding )attribute (argument_list (identifier_y) identifier_y )argument_list )call )tuple )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y )pattern_list (attribute (identifier_self) identifier_self (identifier_bcpOut) identifier_bcpOut )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_bcpOut) identifier_bcpOut )attribute (tuple (call (attribute (identifier_normalizers) identifier_normalizers (identifier_normalizeRounding) identifier_normalizeRounding )attribute (argument_list (identifier_x) identifier_x )argument_list )call (call (attribute (identifier_normalizers) identifier_normalizers (identifier_normalizeRounding) identifier_normalizeRounding )attribute (argument_list (identifier_y) identifier_y )argument_list )call )tuple )assignment )expression_statement )block )function_definition )module
Round coordinates.
(module (function_definition (function_name_structure_transform) function_name_structure_transform (parameters (identifier_self) identifier_self (identifier_original_structure) identifier_original_structure (identifier_new_structure) identifier_new_structure (default_parameter (identifier_refine_rotation) identifier_refine_rotation (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_sm) identifier_sm (call (identifier_StructureMatcher) identifier_StructureMatcher (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_sm) identifier_sm (identifier_fit) identifier_fit )attribute (argument_list (identifier_original_structure) identifier_original_structure (identifier_new_structure) identifier_new_structure )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (string_"original and new structures do not match!") string_"original and new structures do not match!" )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_trans_1) identifier_trans_1 (call (attribute (identifier_self) identifier_self (identifier_get_ieee_rotation) identifier_get_ieee_rotation )attribute (argument_list (identifier_original_structure) identifier_original_structure (identifier_refine_rotation) identifier_refine_rotation )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_trans_2) identifier_trans_2 (call (attribute (identifier_self) identifier_self (identifier_get_ieee_rotation) identifier_get_ieee_rotation )attribute (argument_list (identifier_new_structure) identifier_new_structure (identifier_refine_rotation) identifier_refine_rotation )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_new) identifier_new (call (attribute (identifier_self) identifier_self (identifier_rotate) identifier_rotate )attribute (argument_list (identifier_trans_1) identifier_trans_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_new) identifier_new (call (attribute (identifier_new) identifier_new (identifier_rotate) identifier_rotate )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_transpose) identifier_transpose )attribute (argument_list (identifier_trans_2) identifier_trans_2 )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_new) identifier_new )return_statement )block )function_definition )module
Transforms a tensor from one basis for an original structure into a new basis defined by a new structure. Args: original_structure (Structure): structure corresponding to the basis of the current tensor new_structure (Structure): structure corresponding to the desired basis refine_rotation (bool): whether to refine the rotations generated in get_ieee_rotation Returns: Tensor that has been transformed such that its basis corresponds to the new_structure's basis
(module (function_definition (function_name_allDecisions) function_name_allDecisions (parameters (identifier_self) identifier_self (identifier_result) identifier_result (dictionary_splat_pattern (identifier_values) identifier_values )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier___getDecision) identifier___getDecision )attribute (argument_list (identifier_result) identifier_result (keyword_argument (identifier_multiple) identifier_multiple (True) True )keyword_argument (dictionary_splat (identifier_values) identifier_values )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (list_comprehension (subscript (identifier_data) identifier_data (identifier_value) identifier_value )subscript (for_in_clause (identifier_value) identifier_value (identifier_result) identifier_result )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call (integer_1) integer_1 )comparison_operator (block (return_statement (subscript (identifier_data) identifier_data (integer_0) integer_0 )subscript )return_statement )block (else_clause (block (return_statement (identifier_data) identifier_data )return_statement )block )else_clause )if_statement )block )function_definition )module
Joust like self.decision but for multiple finded values. Returns: Arrays of arrays of finded elements or if finds only one mach, array of strings.
(module (function_definition (function_name__push_property_schema) function_name__push_property_schema (parameters (identifier_self) identifier_self (identifier_prop) identifier_prop )parameters (block (expression_statement (assignment (identifier_schema) identifier_schema (call (identifier_Schema) identifier_Schema (argument_list (subscript (attribute (attribute (identifier_self) identifier_self (identifier__schema) identifier__schema )attribute (identifier_properties) identifier_properties )attribute (identifier_prop) identifier_prop )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__push_schema) identifier__push_schema )attribute (argument_list (identifier_schema) identifier_schema (binary_operator (string_".properties.") string_".properties." (identifier_prop) identifier_prop )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Construct a sub-schema from a property of the current schema.
(module (function_definition (function_name_get_teams) function_name_get_teams (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_make_request) identifier_make_request )attribute (argument_list (keyword_argument (identifier_host) identifier_host (string_"erikberg.com") string_"erikberg.com" )keyword_argument (keyword_argument (identifier_sport) identifier_sport (string_'nba') string_'nba' )keyword_argument (keyword_argument (identifier_method) identifier_method (string_"teams") string_"teams" )keyword_argument (keyword_argument (identifier_id) identifier_id (None) None )keyword_argument (keyword_argument (identifier_format) identifier_format (string_"json") string_"json" )keyword_argument (keyword_argument (identifier_parameters) identifier_parameters (dictionary )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return json current roster of team
(module (function_definition (function_name_canonical) function_name_canonical (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_canonical') string_'_canonical' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__canonical) identifier__canonical )attribute (call (attribute (attribute (identifier_conf) identifier_conf (identifier_lib) identifier_lib )attribute (identifier_clang_getCanonicalCursor) identifier_clang_getCanonicalCursor )attribute (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__canonical) identifier__canonical )attribute )return_statement )block )function_definition )module
Return the canonical Cursor corresponding to this Cursor. The canonical cursor is the cursor which is representative for the underlying entity. For example, if you have multiple forward declarations for the same class, the canonical cursor for the forward declarations will be identical.
(module (function_definition (function_name_json_success) function_name_json_success (parameters (identifier_self) identifier_self (identifier_json) identifier_json )parameters (block (if_statement (boolean_operator (boolean_operator (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_json) identifier_json )argument_list )call (identifier_dict) identifier_dict )comparison_operator (comparison_operator (string_'result') string_'result' (identifier_json) identifier_json )comparison_operator )boolean_operator (comparison_operator (subscript (identifier_json) identifier_json (string_'result') string_'result' )subscript (string_'success') string_'success' )comparison_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Check the JSON response object for the success flag Parameters ---------- json : dict A dictionary representing a JSON object from lendingclub.com
(module (function_definition (function_name_to_pfull_from_phalf) function_name_to_pfull_from_phalf (parameters (identifier_arr) identifier_arr (identifier_pfull_coord) identifier_pfull_coord )parameters (block (expression_statement (assignment (identifier_phalf_top) identifier_phalf_top (call (attribute (identifier_arr) identifier_arr (identifier_isel) identifier_isel )attribute (argument_list (dictionary_splat (dictionary (pair (attribute (identifier_internal_names) identifier_internal_names (identifier_PHALF_STR) identifier_PHALF_STR )attribute (call (identifier_slice) identifier_slice (argument_list (integer_1) integer_1 (None) None )argument_list )call )pair )dictionary )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_phalf_top) identifier_phalf_top (call (identifier_replace_coord) identifier_replace_coord (argument_list (identifier_phalf_top) identifier_phalf_top (attribute (identifier_internal_names) identifier_internal_names (identifier_PHALF_STR) identifier_PHALF_STR )attribute (attribute (identifier_internal_names) identifier_internal_names (identifier_PFULL_STR) identifier_PFULL_STR )attribute (identifier_pfull_coord) identifier_pfull_coord )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_phalf_bot) identifier_phalf_bot (call (attribute (identifier_arr) identifier_arr (identifier_isel) identifier_isel )attribute (argument_list (dictionary_splat (dictionary (pair (attribute (identifier_internal_names) identifier_internal_names (identifier_PHALF_STR) identifier_PHALF_STR )attribute (call (identifier_slice) identifier_slice (argument_list (None) None (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )pair )dictionary )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_phalf_bot) identifier_phalf_bot (call (identifier_replace_coord) identifier_replace_coord (argument_list (identifier_phalf_bot) identifier_phalf_bot (attribute (identifier_internal_names) identifier_internal_names (identifier_PHALF_STR) identifier_PHALF_STR )attribute (attribute (identifier_internal_names) identifier_internal_names (identifier_PFULL_STR) identifier_PFULL_STR )attribute (identifier_pfull_coord) identifier_pfull_coord )argument_list )call )assignment )expression_statement (return_statement (binary_operator (float_0.5) float_0.5 (parenthesized_expression (binary_operator (identifier_phalf_bot) identifier_phalf_bot (identifier_phalf_top) identifier_phalf_top )binary_operator )parenthesized_expression )binary_operator )return_statement )block )function_definition )module
Compute data at full pressure levels from values at half levels.
(module (function_definition (function_name_recursive_setattr) function_name_recursive_setattr (parameters (typed_parameter (identifier_obj) identifier_obj (type (identifier_Any) identifier_Any )type )typed_parameter (typed_parameter (identifier_attr) identifier_attr (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_val) identifier_val (type (identifier_Any) identifier_Any )type )typed_parameter )parameters (type (identifier_Any) identifier_Any )type (block (expression_statement (assignment (pattern_list (identifier_pre) identifier_pre (identifier__) identifier__ (identifier_post) identifier_post )pattern_list (call (attribute (identifier_attr) identifier_attr (identifier_rpartition) identifier_rpartition )attribute (argument_list (string_'.') string_'.' )argument_list )call )assignment )expression_statement (return_statement (call (identifier_setattr) identifier_setattr (argument_list (conditional_expression (call (identifier_recursive_getattr) identifier_recursive_getattr (argument_list (identifier_obj) identifier_obj (identifier_pre) identifier_pre )argument_list )call (identifier_pre) identifier_pre (identifier_obj) identifier_obj )conditional_expression (identifier_post) identifier_post (identifier_val) identifier_val )argument_list )call )return_statement )block )function_definition )module
Recusrive ``setattr``. This can be used as a drop in for the standard ``setattr(...)``. Credit to: https://stackoverflow.com/a/31174427 Args: obj: Object to retrieve the attribute from. attr: Name of the attribute, with each successive attribute separated by a ".". value: Value to set the attribute to. Returns: The requested attribute. (Same as ``getattr``). Raises: AttributeError: If the attribute was not found and no default was provided. (Same as ``getattr``).
(module (function_definition (function_name_set_progress_message) function_name_set_progress_message (parameters (identifier_self) identifier_self (identifier_message) identifier_message (default_parameter (identifier_line_break) identifier_line_break (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_end) identifier_end (conditional_expression (string_'\r') string_'\r' (not_operator (identifier_line_break) identifier_line_break )not_operator (None) None )conditional_expression )assignment )expression_statement (decorated_definition (decorator (attribute (identifier_self) identifier_self (identifier_connect) identifier_connect )attribute )decorator (function_definition (function_name_on_progress) function_name_on_progress (parameters (identifier_value) identifier_value (identifier_value_max) identifier_value_max (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'end') string_'end' )subscript (conditional_expression (None) None (comparison_operator (identifier_value) identifier_value (identifier_value_max) identifier_value_max )comparison_operator (identifier_end) identifier_end )conditional_expression )assignment )expression_statement (expression_statement (call (identifier__default_on_progress) identifier__default_on_progress (argument_list (identifier_message) identifier_message (identifier_value) identifier_value (identifier_value_max) identifier_value_max (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )function_definition )decorated_definition )block )function_definition )module
Set a progress message. The string needs to contain `{progress}`.
(module (function_definition (function_name__on_trace_notification) function_name__on_trace_notification (parameters (identifier_self) identifier_self (identifier_trace_event) identifier_trace_event )parameters (block (expression_statement (assignment (identifier_conn_string) identifier_conn_string (call (attribute (identifier_trace_event) identifier_trace_event (identifier_get) identifier_get )attribute (argument_list (string_'connection_string') string_'connection_string' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (identifier_trace_event) identifier_trace_event (identifier_get) identifier_get )attribute (argument_list (string_'payload') string_'payload' )argument_list )call )assignment )expression_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_notify_event) identifier_notify_event )attribute (argument_list (identifier_conn_string) identifier_conn_string (string_'trace') string_'trace' (identifier_payload) identifier_payload )argument_list )call )await )expression_statement )block )function_definition )module
Callback function called when a trace chunk is received. Args: trace_chunk (dict): The received trace chunk information
(module (function_definition (function_name_cookiestring) function_name_cookiestring (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_Cookie) identifier_Cookie (identifier_SimpleCookie) identifier_SimpleCookie )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sc) identifier_sc (list_comprehension (tuple (attribute (identifier_i) identifier_i (identifier_key) identifier_key )attribute (attribute (identifier_i) identifier_i (identifier_value) identifier_value )attribute )tuple (for_in_clause (identifier_i) identifier_i (call (attribute (identifier_c) identifier_c (identifier_values) identifier_values )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_cookies) identifier_cookies )attribute (call (identifier_dict) identifier_dict (argument_list (identifier_sc) identifier_sc )argument_list )call )assignment )expression_statement )block )function_definition )module
Cookie string setter
(module (function_definition (function_name_trigger_streamer) function_name_trigger_streamer (parameters (list_splat_pattern (identifier_inputs) identifier_inputs )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_streamer_marker) identifier_streamer_marker (subscript (identifier_kwargs) identifier_kwargs (string_'mark_streamer') string_'mark_streamer' )subscript )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_reading) identifier_reading (call (attribute (subscript (identifier_inputs) identifier_inputs (integer_1) integer_1 )subscript (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (identifier_StreamEmptyError) identifier_StreamEmptyError (block (return_statement (list )list )return_statement )block )except_clause (finally_clause (block (for_statement (identifier_input_x) identifier_input_x (identifier_inputs) identifier_inputs (block (expression_statement (call (attribute (identifier_input_x) identifier_input_x (identifier_skip_all) identifier_skip_all )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )finally_clause )try_statement (try_statement (block (expression_statement (call (identifier_streamer_marker) identifier_streamer_marker (argument_list (attribute (identifier_reading) identifier_reading (identifier_value) identifier_value )attribute )argument_list )call )expression_statement )block (except_clause (identifier_ArgumentError) identifier_ArgumentError (block (return_statement (list )list )return_statement )block )except_clause )try_statement (return_statement (list (call (identifier_IOTileReading) identifier_IOTileReading (argument_list (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 )argument_list )call )list )return_statement )block )function_definition )module
Trigger a streamer based on the index read from input b. Returns: list(IOTileReading)
(module (function_definition (function_name__is_domain_match) function_name__is_domain_match (parameters (typed_parameter (identifier_domain) identifier_domain (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_hostname) identifier_hostname (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_bool) identifier_bool )type (block (if_statement (comparison_operator (identifier_hostname) identifier_hostname (identifier_domain) identifier_domain )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_hostname) identifier_hostname (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_non_matching) identifier_non_matching (subscript (identifier_hostname) identifier_hostname (slice (colon) colon (unary_operator (call (identifier_len) identifier_len (argument_list (identifier_domain) identifier_domain )argument_list )call )unary_operator )slice )subscript )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_non_matching) identifier_non_matching (identifier_endswith) identifier_endswith )attribute (argument_list (string_".") string_"." )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (not_operator (call (identifier_is_ip_address) identifier_is_ip_address (argument_list (identifier_hostname) identifier_hostname )argument_list )call )not_operator )return_statement )block )function_definition )module
Implements domain matching adhering to RFC 6265.
(module (function_definition (function_name__save_fastq_space) function_name__save_fastq_space (parameters (identifier_items) identifier_items )parameters (block (expression_statement (assignment (identifier_to_cleanup) identifier_to_cleanup (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_data) identifier_data (generator_expression (call (attribute (identifier_utils) identifier_utils (identifier_to_single_data) identifier_to_single_data )attribute (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_items) identifier_items )for_in_clause )generator_expression (block (for_statement (identifier_fname) identifier_fname (call (attribute (identifier_data) identifier_data (identifier_get) identifier_get )attribute (argument_list (string_"files") string_"files" (list )list )argument_list )call (block (if_statement (call (attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_realpath) identifier_realpath )attribute (argument_list (identifier_fname) identifier_fname )argument_list )call (identifier_startswith) identifier_startswith )attribute (argument_list (call (attribute (identifier_dd) identifier_dd (identifier_get_work_dir) identifier_get_work_dir )attribute (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call (block (expression_statement (assignment (subscript (identifier_to_cleanup) identifier_to_cleanup (identifier_fname) identifier_fname )subscript (subscript (identifier_data) identifier_data (string_"config") string_"config" )subscript )assignment )expression_statement )block )if_statement )block )for_statement )block )for_statement (for_statement (pattern_list (identifier_fname) identifier_fname (identifier_config) identifier_config )pattern_list (call (attribute (identifier_to_cleanup) identifier_to_cleanup (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_utils) identifier_utils (identifier_save_diskspace) identifier_save_diskspace )attribute (argument_list (identifier_fname) identifier_fname (string_"Cleanup prep files after alignment finished") string_"Cleanup prep files after alignment finished" (identifier_config) identifier_config )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Potentially save fastq space prior to merging, since alignments done.
(module (function_definition (function_name_dumps) function_name_dumps (parameters (identifier_obj) identifier_obj (default_parameter (identifier_indent) identifier_indent (None) None )default_parameter (default_parameter (identifier_default) identifier_default (None) None )default_parameter (default_parameter (identifier_sort_keys) identifier_sort_keys (False) False )default_parameter (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (call (identifier_YAMLEncoder) identifier_YAMLEncoder (argument_list (keyword_argument (identifier_indent) identifier_indent (identifier_indent) identifier_indent )keyword_argument (keyword_argument (identifier_default) identifier_default (identifier_default) identifier_default )keyword_argument (keyword_argument (identifier_sort_keys) identifier_sort_keys (identifier_sort_keys) identifier_sort_keys )keyword_argument (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )return_statement )block )function_definition )module
Dump string.
(module (function_definition (function_name__check_required_fields) function_name__check_required_fields (parameters (identifier_self) identifier_self (default_parameter (identifier_fields) identifier_fields (None) None )default_parameter (default_parameter (identifier_either_fields) identifier_either_fields (None) None )default_parameter )parameters (block (for_statement (tuple_pattern (identifier_key) identifier_key (identifier_value) identifier_value )tuple_pattern (call (attribute (identifier_fields) identifier_fields (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (not_operator (identifier_value) identifier_value )not_operator (block (raise_statement (call (identifier_HSException) identifier_HSException (argument_list (binary_operator (string_"Field '%s' is required.") string_"Field '%s' is required." (identifier_key) identifier_key )binary_operator )argument_list )call )raise_statement )block )if_statement )block )for_statement (if_statement (comparison_operator (identifier_either_fields) identifier_either_fields (None) None )comparison_operator (block (for_statement (identifier_field) identifier_field (identifier_either_fields) identifier_either_fields (block (if_statement (not_operator (call (identifier_any) identifier_any (argument_list (call (attribute (identifier_field) identifier_field (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call )not_operator (block (raise_statement (call (identifier_HSException) identifier_HSException (argument_list (binary_operator (string_"One of the following fields is required: %s") string_"One of the following fields is required: %s" (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_field) identifier_field (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement )block )for_statement )block )if_statement )block )function_definition )module
Check the values of the fields If no value found in `fields`, an exception will be raised. `either_fields` are the fields that one of them must have a value Raises: HSException: If no value found in at least one item of`fields`, or no value found in one of the items of `either_fields` Returns: None
(module (function_definition (function_name__create_field) function_name__create_field (parameters (identifier_self) identifier_self (identifier_field_id) identifier_field_id )parameters (block (expression_statement (assignment (identifier_config) identifier_config (subscript (attribute (identifier_self) identifier_self (identifier__field_configs) identifier__field_configs )attribute (identifier_field_id) identifier_field_id )subscript )assignment )expression_statement (expression_statement (assignment (identifier_adapter) identifier_adapter (subscript (attribute (identifier_self) identifier_self (identifier__adapters) identifier__adapters )attribute (subscript (identifier_config) identifier_config (string_'type') string_'type' )subscript )subscript )assignment )expression_statement (if_statement (comparison_operator (string_'name') string_'name' (identifier_config) identifier_config )comparison_operator (block (expression_statement (assignment (identifier_name) identifier_name (subscript (identifier_config) identifier_config (string_'name') string_'name' )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_name) identifier_name (None) None )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (string_'size') string_'size' (identifier_config) identifier_config )comparison_operator (block (expression_statement (assignment (identifier_columns) identifier_columns (subscript (identifier_config) identifier_config (string_'size') string_'size' )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_columns) identifier_columns (None) None )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (string_'values') string_'values' (identifier_config) identifier_config )comparison_operator (block (expression_statement (assignment (identifier_values) identifier_values (subscript (identifier_config) identifier_config (string_'values') string_'values' )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_values) identifier_values (None) None )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_field) identifier_field (call (attribute (identifier_adapter) identifier_adapter (identifier_get_field) identifier_get_field )attribute (argument_list (identifier_name) identifier_name (identifier_columns) identifier_columns (identifier_values) identifier_values )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'results_name') string_'results_name' (identifier_config) identifier_config )comparison_operator (block (expression_statement (assignment (identifier_field) identifier_field (call (attribute (identifier_field) identifier_field (identifier_setResultsName) identifier_setResultsName )attribute (argument_list (subscript (identifier_config) identifier_config (string_'results_name') string_'results_name' )subscript )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_field) identifier_field (call (attribute (identifier_field) identifier_field (identifier_setResultsName) identifier_setResultsName )attribute (argument_list (identifier_field_id) identifier_field_id )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_field) identifier_field )return_statement )block )function_definition )module
Creates the field with the specified parameters. :param field_id: identifier for the field :return: the basic rule for the field
(module (function_definition (function_name_count) function_name_count (parameters (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_OptionParser) identifier_OptionParser (argument_list (attribute (identifier_count) identifier_count (identifier___doc__) identifier___doc__ )attribute )argument_list )call )assignment )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_2) integer_2 )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 (pattern_list (identifier_coveragefile) identifier_coveragefile (identifier_fastafile) identifier_fastafile )pattern_list (identifier_args) identifier_args )assignment )expression_statement (expression_statement (assignment (identifier_countsfile) identifier_countsfile (binary_operator (subscript (call (attribute (identifier_coveragefile) identifier_coveragefile (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." )argument_list )call (integer_0) integer_0 )subscript (string_".bin") string_".bin" )binary_operator )assignment )expression_statement (if_statement (call (attribute (identifier_op) identifier_op (identifier_exists) identifier_exists )attribute (argument_list (identifier_countsfile) identifier_countsfile )argument_list )call (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"`{0}` file exists. Remove before proceed.") string_"`{0}` file exists. Remove before proceed." (line_continuation_\) line_continuation_\ (identifier_format) identifier_format )attribute (argument_list (identifier_countsfile) identifier_countsfile )argument_list )call )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_fastasize) identifier_fastasize (identifier_sizes) identifier_sizes (identifier_offsets) identifier_offsets )pattern_list (call (identifier_get_offsets) identifier_get_offsets (argument_list (identifier_fastafile) identifier_fastafile )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Initialize array of uint8 with size {0}") string_"Initialize array of uint8 with size {0}" (identifier_format) identifier_format )attribute (argument_list (identifier_fastasize) identifier_fastasize )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_ar) identifier_ar (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (identifier_fastasize) identifier_fastasize (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_np) identifier_np (identifier_uint8) identifier_uint8 )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_update_array) identifier_update_array (argument_list (identifier_ar) identifier_ar (identifier_coveragefile) identifier_coveragefile (identifier_sizes) identifier_sizes (identifier_offsets) identifier_offsets )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ar) identifier_ar (identifier_tofile) identifier_tofile )attribute (argument_list (identifier_countsfile) identifier_countsfile )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Array written to `{0}`") string_"Array written to `{0}`" (identifier_format) identifier_format )attribute (argument_list (identifier_countsfile) identifier_countsfile )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
%prog count t.coveragePerBase fastafile Serialize the genomeCoverage results. The coordinate system of the count array will be based on the fastafile.
(module (function_definition (function_name_search_users) function_name_search_users (parameters (identifier_self) identifier_self (identifier_user) identifier_user )parameters (block (expression_statement (assignment (identifier_user_url) identifier_user_url (binary_operator (string_"%s/%s/%s") string_"%s/%s/%s" (tuple (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute (string_"user") string_"user" (identifier_user) identifier_user )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_jss) identifier_jss )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_user_url) identifier_user_url )argument_list )call )assignment )expression_statement (return_statement (call (identifier_LDAPUsersResults) identifier_LDAPUsersResults (argument_list (attribute (identifier_self) identifier_self (identifier_jss) identifier_jss )attribute (identifier_response) identifier_response )argument_list )call )return_statement )block )function_definition )module
Search for LDAP users. Args: user: User to search for. It is not entirely clear how the JSS determines the results- are regexes allowed, or globbing? Returns: LDAPUsersResult object. Raises: Will raise a JSSGetError if no results are found.
(module (function_definition (function_name_save) function_name_save (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_Death) identifier_Death )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_Alive) identifier_Alive )attribute (False) False )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_Animal) identifier_Animal (identifier_self) identifier_self )argument_list )call (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
The save method for Animal class is over-ridden to set Alive=False when a Death date is entered. This is not the case for a cause of death.
(module (function_definition (function_name__extract_intensities) function_name__extract_intensities (parameters (identifier_image) identifier_image (default_parameter (identifier_mask) identifier_mask (call (identifier_slice) identifier_slice (argument_list (None) None )argument_list )call )default_parameter )parameters (block (return_statement (call (attribute (subscript (call (attribute (identifier_numpy) identifier_numpy (identifier_array) identifier_array )attribute (argument_list (identifier_image) identifier_image (keyword_argument (identifier_copy) identifier_copy (True) True )keyword_argument )argument_list )call (identifier_mask) identifier_mask )subscript (identifier_ravel) identifier_ravel )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Internal, single-image version of `intensities`.
(module (function_definition (function_name_inception_v3_arg_scope) function_name_inception_v3_arg_scope (parameters (default_parameter (identifier_weight_decay) identifier_weight_decay (float_0.00004) float_0.00004 )default_parameter (default_parameter (identifier_stddev) identifier_stddev (float_0.1) float_0.1 )default_parameter (default_parameter (identifier_batch_norm_var_collection) identifier_batch_norm_var_collection (string_'moving_vars') string_'moving_vars' )default_parameter )parameters (block (expression_statement (assignment (identifier_batch_norm_params) identifier_batch_norm_params (dictionary (pair (string_'decay') string_'decay' (float_0.9997) float_0.9997 )pair (pair (string_'epsilon') string_'epsilon' (float_0.001) float_0.001 )pair (pair (string_'updates_collections') string_'updates_collections' (attribute (attribute (identifier_tf) identifier_tf (identifier_GraphKeys) identifier_GraphKeys )attribute (identifier_UPDATE_OPS) identifier_UPDATE_OPS )attribute )pair (pair (string_'variables_collections') string_'variables_collections' (dictionary (pair (string_'beta') string_'beta' (None) None )pair (pair (string_'gamma') string_'gamma' (None) None )pair (pair (string_'moving_mean') string_'moving_mean' (list (identifier_batch_norm_var_collection) identifier_batch_norm_var_collection )list )pair (pair (string_'moving_variance') string_'moving_variance' (list (identifier_batch_norm_var_collection) identifier_batch_norm_var_collection )list )pair )dictionary )pair )dictionary )assignment )expression_statement (with_statement (with_clause (with_item (call (attribute (identifier_slim) identifier_slim (identifier_arg_scope) identifier_arg_scope )attribute (argument_list (list (attribute (identifier_slim) identifier_slim (identifier_conv2d) identifier_conv2d )attribute (attribute (identifier_slim) identifier_slim (identifier_fully_connected) identifier_fully_connected )attribute )list (keyword_argument (identifier_weights_regularizer) identifier_weights_regularizer (call (attribute (identifier_slim) identifier_slim (identifier_l2_regularizer) identifier_l2_regularizer )attribute (argument_list (identifier_weight_decay) identifier_weight_decay )argument_list )call )keyword_argument )argument_list )call )with_item )with_clause (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_slim) identifier_slim (identifier_arg_scope) identifier_arg_scope )attribute (argument_list (list (attribute (identifier_slim) identifier_slim (identifier_conv2d) identifier_conv2d )attribute )list (keyword_argument (identifier_weights_initializer) identifier_weights_initializer (call (attribute (identifier_tf) identifier_tf (identifier_truncated_normal_initializer) identifier_truncated_normal_initializer )attribute (argument_list (keyword_argument (identifier_stddev) identifier_stddev (identifier_stddev) identifier_stddev )keyword_argument )argument_list )call )keyword_argument (keyword_argument (identifier_activation_fn) identifier_activation_fn (attribute (attribute (identifier_tf) identifier_tf (identifier_nn) identifier_nn )attribute (identifier_relu) identifier_relu )attribute )keyword_argument (keyword_argument (identifier_normalizer_fn) identifier_normalizer_fn (attribute (identifier_slim) identifier_slim (identifier_batch_norm) identifier_batch_norm )attribute )keyword_argument (keyword_argument (identifier_normalizer_params) identifier_normalizer_params (identifier_batch_norm_params) identifier_batch_norm_params )keyword_argument )argument_list )call (as_pattern_target (identifier_sc) identifier_sc )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (identifier_sc) identifier_sc )return_statement )block )with_statement )block )with_statement )block )function_definition )module
Defines the default InceptionV3 arg scope. Args: weight_decay: The weight decay to use for regularizing the model. stddev: The standard deviation of the trunctated normal weight initializer. batch_norm_var_collection: The name of the collection for the batch norm variables. Returns: An `arg_scope` to use for the inception v3 model.
(module (function_definition (function_name__extract_field_with_regex) function_name__extract_field_with_regex (parameters (identifier_self) identifier_self (identifier_field) identifier_field )parameters (block (expression_statement (assignment (identifier_matched) identifier_matched (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (identifier_field) identifier_field (attribute (identifier_self) identifier_self (identifier_text) identifier_text )attribute )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_matched) identifier_matched )not_operator (block (expression_statement (assignment (identifier_err_msg) identifier_err_msg (call (attribute (string_u"Failed to extract data with regex! => {}\n") string_u"Failed to extract data with regex! => {}\n" (identifier_format) identifier_format )attribute (argument_list (identifier_field) identifier_field )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_err_msg) identifier_err_msg (call (attribute (string_u"response body: {}\n") string_u"response body: {}\n" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_text) identifier_text )attribute )argument_list )call )augmented_assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_log_error) identifier_log_error )attribute (argument_list (identifier_err_msg) identifier_err_msg )argument_list )call )expression_statement (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_ExtractFailure) identifier_ExtractFailure )attribute (argument_list (identifier_err_msg) identifier_err_msg )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_matched) identifier_matched (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )return_statement )block )function_definition )module
extract field from response content with regex. requests.Response body could be json or html text. Args: field (str): regex string that matched r".*\(.*\).*" Returns: str: matched content. Raises: exceptions.ExtractFailure: If no content matched with regex. Examples: >>> # self.text: "LB123abcRB789" >>> filed = "LB[\d]*(.*)RB[\d]*" >>> _extract_field_with_regex(field) abc
(module (function_definition (function_name_choose_branch) function_name_choose_branch (parameters (default_parameter (identifier_exclude) identifier_exclude (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_exclude) identifier_exclude (None) None )comparison_operator (block (expression_statement (assignment (identifier_master) identifier_master (call (attribute (identifier_conf) identifier_conf (identifier_get) identifier_get )attribute (argument_list (string_'git.master_branch') string_'git.master_branch' (string_'master') string_'master' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_develop) identifier_develop (call (attribute (identifier_conf) identifier_conf (identifier_get) identifier_get )attribute (argument_list (string_'git.devel_branch') string_'git.devel_branch' (string_'develop') string_'develop' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_exclude) identifier_exclude (set (identifier_master) identifier_master (identifier_develop) identifier_develop )set )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_branches) identifier_branches (call (identifier_list) identifier_list (argument_list (binary_operator (call (identifier_set) identifier_set (argument_list (call (attribute (identifier_git) identifier_git (identifier_branches) identifier_branches )attribute (argument_list )argument_list )call )argument_list )call (identifier_exclude) identifier_exclude )binary_operator )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_branch_name) identifier_branch_name )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_branches) identifier_branches )argument_list )call (block (expression_statement (call (attribute (identifier_shell) identifier_shell (identifier_cprint) identifier_cprint )attribute (argument_list (call (attribute (string_'<90>[{}] <33>{}') string_'<90>[{}] <33>{}' (identifier_format) identifier_format )attribute (argument_list (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator (identifier_branch_name) identifier_branch_name )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_choice) identifier_choice (integer_0) integer_0 )assignment )expression_statement (while_statement (boolean_operator (comparison_operator (identifier_choice) identifier_choice (integer_1) integer_1 )comparison_operator (comparison_operator (identifier_choice) identifier_choice (call (identifier_len) identifier_len (argument_list (identifier_branches) identifier_branches )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_prompt) identifier_prompt (call (attribute (string_"Pick a base branch from the above [1-{}]") string_"Pick a base branch from the above [1-{}]" (identifier_format) identifier_format )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_branches) identifier_branches )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_choice) identifier_choice (call (attribute (identifier_click) identifier_click (identifier_prompt) identifier_prompt )attribute (argument_list (identifier_prompt) identifier_prompt (keyword_argument (identifier_value_proc) identifier_value_proc (identifier_int) identifier_int )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (parenthesized_expression (comparison_operator (integer_1) integer_1 (identifier_choice) identifier_choice (call (identifier_len) identifier_len (argument_list (identifier_branches) identifier_branches )argument_list )call )comparison_operator )parenthesized_expression )not_operator (block (expression_statement (assignment (identifier_fmt) identifier_fmt (string_"Invalid choice {}, you must pick a number between {} and {}") string_"Invalid choice {}, you must pick a number between {} and {}" )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_err) identifier_err )attribute (argument_list (call (attribute (identifier_fmt) identifier_fmt (identifier_format) identifier_format )attribute (argument_list (identifier_choice) identifier_choice (integer_1) integer_1 (call (identifier_len) identifier_len (argument_list (identifier_branches) identifier_branches )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )while_statement (return_statement (subscript (identifier_branches) identifier_branches (binary_operator (identifier_choice) identifier_choice (integer_1) integer_1 )binary_operator )subscript )return_statement )block )function_definition )module
Show the user a menu to pick a branch from the existing ones. Args: exclude (list[str]): List of branch names to exclude from the menu. By default it will exclude master and develop branches. To show all branches pass an empty array here. Returns: str: The name of the branch chosen by the user. If the user inputs an invalid choice, he will be asked again (and again) until he picks a a valid branch.
(module (function_definition (function_name_shutdown) function_name_shutdown (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_status) identifier_status (call (attribute (attribute (identifier_self) identifier_self (identifier_can) identifier_can )attribute (identifier_close) identifier_close )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_status) identifier_status (identifier_CANAL_ERROR_SUCCESS) identifier_CANAL_ERROR_SUCCESS )comparison_operator (block (raise_statement (call (identifier_CanError) identifier_CanError (argument_list (call (attribute (string_"could not shut down bus: status == {}") string_"could not shut down bus: status == {}" (identifier_format) identifier_format )attribute (argument_list (identifier_status) identifier_status )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Shuts down connection to the device safely. :raise cam.CanError: is closing the connection did not work
(module (function_definition (function_name_get_response_for_url) function_name_get_response_for_url (parameters (identifier_self) identifier_self (identifier_url) identifier_url )parameters (block (if_statement (boolean_operator (not_operator (identifier_url) identifier_url )not_operator (comparison_operator (string_"//") string_"//" (identifier_url) identifier_url )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Missing or invalid url: %s") string_"Missing or invalid url: %s" (identifier_url) identifier_url )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_render_url) identifier_render_url (binary_operator (attribute (identifier_self) identifier_self (identifier_BASE_URL) identifier_BASE_URL )attribute (identifier_url) identifier_url )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_headers) identifier_headers (dictionary (pair (string_'X-Prerender-Token') string_'X-Prerender-Token' (attribute (identifier_self) identifier_self (identifier_token) identifier_token )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_render_url) identifier_render_url (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument (keyword_argument (identifier_allow_redirects) identifier_allow_redirects (False) False )keyword_argument )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (integer_500) integer_500 )comparison_operator )assert_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_build_django_response_from_requests_response) identifier_build_django_response_from_requests_response )attribute (argument_list (identifier_r) identifier_r )argument_list )call )return_statement )block )function_definition )module
Accepts a fully-qualified url. Returns an HttpResponse, passing through all headers and the status code.
(module (function_definition (function_name_set_xml_output) function_name_set_xml_output (parameters (identifier_self) identifier_self (identifier_xml_file) identifier_xml_file )parameters (block (if_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_get_database) identifier_get_database )attribute (argument_list )argument_list )call (None) None )comparison_operator (block (raise_statement (expression_list (identifier_ValueError) identifier_ValueError (string_"no database specified") string_"no database specified" )expression_list )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_file_opt) identifier_add_file_opt )attribute (argument_list (string_'extract') string_'extract' (identifier_xml_file) identifier_xml_file )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___xml_output) identifier___xml_output )attribute (identifier_xml_file) identifier_xml_file )assignment )expression_statement )block )function_definition )module
Tell ligolw_sqlite to dump the contents of the database to a file.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_model) identifier_model (call (attribute (attribute (identifier_self) identifier_self (identifier_oracle) identifier_oracle )attribute (identifier_compute) identifier_compute )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_model) identifier_model (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_htype) identifier_htype )attribute (string_'rc2') string_'rc2' )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_hset) identifier_hset )attribute (call (identifier_filter) identifier_filter (argument_list (lambda (lambda_parameters (identifier_v) identifier_v )lambda_parameters (comparison_operator (identifier_v) identifier_v (integer_0) integer_0 )comparison_operator )lambda (identifier_model) identifier_model )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_hset) identifier_hset )attribute (identifier_model) identifier_model )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_list) identifier_list (argument_list (call (identifier_map) identifier_map (argument_list (lambda (lambda_parameters (identifier_vid) identifier_vid )lambda_parameters (subscript (attribute (attribute (identifier_self) identifier_self (identifier_idpool) identifier_idpool )attribute (identifier_id2obj) identifier_id2obj )attribute (identifier_vid) identifier_vid )subscript )lambda (attribute (identifier_self) identifier_self (identifier_hset) identifier_hset )attribute )argument_list )call )argument_list )call )return_statement )block )if_statement )block )function_definition )module
This method computes and returns a hitting set. The hitting set is obtained using the underlying oracle operating the MaxSAT problem formulation. The computed solution is mapped back to objects of the problem domain. :rtype: list(obj)
(module (function_definition (function_name_applications) function_name_applications (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (string_"/applications") string_"/applications" )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"f") string_"f" (string_"json") string_"json" )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_param_dict) identifier_param_dict (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_proxy_url) identifier_proxy_url (attribute (identifier_self) identifier_self (identifier__proxy_url) identifier__proxy_url )attribute )keyword_argument (keyword_argument (identifier_proxy_port) identifier_proxy_port (attribute (identifier_self) identifier_self (identifier__proxy_port) identifier__proxy_port )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_items) identifier_items (list )list )assignment )expression_statement (if_statement (comparison_operator (string_"applications") string_"applications" (call (attribute (identifier_res) identifier_res (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (for_statement (identifier_apps) identifier_apps (subscript (identifier_res) identifier_res (string_'applications') string_'applications' )subscript (block (expression_statement (call (attribute (identifier_items) identifier_items (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_Application) identifier_Application )attribute (argument_list (keyword_argument (identifier_url) identifier_url (binary_operator (string_"%s/%s") string_"%s/%s" (tuple (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (subscript (identifier_apps) identifier_apps (string_'username') string_'username' )subscript )tuple )binary_operator )keyword_argument (keyword_argument (identifier_securityHandler) identifier_securityHandler (attribute (identifier_self) identifier_self (identifier__securityHandler) identifier__securityHandler )attribute )keyword_argument (keyword_argument (identifier_proxy_url) identifier_proxy_url (attribute (identifier_self) identifier_self (identifier__proxy_url) identifier__proxy_url )attribute )keyword_argument (keyword_argument (identifier_proxy_port) identifier_proxy_port (attribute (identifier_self) identifier_self (identifier__proxy_port) identifier__proxy_port )attribute )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_items) identifier_items )return_statement )block )function_definition )module
returns all the group applications to join
(module (function_definition (function_name_pad_vocabulary) function_name_pad_vocabulary (parameters (identifier_self) identifier_self (identifier_vocab) identifier_vocab (identifier_pad) identifier_pad )parameters (block (expression_statement (assignment (identifier_vocab_size) identifier_vocab_size (call (identifier_len) identifier_len (argument_list (identifier_vocab) identifier_vocab )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_padded_vocab_size) identifier_padded_vocab_size (binary_operator (binary_operator (parenthesized_expression (binary_operator (binary_operator (identifier_vocab_size) identifier_vocab_size (identifier_pad) identifier_pad )binary_operator (integer_1) integer_1 )binary_operator )parenthesized_expression (identifier_pad) identifier_pad )binary_operator (identifier_pad) identifier_pad )binary_operator )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (binary_operator (identifier_padded_vocab_size) identifier_padded_vocab_size (identifier_vocab_size) identifier_vocab_size )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_token) identifier_token (string_f'madeupword{i:04d}') string_f'madeupword{i:04d}' )assignment )expression_statement (expression_statement (call (attribute (identifier_vocab) identifier_vocab (identifier_append) identifier_append )attribute (argument_list (identifier_token) identifier_token )argument_list )call )expression_statement )block )for_statement (assert_statement (comparison_operator (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_vocab) identifier_vocab )argument_list )call (identifier_pad) identifier_pad )binary_operator (integer_0) integer_0 )comparison_operator )assert_statement )block )function_definition )module
Pads vocabulary to a multiple of 'pad' tokens. :param vocab: list with vocabulary :param pad: integer
(module (function_definition (function_name_get_cert_builder) function_name_get_cert_builder (parameters (identifier_expires) identifier_expires )parameters (block (expression_statement (assignment (identifier_now) identifier_now (call (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (keyword_argument (identifier_second) identifier_second (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_microsecond) identifier_microsecond (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_expires) identifier_expires (None) None )comparison_operator (block (expression_statement (assignment (identifier_expires) identifier_expires (call (identifier_get_expires) identifier_get_expires (argument_list (identifier_expires) identifier_expires (keyword_argument (identifier_now) identifier_now (identifier_now) identifier_now )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_expires) identifier_expires (call (attribute (identifier_expires) identifier_expires (identifier_replace) identifier_replace )attribute (argument_list (keyword_argument (identifier_second) identifier_second (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_microsecond) identifier_microsecond (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_builder) identifier_builder (call (attribute (identifier_x509) identifier_x509 (identifier_CertificateBuilder) identifier_CertificateBuilder )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_builder) identifier_builder (call (attribute (identifier_builder) identifier_builder (identifier_not_valid_before) identifier_not_valid_before )attribute (argument_list (identifier_now) identifier_now )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_builder) identifier_builder (call (attribute (identifier_builder) identifier_builder (identifier_not_valid_after) identifier_not_valid_after )attribute (argument_list (identifier_expires) identifier_expires )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_builder) identifier_builder (call (attribute (identifier_builder) identifier_builder (identifier_serial_number) identifier_serial_number )attribute (argument_list (call (attribute (identifier_x509) identifier_x509 (identifier_random_serial_number) identifier_random_serial_number )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_builder) identifier_builder )return_statement )block )function_definition )module
Get a basic X509 cert builder object. Parameters ---------- expires : datetime When this certificate will expire.
(module (function_definition (function_name_get_root_outcome_group) function_name_get_root_outcome_group (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_canvasapi) identifier_canvasapi (identifier_outcome) identifier_outcome )dotted_name (dotted_name (identifier_OutcomeGroup) identifier_OutcomeGroup )dotted_name )import_from_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier___requester) identifier___requester )attribute (identifier_request) identifier_request )attribute (argument_list (string_'GET') string_'GET' (string_'global/root_outcome_group') string_'global/root_outcome_group' )argument_list )call )assignment )expression_statement (return_statement (call (identifier_OutcomeGroup) identifier_OutcomeGroup (argument_list (attribute (identifier_self) identifier_self (identifier___requester) identifier___requester )attribute (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Redirect to root outcome group for context :calls: `GET /api/v1/global/root_outcome_group \ <https://canvas.instructure.com/doc/api/outcome_groups.html#method.outcome_groups_api.redirect>`_ :returns: The OutcomeGroup of the context. :rtype: :class:`canvasapi.outcome.OutcomeGroup`
(module (function_definition (function_name_process_tag) function_name_process_tag (parameters (identifier_node) identifier_node )parameters (block (expression_statement (assignment (identifier_text) identifier_text (string_'') string_'' )assignment )expression_statement (expression_statement (assignment (identifier_exceptions) identifier_exceptions (list (string_'table') string_'table' )list )assignment )expression_statement (for_statement (identifier_element) identifier_element (attribute (identifier_node) identifier_node (identifier_children) identifier_children )attribute (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_element) identifier_element (identifier_NavigableString) identifier_NavigableString )argument_list )call (block (expression_statement (augmented_assignment (identifier_text) identifier_text (identifier_element) identifier_element )augmented_assignment )expression_statement )block (elif_clause (not_operator (comparison_operator (attribute (identifier_node) identifier_node (identifier_name) identifier_name )attribute (identifier_exceptions) identifier_exceptions )comparison_operator )not_operator (block (expression_statement (augmented_assignment (identifier_text) identifier_text (call (identifier_process_tag) identifier_process_tag (argument_list (identifier_element) identifier_element )argument_list )call )augmented_assignment )expression_statement )block )elif_clause )if_statement )block )for_statement (try_statement (block (expression_statement (assignment (identifier_convert_fn) identifier_convert_fn (subscript (call (identifier_globals) identifier_globals (argument_list )argument_list )call (binary_operator (string_"convert_%s") string_"convert_%s" (call (attribute (attribute (identifier_node) identifier_node (identifier_name) identifier_name )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )binary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (identifier_convert_fn) identifier_convert_fn (argument_list (identifier_node) identifier_node (identifier_text) identifier_text )argument_list )call )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (identifier_text) identifier_text )return_statement )block )function_definition )module
Recursively go through a tag's children, converting them, then convert the tag itself.
(module (function_definition (function_name_webcam_attach) function_name_webcam_attach (parameters (identifier_self) identifier_self (identifier_path) identifier_path (identifier_settings) identifier_settings )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_path) identifier_path (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"path can only be an instance of type basestring") string_"path can only be an instance of type basestring" )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_settings) identifier_settings (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"settings can only be an instance of type basestring") string_"settings can only be an instance of type basestring" )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__call) identifier__call )attribute (argument_list (string_"webcamAttach") string_"webcamAttach" (keyword_argument (identifier_in_p) identifier_in_p (list (identifier_path) identifier_path (identifier_settings) identifier_settings )list )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Attaches the emulated USB webcam to the VM, which will use a host video capture device. in path of type str The host path of the capture device to use. in settings of type str Optional settings.
(module (function_definition (function_name__uniq) function_name__uniq (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_pd) identifier_pd (list )list )assignment )expression_statement (for_statement (identifier_d) identifier_d (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (attribute (identifier_self) identifier_self (identifier_maxdepth) identifier_maxdepth )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_pd) identifier_pd (identifier_extend) identifier_extend )attribute (argument_list (call (identifier_map) identifier_map (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (call (identifier_int) identifier_int (argument_list (binary_operator (binary_operator (integer_4) integer_4 (parenthesized_expression (binary_operator (identifier_d) identifier_d (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator (identifier_x) identifier_x )binary_operator )argument_list )call )lambda (subscript (attribute (identifier_self) identifier_self (identifier_pixeldict) identifier_pixeldict )attribute (identifier_d) identifier_d )subscript )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_sorted) identifier_sorted (argument_list (identifier_pd) identifier_pd )argument_list )call )return_statement )block )function_definition )module
Create a list of all the pixels that cover this region. This list contains overlapping pixels of different orders. Returns ------- pix : list A list of HEALPix pixel numbers.
(module (function_definition (function_name_preview) function_name_preview (parameters (identifier_self) identifier_self (identifier_argv) identifier_argv )parameters (block (expression_statement (assignment (identifier_opts) identifier_opts (call (identifier_cmdline) identifier_cmdline (argument_list (identifier_argv) identifier_argv (identifier_FLAGS_RESULTS) identifier_FLAGS_RESULTS )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_foreach) identifier_foreach )attribute (argument_list (attribute (identifier_opts) identifier_opts (identifier_args) identifier_args )attribute (lambda (lambda_parameters (identifier_job) identifier_job )lambda_parameters (call (identifier_output) identifier_output (argument_list (call (attribute (identifier_job) identifier_job (identifier_preview) identifier_preview )attribute (argument_list (dictionary_splat (attribute (identifier_opts) identifier_opts (identifier_kwargs) identifier_kwargs )attribute )dictionary_splat )argument_list )call )argument_list )call )lambda )argument_list )call )expression_statement )block )function_definition )module
Retrieve the preview for the specified search jobs.
(module (function_definition (function_name_get_database_columns) function_name_get_database_columns (parameters (identifier_self) identifier_self (default_parameter (identifier_tables) identifier_tables (None) None )default_parameter (default_parameter (identifier_database) identifier_database (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_source) identifier_source (conditional_expression (identifier_database) identifier_database (identifier_database) identifier_database (attribute (identifier_self) identifier_self (identifier_database) identifier_database )attribute )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_tables) identifier_tables (conditional_expression (identifier_tables) identifier_tables (identifier_tables) identifier_tables (attribute (identifier_self) identifier_self (identifier_tables) identifier_tables )attribute )conditional_expression )assignment )expression_statement (return_statement (dictionary_comprehension (pair (identifier_tbl) identifier_tbl (call (attribute (identifier_self) identifier_self (identifier_get_columns) identifier_get_columns )attribute (argument_list (identifier_tbl) identifier_tbl )argument_list )call )pair (for_in_clause (identifier_tbl) identifier_tbl (call (identifier_tqdm) identifier_tqdm (argument_list (identifier_tables) identifier_tables (keyword_argument (identifier_total) identifier_total (call (identifier_len) identifier_len (argument_list (identifier_tables) identifier_tables )argument_list )call )keyword_argument (keyword_argument (identifier_desc) identifier_desc (call (attribute (string_'Getting {0} columns') string_'Getting {0} columns' (identifier_format) identifier_format )attribute (argument_list (identifier_source) identifier_source )argument_list )call )keyword_argument )argument_list )call )for_in_clause )dictionary_comprehension )return_statement )block )function_definition )module
Retrieve a dictionary of columns.
(module (function_definition (function_name_get_cluster_view) function_name_get_cluster_view (parameters (identifier_p) identifier_p )parameters (block (import_from_statement (dotted_name (identifier_cluster_helper) identifier_cluster_helper )dotted_name (aliased_import (dotted_name (identifier_cluster) identifier_cluster )dotted_name (identifier_ipc) identifier_ipc )aliased_import )import_from_statement (return_statement (call (attribute (identifier_ipc) identifier_ipc (identifier_cluster_view) identifier_cluster_view )attribute (argument_list (subscript (identifier_p) identifier_p (string_'scheduler') string_'scheduler' )subscript (subscript (identifier_p) identifier_p (string_'queue') string_'queue' )subscript (subscript (identifier_p) identifier_p (string_'num_jobs') string_'num_jobs' )subscript (subscript (identifier_p) identifier_p (string_'cores_per_job') string_'cores_per_job' )subscript (keyword_argument (identifier_start_wait) identifier_start_wait (subscript (identifier_p) identifier_p (string_'timeout') string_'timeout' )subscript )keyword_argument (keyword_argument (identifier_extra_params) identifier_extra_params (dictionary (pair (string_"resources") string_"resources" (subscript (identifier_p) identifier_p (string_'resources') string_'resources' )subscript )pair (pair (string_"mem") string_"mem" (subscript (identifier_p) identifier_p (string_'mem') string_'mem' )subscript )pair (pair (string_"tag") string_"tag" (subscript (identifier_p) identifier_p (string_'tag') string_'tag' )subscript )pair (pair (string_"run_local") string_"run_local" (False) False )pair )dictionary )keyword_argument )argument_list )call )return_statement )block )function_definition )module
get ipython running
(module (function_definition (function_name__check_and_uninstall_ruby) function_name__check_and_uninstall_ruby (parameters (identifier_ret) identifier_ret (identifier_ruby) identifier_ruby (default_parameter (identifier_user) identifier_user (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier__ruby_installed) identifier__ruby_installed (argument_list (identifier_ret) identifier_ret (identifier_ruby) identifier_ruby (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (block (if_statement (subscript (identifier_ret) identifier_ret (string_'default') string_'default' )subscript (block (expression_statement (call (subscript (identifier___salt__) identifier___salt__ (string_'rbenv.default') string_'rbenv.default' )subscript (argument_list (string_'system') string_'system' (keyword_argument (identifier_runas) identifier_runas (identifier_user) identifier_user )keyword_argument )argument_list )call )expression_statement )block )if_statement (if_statement (call (subscript (identifier___salt__) identifier___salt__ (string_'rbenv.uninstall_ruby') string_'rbenv.uninstall_ruby' )subscript (argument_list (identifier_ruby) identifier_ruby (keyword_argument (identifier_runas) identifier_runas (identifier_user) identifier_user )keyword_argument )argument_list )call (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (True) True )assignment )expression_statement (expression_statement (assignment (subscript (subscript (identifier_ret) identifier_ret (string_'changes') string_'changes' )subscript (identifier_ruby) identifier_ruby )subscript (string_'Uninstalled') string_'Uninstalled' )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (string_'Successfully removed ruby') string_'Successfully removed ruby' )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (False) False )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (string_'Failed to uninstall ruby') string_'Failed to uninstall ruby' )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (True) True )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (call (attribute (string_'Ruby {0} is already absent') string_'Ruby {0} is already absent' (identifier_format) identifier_format )attribute (argument_list (identifier_ruby) identifier_ruby )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Verify that ruby is uninstalled
(module (function_definition (function_name_lower_bollinger_band) function_name_lower_bollinger_band (parameters (identifier_data) identifier_data (identifier_period) identifier_period (default_parameter (identifier_std) identifier_std (float_2.0) float_2.0 )default_parameter )parameters (block (expression_statement (call (attribute (identifier_catch_errors) identifier_catch_errors (identifier_check_for_period_error) identifier_check_for_period_error )attribute (argument_list (identifier_data) identifier_data (identifier_period) identifier_period )argument_list )call )expression_statement (expression_statement (assignment (identifier_period) identifier_period (call (identifier_int) identifier_int (argument_list (identifier_period) identifier_period )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_simple_ma) identifier_simple_ma (subscript (call (identifier_sma) identifier_sma (argument_list (identifier_data) identifier_data (identifier_period) identifier_period )argument_list )call (slice (binary_operator (identifier_period) identifier_period (integer_1) integer_1 )binary_operator (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_lower_bb) identifier_lower_bb (list )list )assignment )expression_statement (for_statement (identifier_idx) identifier_idx (call (identifier_range) identifier_range (argument_list (binary_operator (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call (identifier_period) identifier_period )binary_operator (integer_1) integer_1 )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_std_dev) identifier_std_dev (call (attribute (identifier_np) identifier_np (identifier_std) identifier_std )attribute (argument_list (subscript (identifier_data) identifier_data (slice (identifier_idx) identifier_idx (colon) colon (binary_operator (identifier_idx) identifier_idx (identifier_period) identifier_period )binary_operator )slice )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_lower_bb) identifier_lower_bb (identifier_append) identifier_append )attribute (argument_list (binary_operator (subscript (identifier_simple_ma) identifier_simple_ma (identifier_idx) identifier_idx )subscript (binary_operator (identifier_std_dev) identifier_std_dev (identifier_std) identifier_std )binary_operator )binary_operator )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_lower_bb) identifier_lower_bb (call (identifier_fill_for_noncomputable_vals) identifier_fill_for_noncomputable_vals (argument_list (identifier_data) identifier_data (identifier_lower_bb) identifier_lower_bb )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_lower_bb) identifier_lower_bb )argument_list )call )return_statement )block )function_definition )module
Lower Bollinger Band. Formula: u_bb = SMA(t) - STD(SMA(t-n:t)) * std_mult
(module (function_definition (function_name_fetch_cache_key) function_name_fetch_cache_key (parameters (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_hashlib) identifier_hashlib (identifier_md5) identifier_md5 )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_m) identifier_m (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_request) identifier_request (identifier_body) identifier_body )attribute )argument_list )call )expression_statement (return_statement (call (attribute (identifier_m) identifier_m (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Returns a hashed cache key.
(module (function_definition (function_name_compare_files) function_name_compare_files (parameters (identifier_path1) identifier_path1 (identifier_path2) identifier_path2 )parameters (block (expression_statement (assignment (identifier_diff) identifier_diff (call (attribute (identifier_difflib) identifier_difflib (identifier_ndiff) identifier_ndiff )attribute (argument_list (call (attribute (call (identifier_open) identifier_open (argument_list (identifier_path1) identifier_path1 )argument_list )call (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call (call (attribute (call (identifier_open) identifier_open (argument_list (identifier_path2) identifier_path2 )argument_list )call (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (identifier_diff) identifier_diff )for_in_clause (if_clause (comparison_operator (subscript (identifier_x) identifier_x (integer_0) integer_0 )subscript (list (string_'-') string_'-' (string_'+') string_'+' (string_'?') string_'?' )list )comparison_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
Returns the delta between two files using -, ?, + format excluding lines that are the same Args: path1 (str): Path to first file path2 (str): Path to second file Returns: List[str]: Delta between the two files
(module (function_definition (function_name__do_private_mode) function_name__do_private_mode (parameters (identifier_FetcherClass) identifier_FetcherClass (identifier_services) identifier_services (identifier_kwargs) identifier_kwargs (identifier_random_wait_seconds) identifier_random_wait_seconds (identifier_timeout) identifier_timeout (identifier_verbose) identifier_verbose )parameters (block (expression_statement (assignment (identifier_addresses) identifier_addresses (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'addresses') string_'addresses' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (dictionary )dictionary )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_futures) identifier_futures (identifier_ThreadPoolExecutor) identifier_ThreadPoolExecutor )attribute (argument_list (keyword_argument (identifier_max_workers) identifier_max_workers (call (identifier_len) identifier_len (argument_list (identifier_addresses) identifier_addresses )argument_list )call )keyword_argument )argument_list )call (as_pattern_target (identifier_executor) identifier_executor )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_fetches) identifier_fetches (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_address) identifier_address (identifier_addresses) identifier_addresses (block (expression_statement (assignment (identifier_k) identifier_k (identifier_kwargs) identifier_kwargs )assignment )expression_statement (expression_statement (assignment (subscript (identifier_k) identifier_k (string_'address') string_'address' )subscript (identifier_address) identifier_address )assignment )expression_statement (expression_statement (call (attribute (identifier_random) identifier_random (identifier_shuffle) identifier_shuffle )attribute (argument_list (identifier_services) identifier_services )argument_list )call )expression_statement (expression_statement (assignment (identifier_srv) identifier_srv (call (identifier_FetcherClass) identifier_FetcherClass (argument_list (keyword_argument (identifier_services) identifier_services (identifier_services) identifier_services )keyword_argument (keyword_argument (identifier_verbose) identifier_verbose (identifier_verbose) identifier_verbose )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (boolean_operator (identifier_timeout) identifier_timeout (float_5.0) float_5.0 )boolean_operator )keyword_argument (keyword_argument (identifier_random_wait_seconds) identifier_random_wait_seconds (identifier_random_wait_seconds) identifier_random_wait_seconds )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_fetches) identifier_fetches (call (attribute (identifier_executor) identifier_executor (identifier_submit) identifier_submit )attribute (argument_list (attribute (identifier_srv) identifier_srv (identifier_action) identifier_action )attribute (dictionary_splat (identifier_k) identifier_k )dictionary_splat )argument_list )call )subscript (tuple (identifier_srv) identifier_srv (identifier_address) identifier_address )tuple )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_to_iterate) identifier_to_iterate (call (attribute (identifier_futures) identifier_futures (identifier_as_completed) identifier_as_completed )attribute (argument_list (identifier_fetches) identifier_fetches )argument_list )call )assignment )expression_statement (for_statement (identifier_future) identifier_future (identifier_to_iterate) identifier_to_iterate (block (expression_statement (assignment (pattern_list (identifier_service) identifier_service (identifier_address) identifier_address )pattern_list (subscript (identifier_fetches) identifier_fetches (identifier_future) identifier_future )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_results) identifier_results (identifier_address) identifier_address )subscript (call (attribute (identifier_future) identifier_future (identifier_result) identifier_result )attribute (argument_list )argument_list )call )assignment )expression_statement )block )for_statement )block )with_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Private mode is only applicable to address_balance, unspent_outputs, and historical_transactions. There will always be a list for the `addresses` argument. Each address goes to a random service. Also a random delay is performed before the external fetch for improved privacy.
(module (function_definition (function_name_calculate_hash_of_dir) function_name_calculate_hash_of_dir (parameters (identifier_directory) identifier_directory (default_parameter (identifier_file_list) identifier_file_list (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_md5_hash) identifier_md5_hash (call (identifier_md5) identifier_md5 (argument_list )argument_list )call )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_directory) identifier_directory )argument_list )call )not_operator (block (return_statement (unary_operator (integer_1) integer_1 )unary_operator )return_statement )block )if_statement (try_statement (block (for_statement (pattern_list (identifier_subdir) identifier_subdir (identifier_dirs) identifier_dirs (identifier_files) identifier_files )pattern_list (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call (block (for_statement (identifier__file) identifier__file (identifier_files) identifier_files (block (expression_statement (assignment (identifier_file_path) identifier_file_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_subdir) identifier_subdir (identifier__file) identifier__file )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_file_list) identifier_file_list (None) None )comparison_operator (comparison_operator (identifier_file_path) identifier_file_path (identifier_file_list) identifier_file_list )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier__file_object) identifier__file_object (call (identifier_open) identifier_open (argument_list (identifier_file_path) identifier_file_path (string_'rb') string_'rb' )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (identifier__file_object) identifier__file_object (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (unary_operator (integer_1) integer_1 )unary_operator )return_statement )block )except_clause )try_statement (while_statement (integer_1) integer_1 (block (expression_statement (assignment (identifier_buf) identifier_buf (call (attribute (identifier__file_object) identifier__file_object (identifier_read) identifier_read )attribute (argument_list (integer_4096) integer_4096 )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_buf) identifier_buf )not_operator (block (break_statement )break_statement )block )if_statement (expression_statement (call (attribute (identifier_md5_hash) identifier_md5_hash (identifier_update) identifier_update )attribute (argument_list (call (attribute (call (attribute (call (identifier_md5) identifier_md5 (argument_list (identifier_buf) identifier_buf )argument_list )call (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )while_statement (expression_statement (call (attribute (identifier__file_object) identifier__file_object (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )for_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (unary_operator (integer_1) integer_1 )unary_operator )return_statement )block )except_clause )try_statement (return_statement (call (attribute (identifier_md5_hash) identifier_md5_hash (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Calculate hash of directory.
(module (function_definition (function_name_pool) function_name_pool (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__pool) identifier__pool )attribute (boolean_operator (attribute (identifier_self) identifier_self (identifier__pool) identifier__pool )attribute (call (attribute (attribute (identifier_gevent) identifier_gevent (identifier_pool) identifier_pool )attribute (identifier_Pool) identifier_Pool )attribute (argument_list (keyword_argument (identifier_size) identifier_size (attribute (identifier_self) identifier_self (identifier_pool_size) identifier_pool_size )attribute )keyword_argument )argument_list )call )boolean_operator )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__pool) identifier__pool )attribute )return_statement )block )function_definition )module
Get an gevent pool used to dispatch requests.
(module (function_definition (function_name__set_survey_scenario) function_name__set_survey_scenario (parameters (identifier_self) identifier_self (identifier_survey_scenario) identifier_survey_scenario )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_survey_scenario) identifier_survey_scenario )attribute (identifier_survey_scenario) identifier_survey_scenario )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_survey_scenario) identifier_survey_scenario (identifier_simulation) identifier_simulation )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_survey_scenario) identifier_survey_scenario (identifier_simulation) identifier_simulation )attribute (call (attribute (identifier_survey_scenario) identifier_survey_scenario (identifier_new_simulation) identifier_new_simulation )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_period) identifier_period (attribute (identifier_self) identifier_self (identifier_period) identifier_period )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_filter_by) identifier_filter_by )attribute (assignment (identifier_filter_by) identifier_filter_by (call (attribute (identifier_survey_scenario) identifier_survey_scenario (identifier_calculate_variable) identifier_calculate_variable )attribute (argument_list (keyword_argument (identifier_variable) identifier_variable (attribute (identifier_self) identifier_self (identifier_filter_by_name) identifier_filter_by_name )attribute )keyword_argument (keyword_argument (identifier_period) identifier_period (identifier_period) identifier_period )keyword_argument )argument_list )call )assignment )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_weight_name) identifier_weight_name )attribute (assignment (identifier_weight_name) identifier_weight_name (subscript (attribute (attribute (identifier_self) identifier_self (identifier_survey_scenario) identifier_survey_scenario )attribute (identifier_weight_column_name_by_entity) identifier_weight_column_name_by_entity )attribute (string_'menage') string_'menage' )subscript )assignment )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_initial_weight_name) identifier_initial_weight_name )attribute (binary_operator (identifier_weight_name) identifier_weight_name (string_"_ini") string_"_ini" )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_initial_weight) identifier_initial_weight )attribute (assignment (identifier_initial_weight) identifier_initial_weight (call (attribute (identifier_survey_scenario) identifier_survey_scenario (identifier_calculate_variable) identifier_calculate_variable )attribute (argument_list (keyword_argument (identifier_variable) identifier_variable (identifier_weight_name) identifier_weight_name )keyword_argument (keyword_argument (identifier_period) identifier_period (identifier_period) identifier_period )keyword_argument )argument_list )call )assignment )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_initial_total_population) identifier_initial_total_population )attribute (call (identifier_sum) identifier_sum (argument_list (binary_operator (identifier_initial_weight) identifier_initial_weight (identifier_filter_by) identifier_filter_by )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_weight) identifier_weight )attribute (call (attribute (identifier_survey_scenario) identifier_survey_scenario (identifier_calculate_variable) identifier_calculate_variable )attribute (argument_list (keyword_argument (identifier_variable) identifier_variable (identifier_weight_name) identifier_weight_name )keyword_argument (keyword_argument (identifier_period) identifier_period (identifier_period) identifier_period )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
Set survey scenario :param survey_scenario: the survey scenario
(module (function_definition (function_name_chord_counts) function_name_chord_counts (parameters (identifier_im) identifier_im )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (pattern_list (identifier_labels) identifier_labels (identifier_N) identifier_N )pattern_list (call (attribute (identifier_spim) identifier_spim (identifier_label) identifier_label )attribute (argument_list (comparison_operator (identifier_im) identifier_im (integer_0) integer_0 )comparison_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_props) identifier_props (call (identifier_regionprops) identifier_regionprops (argument_list (identifier_labels) identifier_labels (keyword_argument (identifier_coordinates) identifier_coordinates (string_'xy') string_'xy' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_chord_lens) identifier_chord_lens (call (attribute (identifier_sp) identifier_sp (identifier_array) identifier_array )attribute (argument_list (list_comprehension (attribute (identifier_i) identifier_i (identifier_filled_area) identifier_filled_area )attribute (for_in_clause (identifier_i) identifier_i (identifier_props) identifier_props )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (return_statement (identifier_chord_lens) identifier_chord_lens )return_statement )block )function_definition )module
r""" Finds the length of each chord in the supplied image and returns a list of their individual sizes Parameters ---------- im : ND-array An image containing chords drawn in the void space. Returns ------- result : 1D-array A 1D array with one element for each chord, containing its length. Notes ---- The returned array can be passed to ``plt.hist`` to plot the histogram, or to ``sp.histogram`` to get the histogram data directly. Another useful function is ``sp.bincount`` which gives the number of chords of each length in a format suitable for ``plt.plot``.
(module (function_definition (function_name_cycle_find_app) function_name_cycle_find_app (parameters (identifier__parser) identifier__parser (identifier_cmd) identifier_cmd (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_parser) identifier_parser (call (attribute (identifier_argparse) identifier_argparse (identifier_ArgumentParser) identifier_ArgumentParser )attribute (argument_list (keyword_argument (identifier_prog) identifier_prog (attribute (identifier__parser) identifier__parser (identifier_prog) identifier_prog )attribute )keyword_argument (keyword_argument (identifier_description) identifier_description (attribute (identifier__parser) identifier__parser (identifier_description) identifier_description )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_'-w') string_'-w' (string_'--width') string_'--width' (keyword_argument (identifier_type) identifier_type (identifier_int) identifier_int )keyword_argument (keyword_argument (identifier_default) identifier_default (integer_4) integer_4 )keyword_argument (keyword_argument (identifier_help) identifier_help (string_'the length of the cycled value') string_'the length of the cycled value' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_'value') string_'value' (keyword_argument (identifier_help) identifier_help (string_'the value to determine the position of, read from stdin if missing') string_'the value to determine the position of, read from stdin if missing' )keyword_argument (keyword_argument (identifier_nargs) identifier_nargs (string_'?') string_'?' )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_args) identifier_args (call (attribute (identifier_parser) identifier_parser (identifier_parse_args) identifier_parse_args )attribute (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_index) identifier_index (call (identifier_cycle_find) identifier_cycle_find (argument_list (call (attribute (attribute (identifier_pwnypack) identifier_pwnypack (identifier_main) identifier_main )attribute (identifier_string_value_or_stdin) identifier_string_value_or_stdin )attribute (argument_list (attribute (identifier_args) identifier_args (identifier_value) identifier_value )attribute )argument_list )call (attribute (identifier_args) identifier_args (identifier_width) identifier_width )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_index) identifier_index (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Not found.') string_'Not found.' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'Found at position: %d') string_'Found at position: %d' (identifier_index) identifier_index )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Find the first position of a value in a de Bruijn sequence.
(module (function_definition (function_name__OpenCollectionPath) function_name__OpenCollectionPath (parameters (identifier_coll_path) identifier_coll_path )parameters (block (expression_statement (assignment (identifier_hunt_collection) identifier_hunt_collection (call (attribute (identifier_results) identifier_results (identifier_HuntResultCollection) identifier_HuntResultCollection )attribute (argument_list (identifier_coll_path) identifier_coll_path )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_hunt_collection) identifier_hunt_collection (attribute (subscript (identifier_hunt_collection) identifier_hunt_collection (integer_0) integer_0 )subscript (identifier_payload) identifier_payload )attribute )boolean_operator (block (return_statement (identifier_hunt_collection) identifier_hunt_collection )return_statement )block )if_statement (expression_statement (assignment (identifier_indexed_collection) identifier_indexed_collection (call (attribute (identifier_sequential_collection) identifier_sequential_collection (identifier_GeneralIndexedCollection) identifier_GeneralIndexedCollection )attribute (argument_list (identifier_coll_path) identifier_coll_path )argument_list )call )assignment )expression_statement (if_statement (identifier_indexed_collection) identifier_indexed_collection (block (return_statement (identifier_indexed_collection) identifier_indexed_collection )return_statement )block )if_statement )block )function_definition )module
Tries to open various types of collections at the given path.
(module (function_definition (function_name_interface_to_relations) function_name_interface_to_relations (parameters (identifier_interface_name) identifier_interface_name )parameters (block (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (for_statement (identifier_role) identifier_role (tuple (string_'provides') string_'provides' (string_'requires') string_'requires' (string_'peers') string_'peers' )tuple (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_extend) identifier_extend )attribute (argument_list (call (identifier_role_and_interface_to_relations) identifier_role_and_interface_to_relations (argument_list (identifier_role) identifier_role (identifier_interface_name) identifier_interface_name )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Given an interface, return a list of relation names for the current charm that use that interface. :returns: A list of relation names.
(module (function_definition (function_name_make_quantile_df) function_name_make_quantile_df (parameters (identifier_data) identifier_data (identifier_draw_quantiles) identifier_draw_quantiles )parameters (block (expression_statement (assignment (identifier_dens) identifier_dens (binary_operator (call (attribute (subscript (identifier_data) identifier_data (string_'density') string_'density' )subscript (identifier_cumsum) identifier_cumsum )attribute (argument_list )argument_list )call (call (attribute (subscript (identifier_data) identifier_data (string_'density') string_'density' )subscript (identifier_sum) identifier_sum )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_ecdf) identifier_ecdf (call (identifier_interp1d) identifier_interp1d (argument_list (identifier_dens) identifier_dens (subscript (identifier_data) identifier_data (string_'y') string_'y' )subscript (keyword_argument (identifier_assume_sorted) identifier_assume_sorted (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ys) identifier_ys (call (identifier_ecdf) identifier_ecdf (argument_list (identifier_draw_quantiles) identifier_draw_quantiles )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_violin_xminvs) identifier_violin_xminvs (call (call (identifier_interp1d) identifier_interp1d (argument_list (subscript (identifier_data) identifier_data (string_'y') string_'y' )subscript (subscript (identifier_data) identifier_data (string_'xminv') string_'xminv' )subscript )argument_list )call (argument_list (identifier_ys) identifier_ys )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_violin_xmaxvs) identifier_violin_xmaxvs (call (call (identifier_interp1d) identifier_interp1d (argument_list (subscript (identifier_data) identifier_data (string_'y') string_'y' )subscript (subscript (identifier_data) identifier_data (string_'xmaxv') string_'xmaxv' )subscript )argument_list )call (argument_list (identifier_ys) identifier_ys )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_pd) identifier_pd (identifier_DataFrame) identifier_DataFrame )attribute (argument_list (dictionary (pair (string_'x') string_'x' (call (identifier_interleave) identifier_interleave (argument_list (identifier_violin_xminvs) identifier_violin_xminvs (identifier_violin_xmaxvs) identifier_violin_xmaxvs )argument_list )call )pair (pair (string_'y') string_'y' (call (attribute (identifier_np) identifier_np (identifier_repeat) identifier_repeat )attribute (argument_list (identifier_ys) identifier_ys (integer_2) integer_2 )argument_list )call )pair (pair (string_'group') string_'group' (call (attribute (identifier_np) identifier_np (identifier_repeat) identifier_repeat )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_arange) identifier_arange )attribute (argument_list (integer_1) integer_1 (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_ys) identifier_ys )argument_list )call (integer_1) integer_1 )binary_operator )argument_list )call (integer_2) integer_2 )argument_list )call )pair )dictionary )argument_list )call )assignment )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Return a dataframe with info needed to draw quantile segments
(module (function_definition (function_name_construct_blastall_cmdline) function_name_construct_blastall_cmdline (parameters (identifier_fname1) identifier_fname1 (identifier_fname2) identifier_fname2 (identifier_outdir) identifier_outdir (default_parameter (identifier_blastall_exe) identifier_blastall_exe (attribute (identifier_pyani_config) identifier_pyani_config (identifier_BLASTALL_DEFAULT) identifier_BLASTALL_DEFAULT )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_fstem1) identifier_fstem1 (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_fname1) identifier_fname1 )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_fstem2) identifier_fstem2 (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_fname2) identifier_fname2 )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_fstem1) identifier_fstem1 (call (attribute (identifier_fstem1) identifier_fstem1 (identifier_replace) identifier_replace )attribute (argument_list (string_"-fragments") string_"-fragments" (string_"") string_"" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_prefix) identifier_prefix (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_outdir) identifier_outdir (binary_operator (string_"%s_vs_%s") string_"%s_vs_%s" (tuple (identifier_fstem1) identifier_fstem1 (identifier_fstem2) identifier_fstem2 )tuple )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (parenthesized_expression (binary_operator (binary_operator (string_"{0} -p blastn -o {1}.blast_tab -i {2} -d {3} ") string_"{0} -p blastn -o {1}.blast_tab -i {2} -d {3} " (string_"-X 150 -q -1 -F F -e 1e-15 ") string_"-X 150 -q -1 -F F -e 1e-15 " )binary_operator (string_"-b 1 -v 1 -m 8") string_"-b 1 -v 1 -m 8" )binary_operator )parenthesized_expression )assignment )expression_statement (return_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_format) identifier_format )attribute (argument_list (identifier_blastall_exe) identifier_blastall_exe (identifier_prefix) identifier_prefix (identifier_fname1) identifier_fname1 (identifier_fname2) identifier_fname2 )argument_list )call )return_statement )block )function_definition )module
Returns a single blastall command. - blastall_exe - path to BLASTALL executable
(module (function_definition (function_name_shot_start_data) function_name_shot_start_data (parameters (identifier_shot) identifier_shot (identifier_role) identifier_role )parameters (block (if_statement (comparison_operator (identifier_role) identifier_role (attribute (attribute (identifier_QtCore) identifier_QtCore (identifier_Qt) identifier_Qt )attribute (identifier_DisplayRole) identifier_DisplayRole )attribute )comparison_operator (block (return_statement (call (identifier_str) identifier_str (argument_list (attribute (identifier_shot) identifier_shot (identifier_startframe) identifier_startframe )attribute )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Return the data for startframe :param shot: the shot that holds the data :type shot: :class:`jukeboxcore.djadapter.models.Shot` :param role: item data role :type role: QtCore.Qt.ItemDataRole :returns: data for the start :rtype: depending on role :raises: None
(module (function_definition (function_name_emit_toi_stats) function_name_emit_toi_stats (parameters (identifier_toi_set) identifier_toi_set (identifier_peripherals) identifier_peripherals )parameters (block (expression_statement (assignment (identifier_count_by_zoom) identifier_count_by_zoom (call (identifier_defaultdict) identifier_defaultdict (argument_list (identifier_int) identifier_int )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_total) identifier_total (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_coord_int) identifier_coord_int (identifier_toi_set) identifier_toi_set (block (expression_statement (assignment (identifier_coord) identifier_coord (call (identifier_coord_unmarshall_int) identifier_coord_unmarshall_int (argument_list (identifier_coord_int) identifier_coord_int )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (subscript (identifier_count_by_zoom) identifier_count_by_zoom (attribute (identifier_coord) identifier_coord (identifier_zoom) identifier_zoom )attribute )subscript (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_total) identifier_total (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_peripherals) identifier_peripherals (identifier_stats) identifier_stats )attribute (identifier_gauge) identifier_gauge )attribute (argument_list (string_'tiles-of-interest.count') string_'tiles-of-interest.count' (identifier_total) identifier_total )argument_list )call )expression_statement (for_statement (pattern_list (identifier_zoom) identifier_zoom (identifier_count) identifier_count )pattern_list (call (attribute (identifier_count_by_zoom) identifier_count_by_zoom (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_peripherals) identifier_peripherals (identifier_stats) identifier_stats )attribute (identifier_gauge) identifier_gauge )attribute (argument_list (call (attribute (string_'tiles-of-interest.by-zoom.z{:02d}') string_'tiles-of-interest.by-zoom.z{:02d}' (identifier_format) identifier_format )attribute (argument_list (identifier_zoom) identifier_zoom )argument_list )call (identifier_count) identifier_count )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Calculates new TOI stats and emits them via statsd.
(module (function_definition (function_name_fd_taper) function_name_fd_taper (parameters (identifier_out) identifier_out (identifier_start) identifier_start (identifier_end) identifier_end (default_parameter (identifier_beta) identifier_beta (integer_8) integer_8 )default_parameter (default_parameter (identifier_side) identifier_side (string_'left') string_'left' )default_parameter )parameters (block (expression_statement (assignment (identifier_out) identifier_out (call (attribute (identifier_out) identifier_out (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_width) identifier_width (binary_operator (identifier_end) identifier_end (identifier_start) identifier_start )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_winlen) identifier_winlen (binary_operator (integer_2) integer_2 (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_width) identifier_width (attribute (identifier_out) identifier_out (identifier_delta_f) identifier_delta_f )attribute )binary_operator )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_window) identifier_window (call (identifier_Array) identifier_Array (argument_list (call (attribute (identifier_signal) identifier_signal (identifier_get_window) identifier_get_window )attribute (argument_list (tuple (string_'kaiser') string_'kaiser' (identifier_beta) identifier_beta )tuple (identifier_winlen) identifier_winlen )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_kmin) identifier_kmin (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_start) identifier_start (attribute (identifier_out) identifier_out (identifier_delta_f) identifier_delta_f )attribute )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_kmax) identifier_kmax (binary_operator (identifier_kmin) identifier_kmin (binary_operator (identifier_winlen) identifier_winlen (integer_2) integer_2 )binary_operator )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_side) identifier_side (string_'left') string_'left' )comparison_operator (block (expression_statement (augmented_assignment (subscript (identifier_out) identifier_out (slice (identifier_kmin) identifier_kmin (colon) colon (identifier_kmax) identifier_kmax )slice )subscript (subscript (identifier_window) identifier_window (slice (colon) colon (binary_operator (identifier_winlen) identifier_winlen (integer_2) integer_2 )binary_operator )slice )subscript )augmented_assignment )expression_statement (expression_statement (augmented_assignment (subscript (identifier_out) identifier_out (slice (colon) colon (identifier_kmin) identifier_kmin )slice )subscript (float_0.) float_0. )augmented_assignment )expression_statement )block (elif_clause (comparison_operator (identifier_side) identifier_side (string_'right') string_'right' )comparison_operator (block (expression_statement (augmented_assignment (subscript (identifier_out) identifier_out (slice (identifier_kmin) identifier_kmin (colon) colon (identifier_kmax) identifier_kmax )slice )subscript (subscript (identifier_window) identifier_window (slice (binary_operator (identifier_winlen) identifier_winlen (integer_2) integer_2 )binary_operator (colon) colon )slice )subscript )augmented_assignment )expression_statement (expression_statement (augmented_assignment (subscript (identifier_out) identifier_out (slice (identifier_kmax) identifier_kmax (colon) colon )slice )subscript (float_0.) float_0. )augmented_assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"unrecognized side argument {}") string_"unrecognized side argument {}" (identifier_format) identifier_format )attribute (argument_list (identifier_side) identifier_side )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Applies a taper to the given FrequencySeries. A half-kaiser window is used for the roll-off. Parameters ---------- out : FrequencySeries The ``FrequencySeries`` to taper. start : float The frequency (in Hz) to start the taper window. end : float The frequency (in Hz) to end the taper window. beta : int, optional The beta parameter to use for the Kaiser window. See ``scipy.signal.kaiser`` for details. Default is 8. side : {'left', 'right'} The side to apply the taper to. If ``'left'`` (``'right'``), the taper will roll up (down) between ``start`` and ``end``, with all values before ``start`` (after ``end``) set to zero. Default is ``'left'``. Returns ------- FrequencySeries The tapered frequency series.
(module (function_definition (function_name_setNamedItem) function_name_setNamedItem (parameters (identifier_self) identifier_self (typed_parameter (identifier_item) identifier_item (type (identifier_Attr) identifier_Attr )type )typed_parameter )parameters (type (None) None )type (block (import_from_statement (dotted_name (identifier_wdom) identifier_wdom (identifier_web_node) identifier_web_node )dotted_name (dotted_name (identifier_WdomElement) identifier_WdomElement )dotted_name )import_from_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_item) identifier_item (identifier_Attr) identifier_Attr )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'item must be an instance of Attr') string_'item must be an instance of Attr' )argument_list )call )raise_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier__owner) identifier__owner )attribute (identifier_WdomElement) identifier_WdomElement )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__owner) identifier__owner )attribute (identifier_js_exec) identifier_js_exec )attribute (argument_list (string_'setAttribute') string_'setAttribute' (attribute (identifier_item) identifier_item (identifier_name) identifier_name )attribute (attribute (identifier_item) identifier_item (identifier_value) identifier_value )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__dict) identifier__dict )attribute (attribute (identifier_item) identifier_item (identifier_name) identifier_name )attribute )subscript (identifier_item) identifier_item )assignment )expression_statement (expression_statement (assignment (attribute (identifier_item) identifier_item (identifier__owner) identifier__owner )attribute (attribute (identifier_self) identifier_self (identifier__owner) identifier__owner )attribute )assignment )expression_statement )block )function_definition )module
Set ``Attr`` object in this collection.
(module (function_definition (function_name_from_T050017) function_name_from_T050017 (parameters (identifier_cls) identifier_cls (identifier_url) identifier_url (default_parameter (identifier_coltype) identifier_coltype (identifier_LIGOTimeGPS) identifier_LIGOTimeGPS )default_parameter )parameters (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (attribute (identifier_cls) identifier_cls (identifier__url_regex) identifier__url_regex )attribute (identifier_search) identifier_search )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_match) identifier_match )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"could not convert %s to CacheEntry") string_"could not convert %s to CacheEntry" (call (identifier_repr) identifier_repr (argument_list (identifier_url) identifier_url )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_observatory) identifier_observatory (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (string_"obs") string_"obs" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_description) identifier_description (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (string_"dsc") string_"dsc" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_start) identifier_start (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (string_"strt") string_"strt" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_duration) identifier_duration (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (string_"dur") string_"dur" )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_start) identifier_start (string_"-") string_"-" )comparison_operator (comparison_operator (identifier_duration) identifier_duration (string_"-") string_"-" )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_segment) identifier_segment (None) None )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_segment) identifier_segment (call (attribute (identifier_segments) identifier_segments (identifier_segment) identifier_segment )attribute (argument_list (call (identifier_coltype) identifier_coltype (argument_list (identifier_start) identifier_start )argument_list )call (binary_operator (call (identifier_coltype) identifier_coltype (argument_list (identifier_start) identifier_start )argument_list )call (call (identifier_coltype) identifier_coltype (argument_list (identifier_duration) identifier_duration )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_observatory) identifier_observatory (identifier_description) identifier_description (identifier_segment) identifier_segment (identifier_url) identifier_url )argument_list )call )return_statement )block )function_definition )module
Parse a URL in the style of T050017-00 into a CacheEntry. The T050017-00 file name format is, essentially, observatory-description-start-duration.extension Example: >>> c = CacheEntry.from_T050017("file://localhost/data/node144/frames/S5/strain-L2/LLO/L-L1_RDS_C03_L2-8365/L-L1_RDS_C03_L2-836562330-83.gwf") >>> c.observatory 'L' >>> c.host 'localhost' >>> os.path.basename(c.path) 'L-L1_RDS_C03_L2-836562330-83.gwf'
(module (function_definition (function_name_connection_sync) function_name_connection_sync (parameters (identifier_self) identifier_self (identifier_connection_id) identifier_connection_id (default_parameter (identifier_connProps) identifier_connProps (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_connProps) identifier_connProps (None) None )comparison_operator (block (expression_statement (assignment (identifier_connProps) identifier_connProps (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_requests_pb2) identifier_requests_pb2 (identifier_ConnectionSyncRequest) identifier_ConnectionSyncRequest )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_request) identifier_request (identifier_connection_id) identifier_connection_id )attribute (identifier_connection_id) identifier_connection_id )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_request) identifier_request (identifier_conn_props) identifier_conn_props )attribute (identifier_auto_commit) identifier_auto_commit )attribute (call (attribute (identifier_connProps) identifier_connProps (identifier_get) identifier_get )attribute (argument_list (string_'autoCommit') string_'autoCommit' (False) False )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_request) identifier_request (identifier_conn_props) identifier_conn_props )attribute (identifier_has_auto_commit) identifier_has_auto_commit )attribute (True) True )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_request) identifier_request (identifier_conn_props) identifier_conn_props )attribute (identifier_read_only) identifier_read_only )attribute (call (attribute (identifier_connProps) identifier_connProps (identifier_get) identifier_get )attribute (argument_list (string_'readOnly') string_'readOnly' (False) False )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_request) identifier_request (identifier_conn_props) identifier_conn_props )attribute (identifier_has_read_only) identifier_has_read_only )attribute (True) True )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_request) identifier_request (identifier_conn_props) identifier_conn_props )attribute (identifier_transaction_isolation) identifier_transaction_isolation )attribute (call (attribute (identifier_connProps) identifier_connProps (identifier_get) identifier_get )attribute (argument_list (string_'transactionIsolation') string_'transactionIsolation' (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_request) identifier_request (identifier_conn_props) identifier_conn_props )attribute (identifier_catalog) identifier_catalog )attribute (call (attribute (identifier_connProps) identifier_connProps (identifier_get) identifier_get )attribute (argument_list (string_'catalog') string_'catalog' (string_'') string_'' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_request) identifier_request (identifier_conn_props) identifier_conn_props )attribute (identifier_schema) identifier_schema )attribute (call (attribute (identifier_connProps) identifier_connProps (identifier_get) identifier_get )attribute (argument_list (string_'schema') string_'schema' (string_'') string_'' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response_data) identifier_response_data (call (attribute (identifier_self) identifier_self (identifier__apply) identifier__apply )attribute (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_responses_pb2) identifier_responses_pb2 (identifier_ConnectionSyncResponse) identifier_ConnectionSyncResponse )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_ParseFromString) identifier_ParseFromString )attribute (argument_list (identifier_response_data) identifier_response_data )argument_list )call )expression_statement (return_statement (attribute (identifier_response) identifier_response (identifier_conn_props) identifier_conn_props )attribute )return_statement )block )function_definition )module
Synchronizes connection properties with the server. :param connection_id: ID of the current connection. :param connProps: Dictionary with the properties that should be changed. :returns: A ``common_pb2.ConnectionProperties`` object.
(module (function_definition (function_name_attach) function_name_attach (parameters (identifier_domain) identifier_domain (identifier_filename) identifier_filename )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'Attaching datasets for domain %s') string_'Attaching datasets for domain %s' (identifier_domain) identifier_domain )argument_list )call )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_actions) identifier_actions (identifier_attach) identifier_attach )attribute (argument_list (identifier_domain) identifier_domain (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'Attached %s datasets to %s') string_'Attached %s datasets to %s' (attribute (identifier_result) identifier_result (identifier_success) identifier_success )attribute (identifier_domain) identifier_domain )argument_list )call )expression_statement )block )function_definition )module
Attach existing datasets to their harvest remote id Mapping between identifiers should be in FILENAME CSV file.
(module (function_definition (function_name_create_md5) function_name_create_md5 (parameters (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_hashlib) identifier_hashlib (identifier_md5) identifier_md5 )attribute (argument_list )argument_list )call )assignment )expression_statement (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_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (while_statement (True) True (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list (integer_8192) integer_8192 )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_data) identifier_data )not_operator (block (break_statement )break_statement )block )if_statement (expression_statement (call (attribute (identifier_m) identifier_m (identifier_update) identifier_update )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement )block )while_statement )block )with_statement (return_statement (call (attribute (identifier_m) identifier_m (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Create the md5 hash of a file using the hashlib library.
(module (function_definition (function_name_recover_all) function_name_recover_all (parameters (identifier_lbn) identifier_lbn (default_parameter (identifier_profile) identifier_profile (string_'default') string_'default' )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_config) identifier_config (call (identifier_get_running) identifier_get_running (argument_list (identifier_profile) identifier_profile )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_workers_) identifier_workers_ (call (attribute (subscript (identifier_config) identifier_config (call (attribute (string_'worker.{0}.balance_workers') string_'worker.{0}.balance_workers' (identifier_format) identifier_format )attribute (argument_list (identifier_lbn) identifier_lbn )argument_list )call )subscript (identifier_split) identifier_split )attribute (argument_list (string_',') string_',' )argument_list )call )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (identifier_ret) identifier_ret )return_statement )block )except_clause )try_statement (for_statement (identifier_worker) identifier_worker (identifier_workers_) identifier_workers_ (block (expression_statement (assignment (identifier_curr_state) identifier_curr_state (call (identifier_worker_status) identifier_worker_status (argument_list (identifier_worker) identifier_worker (identifier_profile) identifier_profile )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_curr_state) identifier_curr_state (string_'activation') string_'activation' )subscript (string_'ACT') string_'ACT' )comparison_operator (block (expression_statement (call (identifier_worker_activate) identifier_worker_activate (argument_list (identifier_worker) identifier_worker (identifier_lbn) identifier_lbn (identifier_profile) identifier_profile )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (call (attribute (subscript (identifier_curr_state) identifier_curr_state (string_'state') string_'state' )subscript (identifier_startswith) identifier_startswith )attribute (argument_list (string_'OK') string_'OK' )argument_list )call )not_operator (block (expression_statement (call (identifier_worker_recover) identifier_worker_recover (argument_list (identifier_worker) identifier_worker (identifier_lbn) identifier_lbn (identifier_profile) identifier_profile )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_worker) identifier_worker )subscript (call (identifier_worker_status) identifier_worker_status (argument_list (identifier_worker) identifier_worker (identifier_profile) identifier_profile )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Set the all the workers in lbn to recover and activate them if they are not CLI Examples: .. code-block:: bash salt '*' modjk.recover_all loadbalancer1 salt '*' modjk.recover_all loadbalancer1 other-profile
(module (function_definition (function_name_split_qname) function_name_split_qname (parameters (identifier_self) identifier_self (identifier_cybox_id) identifier_cybox_id )parameters (block (if_statement (comparison_operator (string_':') string_':' (identifier_cybox_id) identifier_cybox_id )comparison_operator (block (expression_statement (assignment (tuple_pattern (identifier_namespace) identifier_namespace (identifier_uid) identifier_uid )tuple_pattern (call (attribute (identifier_cybox_id) identifier_cybox_id (identifier_split) identifier_split )attribute (argument_list (string_':') string_':' (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_namespace) identifier_namespace (None) None )assignment )expression_statement (expression_statement (assignment (identifier_uid) identifier_uid (identifier_cybox_id) identifier_cybox_id )assignment )expression_statement )block )else_clause )if_statement (if_statement (boolean_operator (identifier_namespace) identifier_namespace (comparison_operator (identifier_namespace) identifier_namespace (attribute (identifier_self) identifier_self (identifier_namespace_dict) identifier_namespace_dict )attribute )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_namespace_uri) identifier_namespace_uri (subscript (attribute (identifier_self) identifier_self (identifier_namespace_dict) identifier_namespace_dict )attribute (identifier_namespace) identifier_namespace )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (binary_operator (string_"Could not retrieve namespace for identifier %s") string_"Could not retrieve namespace for identifier %s" (parenthesized_expression (identifier_cybox_id) identifier_cybox_id )parenthesized_expression )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_namespace_uri) identifier_namespace_uri (None) None )assignment )expression_statement )block )else_clause )if_statement (if_statement (not_operator (identifier_namespace_uri) identifier_namespace_uri )not_operator (block (if_statement (attribute (identifier_self) identifier_self (identifier_default_identifier_ns_uri) identifier_default_identifier_ns_uri )attribute (block (expression_statement (assignment (identifier_namespace_uri) identifier_namespace_uri (attribute (identifier_self) identifier_self (identifier_default_identifier_ns_uri) identifier_default_identifier_ns_uri )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_namespace_uri) identifier_namespace_uri (binary_operator (string_"%s/%s") string_"%s/%s" (tuple (identifier_DINGOS_MISSING_ID_NAMESPACE_URI_PREFIX) identifier_DINGOS_MISSING_ID_NAMESPACE_URI_PREFIX (identifier_namespace) identifier_namespace )tuple )binary_operator )assignment )expression_statement )block )else_clause )if_statement )block )if_statement (return_statement (tuple (identifier_namespace) identifier_namespace (identifier_namespace_uri) identifier_namespace_uri (identifier_uid) identifier_uid )tuple )return_statement )block )function_definition )module
Separate the namespace from the identifier in a qualified name and lookup the namespace URI associated with the given namespace.
(module (function_definition (function_name__build_meta) function_name__build_meta (parameters (typed_parameter (identifier_meta) identifier_meta (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_pipelines) identifier_pipelines (type (generic_type (identifier_Iterable) identifier_Iterable (type_parameter (type (string_'Pipeline') string_'Pipeline' )type )type_parameter )generic_type )type )typed_parameter )parameters (type (string_'Pipeline') string_'Pipeline' )type (block (return_statement (call (identifier_Pipeline) identifier_Pipeline (argument_list (keyword_argument (identifier_protocol) identifier_protocol (list (dictionary (pair (string_'meta') string_'meta' (identifier_meta) identifier_meta )pair (pair (string_'pipelines') string_'pipelines' (list_comprehension (attribute (identifier_pipeline) identifier_pipeline (identifier_protocol) identifier_protocol )attribute (for_in_clause (identifier_pipeline) identifier_pipeline (identifier_pipelines) identifier_pipelines )for_in_clause )list_comprehension )pair )dictionary )list )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Build a pipeline with a given meta-argument. :param meta: either union or intersection :param pipelines:
(module (function_definition (function_name_load) function_name_load (parameters (identifier_cls) identifier_cls (typed_parameter (identifier_path) identifier_path (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_password) identifier_password (type (identifier_str) identifier_str )type (None) None )typed_default_parameter )parameters (type (string_'Account') string_'Account' )type (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_keystore) identifier_keystore (call (attribute (identifier_json) identifier_json (identifier_load) identifier_load )attribute (argument_list (identifier_f) identifier_f )argument_list )call )assignment )expression_statement )block )with_statement (if_statement (not_operator (call (identifier_check_keystore_json) identifier_check_keystore_json (argument_list (identifier_keystore) identifier_keystore )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Invalid keystore file') string_'Invalid keystore file' )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_Account) identifier_Account (argument_list (identifier_keystore) identifier_keystore (identifier_password) identifier_password (keyword_argument (identifier_path) identifier_path (identifier_path) identifier_path )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Load an account from a keystore file. Args: path: full path to the keyfile password: the password to decrypt the key file or `None` to leave it encrypted
(module (function_definition (function_name_initialize) function_name_initialize (parameters (identifier_self) identifier_self (identifier_calc_reg) identifier_calc_reg )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__isinitialized) identifier__isinitialized )attribute (True) True )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_calc_order) identifier_calc_order )attribute (call (identifier_topological_sort) identifier_topological_sort (argument_list (attribute (identifier_calc_reg) identifier_calc_reg (identifier_dependencies) identifier_dependencies )attribute )argument_list )call )assignment )expression_statement )block )function_definition )module
Initialize the simulation. Organize calculations by dependency. :param calc_reg: Calculation registry. :type calc_reg: :class:`~simkit.core.calculation.CalcRegistry`
(module (function_definition (function_name_docs) function_name_docs (parameters (identifier_root_url) identifier_root_url (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_root_url) identifier_root_url (call (attribute (identifier_root_url) identifier_root_url (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_path) identifier_path (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_root_url) identifier_root_url (identifier_OLD_ROOT_URL) identifier_OLD_ROOT_URL )comparison_operator (block (return_statement (call (attribute (string_'https://docs.taskcluster.net/{}') string_'https://docs.taskcluster.net/{}' (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (string_'{}/docs/{}') string_'{}/docs/{}' (identifier_format) identifier_format )attribute (argument_list (identifier_root_url) identifier_root_url (identifier_path) identifier_path )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Generate URL for path in the Taskcluster docs.
(module (function_definition (function_name_logical_intf_helper) function_name_logical_intf_helper (parameters (identifier_interface) identifier_interface )parameters (block (if_statement (comparison_operator (identifier_interface) identifier_interface (None) None )comparison_operator (block (return_statement (attribute (call (attribute (identifier_LogicalInterface) identifier_LogicalInterface (identifier_get_or_create) identifier_get_or_create )attribute (argument_list (keyword_argument (identifier_name) identifier_name (string_'default_eth') string_'default_eth' )keyword_argument )argument_list )call (identifier_href) identifier_href )attribute )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_interface) identifier_interface (identifier_LogicalInterface) identifier_LogicalInterface )argument_list )call (block (return_statement (attribute (identifier_interface) identifier_interface (identifier_href) identifier_href )attribute )return_statement )block )elif_clause (elif_clause (call (attribute (identifier_interface) identifier_interface (identifier_startswith) identifier_startswith )attribute (argument_list (string_'http') string_'http' )argument_list )call (block (return_statement (identifier_interface) identifier_interface )return_statement )block )elif_clause )if_statement (return_statement (attribute (call (attribute (identifier_LogicalInterface) identifier_LogicalInterface (identifier_get_or_create) identifier_get_or_create )attribute (argument_list (keyword_argument (identifier_name) identifier_name (identifier_interface) identifier_interface )keyword_argument )argument_list )call (identifier_href) identifier_href )attribute )return_statement )block )function_definition )module
Logical Interface finder by name. Create if it doesn't exist. This is useful when adding logical interfaces to for inline or capture interfaces. :param interface: logical interface name :return str href: href of logical interface
(module (function_definition (function_name_error_handler) function_name_error_handler (parameters (identifier_task) identifier_task )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_task) identifier_task )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (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 (try_statement (block (return_statement (call (identifier_task) identifier_task (argument_list (identifier_self) identifier_self (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_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 (assignment (attribute (identifier_self) identifier_self (identifier_connected) identifier_connected )attribute (False) False )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_testing) identifier_testing )attribute )not_operator (block (expression_statement (assignment (pattern_list (identifier_exc_type) identifier_exc_type (identifier_exc_obj) identifier_exc_obj (identifier_exc_tb) identifier_exc_tb )pattern_list (call (attribute (identifier_sys) identifier_sys (identifier_exc_info) identifier_exc_info )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fname) identifier_fname (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (attribute (attribute (attribute (identifier_exc_tb) identifier_exc_tb (identifier_tb_frame) identifier_tb_frame )attribute (identifier_f_code) identifier_f_code )attribute (identifier_co_filename) identifier_co_filename )attribute )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_error_message) identifier_error_message (parenthesized_expression (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (string_"[") string_"[" (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list )argument_list )call )argument_list )call )binary_operator (string_"] Error in task \"") string_"] Error in task \"" )binary_operator (attribute (identifier_task) identifier_task (identifier___name__) identifier___name__ )attribute )binary_operator (string_"\" (") string_"\" (" )binary_operator (identifier_fname) identifier_fname )binary_operator (string_"/") string_"/" )binary_operator (call (identifier_str) identifier_str (argument_list (attribute (identifier_exc_tb) identifier_exc_tb (identifier_tb_lineno) identifier_tb_lineno )attribute )argument_list )call )binary_operator (string_")") string_")" )binary_operator (attribute (identifier_e) identifier_e (identifier_message) identifier_message )attribute )binary_operator )parenthesized_expression )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_"%s: RPC instruction failed") string_"%s: RPC instruction failed" (identifier_error_message) identifier_error_message )binary_operator )argument_list )call )expression_statement )block )if_statement )block )except_clause )try_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
Handle and log RPC errors.
(module (function_definition (function_name_GenerateFileData) function_name_GenerateFileData (parameters (identifier_self) identifier_self )parameters (block (while_statement (integer_1) integer_1 (block (expression_statement (assignment (identifier_line) identifier_line (call (attribute (attribute (identifier_self) identifier_self (identifier_rfile) identifier_rfile )attribute (identifier_readline) identifier_readline )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_chunk_size) identifier_chunk_size (call (identifier_int) identifier_int (argument_list (subscript (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list (string_";") string_";" )argument_list )call (integer_0) integer_0 )subscript (integer_16) integer_16 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_chunk_size) identifier_chunk_size (integer_0) integer_0 )comparison_operator (block (break_statement )break_statement )block )if_statement (for_statement (identifier_chunk) identifier_chunk (call (attribute (identifier_self) identifier_self (identifier__GenerateChunk) identifier__GenerateChunk )attribute (argument_list (identifier_chunk_size) identifier_chunk_size )argument_list )call (block (expression_statement (yield (identifier_chunk) identifier_chunk )yield )expression_statement )block )for_statement (expression_statement (assignment (identifier_lf) identifier_lf (call (attribute (attribute (identifier_self) identifier_self (identifier_rfile) identifier_rfile )attribute (identifier_read) identifier_read )attribute (argument_list (integer_2) integer_2 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_lf) identifier_lf (string_"\r\n") string_"\r\n" )comparison_operator (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (string_"Unable to parse chunk.") string_"Unable to parse chunk." )argument_list )call )raise_statement )block )if_statement )block )while_statement (for_statement (identifier_header) identifier_header (call (attribute (attribute (identifier_self) identifier_self (identifier_rfile) identifier_rfile )attribute (identifier_readline) identifier_readline )attribute (argument_list )argument_list )call (block (if_statement (not_operator (identifier_header) identifier_header )not_operator (block (break_statement )break_statement )block )if_statement )block )for_statement )block )function_definition )module
Generates the file data for a chunk encoded file.
(module (function_definition (function_name_to_yaml) function_name_to_yaml (parameters (identifier_value) identifier_value (default_parameter (identifier_pretty) identifier_pretty (False) False )default_parameter )parameters (block (if_statement (not_operator (identifier_yaml) identifier_yaml )not_operator (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (string_'No supported YAML library available') string_'No supported YAML library available' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_options) identifier_options (dictionary (pair (string_'Dumper') string_'Dumper' (identifier_BasicYamlDumper) identifier_BasicYamlDumper )pair (pair (string_'allow_unicode') string_'allow_unicode' (True) True )pair )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_options) identifier_options (string_'default_flow_style') string_'default_flow_style' )subscript (not_operator (identifier_pretty) identifier_pretty )not_operator )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_yaml) identifier_yaml (identifier_dump) identifier_dump )attribute (argument_list (identifier_value) identifier_value (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call (identifier_rstrip) identifier_rstrip )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Serializes the given value to YAML. :param value: the value to serialize :param pretty: whether or not to format the output in a more human-readable way; if not specified, defaults to ``False`` :type pretty: bool :rtype: str
(module (function_definition (function_name_set_backend) function_name_set_backend (parameters (identifier_self) identifier_self (identifier_backend) identifier_backend )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_backend) identifier_backend (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_name) identifier_name (identifier_backend) identifier_backend )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (list )list )assignment )expression_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (dictionary )dictionary )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_backend) identifier_backend (tuple (identifier_tuple) identifier_tuple (identifier_list) identifier_list )tuple )argument_list )call (block (expression_statement (assignment (identifier_name) identifier_name (string_'') string_'' )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (list )list )assignment )expression_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_backend) identifier_backend )argument_list )call )argument_list )call (block (if_statement (comparison_operator (identifier_i) identifier_i (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_name) identifier_name (subscript (identifier_backend) identifier_backend (identifier_i) identifier_i )subscript )assignment )expression_statement )block (else_clause (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_backend) identifier_backend (identifier_i) identifier_i )subscript (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_update) identifier_update )attribute (argument_list (subscript (identifier_backend) identifier_backend (identifier_i) identifier_i )subscript )argument_list )call )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_args) identifier_args (subscript (identifier_backend) identifier_backend (identifier_i) identifier_i )subscript )augmented_assignment )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )for_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Backend must be string, tuple, or list") string_"Backend must be string, tuple, or list" )argument_list )call )raise_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_name) identifier_name (identifier_available_backends) identifier_available_backends )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_backend) identifier_backend )attribute (identifier_name) identifier_name )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__backend) identifier__backend )attribute (call (subscript (identifier_available_backends) identifier_available_backends (identifier_name) identifier_name )subscript (argument_list )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (parenthesized_expression (concatenated_string (string_"A backend (e.g. 'jNeuroML' or 'NEURON') ") string_"A backend (e.g. 'jNeuroML' or 'NEURON') " (string_"must be selected") string_"must be selected" )concatenated_string )parenthesized_expression )argument_list )call )raise_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (binary_operator (string_"Backend %s not found in backends.py") string_"Backend %s not found in backends.py" (identifier_name) identifier_name )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier__backend) identifier__backend )attribute (identifier_model) identifier_model )attribute (identifier_self) identifier_self )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__backend) identifier__backend )attribute (identifier_init_backend) identifier_init_backend )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Set the simulation backend.
(module (function_definition (function_name_eigvalsh) function_name_eigvalsh (parameters (identifier_a) identifier_a (default_parameter (identifier_eigvec) identifier_eigvec (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_eigvec) identifier_eigvec (True) True )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_val) identifier_val (identifier_vec) identifier_vec )pattern_list (call (identifier_eigh) identifier_eigh (argument_list (identifier_a) identifier_a (keyword_argument (identifier_eigvec) identifier_eigvec (True) True )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_val) identifier_val (call (attribute (identifier_gvar) identifier_gvar (identifier_mean) identifier_mean )attribute (argument_list (identifier_vec) identifier_vec )argument_list )call )expression_list )return_statement )block (else_clause (block (return_statement (call (identifier_eigh) identifier_eigh (argument_list (identifier_a) identifier_a (keyword_argument (identifier_eigvec) identifier_eigvec (False) False )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Eigenvalues of Hermitian matrix ``a``. Args: a: Two-dimensional, square Hermitian matrix/array of numbers and/or :class:`gvar.GVar`\s. Array elements must be real-valued if `gvar.GVar`\s are involved (i.e., symmetric matrix). eigvec (bool): If ``True``, method returns a tuple of arrays ``(val, vec)`` where ``val[i]`` are the eigenvalues of ``a``, and ``vec[:, i]`` are the mean values of the corresponding eigenvectors. Only ``val`` is returned if ``eigvec=False`` (default). Returns: Array ``val`` of eigenvalues of matrix ``a`` if parameter ``eigvec==False`` (default); otherwise a tuple of arrays ``(val, vec)`` where ``val[i]`` are the eigenvalues (in ascending order) and ``vec[:, i]`` are the mean values of the corresponding eigenvectors. Raises: ValueError: If matrix is not square and two-dimensional.
(module (function_definition (function_name_elevation_along_path) function_name_elevation_along_path (parameters (identifier_client) identifier_client (identifier_path) identifier_path (identifier_samples) identifier_samples )parameters (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_path) identifier_path )argument_list )call (identifier_str) identifier_str )comparison_operator (block (expression_statement (assignment (identifier_path) identifier_path (binary_operator (string_"enc:%s") string_"enc:%s" (identifier_path) identifier_path )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_convert) identifier_convert (identifier_shortest_path) identifier_shortest_path )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"path") string_"path" (identifier_path) identifier_path )pair (pair (string_"samples") string_"samples" (identifier_samples) identifier_samples )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_client) identifier_client (identifier__request) identifier__request )attribute (argument_list (string_"/maps/api/elevation/json") string_"/maps/api/elevation/json" (identifier_params) identifier_params )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_"results") string_"results" (list )list )argument_list )call )return_statement )block )function_definition )module
Provides elevation data sampled along a path on the surface of the earth. :param path: An encoded polyline string, or a list of latitude/longitude values from which you wish to calculate elevation data. :type path: string, dict, list, or tuple :param samples: The number of sample points along a path for which to return elevation data. :type samples: int :rtype: list of elevation data responses
(module (function_definition (function_name_JsonResponseModel) function_name_JsonResponseModel (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_old_model) identifier_old_model (attribute (identifier_self) identifier_self (identifier_response_type_model) identifier_response_type_model )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___response_type_model) identifier___response_type_model )attribute (string_'json') string_'json' )assignment )expression_statement (expression_statement (yield )yield )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___response_type_model) identifier___response_type_model )attribute (identifier_old_model) identifier_old_model )assignment )expression_statement )block )function_definition )module
In this context, return raw JSON instead of proto.
(module (function_definition (function_name_get_knowledge_base) function_name_get_knowledge_base (parameters (identifier_project_id) identifier_project_id (identifier_knowledge_base_id) identifier_knowledge_base_id )parameters (block (import_statement (aliased_import (dotted_name (identifier_dialogflow_v2beta1) identifier_dialogflow_v2beta1 )dotted_name (identifier_dialogflow) identifier_dialogflow )aliased_import )import_statement (expression_statement (assignment (identifier_client) identifier_client (call (attribute (identifier_dialogflow) identifier_dialogflow (identifier_KnowledgeBasesClient) identifier_KnowledgeBasesClient )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_knowledge_base_path) identifier_knowledge_base_path (call (attribute (identifier_client) identifier_client (identifier_knowledge_base_path) identifier_knowledge_base_path )attribute (argument_list (identifier_project_id) identifier_project_id (identifier_knowledge_base_id) identifier_knowledge_base_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_client) identifier_client (identifier_get_knowledge_base) identifier_get_knowledge_base )attribute (argument_list (identifier_knowledge_base_path) identifier_knowledge_base_path )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Got Knowledge Base:') string_'Got Knowledge Base:' )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_' - Display Name: {}') string_' - Display Name: {}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_response) identifier_response (identifier_display_name) identifier_display_name )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_' - Knowledge ID: {}') string_' - Knowledge ID: {}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_response) identifier_response (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Gets a specific Knowledge base. Args: project_id: The GCP project linked with the agent. knowledge_base_id: Id of the Knowledge base.
(module (function_definition (function_name_on_leave) function_name_on_leave (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_roomId) identifier_roomId )attribute (string_'-1') string_'-1' )comparison_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_'chat: leave room (roomId: %s)') string_'chat: leave room (roomId: %s)' (attribute (identifier_self) identifier_self (identifier_roomId) identifier_roomId )attribute )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_publishToOther) identifier_publishToOther )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_roomId) identifier_roomId )attribute (string_'leave') string_'leave' (dictionary (pair (string_'username') string_'username' (attribute (identifier_self) identifier_self (identifier_username) identifier_username )attribute )pair )dictionary )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_leave) identifier_leave )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_roomId) identifier_roomId )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_initialize) identifier_initialize )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Quit chat room
(module (function_definition (function_name__display_choices) function_name__display_choices (parameters (identifier_self) identifier_self (identifier_choices) identifier_choices )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Choose the number of the correct choice:") string_"Choose the number of the correct choice:" )argument_list )call )expression_statement (expression_statement (assignment (identifier_choice_map) identifier_choice_map (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_choice) identifier_choice )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_choices) identifier_choices )argument_list )call (block (expression_statement (assignment (identifier_i) identifier_i (call (identifier_str) identifier_str (argument_list (identifier_i) identifier_i )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'{}) {}') string_'{}) {}' (identifier_format) identifier_format )attribute (argument_list (identifier_i) identifier_i (call (attribute (call (attribute (identifier_format) identifier_format (identifier_indent) identifier_indent )attribute (argument_list (identifier_choice) identifier_choice (binary_operator (string_' ') string_' ' (parenthesized_expression (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_i) identifier_i )argument_list )call (integer_2) integer_2 )binary_operator )parenthesized_expression )binary_operator )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_choice) identifier_choice (call (attribute (identifier_format) identifier_format (identifier_normalize) identifier_normalize )attribute (argument_list (identifier_choice) identifier_choice )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_choice_map) identifier_choice_map (identifier_i) identifier_i )subscript (identifier_choice) identifier_choice )assignment )expression_statement )block )for_statement (return_statement (identifier_choice_map) identifier_choice_map )return_statement )block )function_definition )module
Prints a mapping of numbers to choices and returns the mapping as a dictionary.
(module (function_definition (function_name_get_all) function_name_get_all (parameters (identifier_self) identifier_self )parameters (block (for_statement (pattern_list (identifier_name) identifier_name (identifier_values) identifier_values )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier__map) identifier__map )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (identifier_value) identifier_value (identifier_values) identifier_values (block (expression_statement (yield (tuple (identifier_name) identifier_name (identifier_value) identifier_value )tuple )yield )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Return an iterator of name-value pairs.
(module (function_definition (function_name__parse_body) function_name__parse_body (parameters (identifier_self) identifier_self (identifier_body) identifier_body )parameters (block (if_statement (call (identifier_is_python3) identifier_is_python3 (argument_list )argument_list )call (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (call (attribute (identifier_body) identifier_body (identifier_decode) identifier_decode )attribute (argument_list (string_'UTF-8') string_'UTF-8' )argument_list )call )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_body) identifier_body )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
For just call a deserializer for FORMAT
(module (function_definition (function_name_get_election_electoral_votes) function_name_get_election_electoral_votes (parameters (identifier_self) identifier_self (identifier_election) identifier_election )parameters (block (expression_statement (assignment (identifier_candidate_election) identifier_candidate_election (call (attribute (attribute (identifier_CandidateElection) identifier_CandidateElection (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_candidate) identifier_candidate (identifier_self) identifier_self )keyword_argument (keyword_argument (identifier_election) identifier_election (identifier_election) identifier_election )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_candidate_election) identifier_candidate_election (identifier_electoral_votes) identifier_electoral_votes )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Get all electoral votes for this candidate in an election.
(module (function_definition (function_name_pad_block) function_name_pad_block (parameters (identifier_block) identifier_block (identifier_block_size) identifier_block_size )parameters (block (expression_statement (assignment (pattern_list (identifier_unique_vals) identifier_unique_vals (identifier_unique_counts) identifier_unique_counts )pattern_list (call (attribute (identifier_np) identifier_np (identifier_unique) identifier_unique )attribute (argument_list (identifier_block) identifier_block (keyword_argument (identifier_return_counts) identifier_return_counts (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_most_frequent_value) identifier_most_frequent_value (subscript (identifier_unique_vals) identifier_unique_vals (call (attribute (identifier_np) identifier_np (identifier_argmax) identifier_argmax )attribute (argument_list (identifier_unique_counts) identifier_unique_counts )argument_list )call )subscript )assignment )expression_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_pad) identifier_pad )attribute (argument_list (identifier_block) identifier_block (call (identifier_tuple) identifier_tuple (generator_expression (tuple (integer_0) integer_0 (binary_operator (identifier_desired_size) identifier_desired_size (identifier_actual_size) identifier_actual_size )binary_operator )tuple (for_in_clause (pattern_list (identifier_desired_size) identifier_desired_size (identifier_actual_size) identifier_actual_size )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_block_size) identifier_block_size (attribute (identifier_block) identifier_block (identifier_shape) identifier_shape )attribute )argument_list )call )for_in_clause )generator_expression )call (keyword_argument (identifier_mode) identifier_mode (string_"constant") string_"constant" )keyword_argument (keyword_argument (identifier_constant_values) identifier_constant_values (identifier_most_frequent_value) identifier_most_frequent_value )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Pad a block to block_size with its most frequent value
(module (function_definition (function_name_set_payload_format) function_name_set_payload_format (parameters (identifier_self) identifier_self (identifier_payload_format) identifier_payload_format )parameters (block (expression_statement (assignment (identifier_request) identifier_request (dictionary (pair (string_"command") string_"command" (string_"payload_format") string_"payload_format" )pair (pair (string_"format") string_"format" (identifier_payload_format) identifier_payload_format )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_status) identifier_status (call (attribute (identifier_self) identifier_self (identifier__check_command_response_status) identifier__check_command_response_status )attribute (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_format) identifier_format )attribute (identifier_payload_format) identifier_payload_format )assignment )expression_statement (return_statement (identifier_status) identifier_status )return_statement )block )function_definition )module
Set the payload format for messages sent to and from the VI. Returns True if the command was successful.
(module (function_definition (function_name_validate_unique) function_name_validate_unique (parameters (identifier_self) identifier_self (default_parameter (identifier_exclude) identifier_exclude (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_errors) identifier_errors (dictionary )dictionary )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_TranslatableModelMixin) identifier_TranslatableModelMixin (identifier_self) identifier_self )argument_list )call (identifier_validate_unique) identifier_validate_unique )attribute (argument_list (keyword_argument (identifier_exclude) identifier_exclude (identifier_exclude) identifier_exclude )keyword_argument )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_ValidationError) identifier_ValidationError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_errors) identifier_errors (attribute (identifier_e) identifier_e (identifier_message_dict) identifier_message_dict )attribute )assignment )expression_statement )block )except_clause )try_statement (for_statement (identifier_local_cache) identifier_local_cache (call (attribute (identifier_six) identifier_six (identifier_itervalues) identifier_itervalues )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__translations_cache) identifier__translations_cache )attribute )argument_list )call (block (for_statement (identifier_translation) identifier_translation (call (attribute (identifier_six) identifier_six (identifier_itervalues) identifier_itervalues )attribute (argument_list (identifier_local_cache) identifier_local_cache )argument_list )call (block (if_statement (call (identifier_is_missing) identifier_is_missing (argument_list (identifier_translation) identifier_translation )argument_list )call (block (continue_statement )continue_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (identifier_translation) identifier_translation (identifier_validate_unique) identifier_validate_unique )attribute (argument_list (keyword_argument (identifier_exclude) identifier_exclude (identifier_exclude) identifier_exclude )keyword_argument )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_ValidationError) identifier_ValidationError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_errors) identifier_errors (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_e) identifier_e (identifier_message_dict) identifier_message_dict )attribute )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement )block )for_statement (if_statement (identifier_errors) identifier_errors (block (raise_statement (call (identifier_ValidationError) identifier_ValidationError (argument_list (identifier_errors) identifier_errors )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Also validate the unique_together of the translated model.
(module (function_definition (function_name_vertex_normals) function_name_vertex_normals (parameters (identifier_self) identifier_self )parameters (block (assert_statement (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_self) identifier_self (identifier_faces_sparse) identifier_faces_sparse )attribute (string_'dot') string_'dot' )argument_list )call )assert_statement (expression_statement (assignment (identifier_vertex_normals) identifier_vertex_normals (call (attribute (identifier_geometry) identifier_geometry (identifier_mean_vertex_normals) identifier_mean_vertex_normals )attribute (argument_list (keyword_argument (identifier_vertex_count) identifier_vertex_count (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_vertices) identifier_vertices )attribute )argument_list )call )keyword_argument (keyword_argument (identifier_faces) identifier_faces (attribute (identifier_self) identifier_self (identifier_faces) identifier_faces )attribute )keyword_argument (keyword_argument (identifier_face_normals) identifier_face_normals (attribute (identifier_self) identifier_self (identifier_face_normals) identifier_face_normals )attribute )keyword_argument (keyword_argument (identifier_sparse) identifier_sparse (attribute (identifier_self) identifier_self (identifier_faces_sparse) identifier_faces_sparse )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_vertex_normals) identifier_vertex_normals )return_statement )block )function_definition )module
The vertex normals of the mesh. If the normals were loaded we check to make sure we have the same number of vertex normals and vertices before returning them. If there are no vertex normals defined or a shape mismatch we calculate the vertex normals from the mean normals of the faces the vertex is used in. Returns ---------- vertex_normals : (n,3) float Represents the surface normal at each vertex. Where n == len(self.vertices)
(module (function_definition (function_name_contribute_to_related_class) function_name_contribute_to_related_class (parameters (identifier_self) identifier_self (identifier_cls) identifier_cls (identifier_related) identifier_related )parameters (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_VersionedForeignKey) identifier_VersionedForeignKey (identifier_self) identifier_self )argument_list )call (identifier_contribute_to_related_class) identifier_contribute_to_related_class )attribute (argument_list (identifier_cls) identifier_cls (identifier_related) identifier_related )argument_list )call )expression_statement (expression_statement (assignment (identifier_accessor_name) identifier_accessor_name (call (attribute (identifier_related) identifier_related (identifier_get_accessor_name) identifier_get_accessor_name )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_cls) identifier_cls (identifier_accessor_name) identifier_accessor_name )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_cls) identifier_cls (identifier_accessor_name) identifier_accessor_name (call (identifier_VersionedReverseManyToOneDescriptor) identifier_VersionedReverseManyToOneDescriptor (argument_list (identifier_related) identifier_related )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Override ForeignKey's methods, and replace the descriptor, if set by the parent's methods
(module (function_definition (function_name_raise_) function_name_raise_ (parameters (identifier_tp) identifier_tp (default_parameter (identifier_value) identifier_value (None) None )default_parameter (default_parameter (identifier_tb) identifier_tb (None) None )default_parameter )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_tp) identifier_tp (identifier_Exception) identifier_Exception )argument_list )call )boolean_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"instance exception may not have a separate value") string_"instance exception may not have a separate value" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (expression_statement (assignment (identifier_exc) identifier_exc (call (identifier_tp) identifier_tp (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_exc) identifier_exc (identifier_tp) identifier_tp )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (attribute (identifier_exc) identifier_exc (identifier___traceback__) identifier___traceback__ )attribute (identifier_tb) identifier_tb )comparison_operator (block (raise_statement (call (attribute (identifier_exc) identifier_exc (identifier_with_traceback) identifier_with_traceback )attribute (argument_list (identifier_tb) identifier_tb )argument_list )call )raise_statement )block )if_statement (raise_statement (identifier_exc) identifier_exc )raise_statement )block )function_definition )module
A function that matches the Python 2.x ``raise`` statement. This allows re-raising exceptions with the cls value and traceback on Python 2 and 3.
(module (function_definition (function_name_load_tensor) function_name_load_tensor (parameters (identifier_f) identifier_f (default_parameter (identifier_format) identifier_format (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_s) identifier_s (call (identifier__load_bytes) identifier__load_bytes (argument_list (identifier_f) identifier_f )argument_list )call )assignment )expression_statement (return_statement (call (identifier_load_tensor_from_string) identifier_load_tensor_from_string (argument_list (identifier_s) identifier_s (keyword_argument (identifier_format) identifier_format (identifier_format) identifier_format )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Loads a serialized TensorProto into memory @params f can be a file-like object (has "read" function) or a string containing a file name format is for future use @return Loaded in-memory TensorProto
(module (function_definition (function_name_traverse_dependency_graph) function_name_traverse_dependency_graph (parameters (identifier_self) identifier_self (identifier_ref) identifier_ref (identifier_collector) identifier_collector (default_parameter (identifier_memo) identifier_memo (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_resolved_ref) identifier_resolved_ref (call (attribute (attribute (identifier_self) identifier_self (identifier_refs_by_unversioned_refs) identifier_refs_by_unversioned_refs )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_ref) identifier_ref (identifier_unversioned) identifier_unversioned )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_resolved_ref) identifier_resolved_ref (block (expression_statement (assignment (identifier_ref) identifier_ref (identifier_resolved_ref) identifier_resolved_ref )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_memo) identifier_memo (None) None )comparison_operator (block (expression_statement (assignment (identifier_memo) identifier_memo (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_visited) identifier_visited (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__do_traverse_dependency_graph) identifier__do_traverse_dependency_graph )attribute (argument_list (identifier_ref) identifier_ref (identifier_collector) identifier_collector (identifier_memo) identifier_memo (identifier_visited) identifier_visited )argument_list )call )return_statement )block )function_definition )module
Traverses module graph, starting with ref, collecting values for each ref into the sets created by the collector function. :param ref an IvyModuleRef to start traversing the ivy dependency graph :param collector a function that takes a ref and returns a new set of values to collect for that ref, which will also be updated with all the dependencies accumulated values :param memo is a dict of ref -> set that memoizes the results of each node in the graph. If provided, allows for retaining cache across calls. :returns the accumulated set for ref
(module (function_definition (function_name_full_info) function_name_full_info (parameters (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier___get_conn) identifier___get_conn (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_info) identifier_info (dictionary (pair (string_'freecpu') string_'freecpu' (call (identifier__freecpu) identifier__freecpu (argument_list (identifier_conn) identifier_conn )argument_list )call )pair (pair (string_'freemem') string_'freemem' (call (identifier__freemem) identifier__freemem (argument_list (identifier_conn) identifier_conn )argument_list )call )pair (pair (string_'node_info') string_'node_info' (call (identifier__node_info) identifier__node_info (argument_list (identifier_conn) identifier_conn )argument_list )call )pair (pair (string_'vm_info') string_'vm_info' (call (identifier_vm_info) identifier_vm_info (argument_list )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_info) identifier_info )return_statement )block )function_definition )module
Return the node_info, vm_info and freemem :param connection: libvirt connection URI, overriding defaults .. versionadded:: 2019.2.0 :param username: username to connect with, overriding defaults .. versionadded:: 2019.2.0 :param password: password to connect with, overriding defaults .. versionadded:: 2019.2.0 CLI Example: .. code-block:: bash salt '*' virt.full_info
(module (function_definition (function_name_qc_data) function_name_qc_data (parameters (identifier_self) identifier_self (identifier_tests) identifier_tests (default_parameter (identifier_alias) identifier_alias (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_r) identifier_r (dictionary_comprehension (pair (identifier_m) identifier_m (call (attribute (identifier_c) identifier_c (identifier_quality) identifier_quality )attribute (argument_list (identifier_tests) identifier_tests (identifier_alias) identifier_alias )argument_list )call )pair (for_in_clause (pattern_list (identifier_m) identifier_m (identifier_c) identifier_c )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_self) identifier_self (identifier_qc_curve_group) identifier_qc_curve_group )attribute (argument_list (identifier_tests) identifier_tests (keyword_argument (identifier_alias) identifier_alias (identifier_alias) identifier_alias )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_m) identifier_m (identifier_results) identifier_results )pattern_list (call (attribute (identifier_r) identifier_r (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_m) identifier_m (identifier_s) identifier_s )comparison_operator (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_update) identifier_update )attribute (argument_list (subscript (identifier_s) identifier_s (identifier_m) identifier_m )subscript )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_r) identifier_r )return_statement )block )function_definition )module
Run a series of tests against the data and return the corresponding results. Args: tests (list): a list of functions. Returns: list. The results. Stick to booleans (True = pass) or ints.
(module (function_definition (function_name_serialize) function_name_serialize (parameters (identifier_obj) identifier_obj (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (try_statement (block (if_statement (comparison_operator (string_'file_out') string_'file_out' (identifier_options) identifier_options )comparison_operator (block (return_statement (call (attribute (identifier_toml) identifier_toml (identifier_dump) identifier_dump )attribute (argument_list (identifier_obj) identifier_obj (subscript (identifier_options) identifier_options (string_'file_out') string_'file_out' )subscript (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_toml) identifier_toml (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_obj) identifier_obj (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call )return_statement )block )else_clause )if_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (raise_statement (call (identifier_SerializationError) identifier_SerializationError (argument_list (identifier_error) identifier_error )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Serialize Python data to TOML. :param obj: the data structure to serialize. :param options: options given to lower pytoml module.
(module (function_definition (function_name_is_ancestor) function_name_is_ancestor (parameters (identifier_self) identifier_self (identifier_ancestor_rev) identifier_ancestor_rev (identifier_rev) identifier_rev )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_git) identifier_git )attribute (identifier_merge_base) identifier_merge_base )attribute (argument_list (identifier_ancestor_rev) identifier_ancestor_rev (identifier_rev) identifier_rev (keyword_argument (identifier_is_ancestor) identifier_is_ancestor (True) True )keyword_argument )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_GitCommandError) identifier_GitCommandError (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_err) identifier_err (identifier_status) identifier_status )attribute (integer_1) integer_1 )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (raise_statement )raise_statement )block )except_clause )try_statement (return_statement (True) True )return_statement )block )function_definition )module
Check if a commit is an ancestor of another :param ancestor_rev: Rev which should be an ancestor :param rev: Rev to test against ancestor_rev :return: ``True``, ancestor_rev is an accestor to rev.
(module (function_definition (function_name_append_sfixed64) function_name_append_sfixed64 (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_sign) identifier_sign (boolean_operator (boolean_operator (parenthesized_expression (binary_operator (identifier_value) identifier_value (integer_0x8000000000000000) integer_0x8000000000000000 )binary_operator )parenthesized_expression (unary_operator (integer_1) integer_1 )unary_operator )boolean_operator (integer_0) integer_0 )boolean_operator )assignment )expression_statement (if_statement (comparison_operator (binary_operator (identifier_value) identifier_value (integer_64) integer_64 )binary_operator (identifier_sign) identifier_sign )comparison_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_EncodeError) identifier_EncodeError )attribute (argument_list (binary_operator (string_'SFixed64 out of range: %d') string_'SFixed64 out of range: %d' (identifier_value) identifier_value )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__stream) identifier__stream )attribute (identifier_append_little_endian64) identifier_append_little_endian64 )attribute (argument_list (binary_operator (identifier_value) identifier_value (integer_0xffffffffffffffff) integer_0xffffffffffffffff )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Appends a signed 64-bit integer to our buffer, in little-endian byte-order.
(module (function_definition (function_name_d8distdowntostream) function_name_d8distdowntostream (parameters (identifier_np) identifier_np (identifier_p) identifier_p (identifier_fel) identifier_fel (identifier_src) identifier_src (identifier_dist) identifier_dist (identifier_distancemethod) identifier_distancemethod (identifier_thresh) identifier_thresh (default_parameter (identifier_workingdir) identifier_workingdir (None) None )default_parameter (default_parameter (identifier_mpiexedir) identifier_mpiexedir (None) None )default_parameter (default_parameter (identifier_exedir) identifier_exedir (None) None )default_parameter (default_parameter (identifier_log_file) identifier_log_file (None) None )default_parameter (default_parameter (identifier_runtime_file) identifier_runtime_file (None) None )default_parameter (default_parameter (identifier_hostfile) identifier_hostfile (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_fname) identifier_fname (call (attribute (identifier_TauDEM) identifier_TauDEM (identifier_func_name) identifier_func_name )attribute (argument_list (string_'d8distdowntostream') string_'d8distdowntostream' )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_TauDEM) identifier_TauDEM (identifier_run) identifier_run )attribute (argument_list (call (attribute (identifier_FileClass) identifier_FileClass (identifier_get_executable_fullpath) identifier_get_executable_fullpath )attribute (argument_list (identifier_fname) identifier_fname (identifier_exedir) identifier_exedir )argument_list )call (dictionary (pair (string_'-fel') string_'-fel' (identifier_fel) identifier_fel )pair (pair (string_'-p') string_'-p' (identifier_p) identifier_p )pair (pair (string_'-src') string_'-src' (identifier_src) identifier_src )pair )dictionary (identifier_workingdir) identifier_workingdir (dictionary (pair (string_'-thresh') string_'-thresh' (identifier_thresh) identifier_thresh )pair (pair (string_'-m') string_'-m' (call (attribute (identifier_TauDEM) identifier_TauDEM (identifier_convertdistmethod) identifier_convertdistmethod )attribute (argument_list (identifier_distancemethod) identifier_distancemethod )argument_list )call )pair )dictionary (dictionary (pair (string_'-dist') string_'-dist' (identifier_dist) identifier_dist )pair )dictionary (dictionary (pair (string_'mpipath') string_'mpipath' (identifier_mpiexedir) identifier_mpiexedir )pair (pair (string_'hostfile') string_'hostfile' (identifier_hostfile) identifier_hostfile )pair (pair (string_'n') string_'n' (identifier_np) identifier_np )pair )dictionary (dictionary (pair (string_'logfile') string_'logfile' (identifier_log_file) identifier_log_file )pair (pair (string_'runtimefile') string_'runtimefile' (identifier_runtime_file) identifier_runtime_file )pair )dictionary )argument_list )call )return_statement )block )function_definition )module
Run D8 distance down to stream by different method for distance. This function is extended from d8hdisttostrm by Liangjun. Please clone `TauDEM by lreis2415`_ and compile for this program. .. _TauDEM by lreis2415: https://github.com/lreis2415/TauDEM
(module (function_definition (function_name_on_master_missing) function_name_on_master_missing (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (argument_list (string_"We could not contact the master agency, starting a new one") string_"We could not contact the master agency, starting a new one" )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__starting_master) identifier__starting_master )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (argument_list (string_"Master already starting, waiting for it") string_"Master already starting, waiting for it" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__shutdown_task) identifier__shutdown_task )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (argument_list (concatenated_string (string_"Not spwaning master because we are about to terminate ") string_"Not spwaning master because we are about to terminate " (string_"ourselves") string_"ourselves" )concatenated_string )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__startup_task) identifier__startup_task )attribute (None) None )comparison_operator (block (raise_statement (call (attribute (identifier_error) identifier_error (identifier_FeatError) identifier_FeatError )attribute (argument_list (concatenated_string (string_"Standalone started without a previous ") string_"Standalone started without a previous " (string_"master agency already running, terminating ") string_"master agency already running, terminating " (string_"it") string_"it" )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier__acquire_lock) identifier__acquire_lock )attribute (argument_list )argument_list )call (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__starting_master) identifier__starting_master )attribute (True) True )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__release_lock_cl) identifier__release_lock_cl )attribute (call (attribute (identifier_time) identifier_time (identifier_callLater) identifier_callLater )attribute (argument_list (integer_10) integer_10 (attribute (identifier_self) identifier_self (identifier__release_lock) identifier__release_lock )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__spawn_agency) identifier__spawn_agency )attribute (argument_list (string_'master') string_'master' )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Tries to spawn a master agency if the slave agency failed to connect for several times. To avoid several slave agencies spawning the master agency a file lock is used
(module (function_definition (function_name_add_synonym) function_name_add_synonym (parameters (identifier_self) identifier_self (identifier_syn) identifier_syn )parameters (block (expression_statement (assignment (identifier_n) identifier_n (call (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (argument_list (attribute (identifier_syn) identifier_syn (identifier_class_id) identifier_class_id )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'meta') string_'meta' (identifier_n) identifier_n )comparison_operator (block (expression_statement (assignment (subscript (identifier_n) identifier_n (string_'meta') string_'meta' )subscript (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_meta) identifier_meta (subscript (identifier_n) identifier_n (string_'meta') string_'meta' )subscript )assignment )expression_statement (if_statement (comparison_operator (string_'synonyms') string_'synonyms' (identifier_meta) identifier_meta )comparison_operator (block (expression_statement (assignment (subscript (identifier_meta) identifier_meta (string_'synonyms') string_'synonyms' )subscript (list )list )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (identifier_meta) identifier_meta (string_'synonyms') string_'synonyms' )subscript (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_syn) identifier_syn (identifier_as_dict) identifier_as_dict )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Adds a synonym for a node
(module (function_definition (function_name_parse_lines) function_name_parse_lines (parameters (identifier_self) identifier_self (typed_parameter (identifier_lines) identifier_lines (type (generic_type (identifier_Iterable) identifier_Iterable (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_ParseResults) identifier_ParseResults )type )type_parameter )generic_type )type (block (return_statement (list_comprehension (call (attribute (identifier_self) identifier_self (identifier_parseString) identifier_parseString )attribute (argument_list (identifier_line) identifier_line (identifier_line_number) identifier_line_number )argument_list )call (for_in_clause (pattern_list (identifier_line_number) identifier_line_number (identifier_line) identifier_line )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_lines) identifier_lines )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Parse multiple lines in succession.
(module (function_definition (function_name_format_diff_xml) function_name_format_diff_xml (parameters (identifier_a_xml) identifier_a_xml (identifier_b_xml) identifier_b_xml )parameters (block (return_statement (call (attribute (string_'\n') string_'\n' (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_difflib) identifier_difflib (identifier_ndiff) identifier_ndiff )attribute (argument_list (call (attribute (call (identifier_reformat_to_pretty_xml) identifier_reformat_to_pretty_xml (argument_list (identifier_a_xml) identifier_a_xml )argument_list )call (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call (call (attribute (call (identifier_reformat_to_pretty_xml) identifier_reformat_to_pretty_xml (argument_list (identifier_b_xml) identifier_b_xml )argument_list )call (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Create a diff between two XML documents. Args: a_xml: str b_xml: str Returns: str : `Differ`-style delta
(module (function_definition (function_name__colorize) function_name__colorize (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg (default_parameter (identifier_color) identifier_color (None) None )default_parameter (default_parameter (identifier_encode) identifier_encode (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_colors) identifier_colors (dictionary (pair (string_'red') string_'red' (string_'31') string_'31' )pair (pair (string_'green') string_'green' (string_'32') string_'32' )pair (pair (string_'yellow') string_'yellow' (string_'33') string_'33' )pair )dictionary )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_color) identifier_color )not_operator (not_operator (comparison_operator (identifier_color) identifier_color (identifier_colors) identifier_colors )comparison_operator )not_operator )boolean_operator (block (return_statement (identifier_msg) identifier_msg )return_statement )block )if_statement (if_statement (identifier_encode) identifier_encode (block (return_statement (call (attribute (string_u'\x1b[1;{}m{}\x1b[0m') string_u'\x1b[1;{}m{}\x1b[0m' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_colors) identifier_colors (identifier_color) identifier_color )subscript (identifier_msg) identifier_msg )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (string_'\x1b[1;{}m{}\x1b[0m') string_'\x1b[1;{}m{}\x1b[0m' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_colors) identifier_colors (identifier_color) identifier_color )subscript (identifier_msg) identifier_msg )argument_list )call )return_statement )block )function_definition )module
Colorize a string.