sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_open_subreddit_page) function_name_open_subreddit_page (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_subreddit_page) identifier_subreddit_page )dotted_name )relative_import (dotted_name (identifier_SubredditPage) identifier_SubredditPage )dotted_name )import_from_statement (with_statement (with_clause (with_item (call (attribute (attribute (identifier_self) identifier_self (identifier_term) identifier_term )attribute (identifier_loader) identifier_loader )attribute (argument_list (string_'Loading subreddit') string_'Loading subreddit' )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_page) identifier_page (call (identifier_SubredditPage) identifier_SubredditPage (argument_list (attribute (identifier_self) identifier_self (identifier_reddit) identifier_reddit )attribute (attribute (identifier_self) identifier_self (identifier_term) identifier_term )attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (attribute (identifier_self) identifier_self (identifier_oauth) identifier_oauth )attribute (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block )with_statement (if_statement (not_operator (attribute (attribute (attribute (identifier_self) identifier_self (identifier_term) identifier_term )attribute (identifier_loader) identifier_loader )attribute (identifier_exception) identifier_exception )attribute )not_operator (block (return_statement (identifier_page) identifier_page )return_statement )block )if_statement )block )function_definition )module
Open an instance of the subreddit page for the given subreddit name.
(module (function_definition (function_name__data_update) function_name__data_update (parameters (identifier_subjects) identifier_subjects (identifier_queue) identifier_queue (identifier_run_flag) identifier_run_flag )parameters (block (while_statement (attribute (identifier_run_flag) identifier_run_flag (identifier_running) identifier_running )attribute (block (while_statement (not_operator (call (attribute (identifier_queue) identifier_queue (identifier_empty) identifier_empty )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_queue) identifier_queue (identifier_get) identifier_get )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_subject) identifier_subject (list_comprehension (identifier_s) identifier_s (for_in_clause (identifier_s) identifier_s (identifier_subjects) identifier_subjects )for_in_clause (if_clause (not_operator (attribute (identifier_s) identifier_s (identifier_is_disposed) identifier_is_disposed )attribute )not_operator )if_clause )list_comprehension (block (expression_statement (call (attribute (identifier_subject) identifier_subject (identifier_on_next) identifier_on_next )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement )block )for_statement )block )while_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (float_0.1) float_0.1 )argument_list )call )expression_statement )block )while_statement )block )function_definition )module
Get data from backgound process and notify all subscribed observers with the new data
(module (function_definition (function_name_list_launch_configurations) function_name_list_launch_configurations (parameters (default_parameter (identifier_region) identifier_region (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_keyid) identifier_keyid (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier_get_all_launch_configurations) identifier_get_all_launch_configurations (argument_list (identifier_region) identifier_region (identifier_key) identifier_key (identifier_keyid) identifier_keyid (identifier_profile) identifier_profile )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (attribute (identifier_r) identifier_r (identifier_name) identifier_name )attribute (for_in_clause (identifier_r) identifier_r (identifier_ret) identifier_ret )for_in_clause )list_comprehension )return_statement )block )function_definition )module
List all Launch Configurations. CLI example:: salt myminion boto_asg.list_launch_configurations
(module (function_definition (function_name_volume_delete) function_name_volume_delete (parameters (identifier_pool) identifier_pool (identifier_volume) identifier_volume (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 (try_statement (block (expression_statement (assignment (identifier_vol) identifier_vol (call (identifier__get_storage_vol) identifier__get_storage_vol (argument_list (identifier_conn) identifier_conn (identifier_pool) identifier_pool (identifier_volume) identifier_volume )argument_list )call )assignment )expression_statement (return_statement (not_operator (call (identifier_bool) identifier_bool (argument_list (call (attribute (identifier_vol) identifier_vol (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )argument_list )call )not_operator )return_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Delete a libvirt managed volume. :param pool: libvirt storage pool name :param volume: name of the volume to delete :param connection: libvirt connection URI, overriding defaults :param username: username to connect with, overriding defaults :param password: password to connect with, overriding defaults .. versionadded:: Neon CLI Example: .. code-block:: bash salt "*" virt.volume_delete <pool> <volume>
(module (function_definition (function_name_save_csv) function_name_save_csv (parameters (identifier_p) identifier_p (identifier_sheet) identifier_sheet )parameters (block (expression_statement (string_'Save as single CSV file, handling column names as first line.') string_'Save as single CSV file, handling column names as first line.' )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_p) identifier_p (identifier_open_text) identifier_open_text )attribute (argument_list (keyword_argument (identifier_mode) identifier_mode (string_'w') string_'w' )keyword_argument )argument_list )call (as_pattern_target (identifier_fp) identifier_fp )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_cw) identifier_cw (call (attribute (identifier_csv) identifier_csv (identifier_writer) identifier_writer )attribute (argument_list (identifier_fp) identifier_fp (dictionary_splat (call (identifier_csvoptions) identifier_csvoptions (argument_list )argument_list )call )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_colnames) identifier_colnames (list_comprehension (attribute (identifier_col) identifier_col (identifier_name) identifier_name )attribute (for_in_clause (identifier_col) identifier_col (attribute (identifier_sheet) identifier_sheet (identifier_visibleCols) identifier_visibleCols )attribute )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (identifier_colnames) identifier_colnames )argument_list )call (block (expression_statement (call (attribute (identifier_cw) identifier_cw (identifier_writerow) identifier_writerow )attribute (argument_list (identifier_colnames) identifier_colnames )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_r) identifier_r (call (identifier_Progress) identifier_Progress (argument_list (attribute (identifier_sheet) identifier_sheet (identifier_rows) identifier_rows )attribute (string_'saving') string_'saving' )argument_list )call (block (expression_statement (call (attribute (identifier_cw) identifier_cw (identifier_writerow) identifier_writerow )attribute (argument_list (list_comprehension (call (attribute (identifier_col) identifier_col (identifier_getDisplayValue) identifier_getDisplayValue )attribute (argument_list (identifier_r) identifier_r )argument_list )call (for_in_clause (identifier_col) identifier_col (attribute (identifier_sheet) identifier_sheet (identifier_visibleCols) identifier_visibleCols )attribute )for_in_clause )list_comprehension )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Save as single CSV file, handling column names as first line.
(module (function_definition (function_name_random) function_name_random (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_indexer) identifier_indexer (call (identifier_Random) identifier_Random (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add) identifier_add )attribute (argument_list (identifier_indexer) identifier_indexer )argument_list )call )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Add a random index. Shortcut of :class:`recordlinkage.index.Random`:: from recordlinkage.index import Random indexer = recordlinkage.Index() indexer.add(Random())
(module (function_definition (function_name_create) function_name_create (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_network) identifier_network )parameters (block (if_statement (not_operator (comparison_operator (identifier_network) identifier_network (identifier_SUPPORTED_NETWORKS) identifier_SUPPORTED_NETWORKS )comparison_operator )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Network not valid!') string_'Network not valid!' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_account) identifier_account (call (attribute (identifier_self) identifier_self (identifier_wrap) identifier_wrap )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_resource) identifier_resource )attribute (identifier_create) identifier_create )attribute (argument_list (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_network) identifier_network (identifier_network) identifier_network )keyword_argument )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add) identifier_add )attribute (argument_list (identifier_account) identifier_account )argument_list )call )expression_statement (return_statement (identifier_account) identifier_account )return_statement )block )function_definition )module
Create a new Account object and add it to this Accounts collection. Args: name (str): Account name network (str): Type of cryptocurrency. Can be one of, 'bitcoin', ' bitcoin_testnet', 'litecoin', 'dogecoin'. Returns: The new round.Account
(module (function_definition (function_name_get_peak_mem) function_name_get_peak_mem (parameters )parameters (block (import_statement (dotted_name (identifier_resource) identifier_resource )dotted_name )import_statement (expression_statement (assignment (identifier_rusage_denom) identifier_rusage_denom (float_1024.) float_1024. )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_sys) identifier_sys (identifier_platform) identifier_platform )attribute (string_'darwin') string_'darwin' )comparison_operator (block (expression_statement (assignment (identifier_rusage_denom) identifier_rusage_denom (binary_operator (identifier_rusage_denom) identifier_rusage_denom (identifier_rusage_denom) identifier_rusage_denom )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_mem) identifier_mem (binary_operator (attribute (call (attribute (identifier_resource) identifier_resource (identifier_getrusage) identifier_getrusage )attribute (argument_list (attribute (identifier_resource) identifier_resource (identifier_RUSAGE_SELF) identifier_RUSAGE_SELF )attribute )argument_list )call (identifier_ru_maxrss) identifier_ru_maxrss )attribute (identifier_rusage_denom) identifier_rusage_denom )binary_operator )assignment )expression_statement (return_statement (identifier_mem) identifier_mem )return_statement )block )function_definition )module
this returns peak memory use since process starts till the moment its called
(module (function_definition (function_name_img2code) function_name_img2code (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_img) identifier_img )parameters (block (expression_statement (assignment (identifier_code_template) identifier_code_template (binary_operator (string_"wx.ImageFromData({width}, {height}, ") string_"wx.ImageFromData({width}, {height}, " (string_"bz2.decompress(base64.b64decode('{data}'))).ConvertToBitmap()") string_"bz2.decompress(base64.b64decode('{data}'))).ConvertToBitmap()" )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_code_alpha_template) identifier_code_alpha_template (binary_operator (binary_operator (string_"wx.ImageFromDataWithAlpha({width}, {height}, ") string_"wx.ImageFromDataWithAlpha({width}, {height}, " (string_"bz2.decompress(base64.b64decode('{data}')), ") string_"bz2.decompress(base64.b64decode('{data}')), " )binary_operator (string_"bz2.decompress(base64.b64decode('{alpha}'))).ConvertToBitmap()") string_"bz2.decompress(base64.b64decode('{alpha}'))).ConvertToBitmap()" )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_base64) identifier_base64 (identifier_b64encode) identifier_b64encode )attribute (argument_list (call (attribute (identifier_bz2) identifier_bz2 (identifier_compress) identifier_compress )attribute (argument_list (call (attribute (identifier_img) identifier_img (identifier_GetData) identifier_GetData )attribute (argument_list )argument_list )call (integer_9) integer_9 )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_img) identifier_img (identifier_HasAlpha) identifier_HasAlpha )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_alpha) identifier_alpha (call (attribute (identifier_base64) identifier_base64 (identifier_b64encode) identifier_b64encode )attribute (argument_list (call (attribute (identifier_bz2) identifier_bz2 (identifier_compress) identifier_compress )attribute (argument_list (call (attribute (identifier_img) identifier_img (identifier_GetAlphaData) identifier_GetAlphaData )attribute (argument_list )argument_list )call (integer_9) integer_9 )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_code_str) identifier_code_str (call (attribute (identifier_code_alpha_template) identifier_code_alpha_template (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_width) identifier_width (call (attribute (identifier_img) identifier_img (identifier_GetWidth) identifier_GetWidth )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_height) identifier_height (call (attribute (identifier_img) identifier_img (identifier_GetHeight) identifier_GetHeight )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_alpha) identifier_alpha (identifier_alpha) identifier_alpha )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_code_str) identifier_code_str (call (attribute (identifier_code_template) identifier_code_template (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_width) identifier_width (call (attribute (identifier_img) identifier_img (identifier_GetWidth) identifier_GetWidth )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_height) identifier_height (call (attribute (identifier_img) identifier_img (identifier_GetHeight) identifier_GetHeight )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_code_str) identifier_code_str )return_statement )block )function_definition )module
Pastes wx.Image into single cell
(module (function_definition (function_name_register) function_name_register (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ConfigurableMeta) identifier_ConfigurableMeta (identifier_self) identifier_self )argument_list )call (identifier_register) identifier_register )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat )argument_list )call )expression_statement (import_from_statement (dotted_name (identifier_hfos) identifier_hfos (identifier_database) identifier_database )dotted_name (dotted_name (identifier_configschemastore) identifier_configschemastore )dotted_name )import_from_statement (expression_statement (assignment (subscript (identifier_configschemastore) identifier_configschemastore (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )subscript (attribute (identifier_self) identifier_self (identifier_configschema) identifier_configschema )attribute )assignment )expression_statement )block )function_definition )module
Register a configurable component in the configuration schema store
(module (function_definition (function_name_update_snapshot) function_name_update_snapshot (parameters (identifier_self) identifier_self (identifier_snapshot) identifier_snapshot (default_parameter (identifier_display_name) identifier_display_name (None) None )default_parameter (default_parameter (identifier_display_description) identifier_display_description (None) None )default_parameter )parameters (block (return_statement (call (attribute (identifier_snapshot) identifier_snapshot (identifier_update) identifier_update )attribute (argument_list (keyword_argument (identifier_display_name) identifier_display_name (identifier_display_name) identifier_display_name )keyword_argument (keyword_argument (identifier_display_description) identifier_display_description (identifier_display_description) identifier_display_description )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Update the specified values on the specified snapshot. You may specify one or more values to update.
(module (function_definition (function_name_fit) function_name_fit (parameters (identifier_self) identifier_self (identifier_col) identifier_col )parameters (block (expression_statement (assignment (identifier_dates) identifier_dates (call (attribute (identifier_self) identifier_self (identifier_safe_datetime_cast) identifier_safe_datetime_cast )attribute (argument_list (identifier_col) identifier_col )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_default_val) identifier_default_val )attribute (binary_operator (call (attribute (subscript (attribute (call (attribute (call (attribute (identifier_dates) identifier_dates (identifier_groupby) identifier_groupby )attribute (argument_list (identifier_dates) identifier_dates )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call (identifier_index) identifier_index )attribute (integer_0) integer_0 )subscript (identifier_timestamp) identifier_timestamp )attribute (argument_list )argument_list )call (float_1e9) float_1e9 )binary_operator )assignment )expression_statement )block )function_definition )module
Prepare the transformer to convert data. Args: col(pandas.DataFrame): Data to transform. Returns: None
(module (function_definition (function_name_certify_parameter) function_name_certify_parameter (parameters (identifier_certifier) identifier_certifier (identifier_name) identifier_name (identifier_value) identifier_value (default_parameter (identifier_kwargs) identifier_kwargs (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (call (identifier_certifier) identifier_certifier (argument_list (identifier_value) identifier_value (dictionary_splat (boolean_operator (identifier_kwargs) identifier_kwargs (dictionary )dictionary )boolean_operator )dictionary_splat )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_CertifierError) identifier_CertifierError (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_six) identifier_six (identifier_raise_from) identifier_raise_from )attribute (argument_list (call (identifier_CertifierParamError) identifier_CertifierParamError (argument_list (identifier_name) identifier_name (identifier_value) identifier_value )argument_list )call (identifier_err) identifier_err )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Internal certifier for kwargs passed to Certifiable public methods. :param callable certifier: The certifier to use :param str name: The name of the kwargs :param object value: The value of the kwarg. :param bool required: Is the param required. Default=False. :raises CertifierParamError: A parameter failed internal certification.
(module (function_definition (function_name_viterbi_alignment) function_name_viterbi_alignment (parameters (identifier_es) identifier_es (identifier_fs) identifier_fs (identifier_t) identifier_t (identifier_a) identifier_a )parameters (block (expression_statement (assignment (identifier_max_a) identifier_max_a (call (attribute (identifier_collections) identifier_collections (identifier_defaultdict) identifier_defaultdict )attribute (argument_list (identifier_float) identifier_float )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_l_e) identifier_l_e (call (identifier_len) identifier_len (argument_list (identifier_es) identifier_es )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_l_f) identifier_l_f (call (identifier_len) identifier_len (argument_list (identifier_fs) identifier_fs )argument_list )call )assignment )expression_statement (for_statement (tuple_pattern (identifier_j) identifier_j (identifier_e) identifier_e )tuple_pattern (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_es) identifier_es (integer_1) integer_1 )argument_list )call (block (expression_statement (assignment (identifier_current_max) identifier_current_max (tuple (integer_0) integer_0 (unary_operator (integer_1) integer_1 )unary_operator )tuple )assignment )expression_statement (for_statement (tuple_pattern (identifier_i) identifier_i (identifier_f) identifier_f )tuple_pattern (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_fs) identifier_fs (integer_1) integer_1 )argument_list )call (block (expression_statement (assignment (identifier_val) identifier_val (binary_operator (subscript (identifier_t) identifier_t (tuple (identifier_e) identifier_e (identifier_f) identifier_f )tuple )subscript (subscript (identifier_a) identifier_a (tuple (identifier_i) identifier_i (identifier_j) identifier_j (identifier_l_e) identifier_l_e (identifier_l_f) identifier_l_f )tuple )subscript )binary_operator )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_current_max) identifier_current_max (integer_1) integer_1 )subscript (identifier_val) identifier_val )comparison_operator (block (expression_statement (assignment (identifier_current_max) identifier_current_max (tuple (identifier_i) identifier_i (identifier_val) identifier_val )tuple )assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_max_a) identifier_max_a (identifier_j) identifier_j )subscript (subscript (identifier_current_max) identifier_current_max (integer_0) integer_0 )subscript )assignment )expression_statement )block )for_statement (return_statement (identifier_max_a) identifier_max_a )return_statement )block )function_definition )module
return dictionary e in es -> f in fs
(module (function_definition (function_name__to_list) function_name__to_list (parameters (identifier_obj) identifier_obj )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_attr) identifier_attr (identifier___attrs) identifier___attrs (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_obj) identifier_obj (identifier_attr) identifier_attr )argument_list )call (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_attr) identifier_attr )subscript (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (identifier_attr) identifier_attr )argument_list )call )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Convert snetinfo object to list
(module (function_definition (function_name_uri) function_name_uri (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_url_for) identifier_url_for (argument_list (call (attribute (string_'.{0}_files') string_'.{0}_files' (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_pid) identifier_pid )attribute (identifier_pid_type) identifier_pid_type )attribute )argument_list )call (keyword_argument (identifier_pid_value) identifier_pid_value (attribute (attribute (identifier_self) identifier_self (identifier_pid) identifier_pid )attribute (identifier_pid_value) identifier_pid_value )attribute )keyword_argument (keyword_argument (identifier_filename) identifier_filename (attribute (attribute (identifier_self) identifier_self (identifier_file) identifier_file )attribute (identifier_key) identifier_key )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get file download link. .. note:: The URI generation assumes that you can download the file using the view ``invenio_records_ui.<pid_type>_files``.
(module (function_definition (function_name_patch_os_module) function_name_patch_os_module (parameters )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_os) identifier_os (string_'symlink') string_'symlink' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_os) identifier_os (identifier_symlink) identifier_symlink )attribute (identifier_symlink) identifier_symlink )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_islink) identifier_islink )attribute (identifier_islink) identifier_islink )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_os) identifier_os (string_'readlink') string_'readlink' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_os) identifier_os (identifier_readlink) identifier_readlink )attribute (identifier_readlink) identifier_readlink )assignment )expression_statement )block )if_statement )block )function_definition )module
jaraco.windows provides the os.symlink and os.readlink functions. Monkey-patch the os module to include them if not present.
(module (function_definition (function_name__check_states_enum) function_name__check_states_enum (parameters (identifier_cls) identifier_cls )parameters (block (expression_statement (assignment (identifier_states_enum_name) identifier_states_enum_name (call (attribute (attribute (identifier_cls) identifier_cls (identifier_context) identifier_context )attribute (identifier_get_config) identifier_get_config )attribute (argument_list (string_'states_enum_name') string_'states_enum_name' )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (subscript (attribute (identifier_cls) identifier_cls (identifier_context) identifier_context )attribute (string_'states_enum') string_'states_enum' )subscript (call (identifier_getattr) identifier_getattr (argument_list (attribute (attribute (identifier_cls) identifier_cls (identifier_context) identifier_context )attribute (identifier_new_class) identifier_new_class )attribute (identifier_states_enum_name) identifier_states_enum_name )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'No states enum given!') string_'No states enum given!' )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_proper) identifier_proper (True) True )assignment )expression_statement (try_statement (block (if_statement (not_operator (call (identifier_issubclass) identifier_issubclass (argument_list (attribute (attribute (identifier_cls) identifier_cls (identifier_context) identifier_context )attribute (identifier_states_enum) identifier_states_enum )attribute (identifier_Enum) identifier_Enum )argument_list )call )not_operator (block (expression_statement (assignment (identifier_proper) identifier_proper (False) False )assignment )expression_statement )block )if_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (assignment (identifier_proper) identifier_proper (False) False )assignment )expression_statement )block )except_clause )try_statement (if_statement (not_operator (identifier_proper) identifier_proper )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Please provide enum instance to define available states.') string_'Please provide enum instance to define available states.' )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Check if states enum exists and is proper one.
(module (function_definition (function_name_copy) function_name_copy (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (argument_list (identifier_self) identifier_self (keyword_argument (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier__keyfn) identifier__keyfn )attribute )keyword_argument (keyword_argument (identifier_precedes) identifier_precedes (attribute (identifier_self) identifier_self (identifier__precedes) identifier__precedes )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a shallow copy of a pqdict.
(module (function_definition (function_name_serialize_attrs) function_name_serialize_attrs (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_cls) identifier_cls (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_a) identifier_a (identifier_args) identifier_args (block (if_statement (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_cls) identifier_cls (identifier_a) identifier_a )argument_list )call (comparison_operator (identifier_a) identifier_a (call (attribute (identifier_cls) identifier_cls (identifier_attrs_forbidden_for_serialization) identifier_attrs_forbidden_for_serialization )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_val) identifier_val (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_a) identifier_a )argument_list )call )assignment )expression_statement (if_statement (call (identifier_is_list_like) identifier_is_list_like (argument_list (identifier_val) identifier_val )argument_list )call (block (expression_statement (assignment (subscript (identifier_result) identifier_result (identifier_a) identifier_a )subscript (call (identifier_list) identifier_list (argument_list (identifier_val) identifier_val )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_result) identifier_result (identifier_a) identifier_a )subscript (identifier_val) identifier_val )assignment )expression_statement )block )else_clause )if_statement )block )if_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Converts and instance to a dictionary with only the specified attributes as keys Args: *args (list): The attributes to serialize Examples: >>> customer = Customer.create(name="James Bond", email="007@mi.com", phone="007", city="London") >>> customer.serialize_attrs('name', 'email') {'name': u'James Bond', 'email': u'007@mi.com'}
(module (function_definition (function_name_are_equal) function_name_are_equal (parameters (identifier_value1) identifier_value1 (identifier_value2) identifier_value2 )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_value1) identifier_value1 (None) None )comparison_operator (comparison_operator (identifier_value2) identifier_value2 (None) None )comparison_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_value1) identifier_value1 (None) None )comparison_operator (comparison_operator (identifier_value2) identifier_value2 (None) None )comparison_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (comparison_operator (identifier_value1) identifier_value1 (identifier_value2) identifier_value2 )comparison_operator )return_statement )block )function_definition )module
Checks if two values are equal. The operation can be performed over values of any type. :param value1: the first value to compare :param value2: the second value to compare :return: true if values are equal and false otherwise
(module (function_definition (function_name_replace) function_name_replace (parameters (identifier_zpool) identifier_zpool (identifier_old_device) identifier_old_device (default_parameter (identifier_new_device) identifier_new_device (None) None )default_parameter (default_parameter (identifier_force) identifier_force (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_flags) identifier_flags (list )list )assignment )expression_statement (expression_statement (assignment (identifier_target) identifier_target (list )list )assignment )expression_statement (if_statement (identifier_force) identifier_force (block (expression_statement (call (attribute (identifier_flags) identifier_flags (identifier_append) identifier_append )attribute (argument_list (string_'-f') string_'-f' )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_target) identifier_target (identifier_append) identifier_append )attribute (argument_list (identifier_zpool) identifier_zpool )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_target) identifier_target (identifier_append) identifier_append )attribute (argument_list (identifier_old_device) identifier_old_device )argument_list )call )expression_statement (if_statement (identifier_new_device) identifier_new_device (block (expression_statement (call (attribute (identifier_target) identifier_target (identifier_append) identifier_append )attribute (argument_list (identifier_new_device) identifier_new_device )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_res) identifier_res (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run_all') string_'cmd.run_all' )subscript (argument_list (call (subscript (identifier___utils__) identifier___utils__ (string_'zfs.zpool_command') string_'zfs.zpool_command' )subscript (argument_list (keyword_argument (identifier_command) identifier_command (string_'replace') string_'replace' )keyword_argument (keyword_argument (identifier_flags) identifier_flags (identifier_flags) identifier_flags )keyword_argument (keyword_argument (identifier_target) identifier_target (identifier_target) identifier_target )keyword_argument )argument_list )call (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (subscript (identifier___utils__) identifier___utils__ (string_'zfs.parse_command_result') string_'zfs.parse_command_result' )subscript (argument_list (identifier_res) identifier_res (string_'replaced') string_'replaced' )argument_list )call )assignment )expression_statement (if_statement (subscript (identifier_ret) identifier_ret (string_'replaced') string_'replaced' )subscript (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'vdevs') string_'vdevs' )subscript (call (identifier__clean_vdev_config) identifier__clean_vdev_config (argument_list (subscript (subscript (subscript (call (subscript (identifier___salt__) identifier___salt__ (string_'zpool.status') string_'zpool.status' )subscript (argument_list (keyword_argument (identifier_zpool) identifier_zpool (identifier_zpool) identifier_zpool )keyword_argument )argument_list )call (identifier_zpool) identifier_zpool )subscript (string_'config') string_'config' )subscript (identifier_zpool) identifier_zpool )subscript )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Replaces ``old_device`` with ``new_device`` .. note:: This is equivalent to attaching ``new_device``, waiting for it to resilver, and then detaching ``old_device``. The size of ``new_device`` must be greater than or equal to the minimum size of all the devices in a mirror or raidz configuration. zpool : string Name of storage pool old_device : string Old device to replace new_device : string Optional new device force : boolean Forces use of new_device, even if its appears to be in use. CLI Example: .. code-block:: bash salt '*' zpool.replace myzpool /path/to/vdev1 /path/to/vdev2
(module (function_definition (function_name_is_ancestor_of_book) function_name_is_ancestor_of_book (parameters (identifier_self) identifier_self (identifier_id_) identifier_id_ (identifier_book_id) identifier_book_id )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (None) None )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (identifier_is_ancestor_of_catalog) identifier_is_ancestor_of_catalog )attribute (argument_list (keyword_argument (identifier_id_) identifier_id_ (identifier_id_) identifier_id_ )keyword_argument (keyword_argument (identifier_catalog_id) identifier_catalog_id (identifier_book_id) identifier_book_id )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__hierarchy_session) identifier__hierarchy_session )attribute (identifier_is_ancestor) identifier_is_ancestor )attribute (argument_list (keyword_argument (identifier_id_) identifier_id_ (identifier_id_) identifier_id_ )keyword_argument (keyword_argument (identifier_ancestor_id) identifier_ancestor_id (identifier_book_id) identifier_book_id )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Tests if an ``Id`` is an ancestor of a book. arg: id (osid.id.Id): an ``Id`` arg: book_id (osid.id.Id): the ``Id`` of a book return: (boolean) - ``tru`` e if this ``id`` is an ancestor of ``book_id,`` ``false`` otherwise raise: NotFound - ``book_id`` is not found raise: NullArgument - ``id`` or ``book_id`` is ``null`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.* *implementation notes*: If ``id`` not found return ``false``.
(module (function_definition (function_name_train) function_name_train (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_objs) identifier_objs (call (attribute (identifier_self) identifier_self (identifier__do_transform) identifier__do_transform )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_obj_list) identifier_obj_list (conditional_expression (list (identifier_objs) identifier_objs )list (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_objs) identifier_objs (identifier_Iterable) identifier_Iterable )argument_list )call )not_operator (identifier_objs) identifier_objs )conditional_expression )assignment )expression_statement (for_statement (identifier_obj) identifier_obj (identifier_obj_list) identifier_obj_list (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_ODPSModelExpr) identifier_ODPSModelExpr )argument_list )call )not_operator (block (continue_statement )continue_statement )block )if_statement (for_statement (identifier_meta) identifier_meta (list (string_'predictor') string_'predictor' (string_'recommender') string_'recommender' )list (block (if_statement (comparison_operator (identifier_meta) identifier_meta (attribute (identifier_self) identifier_self (identifier__metas) identifier__metas )attribute )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_mod) identifier_mod (conditional_expression (call (identifier___import__) identifier___import__ (argument_list (attribute (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___module__) identifier___module__ )attribute (identifier___name__) identifier___name__ )attribute (keyword_argument (identifier_fromlist) identifier_fromlist (list (string_'') string_'' )list )keyword_argument )argument_list )call (line_continuation_\) line_continuation_\ (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_env') string_'_env' )argument_list )call )not_operator (attribute (identifier_self) identifier_self (identifier__env) identifier__env )attribute )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_action_cls_name) identifier_action_cls_name (call (identifier_underline_to_capitalized) identifier_underline_to_capitalized (argument_list (subscript (attribute (identifier_self) identifier_self (identifier__metas) identifier__metas )attribute (identifier_meta) identifier_meta )subscript )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_mod) identifier_mod (identifier_action_cls_name) identifier_action_cls_name )argument_list )call )not_operator (block (expression_statement (assignment (identifier_action_cls_name) identifier_action_cls_name (binary_operator (string_'_') string_'_' (identifier_action_cls_name) identifier_action_cls_name )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_obj) identifier_obj (binary_operator (string_'_') string_'_' (identifier_meta) identifier_meta )binary_operator (binary_operator (binary_operator (identifier_mod) identifier_mod (string_'.') string_'.' )binary_operator (identifier_action_cls_name) identifier_action_cls_name )binary_operator )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_objs) identifier_objs )return_statement )block )function_definition )module
Perform training on a DataFrame. The label field is specified by the ``label_field`` method. :param train_data: DataFrame to be trained. Label field must be specified. :type train_data: DataFrame :return: Trained model :rtype: MLModel
(module (function_definition (function_name__generate_to_tempfile) function_name__generate_to_tempfile (parameters (identifier_self) identifier_self (identifier_generator) identifier_generator )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_temporary_file) identifier_temporary_file (argument_list (keyword_argument (identifier_cleanup) identifier_cleanup (False) False )keyword_argument (keyword_argument (identifier_binary_mode) identifier_binary_mode (False) False )keyword_argument )argument_list )call (as_pattern_target (identifier_output) identifier_output )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_generator) identifier_generator (identifier_write) identifier_write )attribute (argument_list (identifier_output) identifier_output )argument_list )call )expression_statement (return_statement (attribute (identifier_output) identifier_output (identifier_name) identifier_name )attribute )return_statement )block )with_statement )block )function_definition )module
Applies the specified generator to a temp file and returns the path to that file. We generate into a temp file so that we don't lose any manual customizations on error.
(module (function_definition (function_name__dat_read_params) function_name__dat_read_params (parameters (identifier_fmt) identifier_fmt (identifier_sig_len) identifier_sig_len (identifier_byte_offset) identifier_byte_offset (identifier_skew) identifier_skew (identifier_tsamps_per_frame) identifier_tsamps_per_frame (identifier_sampfrom) identifier_sampfrom (identifier_sampto) identifier_sampto )parameters (block (expression_statement (assignment (identifier_start_flat_sample) identifier_start_flat_sample (binary_operator (identifier_sampfrom) identifier_sampfrom (identifier_tsamps_per_frame) identifier_tsamps_per_frame )binary_operator )assignment )expression_statement (if_statement (comparison_operator (parenthesized_expression (binary_operator (identifier_sampto) identifier_sampto (call (identifier_max) identifier_max (argument_list (identifier_skew) identifier_skew )argument_list )call )binary_operator )parenthesized_expression (identifier_sig_len) identifier_sig_len )comparison_operator (block (expression_statement (assignment (identifier_end_flat_sample) identifier_end_flat_sample (binary_operator (identifier_sig_len) identifier_sig_len (identifier_tsamps_per_frame) identifier_tsamps_per_frame )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_extra_flat_samples) identifier_extra_flat_samples (binary_operator (parenthesized_expression (binary_operator (binary_operator (identifier_sampto) identifier_sampto (call (identifier_max) identifier_max (argument_list (identifier_skew) identifier_skew )argument_list )call )binary_operator (identifier_sig_len) identifier_sig_len )binary_operator )parenthesized_expression (identifier_tsamps_per_frame) identifier_tsamps_per_frame )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_end_flat_sample) identifier_end_flat_sample (binary_operator (parenthesized_expression (binary_operator (identifier_sampto) identifier_sampto (call (identifier_max) identifier_max (argument_list (identifier_skew) identifier_skew )argument_list )call )binary_operator )parenthesized_expression (identifier_tsamps_per_frame) identifier_tsamps_per_frame )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_extra_flat_samples) identifier_extra_flat_samples (integer_0) integer_0 )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_fmt) identifier_fmt (string_'212') string_'212' )comparison_operator (block (expression_statement (assignment (identifier_block_floor_samples) identifier_block_floor_samples (binary_operator (identifier_start_flat_sample) identifier_start_flat_sample (integer_2) integer_2 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_start_flat_sample) identifier_start_flat_sample (binary_operator (identifier_start_flat_sample) identifier_start_flat_sample (identifier_block_floor_samples) identifier_block_floor_samples )binary_operator )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_fmt) identifier_fmt (list (string_'310') string_'310' (string_'311') string_'311' )list )comparison_operator (block (expression_statement (assignment (identifier_block_floor_samples) identifier_block_floor_samples (binary_operator (identifier_start_flat_sample) identifier_start_flat_sample (integer_3) integer_3 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_start_flat_sample) identifier_start_flat_sample (binary_operator (identifier_start_flat_sample) identifier_start_flat_sample (identifier_block_floor_samples) identifier_block_floor_samples )binary_operator )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_block_floor_samples) identifier_block_floor_samples (integer_0) integer_0 )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_start_byte) identifier_start_byte (binary_operator (identifier_byte_offset) identifier_byte_offset (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_start_flat_sample) identifier_start_flat_sample (subscript (identifier_BYTES_PER_SAMPLE) identifier_BYTES_PER_SAMPLE (identifier_fmt) identifier_fmt )subscript )binary_operator )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_n_read_samples) identifier_n_read_samples (binary_operator (identifier_end_flat_sample) identifier_end_flat_sample (identifier_start_flat_sample) identifier_start_flat_sample )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_nan_replace) identifier_nan_replace (list_comprehension (call (identifier_max) identifier_max (argument_list (integer_0) integer_0 (binary_operator (binary_operator (identifier_sampto) identifier_sampto (identifier_s) identifier_s )binary_operator (identifier_sig_len) identifier_sig_len )binary_operator )argument_list )call (for_in_clause (identifier_s) identifier_s (identifier_skew) identifier_skew )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (tuple (identifier_start_byte) identifier_start_byte (identifier_n_read_samples) identifier_n_read_samples (identifier_block_floor_samples) identifier_block_floor_samples (identifier_extra_flat_samples) identifier_extra_flat_samples (identifier_nan_replace) identifier_nan_replace )tuple )return_statement )block )function_definition )module
Calculate the parameters used to read and process a dat file, given its layout, and the desired sample range. Parameters ---------- fmt : str The format of the dat file sig_len : int The signal length (per channel) of the dat file byte_offset : int The byte offset of the dat file skew : list The skew for the signals of the dat file tsamps_per_frame : int The total samples/frame for all channels of the dat file sampfrom : int The starting sample number to be read from the signals sampto : int The final sample number to be read from the signals Returns ------- start_byte : int The starting byte to read the dat file from. Always points to the start of a byte block for special formats. n_read_samples : int The number of flat samples to read from the dat file. block_floor_samples : int The extra samples read prior to the first desired sample, for special formats, in order to ensure entire byte blocks are read. extra_flat_samples : int The extra samples desired beyond what is contained in the file. nan_replace : list The number of samples to replace with nan at the end of each signal, due to skew wanting samples beyond the file. Examples -------- sig_len=100, t = 4 (total samples/frame), skew = [0, 2, 4, 5] sampfrom=0, sampto=100 --> read_len = 100, n_sampread = 100*t, extralen = 5, nan_replace = [0, 2, 4, 5] sampfrom=50, sampto=100 --> read_len = 50, n_sampread = 50*t, extralen = 5, nan_replace = [0, 2, 4, 5] sampfrom=0, sampto=50 --> read_len = 50, n_sampread = 55*t, extralen = 0, nan_replace = [0, 0, 0, 0] sampfrom=95, sampto=99 --> read_len = 4, n_sampread = 5*t, extralen = 4, nan_replace = [0, 1, 3, 4]
(module (function_definition (function_name_unwrap_raw) function_name_unwrap_raw (parameters (identifier_content) identifier_content )parameters (block (expression_statement (assignment (identifier_starting_symbol) identifier_starting_symbol (call (identifier_get_start_symbol) identifier_get_start_symbol (argument_list (identifier_content) identifier_content )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ending_symbol) identifier_ending_symbol (conditional_expression (string_']') string_']' (comparison_operator (identifier_starting_symbol) identifier_starting_symbol (string_'[') string_'[' )comparison_operator (string_'}') string_'}' )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_start) identifier_start (call (attribute (identifier_content) identifier_content (identifier_find) identifier_find )attribute (argument_list (identifier_starting_symbol) identifier_starting_symbol (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_end) identifier_end (call (attribute (identifier_content) identifier_content (identifier_rfind) identifier_rfind )attribute (argument_list (identifier_ending_symbol) identifier_ending_symbol )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_content) identifier_content (slice (identifier_start) identifier_start (colon) colon (binary_operator (identifier_end) identifier_end (integer_1) integer_1 )binary_operator )slice )subscript )return_statement )block )function_definition )module
unwraps the callback and returns the raw content
(module (function_definition (function_name_is_bootstrapped) function_name_is_bootstrapped (parameters (identifier_metadata) identifier_metadata )parameters (block (expression_statement (assignment (identifier_fields) identifier_fields (binary_operator (identifier_UNIHAN_FIELDS) identifier_UNIHAN_FIELDS (identifier_DEFAULT_COLUMNS) identifier_DEFAULT_COLUMNS )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_TABLE_NAME) identifier_TABLE_NAME (call (attribute (attribute (identifier_metadata) identifier_metadata (identifier_tables) identifier_tables )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_table) identifier_table (subscript (attribute (identifier_metadata) identifier_metadata (identifier_tables) identifier_tables )attribute (identifier_TABLE_NAME) identifier_TABLE_NAME )subscript )assignment )expression_statement (if_statement (comparison_operator (call (identifier_set) identifier_set (argument_list (identifier_fields) identifier_fields )argument_list )call (call (identifier_set) identifier_set (generator_expression (attribute (identifier_c) identifier_c (identifier_name) identifier_name )attribute (for_in_clause (identifier_c) identifier_c (attribute (identifier_table) identifier_table (identifier_columns) identifier_columns )attribute )for_in_clause )generator_expression )call )comparison_operator (block (return_statement (True) True )return_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )function_definition )module
Return True if cihai is correctly bootstrapped.
(module (function_definition (function_name_add_signature) function_name_add_signature (parameters (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_inputs) identifier_inputs (None) None )default_parameter (default_parameter (identifier_outputs) identifier_outputs (None) None )default_parameter )parameters (block (if_statement (not_operator (identifier_name) identifier_name )not_operator (block (expression_statement (assignment (identifier_name) identifier_name (string_"default") string_"default" )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_inputs) identifier_inputs (None) None )comparison_operator (block (expression_statement (assignment (identifier_inputs) identifier_inputs (dictionary )dictionary )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_outputs) identifier_outputs (None) None )comparison_operator (block (expression_statement (assignment (identifier_outputs) identifier_outputs (dictionary )dictionary )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_inputs) identifier_inputs (identifier_dict) identifier_dict )argument_list )call )not_operator (block (expression_statement (assignment (identifier_inputs) identifier_inputs (dictionary (pair (string_"default") string_"default" (identifier_inputs) identifier_inputs )pair )dictionary )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_outputs) identifier_outputs (identifier_dict) identifier_dict )argument_list )call )not_operator (block (expression_statement (assignment (identifier_outputs) identifier_outputs (dictionary (pair (string_"default") string_"default" (identifier_outputs) identifier_outputs )pair )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_message) identifier_message (call (identifier_find_signature_inputs_from_multivalued_ops) identifier_find_signature_inputs_from_multivalued_ops (argument_list (identifier_inputs) identifier_inputs )argument_list )call )assignment )expression_statement (if_statement (identifier_message) identifier_message (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (identifier_message) identifier_message )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_message) identifier_message (call (identifier_find_signature_input_colocation_error) identifier_find_signature_input_colocation_error (argument_list (identifier_name) identifier_name (identifier_inputs) identifier_inputs )argument_list )call )assignment )expression_statement (if_statement (identifier_message) identifier_message (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_saved_model_lib) identifier_saved_model_lib (identifier_add_signature) identifier_add_signature )attribute (argument_list (identifier_name) identifier_name (identifier_inputs) identifier_inputs (identifier_outputs) identifier_outputs )argument_list )call )expression_statement )block )function_definition )module
Adds a signature to the module definition. NOTE: This must be called within a `module_fn` that is defining a Module. Args: name: Signature name as a string. If omitted, it is interpreted as 'default' and is the signature used when `Module.__call__` `signature` is not specified. inputs: A dict from input name to Tensor or SparseTensor to feed when applying the signature. If a single tensor is passed, it is interpreted as a dict with a single 'default' entry. outputs: A dict from output name to Tensor or SparseTensor to return from applying the signature. If a single tensor is passed, it is interpreted as a dict with a single 'default' entry. Raises: ValueError: if the arguments are invalid.
(module (function_definition (function_name_find_occurrences) function_name_find_occurrences (parameters (identifier_self) identifier_self (default_parameter (identifier_resource) identifier_resource (None) None )default_parameter (default_parameter (identifier_pymodule) identifier_pymodule (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_tools) identifier_tools (call (identifier__OccurrenceToolsCreator) identifier__OccurrenceToolsCreator (argument_list (attribute (identifier_self) identifier_self (identifier_project) identifier_project )attribute (keyword_argument (identifier_resource) identifier_resource (identifier_resource) identifier_resource )keyword_argument (keyword_argument (identifier_pymodule) identifier_pymodule (identifier_pymodule) identifier_pymodule )keyword_argument (keyword_argument (identifier_docs) identifier_docs (attribute (identifier_self) identifier_self (identifier_docs) identifier_docs )attribute )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_offset) identifier_offset (call (attribute (attribute (identifier_self) identifier_self (identifier__textual_finder) identifier__textual_finder )attribute (identifier_find_offsets) identifier_find_offsets )attribute (argument_list (attribute (identifier_tools) identifier_tools (identifier_source_code) identifier_source_code )attribute )argument_list )call (block (expression_statement (assignment (identifier_occurrence) identifier_occurrence (call (identifier_Occurrence) identifier_Occurrence (argument_list (identifier_tools) identifier_tools (identifier_offset) identifier_offset )argument_list )call )assignment )expression_statement (for_statement (identifier_filter) identifier_filter (attribute (identifier_self) identifier_self (identifier_filters) identifier_filters )attribute (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_filter) identifier_filter (argument_list (identifier_occurrence) identifier_occurrence )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_result) identifier_result (None) None )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (identifier_result) identifier_result (block (expression_statement (yield (identifier_occurrence) identifier_occurrence )yield )expression_statement )block )if_statement (break_statement )break_statement )block )for_statement )block )for_statement )block )function_definition )module
Generate `Occurrence` instances
(module (function_definition (function_name_printer) function_name_printer (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__has_loaded) identifier__has_loaded )attribute )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_load) identifier_load )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__printer_name) identifier__printer_name )attribute )not_operator (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_ConfigSectionMissingError) identifier_ConfigSectionMissingError )attribute (argument_list (string_'printer') string_'printer' )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__printer) identifier__printer )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__printer) identifier__printer )attribute (call (call (identifier_getattr) identifier_getattr (argument_list (identifier_printer) identifier_printer (attribute (identifier_self) identifier_self (identifier__printer_name) identifier__printer_name )attribute )argument_list )call (argument_list (dictionary_splat (attribute (identifier_self) identifier_self (identifier__printer_config) identifier__printer_config )attribute )dictionary_splat )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__printer) identifier__printer )attribute )return_statement )block )function_definition )module
Returns a printer that was defined in the config, or throws an exception. This method loads the default config if one hasn't beeen already loaded.
(module (function_definition (function_name_update_model) function_name_update_model (parameters (identifier_self) identifier_self (identifier_words) identifier_words )parameters (block (expression_statement (assignment (identifier_extended_words) identifier_extended_words (subscript (subscript (attribute (identifier_DefaultCompleter) identifier_DefaultCompleter (identifier__DefaultCompleter__tokens) identifier__DefaultCompleter__tokens )attribute (attribute (identifier_self) identifier_self (identifier___language) identifier___language )attribute )subscript (slice (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_extended_words) identifier_extended_words (identifier_extend) identifier_extend )attribute (argument_list (generator_expression (identifier_word) identifier_word (for_in_clause (identifier_word) identifier_word (call (identifier_set) identifier_set (argument_list (identifier_words) identifier_words )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_word) identifier_word (subscript (attribute (identifier_DefaultCompleter) identifier_DefaultCompleter (identifier__DefaultCompleter__tokens) identifier__DefaultCompleter__tokens )attribute (attribute (identifier_self) identifier_self (identifier___language) identifier___language )attribute )subscript )comparison_operator )if_clause )generator_expression )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setModel) identifier_setModel )attribute (argument_list (call (identifier_QStringListModel) identifier_QStringListModel (argument_list (identifier_extended_words) identifier_extended_words )argument_list )call )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Updates the completer model. :param words: Words to update the completer with. :type words: tuple or list :return: Method success. :rtype: bool
(module (function_definition (function_name_load) function_name_load (parameters (identifier_self) identifier_self (default_parameter (identifier_specfiles) identifier_specfiles (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_specfiles) identifier_specfiles (None) None )comparison_operator (block (expression_statement (assignment (identifier_specfiles) identifier_specfiles (list_comprehension (identifier__) identifier__ (for_in_clause (identifier__) identifier__ (call (identifier_viewkeys) identifier_viewkeys (argument_list (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_specfiles) identifier_specfiles (call (attribute (identifier_aux) identifier_aux (identifier_toList) identifier_toList )attribute (argument_list (identifier_specfiles) identifier_specfiles )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_specfile) identifier_specfile (identifier_specfiles) identifier_specfiles (block (if_statement (comparison_operator (identifier_specfile) identifier_specfile (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute )comparison_operator (block (expression_statement (assignment (identifier_warntext) identifier_warntext (binary_operator (concatenated_string (string_'Error while calling "FiContainer.load()": "%s" is') string_'Error while calling "FiContainer.load()": "%s" is' (string_' not present in "FiContainer.info"!') string_' not present in "FiContainer.info"!' )concatenated_string (line_continuation_\) line_continuation_\ (tuple (identifier_specfile) identifier_specfile )tuple )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (identifier_warntext) identifier_warntext )argument_list )call )expression_statement (continue_statement )continue_statement )block (else_clause (block (expression_statement (assignment (identifier_fiPath) identifier_fiPath (call (attribute (identifier_aux) identifier_aux (identifier_joinpath) identifier_joinpath )attribute (argument_list (subscript (subscript (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (identifier_specfile) identifier_specfile )subscript (string_'path') string_'path' )subscript (binary_operator (identifier_specfile) identifier_specfile (string_'.fic') string_'.fic' )binary_operator )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_zipfile) identifier_zipfile (identifier_ZipFile) identifier_ZipFile )attribute (argument_list (identifier_fiPath) identifier_fiPath (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_containerZip) identifier_containerZip )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_jsonString) identifier_jsonString (call (attribute (call (attribute (identifier_io) identifier_io (identifier_TextIOWrapper) identifier_TextIOWrapper )attribute (argument_list (call (attribute (identifier_containerZip) identifier_containerZip (identifier_open) identifier_open )attribute (argument_list (string_'data') string_'data' )argument_list )call (keyword_argument (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )keyword_argument )argument_list )call (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_container) identifier_container )attribute (identifier_specfile) identifier_specfile )subscript (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_jsonString) identifier_jsonString (keyword_argument (identifier_object_hook) identifier_object_hook (attribute (identifier_Fi) identifier_Fi (identifier_jsonHook) identifier_jsonHook )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Imports the specified ``fic`` files from the hard disk. :param specfiles: the name of an ms-run file or a list of names. If None all specfiles are selected. :type specfiles: None, str, [str, str]
(module (function_definition (function_name_magic_session) function_name_magic_session (parameters (default_parameter (identifier_db_session) identifier_db_session (None) None )default_parameter (default_parameter (identifier_url) identifier_url (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_db_session) identifier_db_session (None) None )comparison_operator (block (expression_statement (yield (identifier_db_session) identifier_db_session )yield )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_session) identifier_session (call (identifier_get_session) identifier_get_session (argument_list (identifier_url) identifier_url (keyword_argument (identifier_expire_on_commit) identifier_expire_on_commit (False) False )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (try_statement (block (expression_statement (yield (identifier_session) identifier_session )yield )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_session) identifier_session (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_session) identifier_session (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )else_clause )if_statement )block )function_definition )module
Either does nothing with the session you already have or makes one that commits and closes no matter what happens
(module (function_definition (function_name_setup_list_pars) function_name_setup_list_pars (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_tdf) identifier_tdf (call (attribute (identifier_self) identifier_self (identifier_setup_temporal_list_pars) identifier_setup_temporal_list_pars )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sdf) identifier_sdf (call (attribute (identifier_self) identifier_self (identifier_setup_spatial_list_pars) identifier_setup_spatial_list_pars )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_tdf) identifier_tdf (None) None )comparison_operator (comparison_operator (identifier_sdf) identifier_sdf (None) None )comparison_operator )boolean_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_m) identifier_m )attribute (identifier_model_ws) identifier_model_ws )attribute )argument_list )call )expression_statement (try_statement (block (expression_statement (call (identifier_apply_list_pars) identifier_apply_list_pars (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (string_"..") string_".." )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_lraise) identifier_lraise )attribute (argument_list (call (attribute (string_"error test running apply_list_pars():{0}") string_"error test running apply_list_pars():{0}" (identifier_format) identifier_format )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (string_'..') string_'..' )argument_list )call )expression_statement (expression_statement (assignment (identifier_line) identifier_line (string_"pyemu.helpers.apply_list_pars()\n") string_"pyemu.helpers.apply_list_pars()\n" )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_statement) identifier_statement )attribute (argument_list (call (attribute (string_"forward_run line:{0}") string_"forward_run line:{0}" (identifier_format) identifier_format )attribute (argument_list (identifier_line) identifier_line )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_frun_pre_lines) identifier_frun_pre_lines )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block )function_definition )module
main entry point for setting up list multiplier parameters
(module (function_definition (function_name_additional_assets) function_name_additional_assets (parameters (typed_parameter (identifier_context) identifier_context (type (identifier_Context) identifier_Context )type )typed_parameter )parameters (block (expression_statement (assignment (identifier_rsync_flags) identifier_rsync_flags (conditional_expression (string_'-avz') string_'-avz' (comparison_operator (attribute (identifier_context) identifier_context (identifier_verbosity) identifier_verbosity )attribute (integer_2) integer_2 )comparison_operator (string_'-az') string_'-az' )conditional_expression )assignment )expression_statement (for_statement (identifier_path) identifier_path (attribute (attribute (identifier_context) identifier_context (identifier_app) identifier_app )attribute (identifier_additional_asset_paths) identifier_additional_asset_paths )attribute (block (expression_statement (call (attribute (identifier_context) identifier_context (identifier_shell) identifier_shell )attribute (argument_list (binary_operator (string_'rsync %s %s %s/') string_'rsync %s %s %s/' (tuple (identifier_rsync_flags) identifier_rsync_flags (identifier_path) identifier_path (attribute (attribute (identifier_context) identifier_context (identifier_app) identifier_app )attribute (identifier_asset_build_path) identifier_asset_build_path )attribute )tuple )binary_operator )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Collects assets from GOV.UK frontend toolkit
(module (function_definition (function_name_remove_root_book) function_name_remove_root_book (parameters (identifier_self) identifier_self (identifier_book_id) identifier_book_id )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (None) None )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (identifier_remove_root_catalog) identifier_remove_root_catalog )attribute (argument_list (keyword_argument (identifier_catalog_id) identifier_catalog_id (identifier_book_id) identifier_book_id )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__hierarchy_session) identifier__hierarchy_session )attribute (identifier_remove_root) identifier_remove_root )attribute (argument_list (keyword_argument (identifier_id_) identifier_id_ (identifier_book_id) identifier_book_id )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Removes a root book. arg: book_id (osid.id.Id): the ``Id`` of a book raise: NotFound - ``book_id`` is not a root raise: NullArgument - ``book_id`` is ``null`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_populate) function_name_populate (parameters (identifier_self) identifier_self (identifier_blueprint) identifier_blueprint (identifier_documents) identifier_documents )parameters (block (expression_statement (assignment (identifier_documents) identifier_documents (call (attribute (identifier_self) identifier_self (identifier_finish) identifier_finish )attribute (argument_list (identifier_blueprint) identifier_blueprint (identifier_documents) identifier_documents )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_frames) identifier_frames (list )list )assignment )expression_statement (for_statement (identifier_document) identifier_document (identifier_documents) identifier_documents (block (expression_statement (assignment (identifier_meta_document) identifier_meta_document (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_field_name) identifier_field_name (attribute (identifier_blueprint) identifier_blueprint (identifier__meta_fields) identifier__meta_fields )attribute (block (expression_statement (assignment (subscript (identifier_meta_document) identifier_meta_document (identifier_field_name) identifier_field_name )subscript (subscript (identifier_document) identifier_document (identifier_field_name) identifier_field_name )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_document) identifier_document (identifier_pop) identifier_pop )attribute (argument_list (identifier_field_name) identifier_field_name )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_frame) identifier_frame (call (call (attribute (identifier_blueprint) identifier_blueprint (identifier_get_frame_cls) identifier_get_frame_cls )attribute (argument_list )argument_list )call (argument_list (identifier_document) identifier_document )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_meta_document) identifier_meta_document (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_frame) identifier_frame (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_frames) identifier_frames (identifier_append) identifier_append )attribute (argument_list (identifier_frame) identifier_frame )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_blueprint) identifier_blueprint (identifier_on_fake) identifier_on_fake )attribute (argument_list (identifier_frames) identifier_frames )argument_list )call )expression_statement (expression_statement (assignment (identifier_frames) identifier_frames (call (attribute (call (attribute (identifier_blueprint) identifier_blueprint (identifier_get_frame_cls) identifier_get_frame_cls )attribute (argument_list )argument_list )call (identifier_insert_many) identifier_insert_many )attribute (argument_list (identifier_frames) identifier_frames )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_blueprint) identifier_blueprint (identifier_on_faked) identifier_on_faked )attribute (argument_list (identifier_frames) identifier_frames )argument_list )call )expression_statement (return_statement (identifier_frames) identifier_frames )return_statement )block )function_definition )module
Populate the database with documents
(module (function_definition (function_name__polygon_from_coords) function_name__polygon_from_coords (parameters (identifier_coords) identifier_coords (default_parameter (identifier_fix_geom) identifier_fix_geom (False) False )default_parameter (default_parameter (identifier_swap) identifier_swap (True) True )default_parameter (default_parameter (identifier_dims) identifier_dims (integer_2) integer_2 )default_parameter )parameters (block (assert_statement (comparison_operator (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_coords) identifier_coords )argument_list )call (identifier_dims) identifier_dims )binary_operator (integer_0) integer_0 )comparison_operator )assert_statement (expression_statement (assignment (identifier_number_of_points) identifier_number_of_points (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_coords) identifier_coords )argument_list )call (identifier_dims) identifier_dims )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_coords_as_array) identifier_coords_as_array (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_coords) identifier_coords )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_reshaped) identifier_reshaped (call (attribute (identifier_coords_as_array) identifier_coords_as_array (identifier_reshape) identifier_reshape )attribute (argument_list (identifier_number_of_points) identifier_number_of_points (identifier_dims) identifier_dims )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_points) identifier_points (list_comprehension (conditional_expression (tuple (call (identifier_float) identifier_float (argument_list (subscript (identifier_i) identifier_i (integer_1) integer_1 )subscript )argument_list )call (call (identifier_float) identifier_float (argument_list (subscript (identifier_i) identifier_i (integer_0) integer_0 )subscript )argument_list )call )tuple (identifier_swap) identifier_swap (parenthesized_expression (tuple (call (identifier_float) identifier_float (argument_list (subscript (identifier_i) identifier_i (integer_0) integer_0 )subscript )argument_list )call (call (identifier_float) identifier_float (argument_list (subscript (identifier_i) identifier_i (integer_1) integer_1 )subscript )argument_list )call )tuple )parenthesized_expression )conditional_expression (for_in_clause (identifier_i) identifier_i (call (attribute (identifier_reshaped) identifier_reshaped (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_polygon) identifier_polygon (call (attribute (call (identifier_Polygon) identifier_Polygon (argument_list (identifier_points) identifier_points )argument_list )call (identifier_buffer) identifier_buffer )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (try_statement (block (assert_statement (attribute (identifier_polygon) identifier_polygon (identifier_is_valid) identifier_is_valid )attribute )assert_statement (return_statement (identifier_polygon) identifier_polygon )return_statement )block (except_clause (identifier_AssertionError) identifier_AssertionError (block (if_statement (identifier_fix_geom) identifier_fix_geom (block (return_statement (call (attribute (identifier_polygon) identifier_polygon (identifier_buffer) identifier_buffer )attribute (argument_list (integer_0) integer_0 )argument_list )call )return_statement )block (else_clause (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"Geometry is not valid.") string_"Geometry is not valid." )argument_list )call )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition )module
Return Shapely Polygon from coordinates. - coords: list of alterating latitude / longitude coordinates - fix_geom: automatically fix geometry
(module (function_definition (function_name__check_euk_contamination) function_name__check_euk_contamination (parameters (identifier_self) identifier_self (identifier_hmm_hit_tables) identifier_hmm_hit_tables )parameters (block (expression_statement (assignment (identifier_euk_hit_table) identifier_euk_hit_table (call (identifier_HMMreader) identifier_HMMreader (argument_list (call (attribute (identifier_hmm_hit_tables) identifier_hmm_hit_tables (identifier_pop) identifier_pop )attribute (argument_list (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_other_hit_tables) identifier_other_hit_tables (list_comprehension (call (identifier_HMMreader) identifier_HMMreader (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_hmm_hit_tables) identifier_hmm_hit_tables )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_reads_unique_to_eukaryotes) identifier_reads_unique_to_eukaryotes (list )list )assignment )expression_statement (expression_statement (assignment (identifier_reads_with_better_euk_hit) identifier_reads_with_better_euk_hit (list )list )assignment )expression_statement (for_statement (identifier_hit) identifier_hit (call (attribute (identifier_euk_hit_table) identifier_euk_hit_table (identifier_names) identifier_names )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_bits) identifier_bits (list )list )assignment )expression_statement (for_statement (identifier_hit_table) identifier_hit_table (identifier_other_hit_tables) identifier_other_hit_tables (block (if_statement (comparison_operator (identifier_hit) identifier_hit (call (attribute (identifier_hit_table) identifier_hit_table (identifier_names) identifier_names )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_bits) identifier_bits (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_hit_table) identifier_hit_table (identifier_bit) identifier_bit )attribute (argument_list (identifier_hit) identifier_hit )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_reads_unique_to_eukaryotes) identifier_reads_unique_to_eukaryotes (identifier_append) identifier_append )attribute (argument_list (identifier_hit) identifier_hit )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (if_statement (identifier_bits) identifier_bits (block (if_statement (call (identifier_any) identifier_any (argument_list (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (identifier_bits) identifier_bits )for_in_clause (if_clause (comparison_operator (identifier_x) identifier_x (call (attribute (identifier_euk_hit_table) identifier_euk_hit_table (identifier_bit) identifier_bit )attribute (argument_list (identifier_hit) identifier_hit )argument_list )call )comparison_operator )if_clause )list_comprehension )argument_list )call (block (continue_statement )continue_statement )block (else_clause (block (expression_statement (call (attribute (identifier_reads_with_better_euk_hit) identifier_reads_with_better_euk_hit (identifier_append) identifier_append )attribute (argument_list (identifier_hit) identifier_hit )argument_list )call )expression_statement )block )else_clause )if_statement )block (else_clause (block (continue_statement )continue_statement )block )else_clause )if_statement )block )for_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_reads_with_better_euk_hit) identifier_reads_with_better_euk_hit )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (string_"No contaminating eukaryotic reads detected") string_"No contaminating eukaryotic reads detected" )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_"Found %s read(s) that may be eukaryotic") string_"Found %s read(s) that may be eukaryotic" (call (identifier_len) identifier_len (argument_list (binary_operator (identifier_reads_with_better_euk_hit) identifier_reads_with_better_euk_hit (identifier_reads_unique_to_eukaryotes) identifier_reads_unique_to_eukaryotes )binary_operator )argument_list )call )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_euk_reads) identifier_euk_reads (call (identifier_set) identifier_set (argument_list (binary_operator (identifier_reads_with_better_euk_hit) identifier_reads_with_better_euk_hit (identifier_reads_unique_to_eukaryotes) identifier_reads_unique_to_eukaryotes )binary_operator )argument_list )call )assignment )expression_statement (return_statement (identifier_euk_reads) identifier_euk_reads )return_statement )block )function_definition )module
check_euk_contamination - Check output HMM tables hits reads that hit the 18S HMM with a higher bit score. Parameters ---------- hmm_hit_tables : array Array of paths to the output files produced by hmmsearch or nhmmer. run_stats : dict A dictionary to updatewith the number of unique 18S reads and reads detected by both 18S and non-18S HMMs Returns ------- euk_reads : set Non-redundant set of all read names deemed to be eukaryotic
(module (function_definition (function_name_get_querystring) function_name_get_querystring (parameters (identifier_uri) identifier_uri )parameters (block (expression_statement (assignment (identifier_parts) identifier_parts (call (attribute (identifier_urlparse) identifier_urlparse (identifier_urlsplit) identifier_urlsplit )attribute (argument_list (identifier_uri) identifier_uri )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_urlparse) identifier_urlparse (identifier_parse_qs) identifier_parse_qs )attribute (argument_list (attribute (identifier_parts) identifier_parts (identifier_query) identifier_query )attribute )argument_list )call )return_statement )block )function_definition )module
Get Querystring information from uri. :param uri: uri :return: querystring info or {}
(module (function_definition (function_name_end_time) function_name_end_time (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (return_statement (binary_operator (attribute (identifier_self) identifier_self (identifier_start_time) identifier_start_time )attribute (subscript (identifier_SCAN_DURATION) identifier_SCAN_DURATION (attribute (identifier_self) identifier_self (identifier_sector) identifier_sector )attribute )subscript )binary_operator )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (attribute (identifier_self) identifier_self (identifier_start_time) identifier_start_time )attribute )return_statement )block )except_clause )try_statement )block )function_definition )module
End timestamp of the dataset
(module (function_definition (function_name_open_as_pillow) function_name_open_as_pillow (parameters (identifier_filename) identifier_filename )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier___sys_open) identifier___sys_open (argument_list (identifier_filename) identifier_filename (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier_BytesIO) identifier_BytesIO (argument_list (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_Image) identifier_Image (identifier_open) identifier_open )attribute (argument_list (identifier_data) identifier_data )argument_list )call )return_statement )block )with_statement )block )function_definition )module
This way can delete file immediately
(module (function_definition (function_name_on_finish) function_name_on_finish (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_r) identifier_r (attribute (identifier_self) identifier_self (identifier_response) identifier_response )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_r) identifier_r (identifier_request_time) identifier_request_time )attribute (binary_operator (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier_start_time) identifier_start_time )attribute )binary_operator )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_callback) identifier_callback )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_callback) identifier_callback )attribute (argument_list (identifier_r) identifier_r )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Called regardless of success or failure
(module (function_definition (function_name_valid_ovsdb_addr) function_name_valid_ovsdb_addr (parameters (identifier_addr) identifier_addr )parameters (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_r'unix:(\S+)') string_r'unix:(\S+)' (identifier_addr) identifier_addr )argument_list )call )assignment )expression_statement (if_statement (identifier_m) identifier_m (block (expression_statement (assignment (identifier_file) identifier_file (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_file) identifier_file )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_r'(tcp|ssl):(\S+):(\d+)') string_r'(tcp|ssl):(\S+):(\d+)' (identifier_addr) identifier_addr )argument_list )call )assignment )expression_statement (if_statement (identifier_m) identifier_m (block (expression_statement (assignment (identifier_address) identifier_address (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_2) integer_2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_port) identifier_port (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_3) integer_3 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'[') string_'[' (identifier_address) identifier_address )comparison_operator (block (expression_statement (assignment (identifier_address) identifier_address (call (attribute (call (attribute (identifier_address) identifier_address (identifier_strip) identifier_strip )attribute (argument_list (string_'[') string_'[' )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list (string_']') string_']' )argument_list )call )assignment )expression_statement (return_statement (boolean_operator (call (attribute (identifier_ip) identifier_ip (identifier_valid_ipv6) identifier_valid_ipv6 )attribute (argument_list (identifier_address) identifier_address )argument_list )call (call (attribute (identifier_port) identifier_port (identifier_isdigit) identifier_isdigit )attribute (argument_list )argument_list )call )boolean_operator )return_statement )block (else_clause (block (return_statement (boolean_operator (call (attribute (identifier_ip) identifier_ip (identifier_valid_ipv4) identifier_valid_ipv4 )attribute (argument_list (identifier_address) identifier_address )argument_list )call (call (attribute (identifier_port) identifier_port (identifier_isdigit) identifier_isdigit )attribute (argument_list )argument_list )call )boolean_operator )return_statement )block )else_clause )if_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Returns True if the given addr is valid OVSDB server address, otherwise False. The valid formats are: - ``unix:file`` - ``tcp:ip:port`` - ``ssl:ip:port`` If ip is IPv6 address, wrap ip with brackets (e.g., ssl:[::1]:6640). :param addr: str value of OVSDB server address. :return: True if valid, otherwise False.
(module (function_definition (function_name__api_call) function_name__api_call (parameters (identifier_function) identifier_function )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_function) identifier_function )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (try_statement (block (if_statement (not_operator (call (attribute (identifier__webview_ready) identifier__webview_ready (identifier_wait) identifier_wait )attribute (argument_list (integer_15) integer_15 )argument_list )call )not_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_'Main window failed to start') string_'Main window failed to start' )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_function) identifier_function (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (except_clause (identifier_NameError) identifier_NameError (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_'Create a web view window first, before invoking this function') string_'Create a web view window first, before invoking this function' )argument_list )call )raise_statement )block )except_clause (except_clause (as_pattern (identifier_KeyError) identifier_KeyError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (try_statement (block (expression_statement (assignment (identifier_uid) identifier_uid (subscript (identifier_kwargs) identifier_kwargs (string_'uid') string_'uid' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_uid) identifier_uid (subscript (identifier_args) identifier_args (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement )block )except_clause )try_statement (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (call (attribute (string_'Cannot call function: No webview exists with uid: {}') string_'Cannot call function: No webview exists with uid: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_uid) identifier_uid )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
Decorator to call a pywebview API, checking for _webview_ready and raisings appropriate Exceptions on failure.
(module (function_definition (function_name_write_record) function_name_write_record (parameters (identifier_self) identifier_self (identifier_event_str) identifier_event_str )parameters (block (expression_statement (assignment (identifier_header) identifier_header (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_'Q') string_'Q' (call (identifier_len) identifier_len (argument_list (identifier_event_str) identifier_event_str )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_header) identifier_header (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_'I') string_'I' (call (identifier_masked_crc32c) identifier_masked_crc32c (argument_list (identifier_header) identifier_header )argument_list )call )argument_list )call )augmented_assignment )expression_statement (expression_statement (assignment (identifier_footer) identifier_footer (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_'I') string_'I' (call (identifier_masked_crc32c) identifier_masked_crc32c (argument_list (identifier_event_str) identifier_event_str )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__writer) identifier__writer )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (binary_operator (identifier_header) identifier_header (identifier_event_str) identifier_event_str )binary_operator (identifier_footer) identifier_footer )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Writes a serialized event to file.
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'Deleting Dagobah instance with ID {0}') string_'Deleting Dagobah instance with ID {0}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_dagobah_id) identifier_dagobah_id )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_jobs) identifier_jobs )attribute (list )list )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_created_jobs) identifier_created_jobs )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_backend) identifier_backend )attribute (identifier_delete_dagobah) identifier_delete_dagobah )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_dagobah_id) identifier_dagobah_id )attribute )argument_list )call )expression_statement )block )function_definition )module
Delete this Dagobah instance from the Backend.
(module (function_definition (function_name_popitem) function_name_popitem (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_heap) identifier_heap (attribute (identifier_self) identifier_self (identifier__heap) identifier__heap )attribute )assignment )expression_statement (expression_statement (assignment (identifier_position) identifier_position (attribute (identifier_self) identifier_self (identifier__position) identifier__position )attribute )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_end) identifier_end (call (attribute (identifier_heap) identifier_heap (identifier_pop) identifier_pop )attribute (argument_list (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )assignment )expression_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (string_'pqdict is empty') string_'pqdict is empty' )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (identifier_heap) identifier_heap (block (expression_statement (assignment (identifier_node) identifier_node (subscript (identifier_heap) identifier_heap (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_heap) identifier_heap (integer_0) integer_0 )subscript (identifier_end) identifier_end )assignment )expression_statement (expression_statement (assignment (subscript (identifier_position) identifier_position (attribute (identifier_end) identifier_end (identifier_key) identifier_key )attribute )subscript (integer_0) integer_0 )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__sink) identifier__sink )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_node) identifier_node (identifier_end) identifier_end )assignment )expression_statement )block )else_clause )if_statement (delete_statement (subscript (identifier_position) identifier_position (attribute (identifier_node) identifier_node (identifier_key) identifier_key )attribute )subscript )delete_statement (return_statement (expression_list (attribute (identifier_node) identifier_node (identifier_key) identifier_key )attribute (attribute (identifier_node) identifier_node (identifier_value) identifier_value )attribute )expression_list )return_statement )block )function_definition )module
Remove and return the item with highest priority. Raises ``KeyError`` if pqdict is empty.
(module (function_definition (function_name_getAccountNames) function_name_getAccountNames (parameters (identifier_store) identifier_store (default_parameter (identifier_protocol) identifier_protocol (None) None )default_parameter )parameters (block (return_statement (generator_expression (tuple (attribute (identifier_meth) identifier_meth (identifier_localpart) identifier_localpart )attribute (attribute (identifier_meth) identifier_meth (identifier_domain) identifier_domain )attribute )tuple (for_in_clause (identifier_meth) identifier_meth (call (identifier_getLoginMethods) identifier_getLoginMethods (argument_list (identifier_store) identifier_store (identifier_protocol) identifier_protocol )argument_list )call )for_in_clause )generator_expression )return_statement )block )function_definition )module
Retrieve account name information about the given database. @param store: An Axiom Store representing a user account. It must have been opened through the store which contains its account information. @return: A generator of two-tuples of (username, domain) which refer to the given store.
(module (function_definition (function_name_read_input) function_name_read_input (parameters (identifier_self) identifier_self (identifier_input_cls) identifier_input_cls (identifier_filename) identifier_filename (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_input_inst) identifier_input_inst (call (identifier_input_cls) identifier_input_cls (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_input_inst) identifier_input_inst (identifier_read_input) identifier_read_input )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )expression_statement (return_statement (call (attribute (identifier_input_inst) identifier_input_inst (identifier_get_data) identifier_get_data )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Read in input and do some minimal preformatting input_cls - the class to use to read the input filename - input filename
(module (function_definition (function_name_uuidify) function_name_uuidify (parameters (identifier_val) identifier_val )parameters (block (if_statement (call (attribute (identifier_uuidutils) identifier_uuidutils (identifier_is_uuid_like) identifier_is_uuid_like )attribute (argument_list (identifier_val) identifier_val )argument_list )call (block (return_statement (identifier_val) identifier_val )return_statement )block (else_clause (block (try_statement (block (expression_statement (assignment (identifier_int_val) identifier_int_val (call (identifier_int) identifier_int (argument_list (identifier_val) identifier_val (integer_16) integer_16 )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (with_statement (with_clause (with_item (call (attribute (identifier_excutils) identifier_excutils (identifier_save_and_reraise_exception) identifier_save_and_reraise_exception )attribute (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_"Invalid UUID format %s. Please provide an ") string_"Invalid UUID format %s. Please provide an " (string_"integer in decimal (0-9) or hex (0-9a-e) ") string_"integer in decimal (0-9) or hex (0-9a-e) " (string_"format") string_"format" )concatenated_string (identifier_val) identifier_val )argument_list )call )expression_statement )block )with_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_res) identifier_res (call (identifier_str) identifier_str (argument_list (identifier_int_val) identifier_int_val )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_num) identifier_num (binary_operator (integer_12) integer_12 (call (identifier_len) identifier_len (argument_list (identifier_res) identifier_res )argument_list )call )binary_operator )assignment )expression_statement (return_statement (binary_operator (binary_operator (string_"00000000-0000-0000-0000-") string_"00000000-0000-0000-0000-" (binary_operator (string_"0") string_"0" (identifier_num) identifier_num )binary_operator )binary_operator (identifier_res) identifier_res )binary_operator )return_statement )block )else_clause )if_statement )block )function_definition )module
Takes an integer and transforms it to a UUID format. returns: UUID formatted version of input.
(module (function_definition (function_name_update_assessment_offered) function_name_update_assessment_offered (parameters (identifier_self) identifier_self (identifier_assessment_offered_form) identifier_assessment_offered_form )parameters (block (expression_statement (assignment (identifier_collection) identifier_collection (call (identifier_JSONClientValidated) identifier_JSONClientValidated (argument_list (string_'assessment') string_'assessment' (keyword_argument (identifier_collection) identifier_collection (string_'AssessmentOffered') string_'AssessmentOffered' )keyword_argument (keyword_argument (identifier_runtime) identifier_runtime (attribute (identifier_self) identifier_self (identifier__runtime) identifier__runtime )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_assessment_offered_form) identifier_assessment_offered_form (identifier_ABCAssessmentOfferedForm) identifier_ABCAssessmentOfferedForm )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_InvalidArgument) identifier_InvalidArgument )attribute (argument_list (string_'argument type is not an AssessmentOfferedForm') string_'argument type is not an AssessmentOfferedForm' )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_assessment_offered_form) identifier_assessment_offered_form (identifier_is_for_update) identifier_is_for_update )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_InvalidArgument) identifier_InvalidArgument )attribute (argument_list (string_'the AssessmentOfferedForm is for update only, not create') string_'the AssessmentOfferedForm is for update only, not create' )argument_list )call )raise_statement )block )if_statement (try_statement (block (if_statement (comparison_operator (subscript (attribute (identifier_self) identifier_self (identifier__forms) identifier__forms )attribute (call (attribute (call (attribute (identifier_assessment_offered_form) identifier_assessment_offered_form (identifier_get_id) identifier_get_id )attribute (argument_list )argument_list )call (identifier_get_identifier) identifier_get_identifier )attribute (argument_list )argument_list )call )subscript (identifier_UPDATED) identifier_UPDATED )comparison_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_IllegalState) identifier_IllegalState )attribute (argument_list (string_'assessment_offered_form already used in an update transaction') string_'assessment_offered_form already used in an update transaction' )argument_list )call )raise_statement )block )if_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_Unsupported) identifier_Unsupported )attribute (argument_list (string_'assessment_offered_form did not originate from this session') string_'assessment_offered_form did not originate from this session' )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (not_operator (call (attribute (identifier_assessment_offered_form) identifier_assessment_offered_form (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_InvalidArgument) identifier_InvalidArgument )attribute (argument_list (string_'one or more of the form elements is invalid') string_'one or more of the form elements is invalid' )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_collection) identifier_collection (identifier_save) identifier_save )attribute (argument_list (attribute (identifier_assessment_offered_form) identifier_assessment_offered_form (identifier__my_map) identifier__my_map )attribute )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__forms) identifier__forms )attribute (call (attribute (call (attribute (identifier_assessment_offered_form) identifier_assessment_offered_form (identifier_get_id) identifier_get_id )attribute (argument_list )argument_list )call (identifier_get_identifier) identifier_get_identifier )attribute (argument_list )argument_list )call )subscript (identifier_UPDATED) identifier_UPDATED )assignment )expression_statement (return_statement (call (attribute (identifier_objects) identifier_objects (identifier_AssessmentOffered) identifier_AssessmentOffered )attribute (argument_list (keyword_argument (identifier_osid_object_map) identifier_osid_object_map (attribute (identifier_assessment_offered_form) identifier_assessment_offered_form (identifier__my_map) identifier__my_map )attribute )keyword_argument (keyword_argument (identifier_runtime) identifier_runtime (attribute (identifier_self) identifier_self (identifier__runtime) identifier__runtime )attribute )keyword_argument (keyword_argument (identifier_proxy) identifier_proxy (attribute (identifier_self) identifier_self (identifier__proxy) identifier__proxy )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Updates an existing assessment offered. arg: assessment_offered_form (osid.assessment.AssessmentOfferedForm): the form containing the elements to be updated raise: IllegalState - ``assessment_offrered_form`` already used in an update transaction raise: InvalidArgument - the form contains an invalid value raise: NullArgument - ``assessment_offered_form`` is ``null`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure occurred raise: Unsupported - ``assessment_form`` did not originate from ``get_assessment_form_for_update()`` *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_seek) function_name_seek (parameters (identifier_self) identifier_self (identifier_pos) identifier_pos (default_parameter (identifier_whence) identifier_whence (attribute (identifier_sync_io) identifier_sync_io (identifier_SEEK_SET) identifier_SEEK_SET )attribute )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__stream) identifier__stream )attribute (identifier_seek) identifier_seek )attribute (argument_list (identifier_pos) identifier_pos (identifier_whence) identifier_whence )argument_list )call )return_statement )block )function_definition )module
Move to new file position. Argument offset is a byte count. Optional argument whence defaults to SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values are SEEK_CUR or 1 (move relative to current position, positive or negative), and SEEK_END or 2 (move relative to end of file, usually negative, although many platforms allow seeking beyond the end of a file). Note that not all file objects are seekable.
(module (function_definition (function_name_update_rotation) function_name_update_rotation (parameters (identifier_self) identifier_self (identifier_dt) identifier_dt (identifier_buttons) identifier_buttons )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_buttons) identifier_buttons (identifier_dict) identifier_dict )argument_list )call )assert_statement (expression_statement (assignment (identifier_ma) identifier_ma (binary_operator (subscript (identifier_buttons) identifier_buttons (string_'right') string_'right' )subscript (subscript (identifier_buttons) identifier_buttons (string_'left') string_'left' )subscript )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_ma) identifier_ma (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (subscript (attribute (identifier_self) identifier_self (identifier_stats) identifier_stats )attribute (string_'battery') string_'battery' )subscript (subscript (attribute (identifier_self) identifier_self (identifier_battery_use) identifier_battery_use )attribute (string_'angular') string_'angular' )subscript )augmented_assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_rotation) identifier_rotation )attribute (binary_operator (binary_operator (identifier_ma) identifier_ma (identifier_dt) identifier_dt )binary_operator (attribute (identifier_self) identifier_self (identifier_angular_velocity) identifier_angular_velocity )attribute )binary_operator )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_a) identifier_a (call (attribute (identifier_math) identifier_math (identifier_radians) identifier_radians )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_rotation) identifier_rotation )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_impulse_dir) identifier_impulse_dir )attribute (call (attribute (identifier_eu) identifier_eu (identifier_Vector2) identifier_Vector2 )attribute (argument_list (call (attribute (identifier_math) identifier_math (identifier_sin) identifier_sin )attribute (argument_list (identifier_a) identifier_a )argument_list )call (call (attribute (identifier_math) identifier_math (identifier_cos) identifier_cos )attribute (argument_list (identifier_a) identifier_a )argument_list )call )argument_list )call )assignment )expression_statement )block )function_definition )module
Updates rotation and impulse direction
(module (function_definition (function_name_add_api_key) function_name_add_api_key (parameters (identifier_key) identifier_key (identifier_value) identifier_value )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_key) identifier_key (None) None )comparison_operator (comparison_operator (identifier_key) identifier_key (string_"") string_"" )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_"Key cannot be empty") string_"Key cannot be empty" )argument_list )call )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (comparison_operator (identifier_value) identifier_value (string_"") string_"" )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_"Value cannot be empty") string_"Value cannot be empty" )argument_list )call )expression_statement )block )if_statement (import_from_statement (relative_import (import_prefix )import_prefix )relative_import (dotted_name (identifier_datatools) identifier_datatools )dotted_name )import_from_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_datatools) identifier_datatools (identifier_get_data) identifier_get_data )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_"keys") string_"keys" (subscript (identifier_data) identifier_data (string_"discord") string_"discord" )subscript )comparison_operator (block (expression_statement (assignment (subscript (subscript (identifier_data) identifier_data (string_"discord") string_"discord" )subscript (string_"keys") string_"keys" )subscript (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_is_key_new) identifier_is_key_new (False) False )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (subscript (subscript (identifier_data) identifier_data (string_"discord") string_"discord" )subscript (string_"keys") string_"keys" )subscript )comparison_operator (block (expression_statement (assignment (identifier_is_key_new) identifier_is_key_new (True) True )assignment )expression_statement )block (elif_clause (comparison_operator (subscript (subscript (subscript (identifier_data) identifier_data (string_"discord") string_"discord" )subscript (string_"keys") string_"keys" )subscript (identifier_key) identifier_key )subscript (identifier_value) identifier_value )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"API key '{}' already has value '{}'") string_"API key '{}' already has value '{}'" (identifier_format) identifier_format )attribute (argument_list (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )argument_list )call )expression_statement (return_statement )return_statement )block )elif_clause )if_statement (expression_statement (assignment (subscript (subscript (subscript (identifier_data) identifier_data (string_"discord") string_"discord" )subscript (string_"keys") string_"keys" )subscript (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement (expression_statement (call (attribute (identifier_datatools) identifier_datatools (identifier_write_data) identifier_write_data )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (assignment (identifier_key_text) identifier_key_text (conditional_expression (string_"added") string_"added" (identifier_is_key_new) identifier_is_key_new (string_"updated") string_"updated" )conditional_expression )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"API key '{}' {} with value '{}'") string_"API key '{}' {} with value '{}'" (identifier_format) identifier_format )attribute (argument_list (identifier_key) identifier_key (identifier_key_text) identifier_key_text (identifier_value) identifier_value )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Adds a key to the bot's data Args: key: The name of the key to add value: The value for the key
(module (function_definition (function_name_tmpconfig) function_name_tmpconfig (parameters (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_SUBFOLDER) identifier_SUBFOLDER (call (attribute (identifier_tempfile) identifier_tempfile (identifier_mkdtemp) identifier_mkdtemp )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_CONF) identifier_CONF (call (identifier_UserConfig) identifier_UserConfig (argument_list (string_'spyder-test') string_'spyder-test' (keyword_argument (identifier_defaults) identifier_defaults (identifier_DEFAULTS) identifier_DEFAULTS )keyword_argument (keyword_argument (identifier_version) identifier_version (identifier_CONF_VERSION) identifier_CONF_VERSION )keyword_argument (keyword_argument (identifier_subfolder) identifier_subfolder (identifier_SUBFOLDER) identifier_SUBFOLDER )keyword_argument (keyword_argument (identifier_raw_mode) identifier_raw_mode (True) True )keyword_argument )argument_list )call )assignment )expression_statement (function_definition (function_name_fin) function_name_fin (parameters )parameters (block (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_rmtree) identifier_rmtree )attribute (argument_list (identifier_SUBFOLDER) identifier_SUBFOLDER )argument_list )call )expression_statement )block )function_definition (expression_statement (call (attribute (identifier_request) identifier_request (identifier_addfinalizer) identifier_addfinalizer )attribute (argument_list (identifier_fin) identifier_fin )argument_list )call )expression_statement (return_statement (identifier_CONF) identifier_CONF )return_statement )block )function_definition )module
Fixtures that returns a temporary CONF element.
(module (function_definition (function_name_cause_repertoire) function_name_cause_repertoire (parameters (identifier_self) identifier_self (identifier_mechanism) identifier_mechanism (identifier_purview) identifier_purview )parameters (block (if_statement (not_operator (identifier_purview) identifier_purview )not_operator (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list (float_1.0) float_1.0 )list )argument_list )call )return_statement )block )if_statement (if_statement (not_operator (identifier_mechanism) identifier_mechanism )not_operator (block (return_statement (call (identifier_max_entropy_distribution) identifier_max_entropy_distribution (argument_list (identifier_purview) identifier_purview (attribute (identifier_self) identifier_self (identifier_tpm_size) identifier_tpm_size )attribute )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_purview) identifier_purview (call (identifier_frozenset) identifier_frozenset (argument_list (identifier_purview) identifier_purview )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_joint) identifier_joint (call (attribute (identifier_np) identifier_np (identifier_ones) identifier_ones )attribute (argument_list (call (identifier_repertoire_shape) identifier_repertoire_shape (argument_list (identifier_purview) identifier_purview (attribute (identifier_self) identifier_self (identifier_tpm_size) identifier_tpm_size )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_joint) identifier_joint (call (attribute (identifier_functools) identifier_functools (identifier_reduce) identifier_reduce )attribute (argument_list (attribute (identifier_np) identifier_np (identifier_multiply) identifier_multiply )attribute (list_comprehension (call (attribute (identifier_self) identifier_self (identifier__single_node_cause_repertoire) identifier__single_node_cause_repertoire )attribute (argument_list (identifier_m) identifier_m (identifier_purview) identifier_purview )argument_list )call (for_in_clause (identifier_m) identifier_m (identifier_mechanism) identifier_mechanism )for_in_clause )list_comprehension )argument_list )call )augmented_assignment )expression_statement (return_statement (call (attribute (identifier_distribution) identifier_distribution (identifier_normalize) identifier_normalize )attribute (argument_list (identifier_joint) identifier_joint )argument_list )call )return_statement )block )function_definition )module
Return the cause repertoire of a mechanism over a purview. Args: mechanism (tuple[int]): The mechanism for which to calculate the cause repertoire. purview (tuple[int]): The purview over which to calculate the cause repertoire. Returns: np.ndarray: The cause repertoire of the mechanism over the purview. .. note:: The returned repertoire is a distribution over purview node states, not the states of the whole network.
(module (function_definition (function_name_parse_tenant_config_path) function_name_parse_tenant_config_path (parameters (identifier_config_path) identifier_config_path )parameters (block (try_statement (block (return_statement (binary_operator (identifier_config_path) identifier_config_path (attribute (identifier_connection) identifier_connection (identifier_schema_name) identifier_schema_name )attribute )binary_operator )return_statement )block (except_clause (tuple (identifier_TypeError) identifier_TypeError (identifier_ValueError) identifier_ValueError )tuple (block (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_config_path) identifier_config_path (attribute (identifier_connection) identifier_connection (identifier_schema_name) identifier_schema_name )attribute )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Convenience function for parsing django-tenants' path configuration strings. If the string contains '%s', then the current tenant's schema name will be inserted at that location. Otherwise the schema name will be appended to the end of the string. :param config_path: A configuration path string that optionally contains '%s' to indicate where the tenant schema name should be inserted. :return: The formatted string containing the schema name
(module (function_definition (function_name_is_alive) function_name_is_alive (parameters (identifier_self) identifier_self (typed_parameter (identifier_container) identifier_container (type (identifier_Container) identifier_Container )type )typed_parameter )parameters (type (identifier_bool) identifier_bool )type (block (expression_statement (assignment (identifier_uid) identifier_uid (attribute (identifier_container) identifier_container (identifier_uid) identifier_uid )attribute )assignment )expression_statement (return_statement (boolean_operator (comparison_operator (identifier_uid) identifier_uid (attribute (identifier_self) identifier_self (identifier___dockerc) identifier___dockerc )attribute )comparison_operator (line_continuation_\) line_continuation_\ (comparison_operator (attribute (subscript (attribute (identifier_self) identifier_self (identifier___dockerc) identifier___dockerc )attribute (identifier_uid) identifier_uid )subscript (identifier_status) identifier_status )attribute (string_'running') string_'running' )comparison_operator )boolean_operator )return_statement )block )function_definition )module
Determines whether a given container is still alive. Returns: `True` if the underlying Docker container for the given BugZoo container is still alive, otherwise `False`.
(module (function_definition (function_name_kron) function_name_kron (parameters (identifier_a) identifier_a (identifier_b) identifier_b )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_a) identifier_a (string_'__kron__') string_'__kron__' )argument_list )call (block (return_statement (call (attribute (identifier_a) identifier_a (identifier___kron__) identifier___kron__ )attribute (argument_list (identifier_b) identifier_b )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (identifier_a) identifier_a (None) None )comparison_operator (block (return_statement (identifier_b) identifier_b )return_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Kron is waiting for two TT-vectors or two TT-matrices') string_'Kron is waiting for two TT-vectors or two TT-matrices' )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Kronecker product of two TT-matrices or two TT-vectors
(module (function_definition (function_name_send_rpc_response) function_name_send_rpc_response (parameters (identifier_self) identifier_self (identifier_rpc_tag) identifier_rpc_tag (identifier_result) identifier_result (identifier_response) identifier_response )parameters (block (if_statement (comparison_operator (identifier_rpc_tag) identifier_rpc_tag (attribute (identifier_self) identifier_self (identifier_in_flight_rpcs) identifier_in_flight_rpcs )attribute )comparison_operator (block (raise_statement (call (identifier_ArgumentError) identifier_ArgumentError (argument_list (string_"In flight RPC could not be found, it may have timed out") string_"In flight RPC could not be found, it may have timed out" (keyword_argument (identifier_rpc_tag) identifier_rpc_tag (identifier_rpc_tag) identifier_rpc_tag )keyword_argument )argument_list )call )raise_statement )block )if_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_in_flight_rpcs) identifier_in_flight_rpcs )attribute (identifier_rpc_tag) identifier_rpc_tag )subscript )delete_statement (expression_statement (assignment (identifier_response_message) identifier_response_message (dictionary (pair (string_'response') string_'response' (identifier_response) identifier_response )pair (pair (string_'result') string_'result' (identifier_result) identifier_result )pair )dictionary )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_rpc_results) identifier_rpc_results )attribute (identifier_set) identifier_set )attribute (argument_list (identifier_rpc_tag) identifier_rpc_tag (identifier_response_message) identifier_response_message )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_warning) identifier_warning )attribute (argument_list (string_"RPC response came but no one was waiting: response=%s") string_"RPC response came but no one was waiting: response=%s" (identifier_response) identifier_response )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Send a response to an RPC. Args: rpc_tag (str): The exact string given in a previous call to send_rpc_command result (str): The result of the operation. The possible values of response are: service_not_found, rpc_not_found, timeout, success, invalid_response, invalid_arguments, execution_exception response (bytes): The raw bytes that we should send back as a response.
(module (function_definition (function_name_translocation) function_name_translocation (parameters (identifier_from_loc) identifier_from_loc (identifier_to_loc) identifier_to_loc )parameters (block (expression_statement (assignment (identifier_rv) identifier_rv (call (identifier__activity_helper) identifier__activity_helper (argument_list (identifier_TRANSLOCATION) identifier_TRANSLOCATION )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_rv) identifier_rv (identifier_EFFECT) identifier_EFFECT )subscript (dictionary (pair (identifier_FROM_LOC) identifier_FROM_LOC (conditional_expression (call (identifier_Entity) identifier_Entity (argument_list (keyword_argument (identifier_namespace) identifier_namespace (identifier_BEL_DEFAULT_NAMESPACE) identifier_BEL_DEFAULT_NAMESPACE )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_from_loc) identifier_from_loc )keyword_argument )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_from_loc) identifier_from_loc (identifier_str) identifier_str )argument_list )call (identifier_from_loc) identifier_from_loc )conditional_expression )pair (pair (identifier_TO_LOC) identifier_TO_LOC (conditional_expression (call (identifier_Entity) identifier_Entity (argument_list (keyword_argument (identifier_namespace) identifier_namespace (identifier_BEL_DEFAULT_NAMESPACE) identifier_BEL_DEFAULT_NAMESPACE )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_to_loc) identifier_to_loc )keyword_argument )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_to_loc) identifier_to_loc (identifier_str) identifier_str )argument_list )call (identifier_to_loc) identifier_to_loc )conditional_expression )pair )dictionary )assignment )expression_statement (return_statement (identifier_rv) identifier_rv )return_statement )block )function_definition )module
Make a translocation dictionary. :param dict from_loc: An entity dictionary from :func:`pybel.dsl.entity` :param dict to_loc: An entity dictionary from :func:`pybel.dsl.entity` :rtype: dict
(module (function_definition (function_name_generate_hash) function_name_generate_hash (parameters (identifier_self) identifier_self (default_parameter (identifier_length) identifier_length (integer_30) integer_30 )default_parameter )parameters (block (import_statement (dotted_name (identifier_random) identifier_random )dotted_name (dotted_name (identifier_string) identifier_string )dotted_name )import_statement (expression_statement (assignment (identifier_chars) identifier_chars (binary_operator (attribute (identifier_string) identifier_string (identifier_ascii_letters) identifier_ascii_letters )attribute (attribute (identifier_string) identifier_string (identifier_digits) identifier_digits )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_ran) identifier_ran (attribute (call (attribute (identifier_random) identifier_random (identifier_SystemRandom) identifier_SystemRandom )attribute (argument_list )argument_list )call (identifier_choice) identifier_choice )attribute )assignment )expression_statement (expression_statement (assignment (identifier_hash) identifier_hash (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (generator_expression (call (identifier_ran) identifier_ran (argument_list (identifier_chars) identifier_chars )argument_list )call (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_length) identifier_length )argument_list )call )for_in_clause )generator_expression )call )assignment )expression_statement (return_statement (identifier_hash) identifier_hash )return_statement )block )function_definition )module
Generate random string of given length
(module (function_definition (function_name_parse) function_name_parse (parameters (list_splat_pattern (identifier_models) identifier_models )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_models) identifier_models (identifier_tuple) identifier_tuple )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_models) identifier_models (integer_0) integer_0 )subscript (identifier_list) identifier_list )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_models) identifier_models (subscript (identifier_models) identifier_models (integer_0) integer_0 )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_config) identifier_config (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'config') string_'config' (False) False )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_state) identifier_state (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'state') string_'state' (False) False )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_profiles) identifier_profiles (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'profiles') string_'profiles' (list )list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_profiles) identifier_profiles )not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_napalm_device) identifier_napalm_device (string_'profile') string_'profile' )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_profiles) identifier_profiles (attribute (identifier_napalm_device) identifier_napalm_device (identifier_profile) identifier_profile )attribute )assignment )expression_statement )block )if_statement (if_statement (not_operator (identifier_profiles) identifier_profiles )not_operator (block (expression_statement (assignment (identifier_profiles) identifier_profiles (list (call (attribute (identifier___grains__) identifier___grains__ (identifier_get) identifier_get )attribute (argument_list (string_'os') string_'os' )argument_list )call )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_root) identifier_root (call (identifier__get_root_object) identifier__get_root_object (argument_list (identifier_models) identifier_models )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parser_kwargs) identifier_parser_kwargs (dictionary (pair (string_'device') string_'device' (call (attribute (identifier_napalm_device) identifier_napalm_device (identifier_get) identifier_get )attribute (argument_list (string_'DRIVER') string_'DRIVER' )argument_list )call )pair (pair (string_'profile') string_'profile' (identifier_profiles) identifier_profiles )pair )dictionary )assignment )expression_statement (if_statement (identifier_config) identifier_config (block (expression_statement (call (attribute (identifier_root) identifier_root (identifier_parse_config) identifier_parse_config )attribute (argument_list (dictionary_splat (identifier_parser_kwargs) identifier_parser_kwargs )dictionary_splat )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_state) identifier_state (block (expression_statement (call (attribute (identifier_root) identifier_root (identifier_parse_state) identifier_parse_state )attribute (argument_list (dictionary_splat (identifier_parser_kwargs) identifier_parser_kwargs )dictionary_splat )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (identifier_root) identifier_root (identifier_to_dict) identifier_to_dict )attribute (argument_list (keyword_argument (identifier_filter) identifier_filter (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Parse configuration from the device. models A list of models to be used when parsing. config: ``False`` Parse config. state: ``False`` Parse state. profiles: ``None`` Use certain profiles to parse. If not specified, will use the device default profile(s). CLI Example: .. code-block:: bash salt '*' napalm_yang.parse models.openconfig_interfaces Output Example: .. code-block:: python { "interfaces": { "interface": { ".local.": { "name": ".local.", "state": { "admin-status": "UP", "counters": { "in-discards": 0, "in-errors": 0, "out-errors": 0 }, "enabled": True, "ifindex": 0, "last-change": 0, "oper-status": "UP", "type": "softwareLoopback" }, "subinterfaces": { "subinterface": { ".local..0": { "index": ".local..0", "state": { "ifindex": 0, "name": ".local..0" } } } } }, "ae0": { "name": "ae0", "state": { "admin-status": "UP", "counters": { "in-discards": 0, "in-errors": 0, "out-errors": 0 }, "enabled": True, "ifindex": 531, "last-change": 255203, "mtu": 1518, "oper-status": "DOWN" }, "subinterfaces": { "subinterface": { "ae0.0": { "index": "ae0.0", "state": { "description": "ASDASDASD", "ifindex": 532, "name": "ae0.0" } } "ae0.32767": { "index": "ae0.32767", "state": { "ifindex": 535, "name": "ae0.32767" } } } } }, "dsc": { "name": "dsc", "state": { "admin-status": "UP", "counters": { "in-discards": 0, "in-errors": 0, "out-errors": 0 }, "enabled": True, "ifindex": 5, "last-change": 0, "oper-status": "UP" } }, "ge-0/0/0": { "name": "ge-0/0/0", "state": { "admin-status": "UP", "counters": { "in-broadcast-pkts": 0, "in-discards": 0, "in-errors": 0, "in-multicast-pkts": 0, "in-unicast-pkts": 16877, "out-broadcast-pkts": 0, "out-errors": 0, "out-multicast-pkts": 0, "out-unicast-pkts": 15742 }, "description": "management interface", "enabled": True, "ifindex": 507, "last-change": 258467, "mtu": 1400, "oper-status": "UP" }, "subinterfaces": { "subinterface": { "ge-0/0/0.0": { "index": "ge-0/0/0.0", "state": { "description": "ge-0/0/0.0", "ifindex": 521, "name": "ge-0/0/0.0" } } } } } "irb": { "name": "irb", "state": { "admin-status": "UP", "counters": { "in-discards": 0, "in-errors": 0, "out-errors": 0 }, "enabled": True, "ifindex": 502, "last-change": 0, "mtu": 1514, "oper-status": "UP", "type": "ethernetCsmacd" } }, "lo0": { "name": "lo0", "state": { "admin-status": "UP", "counters": { "in-discards": 0, "in-errors": 0, "out-errors": 0 }, "description": "lo0", "enabled": True, "ifindex": 6, "last-change": 0, "oper-status": "UP", "type": "softwareLoopback" }, "subinterfaces": { "subinterface": { "lo0.0": { "index": "lo0.0", "state": { "description": "lo0.0", "ifindex": 16, "name": "lo0.0" } }, "lo0.16384": { "index": "lo0.16384", "state": { "ifindex": 21, "name": "lo0.16384" } }, "lo0.16385": { "index": "lo0.16385", "state": { "ifindex": 22, "name": "lo0.16385" } }, "lo0.32768": { "index": "lo0.32768", "state": { "ifindex": 248, "name": "lo0.32768" } } } } } } } }
(module (function_definition (function_name___get_node) function_name___get_node (parameters (identifier_self) identifier_self (identifier_word) identifier_word )parameters (block (expression_statement (assignment (identifier_node) identifier_node (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute )assignment )expression_statement (for_statement (identifier_c) identifier_c (identifier_word) identifier_word (block (try_statement (block (expression_statement (assignment (identifier_node) identifier_node (subscript (attribute (identifier_node) identifier_node (identifier_children) identifier_children )attribute (identifier_c) identifier_c )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (None) None )return_statement )block )except_clause )try_statement )block )for_statement (return_statement (identifier_node) identifier_node )return_statement )block )function_definition )module
Private function retrieving a final node of trie for given word Returns node or None, if the trie doesn't contain the word.
(module (function_definition (function_name_data_to_string) function_name_data_to_string (parameters (identifier_self) identifier_self (identifier_data_element) identifier_data_element )parameters (block (expression_statement (assignment (identifier_stream) identifier_stream (call (identifier_NativeIO) identifier_NativeIO (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_data_to_stream) identifier_data_to_stream )attribute (argument_list (identifier_data_element) identifier_data_element (identifier_stream) identifier_stream )argument_list )call )expression_statement (return_statement (call (attribute (identifier_stream) identifier_stream (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Converts the given data element into a string representation. :param data_element: object implementing :class:`everest.representers.interfaces.IExplicitDataElement` :returns: string representation (using the MIME content type configured for this representer)
(module (function_definition (function_name_get_es_ids) function_name_get_es_ids (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_search) identifier_search (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_search) identifier_search )attribute (identifier_source) identifier_source )attribute (argument_list (list (string_'uri') string_'uri' )list )argument_list )call (identifier_sort) identifier_sort )attribute (argument_list (list (string_'uri') string_'uri' )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_es_ids) identifier_es_ids (list_comprehension (attribute (attribute (identifier_item) identifier_item (identifier_meta) identifier_meta )attribute (identifier_id) identifier_id )attribute (for_in_clause (identifier_item) identifier_item (call (attribute (identifier_search) identifier_search (identifier_scan) identifier_scan )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_es_ids) identifier_es_ids )return_statement )block )function_definition )module
reads all the elasticssearch ids for an index
(module (function_definition (function_name_add_to_capabilities) function_name_add_to_capabilities (parameters (identifier_self) identifier_self (identifier_capabilities) identifier_capabilities )parameters (block (expression_statement (assignment (identifier_proxy_caps) identifier_proxy_caps (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_proxy_caps) identifier_proxy_caps (string_'proxyType') string_'proxyType' )subscript (subscript (attribute (identifier_self) identifier_self (identifier_proxyType) identifier_proxyType )attribute (string_'string') string_'string' )subscript )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_autodetect) identifier_autodetect )attribute (block (expression_statement (assignment (subscript (identifier_proxy_caps) identifier_proxy_caps (string_'autodetect') string_'autodetect' )subscript (attribute (identifier_self) identifier_self (identifier_autodetect) identifier_autodetect )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_ftpProxy) identifier_ftpProxy )attribute (block (expression_statement (assignment (subscript (identifier_proxy_caps) identifier_proxy_caps (string_'ftpProxy') string_'ftpProxy' )subscript (attribute (identifier_self) identifier_self (identifier_ftpProxy) identifier_ftpProxy )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_httpProxy) identifier_httpProxy )attribute (block (expression_statement (assignment (subscript (identifier_proxy_caps) identifier_proxy_caps (string_'httpProxy') string_'httpProxy' )subscript (attribute (identifier_self) identifier_self (identifier_httpProxy) identifier_httpProxy )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_proxyAutoconfigUrl) identifier_proxyAutoconfigUrl )attribute (block (expression_statement (assignment (subscript (identifier_proxy_caps) identifier_proxy_caps (string_'proxyAutoconfigUrl') string_'proxyAutoconfigUrl' )subscript (attribute (identifier_self) identifier_self (identifier_proxyAutoconfigUrl) identifier_proxyAutoconfigUrl )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_sslProxy) identifier_sslProxy )attribute (block (expression_statement (assignment (subscript (identifier_proxy_caps) identifier_proxy_caps (string_'sslProxy') string_'sslProxy' )subscript (attribute (identifier_self) identifier_self (identifier_sslProxy) identifier_sslProxy )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_noProxy) identifier_noProxy )attribute (block (expression_statement (assignment (subscript (identifier_proxy_caps) identifier_proxy_caps (string_'noProxy') string_'noProxy' )subscript (attribute (identifier_self) identifier_self (identifier_noProxy) identifier_noProxy )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_socksProxy) identifier_socksProxy )attribute (block (expression_statement (assignment (subscript (identifier_proxy_caps) identifier_proxy_caps (string_'socksProxy') string_'socksProxy' )subscript (attribute (identifier_self) identifier_self (identifier_socksProxy) identifier_socksProxy )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_socksUsername) identifier_socksUsername )attribute (block (expression_statement (assignment (subscript (identifier_proxy_caps) identifier_proxy_caps (string_'socksUsername') string_'socksUsername' )subscript (attribute (identifier_self) identifier_self (identifier_socksUsername) identifier_socksUsername )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_socksPassword) identifier_socksPassword )attribute (block (expression_statement (assignment (subscript (identifier_proxy_caps) identifier_proxy_caps (string_'socksPassword') string_'socksPassword' )subscript (attribute (identifier_self) identifier_self (identifier_socksPassword) identifier_socksPassword )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_capabilities) identifier_capabilities (string_'proxy') string_'proxy' )subscript (identifier_proxy_caps) identifier_proxy_caps )assignment )expression_statement )block )function_definition )module
Adds proxy information as capability in specified capabilities. :Args: - capabilities: The capabilities to which proxy will be added.
(module (function_definition (function_name_to_json) function_name_to_json (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__embedding) identifier__embedding )attribute (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (concatenated_string (string_'Serialization of attached embedding ') string_'Serialization of attached embedding ' (string_'to json is not supported. ') string_'to json is not supported. ' (string_'You may serialize the embedding to a binary format ') string_'You may serialize the embedding to a binary format ' (string_'separately using vocab.embedding.serialize') string_'separately using vocab.embedding.serialize' )concatenated_string )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_vocab_dict) identifier_vocab_dict (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_vocab_dict) identifier_vocab_dict (string_'idx_to_token') string_'idx_to_token' )subscript (attribute (identifier_self) identifier_self (identifier__idx_to_token) identifier__idx_to_token )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_vocab_dict) identifier_vocab_dict (string_'token_to_idx') string_'token_to_idx' )subscript (call (identifier_dict) identifier_dict (argument_list (attribute (identifier_self) identifier_self (identifier__token_to_idx) identifier__token_to_idx )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_vocab_dict) identifier_vocab_dict (string_'reserved_tokens') string_'reserved_tokens' )subscript (attribute (identifier_self) identifier_self (identifier__reserved_tokens) identifier__reserved_tokens )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_vocab_dict) identifier_vocab_dict (string_'unknown_token') string_'unknown_token' )subscript (attribute (identifier_self) identifier_self (identifier__unknown_token) identifier__unknown_token )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_vocab_dict) identifier_vocab_dict (string_'padding_token') string_'padding_token' )subscript (attribute (identifier_self) identifier_self (identifier__padding_token) identifier__padding_token )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_vocab_dict) identifier_vocab_dict (string_'bos_token') string_'bos_token' )subscript (attribute (identifier_self) identifier_self (identifier__bos_token) identifier__bos_token )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_vocab_dict) identifier_vocab_dict (string_'eos_token') string_'eos_token' )subscript (attribute (identifier_self) identifier_self (identifier__eos_token) identifier__eos_token )attribute )assignment )expression_statement (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_vocab_dict) identifier_vocab_dict )argument_list )call )return_statement )block )function_definition )module
Serialize Vocab object to json string. This method does not serialize the underlying embedding.
(module (function_definition (function_name_set_signal_type) function_name_set_signal_type (parameters (identifier_self) identifier_self (identifier_sig_type) identifier_sig_type )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_sig_type) identifier_sig_type (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_sig_type) identifier_sig_type (list (identifier_sig_type) identifier_sig_type )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_snr_input) identifier_snr_input )attribute (identifier_signal_type) identifier_signal_type )attribute (identifier_sig_type) identifier_sig_type )assignment )expression_statement (return_statement )return_statement )block )function_definition )module
Set the signal type of interest. Sets the signal type for which the SNR is calculated. This means inspiral, merger, and/or ringdown. Args: sig_type (str or list of str): Signal type desired by user. Choices are `ins`, `mrg`, `rd`, `all` for circular waveforms created with PhenomD. If eccentric waveforms are used, must be `all`.
(module (function_definition (function_name__parse) function_name__parse (parameters (identifier_self) identifier_self (identifier_globals_dict) identifier_globals_dict )parameters (block (expression_statement (assignment (identifier_globals) identifier_globals (dictionary )dictionary )assignment )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_globals_dict) identifier_globals_dict (identifier_dict) identifier_dict )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidGlobalsSectionException) identifier_InvalidGlobalsSectionException (argument_list (attribute (identifier_self) identifier_self (identifier__KEYWORD) identifier__KEYWORD )attribute (call (attribute (string_"It must be a non-empty dictionary") string_"It must be a non-empty dictionary" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__KEYWORD) identifier__KEYWORD )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (for_statement (pattern_list (identifier_section_name) identifier_section_name (identifier_properties) identifier_properties )pattern_list (call (attribute (identifier_globals_dict) identifier_globals_dict (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_resource_type) identifier_resource_type (call (attribute (identifier_self) identifier_self (identifier__make_resource_type) identifier__make_resource_type )attribute (argument_list (identifier_section_name) identifier_section_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_resource_type) identifier_resource_type (attribute (identifier_self) identifier_self (identifier_supported_properties) identifier_supported_properties )attribute )comparison_operator (block (raise_statement (call (identifier_InvalidGlobalsSectionException) identifier_InvalidGlobalsSectionException (argument_list (attribute (identifier_self) identifier_self (identifier__KEYWORD) identifier__KEYWORD )attribute (call (attribute (concatenated_string (string_"'{section}' is not supported. ") string_"'{section}' is not supported. " (string_"Must be one of the following values - {supported}") string_"Must be one of the following values - {supported}" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_section) identifier_section (identifier_section_name) identifier_section_name )keyword_argument (keyword_argument (identifier_supported) identifier_supported (attribute (identifier_self) identifier_self (identifier_supported_resource_section_names) identifier_supported_resource_section_names )attribute )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_properties) identifier_properties (identifier_dict) identifier_dict )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidGlobalsSectionException) identifier_InvalidGlobalsSectionException (argument_list (attribute (identifier_self) identifier_self (identifier__KEYWORD) identifier__KEYWORD )attribute (string_"Value of ${section} must be a dictionary") string_"Value of ${section} must be a dictionary" )argument_list )call )raise_statement )block )if_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_properties) identifier_properties (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_supported) identifier_supported (subscript (attribute (identifier_self) identifier_self (identifier_supported_properties) identifier_supported_properties )attribute (identifier_resource_type) identifier_resource_type )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (identifier_supported) identifier_supported )comparison_operator (block (raise_statement (call (identifier_InvalidGlobalsSectionException) identifier_InvalidGlobalsSectionException (argument_list (attribute (identifier_self) identifier_self (identifier__KEYWORD) identifier__KEYWORD )attribute (call (attribute (concatenated_string (string_"'{key}' is not a supported property of '{section}'. ") string_"'{key}' is not a supported property of '{section}'. " (string_"Must be one of the following values - {supported}") string_"Must be one of the following values - {supported}" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_section) identifier_section (identifier_section_name) identifier_section_name )keyword_argument (keyword_argument (identifier_supported) identifier_supported (identifier_supported) identifier_supported )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_globals) identifier_globals (identifier_resource_type) identifier_resource_type )subscript (call (identifier_GlobalProperties) identifier_GlobalProperties (argument_list (identifier_properties) identifier_properties )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_globals) identifier_globals )return_statement )block )function_definition )module
Takes a SAM template as input and parses the Globals section :param globals_dict: Dictionary representation of the Globals section :return: Processed globals dictionary which can be used to quickly identify properties to merge :raises: InvalidResourceException if the input contains properties that we don't support
(module (function_definition (function_name_open_submission) function_name_open_submission (parameters (identifier_self) identifier_self (default_parameter (identifier_url) identifier_url (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_url) identifier_url (None) None )comparison_operator (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier_get_selected_item) identifier_get_selected_item )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (subscript (identifier_data) identifier_data (string_'permalink') string_'permalink' )subscript )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_data) identifier_data (identifier_get) identifier_get )attribute (argument_list (string_'url_type') string_'url_type' )argument_list )call (string_'selfpost') string_'selfpost' )comparison_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_history) identifier_history )attribute (identifier_add) identifier_add )attribute (argument_list (subscript (identifier_data) identifier_data (string_'url_full') string_'url_full' )subscript )argument_list )call )expression_statement )block )if_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_selected_page) identifier_selected_page )attribute (call (attribute (identifier_self) identifier_self (identifier_open_submission_page) identifier_open_submission_page )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement )block )function_definition )module
Select the current submission to view posts.
(module (function_definition (function_name_del_calculation) function_name_del_calculation (parameters (identifier_job_id) identifier_job_id (default_parameter (identifier_confirmed) identifier_confirmed (False) False )default_parameter )parameters (block (if_statement (comparison_operator (call (attribute (identifier_logs) identifier_logs (identifier_dbcmd) identifier_dbcmd )attribute (argument_list (string_'get_job') string_'get_job' (identifier_job_id) identifier_job_id )argument_list )call (None) None )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'There is no job %d') string_'There is no job %d' (identifier_job_id) identifier_job_id )binary_operator )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (boolean_operator (identifier_confirmed) identifier_confirmed (call (identifier_confirm) identifier_confirm (argument_list (concatenated_string (string_'Are you sure you want to (abort and) delete this calculation and ') string_'Are you sure you want to (abort and) delete this calculation and ' (string_'all associated outputs?\nThis action cannot be undone. (y/n): ') string_'all associated outputs?\nThis action cannot be undone. (y/n): ' )concatenated_string )argument_list )call )boolean_operator (block (try_statement (block (expression_statement (call (identifier_abort) identifier_abort (argument_list (identifier_job_id) identifier_job_id )argument_list )call )expression_statement (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (identifier_logs) identifier_logs (identifier_dbcmd) identifier_dbcmd )attribute (argument_list (string_'del_calc') string_'del_calc' (identifier_job_id) identifier_job_id (call (attribute (identifier_getpass) identifier_getpass (identifier_getuser) identifier_getuser )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_RuntimeError) identifier_RuntimeError (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (expression_statement (call (identifier_safeprint) identifier_safeprint (argument_list (identifier_err) identifier_err )argument_list )call )expression_statement )block )except_clause (else_clause (block (if_statement (comparison_operator (string_'success') string_'success' (identifier_resp) identifier_resp )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'Removed %d') string_'Removed %d' (identifier_job_id) identifier_job_id )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (subscript (identifier_resp) identifier_resp (string_'error') string_'error' )subscript )argument_list )call )expression_statement )block )else_clause )if_statement )block )else_clause )try_statement )block )if_statement )block )function_definition )module
Delete a calculation and all associated outputs.
(module (function_definition (function_name_export_kappa_im) function_name_export_kappa_im (parameters (identifier_model) identifier_model (default_parameter (identifier_fname) identifier_fname (None) None )default_parameter )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_kappa_util) identifier_kappa_util )dotted_name )relative_import (dotted_name (identifier_im_json_to_graph) identifier_im_json_to_graph )dotted_name )import_from_statement (expression_statement (assignment (identifier_kappa) identifier_kappa (call (identifier__prepare_kappa) identifier__prepare_kappa (argument_list (identifier_model) identifier_model )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_imap) identifier_imap (call (attribute (identifier_kappa) identifier_kappa (identifier_analyses_influence_map) identifier_analyses_influence_map )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_im) identifier_im (call (identifier_im_json_to_graph) identifier_im_json_to_graph (argument_list (identifier_imap) identifier_imap )argument_list )call )assignment )expression_statement (for_statement (identifier_param) identifier_param (attribute (identifier_model) identifier_model (identifier_parameters) identifier_parameters )attribute (block (try_statement (block (expression_statement (call (attribute (identifier_im) identifier_im (identifier_remove_node) identifier_remove_node )attribute (argument_list (attribute (identifier_param) identifier_param (identifier_name) identifier_name )attribute )argument_list )call )expression_statement )block (except_clause (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (if_statement (identifier_fname) identifier_fname (block (expression_statement (assignment (identifier_agraph) identifier_agraph (call (attribute (attribute (identifier_networkx) identifier_networkx (identifier_nx_agraph) identifier_nx_agraph )attribute (identifier_to_agraph) identifier_to_agraph )attribute (argument_list (identifier_im) identifier_im )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_agraph) identifier_agraph (identifier_draw) identifier_draw )attribute (argument_list (identifier_fname) identifier_fname (keyword_argument (identifier_prog) identifier_prog (string_'dot') string_'dot' )keyword_argument )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_im) identifier_im )return_statement )block )function_definition )module
Return a networkx graph representing the model's Kappa influence map. Parameters ---------- model : pysb.core.Model A PySB model to be exported into a Kappa IM. fname : Optional[str] A file name, typically with .png or .pdf extension in which the IM is rendered using pygraphviz. Returns ------- networkx.MultiDiGraph A graph object representing the influence map.
(module (function_definition (function_name_authenticate) function_name_authenticate (parameters (identifier_self) identifier_self (identifier_api_key) identifier_api_key )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__api_key) identifier__api_key )attribute (identifier_api_key) identifier_api_key )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_auth) identifier_auth )attribute (tuple (string_'') string_'' (attribute (identifier_self) identifier_self (identifier__api_key) identifier__api_key )attribute )tuple )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__verify_api_key) identifier__verify_api_key )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Logs user into Heroku with given api_key.
(module (function_definition (function_name__find_devices_mac) function_name__find_devices_mac (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_keyboards) identifier_keyboards )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_Keyboard) identifier_Keyboard (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mice) identifier_mice )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_MightyMouse) identifier_MightyMouse (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mice) identifier_mice )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_Mouse) identifier_Mouse (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Find devices on Mac.
(module (function_definition (function_name__next_record) function_name__next_record (parameters (identifier_self) identifier_self (identifier_next_line) identifier_next_line )parameters (block (expression_statement (assignment (identifier_record) identifier_record (call (attribute (attribute (identifier_self) identifier_self (identifier_loader) identifier_loader )attribute (identifier_parse_record_stream) identifier_parse_record_stream )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_reader) identifier_reader )attribute (identifier_next_line) identifier_next_line (attribute (identifier_self) identifier_self (identifier_known_format) identifier_known_format )attribute (attribute (identifier_self) identifier_self (identifier_no_record_parse) identifier_no_record_parse )attribute (attribute (identifier_self) identifier_self (identifier_ensure_http_headers) identifier_ensure_http_headers )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_member_info) identifier_member_info )attribute (None) None )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_mixed_arc_warc) identifier_mixed_arc_warc )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_known_format) identifier_known_format )attribute (attribute (identifier_record) identifier_record (identifier_format) identifier_format )attribute )assignment )expression_statement )block )if_statement (return_statement (identifier_record) identifier_record )return_statement )block )function_definition )module
Use loader to parse the record from the reader stream Supporting warc and arc records
(module (function_definition (function_name_set_monitor) function_name_set_monitor (parameters (identifier_module) identifier_module )parameters (block (function_definition (function_name_monitor) function_name_monitor (parameters (identifier_name) identifier_name (identifier_tensor) identifier_tensor (default_parameter (identifier_track_data) identifier_track_data (True) True )default_parameter (default_parameter (identifier_track_grad) identifier_track_grad (True) True )default_parameter )parameters (block (expression_statement (assignment (subscript (attribute (identifier_module) identifier_module (identifier_monitored_vars) identifier_monitored_vars )attribute (identifier_name) identifier_name )subscript (dictionary (pair (string_'tensor') string_'tensor' (identifier_tensor) identifier_tensor )pair (pair (string_'track_data') string_'track_data' (identifier_track_data) identifier_track_data )pair (pair (string_'track_grad') string_'track_grad' (identifier_track_grad) identifier_track_grad )pair )dictionary )assignment )expression_statement )block )function_definition (expression_statement (assignment (attribute (identifier_module) identifier_module (identifier_monitor) identifier_monitor )attribute (identifier_monitor) identifier_monitor )assignment )expression_statement )block )function_definition )module
Defines the monitor method on the module.
(module (function_definition (function_name_formula_sections) function_name_formula_sections (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_dtree) identifier_dtree )attribute (None) None )comparison_operator (block (return_statement (attribute (attribute (identifier_self) identifier_self (identifier_dtree) identifier_dtree )attribute (identifier_order) identifier_order )attribute )return_statement )block (else_clause (block (return_statement (list_comprehension (identifier_s) identifier_s (for_in_clause (identifier_s) identifier_s (call (attribute (attribute (identifier_self) identifier_self (identifier_manifest) identifier_manifest )attribute (identifier_sections) identifier_sections )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_s) identifier_s (string_"config") string_"config" )comparison_operator )if_clause )list_comprehension )return_statement )block )else_clause )if_statement )block )function_definition )module
Return all sections related to a formula, re-ordered according to the "depends" section.
(module (function_definition (function_name_combine_first) function_name_combine_first (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (import_statement (aliased_import (dotted_name (identifier_pandas) identifier_pandas (identifier_core) identifier_core (identifier_computation) identifier_computation (identifier_expressions) identifier_expressions )dotted_name (identifier_expressions) identifier_expressions )aliased_import )import_statement (function_definition (function_name_extract_values) function_name_extract_values (parameters (identifier_arr) identifier_arr )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_arr) identifier_arr (tuple (identifier_ABCIndexClass) identifier_ABCIndexClass (identifier_ABCSeries) identifier_ABCSeries )tuple )argument_list )call (block (expression_statement (assignment (identifier_arr) identifier_arr (attribute (identifier_arr) identifier_arr (identifier__values) identifier__values )attribute )assignment )expression_statement )block )if_statement (if_statement (call (identifier_needs_i8_conversion) identifier_needs_i8_conversion (argument_list (identifier_arr) identifier_arr )argument_list )call (block (if_statement (call (identifier_is_extension_array_dtype) identifier_is_extension_array_dtype (argument_list (attribute (identifier_arr) identifier_arr (identifier_dtype) identifier_dtype )attribute )argument_list )call (block (expression_statement (assignment (identifier_arr) identifier_arr (attribute (identifier_arr) identifier_arr (identifier_asi8) identifier_asi8 )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_arr) identifier_arr (call (attribute (identifier_arr) identifier_arr (identifier_view) identifier_view )attribute (argument_list (string_'i8') string_'i8' )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )if_statement (return_statement (identifier_arr) identifier_arr )return_statement )block )function_definition (function_definition (function_name_combiner) function_name_combiner (parameters (identifier_x) identifier_x (identifier_y) identifier_y )parameters (block (expression_statement (assignment (identifier_mask) identifier_mask (call (identifier_isna) identifier_isna (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_mask) identifier_mask (tuple (identifier_ABCIndexClass) identifier_ABCIndexClass (identifier_ABCSeries) identifier_ABCSeries )tuple )argument_list )call (block (expression_statement (assignment (identifier_mask) identifier_mask (attribute (identifier_mask) identifier_mask (identifier__values) identifier__values )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_x_values) identifier_x_values (call (identifier_extract_values) identifier_extract_values (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y_values) identifier_y_values (call (identifier_extract_values) identifier_extract_values (argument_list (identifier_y) identifier_y )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_y) identifier_y (identifier_name) identifier_name )attribute (attribute (identifier_self) identifier_self (identifier_columns) identifier_columns )attribute )comparison_operator (block (return_statement (identifier_y_values) identifier_y_values )return_statement )block )if_statement (return_statement (call (attribute (identifier_expressions) identifier_expressions (identifier_where) identifier_where )attribute (argument_list (identifier_mask) identifier_mask (identifier_y_values) identifier_y_values (identifier_x_values) identifier_x_values )argument_list )call )return_statement )block )function_definition (return_statement (call (attribute (identifier_self) identifier_self (identifier_combine) identifier_combine )attribute (argument_list (identifier_other) identifier_other (identifier_combiner) identifier_combiner (keyword_argument (identifier_overwrite) identifier_overwrite (False) False )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Update null elements with value in the same location in `other`. Combine two DataFrame objects by filling null values in one DataFrame with non-null values from other DataFrame. The row and column indexes of the resulting DataFrame will be the union of the two. Parameters ---------- other : DataFrame Provided DataFrame to use to fill null values. Returns ------- DataFrame See Also -------- DataFrame.combine : Perform series-wise operation on two DataFrames using a given function. Examples -------- >>> df1 = pd.DataFrame({'A': [None, 0], 'B': [None, 4]}) >>> df2 = pd.DataFrame({'A': [1, 1], 'B': [3, 3]}) >>> df1.combine_first(df2) A B 0 1.0 3.0 1 0.0 4.0 Null values still persist if the location of that null value does not exist in `other` >>> df1 = pd.DataFrame({'A': [None, 0], 'B': [4, None]}) >>> df2 = pd.DataFrame({'B': [3, 3], 'C': [1, 1]}, index=[1, 2]) >>> df1.combine_first(df2) A B C 0 NaN 4.0 NaN 1 0.0 3.0 1.0 2 NaN 3.0 1.0
(module (function_definition (function_name_clear_bucket_props) function_name_clear_bucket_props (parameters (identifier_self) identifier_self (identifier_bucket) identifier_bucket )parameters (block (expression_statement (assignment (identifier_bucket_type) identifier_bucket_type (call (attribute (identifier_self) identifier_self (identifier__get_bucket_type) identifier__get_bucket_type )attribute (argument_list (attribute (identifier_bucket) identifier_bucket (identifier_bucket_type) identifier_bucket_type )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier_bucket_properties_path) identifier_bucket_properties_path )attribute (argument_list (attribute (identifier_bucket) identifier_bucket (identifier_name) identifier_name )attribute (keyword_argument (identifier_bucket_type) identifier_bucket_type (identifier_bucket_type) identifier_bucket_type )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier_bucket_properties_path) identifier_bucket_properties_path )attribute (argument_list (attribute (identifier_bucket) identifier_bucket (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_headers) identifier_headers (dictionary (pair (string_'Content-Type') string_'Content-Type' (string_'application/json') string_'application/json' )pair )dictionary )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_status) identifier_status (identifier__) identifier__ (identifier__) identifier__ )pattern_list (call (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (argument_list (string_'DELETE') string_'DELETE' (identifier_url) identifier_url (identifier_headers) identifier_headers (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_status) identifier_status (integer_204) integer_204 )comparison_operator (block (return_statement (True) True )return_statement )block (elif_clause (comparison_operator (identifier_status) identifier_status (integer_405) integer_405 )comparison_operator (block (return_statement (False) False )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_RiakError) identifier_RiakError (argument_list (binary_operator (string_'Error %s clearing bucket properties.') string_'Error %s clearing bucket properties.' (identifier_status) identifier_status )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
reset the properties on the bucket object given
(module (function_definition (function_name_getDigitalMinimum) function_name_getDigitalMinimum (parameters (identifier_self) identifier_self (default_parameter (identifier_chn) identifier_chn (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_chn) identifier_chn (None) None )comparison_operator (block (if_statement (comparison_operator (integer_0) integer_0 (identifier_chn) identifier_chn (attribute (identifier_self) identifier_self (identifier_signals_in_file) identifier_signals_in_file )attribute )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_digital_min) identifier_digital_min )attribute (argument_list (identifier_chn) identifier_chn )argument_list )call )return_statement )block (else_clause (block (return_statement (integer_0) integer_0 )return_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_digMin) identifier_digMin (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_signals_in_file) identifier_signals_in_file )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (attribute (identifier_np) identifier_np (identifier_arange) identifier_arange )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_signals_in_file) identifier_signals_in_file )attribute )argument_list )call (block (expression_statement (assignment (subscript (identifier_digMin) identifier_digMin (identifier_i) identifier_i )subscript (call (attribute (identifier_self) identifier_self (identifier_digital_min) identifier_digital_min )attribute (argument_list (identifier_i) identifier_i )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_digMin) identifier_digMin )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns the minimum digital value of signal edfsignal. Parameters ---------- chn : int channel number Examples -------- >>> import pyedflib >>> f = pyedflib.data.test_generator() >>> f.getDigitalMinimum(0) -32768 >>> f._close() >>> del f
(module (function_definition (function_name_reduce) function_name_reduce (parameters (identifier_self) identifier_self (default_parameter (identifier_dimensions) identifier_dimensions (list )list )default_parameter (default_parameter (identifier_function) identifier_function (None) None )default_parameter (default_parameter (identifier_spreadfn) identifier_spreadfn (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'_method_args') string_'_method_args' )subscript (tuple (identifier_dimensions) identifier_dimensions (identifier_function) identifier_function (identifier_spreadfn) identifier_spreadfn )tuple )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier___call__) identifier___call__ )attribute (argument_list (string_'reduce') string_'reduce' (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Applies a reduce function to all ViewableElement objects. See :py:meth:`Dimensioned.opts` and :py:meth:`Apply.__call__` for more information.
(module (function_definition (function_name_get_tree_depth) function_name_get_tree_depth (parameters (identifier_self) identifier_self )parameters (block (if_statement (parenthesized_expression (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute )parenthesized_expression (block (expression_statement (assignment (identifier_depth) identifier_depth (integer_1) integer_1 )assignment )expression_statement (expression_statement (assignment (identifier_childDepths) identifier_childDepths (list )list )assignment )expression_statement (for_statement (identifier_child) identifier_child (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute (block (expression_statement (call (attribute (identifier_childDepths) identifier_childDepths (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_child) identifier_child (identifier_get_tree_depth) identifier_get_tree_depth )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (binary_operator (identifier_depth) identifier_depth (call (identifier_max) identifier_max (argument_list (identifier_childDepths) identifier_childDepths )argument_list )call )binary_operator )return_statement )block (else_clause (block (return_statement (integer_0) integer_0 )return_statement )block )else_clause )if_statement )block )function_definition )module
Finds depth of this tree.
(module (function_definition (function_name__enter_single_subdir) function_name__enter_single_subdir (parameters (identifier_root_dir) identifier_root_dir )parameters (block (expression_statement (assignment (identifier_current_cwd) identifier_current_cwd (call (attribute (identifier_os) identifier_os (identifier_getcwd) identifier_getcwd )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_dest_dir) identifier_dest_dir (identifier_root_dir) identifier_root_dir )assignment )expression_statement (expression_statement (assignment (identifier_dir_list) identifier_dir_list (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_root_dir) identifier_root_dir )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_dir_list) identifier_dir_list )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_first) identifier_first (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_root_dir) identifier_root_dir (subscript (identifier_dir_list) identifier_dir_list (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_first) identifier_first )argument_list )call (block (expression_statement (assignment (identifier_dest_dir) identifier_dest_dir (identifier_first) identifier_first )assignment )expression_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (identifier_dest_dir) identifier_dest_dir (identifier_root_dir) identifier_root_dir )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (identifier_dest_dir) identifier_dest_dir )argument_list )call )expression_statement (expression_statement (yield (identifier_dest_dir) identifier_dest_dir )yield )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (identifier_current_cwd) identifier_current_cwd )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
if the given directory has just a single subdir, enter that
(module (function_definition (function_name_get_instance) function_name_get_instance (parameters (identifier_self) identifier_self (identifier_payload) identifier_payload )parameters (block (return_statement (call (identifier_FieldInstance) identifier_FieldInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_assistant_sid) identifier_assistant_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'assistant_sid') string_'assistant_sid' )subscript )keyword_argument (keyword_argument (identifier_task_sid) identifier_task_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'task_sid') string_'task_sid' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Build an instance of FieldInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance :rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance
(module (function_definition (function_name_fetch) function_name_fetch (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_values) identifier_values (identifier_of) identifier_of )attribute (argument_list (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_fetch) identifier_fetch )attribute (argument_list (string_'GET') string_'GET' (attribute (identifier_self) identifier_self (identifier__uri) identifier__uri )attribute (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_PublishedTrackInstance) identifier_PublishedTrackInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_room_sid) identifier_room_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'room_sid') string_'room_sid' )subscript )keyword_argument (keyword_argument (identifier_participant_sid) identifier_participant_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'participant_sid') string_'participant_sid' )subscript )keyword_argument (keyword_argument (identifier_sid) identifier_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'sid') string_'sid' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Fetch a PublishedTrackInstance :returns: Fetched PublishedTrackInstance :rtype: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackInstance
(module (function_definition (function_name_wait_for_vacancy) function_name_wait_for_vacancy (parameters (identifier_self) identifier_self (identifier_processor_type) identifier_processor_type )parameters (block (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier__condition) identifier__condition )attribute )with_item )with_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__condition) identifier__condition )attribute (identifier_wait_for) identifier_wait_for )attribute (argument_list (lambda (parenthesized_expression (boolean_operator (call (attribute (identifier_self) identifier_self (identifier__processor_available) identifier__processor_available )attribute (argument_list (identifier_processor_type) identifier_processor_type )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier__cancelled_event) identifier__cancelled_event )attribute (identifier_is_set) identifier_is_set )attribute (argument_list )argument_list )call )boolean_operator )parenthesized_expression )lambda )argument_list )call )expression_statement (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__cancelled_event) identifier__cancelled_event )attribute (identifier_is_set) identifier_is_set )attribute (argument_list )argument_list )call (block (raise_statement (call (identifier_WaitCancelledException) identifier_WaitCancelledException (argument_list )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_processor) identifier_processor (call (attribute (subscript (identifier_self) identifier_self (identifier_processor_type) identifier_processor_type )subscript (identifier_next_processor) identifier_next_processor )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_processor) identifier_processor )return_statement )block )with_statement )block )function_definition )module
Waits for a particular processor type to have the capacity to handle additional transactions or until is_cancelled is True. Args: processor_type (ProcessorType): The family, and version of the transaction processor. Returns: Processor
(module (function_definition (function_name_read_metadata) function_name_read_metadata (parameters (identifier_self) identifier_self (identifier_symbol) identifier_symbol )parameters (block (expression_statement (assignment (identifier_sym) identifier_sym (call (attribute (identifier_self) identifier_self (identifier__get_symbol_info) identifier__get_symbol_info )attribute (argument_list (identifier_symbol) identifier_symbol )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_sym) identifier_sym )not_operator (block (raise_statement (call (identifier_NoDataFoundException) identifier_NoDataFoundException (argument_list (string_"Symbol does not exist.") string_"Symbol does not exist." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_x) identifier_x (call (attribute (attribute (identifier_self) identifier_self (identifier__symbols) identifier__symbols )attribute (identifier_find_one) identifier_find_one )attribute (argument_list (dictionary (pair (identifier_SYMBOL) identifier_SYMBOL (identifier_symbol) identifier_symbol )pair )dictionary )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (subscript (identifier_x) identifier_x (identifier_USERMETA) identifier_USERMETA )subscript (comparison_operator (identifier_USERMETA) identifier_USERMETA (identifier_x) identifier_x )comparison_operator (None) None )conditional_expression )return_statement )block )function_definition )module
Reads user defined metadata out for the given symbol Parameters ---------- symbol: str symbol for the given item in the DB Returns ------- ?
(module (function_definition (function_name_get_kde_home_dir) function_name_get_kde_home_dir (parameters )parameters (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_"KDEHOME") string_"KDEHOME" )argument_list )call (block (expression_statement (assignment (identifier_kde_home) identifier_kde_home (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_"KDEHOME") string_"KDEHOME" )subscript )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_home) identifier_home (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_"HOME") string_"HOME" )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_home) identifier_home )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_kde3_home) identifier_kde3_home (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_home) identifier_home (string_".kde") string_".kde" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_kde4_home) identifier_kde4_home (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_home) identifier_home (string_".kde4") string_".kde4" )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_fileutil) identifier_fileutil (identifier_find_executable) identifier_find_executable )attribute (argument_list (string_"kde4-config") string_"kde4-config" )argument_list )call (block (expression_statement (assignment (identifier_kde3_file) identifier_kde3_file (call (identifier_kde_home_to_config) identifier_kde_home_to_config (argument_list (identifier_kde3_home) identifier_kde3_home )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_kde4_file) identifier_kde4_file (call (identifier_kde_home_to_config) identifier_kde_home_to_config (argument_list (identifier_kde4_home) identifier_kde4_home )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_kde4_file) identifier_kde4_file )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_kde3_file) identifier_kde3_file )argument_list )call )boolean_operator (block (if_statement (comparison_operator (call (attribute (identifier_fileutil) identifier_fileutil (identifier_get_mtime) identifier_get_mtime )attribute (argument_list (identifier_kde4_file) identifier_kde4_file )argument_list )call (call (attribute (identifier_fileutil) identifier_fileutil (identifier_get_mtime) identifier_get_mtime )attribute (argument_list (identifier_kde3_file) identifier_kde3_file )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_kde_home) identifier_kde_home (identifier_kde4_home) identifier_kde4_home )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_kde_home) identifier_kde_home (identifier_kde3_home) identifier_kde3_home )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_kde_home) identifier_kde_home (identifier_kde4_home) identifier_kde4_home )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_kde_home) identifier_kde_home (identifier_kde3_home) identifier_kde3_home )assignment )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement (return_statement (conditional_expression (identifier_kde_home) identifier_kde_home (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_kde_home) identifier_kde_home )argument_list )call (None) None )conditional_expression )return_statement )block )function_definition )module
Return KDE home directory or None if not found.
(module (function_definition (function_name_table_to_source_list) function_name_table_to_source_list (parameters (identifier_table) identifier_table (default_parameter (identifier_src_type) identifier_src_type (identifier_OutputSource) identifier_OutputSource )default_parameter )parameters (block (expression_statement (assignment (identifier_source_list) identifier_source_list (list )list )assignment )expression_statement (if_statement (comparison_operator (identifier_table) identifier_table (None) None )comparison_operator (block (return_statement (identifier_source_list) identifier_source_list )return_statement )block )if_statement (for_statement (identifier_row) identifier_row (identifier_table) identifier_table (block (expression_statement (assignment (identifier_src) identifier_src (call (identifier_src_type) identifier_src_type (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_param) identifier_param (attribute (identifier_src_type) identifier_src_type (identifier_names) identifier_names )attribute (block (if_statement (comparison_operator (identifier_param) identifier_param (attribute (identifier_table) identifier_table (identifier_colnames) identifier_colnames )attribute )comparison_operator (block (expression_statement (assignment (identifier_val) identifier_val (subscript (identifier_row) identifier_row (identifier_param) identifier_param )subscript )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (attribute (identifier_np) identifier_np (identifier_float32) identifier_float32 )attribute )argument_list )call (block (expression_statement (assignment (identifier_val) identifier_val (call (attribute (identifier_np) identifier_np (identifier_float64) identifier_float64 )attribute (argument_list (identifier_val) identifier_val )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_src) identifier_src (identifier_param) identifier_param (identifier_val) identifier_val )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (identifier_source_list) identifier_source_list (identifier_append) identifier_append )attribute (argument_list (identifier_src) identifier_src )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_source_list) identifier_source_list )return_statement )block )function_definition )module
Convert a table of data into a list of sources. A single table must have consistent source types given by src_type. src_type should be one of :class:`AegeanTools.models.OutputSource`, :class:`AegeanTools.models.SimpleSource`, or :class:`AegeanTools.models.IslandSource`. Parameters ---------- table : Table Table of sources src_type : class Sources must be of type :class:`AegeanTools.models.OutputSource`, :class:`AegeanTools.models.SimpleSource`, or :class:`AegeanTools.models.IslandSource`. Returns ------- sources : list A list of objects of the given type.
(module (function_definition (function_name_guest_capture) function_name_guest_capture (parameters (identifier_self) identifier_self (identifier_userid) identifier_userid (identifier_image_name) identifier_image_name (default_parameter (identifier_capture_type) identifier_capture_type (string_'rootonly') string_'rootonly' )default_parameter (default_parameter (identifier_compress_level) identifier_compress_level (integer_6) integer_6 )default_parameter )parameters (block (expression_statement (assignment (identifier_action) identifier_action (parenthesized_expression (binary_operator (string_"capture guest '%(vm)s' to generate image '%(img)s'") string_"capture guest '%(vm)s' to generate image '%(img)s'" (dictionary (pair (string_'vm') string_'vm' (identifier_userid) identifier_userid )pair (pair (string_'img') string_'img' (identifier_image_name) identifier_image_name )pair )dictionary )binary_operator )parenthesized_expression )assignment )expression_statement (with_statement (with_clause (with_item (call (attribute (identifier_zvmutils) identifier_zvmutils (identifier_log_and_reraise_sdkbase_error) identifier_log_and_reraise_sdkbase_error )attribute (argument_list (identifier_action) identifier_action )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__vmops) identifier__vmops )attribute (identifier_guest_capture) identifier_guest_capture )attribute (argument_list (identifier_userid) identifier_userid (identifier_image_name) identifier_image_name (keyword_argument (identifier_capture_type) identifier_capture_type (identifier_capture_type) identifier_capture_type )keyword_argument (keyword_argument (identifier_compress_level) identifier_compress_level (identifier_compress_level) identifier_compress_level )keyword_argument )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Capture the guest to generate a image :param userid: (str) the user id of the vm :param image_name: (str) the unique image name after capture :param capture_type: (str) the type of capture, the value can be: rootonly: indicate just root device will be captured alldisks: indicate all the devices of the userid will be captured :param compress_level: the compression level of the image, default is 6
(module (function_definition (function_name_add_update_callback) function_name_add_update_callback (parameters (identifier_self) identifier_self (identifier_callback) identifier_callback (identifier_device) identifier_device )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__update_callbacks) identifier__update_callbacks )attribute (identifier_append) identifier_append )attribute (argument_list (list (identifier_callback) identifier_callback (identifier_device) identifier_device )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier__LOGGER) identifier__LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'Added update callback to %s on %s') string_'Added update callback to %s on %s' (identifier_callback) identifier_callback (identifier_device) identifier_device )argument_list )call )expression_statement )block )function_definition )module
Register as callback for when a matching device changes.
(module (function_definition (function_name_save) function_name_save (parameters (identifier_callLog) identifier_callLog (identifier_logFilename) identifier_logFilename )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_logFilename) identifier_logFilename (string_"wb") string_"wb" )argument_list )call (as_pattern_target (identifier_outp) identifier_outp )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_cPickle) identifier_cPickle (identifier_dump) identifier_dump )attribute (argument_list (identifier_callLog) identifier_callLog (identifier_outp) identifier_outp )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Save the call log history into this file. @param logFilename (path) Filename in which to save a pickled version of the call logs.
(module (function_definition (function_name_mapzen_elevation_rgb) function_name_mapzen_elevation_rgb (parameters (identifier_arr) identifier_arr )parameters (block (expression_statement (assignment (identifier_arr) identifier_arr (call (attribute (identifier_np) identifier_np (identifier_clip) identifier_clip )attribute (argument_list (binary_operator (identifier_arr) identifier_arr (float_32768.0) float_32768.0 )binary_operator (float_0.0) float_0.0 (float_65535.0) float_65535.0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (binary_operator (identifier_arr) identifier_arr (integer_256) integer_256 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_g) identifier_g (binary_operator (identifier_arr) identifier_arr (integer_256) integer_256 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_b) identifier_b (binary_operator (parenthesized_expression (binary_operator (identifier_arr) identifier_arr (integer_256) integer_256 )binary_operator )parenthesized_expression (integer_256) integer_256 )binary_operator )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_np) identifier_np (identifier_stack) identifier_stack )attribute (argument_list (list (identifier_r) identifier_r (identifier_g) identifier_g (identifier_b) identifier_b )list )argument_list )call (identifier_astype) identifier_astype )attribute (argument_list (attribute (identifier_np) identifier_np (identifier_uint8) identifier_uint8 )attribute )argument_list )call )return_statement )block )function_definition )module
Encode elevation value to RGB values compatible with Mapzen tangram. Attributes ---------- arr : numpy ndarray Image array to encode. Returns ------- out : numpy ndarray RGB array (3, h, w)
(module (function_definition (function_name_track_end) function_name_track_end (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___tracking) identifier___tracking )attribute (False) False )assignment )expression_statement (expression_statement (assignment (identifier_changes) identifier_changes (attribute (identifier_self) identifier_self (identifier___changes) identifier___changes )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___changes) identifier___changes )attribute (dictionary )dictionary )assignment )expression_statement (return_statement (identifier_changes) identifier_changes )return_statement )block )function_definition )module
Ends tracking of attributes changes. Returns the changes that occurred to the attributes. Only the final state of each attribute is obtained
(module (function_definition (function_name_list_properties) function_name_list_properties (parameters (identifier_self) identifier_self (default_parameter (identifier_list_all) identifier_list_all (False) False )default_parameter )parameters (block (if_statement (identifier_list_all) identifier_list_all (block (expression_statement (assignment (identifier_props) identifier_props (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_env) identifier_env )attribute (identifier_property_rules) identifier_property_rules )attribute (identifier_rdl_properties) identifier_rdl_properties )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (attribute (identifier_self) identifier_self (identifier_inst) identifier_inst )attribute )argument_list )call (attribute (identifier_v) identifier_v (identifier_bindable_to) identifier_bindable_to )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_props) identifier_props (identifier_append) identifier_append )attribute (argument_list (identifier_k) identifier_k )argument_list )call )expression_statement )block )if_statement )block )for_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_env) identifier_env )attribute (identifier_property_rules) identifier_property_rules )attribute (identifier_user_properties) identifier_user_properties )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (attribute (identifier_self) identifier_self (identifier_inst) identifier_inst )attribute )argument_list )call (attribute (identifier_v) identifier_v (identifier_bindable_to) identifier_bindable_to )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_props) identifier_props (identifier_append) identifier_append )attribute (argument_list (identifier_k) identifier_k )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_props) identifier_props )return_statement )block (else_clause (block (return_statement (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_inst) identifier_inst )attribute (identifier_properties) identifier_properties )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Lists properties associated with this node. By default, only lists properties that were explicitly set. If ``list_all`` is set to ``True`` then lists all valid properties of this component type Parameters ---------- list_all: bool If true, lists all valid properties of this component type.
(module (function_definition (function_name_create_socket) function_name_create_socket (parameters )parameters (block (expression_statement (assignment (identifier_sock) identifier_sock (call (attribute (identifier_socket) identifier_socket (identifier_socket) identifier_socket )attribute (argument_list (identifier_PF_CAN) identifier_PF_CAN (attribute (identifier_socket) identifier_socket (identifier_SOCK_RAW) identifier_SOCK_RAW )attribute (identifier_CAN_RAW) identifier_CAN_RAW )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'Created a socket') string_'Created a socket' )argument_list )call )expression_statement (return_statement (identifier_sock) identifier_sock )return_statement )block )function_definition )module
Creates a raw CAN socket. The socket will be returned unbound to any interface.
(module (function_definition (function_name_make) function_name_make (parameters (identifier_parser) identifier_parser )parameters (block (expression_statement (assignment (identifier_mds_parser) identifier_mds_parser (call (attribute (identifier_parser) identifier_parser (identifier_add_subparsers) identifier_add_subparsers )attribute (argument_list (keyword_argument (identifier_dest) identifier_dest (string_'subcommand') string_'subcommand' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_mds_parser) identifier_mds_parser (identifier_required) identifier_required )attribute (True) True )assignment )expression_statement (expression_statement (assignment (identifier_mds_create) identifier_mds_create (call (attribute (identifier_mds_parser) identifier_mds_parser (identifier_add_parser) identifier_add_parser )attribute (argument_list (string_'create') string_'create' (keyword_argument (identifier_help) identifier_help (string_'Deploy Ceph MDS on remote host(s)') string_'Deploy Ceph MDS on remote host(s)' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_mds_create) identifier_mds_create (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_'mds') string_'mds' (keyword_argument (identifier_metavar) identifier_metavar (string_'HOST[:NAME]') string_'HOST[:NAME]' )keyword_argument (keyword_argument (identifier_nargs) identifier_nargs (string_'+') string_'+' )keyword_argument (keyword_argument (identifier_type) identifier_type (identifier_colon_separated) identifier_colon_separated )keyword_argument (keyword_argument (identifier_help) identifier_help (string_'host (and optionally the daemon name) to deploy on') string_'host (and optionally the daemon name) to deploy on' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_set_defaults) identifier_set_defaults )attribute (argument_list (keyword_argument (identifier_func) identifier_func (identifier_mds) identifier_mds )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Ceph MDS daemon management